@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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
font-family: var(--typography-paragraph-body-font-family);
|
|
3
|
+
font-size: var(--typography-paragraph-body-font-size);
|
|
4
|
+
font-weight: var(--typography-paragraph-body-font-weight);
|
|
5
|
+
line-height: var(--typography-paragraph-body-line-height);
|
|
6
|
+
letter-spacing: var(--typography-paragraph-body-letter-spacing);
|
|
7
|
+
color: var(--color-purple-800-rgb);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.wrapperAutogrow {
|
|
11
|
+
display: grid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.wrapperAutogrow::after {
|
|
15
|
+
content: attr(data-value) " ";
|
|
16
|
+
white-space: pre-wrap;
|
|
17
|
+
visibility: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* these properties need to be set on both for autogrow to work properly */
|
|
21
|
+
.textarea,
|
|
22
|
+
.wrapperAutogrow::after {
|
|
23
|
+
border: var(--border-solid-border-width) var(--border-solid-border-style)
|
|
24
|
+
var(--color-gray-500);
|
|
25
|
+
border-radius: var(--border-solid-border-radius);
|
|
26
|
+
padding: var(--spacing-sm);
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
width: 100%;
|
|
29
|
+
font: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.textareaAutogrow,
|
|
33
|
+
.wrapperAutogrow::after {
|
|
34
|
+
grid-area: 2 / 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.textarea {
|
|
38
|
+
display: block;
|
|
39
|
+
border: var(--border-solid-border-width) var(--border-solid-border-style)
|
|
40
|
+
var(--color-gray-500);
|
|
41
|
+
border-radius: var(--border-solid-border-radius);
|
|
42
|
+
padding: var(--spacing-sm);
|
|
43
|
+
resize: vertical;
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: var(--border-focus-ring-border-width)
|
|
47
|
+
var(--border-focus-ring-border-style) var(--color-blue-500);
|
|
48
|
+
outline-offset: 1px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:disabled {
|
|
52
|
+
resize: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.textareaAutogrow {
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.default {
|
|
61
|
+
&:not(.error, .caution) {
|
|
62
|
+
&:disabled {
|
|
63
|
+
border-color: rgba(var(--color-gray-500-rgb), 0.3);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:focus:not([disabled]),
|
|
68
|
+
&:hover:not([disabled]),
|
|
69
|
+
&:hover:focus:not([disabled]) {
|
|
70
|
+
background-color: var(--color-gray-200);
|
|
71
|
+
border-color: var(--color-gray-600);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.error {
|
|
75
|
+
border-color: var(--color-red-500);
|
|
76
|
+
|
|
77
|
+
&:focus:not([disabled]),
|
|
78
|
+
&:hover:not([disabled]),
|
|
79
|
+
&:hover:focus:not([disabled]) {
|
|
80
|
+
border-color: var(--color-red-500);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.caution {
|
|
85
|
+
border-color: var(--color-yellow-600);
|
|
86
|
+
|
|
87
|
+
&:focus:not([disabled]),
|
|
88
|
+
&:hover:not([disabled]),
|
|
89
|
+
&:hover:focus:not([disabled]) {
|
|
90
|
+
border-color: var(--color-yellow-600);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.disabled {
|
|
95
|
+
background-color: var(--color-white);
|
|
96
|
+
border-color: rgba(var(--color-gray-500-rgb), 0.3);
|
|
97
|
+
color: rgba(var(--color-purple-800-rgb), 0.3);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.reversed {
|
|
102
|
+
border-color: rgba(var(--color-white-rgb), 0.65);
|
|
103
|
+
background: transparent;
|
|
104
|
+
color: var(--color-white);
|
|
105
|
+
|
|
106
|
+
&:focus {
|
|
107
|
+
outline-color: var(--color-blue-300);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:focus:not([disabled]),
|
|
111
|
+
&:hover:not([disabled]),
|
|
112
|
+
&:hover:focus:not([disabled]) {
|
|
113
|
+
background: rgba(var(--color-white-rgb), 0.1);
|
|
114
|
+
border-color: var(--color-white);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.error {
|
|
118
|
+
border-color: var(--color-red-300);
|
|
119
|
+
|
|
120
|
+
&:focus:not([disabled]),
|
|
121
|
+
&:hover:not([disabled]),
|
|
122
|
+
&:hover:focus:not([disabled]) {
|
|
123
|
+
border-color: var(--color-red-300);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.caution {
|
|
128
|
+
border-color: var(--color-yellow-400);
|
|
129
|
+
|
|
130
|
+
&:focus:not([disabled]),
|
|
131
|
+
&:hover:not([disabled]),
|
|
132
|
+
&:hover:focus:not([disabled]) {
|
|
133
|
+
border-color: var(--color-yellow-400);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.disabled {
|
|
138
|
+
background: transparent;
|
|
139
|
+
border-color: rgba(var(--color-white-rgb), 0.3);
|
|
140
|
+
color: rgba(var(--color-white-rgb), 0.3);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
TextareaHTMLAttributes,
|
|
3
|
-
useEffect,
|
|
4
|
-
useRef,
|
|
5
|
-
useState,
|
|
6
|
-
} from "react"
|
|
1
|
+
import React, { TextareaHTMLAttributes, useRef, useState } from "react"
|
|
7
2
|
import classnames from "classnames"
|
|
8
3
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
9
|
-
import styles from "./TextArea.module.
|
|
4
|
+
import styles from "./TextArea.module.css"
|
|
10
5
|
|
|
11
6
|
export type TextAreaProps = {
|
|
12
7
|
textAreaRef?: React.RefObject<HTMLTextAreaElement>
|
|
13
8
|
status?: "default" | "error" | "caution"
|
|
9
|
+
/**
|
|
10
|
+
* Grows the input height as more content is added
|
|
11
|
+
* Replace with CSS field-sizing once it's supported by all major browsers
|
|
12
|
+
*/
|
|
14
13
|
autogrow?: boolean
|
|
15
14
|
reversed?: boolean
|
|
16
15
|
/**
|
|
@@ -32,73 +31,46 @@ export const TextArea = ({
|
|
|
32
31
|
onChange: propsOnChange,
|
|
33
32
|
...restProps
|
|
34
33
|
}: TextAreaProps): JSX.Element => {
|
|
35
|
-
const [textAreaHeight, setTextAreaHeight] = useState<string>("auto")
|
|
36
|
-
const [parentHeight, setParentHeight] = useState<string>("auto")
|
|
37
34
|
const [internalValue, setInternalValue] = useState<
|
|
38
35
|
string | number | readonly string[] | undefined
|
|
39
|
-
>(autogrow ? defaultValue : undefined)
|
|
36
|
+
>(autogrow && !value ? defaultValue : undefined)
|
|
40
37
|
// ^ holds an internal state of the value so that autogrow can still work with uncontrolled textareas
|
|
41
|
-
// essentially forces the textarea into an (interally) controlled mode if autogrow is true
|
|
42
|
-
const textAreaRef = propsTextAreaRef || useRef(null)
|
|
43
|
-
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (!autogrow) return
|
|
46
|
-
|
|
47
|
-
const scrollHeight = textAreaRef.current!.scrollHeight
|
|
48
|
-
if (scrollHeight < 1) return
|
|
49
|
-
|
|
50
|
-
const borderWidth = textAreaRef.current
|
|
51
|
-
? parseInt(getComputedStyle(textAreaRef.current).borderTopWidth, 10)
|
|
52
|
-
: 0
|
|
53
|
-
const newHeight = scrollHeight + borderWidth * 2
|
|
54
|
-
setParentHeight(`${newHeight}px`)
|
|
55
|
-
setTextAreaHeight(`${newHeight}px`)
|
|
56
|
-
}, [internalValue])
|
|
57
|
-
|
|
58
|
-
const onChange = !autogrow
|
|
59
|
-
? undefined
|
|
60
|
-
: (event: React.ChangeEvent<HTMLTextAreaElement>): void => {
|
|
61
|
-
setTextAreaHeight("auto")
|
|
62
|
-
// ^ this is required to avoid the textarea height from building up indefinitely
|
|
63
|
-
// see https://medium.com/@lucasalgus/creating-a-custom-auto-resize-textarea-component-for-your-react-web-application-6959c0ad68bc#2dee
|
|
64
|
-
|
|
65
|
-
setInternalValue(event.target.value)
|
|
66
|
-
if (propsOnChange) {
|
|
67
|
-
propsOnChange(event)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const getWrapperStyle = (): { minHeight: string } | undefined =>
|
|
72
|
-
autogrow ? { minHeight: parentHeight } : undefined
|
|
73
|
-
|
|
74
|
-
const getTextAreaStyle = (): { height: string } | undefined =>
|
|
75
|
-
autogrow ? { height: textAreaHeight } : undefined
|
|
38
|
+
// essentially forces the textarea into an (interally) controlled mode if autogrow is true and mode is uncontrolled
|
|
76
39
|
|
|
77
40
|
const controlledValue = value || internalValue
|
|
41
|
+
const textAreaRef = propsTextAreaRef || useRef(null)
|
|
42
|
+
|
|
43
|
+
const onChange = (event: React.ChangeEvent<HTMLTextAreaElement>): void => {
|
|
44
|
+
propsOnChange && propsOnChange(event)
|
|
45
|
+
setInternalValue(event.target.value)
|
|
46
|
+
}
|
|
78
47
|
|
|
79
48
|
return (
|
|
80
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
className={classnames(styles.wrapper, {
|
|
51
|
+
[styles.wrapperAutogrow]: autogrow,
|
|
52
|
+
})}
|
|
53
|
+
data-value={autogrow ? controlledValue : undefined}
|
|
54
|
+
>
|
|
81
55
|
<textarea
|
|
82
56
|
className={classnames(
|
|
83
57
|
styles.textarea,
|
|
84
58
|
styles[status],
|
|
85
59
|
reversed ? styles.reversed : styles.default,
|
|
86
|
-
|
|
60
|
+
{
|
|
61
|
+
[styles.disabled]: disabled,
|
|
62
|
+
[styles.textareaAutogrow]: autogrow,
|
|
63
|
+
}
|
|
87
64
|
)}
|
|
88
65
|
rows={rows}
|
|
89
|
-
onChange={onChange
|
|
66
|
+
onChange={onChange}
|
|
90
67
|
value={controlledValue}
|
|
91
68
|
defaultValue={controlledValue ? undefined : defaultValue}
|
|
92
69
|
// ^ React throws a warning if you specify both a value and a defaultValue
|
|
93
70
|
ref={textAreaRef}
|
|
94
|
-
style={getTextAreaStyle()}
|
|
95
71
|
disabled={disabled}
|
|
96
72
|
{...restProps}
|
|
97
73
|
/>
|
|
98
|
-
|
|
99
|
-
{/* Textareas aren't able to have pseudo elements like ::after on them,
|
|
100
|
-
so we have to create an element ourselves for the focus ring */}
|
|
101
|
-
<div className={styles.focusRing} />
|
|
102
74
|
</div>
|
|
103
75
|
)
|
|
104
76
|
}
|
|
@@ -1,49 +1,23 @@
|
|
|
1
|
-
@import "~@kaizen/design-tokens/sass/color";
|
|
2
1
|
@import "../../styles/utils/animation";
|
|
3
|
-
@import "../../styles/utils/legacy/layout";
|
|
4
|
-
@import "../../styles/utils/legacy/type";
|
|
5
|
-
|
|
6
|
-
@mixin input-icon($color, $reversed) {
|
|
7
|
-
color: $color;
|
|
8
|
-
|
|
9
|
-
.withReversed & {
|
|
10
|
-
color: $reversed;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
2
|
|
|
14
3
|
.input {
|
|
15
|
-
margin-top:
|
|
4
|
+
margin-top: var(--spacing-6);
|
|
16
5
|
}
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
.icon {
|
|
8
|
+
color: var(--textfield-icon-color);
|
|
19
9
|
|
|
20
|
-
///////////////////////////////////////////////////
|
|
21
|
-
// VALIDATION STYLES
|
|
22
|
-
///////////////////////////////////////////////////
|
|
23
|
-
.success {
|
|
24
|
-
@include input-icon($color-green-500, $color-green-400);
|
|
25
10
|
@include ca-animation-fade(in);
|
|
26
|
-
|
|
27
|
-
&.disabled {
|
|
28
|
-
@include input-icon(
|
|
29
|
-
rgba($color-green-500-rgb, $input-disabled-opacity),
|
|
30
|
-
rgba($color-green-400-rgb, $input-disabled-opacity)
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
11
|
}
|
|
34
12
|
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
@include ca-animation-fade(in);
|
|
38
|
-
}
|
|
13
|
+
.success {
|
|
14
|
+
--textfield-icon-color: var(--color-green-500);
|
|
39
15
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
16
|
+
.reversed & {
|
|
17
|
+
--textfield-icon-color: var(--color-green-400);
|
|
18
|
+
}
|
|
43
19
|
}
|
|
44
20
|
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
opacity: $input-disabled-opacity;
|
|
48
|
-
}
|
|
21
|
+
.disabled {
|
|
22
|
+
opacity: 0.3;
|
|
49
23
|
}
|
|
@@ -26,25 +26,30 @@ describe("<TextField />", () => {
|
|
|
26
26
|
<TextField
|
|
27
27
|
{...defaultProps}
|
|
28
28
|
description={undefined}
|
|
29
|
-
|
|
29
|
+
status="caution"
|
|
30
|
+
validationMessage="Revision required"
|
|
30
31
|
/>
|
|
31
32
|
)
|
|
33
|
+
// React Testing Library bug: Icon should be showing aria-label "caution message" instead
|
|
32
34
|
const input = getByRole("textbox", {
|
|
33
|
-
description: "
|
|
35
|
+
description: "warning Revision required",
|
|
34
36
|
})
|
|
35
37
|
|
|
36
38
|
expect(input).toBeInTheDocument()
|
|
37
39
|
})
|
|
40
|
+
|
|
38
41
|
it("renders correct aria-describedby when both description and validation message provided", () => {
|
|
39
42
|
const { getByRole } = render(
|
|
40
43
|
<TextField
|
|
41
44
|
{...defaultProps}
|
|
42
45
|
description="Description text"
|
|
43
|
-
|
|
46
|
+
status="error"
|
|
47
|
+
validationMessage="Something went wrong"
|
|
44
48
|
/>
|
|
45
49
|
)
|
|
50
|
+
// React Testing Library bug: Icon should be showing aria-label "error message" instead
|
|
46
51
|
const input = getByRole("textbox", {
|
|
47
|
-
description: "Description text
|
|
52
|
+
description: "Description text error Something went wrong",
|
|
48
53
|
})
|
|
49
54
|
|
|
50
55
|
expect(input).toBeInTheDocument()
|
|
@@ -2,9 +2,9 @@ import React, { useId } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { FieldGroup } from "~components/FieldGroup"
|
|
4
4
|
import { FieldMessage } from "~components/FieldMessage"
|
|
5
|
-
import { SuccessIcon } from "~components/Icon"
|
|
6
5
|
import { Input, InputProps } from "~components/Input"
|
|
7
6
|
import { Label } from "~components/Label"
|
|
7
|
+
import { Icon } from "~components/__future__/Icon"
|
|
8
8
|
import styles from "./TextField.module.scss"
|
|
9
9
|
|
|
10
10
|
type OmittedInputProps =
|
|
@@ -62,10 +62,7 @@ export const TextField = ({
|
|
|
62
62
|
id={`${id}-field-group`}
|
|
63
63
|
data-testid={`${id}-field-group`}
|
|
64
64
|
inline={inline}
|
|
65
|
-
classNameOverride={classnames(
|
|
66
|
-
styles.withLabel,
|
|
67
|
-
disabled && styles.withDisabled
|
|
68
|
-
)}
|
|
65
|
+
classNameOverride={classnames(reversed && styles.reversed)}
|
|
69
66
|
>
|
|
70
67
|
<Label
|
|
71
68
|
id={`${id}-field-label`}
|
|
@@ -88,11 +85,12 @@ export const TextField = ({
|
|
|
88
85
|
status === "success" && (
|
|
89
86
|
<div
|
|
90
87
|
className={classnames(
|
|
88
|
+
styles.icon,
|
|
91
89
|
styles.success,
|
|
92
90
|
disabled && styles.disabled
|
|
93
91
|
)}
|
|
94
92
|
>
|
|
95
|
-
<
|
|
93
|
+
<Icon name="check_circle" isPresentational isFilled />
|
|
96
94
|
</div>
|
|
97
95
|
)
|
|
98
96
|
}
|
|
@@ -34,7 +34,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
34
34
|
render: ({ isReversed }) => (
|
|
35
35
|
<StickerSheet isReversed={isReversed}>
|
|
36
36
|
<StickerSheet.Header
|
|
37
|
-
headings={["Default", "Hover", "Active", "Focus"]}
|
|
37
|
+
headings={["Default", "Hover", "Active", "Focus", "Disabled"]}
|
|
38
38
|
hasVerticalHeadings
|
|
39
39
|
/>
|
|
40
40
|
<StickerSheet.Body>
|
|
@@ -71,6 +71,14 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
71
71
|
validationMessage="A valid question"
|
|
72
72
|
data-sb-pseudo-styles="focus"
|
|
73
73
|
/>
|
|
74
|
+
<TextFieldExampleGroup
|
|
75
|
+
reversed={isReversed}
|
|
76
|
+
labelText="TextField"
|
|
77
|
+
description="A short description"
|
|
78
|
+
status={status}
|
|
79
|
+
validationMessage="A valid question"
|
|
80
|
+
disabled
|
|
81
|
+
/>
|
|
74
82
|
</StickerSheet.Row>
|
|
75
83
|
))}
|
|
76
84
|
</StickerSheet.Body>
|
|
@@ -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 { TextField } from "../index"
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
@@ -40,8 +40,9 @@ export const Types: Story = {
|
|
|
40
40
|
},
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export const
|
|
44
|
-
|
|
43
|
+
export const IconStory: Story = {
|
|
44
|
+
name: "Icon",
|
|
45
|
+
args: { icon: <Icon name="edit" isPresentational isFilled /> },
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export const Description: Story = {
|
|
@@ -13,19 +13,18 @@ $tilePaddingTop: $spacing-xl;
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.tile {
|
|
16
|
+
position: relative;
|
|
16
17
|
width: $tileWidth;
|
|
17
|
-
|
|
18
|
-
[data-tile-grid] & {
|
|
19
|
-
width: auto;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
height: $tileHeight;
|
|
23
|
-
position: relative;
|
|
24
|
-
box-shadow: $shadow-small-box-shadow;
|
|
25
|
-
background-color: $color-white;
|
|
26
19
|
transition: transform $ca-duration-slow $ca-default;
|
|
27
20
|
transform-style: preserve-3d;
|
|
21
|
+
box-shadow: $shadow-small-box-shadow;
|
|
28
22
|
border-radius: 7px;
|
|
23
|
+
background-color: $color-white;
|
|
24
|
+
|
|
25
|
+
[data-tile-grid] & {
|
|
26
|
+
width: auto;
|
|
27
|
+
}
|
|
29
28
|
|
|
30
29
|
@include ca-media-mobile {
|
|
31
30
|
width: 100%;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { HTMLAttributes, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { AllowedHeadingTags, Heading } from "~components/Heading"
|
|
4
|
-
import { ArrowBackwardIcon, InformationIcon } from "~components/Icon"
|
|
5
4
|
import { Text } from "~components/Text"
|
|
6
5
|
import { GenericButtonProps } from "~components/__actions__/Button/v1/GenericButton"
|
|
7
6
|
import { IconButton, Button } from "~components/__actions__/v2"
|
|
7
|
+
import { Icon } from "~components/__future__/Icon"
|
|
8
8
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
9
9
|
import styles from "./GenericTile.module.scss"
|
|
10
10
|
|
|
@@ -81,7 +81,7 @@ export const GenericTile = ({
|
|
|
81
81
|
<div className={styles.informationBtn}>
|
|
82
82
|
<IconButton
|
|
83
83
|
label="Information"
|
|
84
|
-
icon={<
|
|
84
|
+
icon={<Icon name="info" isPresentational isFilled />}
|
|
85
85
|
onClick={(): void => setIsFlipped(true)}
|
|
86
86
|
disabled={isFlipped}
|
|
87
87
|
aria-hidden={isFlipped}
|
|
@@ -140,7 +140,7 @@ export const GenericTile = ({
|
|
|
140
140
|
<div className={styles.informationBtn}>
|
|
141
141
|
<IconButton
|
|
142
142
|
label="Information"
|
|
143
|
-
icon={<
|
|
143
|
+
icon={<Icon name="arrow_back" isPresentational />}
|
|
144
144
|
onClick={(): void => setIsFlipped(false)}
|
|
145
145
|
disabled={!isFlipped}
|
|
146
146
|
aria-hidden={!isFlipped}
|
|
@@ -115,14 +115,13 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
115
115
|
align-items: center;
|
|
116
116
|
min-width: 0; // this is an important trick to prevent flexbox items from overflowing
|
|
117
117
|
z-index: $ca-z-index-dropdown; // this ensures the page switcher dropdown sits over nav tabs
|
|
118
|
+
transform: translateY(-0.0833em);
|
|
118
119
|
|
|
119
120
|
.hasSubtitle & {
|
|
120
121
|
@include title-block-under-1366 {
|
|
121
122
|
transform: translateY(-0.3833em);
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
-
transform: translateY(-0.0833em);
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
.titleAndSubtitleInner {
|
|
@@ -243,13 +242,12 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
243
242
|
line-height: $typography-paragraph-small-line-height;
|
|
244
243
|
letter-spacing: $typography-paragraph-small-letter-spacing;
|
|
245
244
|
max-width: 230px;
|
|
245
|
+
margin-inline: var(--spacing-12) 0;
|
|
246
246
|
|
|
247
247
|
.adminVariant & {
|
|
248
248
|
color: $color-purple-800;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
@include ca-margin($start: calc(#{$ca-grid} / 2));
|
|
252
|
-
|
|
253
251
|
@include title-block-under-1366 {
|
|
254
252
|
white-space: nowrap;
|
|
255
253
|
text-overflow: ellipsis;
|
|
@@ -285,9 +283,7 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
285
283
|
|
|
286
284
|
.sectionTitleOverride.sectionTitleOverride {
|
|
287
285
|
white-space: nowrap;
|
|
288
|
-
|
|
289
|
-
@include ca-margin($end: $ca-grid);
|
|
290
|
-
|
|
286
|
+
margin-inline: 0 var(--spacing-24);
|
|
291
287
|
font-family: $typography-heading-2-font-family;
|
|
292
288
|
font-weight: $typography-heading-2-font-weight;
|
|
293
289
|
font-size: $typography-heading-2-font-size;
|
|
@@ -316,10 +312,6 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
316
312
|
}
|
|
317
313
|
|
|
318
314
|
.sectionTitleDescription {
|
|
319
|
-
.sectionTitle + & {
|
|
320
|
-
margin-top: calc(#{$ca-grid} / 4);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
315
|
color: $color-white;
|
|
324
316
|
max-width: 780px;
|
|
325
317
|
font-family: $typography-paragraph-small-font-family;
|
|
@@ -328,6 +320,10 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
328
320
|
line-height: $typography-paragraph-small-line-height;
|
|
329
321
|
letter-spacing: $typography-paragraph-small-letter-spacing;
|
|
330
322
|
|
|
323
|
+
.sectionTitle + & {
|
|
324
|
+
margin-top: var(--spacing-6);
|
|
325
|
+
}
|
|
326
|
+
|
|
331
327
|
&.dark {
|
|
332
328
|
color: rgba($color-purple-800-rgb, 0.7);
|
|
333
329
|
}
|
|
@@ -360,30 +356,28 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
360
356
|
}
|
|
361
357
|
|
|
362
358
|
.tag {
|
|
363
|
-
@include ca-margin($start: calc(#{$ca-grid} / 2));
|
|
364
|
-
|
|
365
359
|
display: flex;
|
|
366
360
|
align-items: center;
|
|
361
|
+
margin-inline: var(--spacing-12) 0;
|
|
367
362
|
|
|
368
363
|
@include title-block-medium-and-small {
|
|
369
364
|
display: none;
|
|
370
365
|
}
|
|
371
366
|
|
|
372
367
|
+ .pageSwitcherSelectNextToTitle {
|
|
373
|
-
|
|
368
|
+
margin-inline-start: 0;
|
|
374
369
|
}
|
|
375
370
|
}
|
|
376
371
|
|
|
377
372
|
.pageSwitcherSelectNextToTitle {
|
|
378
|
-
@include ca-margin($start: calc(#{$ca-grid} / 2));
|
|
379
|
-
|
|
380
373
|
flex-shrink: 0;
|
|
381
|
-
width:
|
|
374
|
+
width: var(--spacing-240);
|
|
375
|
+
margin-inline: var(--spacing-12) 0;
|
|
382
376
|
}
|
|
383
377
|
|
|
384
378
|
.pageSwitcherSelectUnderneathTitle {
|
|
385
379
|
flex-shrink: 0;
|
|
386
|
-
max-width:
|
|
380
|
+
max-width: var(--spacing-240);
|
|
387
381
|
}
|
|
388
382
|
|
|
389
383
|
.navigationTabsContainer {
|
|
@@ -525,6 +519,7 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
525
519
|
align-items: center;
|
|
526
520
|
top: 50%;
|
|
527
521
|
transform: translateY(-50%);
|
|
522
|
+
text-decoration: none;
|
|
528
523
|
|
|
529
524
|
@include ca-position(
|
|
530
525
|
$start: calc(-#{$breadcrumb-circle-width} - #{$ca-grid})
|
|
@@ -557,11 +552,10 @@ $tab-container-height-medium-and-small-collapsed: 0;
|
|
|
557
552
|
|
|
558
553
|
@media only screen and (max-width: $breadcrumb-breakpoint-width) {
|
|
559
554
|
position: relative;
|
|
555
|
+
transform: translateY(0);
|
|
556
|
+
margin-inline: 0 var(--spacing-12);
|
|
560
557
|
|
|
561
|
-
@include ca-margin($end: calc(#{$ca-grid} / 2));
|
|
562
558
|
@include ca-position($start: 0);
|
|
563
|
-
|
|
564
|
-
transform: translateY(0);
|
|
565
559
|
}
|
|
566
560
|
|
|
567
561
|
@include title-block-medium-and-small {
|
|
@@ -258,7 +258,7 @@ describe("<TitleBlockZen />", () => {
|
|
|
258
258
|
</TitleBlockZen>
|
|
259
259
|
)
|
|
260
260
|
const btn = getByTestId("title-block-primary-action-button")
|
|
261
|
-
expect(btn
|
|
261
|
+
expect(btn).toHaveAccessibleName(primaryActionAsMenu.label)
|
|
262
262
|
await user.click(btn)
|
|
263
263
|
|
|
264
264
|
await waitFor(() => {
|
|
@@ -2,10 +2,10 @@ import React from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Avatar } from "~components/Avatar"
|
|
4
4
|
import { Heading } from "~components/Heading"
|
|
5
|
-
import { ArrowLeftIcon, ArrowRightIcon, HamburgerIcon } from "~components/Icon"
|
|
6
5
|
import { Select } from "~components/Select"
|
|
7
6
|
import { Tag } from "~components/Tag"
|
|
8
7
|
import { IconButton } from "~components/__actions__/v2"
|
|
8
|
+
import { Icon } from "~components/__future__/Icon"
|
|
9
9
|
import { useMediaQueries } from "~components/utils/useMediaQueries"
|
|
10
10
|
import { MainActions } from "./subcomponents/MainActions"
|
|
11
11
|
import { MobileActions } from "./subcomponents/MobileActions"
|
|
@@ -157,15 +157,12 @@ const Breadcrumb = ({
|
|
|
157
157
|
textDirection,
|
|
158
158
|
}: TitleBlockBreadcrumbProps): JSX.Element => {
|
|
159
159
|
const { path, handleClick, text, render } = breadcrumb
|
|
160
|
-
|
|
161
|
-
textDirection === "rtl" ? (
|
|
162
|
-
<ArrowRightIcon role="presentation" />
|
|
163
|
-
) : (
|
|
164
|
-
<ArrowLeftIcon role="presentation" />
|
|
165
|
-
)
|
|
160
|
+
|
|
166
161
|
const InnerContents = (): JSX.Element => (
|
|
167
162
|
<>
|
|
168
|
-
<div className={styles.circle}>
|
|
163
|
+
<div className={styles.circle}>
|
|
164
|
+
<Icon name="arrow_back" isPresentational shouldMirrorInRTL />
|
|
165
|
+
</div>
|
|
169
166
|
<span
|
|
170
167
|
className={styles.breadcrumbTextLink}
|
|
171
168
|
data-automation-id={textAutomationId}
|
|
@@ -318,7 +315,7 @@ export const TitleBlockZen = ({
|
|
|
318
315
|
<div className={styles.hamburger}>
|
|
319
316
|
<IconButton
|
|
320
317
|
onClick={handleHamburgerClick}
|
|
321
|
-
icon={<
|
|
318
|
+
icon={<Icon name="menu" isPresentational />}
|
|
322
319
|
label="Open menu"
|
|
323
320
|
reversed={isReversed(variant)}
|
|
324
321
|
/>
|