@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
|
@@ -29,10 +29,6 @@ $classname--input: '.input[type="search"]';
|
|
|
29
29
|
#{$classname--input} {
|
|
30
30
|
@include form-input-reset;
|
|
31
31
|
|
|
32
|
-
@include form-input-placeholder {
|
|
33
|
-
opacity: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
32
|
display: flex;
|
|
37
33
|
align-items: center;
|
|
38
34
|
height: $input-height;
|
|
@@ -44,6 +40,10 @@ $classname--input: '.input[type="search"]';
|
|
|
44
40
|
font-size: 1rem;
|
|
45
41
|
line-height: 1.5;
|
|
46
42
|
|
|
43
|
+
@include form-input-placeholder {
|
|
44
|
+
opacity: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
47
|
&::-webkit-search-cancel-button {
|
|
48
48
|
-webkit-appearance: none;
|
|
49
49
|
}
|
|
@@ -113,14 +113,14 @@ $classname--input: '.input[type="search"]';
|
|
|
113
113
|
// Default
|
|
114
114
|
.default {
|
|
115
115
|
#{$classname--input} {
|
|
116
|
+
border-color: $color-gray-500;
|
|
117
|
+
background-color: $color-white;
|
|
118
|
+
color: $color-purple-800;
|
|
119
|
+
|
|
116
120
|
@include form-input-placeholder {
|
|
117
121
|
color: $color-purple-800;
|
|
118
122
|
opacity: $input-placeholder-opacity--default;
|
|
119
123
|
}
|
|
120
|
-
|
|
121
|
-
border-color: $color-gray-500;
|
|
122
|
-
background-color: $color-white;
|
|
123
|
-
color: $color-purple-800;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.focusRing {
|
|
@@ -135,12 +135,12 @@ $classname--input: '.input[type="search"]';
|
|
|
135
135
|
&:hover,
|
|
136
136
|
&:focus-within {
|
|
137
137
|
#{$classname--input} {
|
|
138
|
+
border-color: $color-gray-600;
|
|
139
|
+
background-color: $color-gray-200;
|
|
140
|
+
|
|
138
141
|
@include form-input-placeholder {
|
|
139
142
|
opacity: 100%;
|
|
140
143
|
}
|
|
141
|
-
|
|
142
|
-
border-color: $color-gray-600;
|
|
143
|
-
background-color: $color-gray-200;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
.startIconAdornment {
|
|
@@ -152,14 +152,14 @@ $classname--input: '.input[type="search"]';
|
|
|
152
152
|
// Secondary
|
|
153
153
|
.secondary {
|
|
154
154
|
#{$classname--input} {
|
|
155
|
+
border-color: transparent;
|
|
156
|
+
background-color: $color-gray-200;
|
|
157
|
+
color: $color-purple-800;
|
|
158
|
+
|
|
155
159
|
@include form-input-placeholder {
|
|
156
160
|
color: $color-purple-800;
|
|
157
161
|
opacity: $input-placeholder-opacity--default;
|
|
158
162
|
}
|
|
159
|
-
|
|
160
|
-
border-color: transparent;
|
|
161
|
-
background-color: $color-gray-200;
|
|
162
|
-
color: $color-purple-800;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.focusRing {
|
|
@@ -174,12 +174,12 @@ $classname--input: '.input[type="search"]';
|
|
|
174
174
|
&:hover,
|
|
175
175
|
&:focus-within {
|
|
176
176
|
#{$classname--input} {
|
|
177
|
+
border-color: transparent;
|
|
178
|
+
background-color: $color-gray-300;
|
|
179
|
+
|
|
177
180
|
@include form-input-placeholder {
|
|
178
181
|
opacity: 100%;
|
|
179
182
|
}
|
|
180
|
-
|
|
181
|
-
border-color: transparent;
|
|
182
|
-
background-color: $color-gray-300;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.startIconAdornment {
|
|
@@ -191,13 +191,13 @@ $classname--input: '.input[type="search"]';
|
|
|
191
191
|
// Reversed
|
|
192
192
|
.reversed {
|
|
193
193
|
#{$classname--input} {
|
|
194
|
+
background: rgba($color-white-rgb, 0.1);
|
|
195
|
+
color: $color-white;
|
|
196
|
+
|
|
194
197
|
@include form-input-placeholder {
|
|
195
198
|
color: $color-white;
|
|
196
199
|
opacity: $input-placeholder-opacity--reversed;
|
|
197
200
|
}
|
|
198
|
-
|
|
199
|
-
background: rgba($color-white-rgb, 0.1);
|
|
200
|
-
color: $color-white;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.focusRing {
|
|
@@ -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
|
|
|
@@ -170,6 +170,13 @@ $blue-fifth: $color-blue-500;
|
|
|
170
170
|
.likertItem {
|
|
171
171
|
margin-right: 2px;
|
|
172
172
|
margin-left: 2px;
|
|
173
|
+
font-size: 1px;
|
|
174
|
+
line-height: 1;
|
|
175
|
+
padding: 0;
|
|
176
|
+
overflow-x: visible;
|
|
177
|
+
display: inline-block;
|
|
178
|
+
width: 18.5%; // 5 columns
|
|
179
|
+
position: relative;
|
|
173
180
|
|
|
174
181
|
&[dir="rtl"],
|
|
175
182
|
[dir="rtl"] & {
|
|
@@ -184,14 +191,6 @@ $blue-fifth: $color-blue-500;
|
|
|
184
191
|
|
|
185
192
|
@include fill($block-height);
|
|
186
193
|
|
|
187
|
-
font-size: 1px;
|
|
188
|
-
line-height: 1;
|
|
189
|
-
padding: 0;
|
|
190
|
-
overflow-x: visible;
|
|
191
|
-
display: inline-block;
|
|
192
|
-
width: 18.5%; // 5 columns
|
|
193
|
-
position: relative;
|
|
194
|
-
|
|
195
194
|
&:first-child {
|
|
196
195
|
margin-right: 2px;
|
|
197
196
|
margin-left: 0;
|
|
@@ -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" />
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.loadingSpinner {
|
|
2
|
+
--loading-spinner-size: 48px;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
width: var(--loading-spinner-size);
|
|
6
|
+
height: var(--loading-spinner-size);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.xs {
|
|
10
|
+
--loading-spinner-size: 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sm {
|
|
14
|
+
--loading-spinner-size: 24px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.md {
|
|
18
|
+
--loading-spinner-size: 48px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.spinner {
|
|
22
|
+
animation: spinner var(--animation-duration-deliberate)
|
|
23
|
+
var(--animation-easing-function-ease-in-out) infinite;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes spinner {
|
|
29
|
+
100% {
|
|
30
|
+
transform: rotate(360deg);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -2,14 +2,15 @@ import React, { HTMLAttributes } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { VisuallyHidden } from "~components/VisuallyHidden"
|
|
4
4
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
|
-
import
|
|
5
|
+
import { SpinnerIcon } from "./subcomponents"
|
|
6
|
+
import styles from "./LoadingSpinner.module.css"
|
|
6
7
|
|
|
7
8
|
export type LoadingSpinnerProps = {
|
|
8
9
|
accessibilityLabel: string
|
|
9
10
|
/**
|
|
10
|
-
* Generally use "md" unless spinner is inside a form field
|
|
11
|
+
* Generally use "md" unless spinner is inside a form field. @default "md"
|
|
11
12
|
*/
|
|
12
|
-
size?: "sm" | "md"
|
|
13
|
+
size?: "xs" | "sm" | "md"
|
|
13
14
|
} & OverrideClassName<Omit<HTMLAttributes<HTMLDivElement>, "children">>
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -23,61 +24,16 @@ export const LoadingSpinner = ({
|
|
|
23
24
|
...props
|
|
24
25
|
}: LoadingSpinnerProps): JSX.Element => (
|
|
25
26
|
<div
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
className={classnames(
|
|
28
|
+
styles.loadingSpinner,
|
|
29
|
+
styles[size],
|
|
30
|
+
classNameOverride
|
|
31
|
+
)}
|
|
28
32
|
role="status"
|
|
29
33
|
{...props}
|
|
30
34
|
>
|
|
31
35
|
<VisuallyHidden>{accessibilityLabel}</VisuallyHidden>
|
|
32
|
-
{size
|
|
33
|
-
<svg
|
|
34
|
-
className={styles.spinner}
|
|
35
|
-
aria-hidden="true"
|
|
36
|
-
viewBox="0 0 48 48"
|
|
37
|
-
width={48} // Ideally we'd use spacing tokens converted to unitless values
|
|
38
|
-
fill="none"
|
|
39
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
40
|
-
>
|
|
41
|
-
<circle
|
|
42
|
-
cx="24"
|
|
43
|
-
cy="24"
|
|
44
|
-
r="22.5"
|
|
45
|
-
stroke="currentColor"
|
|
46
|
-
strokeWidth="3"
|
|
47
|
-
strokeOpacity="0.3"
|
|
48
|
-
/>
|
|
49
|
-
<path
|
|
50
|
-
fillRule="evenodd"
|
|
51
|
-
clipRule="evenodd"
|
|
52
|
-
fill="currentColor"
|
|
53
|
-
d="M46.5 24c.8284 0 1.5049-.6734 1.4539-1.5002C47.21 10.44 37.5601.789989 25.5003.0461639 24.6734-.004835 24 .671607 24 1.50003c0 .82843.6738 1.49444 1.5002 1.55277 10.4023.73424 18.7128 9.0447 19.447 19.447C45.0056 23.3262 45.6716 24 46.5 24z"
|
|
54
|
-
/>
|
|
55
|
-
</svg>
|
|
56
|
-
) : (
|
|
57
|
-
<svg
|
|
58
|
-
className={styles.spinner}
|
|
59
|
-
aria-hidden="true"
|
|
60
|
-
viewBox="0 0 24 24"
|
|
61
|
-
width={24} // Ideally we'd use spacing tokens converted to unitless values
|
|
62
|
-
fill="none"
|
|
63
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
64
|
-
>
|
|
65
|
-
<circle
|
|
66
|
-
cx="12"
|
|
67
|
-
cy="12"
|
|
68
|
-
r="9"
|
|
69
|
-
stroke="currentColor"
|
|
70
|
-
strokeWidth="2"
|
|
71
|
-
strokeOpacity="0.3"
|
|
72
|
-
/>
|
|
73
|
-
<path
|
|
74
|
-
fillRule="evenodd"
|
|
75
|
-
clipRule="evenodd"
|
|
76
|
-
fill="currentColor"
|
|
77
|
-
d="M21.0564 13c.5076 0 .9377-.3851.9431-.8926.0004-.0358.0005-.0716.0005-.1074 0-5.52285-4.4771-10-10-10-.0359 0-.0718.00019-.1076.00057-.5076.00535-.8926.43552-.8926.94308v.11543C10.9998 3.59163 11.4675 4 12 4c4.4183 0 8 3.58172 8 8 0 .5324.4083 1 .9407 1h.1157z"
|
|
78
|
-
/>
|
|
79
|
-
</svg>
|
|
80
|
-
)}
|
|
36
|
+
<SpinnerIcon size={size} />
|
|
81
37
|
</div>
|
|
82
38
|
)
|
|
83
39
|
|
|
@@ -31,12 +31,17 @@ When inside a button, it is intended to have the same color as the label text.
|
|
|
31
31
|
|
|
32
32
|
### ClassNameOverride
|
|
33
33
|
|
|
34
|
-
Override styles such as the colour of the spinner using `classNameOverride`.
|
|
34
|
+
Override styles, such as the colour of the spinner using `classNameOverride`.
|
|
35
35
|
|
|
36
36
|
<Canvas of={LoadingSpinnerStories.ClassNameOverride} />
|
|
37
37
|
|
|
38
|
+
Below is an example of how to apply the current color tokens used in designs.
|
|
39
|
+
|
|
40
|
+
<Canvas of={LoadingSpinnerStories.Colors} />
|
|
41
|
+
|
|
38
42
|
### Size
|
|
39
43
|
|
|
40
|
-
Generally use `"md"` (default value) unless spinner is inside a form field.
|
|
44
|
+
Generally use `"md"` (default value) unless spinner is inside a form field, in which case use `sm`. The `xs` size is for buttons or content dense layouts.
|
|
41
45
|
|
|
42
46
|
<Canvas of={LoadingSpinnerStories.Size} />
|
|
47
|
+
|
|
@@ -18,10 +18,11 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
18
18
|
render: ({ isReversed }) => (
|
|
19
19
|
<StickerSheet isReversed={isReversed}>
|
|
20
20
|
<StickerSheet.Header
|
|
21
|
-
headings={['Size "sm"', 'Size "md"', "Custom
|
|
21
|
+
headings={['Size "xs"', 'Size "sm"', 'Size "md"', "Custom color"]}
|
|
22
22
|
/>
|
|
23
23
|
<StickerSheet.Body>
|
|
24
24
|
<StickerSheet.Row>
|
|
25
|
+
<LoadingSpinner accessibilityLabel="Loading" size="xs" />
|
|
25
26
|
<LoadingSpinner accessibilityLabel="Loading" size="sm" />
|
|
26
27
|
<LoadingSpinner accessibilityLabel="Loading" size="md" />
|
|
27
28
|
<LoadingSpinner
|
|
@@ -28,9 +28,28 @@ export const ClassNameOverride: Story = {
|
|
|
28
28
|
args: { classNameOverride: "text-green-400" },
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export const Colors: Story = {
|
|
32
|
+
render: args => (
|
|
33
|
+
<>
|
|
34
|
+
<LoadingSpinner {...args} classNameOverride="text-green-400" />
|
|
35
|
+
<LoadingSpinner {...args} classNameOverride="text-purple-800" />
|
|
36
|
+
<LoadingSpinner {...args} classNameOverride="text-blue-500" />
|
|
37
|
+
<LoadingSpinner {...args} classNameOverride="text-red-500" />
|
|
38
|
+
</>
|
|
39
|
+
),
|
|
40
|
+
decorators: [
|
|
41
|
+
Story => (
|
|
42
|
+
<div className="flex gap-24">
|
|
43
|
+
<Story />
|
|
44
|
+
</div>
|
|
45
|
+
),
|
|
46
|
+
],
|
|
47
|
+
}
|
|
48
|
+
|
|
31
49
|
export const Size: Story = {
|
|
32
50
|
render: args => (
|
|
33
51
|
<>
|
|
52
|
+
<LoadingSpinner {...args} size="xs" />
|
|
34
53
|
<LoadingSpinner {...args} size="sm" />
|
|
35
54
|
<LoadingSpinner {...args} size="md" />
|
|
36
55
|
</>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import styles from "../LoadingSpinner.module.css"
|
|
3
|
+
|
|
4
|
+
const SmallSpinnerIcon = (): JSX.Element => (
|
|
5
|
+
<svg
|
|
6
|
+
className={styles.spinner}
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
>
|
|
12
|
+
<circle
|
|
13
|
+
cx="12"
|
|
14
|
+
cy="12"
|
|
15
|
+
r="9"
|
|
16
|
+
stroke="currentColor"
|
|
17
|
+
strokeWidth="2"
|
|
18
|
+
strokeOpacity="0.3"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
fillRule="evenodd"
|
|
22
|
+
clipRule="evenodd"
|
|
23
|
+
fill="currentColor"
|
|
24
|
+
d="M21.0564 13c.5076 0 .9377-.3851.9431-.8926.0004-.0358.0005-.0716.0005-.1074 0-5.52285-4.4771-10-10-10-.0359 0-.0718.00019-.1076.00057-.5076.00535-.8926.43552-.8926.94308v.11543C10.9998 3.59163 11.4675 4 12 4c4.4183 0 8 3.58172 8 8 0 .5324.4083 1 .9407 1h.1157z"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
const MediumSpinnerIcon = (): JSX.Element => (
|
|
30
|
+
<svg
|
|
31
|
+
className={styles.spinner}
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
viewBox="0 0 48 48"
|
|
34
|
+
fill="none"
|
|
35
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
+
>
|
|
37
|
+
<circle
|
|
38
|
+
cx="24"
|
|
39
|
+
cy="24"
|
|
40
|
+
r="22.5"
|
|
41
|
+
stroke="currentColor"
|
|
42
|
+
strokeWidth="3"
|
|
43
|
+
strokeOpacity="0.3"
|
|
44
|
+
/>
|
|
45
|
+
<path
|
|
46
|
+
fillRule="evenodd"
|
|
47
|
+
clipRule="evenodd"
|
|
48
|
+
fill="currentColor"
|
|
49
|
+
d="M46.5 24c.8284 0 1.5049-.6734 1.4539-1.5002C47.21 10.44 37.5601.789989 25.5003.0461639 24.6734-.004835 24 .671607 24 1.50003c0 .82843.6738 1.49444 1.5002 1.55277 10.4023.73424 18.7128 9.0447 19.447 19.447C45.0056 23.3262 45.6716 24 46.5 24z"
|
|
50
|
+
/>
|
|
51
|
+
</svg>
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
const ExtraSmallSpinnerIcon = (): JSX.Element => (
|
|
55
|
+
<svg
|
|
56
|
+
className={styles.spinner}
|
|
57
|
+
viewBox="0 0 16 16"
|
|
58
|
+
fill="none"
|
|
59
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
60
|
+
>
|
|
61
|
+
<circle
|
|
62
|
+
opacity="0.3"
|
|
63
|
+
cx="8"
|
|
64
|
+
cy="8"
|
|
65
|
+
r="6"
|
|
66
|
+
stroke="currentColor"
|
|
67
|
+
strokeWidth="2"
|
|
68
|
+
/>
|
|
69
|
+
<path
|
|
70
|
+
d="M14 8C14 4.68629 11.3137 2 8 2"
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
strokeWidth="2"
|
|
73
|
+
strokeLinecap="round"
|
|
74
|
+
strokeLinejoin="round"
|
|
75
|
+
/>
|
|
76
|
+
</svg>
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
type SpinnerIconProps = {
|
|
80
|
+
size: "xs" | "sm" | "md"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const SpinnerIcon = ({ size }: SpinnerIconProps): JSX.Element => {
|
|
84
|
+
if (size === "xs") return <ExtraSmallSpinnerIcon />
|
|
85
|
+
if (size === "sm") return <SmallSpinnerIcon />
|
|
86
|
+
return <MediumSpinnerIcon />
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SpinnerIcon"
|
|
@@ -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}
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.animatingEnter & {
|
|
17
|
-
@include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
|
|
18
|
-
|
|
19
17
|
animation-duration: $ca-duration-fast;
|
|
20
18
|
animation-fill-mode: forwards;
|
|
21
19
|
animation-timing-function: $ca-bounce-in;
|
|
20
|
+
|
|
21
|
+
@include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.animatingLeave & {
|
|
25
|
-
@include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
|
|
26
|
-
|
|
27
25
|
animation-duration: $ca-duration-rapid;
|
|
28
26
|
animation-fill-mode: forwards;
|
|
29
27
|
animation-timing-function: $ca-bounce-out;
|
|
28
|
+
|
|
29
|
+
@include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.backdropLayer {
|
|
17
|
-
@include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
|
|
18
|
-
|
|
19
17
|
position: fixed;
|
|
20
18
|
background-color: #000;
|
|
21
19
|
opacity: 50%;
|
|
22
20
|
z-index: $ca-z-index-modal-backdrop;
|
|
23
|
-
}
|
|
24
21
|
|
|
25
|
-
.scrollLayer {
|
|
26
22
|
@include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
|
|
23
|
+
}
|
|
27
24
|
|
|
25
|
+
.scrollLayer {
|
|
28
26
|
position: fixed;
|
|
29
27
|
display: flex;
|
|
30
28
|
align-items: center;
|
|
31
29
|
z-index: $ca-z-index-modal;
|
|
32
30
|
overflow-y: auto;
|
|
31
|
+
|
|
32
|
+
@include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.modalLayer {
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
[data-modal] {
|
|
87
|
-
@include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
|
|
88
|
-
|
|
89
87
|
animation-duration: $ca-duration-fast;
|
|
90
88
|
animation-fill-mode: forwards;
|
|
91
89
|
animation-timing-function: $ca-bounce-in;
|
|
90
|
+
|
|
91
|
+
@include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -104,11 +104,11 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
[data-modal] {
|
|
107
|
-
@include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
|
|
108
|
-
|
|
109
107
|
animation-duration: $ca-duration-rapid;
|
|
110
108
|
animation-fill-mode: forwards;
|
|
111
109
|
animation-timing-function: $ca-bounce-out;
|
|
110
|
+
|
|
111
|
+
@include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|