@kaizen/components 3.3.2 → 3.3.3
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/dist/cjs/assets/svgs/custom-icons/user-settings.svg.cjs +80 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/src/Icon/CustomIcons.cjs +8 -0
- package/dist/esm/assets/svgs/custom-icons/user-settings.svg.mjs +58 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/src/Avatar/Avatar.mjs +9 -9
- package/dist/esm/src/AvatarGroup/AvatarGroup.mjs +9 -9
- package/dist/esm/src/Badge/Badge.mjs +18 -21
- package/dist/esm/src/Brand/Brand.mjs +44 -47
- package/dist/esm/src/Brand/BrandCollectiveIntelligence/BrandCollectiveIntelligence.mjs +48 -51
- package/dist/esm/src/BrandMoment/BrandMoment.mjs +79 -82
- package/dist/esm/src/Button/Button.mjs +47 -50
- package/dist/esm/src/Button/subcomponents/ButtonContent/ButtonContent.mjs +5 -5
- package/dist/esm/src/Button/subcomponents/PendingContent/PendingContent.mjs +3 -3
- package/dist/esm/src/ButtonGroup/ButtonGroup.mjs +30 -33
- package/dist/esm/src/ButtonV1/Button/Button.mjs +8 -11
- package/dist/esm/src/ButtonV1/GenericButton/GenericButton.mjs +61 -64
- package/dist/esm/src/ButtonV1/IconButton/IconButton.mjs +9 -12
- package/dist/esm/src/Calendar/CalendarPopover/CalendarPopover.mjs +55 -58
- package/dist/esm/src/Calendar/CalendarRange/CalendarRange.mjs +58 -61
- package/dist/esm/src/Calendar/CalendarSingle/CalendarSingle.mjs +52 -55
- package/dist/esm/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +48 -51
- package/dist/esm/src/Card/Card.mjs +22 -25
- package/dist/esm/src/Checkbox/Checkbox/Checkbox.mjs +31 -34
- package/dist/esm/src/Checkbox/CheckboxField/CheckboxField.mjs +37 -40
- package/dist/esm/src/Checkbox/CheckboxGroup/CheckboxGroup.mjs +27 -30
- package/dist/esm/src/ClearButton/ClearButton.mjs +17 -20
- package/dist/esm/src/Collapsible/Collapsible/Collapsible.mjs +83 -86
- package/dist/esm/src/Collapsible/CollapsibleGroup/CollapsibleGroup.mjs +4 -4
- package/dist/esm/src/Collapsible/ExpertAdviceCollapsible/ExpertAdviceCollapsible.mjs +24 -27
- package/dist/esm/src/Container/Container.mjs +13 -16
- package/dist/esm/src/Content/Content.mjs +13 -16
- package/dist/esm/src/DateInput/DateInput/DateInput.mjs +28 -31
- package/dist/esm/src/DateInput/DateInputDescription/DateInputDescription.mjs +25 -28
- package/dist/esm/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +30 -33
- package/dist/esm/src/DatePicker/DatePicker.mjs +213 -216
- package/dist/esm/src/DatePicker/subcomponents/DateInputField/DateInputField.mjs +42 -45
- package/dist/esm/src/DatePicker/utils/validateDate.mjs +4 -4
- package/dist/esm/src/DateRangePicker/DateRangePicker.mjs +123 -126
- package/dist/esm/src/Divider/Divider.mjs +13 -16
- package/dist/esm/src/EmptyState/EmptyState.mjs +38 -41
- package/dist/esm/src/ErrorPage/ErrorPage.mjs +73 -76
- package/dist/esm/src/FieldGroup/FieldGroup.mjs +12 -15
- package/dist/esm/src/FieldMessage/FieldMessage.mjs +29 -32
- package/dist/esm/src/Filter/Filter/Filter.mjs +52 -55
- package/dist/esm/src/Filter/Filter/subcomponents/FilterContents/FilterContents.mjs +10 -13
- package/dist/esm/src/Filter/Filter/subcomponents/FilterPopover/FilterPopover.mjs +31 -34
- package/dist/esm/src/Filter/FilterBar/FilterBar.mjs +32 -35
- package/dist/esm/src/Filter/FilterBar/context/FilterBarContext.mjs +3 -3
- package/dist/esm/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +45 -48
- package/dist/esm/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.mjs +26 -29
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.mjs +32 -35
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.mjs +35 -38
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.mjs +35 -38
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.mjs +83 -86
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.mjs +55 -58
- package/dist/esm/src/Filter/FilterButton/FilterButton/FilterButton.mjs +28 -31
- package/dist/esm/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +32 -35
- package/dist/esm/src/Filter/FilterButton/subcomponents/FilterButtonBase/FilterButtonBase.mjs +12 -15
- package/dist/esm/src/Filter/FilterDatePicker/FilterDatePicker.mjs +29 -32
- package/dist/esm/src/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs +48 -51
- package/dist/esm/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.mjs +4 -4
- package/dist/esm/src/Filter/FilterDatePicker/utils/getDateValidationHandler.mjs +2 -2
- package/dist/esm/src/Filter/FilterDateRangePicker/FilterDateRangePicker.mjs +34 -37
- package/dist/esm/src/Filter/FilterDateRangePicker/subcomponents/DateRangeDisplayLabel/DateRangeDisplayLabel.mjs +11 -14
- package/dist/esm/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.mjs +69 -72
- package/dist/esm/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.mjs +51 -54
- package/dist/esm/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.mjs +202 -205
- package/dist/esm/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.mjs +2 -2
- package/dist/esm/src/Filter/FilterMultiSelect/FilterMultiSelect.mjs +67 -71
- package/dist/esm/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.mjs +4 -4
- package/dist/esm/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.mjs +8 -8
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/ListBox/ListBox.mjs +61 -64
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.mjs +24 -27
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.mjs +9 -12
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MenuLayout/MenuFooter/MenuFooter.mjs +8 -11
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MenuLayout/MenuLoadingSkeleton/MenuLoadingSkeleton.mjs +30 -33
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.mjs +41 -44
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/ResponsiveMenuPopup.mjs +70 -73
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +51 -54
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/NoResults/NoResults.mjs +12 -15
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.mjs +40 -43
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/SectionDivider/SectionDivider.mjs +3 -3
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.mjs +29 -32
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.mjs +23 -26
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/Trigger/FilterTriggerButton/FilterTriggerButton.mjs +24 -27
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/Trigger/RemovableFilterTrigger/RemovableFilterTrigger.mjs +29 -32
- package/dist/esm/src/Filter/FilterSelect/FilterSelect.mjs +70 -73
- package/dist/esm/src/Focusable/Focusable.mjs +2 -2
- package/dist/esm/src/GuidanceBlock/GuidanceBlock.mjs +42 -45
- package/dist/esm/src/Icon/CustomIcons.mjs +6 -0
- package/dist/esm/src/Icon/Icon.mjs +6 -6
- package/dist/esm/src/IconV1/subcomponents/SVG/SVG.mjs +24 -27
- package/dist/esm/src/Illustration/Scene/BrandMomentCaptureIntro/BrandMomentCaptureIntro.mjs +35 -38
- package/dist/esm/src/Illustration/Scene/Scene.mjs +535 -670
- package/dist/esm/src/Illustration/Spot/Spot.mjs +2 -2
- package/dist/esm/src/Illustration/subcomponents/Base/Base.mjs +22 -25
- package/dist/esm/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +9 -9
- package/dist/esm/src/Illustration/utils/usePausePlay.mjs +2 -2
- package/dist/esm/src/Input/Input/Input.mjs +32 -35
- package/dist/esm/src/Input/InputRange/InputRange.mjs +69 -72
- package/dist/esm/src/Input/InputSearch/InputSearch.mjs +53 -56
- package/dist/esm/src/KaizenProvider/KaizenProvider.mjs +20 -23
- package/dist/esm/src/KaizenProvider/subcomponents/FontDefinitions/FontDefinitions.mjs +6 -6
- package/dist/esm/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.mjs +19 -22
- package/dist/esm/src/Label/Label.mjs +23 -26
- package/dist/esm/src/LabelledMessage/LabelledMessage.mjs +13 -16
- package/dist/esm/src/LikertScale/LikertScale.mjs +10 -10
- package/dist/esm/src/Link/Link.mjs +30 -33
- package/dist/esm/src/Link/subcomponents/LinkContent.mjs +6 -6
- package/dist/esm/src/LinkButton/LinkButton.mjs +32 -35
- package/dist/esm/src/Loading/LoadingGraphic/LoadingGraphic.mjs +17 -20
- package/dist/esm/src/Loading/LoadingHeading/LoadingHeading.mjs +17 -20
- package/dist/esm/src/Loading/LoadingInput/LoadingInput.mjs +18 -21
- package/dist/esm/src/Loading/LoadingParagraph/LoadingParagraph.mjs +20 -23
- package/dist/esm/src/Loading/LoadingSpinner/LoadingSpinner.mjs +16 -19
- package/dist/esm/src/Loading/LoadingSpinner/subcomponents/SpinnerIcon.mjs +13 -13
- package/dist/esm/src/Menu/Menu.mjs +10 -13
- package/dist/esm/src/Menu/MenuHeader.mjs +7 -10
- package/dist/esm/src/Menu/MenuItem.mjs +19 -22
- package/dist/esm/src/Menu/MenuPopover.mjs +10 -13
- package/dist/esm/src/Menu/MenuSection.mjs +7 -10
- package/dist/esm/src/Menu/MenuTrigger.mjs +2 -2
- package/dist/esm/src/MenuV1/Menu.mjs +41 -44
- package/dist/esm/src/MenuV1/subcomponents/MenuDropdown/MenuDropdown.mjs +79 -82
- package/dist/esm/src/MenuV1/subcomponents/MenuItem/MenuItem.mjs +47 -50
- package/dist/esm/src/MenuV1/subcomponents/MenuList/MenuList.mjs +3 -3
- package/dist/esm/src/MenuV1/subcomponents/StatelessMenu/StatelessMenu.mjs +62 -65
- package/dist/esm/src/Modal/ConfirmationModal/ConfirmationModal.mjs +79 -82
- package/dist/esm/src/Modal/ContextModal/ContextModal.mjs +78 -81
- package/dist/esm/src/Modal/GenericModal/GenericModal.mjs +115 -118
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalAccessibleDescription/ModalAccessibleDescription.mjs +12 -15
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalAccessibleLabel/ModalAccessibleLabel.mjs +15 -18
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalBody/ModalBody.mjs +10 -13
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.mjs +25 -28
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +19 -22
- package/dist/esm/src/Modal/InputEditModal/InputEditModal.mjs +60 -63
- package/dist/esm/src/MultiSelect/MultiSelect.mjs +101 -104
- package/dist/esm/src/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +31 -34
- package/dist/esm/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.mjs +22 -25
- package/dist/esm/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.mjs +40 -43
- package/dist/esm/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +71 -74
- package/dist/esm/src/MultiSelect/subcomponents/Popover/Popover.mjs +39 -42
- package/dist/esm/src/Notification/GlobalNotification/GlobalNotification.mjs +11 -14
- package/dist/esm/src/Notification/InlineNotification/InlineNotification.mjs +17 -20
- package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs +27 -30
- package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs +29 -32
- package/dist/esm/src/Notification/ToastNotification/context/ToastNotificationContext.mjs +47 -50
- package/dist/esm/src/Notification/subcomponents/CancelButton/CancelButton.mjs +15 -18
- package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.mjs +68 -71
- package/dist/esm/src/Notification/subcomponents/NotificationHeading/NotificationHeading.mjs +24 -27
- package/dist/esm/src/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +28 -31
- package/dist/esm/src/Pagination/Pagination.mjs +8 -8
- package/dist/esm/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +21 -24
- package/dist/esm/src/Pagination/subcomponents/PaginationLink/PaginationLink.mjs +16 -19
- package/dist/esm/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +3 -3
- package/dist/esm/src/Popover/Popover.mjs +112 -115
- package/dist/esm/src/ProgressBar/ProgressBar.mjs +41 -44
- package/dist/esm/src/ProgressBar/subcomponents/Label/Label.mjs +14 -17
- package/dist/esm/src/Radio/Radio/Radio.mjs +29 -32
- package/dist/esm/src/Radio/RadioField/RadioField.mjs +36 -39
- package/dist/esm/src/Radio/RadioGroup/RadioGroup.mjs +30 -33
- package/dist/esm/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.mjs +29 -32
- package/dist/esm/src/RichTextEditor/RichTextContent/RichTextContent.mjs +32 -35
- package/dist/esm/src/RichTextEditor/RichTextEditor/RichTextEditor.mjs +101 -104
- package/dist/esm/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.mjs +32 -35
- package/dist/esm/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.mjs +38 -41
- package/dist/esm/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/ToolbarControls.mjs +4 -4
- package/dist/esm/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarSection/ToolbarSection.mjs +7 -10
- package/dist/esm/src/RichTextEditor/RichTextEditor/utils/controlmap.mjs +9 -9
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/components/LinkEditor/LinkEditor.mjs +49 -52
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/components/LinkModal/LinkModal.mjs +55 -58
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +42 -45
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/Positioner.mjs +42 -45
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/createReactTooltipWrapper.mjs +3 -3
- package/dist/esm/src/RichTextEditor/utils/plugins/LinkManager/validation.mjs +2 -2
- package/dist/esm/src/SearchField/SearchField.mjs +32 -35
- package/dist/esm/src/Select/Select.mjs +96 -102
- package/dist/esm/src/SingleSelect/SingleSelect.mjs +117 -120
- package/dist/esm/src/SingleSelect/context/SelectContext.mjs +3 -3
- package/dist/esm/src/SingleSelect/subcomponents/ListBox/ListBox.mjs +41 -44
- package/dist/esm/src/SingleSelect/subcomponents/ListBoxSection/ListBoxSection.mjs +27 -30
- package/dist/esm/src/SingleSelect/subcomponents/ListItem/ListItem.mjs +12 -15
- package/dist/esm/src/SingleSelect/subcomponents/ListItems/ListItems.mjs +11 -14
- package/dist/esm/src/SingleSelect/subcomponents/Option/Option.mjs +41 -44
- package/dist/esm/src/SingleSelect/subcomponents/Overlay/Overlay.mjs +31 -34
- package/dist/esm/src/SingleSelect/subcomponents/SectionDivider/SectionDivider.mjs +8 -11
- package/dist/esm/src/SingleSelect/subcomponents/SelectPopoverContents/SelectPopoverContents.mjs +24 -27
- package/dist/esm/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.mjs +32 -35
- package/dist/esm/src/SingleSelect/utils/transformSelectItemToCollectionElement.mjs +4 -4
- package/dist/esm/src/Slider/Slider.mjs +43 -46
- package/dist/esm/src/Table/Table.mjs +26 -26
- package/dist/esm/src/Tabs/Tabs.mjs +2 -2
- package/dist/esm/src/Tabs/subcomponents/Tab/Tab.mjs +4 -4
- package/dist/esm/src/Tabs/subcomponents/TabList/TabList.mjs +7 -7
- package/dist/esm/src/Tabs/subcomponents/TabPanel/TabPanel.mjs +2 -2
- package/dist/esm/src/Tag/Tag.mjs +83 -86
- package/dist/esm/src/Tag/subcomponents/LiveIcon/LiveIcon.mjs +42 -48
- package/dist/esm/src/TextArea/TextArea.mjs +43 -46
- package/dist/esm/src/TextAreaField/TextAreaField.mjs +65 -68
- package/dist/esm/src/TextField/TextField.mjs +65 -68
- package/dist/esm/src/Tile/InformationTile/InformationTile.mjs +5 -8
- package/dist/esm/src/Tile/MultiActionTile/MultiActionTile.mjs +15 -18
- package/dist/esm/src/Tile/TileGrid/TileGrid.mjs +20 -23
- package/dist/esm/src/Tile/subcomponents/GenericTile/GenericTile.mjs +116 -119
- package/dist/esm/src/TimeField/TimeField.mjs +82 -88
- package/dist/esm/src/TimeField/subcomponents/TimeSegment/TimeSegment.mjs +21 -24
- package/dist/esm/src/TitleBlock/TitleBlock.mjs +152 -155
- package/dist/esm/src/TitleBlock/subcomponents/MainActions.mjs +126 -129
- package/dist/esm/src/TitleBlock/subcomponents/NavigationTabs.mjs +21 -24
- package/dist/esm/src/TitleBlock/subcomponents/SecondaryActions.mjs +94 -97
- package/dist/esm/src/TitleBlock/subcomponents/TitleBlockMenuItem.mjs +23 -26
- package/dist/esm/src/TitleBlock/subcomponents/Toolbar.mjs +21 -24
- package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +27 -30
- package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.mjs +36 -39
- package/dist/esm/src/Tooltip/OverlayArrow.mjs +4 -4
- package/dist/esm/src/Tooltip/Tooltip.mjs +34 -37
- package/dist/esm/src/Tooltip/TooltipTrigger.mjs +2 -2
- package/dist/esm/src/TooltipV1/Tooltip.mjs +85 -88
- package/dist/esm/src/TooltipV1/subcomponents/AppearanceAnim.mjs +4 -4
- package/dist/esm/src/TooltipV1/utils/isSemanticElement.mjs +2 -2
- package/dist/esm/src/VisuallyHidden/VisuallyHidden.mjs +10 -13
- package/dist/esm/src/Well/Well.mjs +21 -24
- package/dist/esm/src/Workflow/Workflow.mjs +36 -39
- package/dist/esm/src/Workflow/subcomponents/Footer/Footer.mjs +21 -24
- package/dist/esm/src/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.mjs +11 -14
- package/dist/esm/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +48 -51
- package/dist/esm/src/Workflow/subcomponents/Footer/components/Root/Root.mjs +10 -13
- package/dist/esm/src/Workflow/subcomponents/Header/Header.mjs +18 -21
- package/dist/esm/src/Workflow/subcomponents/Header/components/Actions/Actions.mjs +13 -16
- package/dist/esm/src/Workflow/subcomponents/Header/components/Branding/Branding.mjs +14 -17
- package/dist/esm/src/Workflow/subcomponents/Header/components/Root/Root.mjs +10 -13
- package/dist/esm/src/Workflow/subcomponents/Header/components/Titles/Titles.mjs +26 -29
- package/dist/esm/src/Workflow/subcomponents/Main/Main.mjs +10 -13
- package/dist/esm/src/Workflow/subcomponents/Wrapper/Wrapper.mjs +10 -13
- package/dist/esm/src/__alpha__/SingleSelect/SingleSelect.mjs +21 -27
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBox/ComboBox.mjs +10 -10
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.mjs +10 -10
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/List/List.mjs +4 -4
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.mjs +10 -10
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.mjs +8 -8
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Popover/Popover.mjs +6 -6
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Select/Select.mjs +10 -10
- package/dist/esm/src/__alpha__/SingleSelect/subcomponents/SelectTrigger/SelectTrigger.mjs +6 -6
- package/dist/esm/src/__next__/Tag/RemovableTag/RemovableTag.mjs +16 -19
- package/dist/esm/src/__next__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +18 -21
- package/dist/esm/src/__next__/Tag/Tag/Tag.mjs +15 -18
- package/dist/esm/src/utils/ReversedColors/ReversedColors.mjs +4 -4
- package/dist/esm/src/utils/getNodeText.mjs +2 -2
- package/dist/esm/src/utils/useExitingAnimation/useExitingAnimation.mjs +2 -2
- package/dist/esm/src/utils/useMediaQueries.mjs +12 -12
- package/dist/styles.css +15 -15
- package/dist/types/Icon/CustomIcons.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -2
- package/src/Icon/CustomIcons.ts +8 -0
- package/src/Icon/_docs/Icon--api-specification.mdx +20 -0
- package/src/Icon/_docs/Icon--usage-guidelines.mdx +9 -0
- package/src/Icon/_docs/IconsCustom.stories.tsx +24 -0
- package/src/index.ts +1 -0
|
@@ -1,49 +1,46 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useFloating, autoUpdate, offset, flip, size } from '@floating-ui/react-dom';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { FocusOn } from 'react-focus-on';
|
|
7
7
|
import modules_ef8f756f from './Popover.module.scss.mjs';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Popover.displayName = 'Popover';
|
|
47
|
-
return Popover;
|
|
48
|
-
}();
|
|
8
|
+
var Popover = function (_a) {
|
|
9
|
+
var children = _a.children,
|
|
10
|
+
refs = _a.refs,
|
|
11
|
+
floatingOptions = _a.floatingOptions,
|
|
12
|
+
focusOnProps = _a.focusOnProps,
|
|
13
|
+
portalContainer = _a.portalContainer,
|
|
14
|
+
classNameOverride = _a.classNameOverride,
|
|
15
|
+
restProps = __rest(_a, ["children", "refs", "floatingOptions", "focusOnProps", "portalContainer", "classNameOverride"]);
|
|
16
|
+
var floatingStyles = useFloating(__assign({
|
|
17
|
+
elements: {
|
|
18
|
+
reference: refs.reference.current,
|
|
19
|
+
floating: refs.floating.current
|
|
20
|
+
},
|
|
21
|
+
placement: 'bottom-start',
|
|
22
|
+
middleware: [offset(6), flip(), size({
|
|
23
|
+
apply: function (_a) {
|
|
24
|
+
var availableWidth = _a.availableWidth,
|
|
25
|
+
availableHeight = _a.availableHeight,
|
|
26
|
+
elements = _a.elements;
|
|
27
|
+
Object.assign(elements.floating.style, {
|
|
28
|
+
maxWidth: "".concat(Math.min(availableWidth, 400), "px"),
|
|
29
|
+
minWidth: "".concat(Math.min(availableWidth, 196), "px"),
|
|
30
|
+
maxHeight: "".concat(Math.min(availableHeight, 352), "px")
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
})],
|
|
34
|
+
whileElementsMounted: autoUpdate
|
|
35
|
+
}, floatingOptions)).floatingStyles;
|
|
36
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(FocusOn, __assign({
|
|
37
|
+
enabled: false,
|
|
38
|
+
scrollLock: false
|
|
39
|
+
}, focusOnProps), /*#__PURE__*/React__default.createElement("div", __assign({
|
|
40
|
+
ref: refs.setFloating,
|
|
41
|
+
style: floatingStyles,
|
|
42
|
+
className: classnames(modules_ef8f756f.popover, classNameOverride)
|
|
43
|
+
}, restProps), children)), portalContainer !== null && portalContainer !== void 0 ? portalContainer : document.body);
|
|
44
|
+
};
|
|
45
|
+
Popover.displayName = 'Popover';
|
|
49
46
|
export { Popover };
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { GenericNotification } from '../subcomponents/GenericNotification/GenericNotification.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082060757/Global+Notification Guidance} |
|
|
7
7
|
* {@link https://cultureamp.design/?path=/docs/components-notifications-global-notification--docs Storybook}
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
GlobalNotification.displayName = 'GlobalNotification';
|
|
20
|
-
return GlobalNotification;
|
|
21
|
-
}();
|
|
9
|
+
var GlobalNotification = function (_a) {
|
|
10
|
+
var _b = _a.persistent,
|
|
11
|
+
persistent = _b === void 0 ? false : _b,
|
|
12
|
+
props = __rest(_a, ["persistent"]);
|
|
13
|
+
return /*#__PURE__*/React__default.createElement(GenericNotification, __assign({
|
|
14
|
+
persistent: persistent,
|
|
15
|
+
style: "global"
|
|
16
|
+
}, props));
|
|
17
|
+
};
|
|
18
|
+
GlobalNotification.displayName = 'GlobalNotification';
|
|
22
19
|
export { GlobalNotification };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { GenericNotification } from '../subcomponents/GenericNotification/GenericNotification.mjs';
|
|
5
5
|
import modules_f5422433 from '../subcomponents/GenericNotification/GenericNotification.module.css.mjs';
|
|
@@ -8,23 +8,20 @@ import modules_f5422433 from '../subcomponents/GenericNotification/GenericNotifi
|
|
|
8
8
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093392/Inline+Notification Guidance} |
|
|
9
9
|
* {@link https://cultureamp.design/storybook/?path=/docs/components-notifications-inline-notification--docs Storybook}
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
InlineNotification.displayName = 'InlineNotification';
|
|
28
|
-
return InlineNotification;
|
|
29
|
-
}();
|
|
11
|
+
var InlineNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
12
|
+
var isSubtle = _a.isSubtle,
|
|
13
|
+
_b = _a.hideCloseIcon,
|
|
14
|
+
hideCloseIcon = _b === void 0 ? false : _b,
|
|
15
|
+
_c = _a.persistent,
|
|
16
|
+
persistent = _c === void 0 ? false : _c,
|
|
17
|
+
classNameOverride = _a.classNameOverride,
|
|
18
|
+
otherProps = __rest(_a, ["isSubtle", "hideCloseIcon", "persistent", "classNameOverride"]);
|
|
19
|
+
return /*#__PURE__*/React__default.createElement(GenericNotification, __assign({
|
|
20
|
+
style: "inline",
|
|
21
|
+
persistent: persistent || hideCloseIcon,
|
|
22
|
+
classNameOverride: classnames(classNameOverride, [isSubtle && modules_f5422433.subtle]),
|
|
23
|
+
ref: ref
|
|
24
|
+
}, otherProps));
|
|
25
|
+
});
|
|
26
|
+
InlineNotification.displayName = 'InlineNotification';
|
|
30
27
|
export { InlineNotification };
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
import { useToastNotificationContext } from '../context/ToastNotificationContext.mjs';
|
|
3
3
|
import { ToastNotificationsMap } from './subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs';
|
|
4
4
|
import modules_63d016d9 from './ToastNotificationsList.module.css.mjs';
|
|
5
5
|
var toastNotificationListId = 'toast-notifications-list';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ToastNotificationsList.displayName = 'ToastNotificationsList';
|
|
33
|
-
return ToastNotificationsList;
|
|
34
|
-
}();
|
|
6
|
+
var ToastNotificationsList = function () {
|
|
7
|
+
var _a = useToastNotificationContext(),
|
|
8
|
+
notifications = _a.notifications,
|
|
9
|
+
removeToastNotification = _a.removeToastNotification;
|
|
10
|
+
var _b = useState(null),
|
|
11
|
+
toastContainer = _b[0],
|
|
12
|
+
setToastContainer = _b[1];
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
// this is to ensure that the container is created only once. Regardless of how many KaizenProvider is set up, they will also reuse the same container.
|
|
15
|
+
var container = document.querySelector("[id=\"".concat(toastNotificationListId, "\"]"));
|
|
16
|
+
if (!container) {
|
|
17
|
+
container = document.createElement('div');
|
|
18
|
+
container.setAttribute('id', toastNotificationListId);
|
|
19
|
+
container.setAttribute('role', 'status');
|
|
20
|
+
container.className = modules_63d016d9.toastNotificationsList;
|
|
21
|
+
document.body.appendChild(container);
|
|
22
|
+
}
|
|
23
|
+
setToastContainer(container);
|
|
24
|
+
}, []);
|
|
25
|
+
return toastContainer ? (/*#__PURE__*/React__default.createElement(ToastNotificationsMap, {
|
|
26
|
+
notifications: notifications,
|
|
27
|
+
onHide: removeToastNotification,
|
|
28
|
+
container: toastContainer
|
|
29
|
+
})) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null));
|
|
30
|
+
};
|
|
31
|
+
ToastNotificationsList.displayName = 'ToastNotificationsList';
|
|
35
32
|
export { ToastNotificationsList };
|
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { GenericNotification } from '../../../../subcomponents/GenericNotification/GenericNotification.mjs';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onHide
|
|
26
|
-
|
|
27
|
-
onHide();
|
|
28
|
-
}
|
|
29
|
-
defaultOnHide(id);
|
|
5
|
+
var ToastNotificationsMap = function (_a) {
|
|
6
|
+
var notifications = _a.notifications,
|
|
7
|
+
defaultOnHide = _a.onHide,
|
|
8
|
+
container = _a.container;
|
|
9
|
+
if (!container) return null;
|
|
10
|
+
// To consolidate all notifications into a single list when there are multiple contexts,
|
|
11
|
+
// this list cannot render with a container (must be portalled into one).
|
|
12
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(React__default.Fragment, null, notifications.map(function (_a) {
|
|
13
|
+
var id = _a.id,
|
|
14
|
+
title = _a.title,
|
|
15
|
+
persistent = _a.persistent,
|
|
16
|
+
onHide = _a.onHide,
|
|
17
|
+
message = _a.message,
|
|
18
|
+
restProps = __rest(_a, ["id", "title", "persistent", "onHide", "message"]);
|
|
19
|
+
return /*#__PURE__*/React__default.createElement(GenericNotification, __assign({
|
|
20
|
+
key: id,
|
|
21
|
+
style: "toast",
|
|
22
|
+
title: title,
|
|
23
|
+
persistent: persistent,
|
|
24
|
+
onHide: function () {
|
|
25
|
+
if (typeof onHide !== 'undefined') {
|
|
26
|
+
onHide();
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
defaultOnHide(id);
|
|
29
|
+
}
|
|
30
|
+
}, restProps), message);
|
|
31
|
+
})), container);
|
|
32
|
+
};
|
|
33
|
+
ToastNotificationsMap.displayName = 'ToastNotificationsMap';
|
|
37
34
|
export { ToastNotificationsMap };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __spreadArray } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useState, useContext } from 'react';
|
|
3
3
|
import { v4 } from 'uuid';
|
|
4
|
-
var ToastNotificationContext = /*#__PURE__*/
|
|
4
|
+
var ToastNotificationContext = /*#__PURE__*/React__default.createContext(null);
|
|
5
5
|
var useToastNotificationContext = function () {
|
|
6
6
|
var context = useContext(ToastNotificationContext);
|
|
7
7
|
if (!context) {
|
|
@@ -9,57 +9,54 @@ var useToastNotificationContext = function () {
|
|
|
9
9
|
}
|
|
10
10
|
return context;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var notificationExists = existing.find(function (_a) {
|
|
25
|
-
var id = _a.id;
|
|
26
|
-
return id === notification.id;
|
|
27
|
-
});
|
|
28
|
-
return notificationExists ? existing : __spreadArray(__spreadArray([], existing, true), [notificationWithId], false);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
var updateToastNotification = function (notification) {
|
|
32
|
-
var notificationIndex = notifications.findIndex(function (_a) {
|
|
12
|
+
var ToastNotificationProvider = function (_a) {
|
|
13
|
+
var children = _a.children;
|
|
14
|
+
var _b = useState([]),
|
|
15
|
+
notifications = _b[0],
|
|
16
|
+
setNotifications = _b[1];
|
|
17
|
+
var addToastNotification = function (notification) {
|
|
18
|
+
var uuid = v4();
|
|
19
|
+
var notificationWithId = __assign({
|
|
20
|
+
id: uuid
|
|
21
|
+
}, notification);
|
|
22
|
+
setNotifications(function (existing) {
|
|
23
|
+
var notificationExists = existing.find(function (_a) {
|
|
33
24
|
var id = _a.id;
|
|
34
25
|
return id === notification.id;
|
|
35
26
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
return notificationExists ? existing : __spreadArray(__spreadArray([], existing, true), [notificationWithId], false);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var updateToastNotification = function (notification) {
|
|
31
|
+
var notificationIndex = notifications.findIndex(function (_a) {
|
|
32
|
+
var id = _a.id;
|
|
33
|
+
return id === notification.id;
|
|
34
|
+
});
|
|
35
|
+
var copy = notifications.slice();
|
|
36
|
+
copy.splice(notificationIndex, 1, notification); // Mutation to insert notification over itself
|
|
37
|
+
setNotifications(copy);
|
|
38
|
+
};
|
|
39
|
+
var removeToastNotification = function (notificationID) {
|
|
40
|
+
setNotifications(function (prev) {
|
|
41
|
+
return prev.filter(function (_a) {
|
|
42
|
+
var id = _a.id;
|
|
43
|
+
return id !== notificationID;
|
|
46
44
|
});
|
|
47
|
-
};
|
|
48
|
-
var clearToastNotifications = function () {
|
|
49
|
-
setNotifications([]);
|
|
50
|
-
};
|
|
51
|
-
var value = {
|
|
52
|
-
notifications: notifications,
|
|
53
|
-
addToastNotification: addToastNotification,
|
|
54
|
-
updateToastNotification: updateToastNotification,
|
|
55
|
-
removeToastNotification: removeToastNotification,
|
|
56
|
-
clearToastNotifications: clearToastNotifications
|
|
57
|
-
};
|
|
58
|
-
return /*#__PURE__*/React.createElement(ToastNotificationContext.Provider, {
|
|
59
|
-
value: value
|
|
60
|
-
}, children);
|
|
45
|
+
});
|
|
61
46
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
47
|
+
var clearToastNotifications = function () {
|
|
48
|
+
setNotifications([]);
|
|
49
|
+
};
|
|
50
|
+
var value = {
|
|
51
|
+
notifications: notifications,
|
|
52
|
+
addToastNotification: addToastNotification,
|
|
53
|
+
updateToastNotification: updateToastNotification,
|
|
54
|
+
removeToastNotification: removeToastNotification,
|
|
55
|
+
clearToastNotifications: clearToastNotifications
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/React__default.createElement(ToastNotificationContext.Provider, {
|
|
58
|
+
value: value
|
|
59
|
+
}, children);
|
|
60
|
+
};
|
|
61
|
+
ToastNotificationProvider.displayName = 'ToastNotificationProvider';
|
|
65
62
|
export { ToastNotificationProvider, useToastNotificationContext };
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { Icon } from '../../../Icon/Icon.mjs';
|
|
3
3
|
import modules_f5422433 from '../GenericNotification/GenericNotification.module.css.mjs';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
CancelButton.displayName = 'CancelButton';
|
|
19
|
-
return CancelButton;
|
|
20
|
-
}();
|
|
4
|
+
var CancelButton = function (_a) {
|
|
5
|
+
var onClick = _a.onClick;
|
|
6
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
7
|
+
className: modules_f5422433.cancel,
|
|
8
|
+
type: "button",
|
|
9
|
+
onClick: onClick,
|
|
10
|
+
"data-testid": "close-button",
|
|
11
|
+
"aria-label": "Close notification"
|
|
12
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
13
|
+
name: "close",
|
|
14
|
+
isPresentational: true
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
CancelButton.displayName = 'CancelButton';
|
|
21
18
|
export { CancelButton };
|
|
@@ -1,81 +1,78 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { isRefObject } from '../../../utils/isRefObject.mjs';
|
|
5
5
|
import { CancelButton } from '../CancelButton/CancelButton.mjs';
|
|
6
6
|
import { NotificationHeading } from '../NotificationHeading/NotificationHeading.mjs';
|
|
7
7
|
import { NotificationIconVariant } from '../NotificationIcon/NotificationIcon.mjs';
|
|
8
8
|
import modules_f5422433 from './GenericNotification.module.css.mjs';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setIsHidden(false);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}, [containerRef]);
|
|
38
|
-
var getMarginTop = function () {
|
|
39
|
-
if (isHidden && containerRef.current) {
|
|
40
|
-
return -containerRef.current.clientHeight + 'px';
|
|
9
|
+
var GenericNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
10
|
+
var variant = _a.variant,
|
|
11
|
+
style = _a.style,
|
|
12
|
+
children = _a.children,
|
|
13
|
+
title = _a.title,
|
|
14
|
+
_b = _a.persistent,
|
|
15
|
+
persistent = _b === void 0 ? false : _b,
|
|
16
|
+
onHide = _a.onHide,
|
|
17
|
+
noBottomMargin = _a.noBottomMargin,
|
|
18
|
+
forceMultiline = _a.forceMultiline,
|
|
19
|
+
headingProps = _a.headingProps,
|
|
20
|
+
classNameOverride = _a.classNameOverride,
|
|
21
|
+
restProps = __rest(_a, ["variant", "style", "children", "title", "persistent", "onHide", "noBottomMargin", "forceMultiline", "headingProps", "classNameOverride"]);
|
|
22
|
+
var _c = useState(true),
|
|
23
|
+
isHidden = _c[0],
|
|
24
|
+
setIsHidden = _c[1];
|
|
25
|
+
var _d = useState(false),
|
|
26
|
+
isRemoved = _d[0],
|
|
27
|
+
setIsRemoved = _d[1];
|
|
28
|
+
var fallbackRef = useRef(null);
|
|
29
|
+
var containerRef = isRefObject(ref) ? ref : fallbackRef;
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
requestAnimationFrame(function () {
|
|
32
|
+
if (containerRef.current) {
|
|
33
|
+
setIsHidden(false);
|
|
41
34
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
setIsRemoved(true);
|
|
48
|
-
onHide === null || onHide === void 0 ? void 0 : onHide();
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
if (isRemoved) {
|
|
52
|
-
return null;
|
|
35
|
+
});
|
|
36
|
+
}, [containerRef]);
|
|
37
|
+
var getMarginTop = function () {
|
|
38
|
+
if (isHidden && containerRef.current) {
|
|
39
|
+
return -containerRef.current.clientHeight + 'px';
|
|
53
40
|
}
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
41
|
+
return '0';
|
|
42
|
+
};
|
|
43
|
+
var onTransitionEnd = function (e) {
|
|
44
|
+
// Be careful: this assumes the final CSS property to be animated is "margin-top".
|
|
45
|
+
if (isHidden && e.propertyName === 'margin-top') {
|
|
46
|
+
setIsRemoved(true);
|
|
47
|
+
onHide === null || onHide === void 0 ? void 0 : onHide();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
if (isRemoved) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/React__default.createElement("div", __assign({
|
|
54
|
+
ref: containerRef,
|
|
55
|
+
className: classnames(modules_f5422433.notification, modules_f5422433[variant], modules_f5422433[style], isHidden && modules_f5422433.hidden, noBottomMargin && modules_f5422433.noBottomMargin, classNameOverride, persistent && modules_f5422433.persistent),
|
|
56
|
+
style: {
|
|
57
|
+
marginTop: getMarginTop()
|
|
58
|
+
},
|
|
59
|
+
onTransitionEnd: onTransitionEnd
|
|
60
|
+
}, restProps), /*#__PURE__*/React__default.createElement("div", {
|
|
61
|
+
className: modules_f5422433.icon
|
|
62
|
+
}, /*#__PURE__*/React__default.createElement(NotificationIconVariant, {
|
|
63
|
+
variant: variant
|
|
64
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
65
|
+
className: classnames(modules_f5422433.textContainer, forceMultiline && modules_f5422433.forceMultiline)
|
|
66
|
+
}, style !== 'global' && (/*#__PURE__*/React__default.createElement(NotificationHeading, {
|
|
67
|
+
titleProp: title,
|
|
68
|
+
headingProps: headingProps
|
|
69
|
+
})), children && /*#__PURE__*/React__default.createElement("div", {
|
|
70
|
+
className: modules_f5422433.text
|
|
71
|
+
}, children)), !persistent && /*#__PURE__*/React__default.createElement(CancelButton, {
|
|
72
|
+
onClick: function () {
|
|
73
|
+
return setIsHidden(true);
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
GenericNotification.displayName = 'GenericNotification';
|
|
81
78
|
export { GenericNotification };
|