diff --git a/.changeset/old-weeks-pump.md b/.changeset/old-weeks-pump.md new file mode 100644 index 000000000..7d329594e --- /dev/null +++ b/.changeset/old-weeks-pump.md @@ -0,0 +1,21 @@ +--- +"@igloo-ui/form-group": major +"@igloo-ui/icon-button": major +"@igloo-ui/input": major +"@igloo-ui/modal": major +"@igloo-ui/pager": major +"@igloo-ui/progress-bar": major +"@igloo-ui/ellipsis": minor +"@igloo-ui/filter": minor +"@igloo-ui/helper-text": minor +"@igloo-ui/hyperlink": minor +"@igloo-ui/list": minor +"@igloo-ui/metric": minor +"@igloo-ui/option-button": minor +"@igloo-ui/pie-chart": minor +"@igloo-ui/popover": minor +"@igloo-ui/provider": minor +--- + +Clean up non-Workleap rebranded styles for components E-P. +All consumers should now be using the Workleap branded versions of the components. This will happen automatically, and consumers can stop setting `data-brand="workleap"` for these components. diff --git a/packages/Ellipsis/src/Ellipsis.stories.tsx b/packages/Ellipsis/src/Ellipsis.stories.tsx index 2cacad118..9bdea977e 100644 --- a/packages/Ellipsis/src/Ellipsis.stories.tsx +++ b/packages/Ellipsis/src/Ellipsis.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta, StoryFn } from '@storybook/react'; +import { Meta } from '@storybook/react'; import readme from '../README.md'; @@ -17,7 +17,8 @@ export default { description: { component: readme.replace(//g, '').replace(//g, ''), } - } + }, + brand: "workleap" }, decorators: [ (Story) => {Story()}, diff --git a/packages/Filter/src/Filter.stories.tsx b/packages/Filter/src/Filter.stories.tsx index b5e6d07c6..2f6706ca9 100644 --- a/packages/Filter/src/Filter.stories.tsx +++ b/packages/Filter/src/Filter.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta, StoryFn } from '@storybook/react'; +import { Meta } from '@storybook/react'; import Section from '@components/section'; import readme from '../README.md'; @@ -15,7 +15,8 @@ export default { description: { component: readme.replace(//g, '').replace(//g, ''), } - } + }, + brand: "workleap" }, } as Meta; diff --git a/packages/Filter/src/filter.scss b/packages/Filter/src/filter.scss index a50231c2b..860fc6322 100644 --- a/packages/Filter/src/filter.scss +++ b/packages/Filter/src/filter.scss @@ -6,49 +6,7 @@ @layer igloo { :root { - /* Default */ - --ids-filter-background: #{tokens.$grey-200}; - --ids-filter-border-color: transparent; - --ids-filter-border-radius: calc(#{tokens.$border-radius-md} * 4); - --ids-filter-color: #{tokens.$grey-600}; - --ids-filter-font-family: #{tokens.$primary-font-family}; - --ids-filter-font-size: #{tokens.$font-size-3}; - --ids-filter-line-height: #{tokens.$line-height-xxl}; - --ids-filter-padding: #{tokens.$space-2} #{tokens.$space-3}; - - /* Hover */ - --ids-filter-background-hover: #{tokens.$grey-300}; - --ids-filter-border-color-hover: transparent; - --ids-filter-color-hover: #{tokens.$grey-600}; - - /* Pressed */ - --ids-filter-background-pressed: #{tokens.$grey-300}; - --ids-filter-border-color-pressed: transparent; - --ids-filter-color-pressed: #{tokens.$grey-600}; - - /* Selected */ - --ids-filter-background-selected: #{tokens.$grey-500}; - --ids-filter-border-color-selected: transparent; - --ids-filter-color-selected: #{tokens.$samoyed}; - - /* Selected Hover */ - --ids-filter-background-selected-hover: #{tokens.$grey-800}; - --ids-filter-border-color-selected-hover: #{tokens.$grey-800}; - - /* Disabled */ - --ids-filter-background-disabled: #{tokens.$grey-200}; - --ids-filter-border-color-disabled: transparent; - --ids-filter-color-disabled: #{tokens.$grey-400}; - - /* Focus */ - - /* Needed to add a 0.1px blur to fix a bug where - chrome would have a lingering blue line when focusing in and out */ - --ids-filter-focus: 0 0 0 .2rem #ffffff, 0 0 .01rem .35rem #0c46d0; - } - - [data-brand="workleap"] { - /* Default */ + /* Default */ --ids-filter-background: var(--hop-neutral-surface-weak); --ids-filter-border-color: var(--hop-neutral-border); --ids-filter-border-radius: var(--hop-shape-pill); diff --git a/packages/FormGroup/src/FormGroup.stories.tsx b/packages/FormGroup/src/FormGroup.stories.tsx index b536bacd1..a7604c23b 100644 --- a/packages/FormGroup/src/FormGroup.stories.tsx +++ b/packages/FormGroup/src/FormGroup.stories.tsx @@ -5,7 +5,7 @@ import Textarea from '@igloo-ui/textarea'; import React from 'react'; import Section from '@components/section'; -import { Meta, StoryFn, StoryObj } from '@storybook/react'; +import { Meta, StoryFn } from '@storybook/react'; import readme from '../README.md'; import FormGroup from './FormGroup'; @@ -18,7 +18,8 @@ export default { description: { component: readme.replace(//g, '').replace(//g, ''), } - } + }, + brand: "workleap" }, } as Meta; @@ -93,69 +94,63 @@ export const info = () => { ); }; -export const OtherFormElements: StoryObj = { - parameters: { - brand: "workleap", - chromatic: { delay: 500 } - }, - render: () => { - const smallOptionList = [ - { - label: 'Text option', - value: 'text', - }, - { - label: 'Disabled option', - value: 'disabled', - disabled: true, - }, - { - label: 'Text option 3', - value: 'icon', - }, - ]; - - const [hasSelectError, setHasSelectError] = React.useState(true); - const [hasTextareaError, setHasTextareaError] = React.useState(true); - - const handleSelectOnChange = (option: OptionType | undefined): void => { - setHasSelectError(!option?.value); - }; - - const handleTextareaOnChange = ( - event: React.ChangeEvent - ): void => { - setHasTextareaError(!event?.target?.value); - }; - - return ( -
- { + const smallOptionList = [ + { + label: 'Text option', + value: 'text', + }, + { + label: 'Disabled option', + value: 'disabled', + disabled: true, + }, + { + label: 'Text option 3', + value: 'icon', + }, + ]; + + const [hasSelectError, setHasSelectError] = React.useState(true); + const [hasTextareaError, setHasTextareaError] = React.useState(true); + + const handleSelectOnChange = (option: OptionType | undefined): void => { + setHasSelectError(!option?.value); + }; + + const handleTextareaOnChange = ( + event: React.ChangeEvent + ): void => { + setHasTextareaError(!event?.target?.value); + }; + + return ( +
+ + - Error - - - - -