@kaizen/components 0.0.0-canary-fix-select-futureselect-focus-jumping-20241003232256 → 0.0.0-canary-tsx-codemod-20241029235345
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/bin/codemod.sh +2 -2
- package/codemods/README.md +12 -4
- 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/context/FilterBarContext.cjs +17 -2
- package/dist/cjs/Filter/FilterBar/context/reducer/filterBarStateReducer.cjs +4 -0
- package/dist/cjs/Filter/FilterBar/context/reducer/setupFilterBarState.cjs +2 -1
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +16 -6
- package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.cjs +12 -1
- package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.cjs +13 -2
- 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/FilterMultiSelect.cjs +4 -2
- package/dist/cjs/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.cjs +4 -2
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
- package/dist/cjs/Filter/FilterSelect/FilterSelect.cjs +2 -1
- 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/Loading/LoadingSpinner/LoadingSpinner.cjs +6 -42
- package/dist/cjs/Loading/LoadingSpinner/LoadingSpinner.module.css.cjs +10 -0
- package/dist/cjs/Loading/LoadingSpinner/subcomponents/SpinnerIcon.cjs +80 -0
- 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/TextArea/TextArea.cjs +20 -52
- package/dist/cjs/TextArea/TextArea.module.css.cjs +14 -0
- package/dist/cjs/TextField/TextField.cjs +7 -6
- package/dist/cjs/TextField/TextField.module.scss.cjs +4 -6
- 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/ListBox/ListBox.cjs +7 -10
- 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__/Tabs/Tabs.cjs +23 -0
- package/dist/cjs/__future__/Tabs/subcomponents/Tab/Tab.cjs +39 -0
- package/dist/cjs/__future__/Tabs/subcomponents/Tab/Tab.module.css.cjs +7 -0
- package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.cjs +31 -0
- package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.module.css.cjs +7 -0
- package/dist/cjs/__future__/Tabs/subcomponents/TabPanel/TabPanel.cjs +24 -0
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
- package/dist/cjs/future.cjs +10 -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/context/FilterBarContext.mjs +17 -2
- package/dist/esm/Filter/FilterBar/context/reducer/filterBarStateReducer.mjs +4 -0
- package/dist/esm/Filter/FilterBar/context/reducer/setupFilterBarState.mjs +2 -1
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +17 -7
- package/dist/esm/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.mjs +13 -2
- package/dist/esm/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.mjs +14 -3
- 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/FilterMultiSelect.mjs +4 -2
- package/dist/esm/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.mjs +4 -2
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
- package/dist/esm/Filter/FilterSelect/FilterSelect.mjs +2 -1
- 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/Loading/LoadingSpinner/LoadingSpinner.mjs +6 -42
- package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.css.mjs +8 -0
- package/dist/esm/Loading/LoadingSpinner/subcomponents/SpinnerIcon.mjs +72 -0
- 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/TextArea/TextArea.mjs +21 -53
- package/dist/esm/TextArea/TextArea.module.css.mjs +12 -0
- package/dist/esm/TextField/TextField.mjs +7 -6
- package/dist/esm/TextField/TextField.module.scss.mjs +4 -6
- 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/ListBox/ListBox.mjs +7 -11
- 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__/Tabs/Tabs.mjs +15 -0
- package/dist/esm/__future__/Tabs/subcomponents/Tab/Tab.mjs +30 -0
- package/dist/esm/__future__/Tabs/subcomponents/Tab/Tab.module.css.mjs +5 -0
- package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.mjs +22 -0
- package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.module.css.mjs +5 -0
- package/dist/esm/__future__/Tabs/subcomponents/TabPanel/TabPanel.mjs +16 -0
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
- package/dist/esm/future.mjs +5 -0
- package/dist/styles.css +828 -1388
- package/dist/types/Filter/FilterBar/context/FilterBarContext.d.ts +2 -0
- package/dist/types/Filter/FilterBar/context/reducer/filterBarStateReducer.d.ts +3 -0
- package/dist/types/Filter/FilterBar/context/types.d.ts +1 -0
- package/dist/types/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +2 -1
- package/dist/types/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.d.ts +2 -1
- package/dist/types/Loading/LoadingSpinner/LoadingSpinner.d.ts +2 -2
- package/dist/types/Loading/LoadingSpinner/subcomponents/SpinnerIcon.d.ts +5 -0
- package/dist/types/Loading/LoadingSpinner/subcomponents/index.d.ts +1 -0
- package/dist/types/Tabs/subcomponents/index.d.ts +0 -1
- package/dist/types/TextArea/TextArea.d.ts +4 -0
- 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__/Tabs/Tabs.d.ts +11 -0
- package/dist/types/__future__/Tabs/index.d.ts +2 -0
- package/dist/types/__future__/Tabs/subcomponents/Tab/Tab.d.ts +12 -0
- package/dist/types/__future__/Tabs/subcomponents/Tab/index.d.ts +1 -0
- package/dist/types/__future__/Tabs/subcomponents/TabList/TabList.d.ts +17 -0
- package/dist/types/__future__/Tabs/subcomponents/TabList/index.d.ts +1 -0
- package/dist/types/__future__/Tabs/subcomponents/TabPanel/TabPanel.d.ts +6 -0
- package/dist/types/__future__/Tabs/subcomponents/TabPanel/index.d.ts +1 -0
- package/dist/types/__future__/Tabs/subcomponents/index.d.ts +3 -0
- package/dist/types/__future__/index.d.ts +2 -0
- package/package.json +36 -37
- package/src/Avatar/Avatar.module.scss +10 -12
- 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 +2 -10
- 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 +99 -12
- package/src/Filter/FilterBar/context/FilterBarContext.tsx +11 -2
- package/src/Filter/FilterBar/context/reducer/filterBarStateReducer.ts +7 -0
- package/src/Filter/FilterBar/context/reducer/setupFilterBarState.ts +1 -0
- package/src/Filter/FilterBar/context/types.ts +1 -0
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +14 -4
- package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.tsx +10 -2
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.tsx +18 -3
- 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/FilterMultiSelect.tsx +3 -1
- package/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.tsx +4 -1
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
- package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectionControlButton.module.scss +9 -11
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +52 -21
- package/src/Filter/FilterSelect/FilterSelect.tsx +2 -1
- package/src/Filter/FilterSelect/_docs/FilterSelect.stories.tsx +0 -1
- package/src/GuidanceBlock/GuidanceBlock.module.scss +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/Icon/bin/update-icons.sh +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/InputRange/InputRange.module.scss +4 -4
- package/src/Input/InputSearch/InputSearch.module.scss +21 -21
- package/src/Input/InputSearch/InputSearch.tsx +2 -2
- package/src/Label/Label.module.scss +4 -0
- package/src/LikertScaleLegacy/LikertScaleLegacy.module.scss +7 -8
- package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
- package/src/Loading/LoadingSpinner/LoadingSpinner.module.css +32 -0
- package/src/Loading/LoadingSpinner/LoadingSpinner.tsx +10 -54
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +7 -2
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stickersheet.stories.tsx +2 -1
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stories.tsx +19 -0
- package/src/Loading/LoadingSpinner/subcomponents/SpinnerIcon.tsx +87 -0
- package/src/Loading/LoadingSpinner/subcomponents/index.ts +1 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
- package/src/Modal/ContextModal/ContextModal.module.scss +4 -4
- package/src/Modal/GenericModal/GenericModal.module.scss +8 -8
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.module.scss +2 -2
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
- package/src/Modal/InputEditModal/InputEditModal.module.scss +4 -4
- 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 +9 -8
- 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/RichTextEditor.module.scss +2 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.module.scss +1 -1
- 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 +9 -9
- 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.module.scss +11 -7
- 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/Tabs/subcomponents/index.ts +0 -1
- 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/TextArea/TextArea.module.css +142 -0
- package/src/TextArea/TextArea.tsx +25 -53
- package/src/TextField/TextField.module.scss +10 -36
- package/src/TextField/TextField.spec.tsx +9 -4
- package/src/TextField/TextField.tsx +4 -6
- package/src/TextField/_docs/TextField.stickersheet.stories.tsx +9 -1
- package/src/TextField/_docs/TextField.stories.tsx +4 -3
- package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +7 -8
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
- package/src/TitleBlockZen/TitleBlockZen.module.scss +15 -21
- 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.module.scss +2 -2
- 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/Button.module.scss +0 -1
- 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 +3 -3
- 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/_docs/Select.stories.tsx +1 -2
- package/src/__future__/Select/subcomponents/ListBox/ListBox.tsx +3 -4
- 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__/Tabs/Tabs.tsx +18 -0
- package/src/__future__/Tabs/_docs/Tabs--api-specification.mdx +43 -0
- package/src/__future__/Tabs/_docs/Tabs--migration-guide.mdx +93 -0
- package/src/__future__/Tabs/_docs/Tabs.stories.tsx +74 -0
- package/src/__future__/Tabs/index.ts +2 -0
- package/src/__future__/Tabs/subcomponents/Tab/Tab.module.css +94 -0
- package/src/__future__/Tabs/subcomponents/Tab/Tab.tsx +58 -0
- package/src/__future__/Tabs/subcomponents/Tab/index.ts +1 -0
- package/src/__future__/Tabs/subcomponents/TabList/TabList.module.css +8 -0
- package/src/__future__/Tabs/subcomponents/TabList/TabList.tsx +45 -0
- package/src/__future__/Tabs/subcomponents/TabList/index.ts +1 -0
- package/src/__future__/Tabs/subcomponents/TabPanel/TabPanel.module.css +12 -0
- package/src/__future__/Tabs/subcomponents/TabPanel/TabPanel.tsx +20 -0
- package/src/__future__/Tabs/subcomponents/TabPanel/index.ts +1 -0
- package/src/__future__/Tabs/subcomponents/index.ts +3 -0
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +1 -58
- 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 +2 -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/Loading/LoadingSpinner/LoadingSpinner.module.scss.cjs +0 -7
- package/dist/cjs/TextArea/TextArea.module.scss.cjs +0 -13
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
- package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.scss.mjs +0 -5
- package/dist/esm/TextArea/TextArea.module.scss.mjs +0 -11
- 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/Loading/LoadingSpinner/LoadingSpinner.module.scss +0 -16
- package/src/TextArea/TextArea.module.scss +0 -137
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
- /package/dist/cjs/__utilities__/{isClientReady → useIsClientReady}/useIsClientReady.cjs +0 -0
- /package/dist/esm/__utilities__/{isClientReady → useIsClientReady}/useIsClientReady.mjs +0 -0
- /package/dist/types/__utilities__/{isClientReady → useIsClientReady}/index.d.ts +0 -0
- /package/dist/types/__utilities__/{isClientReady → useIsClientReady}/useIsClientReady.d.ts +0 -0
- /package/src/__utilities__/{isClientReady → useIsClientReady}/index.ts +0 -0
- /package/src/__utilities__/{isClientReady → useIsClientReady}/useIsClientReady.tsx +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react"
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react"
|
|
2
2
|
import { Selection, Key } from "@react-types/shared"
|
|
3
3
|
import {
|
|
4
4
|
FilterMultiSelect,
|
|
@@ -43,9 +43,16 @@ export const FilterBarMultiSelect = ({
|
|
|
43
43
|
onSelectionChange,
|
|
44
44
|
...props
|
|
45
45
|
}: FilterBarMultiSelectProps): JSX.Element | null => {
|
|
46
|
-
const {
|
|
47
|
-
|
|
46
|
+
const {
|
|
47
|
+
getFilterState,
|
|
48
|
+
setFilterOpenState,
|
|
49
|
+
updateValue,
|
|
50
|
+
hideFilter,
|
|
51
|
+
focusId,
|
|
52
|
+
setFocus,
|
|
53
|
+
} = useFilterBarContext<ConsumableSelection>()
|
|
48
54
|
const [items, setItems] = useState<ItemType[]>(propsItems)
|
|
55
|
+
const buttonRef = useRef<HTMLButtonElement>(null)
|
|
49
56
|
|
|
50
57
|
if (!id) throw Error("Missing `id` prop in FilterBarMultiSelect")
|
|
51
58
|
|
|
@@ -70,6 +77,13 @@ export const FilterBarMultiSelect = ({
|
|
|
70
77
|
}
|
|
71
78
|
}, [items])
|
|
72
79
|
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (focusId === id) {
|
|
82
|
+
buttonRef.current?.focus()
|
|
83
|
+
setFocus(undefined)
|
|
84
|
+
}
|
|
85
|
+
}, [focusId])
|
|
86
|
+
|
|
73
87
|
return (
|
|
74
88
|
<FilterMultiSelect
|
|
75
89
|
label={filterState.name}
|
|
@@ -103,6 +117,7 @@ export const FilterBarMultiSelect = ({
|
|
|
103
117
|
<FilterMultiSelect.TriggerButton {...triggerProps} />
|
|
104
118
|
)
|
|
105
119
|
}}
|
|
120
|
+
triggerRef={buttonRef}
|
|
106
121
|
{...props}
|
|
107
122
|
>
|
|
108
123
|
{children}
|
|
@@ -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
|
})
|
|
@@ -41,6 +41,7 @@ type SelectionProps = {
|
|
|
41
41
|
export type FilterMultiSelectProps = {
|
|
42
42
|
trigger: (value?: MenuTriggerProviderContextType) => React.ReactNode
|
|
43
43
|
children: (value?: SelectionProviderContextType) => React.ReactNode // the content of the menu
|
|
44
|
+
triggerRef?: React.RefObject<HTMLButtonElement>
|
|
44
45
|
} & Omit<MenuPopupProps, "children"> &
|
|
45
46
|
Omit<MenuTriggerProviderProps, "children"> &
|
|
46
47
|
SelectionProps
|
|
@@ -60,8 +61,9 @@ export const FilterMultiSelect = ({
|
|
|
60
61
|
onSelectionChange,
|
|
61
62
|
selectionMode = "multiple",
|
|
62
63
|
onSearchInputChange,
|
|
64
|
+
triggerRef,
|
|
63
65
|
}: FilterMultiSelectProps): JSX.Element => {
|
|
64
|
-
const menuTriggerProps = { isOpen, defaultOpen, onOpenChange }
|
|
66
|
+
const menuTriggerProps = { isOpen, defaultOpen, onOpenChange, triggerRef }
|
|
65
67
|
const menuPopupProps = { isLoading, loadingSkeleton }
|
|
66
68
|
const disabledKeys: Selection = new Set(
|
|
67
69
|
items
|
|
@@ -14,6 +14,7 @@ export type MenuTriggerProviderProps = {
|
|
|
14
14
|
defaultOpen?: boolean
|
|
15
15
|
onOpenChange?: (isOpen: boolean) => void
|
|
16
16
|
children: React.ReactNode
|
|
17
|
+
triggerRef?: React.RefObject<HTMLButtonElement>
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export type MenuTriggerProviderContextType = {
|
|
@@ -32,12 +33,14 @@ export function MenuTriggerProvider({
|
|
|
32
33
|
defaultOpen,
|
|
33
34
|
onOpenChange,
|
|
34
35
|
children,
|
|
36
|
+
triggerRef,
|
|
35
37
|
}: MenuTriggerProviderProps): JSX.Element {
|
|
36
38
|
// Create state based on the incoming props to manage the open/close
|
|
37
39
|
const state = useMenuTriggerState({ isOpen, defaultOpen, onOpenChange })
|
|
38
40
|
|
|
39
41
|
// Get A11y attributes and events for the menu trigger and menu elements
|
|
40
|
-
const
|
|
42
|
+
const fallbackRef = useRef<HTMLButtonElement>(null)
|
|
43
|
+
const ref = triggerRef || fallbackRef
|
|
41
44
|
const { menuTriggerProps, menuProps } = useMenuTrigger<ItemType>(
|
|
42
45
|
{},
|
|
43
46
|
state,
|
|
@@ -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}
|
|
@@ -11,17 +11,20 @@ $focus-ring-offset: 1px;
|
|
|
11
11
|
|
|
12
12
|
-webkit-font-smoothing: antialiased;
|
|
13
13
|
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
font-family: $typography-button-secondary-font-family;
|
|
15
|
-
font-weight: $typography-button-secondary-font-weight;
|
|
16
|
-
font-size: $typography-button-secondary-font-size;
|
|
17
|
-
line-height: $typography-button-secondary-line-height;
|
|
18
|
-
letter-spacing: $typography-button-secondary-letter-spacing;
|
|
19
14
|
position: relative;
|
|
20
|
-
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: $spacing-xs;
|
|
21
18
|
border: $border-solid-border-width $border-solid-border-style;
|
|
22
19
|
border-color: $border-borderless-border-color;
|
|
23
20
|
border-radius: $border-solid-border-radius;
|
|
24
21
|
padding: $spacing-4 $spacing-8;
|
|
22
|
+
font-weight: $typography-button-secondary-font-weight;
|
|
23
|
+
font-family: $typography-button-secondary-font-family;
|
|
24
|
+
font-size: $typography-button-secondary-font-size;
|
|
25
|
+
line-height: $typography-button-secondary-line-height;
|
|
26
|
+
letter-spacing: $typography-button-secondary-letter-spacing;
|
|
27
|
+
color: $color-blue-500;
|
|
25
28
|
|
|
26
29
|
&:focus {
|
|
27
30
|
outline: none;
|
|
@@ -48,10 +51,6 @@ $focus-ring-offset: 1px;
|
|
|
48
51
|
inset: calc(-1 * #{$focus-ring-offset});
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
display: inline-flex;
|
|
52
|
-
gap: $spacing-xs;
|
|
53
|
-
align-items: center;
|
|
54
|
-
|
|
55
54
|
// TODO: copied from Calendar button since the design is not settled
|
|
56
55
|
&.isDisabled {
|
|
57
56
|
pointer-events: none;
|
|
@@ -64,7 +63,6 @@ $focus-ring-offset: 1px;
|
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
&:focus-visible::after {
|
|
67
|
-
border-style: $border-dashed-border-style;
|
|
68
66
|
border-color: $color-gray-400;
|
|
69
67
|
}
|
|
70
68
|
}
|
|
@@ -103,19 +103,6 @@ describe("<FilterSelect>", () => {
|
|
|
103
103
|
})
|
|
104
104
|
})
|
|
105
105
|
|
|
106
|
-
it("opens the menu when user hits enter key", async () => {
|
|
107
|
-
render(<FilterSelectWrapper />)
|
|
108
|
-
const trigger = screen.getByRole("button", { name: "Coffee" })
|
|
109
|
-
await user.tab()
|
|
110
|
-
await waitFor(() => {
|
|
111
|
-
expect(trigger).toHaveFocus()
|
|
112
|
-
})
|
|
113
|
-
await user.keyboard("{Enter}")
|
|
114
|
-
await waitFor(() => {
|
|
115
|
-
expect(screen.queryByRole("listbox")).toBeVisible()
|
|
116
|
-
})
|
|
117
|
-
})
|
|
118
|
-
|
|
119
106
|
it("moves the focus to the first focusable element inside the menu initially", async () => {
|
|
120
107
|
render(<FilterSelectWrapper isOpen />)
|
|
121
108
|
expect(screen.queryByRole("listbox")).toBeVisible()
|
|
@@ -124,7 +111,7 @@ describe("<FilterSelect>", () => {
|
|
|
124
111
|
})
|
|
125
112
|
})
|
|
126
113
|
|
|
127
|
-
it("
|
|
114
|
+
it("moves focus to the first item on ArrowDown if nothing has been selected", async () => {
|
|
128
115
|
render(<FilterSelectWrapper selectedKey={undefined} />)
|
|
129
116
|
const trigger = screen.getByRole("button", { name: "Coffee" })
|
|
130
117
|
await user.tab()
|
|
@@ -134,10 +121,10 @@ describe("<FilterSelect>", () => {
|
|
|
134
121
|
await user.keyboard("{ArrowDown}")
|
|
135
122
|
|
|
136
123
|
await waitFor(() => {
|
|
137
|
-
expect(screen.
|
|
124
|
+
expect(screen.getAllByRole("option")[0]).toHaveFocus()
|
|
138
125
|
})
|
|
139
126
|
})
|
|
140
|
-
it("
|
|
127
|
+
it("moves focus to the last item on ArrowUp if nothing has been selected", async () => {
|
|
141
128
|
render(<FilterSelectWrapper selectedKey={undefined} />)
|
|
142
129
|
const trigger = screen.getByRole("button", { name: "Coffee" })
|
|
143
130
|
await user.tab()
|
|
@@ -146,11 +133,56 @@ describe("<FilterSelect>", () => {
|
|
|
146
133
|
})
|
|
147
134
|
await user.keyboard("{ArrowUp}")
|
|
148
135
|
|
|
136
|
+
await waitFor(() => {
|
|
137
|
+
const options = screen.getAllByRole("option")
|
|
138
|
+
expect(options[options.length - 1]).toHaveFocus()
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
it("moves focus to the current selected item on Enter", async () => {
|
|
142
|
+
render(<FilterSelectWrapper selectedKey="hazelnut" />)
|
|
143
|
+
const trigger = screen.getByRole("button", {
|
|
144
|
+
name: "Coffee : Hazelnut",
|
|
145
|
+
})
|
|
146
|
+
await user.tab()
|
|
147
|
+
await waitFor(() => {
|
|
148
|
+
expect(trigger).toHaveFocus()
|
|
149
|
+
})
|
|
150
|
+
await user.keyboard("{Enter}")
|
|
151
|
+
|
|
152
|
+
await waitFor(() => {
|
|
153
|
+
expect(screen.getByRole("option", { name: "Hazelnut" })).toHaveFocus()
|
|
154
|
+
})
|
|
155
|
+
})
|
|
156
|
+
it("moves focus to the current selected item on ArrowUp", async () => {
|
|
157
|
+
render(<FilterSelectWrapper selectedKey="hazelnut" />)
|
|
158
|
+
const trigger = screen.getByRole("button", {
|
|
159
|
+
name: "Coffee : Hazelnut",
|
|
160
|
+
})
|
|
161
|
+
await user.tab()
|
|
162
|
+
await waitFor(() => {
|
|
163
|
+
expect(trigger).toHaveFocus()
|
|
164
|
+
})
|
|
165
|
+
await user.keyboard("{ArrowUp}")
|
|
166
|
+
|
|
149
167
|
await waitFor(() => {
|
|
150
168
|
expect(screen.getByRole("option", { name: "Hazelnut" })).toHaveFocus()
|
|
151
169
|
})
|
|
152
170
|
})
|
|
171
|
+
it("moves focus to the current selected item on ArrowDown", async () => {
|
|
172
|
+
render(<FilterSelectWrapper selectedKey="hazelnut" />)
|
|
173
|
+
const trigger = screen.getByRole("button", {
|
|
174
|
+
name: "Coffee : Hazelnut",
|
|
175
|
+
})
|
|
176
|
+
await user.tab()
|
|
177
|
+
await waitFor(() => {
|
|
178
|
+
expect(trigger).toHaveFocus()
|
|
179
|
+
})
|
|
180
|
+
await user.keyboard("{ArrowDown}")
|
|
153
181
|
|
|
182
|
+
await waitFor(() => {
|
|
183
|
+
expect(screen.getByRole("option", { name: "Hazelnut" })).toHaveFocus()
|
|
184
|
+
})
|
|
185
|
+
})
|
|
154
186
|
it("closes when user hits the escape key", async () => {
|
|
155
187
|
render(<FilterSelectWrapper isOpen />)
|
|
156
188
|
expect(screen.queryByRole("listbox")).toBeVisible()
|
|
@@ -166,16 +198,15 @@ describe("<FilterSelect>", () => {
|
|
|
166
198
|
it("changes the value within the button when an option is selected", async () => {
|
|
167
199
|
render(
|
|
168
200
|
<FilterSelectWrapper
|
|
169
|
-
isOpen
|
|
170
201
|
renderTrigger={(triggerButtonProps): JSX.Element => (
|
|
171
|
-
<FilterButton
|
|
202
|
+
<FilterButton {...triggerButtonProps} />
|
|
172
203
|
)}
|
|
173
204
|
/>
|
|
174
205
|
)
|
|
175
|
-
// Use testid because when the filter is open, the button is inaccessible
|
|
176
|
-
expect(screen.getByTestId("test__trigger").textContent).toBe("Coffee")
|
|
177
206
|
|
|
178
|
-
|
|
207
|
+
const button = screen.getByRole("button", { name: "Coffee" })
|
|
208
|
+
|
|
209
|
+
await user.click(button)
|
|
179
210
|
await waitFor(() => {
|
|
180
211
|
expect(screen.queryByRole("listbox")).toBeVisible()
|
|
181
212
|
})
|
|
@@ -79,7 +79,8 @@ export const FilterSelect = <Option extends SelectOption = SelectOption>({
|
|
|
79
79
|
|
|
80
80
|
const { buttonProps } = useButton(triggerProps, triggerRef)
|
|
81
81
|
|
|
82
|
-
//
|
|
82
|
+
// `aria-labelledby` and `aria-controls` are being remapped because the `buttonProps` ids generated by React Aria point to nothing.
|
|
83
|
+
// This should ideally be refactored but for now the `aria-controls` is set to the Filter's Listbox (menuProps.id) and the `aria-labelledby` to undefined so the accessible name is derived from the buttons content.
|
|
83
84
|
const renderTriggerButtonProps = {
|
|
84
85
|
...buttonProps,
|
|
85
86
|
"aria-labelledby": undefined,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
|
-
import { Story } from "@storybook/blocks"
|
|
3
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
4
3
|
import { fn } from "@storybook/test"
|
|
5
4
|
import { renderTriggerControls } from "~components/Filter/_docs/controls/renderTriggerControls"
|
|
@@ -178,6 +178,10 @@ $scene-illustration-size: 300px;
|
|
|
178
178
|
@include button-reset;
|
|
179
179
|
|
|
180
180
|
cursor: pointer;
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: $spacing-sm;
|
|
183
|
+
right: $spacing-sm;
|
|
184
|
+
color: $color-purple-800;
|
|
181
185
|
|
|
182
186
|
.icon {
|
|
183
187
|
opacity: 70%;
|
|
@@ -207,11 +211,6 @@ $scene-illustration-size: 300px;
|
|
|
207
211
|
}
|
|
208
212
|
}
|
|
209
213
|
}
|
|
210
|
-
|
|
211
|
-
position: absolute;
|
|
212
|
-
top: $spacing-sm;
|
|
213
|
-
right: $spacing-sm;
|
|
214
|
-
color: $color-purple-800;
|
|
215
214
|
}
|
|
216
215
|
|
|
217
216
|
.default {
|
|
@@ -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
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
pnpm svgo -f ./assets/svgs/icons -o ./src/Icon/bin/built-svgs/
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
pnpm tsx ./src/Icon/bin/wrapSVGs.ts --source-dir ./src/Icon/bin/built-svgs --output-dir ./src/Icon --delete-source-dir
|
|
6
6
|
|
|
7
7
|
pnpm prettier -w ./src/Icon
|
|
@@ -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>
|
|
@@ -74,9 +74,9 @@ input[type="range"].ratingScaleRange {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
&::-webkit-slider-runnable-track {
|
|
77
|
-
@include track;
|
|
78
|
-
|
|
79
77
|
margin: $spacing-sm 0;
|
|
78
|
+
|
|
79
|
+
@include track;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
&::-moz-range-track {
|
|
@@ -84,10 +84,10 @@ input[type="range"].ratingScaleRange {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&::-webkit-slider-thumb {
|
|
87
|
-
@include thumb;
|
|
88
|
-
|
|
89
87
|
-webkit-appearance: none;
|
|
90
88
|
margin-top: calc((#{$thumb-height-with-border}/ 2) * -1);
|
|
89
|
+
|
|
90
|
+
@include thumb;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
&::-moz-range-thumb {
|