@kaizen/components 1.66.1 → 1.67.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/README.md +5 -0
- package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +255 -0
- package/codemods/upgradeIconV1/index.ts +33 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.spec.ts +83 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.ts +53 -0
- package/codemods/upgradeIconV1/transformIcon.spec.ts +181 -0
- package/codemods/upgradeIconV1/transformIcon.ts +115 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.spec.ts +81 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.ts +41 -0
- package/codemods/upgradeIconV1/upgradeIconV1.spec.ts +306 -0
- package/codemods/upgradeIconV1/upgradeIconV1.ts +94 -0
- package/codemods/utils/createProp.spec.ts +83 -0
- package/codemods/utils/createProp.ts +51 -0
- package/codemods/utils/getKaioTagName.spec.ts +85 -0
- package/codemods/utils/getKaioTagName.ts +129 -0
- package/codemods/utils/index.ts +3 -1
- package/codemods/utils/transformComponentsInDir.ts +32 -16
- package/codemods/utils/transformSource.ts +10 -5
- package/codemods/utils/updateJsxElementWithNewProps.ts +4 -3
- package/codemods/utils/updateKaioImports.spec.ts +223 -0
- package/codemods/utils/updateKaioImports.ts +233 -0
- package/dist/cjs/Avatar/Avatar.cjs +16 -13
- package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +9 -7
- package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +9 -7
- package/dist/cjs/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +9 -7
- package/dist/cjs/Checkbox/Checkbox/Checkbox.cjs +5 -11
- package/dist/cjs/ClearButton/ClearButton.cjs +5 -4
- package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +4 -7
- package/dist/cjs/DateInput/DateInputWithIconButton/DateInputWithIconButton.cjs +5 -4
- package/dist/cjs/DateRangePicker/DateRangePicker.cjs +5 -4
- package/dist/cjs/ErrorPage/ErrorPage.cjs +9 -7
- package/dist/cjs/FieldMessage/FieldMessage.cjs +5 -11
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -5
- package/dist/cjs/Filter/FilterButton/FilterButton/FilterButton.cjs +4 -7
- package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +5 -5
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
- package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +5 -4
- package/dist/cjs/Illustration/utils/usePausePlay.cjs +5 -8
- package/dist/cjs/Input/InputSearch/InputSearch.cjs +4 -3
- package/dist/cjs/LikertScaleLegacy/LikertScaleLegacy.cjs +5 -6
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +31 -26
- package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +4 -5
- package/dist/cjs/MultiSelect/subcomponents/Checkbox/Checkbox.cjs +7 -17
- package/dist/cjs/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.cjs +4 -7
- package/dist/cjs/Notification/subcomponents/CancelButton/CancelButton.cjs +4 -3
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +33 -38
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.cjs +6 -0
- package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +11 -19
- package/dist/cjs/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.cjs +4 -5
- package/dist/cjs/Popover/Popover.cjs +5 -4
- package/dist/cjs/Popover/utils/classMappers.cjs +21 -16
- package/dist/cjs/RichTextEditor/RichTextEditor/utils/controlmap.cjs +29 -25
- package/dist/cjs/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.cjs +10 -12
- package/dist/cjs/Select/Select.cjs +8 -10
- package/dist/cjs/SplitButton/subcomponents/DropdownButton/DropdownButton.cjs +4 -4
- package/dist/cjs/Table/Table.cjs +11 -10
- package/dist/cjs/Tag/Tag.cjs +21 -17
- package/dist/cjs/TextField/TextField.cjs +5 -4
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +8 -7
- package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +9 -12
- package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +7 -7
- package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +10 -15
- package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +7 -7
- package/dist/cjs/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +5 -5
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +13 -18
- package/dist/cjs/__future__/Icon/Icon.cjs +47 -0
- package/dist/cjs/__future__/Icon/Icon.module.css.cjs +10 -0
- package/dist/cjs/__future__/Icon/constants.cjs +8 -0
- package/dist/cjs/__future__/Select/subcomponents/Option/Option.cjs +4 -5
- package/dist/cjs/__future__/Select/subcomponents/SelectToggle/SelectToggle.cjs +5 -9
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
- package/dist/cjs/future.cjs +2 -0
- package/dist/esm/Avatar/Avatar.mjs +16 -13
- package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +9 -7
- package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +9 -7
- package/dist/esm/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +9 -7
- package/dist/esm/Checkbox/Checkbox/Checkbox.mjs +5 -11
- package/dist/esm/ClearButton/ClearButton.mjs +5 -4
- package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +5 -8
- package/dist/esm/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +5 -4
- package/dist/esm/DateRangePicker/DateRangePicker.mjs +5 -4
- package/dist/esm/ErrorPage/ErrorPage.mjs +10 -8
- package/dist/esm/FieldMessage/FieldMessage.mjs +6 -12
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -5
- package/dist/esm/Filter/FilterButton/FilterButton/FilterButton.mjs +5 -8
- package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +5 -5
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
- package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +5 -4
- package/dist/esm/Illustration/utils/usePausePlay.mjs +5 -8
- package/dist/esm/Input/InputSearch/InputSearch.mjs +4 -3
- package/dist/esm/LikertScaleLegacy/LikertScaleLegacy.mjs +5 -6
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +31 -26
- package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +4 -5
- package/dist/esm/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +7 -17
- package/dist/esm/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +5 -8
- package/dist/esm/Notification/subcomponents/CancelButton/CancelButton.mjs +4 -3
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +33 -38
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.mjs +4 -0
- package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +11 -19
- package/dist/esm/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +4 -5
- package/dist/esm/Popover/Popover.mjs +5 -4
- package/dist/esm/Popover/utils/classMappers.mjs +21 -16
- package/dist/esm/RichTextEditor/RichTextEditor/utils/controlmap.mjs +33 -29
- package/dist/esm/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +10 -12
- package/dist/esm/Select/Select.mjs +9 -11
- package/dist/esm/SplitButton/subcomponents/DropdownButton/DropdownButton.mjs +4 -4
- package/dist/esm/Table/Table.mjs +11 -10
- package/dist/esm/Tag/Tag.mjs +21 -17
- package/dist/esm/TextField/TextField.mjs +5 -4
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +8 -7
- package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +9 -12
- package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +7 -7
- package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +13 -18
- package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +7 -7
- package/dist/esm/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +5 -5
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +16 -21
- package/dist/esm/__future__/Icon/Icon.mjs +38 -0
- package/dist/esm/__future__/Icon/Icon.module.css.mjs +8 -0
- package/dist/esm/__future__/Icon/constants.mjs +6 -0
- package/dist/esm/__future__/Select/subcomponents/Option/Option.mjs +4 -5
- package/dist/esm/__future__/Select/subcomponents/SelectToggle/SelectToggle.mjs +6 -10
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
- package/dist/esm/future.mjs +1 -0
- package/dist/styles.css +555 -531
- package/dist/types/__future__/Icon/Icon.d.ts +21 -0
- package/dist/types/__future__/Icon/constants.d.ts +5 -0
- package/dist/types/__future__/Icon/index.d.ts +1 -0
- package/dist/types/__future__/Icon/types.d.ts +4 -0
- package/dist/types/__future__/index.d.ts +1 -0
- package/package.json +21 -21
- package/src/Avatar/Avatar.module.scss +6 -8
- package/src/Avatar/Avatar.tsx +14 -5
- package/src/BrandMoment/_docs/BrandMoment.stories.tsx +6 -10
- package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
- package/src/Calendar/CalendarRange/CalendarRange.tsx +7 -3
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +7 -3
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +7 -3
- package/src/Calendar/baseCalendarClassNames.module.scss +0 -4
- package/src/Checkbox/Checkbox/Checkbox.module.scss +0 -8
- package/src/Checkbox/Checkbox/Checkbox.tsx +6 -8
- package/src/ClearButton/ClearButton.tsx +2 -2
- package/src/Collapsible/Collapsible/Collapsible.tsx +5 -6
- package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +2 -2
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +2 -7
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +2 -2
- package/src/DateRangePicker/DateRangePicker.tsx +2 -2
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +8 -2
- package/src/EmptyState/_docs/EmptyState.stories.tsx +4 -2
- package/src/ErrorPage/ErrorPage.tsx +5 -3
- package/src/FieldMessage/FieldMessage.tsx +6 -14
- package/src/Filter/FilterBar/FilterBar.spec.tsx +12 -12
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +2 -2
- package/src/Filter/FilterButton/FilterButton/FilterButton.module.scss +1 -1
- package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +5 -6
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +0 -1
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +2 -1
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
- package/src/GuidanceBlock/GuidanceBlock.tsx +6 -2
- package/src/Icon/_docs/{Icon.stories.tsx → Icon.docs.stories.tsx} +1 -1
- package/src/Icon/_docs/Icon.mdx +1 -2
- package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
- package/src/Illustration/utils/usePausePlay.tsx +7 -5
- package/src/Input/Input/_docs/Input.stickersheet.stories.tsx +7 -5
- package/src/Input/Input/_docs/Input.stories.tsx +5 -3
- package/src/Input/InputSearch/InputSearch.tsx +2 -2
- package/src/Label/Label.module.scss +4 -0
- package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
- package/src/MultiSelect/MultiSelect.spec.tsx +7 -3
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +0 -6
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +10 -9
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +11 -7
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +5 -7
- package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +2 -2
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +3 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +22 -16
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +0 -4
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +13 -12
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.scss +0 -1
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.tsx +2 -2
- package/src/Popover/Popover.module.scss +3 -3
- package/src/Popover/Popover.tsx +2 -2
- package/src/Popover/utils/classMappers.tsx +6 -11
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stickersheet.stories.tsx +7 -7
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stories.tsx +2 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.spec.tsx +7 -4
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.stories.tsx +18 -12
- package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +25 -18
- package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.tsx +4 -8
- package/src/Select/Select.module.scss +2 -0
- package/src/Select/Select.tsx +10 -7
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +4 -5
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.tsx +2 -2
- package/src/Table/Table.tsx +4 -8
- package/src/Table/_docs/Table.stickersheet.stories.tsx +4 -4
- package/src/Table/_docs/Table.stories.tsx +3 -3
- package/src/Tag/Tag.module.scss +2 -0
- package/src/Tag/Tag.tsx +7 -13
- package/src/Text/Text.module.scss +2 -0
- package/src/TextField/TextField.spec.tsx +9 -4
- package/src/TextField/TextField.tsx +2 -2
- package/src/TextField/_docs/TextField.stories.tsx +4 -3
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
- package/src/TitleBlockZen/TitleBlockZen.module.scss +1 -0
- package/src/TitleBlockZen/TitleBlockZen.spec.tsx +1 -1
- package/src/TitleBlockZen/TitleBlockZen.tsx +6 -9
- package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +5 -5
- package/src/TitleBlockZen/subcomponents/MainActions.tsx +5 -3
- package/src/TitleBlockZen/subcomponents/MobileActions.tsx +13 -16
- package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +3 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +2 -2
- package/src/Workflow/_docs/Workflow.stories.tsx +4 -5
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +4 -5
- package/src/Workflow/_docs/controls/controls.tsx +4 -4
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +6 -31
- package/src/__actions__/Button/v1/Button/_docs/Button.mdx +1 -1
- package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +6 -6
- package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +7 -6
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +7 -7
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +5 -5
- package/src/__actions__/Button/v2/Button/_docs/Button.mdx +1 -1
- package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +7 -6
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +5 -5
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.mdx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.stories.tsx +1 -1
- package/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx +6 -6
- package/src/__actions__/Menu/v1/_docs/examples.tsx +5 -5
- package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +1 -3
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +46 -45
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +1 -1
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +21 -23
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -15
- package/src/__future__/Icon/Icon.module.css +35 -0
- package/src/__future__/Icon/Icon.spec.tsx +36 -0
- package/src/__future__/Icon/Icon.tsx +85 -0
- package/src/__future__/Icon/_docs/Icon--api-specification.mdx +98 -0
- package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +145 -0
- package/src/__future__/Icon/_docs/Icon.docs.module.css +17 -0
- package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +524 -0
- package/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx +126 -0
- package/src/__future__/Icon/_docs/assets/interface-dont.png +0 -0
- package/src/__future__/Icon/_docs/assets/tooltip-dont.png +0 -0
- package/src/__future__/Icon/constants.ts +149 -0
- package/src/__future__/Icon/index.ts +1 -0
- package/src/__future__/Icon/material-symbols-metadata.json +3370 -0
- package/src/__future__/Icon/types.ts +11 -0
- package/src/__future__/Select/subcomponents/Option/Option.tsx +2 -2
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +1 -1
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +6 -9
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +0 -56
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +2 -12
- package/src/__future__/Tag/Tag/Tag.module.scss +1 -1
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +6 -17
- package/src/__future__/Tag/Tag/_docs/Tag.stickersheet.stories.tsx +5 -2
- package/src/__future__/Tag/Tag/_docs/Tag.stories.tsx +13 -6
- package/src/__future__/index.ts +1 -0
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +7 -4
- package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -11
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +3 -3
- package/codemods/utils/getTagName.spec.ts +0 -24
- package/codemods/utils/getTagName.ts +0 -32
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.mjs +0 -15
- package/dist/types/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.d.ts +0 -2
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
|
@@ -313,7 +313,7 @@ describe("<FilterBar />", () => {
|
|
|
313
313
|
/>
|
|
314
314
|
)
|
|
315
315
|
await waitForI18nContent()
|
|
316
|
-
expect(getByTestId("testid__values").textContent).
|
|
316
|
+
expect(getByTestId("testid__values").textContent).toBe(
|
|
317
317
|
JSON.stringify({})
|
|
318
318
|
)
|
|
319
319
|
})
|
|
@@ -580,7 +580,7 @@ describe("<FilterBar />", () => {
|
|
|
580
580
|
await user.click(getByRole("option", { name: "Long Black" }))
|
|
581
581
|
|
|
582
582
|
await waitFor(() => {
|
|
583
|
-
expect(coffeeButton
|
|
583
|
+
expect(coffeeButton).toHaveAccessibleName("Coffee : Long Black")
|
|
584
584
|
})
|
|
585
585
|
const iceButton = getByRole("button", { name: "Ice" })
|
|
586
586
|
expect(iceButton).toBeVisible()
|
|
@@ -590,7 +590,7 @@ describe("<FilterBar />", () => {
|
|
|
590
590
|
await user.click(getByRole("option", { name: "Latte" }))
|
|
591
591
|
|
|
592
592
|
await waitFor(() => {
|
|
593
|
-
expect(coffeeButton
|
|
593
|
+
expect(coffeeButton).toHaveAccessibleName("Coffee : Latte")
|
|
594
594
|
})
|
|
595
595
|
const milkButton = getByRole("button", { name: "Milk" })
|
|
596
596
|
expect(milkButton).toBeVisible()
|
|
@@ -600,7 +600,7 @@ describe("<FilterBar />", () => {
|
|
|
600
600
|
await user.click(getByRole("option", { name: "Oat" }))
|
|
601
601
|
|
|
602
602
|
await waitFor(() => {
|
|
603
|
-
expect(milkButton
|
|
603
|
+
expect(milkButton).toHaveAccessibleName("Milk : Oat")
|
|
604
604
|
})
|
|
605
605
|
expect(addFiltersButton).not.toBeDisabled()
|
|
606
606
|
|
|
@@ -657,16 +657,16 @@ describe("<FilterBar />", () => {
|
|
|
657
657
|
})
|
|
658
658
|
const iceLevelButton = getByRole("button", { name: "Ice Level : 100%" })
|
|
659
659
|
|
|
660
|
-
expect(flavourButton
|
|
661
|
-
expect(sugarLevelButton
|
|
662
|
-
expect(iceLevelButton
|
|
660
|
+
expect(flavourButton).toHaveAccessibleName("Flavour : Jasmine Milk Tea")
|
|
661
|
+
expect(sugarLevelButton).toHaveAccessibleName("Sugar Level : 50%")
|
|
662
|
+
expect(iceLevelButton).toHaveAccessibleName("Ice Level : 100%")
|
|
663
663
|
|
|
664
664
|
await user.click(getByRole("button", { name: "Clear all filters" }))
|
|
665
665
|
|
|
666
666
|
await waitFor(() => {
|
|
667
|
-
expect(flavourButton
|
|
668
|
-
expect(sugarLevelButton
|
|
669
|
-
expect(iceLevelButton
|
|
667
|
+
expect(flavourButton).toHaveAccessibleName("Flavour")
|
|
668
|
+
expect(sugarLevelButton).toHaveAccessibleName("Sugar Level")
|
|
669
|
+
expect(iceLevelButton).toHaveAccessibleName("Ice Level")
|
|
670
670
|
})
|
|
671
671
|
})
|
|
672
672
|
|
|
@@ -744,14 +744,14 @@ describe("<FilterBar />", () => {
|
|
|
744
744
|
await waitForI18nContent()
|
|
745
745
|
|
|
746
746
|
const flavourButton = getByRole("button", { name: "Flavour" })
|
|
747
|
-
expect(flavourButton
|
|
747
|
+
expect(flavourButton).toHaveAccessibleName("Flavour")
|
|
748
748
|
|
|
749
749
|
await user.click(
|
|
750
750
|
getByRole("button", { name: "Update Flavour to honey-milk-tea" })
|
|
751
751
|
)
|
|
752
752
|
|
|
753
753
|
await waitFor(() => {
|
|
754
|
-
expect(flavourButton
|
|
754
|
+
expect(flavourButton).toHaveAccessibleName("Flavour : Honey Milk Tea")
|
|
755
755
|
})
|
|
756
756
|
})
|
|
757
757
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { useIntl } from "@cultureamp/i18n-react-intl"
|
|
3
|
-
import { AddIcon } from "~components/Icon"
|
|
4
3
|
import { Menu, MenuList, MenuItem, Button } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import { useFilterBarContext } from "../../context/FilterBarContext"
|
|
6
6
|
|
|
7
7
|
export const AddFiltersMenu = (): JSX.Element => {
|
|
@@ -24,7 +24,7 @@ export const AddFiltersMenu = (): JSX.Element => {
|
|
|
24
24
|
label={menuButtonLabel}
|
|
25
25
|
secondary
|
|
26
26
|
disabled={inactiveFilters.length === 0}
|
|
27
|
-
icon={<
|
|
27
|
+
icon={<Icon name="add" isPresentational />}
|
|
28
28
|
/>
|
|
29
29
|
}
|
|
30
30
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { isRefObject } from "~components/utils/isRefObject"
|
|
5
5
|
import { FilterTriggerRef } from "../../Filter/types"
|
|
6
6
|
import {
|
|
@@ -45,11 +45,10 @@ export const FilterButton = forwardRef<FilterTriggerRef, FilterButtonProps>(
|
|
|
45
45
|
label
|
|
46
46
|
)}
|
|
47
47
|
</span>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)}
|
|
48
|
+
<Icon
|
|
49
|
+
name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
50
|
+
isPresentational
|
|
51
|
+
/>
|
|
53
52
|
</FilterButtonBase>
|
|
54
53
|
)
|
|
55
54
|
}
|
|
@@ -2,7 +2,7 @@ import React, { forwardRef } from "react"
|
|
|
2
2
|
import { useIntl } from "@cultureamp/i18n-react-intl"
|
|
3
3
|
import { ButtonGroup, ButtonGroupProps } from "~components/ButtonGroup"
|
|
4
4
|
import { FilterTriggerRef } from "~components/Filter/Filter"
|
|
5
|
-
import {
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { Tooltip } from "~components/__overlays__/Tooltip/v1"
|
|
7
7
|
import { DataAttributes } from "~components/types/DataAttributes"
|
|
8
8
|
import { isRefObject } from "~components/utils/isRefObject"
|
|
@@ -50,7 +50,7 @@ export const FilterButtonRemovable = forwardRef<
|
|
|
50
50
|
<FilterButton ref={ref} {...triggerButtonProps} />
|
|
51
51
|
<Tooltip text={removeButtonLabel} display="inline-block" position="below">
|
|
52
52
|
<FilterButtonBase ref={removeButtonRef} {...removeButtonProps}>
|
|
53
|
-
<
|
|
53
|
+
<Icon name="cancel" alt={removeButtonLabel} isFilled />
|
|
54
54
|
</FilterButtonBase>
|
|
55
55
|
</Tooltip>
|
|
56
56
|
</ButtonGroup>
|
|
@@ -67,7 +67,8 @@ describe("<DateRangeInputField />", () => {
|
|
|
67
67
|
const inputStart = screen.getByRole("textbox", { name: "Date from" })
|
|
68
68
|
await waitFor(() => {
|
|
69
69
|
expect(inputStart).toHaveAccessibleDescription(
|
|
70
|
-
|
|
70
|
+
// React Testing Library bug: Icon should be showing aria-label "error message" instead
|
|
71
|
+
"error Date Start has an error Input format : dd/mm/yyyy"
|
|
71
72
|
)
|
|
72
73
|
expect(screen.getByText("Date Start has an error")).toBeVisible()
|
|
73
74
|
})
|
|
@@ -4,8 +4,8 @@ import { useOption } from "@react-aria/listbox"
|
|
|
4
4
|
import { mergeProps } from "@react-aria/utils"
|
|
5
5
|
import classnames from "classnames"
|
|
6
6
|
import { Badge } from "~components/Badge"
|
|
7
|
-
import { CheckIcon } from "~components/Icon"
|
|
8
7
|
import { VisuallyHidden } from "~components/VisuallyHidden"
|
|
8
|
+
import { Icon } from "~components/__future__/Icon"
|
|
9
9
|
import { useSelectionContext } from "../../context"
|
|
10
10
|
import { MultiSelectItem } from "../../types"
|
|
11
11
|
import styles from "./MultiSelectOption.module.scss"
|
|
@@ -50,7 +50,7 @@ export const MultiSelectOption = ({
|
|
|
50
50
|
<span
|
|
51
51
|
className={classnames(styles.icon, isSelected && styles.isSelected)}
|
|
52
52
|
>
|
|
53
|
-
{isSelected && <
|
|
53
|
+
{isSelected && <Icon name="check" isPresentational />}
|
|
54
54
|
</span>
|
|
55
55
|
{/* can also be item.value since 'rendered' is defined as item.value in SelectionProvider*/}
|
|
56
56
|
{item.rendered}
|
|
@@ -198,16 +198,15 @@ describe("<FilterSelect>", () => {
|
|
|
198
198
|
it("changes the value within the button when an option is selected", async () => {
|
|
199
199
|
render(
|
|
200
200
|
<FilterSelectWrapper
|
|
201
|
-
isOpen
|
|
202
201
|
renderTrigger={(triggerButtonProps): JSX.Element => (
|
|
203
|
-
<FilterButton
|
|
202
|
+
<FilterButton {...triggerButtonProps} />
|
|
204
203
|
)}
|
|
205
204
|
/>
|
|
206
205
|
)
|
|
207
|
-
// Use testid because when the filter is open, the button is inaccessible
|
|
208
|
-
expect(screen.getByTestId("test__trigger").textContent).toBe("Coffee")
|
|
209
206
|
|
|
210
|
-
|
|
207
|
+
const button = screen.getByRole("button", { name: "Coffee" })
|
|
208
|
+
|
|
209
|
+
await user.click(button)
|
|
211
210
|
await waitFor(() => {
|
|
212
211
|
expect(screen.queryByRole("listbox")).toBeVisible()
|
|
213
212
|
})
|
|
@@ -2,10 +2,10 @@ import React, { useEffect, useState } from "react"
|
|
|
2
2
|
import classNames from "classnames"
|
|
3
3
|
import Media from "react-media"
|
|
4
4
|
import { Heading, HeadingProps } from "~components/Heading"
|
|
5
|
-
import { ArrowForwardIcon } from "~components/Icon"
|
|
6
5
|
import { SceneProps, SpotProps } from "~components/Illustration"
|
|
7
6
|
import { Text } from "~components/Text"
|
|
8
7
|
import { Button, ButtonProps } from "~components/__actions__/v2"
|
|
8
|
+
import { Icon } from "~components/__future__/Icon"
|
|
9
9
|
import { Tooltip, TooltipProps } from "~components/__overlays__/Tooltip/v1"
|
|
10
10
|
import { VariantType } from "./types"
|
|
11
11
|
import styles from "./GuidanceBlock.module.scss"
|
|
@@ -223,7 +223,11 @@ export const GuidanceBlock = ({
|
|
|
223
223
|
<Button
|
|
224
224
|
icon={
|
|
225
225
|
withActionButtonArrow ? (
|
|
226
|
-
<
|
|
226
|
+
<Icon
|
|
227
|
+
name="arrow_forward"
|
|
228
|
+
isPresentational
|
|
229
|
+
shouldMirrorInRTL
|
|
230
|
+
/>
|
|
227
231
|
) : undefined
|
|
228
232
|
}
|
|
229
233
|
iconPosition="end"
|
package/src/Icon/_docs/Icon.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Canvas, Controls, Meta, Story } from "@storybook/blocks"
|
|
2
2
|
import { ResourceLinks } from "~storybook/components"
|
|
3
|
-
import * as IconStories from "./Icon.stories"
|
|
3
|
+
import * as IconStories from "./Icon.docs.stories"
|
|
4
4
|
|
|
5
5
|
<Meta of={IconStories} />
|
|
6
6
|
|
|
@@ -8,7 +8,6 @@ import * as IconStories from "./Icon.stories"
|
|
|
8
8
|
|
|
9
9
|
<ResourceLinks
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Icons"
|
|
11
|
-
|
|
12
11
|
/>
|
|
13
12
|
|
|
14
13
|
## Installation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, RefObject } from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
3
3
|
|
|
4
4
|
export type usePausePlayHook = {
|
|
5
5
|
toggle: () => void
|
|
@@ -24,10 +24,12 @@ export const usePausePlay = (
|
|
|
24
24
|
videoRef.current.pause()
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
icon:
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
icon: (
|
|
28
|
+
<Icon
|
|
29
|
+
name={isPaused ? "play_circle" : "pause"}
|
|
30
|
+
isPresentational
|
|
31
|
+
isFilled
|
|
32
|
+
/>
|
|
31
33
|
),
|
|
32
34
|
label: isPaused ? "Play animation" : "Pause animation",
|
|
33
35
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import {
|
|
5
5
|
StickerSheet,
|
|
6
6
|
StickerSheetStory,
|
|
@@ -35,16 +35,18 @@ const InputExampleGroup = (props: InputProps): JSX.Element => (
|
|
|
35
35
|
value={type}
|
|
36
36
|
type={type}
|
|
37
37
|
startIconAdornment={
|
|
38
|
-
<
|
|
39
|
-
|
|
38
|
+
<Icon
|
|
39
|
+
name="edit"
|
|
40
|
+
isPresentational
|
|
40
41
|
data-sb-a11y-color-contrast-disable={
|
|
41
42
|
props.disabled ? "true" : "false"
|
|
42
43
|
}
|
|
43
44
|
/>
|
|
44
45
|
}
|
|
45
46
|
endIconAdornment={
|
|
46
|
-
<
|
|
47
|
-
|
|
47
|
+
<Icon
|
|
48
|
+
name="close"
|
|
49
|
+
isPresentational
|
|
48
50
|
data-sb-a11y-color-contrast-disable={
|
|
49
51
|
props.disabled ? "true" : "false"
|
|
50
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { Input } from "../index"
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
@@ -87,14 +87,16 @@ export const Icons: Story = {
|
|
|
87
87
|
<Input
|
|
88
88
|
type="text"
|
|
89
89
|
value="Start Icon"
|
|
90
|
-
startIconAdornment={
|
|
90
|
+
startIconAdornment={
|
|
91
|
+
<Icon name="person_add" isPresentational isFilled />
|
|
92
|
+
}
|
|
91
93
|
/>
|
|
92
94
|
</li>
|
|
93
95
|
<li>
|
|
94
96
|
<Input
|
|
95
97
|
type="text"
|
|
96
98
|
value="End Icon"
|
|
97
|
-
endIconAdornment={<
|
|
99
|
+
endIconAdornment={<Icon name="edit" isPresentational isFilled />}
|
|
98
100
|
/>
|
|
99
101
|
</li>
|
|
100
102
|
</ul>
|
|
@@ -2,8 +2,8 @@ import React, { InputHTMLAttributes, useRef } from "react"
|
|
|
2
2
|
import { useIntl } from "@cultureamp/i18n-react-intl"
|
|
3
3
|
import classnames from "classnames"
|
|
4
4
|
import { ClearButton } from "~components/ClearButton"
|
|
5
|
-
import { SearchIcon } from "~components/Icon/SearchIcon"
|
|
6
5
|
import { LoadingSpinner } from "~components/Loading"
|
|
6
|
+
import { Icon } from "~components/__future__/Icon"
|
|
7
7
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
8
8
|
import styles from "./InputSearch.module.scss"
|
|
9
9
|
|
|
@@ -63,7 +63,7 @@ export const InputSearch = (props: InputSearchProps): JSX.Element => {
|
|
|
63
63
|
classNameOverride={styles.loadingSpinner}
|
|
64
64
|
/>
|
|
65
65
|
) : (
|
|
66
|
-
<
|
|
66
|
+
<Icon name="search" isPresentational />
|
|
67
67
|
)}
|
|
68
68
|
</div>
|
|
69
69
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { createRef, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { FieldMessage } from "~components/FieldMessage"
|
|
4
|
-
import { CheckIcon } from "~components/Icon"
|
|
5
4
|
import { Text } from "~components/Text"
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { ScaleValue, Scale, ScaleItem, ColorSchema } from "./types"
|
|
7
7
|
import determineSelectionFromKeyPress from "./utils/determineSelectionFromKeyPress"
|
|
8
8
|
import styles from "./LikertScaleLegacy.module.scss"
|
|
@@ -29,7 +29,7 @@ export type LikertScaleProps = {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const SelectedItemIcon = (): JSX.Element => (
|
|
32
|
-
<
|
|
32
|
+
<Icon name="check" isPresentational className={styles.check} />
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { Avatar } from "~components/Avatar"
|
|
4
|
-
import { ConfigureIcon } from "~components/Icon"
|
|
5
4
|
import { BrandMomentPositiveOutro, Informative } from "~components/Illustration"
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { StickerSheet } from "~storybook/components/StickerSheet"
|
|
7
7
|
import { LoadingGraphic } from "../index"
|
|
8
8
|
|
|
@@ -49,7 +49,7 @@ export const Size: Story = {
|
|
|
49
49
|
<StickerSheet.Body>
|
|
50
50
|
<StickerSheet.Row rowTitle="Icon (small)">
|
|
51
51
|
<LoadingGraphic size="small" />
|
|
52
|
-
<
|
|
52
|
+
<Icon name="build" alt="Aliens approaching!" isFilled />
|
|
53
53
|
</StickerSheet.Row>
|
|
54
54
|
<StickerSheet.Row rowTitle="Avatar (medium)">
|
|
55
55
|
<LoadingGraphic size="medium" />
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Heading } from "~components/Heading"
|
|
4
|
-
import {
|
|
5
|
-
CautionWhiteIcon,
|
|
6
|
-
ExclamationWhiteIcon,
|
|
7
|
-
InformationWhiteIcon,
|
|
8
|
-
SuccessWhiteIcon,
|
|
9
|
-
} from "~components/Icon"
|
|
10
4
|
import {
|
|
11
5
|
Assertive,
|
|
12
6
|
Cautionary,
|
|
@@ -23,6 +17,7 @@ import {
|
|
|
23
17
|
ModalBody,
|
|
24
18
|
} from "~components/Modal/GenericModal"
|
|
25
19
|
import { ButtonProps } from "~components/__actions__/v2"
|
|
20
|
+
import { Icon } from "~components/__future__/Icon"
|
|
26
21
|
import styles from "./ConfirmationModal.module.scss"
|
|
27
22
|
|
|
28
23
|
type Mood = "positive" | "informative" | "negative" | "cautionary" | "assertive"
|
|
@@ -77,46 +72,48 @@ type ConfirmationModalVariants = {
|
|
|
77
72
|
export type ConfirmationModalProps = BaseConfirmationModalProps &
|
|
78
73
|
(ConfirmationModalMoods | ConfirmationModalVariants)
|
|
79
74
|
|
|
80
|
-
const
|
|
81
|
-
variantName: Mood | Variant,
|
|
82
|
-
isProminent: boolean
|
|
83
|
-
): JSX.Element => {
|
|
75
|
+
const getIconName = (variantName: Mood | Variant): string => {
|
|
84
76
|
switch (variantName) {
|
|
85
77
|
case "cautionary":
|
|
86
|
-
return
|
|
87
|
-
<Cautionary />
|
|
88
|
-
) : (
|
|
89
|
-
<CautionWhiteIcon inheritSize role="presentation" />
|
|
90
|
-
)
|
|
78
|
+
return "warning"
|
|
91
79
|
case "informative":
|
|
92
|
-
return
|
|
93
|
-
<Informative />
|
|
94
|
-
) : (
|
|
95
|
-
<InformationWhiteIcon inheritSize role="presentation" />
|
|
96
|
-
)
|
|
80
|
+
return "info"
|
|
97
81
|
case "negative":
|
|
98
82
|
case "warning":
|
|
99
|
-
return
|
|
100
|
-
<Negative />
|
|
101
|
-
) : (
|
|
102
|
-
<ExclamationWhiteIcon inheritSize role="presentation" />
|
|
103
|
-
)
|
|
83
|
+
return "error"
|
|
104
84
|
case "positive":
|
|
105
85
|
case "success":
|
|
106
|
-
return
|
|
107
|
-
<Positive />
|
|
108
|
-
) : (
|
|
109
|
-
<SuccessWhiteIcon inheritSize role="presentation" />
|
|
110
|
-
)
|
|
86
|
+
return "check_circle"
|
|
111
87
|
case "assertive":
|
|
112
|
-
return
|
|
113
|
-
<Assertive />
|
|
114
|
-
) : (
|
|
115
|
-
<ExclamationWhiteIcon inheritSize role="presentation" />
|
|
116
|
-
)
|
|
88
|
+
return "error"
|
|
117
89
|
}
|
|
118
90
|
}
|
|
119
91
|
|
|
92
|
+
const getIcon = (
|
|
93
|
+
variantName: Mood | Variant,
|
|
94
|
+
isProminent: boolean
|
|
95
|
+
): JSX.Element => {
|
|
96
|
+
if (isProminent) {
|
|
97
|
+
switch (variantName) {
|
|
98
|
+
case "cautionary":
|
|
99
|
+
return <Cautionary />
|
|
100
|
+
case "informative":
|
|
101
|
+
return <Informative />
|
|
102
|
+
case "negative":
|
|
103
|
+
case "warning":
|
|
104
|
+
return <Negative />
|
|
105
|
+
case "positive":
|
|
106
|
+
case "success":
|
|
107
|
+
return <Positive />
|
|
108
|
+
case "assertive":
|
|
109
|
+
return <Assertive />
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const iconName = getIconName(variantName)
|
|
114
|
+
return <Icon name={iconName} isPresentational isFilled />
|
|
115
|
+
}
|
|
116
|
+
|
|
120
117
|
/**
|
|
121
118
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093114/Modal Guidance} |
|
|
122
119
|
* {@link https://cultureamp.design/?path=/docs/components-modals-confirmationmodal--docs Storybook}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { CloseIcon } from "~components/Icon"
|
|
3
2
|
import { IconButton } from "~components/__actions__/v2"
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { ModalBody } from "../ModalBody"
|
|
5
5
|
import styles from "./ModalHeader.module.scss"
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ export const ModalHeader = ({
|
|
|
20
20
|
<div className={styles.dismissButton}>
|
|
21
21
|
<IconButton
|
|
22
22
|
label="Dismiss"
|
|
23
|
-
icon={<
|
|
23
|
+
icon={<Icon name="close" isPresentational />}
|
|
24
24
|
reversed={reversed}
|
|
25
25
|
onClick={onDismiss}
|
|
26
26
|
disabled={onDismiss == undefined}
|
|
@@ -350,6 +350,7 @@ describe("Has validation status", () => {
|
|
|
350
350
|
)
|
|
351
351
|
expect(screen.getByText("No waffles are available")).toBeInTheDocument()
|
|
352
352
|
})
|
|
353
|
+
|
|
353
354
|
it("describes the Toggle", () => {
|
|
354
355
|
render(
|
|
355
356
|
<MultiSelectWrapper
|
|
@@ -364,13 +365,16 @@ describe("Has validation status", () => {
|
|
|
364
365
|
expect(
|
|
365
366
|
screen.getByRole("button", {
|
|
366
367
|
name: "Breakfast menu",
|
|
367
|
-
|
|
368
|
+
// React Testing Library bug: Icon should be showing aria-label "caution message" instead
|
|
369
|
+
description: "warning Only four waffles remain",
|
|
368
370
|
})
|
|
369
371
|
).toBeInTheDocument()
|
|
370
372
|
})
|
|
373
|
+
|
|
371
374
|
it("announces the validation message before the Toggle's description", () => {
|
|
372
|
-
const description = "Choose
|
|
373
|
-
|
|
375
|
+
const description = "Choose your breakfast."
|
|
376
|
+
// React Testing Library bug: Icon should be showing aria-label "caution message" instead
|
|
377
|
+
const validationMessage = "warning Only four waffles remain."
|
|
374
378
|
|
|
375
379
|
render(
|
|
376
380
|
<MultiSelectWrapper
|
|
@@ -68,11 +68,5 @@ $focus-ring-size: calc(#{$checkbox-size} + #{$focus-ring-offset});
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.icon {
|
|
71
|
-
height: $checkbox-size;
|
|
72
|
-
width: $checkbox-size;
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 50%;
|
|
75
|
-
left: 50%;
|
|
76
|
-
transform: translate(-50%, -50%);
|
|
77
71
|
color: $color-white;
|
|
78
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, InputHTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import styles from "./Checkbox.module.scss"
|
|
6
6
|
|
|
@@ -25,14 +25,15 @@ export type CheckboxProps = {
|
|
|
25
25
|
>
|
|
26
26
|
|
|
27
27
|
const renderIcon = (status: CheckedStatus): JSX.Element | null => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
if (status === "unchecked") return null
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Icon
|
|
32
|
+
name={status === "checked" ? "check" : "remove"}
|
|
33
|
+
isPresentational
|
|
34
|
+
className={styles.icon}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export const Checkbox = ({
|