@kaizen/components 0.0.0-canary-toast-notification-fix-20240822034045 → 0.0.0-canary-workflow-export-20240910075656
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/README.md +0 -1
- package/codemods/utils/__snapshots__/transformSource.spec.ts.snap +2 -2
- package/dist/cjs/Brand/Brand.cjs +1 -1
- package/dist/cjs/BrandMoment/BrandMoment.cjs +1 -1
- package/dist/cjs/Card/Card.cjs +1 -1
- package/dist/cjs/Card/Card.module.css.cjs +22 -0
- package/dist/cjs/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.cjs +6 -6
- package/dist/cjs/GuidanceBlock/GuidanceBlock.module.scss.cjs +33 -0
- package/dist/cjs/Illustration/subcomponents/Base/Base.cjs +1 -1
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +1 -1
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +1 -1
- package/dist/cjs/MultiSelect/MultiSelect.cjs +3 -0
- package/dist/cjs/MultiSelect/subcomponents/Popover/Popover.cjs +1 -4
- package/dist/cjs/Notification/ToastNotification/context/ToastNotificationContext.cjs +2 -2
- package/dist/cjs/RichTextEditor/RichTextContent/RichTextContent.cjs +10 -1
- package/dist/cjs/Workflow/Workflow.cjs +10 -11
- package/dist/cjs/Workflow/subcomponents/Footer/Footer.cjs +3 -3
- package/dist/cjs/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.cjs +1 -1
- package/dist/cjs/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.css.cjs +8 -0
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +20 -22
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css.cjs +16 -0
- package/dist/cjs/Workflow/subcomponents/Footer/components/Root/{FooterRoot.module.scss.cjs → FooterRoot.module.css.cjs} +1 -1
- package/dist/cjs/Workflow/subcomponents/Footer/components/Root/Root.cjs +1 -1
- package/dist/cjs/Workflow/subcomponents/Header/Header.cjs +3 -3
- package/dist/cjs/Workflow/subcomponents/Header/components/Actions/Actions.cjs +1 -1
- package/dist/cjs/Workflow/subcomponents/{Wrapper/Wrapper.module.scss.cjs → Header/components/Actions/Actions.module.css.cjs} +1 -1
- package/dist/cjs/Workflow/subcomponents/Header/components/Branding/Branding.cjs +1 -1
- package/dist/cjs/Workflow/subcomponents/Header/components/Branding/Branding.module.css.cjs +7 -0
- package/dist/cjs/Workflow/subcomponents/Header/components/Root/Root.cjs +1 -1
- package/dist/cjs/{__future__/Workflow/subcomponents/Header/components/Root/Root.module.scss.cjs → Workflow/subcomponents/Header/components/Root/Root.module.css.cjs} +1 -1
- package/dist/cjs/Workflow/subcomponents/Header/components/Titles/Titles.cjs +7 -11
- package/dist/cjs/Workflow/subcomponents/Header/components/Titles/Titles.module.css.cjs +9 -0
- package/dist/cjs/Workflow/subcomponents/Main/Main.cjs +1 -1
- package/dist/cjs/{__future__/Workflow/subcomponents/Main/Main.module.scss.cjs → Workflow/subcomponents/Main/Main.module.css.cjs} +1 -1
- package/dist/cjs/Workflow/subcomponents/Wrapper/Wrapper.cjs +1 -1
- package/dist/cjs/Workflow/subcomponents/{Header/components/Actions/Actions.module.scss.cjs → Wrapper/Wrapper.module.css.cjs} +1 -1
- package/dist/cjs/__future__/Select/Select.cjs +1 -6
- package/dist/cjs/__future__/Select/subcomponents/ListBox/ListBox.cjs +1 -2
- package/dist/cjs/__future__/Select/subcomponents/ListBox/ListBox.module.scss.cjs +1 -2
- package/dist/cjs/future.cjs +0 -2
- package/dist/cjs/index.cjs +4 -2
- package/dist/cjs/utils/hostedAssets.cjs +16 -0
- package/dist/cjs/utils/useResizeObserver.cjs +1 -0
- package/dist/esm/Brand/Brand.mjs +1 -1
- package/dist/esm/BrandMoment/BrandMoment.mjs +1 -1
- package/dist/esm/Card/Card.mjs +1 -1
- package/dist/esm/Card/Card.module.css.mjs +20 -0
- package/dist/esm/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.mjs +6 -6
- package/dist/esm/GuidanceBlock/GuidanceBlock.module.scss.mjs +31 -0
- package/dist/esm/Illustration/subcomponents/Base/Base.mjs +1 -1
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +1 -1
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +1 -1
- package/dist/esm/MultiSelect/MultiSelect.mjs +3 -0
- package/dist/esm/MultiSelect/subcomponents/Popover/Popover.mjs +1 -4
- package/dist/esm/Notification/ToastNotification/context/ToastNotificationContext.mjs +3 -3
- package/dist/esm/RichTextEditor/RichTextContent/RichTextContent.mjs +11 -2
- package/dist/esm/Workflow/Workflow.mjs +10 -11
- package/dist/esm/Workflow/subcomponents/Footer/Footer.mjs +3 -3
- package/dist/esm/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.mjs +1 -1
- package/dist/esm/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.css.mjs +6 -0
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +20 -22
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css.mjs +14 -0
- package/dist/esm/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.css.mjs +4 -0
- package/dist/esm/Workflow/subcomponents/Footer/components/Root/Root.mjs +1 -1
- package/dist/esm/Workflow/subcomponents/Header/Header.mjs +3 -3
- package/dist/esm/Workflow/subcomponents/Header/components/Actions/Actions.mjs +1 -1
- package/dist/esm/Workflow/subcomponents/{Wrapper/Wrapper.module.scss.mjs → Header/components/Actions/Actions.module.css.mjs} +1 -1
- package/dist/esm/Workflow/subcomponents/Header/components/Branding/Branding.mjs +1 -1
- package/dist/esm/Workflow/subcomponents/Header/components/Branding/Branding.module.css.mjs +5 -0
- package/dist/esm/Workflow/subcomponents/Header/components/Root/Root.mjs +1 -1
- package/dist/esm/{__future__/Workflow/subcomponents/Header/components/Root/Root.module.scss.mjs → Workflow/subcomponents/Header/components/Root/Root.module.css.mjs} +1 -1
- package/dist/esm/Workflow/subcomponents/Header/components/Titles/Titles.mjs +7 -11
- package/dist/esm/Workflow/subcomponents/Header/components/Titles/Titles.module.css.mjs +7 -0
- package/dist/esm/Workflow/subcomponents/Main/Main.mjs +1 -1
- package/dist/esm/{__future__/Workflow/subcomponents/Main/Main.module.scss.mjs → Workflow/subcomponents/Main/Main.module.css.mjs} +1 -1
- package/dist/esm/Workflow/subcomponents/Wrapper/Wrapper.mjs +1 -1
- package/dist/esm/Workflow/subcomponents/{Header/components/Actions/Actions.module.scss.mjs → Wrapper/Wrapper.module.css.mjs} +1 -1
- package/dist/esm/__future__/Select/Select.mjs +1 -6
- package/dist/esm/__future__/Select/subcomponents/ListBox/ListBox.mjs +1 -2
- package/dist/esm/__future__/Select/subcomponents/ListBox/ListBox.module.scss.mjs +1 -2
- package/dist/esm/future.mjs +0 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/utils/hostedAssets.mjs +14 -0
- package/dist/esm/utils/useResizeObserver.mjs +1 -0
- package/dist/styles.css +12431 -179
- package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.d.ts +4 -4
- package/dist/types/LikertScaleLegacy/index.d.ts +1 -0
- package/dist/types/Workflow/Workflow.d.ts +5 -8
- package/dist/types/Workflow/subcomponents/Footer/Footer.d.ts +3 -4
- package/dist/types/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.d.ts +10 -3
- package/dist/types/Workflow/subcomponents/Header/Header.d.ts +2 -2
- package/dist/types/Workflow/subcomponents/Header/components/Titles/Titles.d.ts +3 -9
- package/dist/types/__future__/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/hostedAssets.d.ts +10 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/useResizeObserver.d.ts +1 -0
- package/package.json +29 -19
- package/src/Avatar/Avatar.spec.tsx +1 -1
- package/src/Avatar/Avatar.tsx +1 -1
- package/src/AvatarGroup/AvatarGroup.tsx +1 -1
- package/src/Badge/Badge.tsx +1 -1
- package/src/Brand/Brand.tsx +2 -2
- package/src/BrandMoment/BrandMoment.tsx +3 -3
- package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
- package/src/ButtonGroup/ButtonGroup.tsx +1 -1
- package/src/Calendar/CalendarPopover/CalendarPopover.tsx +1 -1
- package/src/Calendar/CalendarRange/CalendarRange.tsx +1 -1
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +1 -1
- package/src/Calendar/utils/setFocusInCalendar.spec.tsx +2 -2
- package/src/Card/{Card.module.scss → Card.module.css} +6 -14
- package/src/Card/Card.tsx +2 -2
- package/src/Checkbox/Checkbox/Checkbox.spec.tsx +2 -2
- package/src/Checkbox/Checkbox/Checkbox.tsx +1 -1
- package/src/Checkbox/CheckboxGroup/CheckboxGroup.tsx +1 -1
- package/src/ClearButton/ClearButton.tsx +1 -1
- package/src/Collapsible/Collapsible/Collapsible.spec.tsx +2 -14
- package/src/Collapsible/Collapsible/Collapsible.tsx +1 -1
- package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +0 -2
- package/src/Collapsible/Collapsible/_docs/Collapsible.stickersheet.stories.tsx +49 -0
- package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +0 -11
- package/src/Collapsible/CollapsibleGroup/CollapsibleGroup.tsx +1 -1
- package/src/Content/Content.tsx +1 -1
- package/src/DateInput/DateInput/DateInput.tsx +1 -1
- package/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx +5 -6
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.spec.tsx +4 -6
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +1 -1
- package/src/DatePicker/DatePicker.spec.tsx +32 -36
- package/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx +13 -13
- package/src/DatePicker/utils/validateDate.spec.ts +5 -6
- package/src/Divider/Divider.tsx +1 -1
- package/src/EmptyState/EmptyState.spec.tsx +1 -1
- package/src/EmptyState/EmptyState.tsx +1 -1
- package/src/ErrorPage/ErrorPage.spec.tsx +19 -19
- package/src/ErrorPage/ErrorPage.tsx +1 -1
- package/src/FieldGroup/FieldGroup.tsx +1 -1
- package/src/FieldMessage/FieldMessage.tsx +1 -1
- package/src/Filter/Filter/Filter.tsx +1 -1
- package/src/Filter/Filter/subcomponents/FilterContents/FilterContents.tsx +1 -1
- package/src/Filter/Filter/subcomponents/FilterPopover/FilterPopover.tsx +1 -1
- package/src/Filter/FilterBar/FilterBar.spec.tsx +26 -26
- package/src/Filter/FilterBar/FilterBar.tsx +1 -1
- package/src/Filter/FilterBar/context/utils/updateDependentFilters.spec.ts +2 -4
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx +3 -4
- package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx +3 -6
- package/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx +10 -12
- package/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx +9 -10
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.spec.tsx +12 -14
- package/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx +11 -13
- package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +1 -1
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx +5 -5
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
- package/src/Filter/FilterButton/subcomponents/FilterButtonBase/FilterButtonBase.tsx +1 -1
- package/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx +12 -15
- package/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts +13 -16
- package/src/Filter/FilterDatePicker/hooks/useDateValidation.spec.ts +3 -6
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx +23 -28
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.tsx +2 -2
- package/src/Filter/FilterDatePicker/utils/getDateValidationHandler.spec.tsx +2 -6
- package/src/Filter/FilterDatePicker/utils/getDateValidationHandler.tsx +1 -1
- package/src/Filter/FilterDatePicker/utils/validateDate.spec.ts +5 -6
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +2 -3
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx +27 -0
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +9 -11
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.spec.tsx +1 -63
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.spec.tsx +32 -32
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useEndDateValidation.spec.ts +3 -9
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.spec.ts +2 -6
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts +2 -3
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.tsx +1 -1
- package/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx +9 -10
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.stories.tsx +1 -1
- package/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx +2 -1
- package/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx +32 -32
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx +9 -7
- package/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx +12 -12
- package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.spec.tsx +7 -7
- package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.spec.tsx +9 -9
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +3 -5
- package/src/Filter/FilterSelect/FilterSelect.tsx +1 -1
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.module.scss +2 -2
- package/src/{__containers__/GuidanceBlock/v2 → GuidanceBlock}/GuidanceBlock.spec.tsx +5 -5
- package/src/{__containers__/GuidanceBlock/v2 → GuidanceBlock}/_docs/GuidanceBlock.mdx +2 -2
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/_docs/GuidanceBlock.stickersheet.stories.tsx +1 -1
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/_docs/GuidanceBlock.stories.tsx +1 -1
- package/src/Heading/Heading.module.scss +1 -1
- package/src/Heading/Heading.spec.tsx +1 -31
- package/src/Heading/Heading.tsx +1 -1
- package/src/Icon/_docs/Icon.stories.tsx +1 -1
- package/src/Icon/subcomponents/SVG/SVG.tsx +1 -1
- package/src/Illustration/subcomponents/Base/Base.tsx +2 -2
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx +43 -97
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stickersheet.stories.tsx +68 -0
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stories.tsx +37 -0
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +1 -1
- package/src/Input/Input/Input.tsx +1 -1
- package/src/Input/InputRange/InputRange.spec.tsx +2 -2
- package/src/Input/InputRange/InputRange.tsx +1 -1
- package/src/Input/InputSearch/InputSearch.spec.tsx +3 -5
- package/src/Input/InputSearch/InputSearch.tsx +1 -1
- package/src/KaizenProvider/KaizenProvider.spec.tsx +2 -2
- package/src/KaizenProvider/_docs/KaizenProvider.mdx +4 -4
- package/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.spec.tsx +2 -3
- package/src/Label/Label.tsx +1 -1
- package/src/LabelledMessage/LabelledMessage.tsx +1 -1
- package/src/LikertScaleLegacy/index.ts +1 -0
- package/src/Loading/LoadingGraphic/LoadingGraphic.tsx +1 -1
- package/src/Loading/LoadingHeading/LoadingHeading.tsx +1 -1
- package/src/Loading/LoadingInput/LoadingInput.tsx +1 -1
- package/src/Loading/LoadingParagraph/LoadingParagraph.tsx +1 -1
- package/src/Loading/LoadingSpinner/LoadingSpinner.tsx +1 -1
- package/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx +8 -8
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +5 -1
- package/src/Modal/ContextModal/ContextModal.spec.tsx +6 -6
- package/src/Modal/GenericModal/GenericModal.spec.tsx +4 -4
- package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +1 -1
- package/src/Modal/InputEditModal/InputEditModal.spec.tsx +8 -8
- package/src/MultiSelect/MultiSelect.tsx +4 -1
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +1 -1
- package/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx +3 -3
- package/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.tsx +1 -1
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +3 -3
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.tsx +1 -1
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.spec.tsx +2 -2
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +1 -1
- package/src/MultiSelect/subcomponents/Popover/Popover.module.scss +1 -0
- package/src/MultiSelect/subcomponents/Popover/Popover.tsx +1 -4
- package/src/Notification/GlobalNotification/GlobalNotification.tsx +1 -1
- package/src/Notification/InlineNotification/InlineNotification.tsx +1 -1
- package/src/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.tsx +1 -1
- package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +33 -0
- package/src/Notification/ToastNotification/context/ToastNotificationContext.tsx +13 -18
- package/src/Notification/ToastNotification/types.ts +1 -1
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.stories.tsx +60 -0
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +1 -1
- package/src/Pagination/Pagination.spec.tsx +2 -2
- package/src/Pagination/Pagination.tsx +1 -1
- package/src/Popover/Popover.tsx +1 -1
- package/src/ProgressBar/ProgressBar.tsx +1 -1
- package/src/Radio/Radio/Radio.tsx +1 -1
- package/src/Radio/RadioGroup/RadioGroup.tsx +1 -1
- package/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.spec.tsx +4 -4
- package/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.tsx +1 -1
- package/src/RichTextEditor/RichTextContent/RichTextContent.tsx +12 -3
- package/src/RichTextEditor/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.tsx +1 -1
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.tsx +1 -1
- package/src/RichTextEditor/utils/commands/addMark.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/fixtures/helpers.ts +4 -3
- package/src/RichTextEditor/utils/commands/getMarkAttrs.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/getMarkRange.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/listIsActive.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/markContainsSelection.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/markIsActive.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/removeMark.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/updateMark.spec.ts +2 -2
- package/src/RichTextEditor/utils/commands/validateAndRemoveMarks.spec.ts +3 -3
- package/src/RichTextEditor/utils/core/createRichTextEditor.spec.ts +11 -11
- package/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx +2 -2
- package/src/Skirt/Skirt.tsx +1 -1
- package/src/SplitButton/SplitButton.spec.tsx +5 -5
- package/src/SplitButton/SplitButton.tsx +2 -2
- package/src/SplitButton/subcomponents/BaseButton/BaseButton.tsx +1 -1
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +3 -4
- package/src/Table/Table.tsx +1 -1
- package/src/Tabs/subcomponents/Tab.tsx +1 -1
- package/src/Tabs/subcomponents/TabList.tsx +1 -1
- package/src/Tabs/subcomponents/TabPanel.tsx +1 -1
- package/src/Tabs/subcomponents/TabPanels.tsx +1 -1
- package/src/Text/Text.spec.tsx +1 -57
- package/src/Text/Text.tsx +1 -1
- package/src/TextArea/TextArea.spec.tsx +2 -2
- package/src/TextArea/TextArea.tsx +1 -1
- package/src/Tile/TileGrid/TileGrid.tsx +1 -1
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +1 -1
- package/src/TimeField/TimeField.spec.tsx +2 -2
- package/src/TimeField/TimeField.tsx +1 -1
- package/src/TitleBlockZen/TitleBlockZen.spec.tsx +36 -68
- package/src/TitleBlockZen/TitleBlockZen.tsx +1 -1
- package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +79 -9
- package/src/TitleBlockZen/subcomponents/MobileActions.spec.tsx +2 -2
- package/src/TitleBlockZen/subcomponents/NavigationTabs.spec.tsx +8 -2
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.spec.tsx +2 -2
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +1 -1
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -1
- package/src/Well/Well.tsx +1 -1
- package/src/Workflow/Workflow.tsx +25 -25
- package/src/Workflow/_docs/ProgressStepper.mdx +5 -9
- package/src/Workflow/_docs/ProgressStepper.stories.tsx +26 -24
- package/src/Workflow/_docs/Workflow.mdx +14 -17
- package/src/Workflow/_docs/Workflow.stories.tsx +31 -29
- package/src/Workflow/_docs/WorkflowFooter.mdx +5 -8
- package/src/Workflow/_docs/WorkflowFooter.stories.tsx +36 -26
- package/src/Workflow/_docs/WorkflowHeader.mdx +5 -8
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +12 -6
- package/src/Workflow/_docs/controls/controls.tsx +6 -6
- package/src/Workflow/subcomponents/Footer/Footer.tsx +6 -5
- package/src/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.tsx +2 -2
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +117 -0
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +37 -26
- package/src/{__future__/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss → Workflow/subcomponents/Footer/components/Root/FooterRoot.module.css} +6 -8
- package/src/Workflow/subcomponents/Footer/components/Root/Root.tsx +2 -2
- package/src/Workflow/subcomponents/Header/Header.tsx +7 -3
- package/src/{__future__/Workflow/subcomponents/Header/components/Actions/Actions.module.scss → Workflow/subcomponents/Header/components/Actions/Actions.module.css} +2 -4
- package/src/Workflow/subcomponents/Header/components/Actions/Actions.tsx +2 -2
- package/src/{__future__/Workflow/subcomponents/Header/components/Branding/Branding.module.scss → Workflow/subcomponents/Header/components/Branding/Branding.module.css} +2 -4
- package/src/Workflow/subcomponents/Header/components/Branding/Branding.tsx +2 -2
- package/src/{__future__/Workflow/subcomponents/Header/components/Root/Root.module.scss → Workflow/subcomponents/Header/components/Root/Root.module.css} +5 -9
- package/src/Workflow/subcomponents/Header/components/Root/Root.tsx +2 -2
- package/src/{__future__/Workflow/subcomponents/Header/components/Titles/Titles.module.scss → Workflow/subcomponents/Header/components/Titles/Titles.module.css} +3 -5
- package/src/Workflow/subcomponents/Header/components/Titles/Titles.tsx +8 -19
- package/src/Workflow/subcomponents/Main/Main.module.css +4 -0
- package/src/Workflow/subcomponents/Main/Main.tsx +2 -2
- package/src/{__future__/Workflow/subcomponents/Wrapper/Wrapper.module.scss → Workflow/subcomponents/Wrapper/Wrapper.module.css} +1 -3
- package/src/Workflow/subcomponents/Wrapper/Wrapper.tsx +2 -2
- package/src/__actions__/Button/v3/Button.tsx +1 -1
- package/src/__actions__/Menu/v1/Menu.spec.tsx +2 -2
- package/src/__actions__/Menu/v1/subcomponents/MenuList/MenuList.tsx +1 -1
- package/src/__actions__/Menu/v3/Menu.tsx +1 -1
- package/src/__actions__/Menu/v3/MenuItem.tsx +1 -1
- package/src/__future__/Select/Select.spec.tsx +13 -27
- package/src/__future__/Select/Select.tsx +2 -11
- package/src/__future__/Select/_docs/Select.mdx +2 -0
- package/src/__future__/Select/subcomponents/ListBox/ListBox.module.scss +3 -3
- package/src/__future__/Select/subcomponents/ListBox/ListBox.tsx +2 -2
- package/src/__future__/Select/subcomponents/Option/Option.tsx +1 -1
- package/src/__future__/Select/subcomponents/Overlay/Overlay.tsx +1 -1
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +1 -1
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +1 -1
- package/src/__future__/Tag/Tag/Tag.tsx +1 -1
- package/src/__future__/index.ts +0 -1
- package/src/{Workflow → __layout__/Workflow/v2}/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss +8 -2
- package/src/{__future__/Workflow → __layout__/Workflow/v2}/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +2 -7
- package/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx +1 -1
- package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -9
- package/src/__overlays__/Tooltip/v3/OverlayArrow.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/Tooltip.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.stickersheet.stories.tsx +1 -1
- package/src/index.ts +1 -2
- package/src/utils/hostedAssets.ts +13 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/useMediaQueries.spec.tsx +7 -7
- package/src/utils/useResizeObserver.ts +1 -0
- package/codemods/updateGuidanceBlockVariantProp/index.ts +0 -19
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.spec.ts +0 -135
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.ts +0 -77
- package/dist/cjs/Card/Card.module.scss.cjs +0 -22
- package/dist/cjs/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.cjs +0 -8
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.cjs +0 -14
- package/dist/cjs/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.cjs +0 -7
- package/dist/cjs/Workflow/subcomponents/Header/components/Root/Root.module.scss.cjs +0 -6
- package/dist/cjs/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.cjs +0 -9
- package/dist/cjs/Workflow/subcomponents/Main/Main.module.scss.cjs +0 -6
- package/dist/cjs/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.cjs +0 -33
- package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.cjs +0 -160
- package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.cjs +0 -28
- package/dist/cjs/__future__/Workflow/Workflow.cjs +0 -57
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/Footer.cjs +0 -34
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.cjs +0 -26
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.cjs +0 -8
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +0 -100
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.cjs +0 -14
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss.cjs +0 -6
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/Root/Root.cjs +0 -23
- package/dist/cjs/__future__/Workflow/subcomponents/Header/Header.cjs +0 -32
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Actions/Actions.cjs +0 -26
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Actions/Actions.module.scss.cjs +0 -6
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Branding/Branding.cjs +0 -25
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.cjs +0 -7
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Root/Root.cjs +0 -23
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Titles/Titles.cjs +0 -42
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.cjs +0 -9
- package/dist/cjs/__future__/Workflow/subcomponents/Main/Main.cjs +0 -23
- package/dist/cjs/__future__/Workflow/subcomponents/Wrapper/Wrapper.cjs +0 -23
- package/dist/cjs/__future__/Workflow/subcomponents/Wrapper/Wrapper.module.scss.cjs +0 -6
- package/dist/cjs/containersV1.cjs +0 -4
- package/dist/cjs/containersV2.cjs +0 -4
- package/dist/esm/Card/Card.module.scss.mjs +0 -20
- package/dist/esm/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.mjs +0 -6
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.mjs +0 -12
- package/dist/esm/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss.mjs +0 -4
- package/dist/esm/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.mjs +0 -5
- package/dist/esm/Workflow/subcomponents/Header/components/Root/Root.module.scss.mjs +0 -4
- package/dist/esm/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.mjs +0 -7
- package/dist/esm/Workflow/subcomponents/Main/Main.module.scss.mjs +0 -4
- package/dist/esm/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.mjs +0 -31
- package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.mjs +0 -153
- package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.mjs +0 -26
- package/dist/esm/__future__/Workflow/Workflow.mjs +0 -52
- package/dist/esm/__future__/Workflow/subcomponents/Footer/Footer.mjs +0 -29
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.mjs +0 -20
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.mjs +0 -6
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +0 -94
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.mjs +0 -12
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss.mjs +0 -4
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/Root/Root.mjs +0 -17
- package/dist/esm/__future__/Workflow/subcomponents/Header/Header.mjs +0 -27
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Actions/Actions.mjs +0 -21
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Actions/Actions.module.scss.mjs +0 -4
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Branding/Branding.mjs +0 -20
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.mjs +0 -5
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Root/Root.mjs +0 -17
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Titles/Titles.mjs +0 -38
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.mjs +0 -7
- package/dist/esm/__future__/Workflow/subcomponents/Main/Main.mjs +0 -17
- package/dist/esm/__future__/Workflow/subcomponents/Wrapper/Wrapper.mjs +0 -17
- package/dist/esm/__future__/Workflow/subcomponents/Wrapper/Wrapper.module.scss.mjs +0 -4
- package/dist/esm/containersV1.mjs +0 -1
- package/dist/esm/containersV2.mjs +0 -1
- package/dist/types/__containers__/GuidanceBlock/v2/GuidanceBlock.d.ts +0 -59
- package/dist/types/__containers__/GuidanceBlock/v2/index.d.ts +0 -1
- package/dist/types/__containers__/v1.d.ts +0 -1
- package/dist/types/__containers__/v2.d.ts +0 -1
- package/dist/types/__future__/Workflow/Workflow.d.ts +0 -27
- package/dist/types/__future__/Workflow/_docs/controls/controls.d.ts +0 -2
- package/dist/types/__future__/Workflow/_docs/controls/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Footer/Footer.d.ts +0 -12
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.d.ts +0 -11
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/FooterActions/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/Root/Root.d.ts +0 -7
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/Root/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Footer/components/index.d.ts +0 -3
- package/dist/types/__future__/Workflow/subcomponents/Footer/index.d.ts +0 -2
- package/dist/types/__future__/Workflow/subcomponents/Header/Header.d.ts +0 -6
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Actions/Actions.d.ts +0 -13
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Actions/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Branding/Branding.d.ts +0 -11
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Branding/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Root/Root.d.ts +0 -7
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Root/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Titles/Titles.d.ts +0 -17
- package/dist/types/__future__/Workflow/subcomponents/Header/components/Titles/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Header/components/index.d.ts +0 -4
- package/dist/types/__future__/Workflow/subcomponents/Header/index.d.ts +0 -2
- package/dist/types/__future__/Workflow/subcomponents/Main/Main.d.ts +0 -9
- package/dist/types/__future__/Workflow/subcomponents/Main/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/Wrapper/Wrapper.d.ts +0 -9
- package/dist/types/__future__/Workflow/subcomponents/Wrapper/index.d.ts +0 -1
- package/dist/types/__future__/Workflow/subcomponents/index.d.ts +0 -4
- package/src/Heading/__snapshots__/Heading.spec.tsx.snap +0 -85
- package/src/Illustration/utils/usePausePlay.spec.tsx +0 -86
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.spec.tsx +0 -76
- package/src/Text/__snapshots__/Text.spec.tsx.snap +0 -49
- package/src/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss +0 -22
- package/src/Workflow/subcomponents/Header/components/Actions/Actions.module.scss +0 -17
- package/src/Workflow/subcomponents/Header/components/Branding/Branding.module.scss +0 -17
- package/src/Workflow/subcomponents/Header/components/Root/Root.module.scss +0 -24
- package/src/Workflow/subcomponents/Header/components/Titles/Titles.module.scss +0 -23
- package/src/Workflow/subcomponents/Main/Main.module.scss +0 -4
- package/src/Workflow/subcomponents/Wrapper/Wrapper.module.scss +0 -9
- package/src/__containers__/GuidanceBlock/v1/GuidanceBlock.spec.tsx +0 -82
- package/src/__containers__/GuidanceBlock/v1/_docs/GuidanceBlock.mdx +0 -38
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss +0 -356
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.tsx +0 -262
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stickersheet.stories.tsx +0 -118
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stories.tsx +0 -152
- package/src/__containers__/GuidanceBlock/v2/index.ts +0 -1
- package/src/__containers__/v1.ts +0 -1
- package/src/__containers__/v2.ts +0 -1
- package/src/__future__/Workflow/Workflow.tsx +0 -55
- package/src/__future__/Workflow/_docs/ProgressStepper.mdx +0 -37
- package/src/__future__/Workflow/_docs/ProgressStepper.stories.tsx +0 -94
- package/src/__future__/Workflow/_docs/Workflow.mdx +0 -165
- package/src/__future__/Workflow/_docs/Workflow.stories.tsx +0 -174
- package/src/__future__/Workflow/_docs/WorkflowFooter.mdx +0 -38
- package/src/__future__/Workflow/_docs/WorkflowFooter.stories.tsx +0 -96
- package/src/__future__/Workflow/_docs/WorkflowHeader.mdx +0 -28
- package/src/__future__/Workflow/_docs/WorkflowHeader.stories.tsx +0 -70
- package/src/__future__/Workflow/_docs/controls/controls.tsx +0 -93
- package/src/__future__/Workflow/_docs/controls/index.tsx +0 -1
- package/src/__future__/Workflow/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Footer/Footer.tsx +0 -38
- package/src/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss +0 -15
- package/src/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.tsx +0 -28
- package/src/__future__/Workflow/subcomponents/Footer/components/FooterActions/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss +0 -105
- package/src/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Footer/components/Root/Root.tsx +0 -23
- package/src/__future__/Workflow/subcomponents/Footer/components/Root/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Footer/components/index.ts +0 -3
- package/src/__future__/Workflow/subcomponents/Footer/index.ts +0 -2
- package/src/__future__/Workflow/subcomponents/Header/Header.tsx +0 -27
- package/src/__future__/Workflow/subcomponents/Header/components/Actions/Actions.tsx +0 -24
- package/src/__future__/Workflow/subcomponents/Header/components/Actions/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Header/components/Branding/Branding.tsx +0 -20
- package/src/__future__/Workflow/subcomponents/Header/components/Branding/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Header/components/Root/Root.tsx +0 -20
- package/src/__future__/Workflow/subcomponents/Header/components/Root/index.tsx +0 -1
- package/src/__future__/Workflow/subcomponents/Header/components/Titles/Titles.tsx +0 -55
- package/src/__future__/Workflow/subcomponents/Header/components/Titles/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/Header/components/index.ts +0 -4
- package/src/__future__/Workflow/subcomponents/Header/index.ts +0 -2
- package/src/__future__/Workflow/subcomponents/Main/Main.module.scss +0 -4
- package/src/__future__/Workflow/subcomponents/Main/Main.tsx +0 -22
- package/src/__future__/Workflow/subcomponents/Main/index.tsx +0 -1
- package/src/__future__/Workflow/subcomponents/Wrapper/Wrapper.tsx +0 -22
- package/src/__future__/Workflow/subcomponents/Wrapper/index.ts +0 -1
- package/src/__future__/Workflow/subcomponents/index.ts +0 -4
- package/src/__overlays__/Tooltip/v1/subcomponents/AppearanceAnim.spec.tsx +0 -39
- package/src/utils/useResizeObserver.spec.tsx +0 -49
- package/v1/containers/package.json +0 -5
- package/v2/containers/package.json +0 -5
- /package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/index.d.ts +0 -0
- /package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/types.d.ts +0 -0
- /package/dist/types/{__future__/Workflow → __layout__/Workflow/v2}/subcomponents/Footer/components/ProgressStepper/ProgressStepper.d.ts +0 -0
- /package/src/BrandMoment/_docs/{ExampleHeaders.scss → ExampleHeaders.module.scss} +0 -0
- /package/src/Filter/FilterMultiSelect/_docs/{FilterMultiSelect.stories.scss → FilterMultiSelect.module.scss} +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.tsx +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/index.ts +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/types.ts +0 -0
- /package/src/Icon/_docs/{icon.stories.scss → icon.module.scss} +0 -0
- /package/src/Workflow/subcomponents/Footer/components/FooterActions/{FooterActions.module.scss → FooterActions.module.css} +0 -0
- /package/src/{__future__/Workflow → Workflow}/subcomponents/Footer/components/ProgressStepper/ProgressStepper.spec.tsx +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
-
import {
|
|
4
|
+
import { vi } from "vitest"
|
|
5
|
+
import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
|
|
5
6
|
import { ConfirmationModal, ConfirmationModalProps } from "./ConfirmationModal"
|
|
6
|
-
|
|
7
7
|
const user = userEvent.setup()
|
|
8
8
|
|
|
9
9
|
const ConfirmationModalWrapper = ({
|
|
@@ -28,8 +28,8 @@ describe("<ConfirmationModal />", () => {
|
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
it("supports a dismiss action when dismiss button is pressed", async () => {
|
|
31
|
-
const handleConfirm =
|
|
32
|
-
const handleDismiss =
|
|
31
|
+
const handleConfirm = vi.fn()
|
|
32
|
+
const handleDismiss = vi.fn()
|
|
33
33
|
const { getByLabelText } = render(
|
|
34
34
|
<ConfirmationModalWrapper
|
|
35
35
|
onConfirm={handleConfirm}
|
|
@@ -46,8 +46,8 @@ describe("<ConfirmationModal />", () => {
|
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
it("supports a dismiss action when cancel button is pressed", async () => {
|
|
49
|
-
const handleConfirm =
|
|
50
|
-
const handleDismiss =
|
|
49
|
+
const handleConfirm = vi.fn()
|
|
50
|
+
const handleDismiss = vi.fn()
|
|
51
51
|
const { getByText } = render(
|
|
52
52
|
<ConfirmationModalWrapper
|
|
53
53
|
onDismiss={handleDismiss}
|
|
@@ -64,8 +64,8 @@ describe("<ConfirmationModal />", () => {
|
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
it("supports a confirm action when confirm button is pressed", async () => {
|
|
67
|
-
const handleConfirm =
|
|
68
|
-
const handleDismiss =
|
|
67
|
+
const handleConfirm = vi.fn()
|
|
68
|
+
const handleDismiss = vi.fn()
|
|
69
69
|
const { getByText } = render(
|
|
70
70
|
<ConfirmationModalWrapper
|
|
71
71
|
onDismiss={handleDismiss}
|
|
@@ -210,7 +210,11 @@ export const ConfirmationModal = ({
|
|
|
210
210
|
</ModalBody>
|
|
211
211
|
<ModalFooter
|
|
212
212
|
actions={footerActions}
|
|
213
|
-
appearance={
|
|
213
|
+
appearance={
|
|
214
|
+
mood === "negative" || variant == "warning"
|
|
215
|
+
? "destructive"
|
|
216
|
+
: "primary"
|
|
217
|
+
}
|
|
214
218
|
unpadded={unpadded}
|
|
215
219
|
/>
|
|
216
220
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
-
import {
|
|
4
|
+
import { vi } from "vitest"
|
|
5
|
+
import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
|
|
5
6
|
import { ContextModal, ContextModalProps } from "./ContextModal"
|
|
6
|
-
|
|
7
7
|
const user = userEvent.setup()
|
|
8
8
|
|
|
9
9
|
const ContextModalWrapper = ({
|
|
@@ -29,8 +29,8 @@ describe("<ContextModal />", () => {
|
|
|
29
29
|
})
|
|
30
30
|
|
|
31
31
|
it("supports a dismiss action when dismiss button is pressed", async () => {
|
|
32
|
-
const handleConfirm =
|
|
33
|
-
const handleDismiss =
|
|
32
|
+
const handleConfirm = vi.fn()
|
|
33
|
+
const handleDismiss = vi.fn()
|
|
34
34
|
const { getByLabelText } = render(
|
|
35
35
|
<ContextModalWrapper onConfirm={handleConfirm} onDismiss={handleDismiss}>
|
|
36
36
|
Example modal body
|
|
@@ -44,8 +44,8 @@ describe("<ContextModal />", () => {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
it("supports a confirm action when confirm button is pressed", async () => {
|
|
47
|
-
const handleConfirm =
|
|
48
|
-
const handleDismiss =
|
|
47
|
+
const handleConfirm = vi.fn()
|
|
48
|
+
const handleDismiss = vi.fn()
|
|
49
49
|
const { getByText } = render(
|
|
50
50
|
<ContextModalWrapper onDismiss={handleDismiss} onConfirm={handleConfirm}>
|
|
51
51
|
Example modal body
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, screen, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
+
import { vi } from "vitest"
|
|
4
5
|
import { GenericModal, GenericModalProps } from "./GenericModal"
|
|
5
6
|
import { ModalAccessibleLabel } from "./subcomponents/ModalAccessibleLabel"
|
|
6
7
|
import { ModalBody } from "./subcomponents/ModalBody"
|
|
7
8
|
import { ModalHeader } from "./subcomponents/ModalHeader"
|
|
8
|
-
|
|
9
9
|
const user = userEvent.setup()
|
|
10
10
|
|
|
11
11
|
const GenericModalWrapper = ({
|
|
@@ -50,7 +50,7 @@ describe("<GenericModal />", () => {
|
|
|
50
50
|
})
|
|
51
51
|
|
|
52
52
|
it("closes the modal when escape key is pressed", async () => {
|
|
53
|
-
const handleDismiss =
|
|
53
|
+
const handleDismiss = vi.fn()
|
|
54
54
|
|
|
55
55
|
render(<GenericModalWrapper onEscapeKeyup={handleDismiss} />)
|
|
56
56
|
|
|
@@ -70,7 +70,7 @@ describe("<GenericModal />", () => {
|
|
|
70
70
|
})
|
|
71
71
|
|
|
72
72
|
it("closes the modal when a click is outside of the modal content", async () => {
|
|
73
|
-
const handleDismiss =
|
|
73
|
+
const handleDismiss = vi.fn()
|
|
74
74
|
render(<GenericModalWrapper onOutsideModalClick={handleDismiss} />)
|
|
75
75
|
|
|
76
76
|
await user.click(screen.getByTestId("GenericModalTestId-scrollLayer"))
|
|
@@ -80,7 +80,7 @@ describe("<GenericModal />", () => {
|
|
|
80
80
|
})
|
|
81
81
|
|
|
82
82
|
it("calls onAfterLeave after it closes", async () => {
|
|
83
|
-
const mockOnAfterLeave =
|
|
83
|
+
const mockOnAfterLeave = vi.fn()
|
|
84
84
|
render(<GenericModalWrapper onAfterLeave={mockOnAfterLeave} />)
|
|
85
85
|
|
|
86
86
|
await user.click(screen.getByTestId("GenericModalTestId-scrollLayer"))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Button, ButtonProps } from "~components/__actions__/v2"
|
|
4
|
-
import { useMediaQueries } from "~utils/useMediaQueries"
|
|
4
|
+
import { useMediaQueries } from "~components/utils/useMediaQueries"
|
|
5
5
|
import { ModalBody } from "../ModalBody/ModalBody"
|
|
6
6
|
import styles from "./ModalFooter.module.scss"
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
-
import {
|
|
4
|
+
import { vi } from "vitest"
|
|
5
|
+
import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
|
|
5
6
|
import { InputEditModal, InputEditModalProps } from "./InputEditModal"
|
|
6
|
-
|
|
7
7
|
const user = userEvent.setup()
|
|
8
8
|
|
|
9
9
|
const InputEditModalWrapper = ({
|
|
@@ -28,8 +28,8 @@ describe("<InputEditModal />", () => {
|
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
it("supports a dismiss action when dismiss button is pressed", async () => {
|
|
31
|
-
const handleSubmit =
|
|
32
|
-
const handleDismiss =
|
|
31
|
+
const handleSubmit = vi.fn()
|
|
32
|
+
const handleDismiss = vi.fn()
|
|
33
33
|
const { getByLabelText } = render(
|
|
34
34
|
<InputEditModalWrapper onSubmit={handleSubmit} onDismiss={handleDismiss}>
|
|
35
35
|
Example modal body
|
|
@@ -43,8 +43,8 @@ describe("<InputEditModal />", () => {
|
|
|
43
43
|
})
|
|
44
44
|
|
|
45
45
|
it("supports a dismiss action when cancel button is pressed", async () => {
|
|
46
|
-
const handleSubmit =
|
|
47
|
-
const handleDismiss =
|
|
46
|
+
const handleSubmit = vi.fn()
|
|
47
|
+
const handleDismiss = vi.fn()
|
|
48
48
|
const { getByText } = render(
|
|
49
49
|
<InputEditModalWrapper onDismiss={handleDismiss} onSubmit={handleSubmit}>
|
|
50
50
|
Example modal body
|
|
@@ -58,8 +58,8 @@ describe("<InputEditModal />", () => {
|
|
|
58
58
|
})
|
|
59
59
|
|
|
60
60
|
it("supports a Submit action when Submit button is pressed", async () => {
|
|
61
|
-
const handleSubmit =
|
|
62
|
-
const handleDismiss =
|
|
61
|
+
const handleSubmit = vi.fn()
|
|
62
|
+
const handleDismiss = vi.fn()
|
|
63
63
|
const { getByText } = render(
|
|
64
64
|
<InputEditModalWrapper onDismiss={handleDismiss} onSubmit={handleSubmit}>
|
|
65
65
|
Example modal body
|
|
@@ -3,7 +3,7 @@ import classnames from "classnames"
|
|
|
3
3
|
import { ReactFocusOnProps } from "react-focus-on/dist/es5/types"
|
|
4
4
|
import { FieldMessage, FieldMessageProps } from "~components/FieldMessage"
|
|
5
5
|
import { Heading } from "~components/Heading"
|
|
6
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
6
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
7
7
|
import {
|
|
8
8
|
MultiSelectOptions,
|
|
9
9
|
MultiSelectOptionsProps,
|
|
@@ -114,6 +114,9 @@ export const MultiSelect = ({
|
|
|
114
114
|
<Popover
|
|
115
115
|
refs={refs}
|
|
116
116
|
id={`${id}--popover`}
|
|
117
|
+
role="dialog"
|
|
118
|
+
aria-modal="true"
|
|
119
|
+
tabIndex={-1}
|
|
117
120
|
focusOnProps={{
|
|
118
121
|
enabled: true,
|
|
119
122
|
onClickOutside,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, InputHTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { CheckIcon, MinusIcon } from "~components/Icon"
|
|
4
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import styles from "./Checkbox.module.scss"
|
|
6
6
|
|
|
7
7
|
export type CheckedStatus = "checked" | "unchecked" | "indeterminate"
|
package/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
+
import { vi } from "vitest"
|
|
4
5
|
import { CheckboxProps } from "../Checkbox"
|
|
5
6
|
import {
|
|
6
7
|
MultiSelectOptionField,
|
|
7
8
|
MultiSelectOptionFieldProps,
|
|
8
9
|
} from "./MultiSelectOptionField"
|
|
9
|
-
|
|
10
10
|
const user = userEvent.setup()
|
|
11
11
|
|
|
12
|
-
const onChange =
|
|
12
|
+
const onChange = vi.fn()
|
|
13
13
|
|
|
14
14
|
const MultiSelectOptionFieldWrapper = (
|
|
15
15
|
customProps?: Partial<MultiSelectOptionFieldProps>
|
|
@@ -42,7 +42,7 @@ const MultiSelectOptionFieldWrapper = (
|
|
|
42
42
|
|
|
43
43
|
describe("<MultiSelectOptionField />", () => {
|
|
44
44
|
afterEach(() => {
|
|
45
|
-
|
|
45
|
+
vi.clearAllMocks()
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
it("has an accessible name", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
3
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
4
4
|
import { MultiSelectOption } from "../../types"
|
|
5
5
|
import { Checkbox, CheckboxProps } from "../Checkbox"
|
|
6
6
|
import styles from "./MultiSelectOptionField.module.scss"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
+
import { vi } from "vitest"
|
|
4
5
|
import {
|
|
5
6
|
MultiSelectOptions,
|
|
6
7
|
MultiSelectOptionsProps,
|
|
7
8
|
} from "./MultiSelectOptions"
|
|
8
|
-
|
|
9
9
|
const user = userEvent.setup()
|
|
10
10
|
|
|
11
|
-
const onChange =
|
|
11
|
+
const onChange = vi.fn()
|
|
12
12
|
const testOptions = [
|
|
13
13
|
{
|
|
14
14
|
label: "Pancakes",
|
|
@@ -46,7 +46,7 @@ const MultiSelectOptionsWrapper = (
|
|
|
46
46
|
|
|
47
47
|
describe("<MultiSelectOptions />", () => {
|
|
48
48
|
afterEach(() => {
|
|
49
|
-
|
|
49
|
+
vi.clearAllMocks()
|
|
50
50
|
})
|
|
51
51
|
|
|
52
52
|
it("contains the number of options available in the accessible description", () => {
|
|
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Text } from "~components/Text"
|
|
4
4
|
import { VisuallyHidden } from "~components/VisuallyHidden"
|
|
5
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
5
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
6
6
|
import { MultiSelectOption } from "../../types"
|
|
7
7
|
import { MultiSelectOptionField } from "../MultiSelectOptionField"
|
|
8
8
|
import styles from "./MultiSelectOptions.module.scss"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
+
import { vi } from "vitest"
|
|
4
5
|
import { MultiSelectToggle, MultiSelectToggleProps } from "./MultiSelectToggle"
|
|
5
|
-
|
|
6
6
|
const user = userEvent.setup()
|
|
7
7
|
|
|
8
|
-
const onClick =
|
|
8
|
+
const onClick = vi.fn()
|
|
9
9
|
|
|
10
10
|
const MultiSelectToggleWrapper = (
|
|
11
11
|
customProps?: Partial<MultiSelectToggleProps>
|
|
@@ -4,7 +4,7 @@ import { ClearButton } from "~components/ClearButton"
|
|
|
4
4
|
import { FieldMessageProps } from "~components/FieldMessage"
|
|
5
5
|
import { ChevronDownIcon, ChevronUpIcon } from "~components/Icon"
|
|
6
6
|
import { RemovableTag } from "~components/__future__"
|
|
7
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
7
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
8
8
|
import { MultiSelectOption } from "../../types"
|
|
9
9
|
import styles from "./MultiSelectToggle.module.scss"
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import classnames from "classnames"
|
|
14
14
|
import { FocusOn } from "react-focus-on"
|
|
15
15
|
import { ReactFocusOnProps } from "react-focus-on/dist/es5/types"
|
|
16
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
16
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
17
17
|
import styles from "./Popover.module.scss"
|
|
18
18
|
|
|
19
19
|
export type PopoverProps<RT extends ReferenceType = ReferenceType> = {
|
|
@@ -65,9 +65,6 @@ export const Popover = <RT extends ReferenceType>({
|
|
|
65
65
|
ref={refs.setFloating}
|
|
66
66
|
style={floatingStyles}
|
|
67
67
|
className={classnames(styles.popover, classNameOverride)}
|
|
68
|
-
role="dialog"
|
|
69
|
-
aria-modal="true"
|
|
70
|
-
tabIndex={-1}
|
|
71
68
|
{...restProps}
|
|
72
69
|
>
|
|
73
70
|
{children}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { HeadingProps } from "~components/Heading"
|
|
4
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import {
|
|
6
6
|
GenericNotification,
|
|
7
7
|
GenericNotificationType,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import { createPortal } from "react-dom"
|
|
3
3
|
import { GenericNotification } from "~components/Notification/subcomponents/GenericNotification"
|
|
4
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import { ToastNotificationObj } from "../../../types"
|
|
6
6
|
|
|
7
7
|
export type ToastNotificationsMapProps = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useId } from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
import { expect, within } from "@storybook/test"
|
|
3
4
|
import { Button } from "~components/__actions__/v2"
|
|
4
5
|
import { ToastNotification, useToastNotification } from "../index"
|
|
5
6
|
|
|
@@ -175,3 +176,35 @@ export const ClearNotifications: Story = {
|
|
|
175
176
|
)
|
|
176
177
|
},
|
|
177
178
|
}
|
|
179
|
+
|
|
180
|
+
export const NoDuplicatesWithSameId: Story = {
|
|
181
|
+
render: () => {
|
|
182
|
+
const { addToastNotification } = useToastNotification()
|
|
183
|
+
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
addToastNotification({
|
|
186
|
+
id: "id--clear-example-1",
|
|
187
|
+
title: "First",
|
|
188
|
+
type: "positive",
|
|
189
|
+
message: "There should only be one notification",
|
|
190
|
+
})
|
|
191
|
+
addToastNotification({
|
|
192
|
+
id: "id--clear-example-1",
|
|
193
|
+
title: "First",
|
|
194
|
+
type: "positive",
|
|
195
|
+
message: "There should only be one notification",
|
|
196
|
+
})
|
|
197
|
+
}, [addToastNotification])
|
|
198
|
+
|
|
199
|
+
return <div>Irrelevant content</div>
|
|
200
|
+
},
|
|
201
|
+
play: async context => {
|
|
202
|
+
const { canvasElement } = context
|
|
203
|
+
const { findAllByText } = within(canvasElement.parentElement!)
|
|
204
|
+
|
|
205
|
+
const notifications = await findAllByText(
|
|
206
|
+
"There should only be one notification"
|
|
207
|
+
)
|
|
208
|
+
expect(notifications).toHaveLength(1)
|
|
209
|
+
},
|
|
210
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useContext, useState } from "react"
|
|
2
2
|
import { v4 as uuidv4 } from "uuid"
|
|
3
3
|
import {
|
|
4
4
|
GenericNotificationType,
|
|
@@ -44,23 +44,18 @@ export const ToastNotificationProvider = ({
|
|
|
44
44
|
const [notifications, setNotifications] = useState<ToastNotificationObj[]>([])
|
|
45
45
|
|
|
46
46
|
const addToastNotification: ToastNotificationContextValue["addToastNotification"] =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: [...existing, notificationWithId]
|
|
60
|
-
})
|
|
61
|
-
},
|
|
62
|
-
[setNotifications]
|
|
63
|
-
)
|
|
47
|
+
notification => {
|
|
48
|
+
const uuid = uuidv4()
|
|
49
|
+
const notificationWithId = { id: uuid, ...notification }
|
|
50
|
+
|
|
51
|
+
setNotifications(existing => {
|
|
52
|
+
const notificationExists = existing.find(
|
|
53
|
+
({ id }) => id === notification.id
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return notificationExists ? existing : [...existing, notificationWithId]
|
|
57
|
+
})
|
|
58
|
+
}
|
|
64
59
|
|
|
65
60
|
const updateToastNotification = (
|
|
66
61
|
notification: ToastNotificationObj
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
import { userEvent, within, expect, waitFor } from "@storybook/test"
|
|
4
|
+
import { GenericNotification } from "./index"
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Components/Notifications/GenericNotification",
|
|
8
|
+
component: GenericNotification,
|
|
9
|
+
args: {
|
|
10
|
+
variant: "success",
|
|
11
|
+
style: "inline",
|
|
12
|
+
title: "Success",
|
|
13
|
+
children: "This is my positive notification",
|
|
14
|
+
},
|
|
15
|
+
} satisfies Meta<typeof GenericNotification>
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof meta>
|
|
20
|
+
|
|
21
|
+
export const GenericNotificationTest: Story = {
|
|
22
|
+
render: () => {
|
|
23
|
+
const [isHidden, setIsHidden] = useState<boolean>(false)
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<span data-testid="hidden-state">{isHidden ? "Hidden" : "Shown"}</span>
|
|
28
|
+
<GenericNotification
|
|
29
|
+
variant="success"
|
|
30
|
+
style="inline"
|
|
31
|
+
title="Success"
|
|
32
|
+
data-testid="generic-notification"
|
|
33
|
+
onHide={() => setIsHidden(true)}
|
|
34
|
+
>
|
|
35
|
+
This is my positive notification
|
|
36
|
+
</GenericNotification>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
name: "Test: Closes when close button is clicked and onHide is called",
|
|
41
|
+
play: async ({ canvasElement }) => {
|
|
42
|
+
const canvas = within(canvasElement)
|
|
43
|
+
const element = canvas.getByTestId("generic-notification")
|
|
44
|
+
const hiddenState = canvas.getByTestId("hidden-state")
|
|
45
|
+
|
|
46
|
+
await waitFor(() => {
|
|
47
|
+
expect(element).toBeInTheDocument()
|
|
48
|
+
expect(hiddenState).toHaveTextContent("Shown")
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
await userEvent.click(canvas.getByTestId("close-button"))
|
|
52
|
+
|
|
53
|
+
await waitFor(() => {
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
expect(hiddenState).toHaveTextContent("Hidden")
|
|
56
|
+
expect(element).not.toBeInTheDocument()
|
|
57
|
+
}, 1000)
|
|
58
|
+
})
|
|
59
|
+
},
|
|
60
|
+
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
NotificationType,
|
|
6
6
|
NotificationVariant,
|
|
7
7
|
} from "~components/Notification/types"
|
|
8
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
8
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
9
9
|
import { CancelButton } from "../CancelButton"
|
|
10
10
|
import { NotificationHeading } from "../NotificationHeading"
|
|
11
11
|
import {
|
|
@@ -11,12 +11,12 @@ const defaultProps = {
|
|
|
11
11
|
ariaLabelNextPage: "Next page",
|
|
12
12
|
ariaLabelPreviousPage: "Previous page",
|
|
13
13
|
ariaLabelPage: "Page",
|
|
14
|
-
onPageChange:
|
|
14
|
+
onPageChange: vi.fn(),
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
describe("<Pagination />", () => {
|
|
18
18
|
it("calls onPageChange when clicking page number", async () => {
|
|
19
|
-
const onPageChange =
|
|
19
|
+
const onPageChange = vi.fn()
|
|
20
20
|
|
|
21
21
|
render(<Pagination {...defaultProps} onPageChange={onPageChange} />)
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
3
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
4
4
|
import { DirectionalLink } from "./subcomponents/DirectionalLink"
|
|
5
5
|
import { PaginationLink } from "./subcomponents/PaginationLink"
|
|
6
6
|
import { TruncateIndicator } from "./subcomponents/TruncateIndicator"
|
package/src/Popover/Popover.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { usePopper } from "react-popper"
|
|
|
4
4
|
import { Heading } from "~components/Heading"
|
|
5
5
|
import { CloseIcon } from "~components/Icon"
|
|
6
6
|
import { Text } from "~components/Text"
|
|
7
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
7
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
8
8
|
import { Placement, PopoverSize, PopoverVariant } from "./types"
|
|
9
9
|
import {
|
|
10
10
|
mapArrowVariantToClass,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Heading } from "~components/Heading"
|
|
4
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import { Label } from "./subcomponents/Label"
|
|
6
6
|
import { calculatePercentage } from "./utils/calculatePercentage"
|
|
7
7
|
import styles from "./ProgressBar.module.scss"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
3
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
4
4
|
import styles from "./Radio.module.scss"
|
|
5
5
|
|
|
6
6
|
export type RadioProps = OverrideClassName<
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes, useId } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Label } from "~components/Label"
|
|
4
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
5
5
|
import styles from "./RadioGroup.module.scss"
|
|
6
6
|
|
|
7
7
|
export type RadioGroupProps = OverrideClassName<
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render } from "@testing-library/react"
|
|
3
|
+
import { vi } from "vitest"
|
|
3
4
|
import { RichTextContentProps } from "../RichTextContent"
|
|
4
5
|
import { EditableRichTextContent } from "./EditableRichTextContent"
|
|
6
|
+
const mockFn = vi.fn()
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
jest.mock("../RichTextContent", () => ({
|
|
8
|
+
vi.mock("../RichTextContent", () => ({
|
|
9
9
|
__esModule: true,
|
|
10
10
|
RichTextContent: (props: RichTextContentProps): JSX.Element => {
|
|
11
11
|
mockFn(props)
|
|
@@ -26,7 +26,7 @@ describe("Content props are passed", () => {
|
|
|
26
26
|
<EditableRichTextContent
|
|
27
27
|
content={content}
|
|
28
28
|
labelText=""
|
|
29
|
-
onClick={
|
|
29
|
+
onClick={vi.fn()}
|
|
30
30
|
contentProps={{ id: "sampleId" }}
|
|
31
31
|
/>
|
|
32
32
|
)
|
|
@@ -2,7 +2,7 @@ import React, { MouseEvent, HTMLAttributes } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Label } from "~components/Label"
|
|
4
4
|
import { VisuallyHidden } from "~components/VisuallyHidden"
|
|
5
|
-
import { OverrideClassName } from "~types/OverrideClassName"
|
|
5
|
+
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
6
6
|
import { RichTextContent, RichTextContentProps } from "../RichTextContent"
|
|
7
7
|
import { EditorContentArray } from "../types"
|
|
8
8
|
import styles from "./EditableRichTextContent.module.scss"
|