@moda/om 16.1.1 → 16.3.0
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/CHANGELOG.md +21 -0
- package/dist/index.cjs.js +344 -297
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +343 -296
- package/dist/index.esm.js.map +1 -1
- package/dist/{__mocks__ → src/__mocks__}/Icon.d.ts +0 -0
- package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.d.ts +0 -0
- package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.stories.d.ts +0 -0
- package/dist/{components → src/components}/AspectRatioBox/AspectRatioBox.test.d.ts +0 -0
- package/dist/{components → src/components}/AspectRatioBox/index.d.ts +0 -0
- package/dist/{components → src/components}/Badge/Badge.d.ts +0 -0
- package/dist/{components → src/components}/Badge/Badge.stories.d.ts +0 -0
- package/dist/{components → src/components}/Badge/Badge.test.d.ts +0 -0
- package/dist/{components → src/components}/Badge/index.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumb/Breadcrumb.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumb/index.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.test.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/index.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/Breakpoint.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/Breakpoint.stories.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/Breakpoint.test.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/BreakpointProvider.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/generateMediaQuery.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/generateMediaQuery.test.d.ts +0 -0
- package/dist/{components → src/components}/Breakpoint/index.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.stories.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.test.d.ts +0 -0
- package/dist/{components → src/components}/Button/index.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.stories.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.test.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/index.d.ts +0 -0
- package/dist/{components → src/components}/Clickable/Clickable.d.ts +0 -0
- package/dist/{components → src/components}/Clickable/Clickable.stories.d.ts +0 -0
- package/dist/{components → src/components}/Clickable/Clickable.test.d.ts +0 -0
- package/dist/{components → src/components}/Clickable/index.d.ts +0 -0
- package/dist/{components → src/components}/ColorSwatch/ColorSwatch.d.ts +0 -0
- package/dist/{components → src/components}/ColorSwatch/ColorSwatch.stories.d.ts +0 -0
- package/dist/{components → src/components}/ColorSwatch/ColorSwatch.test.d.ts +0 -0
- package/dist/{components → src/components}/ColorSwatch/index.d.ts +0 -0
- package/dist/{components → src/components}/ColorSwatch/skuColors.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/Constrain.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/Constrain.stories.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/Constrain.test.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/ExceedConstrain.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/ExceedConstrain.stories.d.ts +0 -0
- package/dist/{components → src/components}/Constrain/index.d.ts +0 -0
- package/dist/{components → src/components}/ControlLink/ControlLink.d.ts +0 -0
- package/dist/{components → src/components}/ControlLink/ControlLink.stories.d.ts +0 -0
- package/dist/{components → src/components}/ControlLink/ControlLink.test.d.ts +0 -0
- package/dist/{components → src/components}/ControlLink/index.d.ts +0 -0
- package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.d.ts +0 -0
- package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.stories.d.ts +0 -0
- package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInput.test.d.ts +0 -0
- package/dist/{components → src/components}/CreditCardNumberInput/CreditCardNumberInputField.d.ts +0 -0
- package/dist/{components → src/components}/CreditCardNumberInput/index.d.ts +0 -0
- package/dist/{components → src/components}/DefinitionList/DefinitionList.d.ts +0 -0
- package/dist/{components → src/components}/DefinitionList/DefinitionList.stories.d.ts +0 -0
- package/dist/{components → src/components}/DefinitionList/DefinitionList.test.d.ts +0 -0
- package/dist/{components → src/components}/DefinitionList/index.d.ts +0 -0
- package/dist/{components → src/components}/Divider/Divider.d.ts +0 -0
- package/dist/{components → src/components}/Divider/Divider.stories.d.ts +0 -0
- package/dist/{components → src/components}/Divider/Divider.test.d.ts +0 -0
- package/dist/{components → src/components}/Divider/NoLineDivider.d.ts +0 -0
- package/dist/{components → src/components}/Divider/TwoLineDivider.d.ts +0 -0
- package/dist/{components → src/components}/Divider/index.d.ts +0 -0
- package/dist/{components → src/components}/Expandable/Expandable.d.ts +0 -0
- package/dist/{components → src/components}/Expandable/Expandable.stories.d.ts +0 -0
- package/dist/{components → src/components}/Expandable/Expandable.test.d.ts +0 -0
- package/dist/{components → src/components}/Expandable/index.d.ts +0 -0
- package/dist/{components → src/components}/Field/Field.d.ts +0 -0
- package/dist/{components → src/components}/Field/Field.stories.d.ts +0 -0
- package/dist/{components → src/components}/Field/Field.test.d.ts +0 -0
- package/dist/{components → src/components}/Field/index.d.ts +0 -0
- package/dist/{components → src/components}/Label/Label.d.ts +0 -0
- package/dist/{components → src/components}/Label/Label.stories.d.ts +0 -0
- package/dist/{components → src/components}/Label/Label.test.d.ts +0 -0
- package/dist/{components → src/components}/Label/index.d.ts +0 -0
- package/dist/{components → src/components}/Loading/Loading.d.ts +0 -0
- package/dist/{components → src/components}/Loading/Loading.stories.d.ts +0 -0
- package/dist/{components → src/components}/Loading/Loading.test.d.ts +0 -0
- package/dist/{components → src/components}/Loading/index.d.ts +0 -0
- package/dist/{components → src/components}/LoadingBalls/LoadingBalls.d.ts +0 -0
- package/dist/{components → src/components}/LoadingBalls/LoadingBalls.stories.d.ts +0 -0
- package/dist/{components → src/components}/LoadingBalls/index.d.ts +0 -0
- package/dist/{components → src/components}/Modal/Modal.d.ts +0 -0
- package/dist/{components → src/components}/Modal/Modal.stories.d.ts +0 -0
- package/dist/{components → src/components}/Modal/Modal.test.d.ts +0 -0
- package/dist/{components → src/components}/Modal/index.d.ts +0 -0
- package/dist/{components → src/components}/ModalOverlay/ModalOverlay.d.ts +0 -0
- package/dist/{components → src/components}/ModalOverlay/ModalOverlay.stories.d.ts +0 -0
- package/dist/{components → src/components}/ModalOverlay/ModalOverlay.test.d.ts +0 -0
- package/dist/{components → src/components}/ModalOverlay/index.d.ts +0 -0
- package/dist/{components → src/components}/Overlay/Overlay.d.ts +0 -0
- package/dist/{components → src/components}/Overlay/Overlay.stories.d.ts +0 -0
- package/dist/{components → src/components}/Overlay/Overlay.test.d.ts +0 -0
- package/dist/{components → src/components}/Overlay/index.d.ts +0 -0
- package/dist/{components → src/components}/Paginator/Paginator.d.ts +0 -0
- package/dist/{components → src/components}/Paginator/Paginator.stories.d.ts +0 -0
- package/dist/{components → src/components}/Paginator/index.d.ts +0 -0
- package/dist/{components → src/components}/PasswordInput/PasswordInput.d.ts +0 -0
- package/dist/{components → src/components}/PasswordInput/PasswordInput.stories.d.ts +0 -0
- package/dist/{components → src/components}/PasswordInput/index.d.ts +0 -0
- package/dist/{components → src/components}/Popover/Popover.d.ts +0 -0
- package/dist/{components → src/components}/Popover/Popover.stories.d.ts +0 -0
- package/dist/{components → src/components}/Popover/Popover.test.d.ts +0 -0
- package/dist/{components → src/components}/Popover/index.d.ts +0 -0
- package/dist/{components → src/components}/PromoBanner/PromoBanner.d.ts +0 -0
- package/dist/{components → src/components}/PromoBanner/PromoBanner.stories.d.ts +0 -0
- package/dist/{components → src/components}/PromoBanner/PromoBanner.test.d.ts +0 -0
- package/dist/{components → src/components}/PromoBanner/index.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.stories.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.test.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/index.d.ts +0 -0
- package/dist/{components → src/components}/SearchInput/SearchInput.d.ts +0 -0
- package/dist/{components → src/components}/SearchInput/SearchInput.stories.d.ts +0 -0
- package/dist/{components → src/components}/SearchInput/SearchInput.test.d.ts +0 -0
- package/dist/{components → src/components}/SearchInput/index.d.ts +0 -0
- package/dist/{components → src/components}/Select/MultiSelect.d.ts +0 -0
- package/dist/{components → src/components}/Select/Select.d.ts +1 -0
- package/dist/{components → src/components}/Select/Select.stories.d.ts +0 -0
- package/dist/{components → src/components}/Select/Select.test.d.ts +0 -0
- package/dist/{components → src/components}/Select/SelectLabel.d.ts +0 -0
- package/dist/{components → src/components}/Select/SelectOption.d.ts +1 -0
- package/dist/{components → src/components}/Select/SelectOptions.d.ts +1 -0
- package/dist/{components → src/components}/Select/index.d.ts +0 -0
- package/dist/{components → src/components}/Select/useSelect.d.ts +0 -0
- package/dist/{components → src/components}/SelectableButton/SelectableButton.d.ts +0 -0
- package/dist/{components → src/components}/SelectableButton/SelectableButton.stories.d.ts +0 -0
- package/dist/{components → src/components}/SelectableButton/SelectableButton.test.d.ts +0 -0
- package/dist/{components → src/components}/SelectableButton/index.d.ts +0 -0
- package/dist/{components → src/components}/Shape/ArcWindow.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Bradley.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Brancusi.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Circle.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Diamond.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Keyhole.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Mirror.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Oval.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Shape.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Shape.stories.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Triangle.d.ts +0 -0
- package/dist/{components → src/components}/Shape/Window.d.ts +0 -0
- package/dist/{components → src/components}/Shape/index.d.ts +0 -0
- package/dist/{components → src/components}/Stack/Stack.d.ts +0 -0
- package/dist/{components → src/components}/Stack/Stack.stories.d.ts +0 -0
- package/dist/{components → src/components}/Stack/Stack.test.d.ts +0 -0
- package/dist/{components → src/components}/Stack/index.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/Tab.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/TabList.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/TabPanel.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/TabPanels.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/Tabs.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/Tabs.stories.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/Tabs.test.d.ts +0 -0
- package/dist/{components → src/components}/Tabs/index.d.ts +0 -0
- package/dist/{components → src/components}/Tag/Tag.d.ts +0 -0
- package/dist/{components → src/components}/Tag/Tag.stories.d.ts +0 -0
- package/dist/{components → src/components}/Tag/Tag.test.d.ts +0 -0
- package/dist/{components → src/components}/Tag/index.d.ts +0 -0
- package/dist/{components → src/components}/Text/Text.d.ts +0 -0
- package/dist/{components → src/components}/Text/Text.stories.d.ts +0 -0
- package/dist/{components → src/components}/Text/Text.test.d.ts +0 -0
- package/dist/{components → src/components}/Text/index.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/TextInput.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/TextInput.stories.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/TextInput.test.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/index.d.ts +0 -0
- package/dist/{components → src/components}/Textarea/Textarea.d.ts +0 -0
- package/dist/{components → src/components}/Textarea/Textarea.stories.d.ts +0 -0
- package/dist/{components → src/components}/Textarea/Textarea.test.d.ts +0 -0
- package/dist/{components → src/components}/Textarea/index.d.ts +0 -0
- package/dist/{components → src/components}/Toast/Toast.d.ts +0 -0
- package/dist/{components → src/components}/Toast/Toast.stories.d.ts +0 -0
- package/dist/{components → src/components}/Toast/Toast.test.d.ts +0 -0
- package/dist/{components → src/components}/Toast/index.d.ts +0 -0
- package/dist/{components → src/components}/VerticalDivider/VerticalDivider.d.ts +0 -0
- package/dist/{components → src/components}/VerticalDivider/VerticalDivider.stories.d.ts +0 -0
- package/dist/{components → src/components}/VerticalDivider/VerticalDivider.test.d.ts +0 -0
- package/dist/{components → src/components}/VerticalDivider/index.d.ts +0 -0
- package/dist/{components → src/components}/index.d.ts +0 -0
- package/dist/{hooks → src/hooks}/index.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useBreakpoint.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useClickOutside.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useKeyboardListNavigation.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useKeyboardListNavigation.spec.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useUpdateEffect.d.ts +0 -0
- package/dist/{index.d.ts → src/index.d.ts} +0 -0
- package/dist/{mixins → src/mixins}/font-smoothing/font-smoothing.stories.d.ts +0 -0
- package/dist/{mixins → src/mixins}/overflow-scroll/overflow-scroll.stories.d.ts +0 -0
- package/dist/{mixins → src/mixins}/stack/stack.stories.d.ts +0 -0
- package/dist/{mixins → src/mixins}/thin-underline/thin-underline.stories.d.ts +0 -0
- package/dist/{mixins → src/mixins}/visually-hidden/visually-hidden.stories.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/State.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/States.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/StatesProps.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/index.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/isRenderProps.d.ts +0 -0
- package/dist/{utilities → src/utilities}/States/stringifyProps.d.ts +0 -0
- package/dist/{utilities → src/utilities}/index.d.ts +0 -0
- package/dist/{utilities → src/utilities}/omit.d.ts +0 -0
- package/dist/{utilities → src/utilities}/sample.d.ts +0 -0
- package/dist/styles.css +1 -1
- package/dist/test/mocks/matchMedia.d.ts +1 -0
- package/dist/test/setupTests.d.ts +3 -0
- package/package.json +30 -19
- package/src/components/AspectRatioBox/AspectRatioBox.test.tsx +3 -3
- package/src/components/AspectRatioBox/AspectRatioBox.tsx +4 -4
- package/src/components/AspectRatioBox/index.ts +1 -1
- package/src/components/Badge/Badge.stories.tsx +5 -5
- package/src/components/Badge/Badge.test.tsx +5 -12
- package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.tsx +6 -6
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +6 -6
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +7 -7
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Breakpoint/Breakpoint.stories.tsx +10 -9
- package/src/components/Breakpoint/Breakpoint.test.tsx +7 -8
- package/src/components/Breakpoint/generateMediaQuery.ts +5 -4
- package/src/components/Button/Button.stories.tsx +4 -4
- package/src/components/Button/Button.test.tsx +14 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +5 -5
- package/src/components/Checkbox/Checkbox.test.tsx +12 -14
- package/src/components/Checkbox/Checkbox.tsx +4 -4
- package/src/components/Clickable/Clickable.stories.tsx +3 -3
- package/src/components/Clickable/Clickable.test.tsx +3 -3
- package/src/components/ColorSwatch/ColorSwatch.stories.tsx +11 -11
- package/src/components/ColorSwatch/ColorSwatch.test.tsx +3 -5
- package/src/components/ColorSwatch/ColorSwatch.tsx +1 -1
- package/src/components/Constrain/Constrain.stories.tsx +1 -1
- package/src/components/Constrain/Constrain.test.tsx +4 -4
- package/src/components/Constrain/ExceedConstrain.stories.tsx +2 -2
- package/src/components/ControlLink/ControlLink.stories.tsx +1 -1
- package/src/components/ControlLink/ControlLink.test.tsx +10 -12
- package/src/components/ControlLink/index.ts +1 -1
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.stories.tsx +1 -1
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.test.tsx +16 -16
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.tsx +1 -0
- package/src/components/DefinitionList/DefinitionList.stories.tsx +3 -3
- package/src/components/DefinitionList/DefinitionList.test.tsx +4 -3
- package/src/components/Divider/Divider.stories.tsx +4 -4
- package/src/components/Divider/Divider.test.tsx +5 -4
- package/src/components/Divider/Divider.tsx +1 -1
- package/src/components/Divider/NoLineDivider.tsx +1 -1
- package/src/components/Divider/TwoLineDivider.tsx +1 -1
- package/src/components/Expandable/Expandable.stories.tsx +8 -8
- package/src/components/Expandable/Expandable.test.tsx +17 -6
- package/src/components/Expandable/Expandable.tsx +3 -2
- package/src/components/Field/Field.stories.tsx +4 -4
- package/src/components/Field/Field.test.tsx +25 -34
- package/src/components/Field/Field.tsx +5 -5
- package/src/components/Field/index.ts +1 -0
- package/src/components/Label/Label.test.tsx +3 -3
- package/src/components/Loading/Loading.test.tsx +3 -5
- package/src/components/Loading/Loading.tsx +2 -1
- package/src/components/Modal/Modal.test.tsx +8 -9
- package/src/components/ModalOverlay/ModalOverlay.test.tsx +11 -11
- package/src/components/ModalOverlay/ModalOverlay.tsx +2 -2
- package/src/components/Overlay/Overlay.stories.tsx +1 -1
- package/src/components/Overlay/Overlay.test.tsx +3 -3
- package/src/components/Paginator/Paginator.tsx +3 -3
- package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.tsx +6 -6
- package/src/components/Popover/Popover.stories.tsx +1 -1
- package/src/components/Popover/Popover.test.tsx +9 -6
- package/src/components/Popover/Popover.tsx +10 -7
- package/src/components/PromoBanner/PromoBanner.stories.tsx +9 -9
- package/src/components/PromoBanner/PromoBanner.test.tsx +3 -3
- package/src/components/PromoBanner/PromoBanner.tsx +1 -1
- package/src/components/RadioButton/RadioButton.stories.tsx +2 -2
- package/src/components/RadioButton/RadioButton.test.tsx +6 -10
- package/src/components/RadioButton/RadioButton.tsx +4 -4
- package/src/components/SearchInput/SearchInput.stories.tsx +2 -2
- package/src/components/SearchInput/SearchInput.test.tsx +10 -6
- package/src/components/SearchInput/SearchInput.tsx +3 -3
- package/src/components/Select/MultiSelect.tsx +7 -7
- package/src/components/Select/Select.stories.tsx +17 -15
- package/src/components/Select/Select.test.tsx +21 -21
- package/src/components/Select/Select.tsx +17 -8
- package/src/components/Select/SelectOption.tsx +5 -2
- package/src/components/Select/SelectOptions.tsx +8 -5
- package/src/components/SelectableButton/SelectableButton.stories.tsx +1 -1
- package/src/components/SelectableButton/SelectableButton.test.tsx +3 -3
- package/src/components/Shape/ArcWindow.tsx +10 -10
- package/src/components/Shape/Bradley.tsx +4 -4
- package/src/components/Shape/Brancusi.tsx +4 -4
- package/src/components/Shape/Circle.tsx +10 -10
- package/src/components/Shape/Diamond.tsx +10 -10
- package/src/components/Shape/Keyhole.tsx +4 -4
- package/src/components/Shape/Mirror.tsx +4 -4
- package/src/components/Shape/Oval.tsx +4 -4
- package/src/components/Shape/Triangle.tsx +7 -7
- package/src/components/Shape/Window.tsx +4 -4
- package/src/components/Stack/Stack.stories.tsx +3 -3
- package/src/components/Stack/Stack.test.tsx +7 -5
- package/src/components/Tabs/TabList.tsx +1 -1
- package/src/components/Tabs/TabPanel.tsx +1 -1
- package/src/components/Tabs/TabPanels.tsx +1 -1
- package/src/components/Tabs/Tabs.stories.tsx +2 -2
- package/src/components/Tabs/Tabs.test.tsx +6 -7
- package/src/components/Tabs/Tabs.tsx +7 -1
- package/src/components/Tag/Tag.test.tsx +1 -1
- package/src/components/Tag/Tag.tsx +6 -5
- package/src/components/Text/Text.stories.tsx +5 -5
- package/src/components/Text/Text.test.tsx +4 -6
- package/src/components/TextInput/TextInput.stories.tsx +1 -1
- package/src/components/TextInput/TextInput.test.tsx +4 -5
- package/src/components/Textarea/Textarea.stories.tsx +1 -1
- package/src/components/Textarea/Textarea.test.tsx +11 -16
- package/src/components/Toast/Toast.stories.tsx +1 -1
- package/src/components/Toast/Toast.test.tsx +2 -2
- package/src/components/Toast/Toast.tsx +6 -6
- package/src/components/VerticalDivider/VerticalDivider.stories.tsx +3 -3
- package/src/components/VerticalDivider/VerticalDivider.test.tsx +6 -7
- package/src/hooks/useKeyboardListNavigation.spec.ts +26 -64
- package/src/hooks/useKeyboardListNavigation.ts +2 -0
- package/src/hooks/useUpdateEffect.ts +1 -0
- package/src/index.ts +2 -2
- package/src/mixins/font-smoothing/font-smoothing.stories.tsx +8 -8
- package/src/mixins/overflow-scroll/overflow-scroll.stories.tsx +2 -2
- package/src/mixins/stack/stack.stories.tsx +5 -6
- package/src/mixins/thin-underline/thin-underline.stories.tsx +1 -1
- package/src/mixins/visually-hidden/visually-hidden.stories.tsx +1 -1
- package/src/utilities/States/State.tsx +3 -2
- package/src/utilities/States/States.tsx +4 -3
- package/src/utilities/States/StatesProps.tsx +5 -2
- package/src/utilities/States/isRenderProps.ts +1 -0
- package/src/utilities/States/stringifyProps.tsx +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -973,20 +973,20 @@ var typography_1 = typography;
|
|
|
973
973
|
|
|
974
974
|
var text = function text(name, font) {
|
|
975
975
|
if (font === void 0) {
|
|
976
|
-
font =
|
|
976
|
+
font = 'sans';
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
var treatment = typography_1.typography[
|
|
979
|
+
var treatment = typography_1.typography['text-treatments'][name];
|
|
980
980
|
return __assign$b(__assign$b({}, treatment), {
|
|
981
|
-
|
|
982
|
-
|
|
981
|
+
'font-family': typography_1.typography.fonts[font].join(','),
|
|
982
|
+
'line-height': "".concat(treatment['line-height'])
|
|
983
983
|
});
|
|
984
984
|
};
|
|
985
985
|
|
|
986
986
|
helpers.text = text;
|
|
987
987
|
|
|
988
988
|
var remToUnitlessPx = function remToUnitlessPx(value) {
|
|
989
|
-
return parseFloat(value) * parseInt(typography_1.typography[
|
|
989
|
+
return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
|
|
990
990
|
};
|
|
991
991
|
|
|
992
992
|
helpers.remToUnitlessPx = remToUnitlessPx;
|
|
@@ -995,18 +995,19 @@ var color = function color(name, alpha) {
|
|
|
995
995
|
var _a;
|
|
996
996
|
|
|
997
997
|
var color = colors_1.colors.all[name];
|
|
998
|
-
return alpha != null ?
|
|
998
|
+
return alpha != null ? // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
999
|
+
colorString.to.rgb(__spreadArray$1(__spreadArray$1([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
|
|
999
1000
|
};
|
|
1000
1001
|
|
|
1001
1002
|
helpers.color = color;
|
|
1002
1003
|
|
|
1003
|
-
var spacing = function spacing(
|
|
1004
|
-
return [
|
|
1004
|
+
var spacing = function spacing(topY, rightX, bottom, left) {
|
|
1005
|
+
return [topY, rightX, bottom, left].reduce(function (acc, value) {
|
|
1005
1006
|
var _a;
|
|
1006
1007
|
|
|
1007
|
-
if (
|
|
1008
|
-
return [acc, (_a = space_1.space.scale[
|
|
1009
|
-
},
|
|
1008
|
+
if (value === undefined) return acc;
|
|
1009
|
+
return [acc, (_a = space_1.space.scale[value]) !== null && _a !== void 0 ? _a : value].join(' ');
|
|
1010
|
+
}, '');
|
|
1010
1011
|
};
|
|
1011
1012
|
|
|
1012
1013
|
helpers.spacing = spacing;
|
|
@@ -1015,12 +1016,18 @@ helpers.spacing = spacing;
|
|
|
1015
1016
|
|
|
1016
1017
|
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1017
1018
|
if (k2 === undefined) k2 = k;
|
|
1018
|
-
Object.
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1019
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1020
|
+
|
|
1021
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1022
|
+
desc = {
|
|
1023
|
+
enumerable: true,
|
|
1024
|
+
get: function get() {
|
|
1025
|
+
return m[k];
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
Object.defineProperty(o, k2, desc);
|
|
1024
1031
|
} : function (o, m, k, k2) {
|
|
1025
1032
|
if (k2 === undefined) k2 = k;
|
|
1026
1033
|
o[k2] = m[k];
|
|
@@ -1247,6 +1254,182 @@ function _nonIterableRest() {
|
|
|
1247
1254
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1248
1255
|
}
|
|
1249
1256
|
|
|
1257
|
+
var isRenderProps = function isRenderProps(children) {
|
|
1258
|
+
return typeof children === 'function';
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
var classnames = {exports: {}};
|
|
1262
|
+
|
|
1263
|
+
(function (module) {
|
|
1264
|
+
/* global define */
|
|
1265
|
+
(function () {
|
|
1266
|
+
|
|
1267
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1268
|
+
|
|
1269
|
+
function classNames() {
|
|
1270
|
+
var classes = [];
|
|
1271
|
+
|
|
1272
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1273
|
+
var arg = arguments[i];
|
|
1274
|
+
if (!arg) continue;
|
|
1275
|
+
|
|
1276
|
+
var argType = _typeof(arg);
|
|
1277
|
+
|
|
1278
|
+
if (argType === 'string' || argType === 'number') {
|
|
1279
|
+
classes.push(arg);
|
|
1280
|
+
} else if (Array.isArray(arg)) {
|
|
1281
|
+
if (arg.length) {
|
|
1282
|
+
var inner = classNames.apply(null, arg);
|
|
1283
|
+
|
|
1284
|
+
if (inner) {
|
|
1285
|
+
classes.push(inner);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
} else if (argType === 'object') {
|
|
1289
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1290
|
+
for (var key in arg) {
|
|
1291
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1292
|
+
classes.push(key);
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
} else {
|
|
1296
|
+
classes.push(arg.toString());
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
return classes.join(' ');
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
if (module.exports) {
|
|
1305
|
+
classNames["default"] = classNames;
|
|
1306
|
+
module.exports = classNames;
|
|
1307
|
+
} else {
|
|
1308
|
+
window.classNames = classNames;
|
|
1309
|
+
}
|
|
1310
|
+
})();
|
|
1311
|
+
})(classnames);
|
|
1312
|
+
|
|
1313
|
+
var classNames = classnames.exports;
|
|
1314
|
+
|
|
1315
|
+
var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1316
|
+
var Stack = function Stack(_ref) {
|
|
1317
|
+
var className = _ref.className,
|
|
1318
|
+
children = _ref.children,
|
|
1319
|
+
space = _ref.space,
|
|
1320
|
+
_ref$direction = _ref.direction,
|
|
1321
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
1322
|
+
alignItems = _ref.alignItems,
|
|
1323
|
+
justifyContent = _ref.justifyContent,
|
|
1324
|
+
style = _ref.style,
|
|
1325
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
1326
|
+
|
|
1327
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1328
|
+
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
1329
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1330
|
+
alignItems: alignItems,
|
|
1331
|
+
justifyContent: justifyContent
|
|
1332
|
+
})
|
|
1333
|
+
}, rest), children);
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
var omit = function omit(obj) {
|
|
1337
|
+
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1338
|
+
keys[_key - 1] = arguments[_key];
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
return Object.entries(obj).filter(function (_ref) {
|
|
1342
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1343
|
+
key = _ref2[0];
|
|
1344
|
+
|
|
1345
|
+
return !keys.includes(key);
|
|
1346
|
+
}).reduce(function (obj, _ref3) {
|
|
1347
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1348
|
+
key = _ref4[0],
|
|
1349
|
+
val = _ref4[1];
|
|
1350
|
+
|
|
1351
|
+
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
1352
|
+
}, {});
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1355
|
+
var truncate = function truncate(string) {
|
|
1356
|
+
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
1357
|
+
if (!string) return null;
|
|
1358
|
+
var ellipsis = string.length > maxLength;
|
|
1359
|
+
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
1360
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
var stringifyProps = function stringifyProps(props) {
|
|
1364
|
+
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
1365
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1366
|
+
key = _ref2[0],
|
|
1367
|
+
value = _ref2[1];
|
|
1368
|
+
|
|
1369
|
+
if (key === 'children') return "".concat(memo, " children={...}");
|
|
1370
|
+
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
1371
|
+
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
1372
|
+
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
1373
|
+
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
1374
|
+
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
1375
|
+
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
1376
|
+
}, '');
|
|
1377
|
+
return stringifiedProps.trim();
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1381
|
+
|
|
1382
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1383
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1384
|
+
var isEmpty = function isEmpty(obj) {
|
|
1385
|
+
return Object.entries(obj || {}).length === 0;
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
var StatesProps = function StatesProps(_ref) {
|
|
1389
|
+
var props = _ref.props,
|
|
1390
|
+
children = _ref.children;
|
|
1391
|
+
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1392
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
1393
|
+
className: "StatesProps",
|
|
1394
|
+
space: 2,
|
|
1395
|
+
direction: "horizontal"
|
|
1396
|
+
}, /*#__PURE__*/React__default.createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default.createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default.createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default.createElement("span", null, " "));
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1399
|
+
var _excluded$D = ["props", "children"];
|
|
1400
|
+
var State = function State(_ref) {
|
|
1401
|
+
var props = _ref.props,
|
|
1402
|
+
children = _ref.children,
|
|
1403
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
1404
|
+
|
|
1405
|
+
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
1406
|
+
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
1407
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1408
|
+
className: "State"
|
|
1409
|
+
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
1410
|
+
className: "State__props"
|
|
1411
|
+
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
1412
|
+
props: props
|
|
1413
|
+
}, innerChildren)));
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
var _excluded$C = ["states", "children"];
|
|
1417
|
+
var States = function States(_ref) {
|
|
1418
|
+
var _ref$states = _ref.states,
|
|
1419
|
+
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1420
|
+
children = _ref.children,
|
|
1421
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
1422
|
+
|
|
1423
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1424
|
+
className: "States"
|
|
1425
|
+
}, states.map(function (props, index) {
|
|
1426
|
+
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
1427
|
+
key: index,
|
|
1428
|
+
props: props
|
|
1429
|
+
}, rest), children);
|
|
1430
|
+
}));
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1250
1433
|
var _assign = function __assign() {
|
|
1251
1434
|
_assign = Object.assign || function __assign(t) {
|
|
1252
1435
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1601,7 +1784,7 @@ RemoveScroll.classNames = {
|
|
|
1601
1784
|
};
|
|
1602
1785
|
|
|
1603
1786
|
function _extends() {
|
|
1604
|
-
_extends = Object.assign
|
|
1787
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1605
1788
|
for (var i = 1; i < arguments.length; i++) {
|
|
1606
1789
|
var source = arguments[i];
|
|
1607
1790
|
|
|
@@ -1614,7 +1797,6 @@ function _extends() {
|
|
|
1614
1797
|
|
|
1615
1798
|
return target;
|
|
1616
1799
|
};
|
|
1617
|
-
|
|
1618
1800
|
return _extends.apply(this, arguments);
|
|
1619
1801
|
}
|
|
1620
1802
|
|
|
@@ -3300,11 +3482,10 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3300
3482
|
});
|
|
3301
3483
|
|
|
3302
3484
|
function _setPrototypeOf(o, p) {
|
|
3303
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
3485
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3304
3486
|
o.__proto__ = p;
|
|
3305
3487
|
return o;
|
|
3306
3488
|
};
|
|
3307
|
-
|
|
3308
3489
|
return _setPrototypeOf(o, p);
|
|
3309
3490
|
}
|
|
3310
3491
|
|
|
@@ -4424,24 +4605,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
|
|
|
4424
4605
|
};
|
|
4425
4606
|
};
|
|
4426
4607
|
|
|
4608
|
+
/**
|
|
4609
|
+
* creates a hook to control style singleton
|
|
4610
|
+
* @see {@link styleSingleton} for a safer component version
|
|
4611
|
+
* @example
|
|
4612
|
+
* ```tsx
|
|
4613
|
+
* const useStyle = styleHookSingleton();
|
|
4614
|
+
* ///
|
|
4615
|
+
* useStyle('body { overflow: hidden}');
|
|
4616
|
+
*/
|
|
4617
|
+
|
|
4427
4618
|
var styleHookSingleton = function styleHookSingleton() {
|
|
4428
4619
|
var sheet = stylesheetSingleton();
|
|
4429
|
-
return function (styles) {
|
|
4620
|
+
return function (styles, isDynamic) {
|
|
4430
4621
|
React.useEffect(function () {
|
|
4431
4622
|
sheet.add(styles);
|
|
4432
4623
|
return function () {
|
|
4433
4624
|
sheet.remove();
|
|
4434
4625
|
};
|
|
4435
|
-
}, [styles]);
|
|
4626
|
+
}, [styles && isDynamic]);
|
|
4436
4627
|
};
|
|
4437
4628
|
};
|
|
4438
4629
|
|
|
4630
|
+
/**
|
|
4631
|
+
* create a Component to add styles on demand
|
|
4632
|
+
* - styles are added when first instance is mounted
|
|
4633
|
+
* - styles are removed when the last instance is unmounted
|
|
4634
|
+
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
4635
|
+
*/
|
|
4636
|
+
|
|
4439
4637
|
var styleSingleton = function styleSingleton() {
|
|
4440
4638
|
var useStyle = styleHookSingleton();
|
|
4441
4639
|
|
|
4442
4640
|
var Sheet = function Sheet(_a) {
|
|
4443
|
-
var styles = _a.styles
|
|
4444
|
-
|
|
4641
|
+
var styles = _a.styles,
|
|
4642
|
+
dynamic = _a.dynamic;
|
|
4643
|
+
useStyle(styles, dynamic);
|
|
4445
4644
|
return null;
|
|
4446
4645
|
};
|
|
4447
4646
|
|
|
@@ -4461,6 +4660,13 @@ var parse = function parse(x) {
|
|
|
4461
4660
|
|
|
4462
4661
|
var getOffset = function getOffset(gapMode) {
|
|
4463
4662
|
var cs = window.getComputedStyle(document.body);
|
|
4663
|
+
|
|
4664
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4665
|
+
if (cs.overflowY === 'hidden') {
|
|
4666
|
+
console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
|
|
4464
4670
|
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
4465
4671
|
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
4466
4672
|
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
@@ -4509,17 +4715,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
4509
4715
|
|
|
4510
4716
|
|
|
4511
4717
|
var RemoveScrollBar = function RemoveScrollBar(props) {
|
|
4512
|
-
var _a = React.useState(getGapWidth(props.gapMode)),
|
|
4513
|
-
gap = _a[0],
|
|
4514
|
-
setGap = _a[1];
|
|
4515
|
-
|
|
4516
|
-
React.useEffect(function () {
|
|
4517
|
-
setGap(getGapWidth(props.gapMode));
|
|
4518
|
-
}, [props.gapMode]);
|
|
4519
4718
|
var noRelative = props.noRelative,
|
|
4520
4719
|
noImportant = props.noImportant,
|
|
4521
|
-
|
|
4522
|
-
gapMode =
|
|
4720
|
+
_a = props.gapMode,
|
|
4721
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
4722
|
+
var gap = React.useMemo(function () {
|
|
4723
|
+
return getGapWidth(gapMode);
|
|
4724
|
+
}, [gapMode]);
|
|
4523
4725
|
return /*#__PURE__*/React.createElement(Style$1, {
|
|
4524
4726
|
styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
|
|
4525
4727
|
});
|
|
@@ -5092,60 +5294,6 @@ var FocusOn = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5092
5294
|
}));
|
|
5093
5295
|
});
|
|
5094
5296
|
|
|
5095
|
-
var classnames = {exports: {}};
|
|
5096
|
-
|
|
5097
|
-
(function (module) {
|
|
5098
|
-
/* global define */
|
|
5099
|
-
(function () {
|
|
5100
|
-
|
|
5101
|
-
var hasOwn = {}.hasOwnProperty;
|
|
5102
|
-
|
|
5103
|
-
function classNames() {
|
|
5104
|
-
var classes = [];
|
|
5105
|
-
|
|
5106
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
5107
|
-
var arg = arguments[i];
|
|
5108
|
-
if (!arg) continue;
|
|
5109
|
-
|
|
5110
|
-
var argType = _typeof(arg);
|
|
5111
|
-
|
|
5112
|
-
if (argType === 'string' || argType === 'number') {
|
|
5113
|
-
classes.push(arg);
|
|
5114
|
-
} else if (Array.isArray(arg)) {
|
|
5115
|
-
if (arg.length) {
|
|
5116
|
-
var inner = classNames.apply(null, arg);
|
|
5117
|
-
|
|
5118
|
-
if (inner) {
|
|
5119
|
-
classes.push(inner);
|
|
5120
|
-
}
|
|
5121
|
-
}
|
|
5122
|
-
} else if (argType === 'object') {
|
|
5123
|
-
if (arg.toString === Object.prototype.toString) {
|
|
5124
|
-
for (var key in arg) {
|
|
5125
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
5126
|
-
classes.push(key);
|
|
5127
|
-
}
|
|
5128
|
-
}
|
|
5129
|
-
} else {
|
|
5130
|
-
classes.push(arg.toString());
|
|
5131
|
-
}
|
|
5132
|
-
}
|
|
5133
|
-
}
|
|
5134
|
-
|
|
5135
|
-
return classes.join(' ');
|
|
5136
|
-
}
|
|
5137
|
-
|
|
5138
|
-
if (module.exports) {
|
|
5139
|
-
classNames["default"] = classNames;
|
|
5140
|
-
module.exports = classNames;
|
|
5141
|
-
} else {
|
|
5142
|
-
window.classNames = classNames;
|
|
5143
|
-
}
|
|
5144
|
-
})();
|
|
5145
|
-
})(classnames);
|
|
5146
|
-
|
|
5147
|
-
var classNames = classnames.exports;
|
|
5148
|
-
|
|
5149
5297
|
var dist$3 = {};
|
|
5150
5298
|
|
|
5151
5299
|
var scale = {};
|
|
@@ -5253,7 +5401,7 @@ var scale = {};
|
|
|
5253
5401
|
__exportStar(scale, exports);
|
|
5254
5402
|
})(dist$3);
|
|
5255
5403
|
|
|
5256
|
-
var _excluded$
|
|
5404
|
+
var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5257
5405
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5258
5406
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5259
5407
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5268,7 +5416,7 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5268
5416
|
outlined = _ref$outlined === void 0 ? false : _ref$outlined,
|
|
5269
5417
|
children = _ref.children,
|
|
5270
5418
|
className = _ref.className,
|
|
5271
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5419
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5272
5420
|
|
|
5273
5421
|
var _scale = dist$3.scale({
|
|
5274
5422
|
width: aspectWidth,
|
|
@@ -5298,23 +5446,23 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5298
5446
|
});
|
|
5299
5447
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5300
5448
|
|
|
5301
|
-
var _excluded$
|
|
5449
|
+
var _excluded$A = ["className", "theme", "children"];
|
|
5302
5450
|
var Badge = function Badge(_ref) {
|
|
5303
5451
|
var className = _ref.className,
|
|
5304
5452
|
theme = _ref.theme,
|
|
5305
5453
|
children = _ref.children,
|
|
5306
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5454
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5307
5455
|
|
|
5308
5456
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
5309
5457
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5310
5458
|
}, rest), children);
|
|
5311
5459
|
};
|
|
5312
5460
|
|
|
5313
|
-
var _excluded$
|
|
5461
|
+
var _excluded$z = ["children", "className"];
|
|
5314
5462
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5315
5463
|
var children = _ref.children,
|
|
5316
5464
|
className = _ref.className,
|
|
5317
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5465
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5318
5466
|
|
|
5319
5467
|
var position = 0;
|
|
5320
5468
|
return /*#__PURE__*/React__default.createElement("ol", _extends$1({
|
|
@@ -5334,7 +5482,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5334
5482
|
}));
|
|
5335
5483
|
};
|
|
5336
5484
|
|
|
5337
|
-
var _excluded$
|
|
5485
|
+
var _excluded$y = ["className", "styleless", "disabled"];
|
|
5338
5486
|
|
|
5339
5487
|
var isLink = function isLink(props) {
|
|
5340
5488
|
return 'to' in props;
|
|
@@ -5353,7 +5501,7 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5353
5501
|
_ref$styleless = _ref.styleless,
|
|
5354
5502
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5355
5503
|
disabled = _ref.disabled,
|
|
5356
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5504
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5357
5505
|
|
|
5358
5506
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5359
5507
|
className: classNames({
|
|
@@ -5376,14 +5524,14 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5376
5524
|
});
|
|
5377
5525
|
Clickable.displayName = 'Clickable';
|
|
5378
5526
|
|
|
5379
|
-
var _excluded$
|
|
5527
|
+
var _excluded$x = ["className", "disabled", "children", "underlined"];
|
|
5380
5528
|
var ControlLink = function ControlLink(_ref) {
|
|
5381
5529
|
var className = _ref.className,
|
|
5382
5530
|
disabled = _ref.disabled,
|
|
5383
5531
|
children = _ref.children,
|
|
5384
5532
|
_ref$underlined = _ref.underlined,
|
|
5385
5533
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5386
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5534
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
5387
5535
|
|
|
5388
5536
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({}, rest, {
|
|
5389
5537
|
className: classNames('ControlLink', {
|
|
@@ -5395,12 +5543,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5395
5543
|
}), children);
|
|
5396
5544
|
};
|
|
5397
5545
|
|
|
5398
|
-
var _excluded$
|
|
5546
|
+
var _excluded$w = ["children", "position", "className"];
|
|
5399
5547
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5400
5548
|
var children = _ref.children,
|
|
5401
5549
|
position = _ref.position,
|
|
5402
5550
|
className = _ref.className,
|
|
5403
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5551
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
5404
5552
|
|
|
5405
5553
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
5406
5554
|
className: classNames('Breadcrumb', className),
|
|
@@ -5419,7 +5567,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5419
5567
|
}));
|
|
5420
5568
|
};
|
|
5421
5569
|
|
|
5422
|
-
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
5570
|
+
var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
5571
|
+
|
|
5423
5572
|
var ONE_PIXEL = 1 / 16;
|
|
5424
5573
|
var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
5425
5574
|
var mode = _ref.mode,
|
|
@@ -5429,21 +5578,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
|
5429
5578
|
case 'at':
|
|
5430
5579
|
{
|
|
5431
5580
|
var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
|
|
5432
|
-
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
|
|
5581
|
+
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
|
|
5433
5582
|
return {
|
|
5434
5583
|
min: prevWidth,
|
|
5435
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5584
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5436
5585
|
};
|
|
5437
5586
|
}
|
|
5438
5587
|
|
|
5439
5588
|
case 'gt':
|
|
5440
5589
|
return {
|
|
5441
|
-
min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
|
|
5590
|
+
min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
|
|
5442
5591
|
};
|
|
5443
5592
|
|
|
5444
5593
|
case 'lt':
|
|
5445
5594
|
return {
|
|
5446
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5595
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5447
5596
|
};
|
|
5448
5597
|
}
|
|
5449
5598
|
};
|
|
@@ -5533,10 +5682,10 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
5533
5682
|
};
|
|
5534
5683
|
};
|
|
5535
5684
|
|
|
5536
|
-
var _excluded$
|
|
5685
|
+
var _excluded$v = ["children"];
|
|
5537
5686
|
var Breakpoint = function Breakpoint(_ref) {
|
|
5538
5687
|
var children = _ref.children,
|
|
5539
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5688
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
5540
5689
|
|
|
5541
5690
|
var _discriminate = discriminate(rest),
|
|
5542
5691
|
mode = _discriminate.mode,
|
|
@@ -5550,7 +5699,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
5550
5699
|
}, children) : null;
|
|
5551
5700
|
};
|
|
5552
5701
|
|
|
5553
|
-
var _excluded$
|
|
5702
|
+
var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
|
|
5554
5703
|
var Button = function Button(_ref) {
|
|
5555
5704
|
var secondary = _ref.secondary,
|
|
5556
5705
|
chip = _ref.chip,
|
|
@@ -5558,7 +5707,7 @@ var Button = function Button(_ref) {
|
|
|
5558
5707
|
focus = _ref.focus,
|
|
5559
5708
|
disabled = _ref.disabled,
|
|
5560
5709
|
className = _ref.className,
|
|
5561
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5710
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
5562
5711
|
|
|
5563
5712
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
5564
5713
|
className: classNames('Button', {
|
|
@@ -5709,7 +5858,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
5709
5858
|
|
|
5710
5859
|
Circle12.displayName = 'Circle12';
|
|
5711
5860
|
|
|
5712
|
-
var _excluded$
|
|
5861
|
+
var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
|
|
5713
5862
|
var CHECKED_ITEM_PROPS = {
|
|
5714
5863
|
className: 'Checkbox__check-mark',
|
|
5715
5864
|
height: '85%',
|
|
@@ -5727,7 +5876,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5727
5876
|
disabled = _ref.disabled,
|
|
5728
5877
|
_ref$checkIcon = _ref.checkIcon,
|
|
5729
5878
|
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
5730
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5879
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
5731
5880
|
|
|
5732
5881
|
var _useState = useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
5733
5882
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5815,7 +5964,7 @@ var SKU_COLORS = {
|
|
|
5815
5964
|
yellow: '#ffca44'
|
|
5816
5965
|
};
|
|
5817
5966
|
|
|
5818
|
-
var _excluded$
|
|
5967
|
+
var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
|
|
5819
5968
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
5820
5969
|
var className = _ref.className,
|
|
5821
5970
|
size = _ref.size,
|
|
@@ -5829,7 +5978,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5829
5978
|
onClick = _ref.onClick,
|
|
5830
5979
|
onMouseEnter = _ref.onMouseEnter,
|
|
5831
5980
|
disabled = _ref.disabled,
|
|
5832
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5981
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
5833
5982
|
|
|
5834
5983
|
var handleClick = useCallback(function (_event) {
|
|
5835
5984
|
onClick && onClick(color);
|
|
@@ -5865,22 +6014,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5865
6014
|
}));
|
|
5866
6015
|
};
|
|
5867
6016
|
|
|
5868
|
-
var _excluded$
|
|
6017
|
+
var _excluded$r = ["className", "children"];
|
|
5869
6018
|
var Constrain = function Constrain(_ref) {
|
|
5870
6019
|
var className = _ref.className,
|
|
5871
6020
|
children = _ref.children,
|
|
5872
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6021
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
5873
6022
|
|
|
5874
6023
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5875
6024
|
className: classNames('Constrain', className)
|
|
5876
6025
|
}, rest), children);
|
|
5877
6026
|
};
|
|
5878
6027
|
|
|
5879
|
-
var _excluded$
|
|
6028
|
+
var _excluded$q = ["className", "children"];
|
|
5880
6029
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
5881
6030
|
var className = _ref.className,
|
|
5882
6031
|
children = _ref.children,
|
|
5883
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6032
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
5884
6033
|
|
|
5885
6034
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5886
6035
|
className: classNames('ExceedConstrain', className)
|
|
@@ -8292,7 +8441,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
8292
8441
|
|
|
8293
8442
|
Warning16.displayName = 'Warning16';
|
|
8294
8443
|
|
|
8295
|
-
var _excluded$
|
|
8444
|
+
var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
8296
8445
|
var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
8297
8446
|
var className = _ref.className,
|
|
8298
8447
|
disabled = _ref.disabled,
|
|
@@ -8302,7 +8451,7 @@ var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
8302
8451
|
label = _ref.label,
|
|
8303
8452
|
_onChange = _ref.onChange,
|
|
8304
8453
|
onChangeEvent = _ref.onChangeEvent,
|
|
8305
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8454
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
8306
8455
|
|
|
8307
8456
|
return /*#__PURE__*/React__default.createElement("input", _extends$1({
|
|
8308
8457
|
className: classNames('TextInput', className, {
|
|
@@ -8641,7 +8790,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8641
8790
|
return function () {
|
|
8642
8791
|
el.removeEventListener('keydown', handleKeyDown);
|
|
8643
8792
|
};
|
|
8644
|
-
}, [handleKeyDown, ref, idleTimeout]);
|
|
8793
|
+
}, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8794
|
+
|
|
8645
8795
|
useEffect(function () {
|
|
8646
8796
|
return dispatch({
|
|
8647
8797
|
type: 'RESET',
|
|
@@ -8657,6 +8807,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8657
8807
|
});
|
|
8658
8808
|
};
|
|
8659
8809
|
|
|
8810
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8660
8811
|
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
8661
8812
|
var didMountRef = useRef(false);
|
|
8662
8813
|
useEffect(function () {
|
|
@@ -8668,7 +8819,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
8668
8819
|
}, deps);
|
|
8669
8820
|
};
|
|
8670
8821
|
|
|
8671
|
-
var _excluded$
|
|
8822
|
+
var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
|
|
8672
8823
|
var Text = function Text(_ref) {
|
|
8673
8824
|
var className = _ref.className,
|
|
8674
8825
|
_ref$treatment = _ref.treatment,
|
|
@@ -8678,7 +8829,7 @@ var Text = function Text(_ref) {
|
|
|
8678
8829
|
family = _ref.family,
|
|
8679
8830
|
children = _ref.children,
|
|
8680
8831
|
style = _ref.style,
|
|
8681
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8832
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
8682
8833
|
|
|
8683
8834
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
8684
8835
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
@@ -8835,7 +8986,7 @@ var Search20 = function Search20(_a) {
|
|
|
8835
8986
|
|
|
8836
8987
|
Search20.displayName = 'Search20';
|
|
8837
8988
|
|
|
8838
|
-
var _excluded$
|
|
8989
|
+
var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
|
|
8839
8990
|
var DEFAULT_INPUT_VALUE = '';
|
|
8840
8991
|
var SearchInput = function SearchInput(_ref) {
|
|
8841
8992
|
var className = _ref.className,
|
|
@@ -8844,7 +8995,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
8844
8995
|
onClear = _ref.onClear,
|
|
8845
8996
|
_ref$value = _ref.value,
|
|
8846
8997
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
8847
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8998
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
8848
8999
|
|
|
8849
9000
|
var ref = useRef(null);
|
|
8850
9001
|
|
|
@@ -9042,7 +9193,8 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9042
9193
|
selected = _ref.selected,
|
|
9043
9194
|
option = _ref.option,
|
|
9044
9195
|
onClick = _ref.onClick,
|
|
9045
|
-
className = _ref.className
|
|
9196
|
+
className = _ref.className,
|
|
9197
|
+
dataTestId = _ref.dataTestId;
|
|
9046
9198
|
var ref = useRef(null);
|
|
9047
9199
|
var handleClick = useCallback(function (event) {
|
|
9048
9200
|
event.preventDefault();
|
|
@@ -9064,13 +9216,14 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9064
9216
|
'SelectOption--disabled': option.disabled
|
|
9065
9217
|
}),
|
|
9066
9218
|
onClick: handleClick,
|
|
9219
|
+
"data-test-id": dataTestId ? "".concat(dataTestId, "--").concat(option.label.replace(' ', '-')) : undefined,
|
|
9067
9220
|
"aria-label": option.label,
|
|
9068
9221
|
"aria-selected": selected,
|
|
9069
9222
|
role: "option"
|
|
9070
9223
|
}, option.label);
|
|
9071
9224
|
};
|
|
9072
9225
|
|
|
9073
|
-
var _excluded$
|
|
9226
|
+
var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className", "dataTestId"];
|
|
9074
9227
|
var SelectOptions = function SelectOptions(_ref) {
|
|
9075
9228
|
var idRef = _ref.idRef,
|
|
9076
9229
|
searchable = _ref.searchable,
|
|
@@ -9081,7 +9234,8 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9081
9234
|
onSelect = _ref.onSelect,
|
|
9082
9235
|
onFocus = _ref.onFocus,
|
|
9083
9236
|
className = _ref.className,
|
|
9084
|
-
|
|
9237
|
+
dataTestId = _ref.dataTestId,
|
|
9238
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
9085
9239
|
|
|
9086
9240
|
var _useState = useState(''),
|
|
9087
9241
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -9138,6 +9292,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9138
9292
|
id: "SelectOption--".concat(option.value, "-").concat(idRef),
|
|
9139
9293
|
key: option.value,
|
|
9140
9294
|
option: option,
|
|
9295
|
+
dataTestId: dataTestId,
|
|
9141
9296
|
active: (activeOption === null || activeOption === void 0 ? void 0 : activeOption.value) === option.value,
|
|
9142
9297
|
selected: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value,
|
|
9143
9298
|
onClick: onSelect
|
|
@@ -9259,7 +9414,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
9259
9414
|
};
|
|
9260
9415
|
};
|
|
9261
9416
|
|
|
9262
|
-
var _excluded$
|
|
9417
|
+
var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId"];
|
|
9263
9418
|
var Select = function Select(_ref) {
|
|
9264
9419
|
var _ref2;
|
|
9265
9420
|
|
|
@@ -9280,11 +9435,13 @@ var Select = function Select(_ref) {
|
|
|
9280
9435
|
name = _ref.name,
|
|
9281
9436
|
onChange = _ref.onChange,
|
|
9282
9437
|
options = _ref.options,
|
|
9438
|
+
placeholder = _ref.placeholder,
|
|
9283
9439
|
searchable = _ref.searchable,
|
|
9284
9440
|
_ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
|
|
9285
9441
|
shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
|
|
9286
9442
|
value = _ref.value,
|
|
9287
|
-
|
|
9443
|
+
dataTestId = _ref.dataTestId,
|
|
9444
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
9288
9445
|
|
|
9289
9446
|
var _useSelect = useSelect({
|
|
9290
9447
|
value: value,
|
|
@@ -9352,6 +9509,7 @@ var Select = function Select(_ref) {
|
|
|
9352
9509
|
className: "Select__value",
|
|
9353
9510
|
disabled: disabled,
|
|
9354
9511
|
onClick: handleToggle,
|
|
9512
|
+
"data-test-id": dataTestId,
|
|
9355
9513
|
"aria-haspopup": "listbox",
|
|
9356
9514
|
"aria-expanded": state.mode === Mode.Open,
|
|
9357
9515
|
"aria-labelledby": "Select__label--".concat(idRef, " Select__value--").concat(idRef),
|
|
@@ -9359,7 +9517,7 @@ var Select = function Select(_ref) {
|
|
|
9359
9517
|
title: "Select"
|
|
9360
9518
|
}, /*#__PURE__*/React__default.createElement(SelectLabel, {
|
|
9361
9519
|
idRef: idRef,
|
|
9362
|
-
label: label,
|
|
9520
|
+
label: label || (selected === undefined ? placeholder : undefined),
|
|
9363
9521
|
hasValue: focused != null || selected != null
|
|
9364
9522
|
}), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React__default.createElement("span", {
|
|
9365
9523
|
className: classNames('Select__icon', {
|
|
@@ -9371,6 +9529,7 @@ var Select = function Select(_ref) {
|
|
|
9371
9529
|
'Select__options--up': dropDirection === 'up',
|
|
9372
9530
|
'Select__options--down': dropDirection === 'down'
|
|
9373
9531
|
}),
|
|
9532
|
+
dataTestId: dataTestId,
|
|
9374
9533
|
searchable: searchable,
|
|
9375
9534
|
options: options,
|
|
9376
9535
|
onSelect: handleSelect,
|
|
@@ -10950,7 +11109,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
10950
11109
|
|
|
10951
11110
|
Exit16.displayName = 'Exit16';
|
|
10952
11111
|
|
|
10953
|
-
var _excluded$
|
|
11112
|
+
var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
10954
11113
|
var MultiSelect = function MultiSelect(_ref) {
|
|
10955
11114
|
var className = _ref.className,
|
|
10956
11115
|
defaultValue = _ref.defaultValue,
|
|
@@ -10965,7 +11124,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10965
11124
|
searchable = _ref.searchable,
|
|
10966
11125
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
10967
11126
|
value = _ref.value,
|
|
10968
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11127
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10969
11128
|
|
|
10970
11129
|
var _useSelect = useSelect({
|
|
10971
11130
|
value: value,
|
|
@@ -11065,14 +11224,14 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11065
11224
|
}));
|
|
11066
11225
|
};
|
|
11067
11226
|
|
|
11068
|
-
var _excluded$
|
|
11227
|
+
var _excluded$j = ["className", "children", "error", "label", "placeholder"];
|
|
11069
11228
|
var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
11070
11229
|
var className = _ref.className,
|
|
11071
11230
|
children = _ref.children,
|
|
11072
11231
|
error = _ref.error,
|
|
11073
11232
|
label = _ref.label,
|
|
11074
11233
|
placeholder = _ref.placeholder,
|
|
11075
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11234
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11076
11235
|
|
|
11077
11236
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
11078
11237
|
className: classNames('Field', className)
|
|
@@ -11101,17 +11260,17 @@ var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
11101
11260
|
});
|
|
11102
11261
|
Field.displayName = 'Field';
|
|
11103
11262
|
|
|
11104
|
-
var _excluded$
|
|
11263
|
+
var _excluded$i = ["onChange"];
|
|
11105
11264
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11106
11265
|
var onChange = _ref.onChange,
|
|
11107
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11266
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11108
11267
|
|
|
11109
11268
|
return /*#__PURE__*/React__default.createElement(Field, _extends$1({}, rest, {
|
|
11110
11269
|
onChangeEvent: onChange
|
|
11111
11270
|
}));
|
|
11112
11271
|
};
|
|
11113
11272
|
|
|
11114
|
-
var _excluded$
|
|
11273
|
+
var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11115
11274
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11116
11275
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11117
11276
|
var _ref2;
|
|
@@ -11126,7 +11285,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11126
11285
|
onFocus = _ref.onFocus,
|
|
11127
11286
|
onBlur = _ref.onBlur,
|
|
11128
11287
|
onChange = _ref.onChange,
|
|
11129
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11288
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11130
11289
|
|
|
11131
11290
|
var _useState = useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11132
11291
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11152,6 +11311,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11152
11311
|
setValue(event.target.value);
|
|
11153
11312
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
|
|
11154
11313
|
}, [setValue, onChange]); // TODO: get rid of the any, the types of react-input-mask are incorrect here, it should expect a function as a child, but it expects a ReactNode
|
|
11314
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11155
11315
|
|
|
11156
11316
|
var renderInputField = function renderInputField(inputProps) {
|
|
11157
11317
|
return /*#__PURE__*/React__default.createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
|
|
@@ -11171,19 +11331,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11171
11331
|
}, renderInputField);
|
|
11172
11332
|
};
|
|
11173
11333
|
|
|
11174
|
-
var _excluded$
|
|
11334
|
+
var _excluded$g = ["term", "children", "className"];
|
|
11175
11335
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11176
11336
|
var term = _ref.term,
|
|
11177
11337
|
children = _ref.children,
|
|
11178
11338
|
className = _ref.className,
|
|
11179
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11339
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11180
11340
|
|
|
11181
11341
|
return /*#__PURE__*/React__default.createElement("dl", _extends$1({
|
|
11182
11342
|
className: classNames('DefinitionList', className)
|
|
11183
11343
|
}, rest), /*#__PURE__*/React__default.createElement("dt", null, term), /*#__PURE__*/React__default.createElement("dd", null, children));
|
|
11184
11344
|
};
|
|
11185
11345
|
|
|
11186
|
-
var _excluded$
|
|
11346
|
+
var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
|
|
11187
11347
|
var Expandable = function Expandable(_ref) {
|
|
11188
11348
|
var name = _ref.name,
|
|
11189
11349
|
children = _ref.children,
|
|
@@ -11195,7 +11355,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11195
11355
|
dataTestId = _ref['data-testid'],
|
|
11196
11356
|
_ref$expanded = _ref.expanded,
|
|
11197
11357
|
__expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
11198
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11358
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11199
11359
|
|
|
11200
11360
|
var _useState = useState(__expanded__),
|
|
11201
11361
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11224,7 +11384,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11224
11384
|
}, expanded || !virtual ? children : null));
|
|
11225
11385
|
};
|
|
11226
11386
|
|
|
11227
|
-
var _excluded$
|
|
11387
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11228
11388
|
var Divider = function Divider(_ref) {
|
|
11229
11389
|
var text = _ref.text,
|
|
11230
11390
|
treatment = _ref.treatment,
|
|
@@ -11232,7 +11392,7 @@ var Divider = function Divider(_ref) {
|
|
|
11232
11392
|
family = _ref.family,
|
|
11233
11393
|
type = _ref.type,
|
|
11234
11394
|
className = _ref.className,
|
|
11235
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11395
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11236
11396
|
|
|
11237
11397
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11238
11398
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
@@ -11248,21 +11408,21 @@ var Divider = function Divider(_ref) {
|
|
|
11248
11408
|
|
|
11249
11409
|
var TwoLineDivider = function TwoLineDivider(props) {
|
|
11250
11410
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11251
|
-
type:
|
|
11411
|
+
type: "two-line"
|
|
11252
11412
|
}));
|
|
11253
11413
|
};
|
|
11254
11414
|
|
|
11255
11415
|
var NoLineDivider = function NoLineDivider(props) {
|
|
11256
11416
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11257
|
-
type:
|
|
11417
|
+
type: "no-line"
|
|
11258
11418
|
}));
|
|
11259
11419
|
};
|
|
11260
11420
|
|
|
11261
|
-
var _excluded$
|
|
11421
|
+
var _excluded$d = ["className", "hidden"];
|
|
11262
11422
|
var Label = function Label(_ref) {
|
|
11263
11423
|
var className = _ref.className,
|
|
11264
11424
|
hidden = _ref.hidden,
|
|
11265
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11425
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11266
11426
|
|
|
11267
11427
|
return /*#__PURE__*/React__default.createElement("label", _extends$1({
|
|
11268
11428
|
className: classNames('Label', className, {
|
|
@@ -11394,11 +11554,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11394
11554
|
}));
|
|
11395
11555
|
};
|
|
11396
11556
|
|
|
11397
|
-
var _excluded$
|
|
11557
|
+
var _excluded$c = ["className"];
|
|
11398
11558
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11399
11559
|
var Loading = function Loading(_ref) {
|
|
11400
11560
|
var className = _ref.className,
|
|
11401
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11561
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11402
11562
|
|
|
11403
11563
|
var _useCursor = dist.useCursor({
|
|
11404
11564
|
max: FRAMES.length
|
|
@@ -11406,8 +11566,9 @@ var Loading = function Loading(_ref) {
|
|
|
11406
11566
|
index = _useCursor.index,
|
|
11407
11567
|
handleNext = _useCursor.handleNext;
|
|
11408
11568
|
|
|
11569
|
+
var ONE_SECOND_INTERVAL = 1000;
|
|
11409
11570
|
useEffect(function () {
|
|
11410
|
-
var interval = setInterval(handleNext,
|
|
11571
|
+
var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
|
|
11411
11572
|
return function () {
|
|
11412
11573
|
return clearInterval(interval);
|
|
11413
11574
|
};
|
|
@@ -11473,13 +11634,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
|
|
|
11473
11634
|
})));
|
|
11474
11635
|
};
|
|
11475
11636
|
|
|
11476
|
-
var _excluded$
|
|
11637
|
+
var _excluded$b = ["className", "children", "onClose", "shards"];
|
|
11477
11638
|
var Modal = function Modal(_ref) {
|
|
11478
11639
|
var className = _ref.className,
|
|
11479
11640
|
children = _ref.children,
|
|
11480
11641
|
onClose = _ref.onClose,
|
|
11481
11642
|
shards = _ref.shards,
|
|
11482
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11643
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11483
11644
|
|
|
11484
11645
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
11485
11646
|
className: classNames('Modal', className)
|
|
@@ -11490,14 +11651,14 @@ var Modal = function Modal(_ref) {
|
|
|
11490
11651
|
}, children));
|
|
11491
11652
|
};
|
|
11492
11653
|
|
|
11493
|
-
var _excluded$
|
|
11654
|
+
var _excluded$a = ["className", "children", "show"];
|
|
11494
11655
|
var UNMOUNT_DELAY_MS = 500;
|
|
11495
11656
|
var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11496
11657
|
var className = _ref.className,
|
|
11497
11658
|
children = _ref.children,
|
|
11498
11659
|
_ref$show = _ref.show,
|
|
11499
11660
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11500
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11661
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
11501
11662
|
|
|
11502
11663
|
var _useState = useState(show),
|
|
11503
11664
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11527,7 +11688,7 @@ var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11527
11688
|
});
|
|
11528
11689
|
Overlay.displayName = 'Overlay';
|
|
11529
11690
|
|
|
11530
|
-
var _excluded$
|
|
11691
|
+
var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
|
|
11531
11692
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
11532
11693
|
var children = _ref.children,
|
|
11533
11694
|
className = _ref.className,
|
|
@@ -11537,7 +11698,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
11537
11698
|
_ref$show = _ref.show,
|
|
11538
11699
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11539
11700
|
shards = _ref.shards,
|
|
11540
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11701
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
11541
11702
|
|
|
11542
11703
|
var element = useMemo(function () {
|
|
11543
11704
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
@@ -11808,8 +11969,11 @@ var Paginator = function Paginator(_ref) {
|
|
|
11808
11969
|
})));
|
|
11809
11970
|
};
|
|
11810
11971
|
|
|
11811
|
-
var _excluded$
|
|
11972
|
+
var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
|
|
11812
11973
|
var POPOVER_MOUSEOUT_DELAY_MS = 200;
|
|
11974
|
+
var THREE_QUARTER_SECOND_DELAY = 750;
|
|
11975
|
+
var ONE_SECOND_DELAY = 1000;
|
|
11976
|
+
var FIVE_SECOND_DELAY = 5000;
|
|
11813
11977
|
var Mode;
|
|
11814
11978
|
|
|
11815
11979
|
(function (Mode) {
|
|
@@ -11833,7 +11997,7 @@ var Popover = function Popover(_ref) {
|
|
|
11833
11997
|
autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
|
|
11834
11998
|
_ref$smoothTransition = _ref.smoothTransitioning,
|
|
11835
11999
|
smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
|
|
11836
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12000
|
+
rest = _objectWithoutProperties(_ref, _excluded$8);
|
|
11837
12001
|
|
|
11838
12002
|
var _useState = useState(function () {
|
|
11839
12003
|
if (open && smoothTransitioning) {
|
|
@@ -11877,7 +12041,7 @@ var Popover = function Popover(_ref) {
|
|
|
11877
12041
|
if (mode !== Mode.Closing) return;
|
|
11878
12042
|
var closingTimeout = setTimeout(function () {
|
|
11879
12043
|
return setMode(Mode.Closed);
|
|
11880
|
-
},
|
|
12044
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11881
12045
|
return function () {
|
|
11882
12046
|
return clearTimeout(closingTimeout);
|
|
11883
12047
|
};
|
|
@@ -11886,7 +12050,7 @@ var Popover = function Popover(_ref) {
|
|
|
11886
12050
|
if (mode !== Mode.AutoOpening) return;
|
|
11887
12051
|
var openingTimeout = setTimeout(function () {
|
|
11888
12052
|
return setMode(Mode.AutoOpen);
|
|
11889
|
-
},
|
|
12053
|
+
}, ONE_SECOND_DELAY);
|
|
11890
12054
|
return function () {
|
|
11891
12055
|
return clearTimeout(openingTimeout);
|
|
11892
12056
|
};
|
|
@@ -11895,14 +12059,14 @@ var Popover = function Popover(_ref) {
|
|
|
11895
12059
|
if (mode !== Mode.Opening) return;
|
|
11896
12060
|
var openingTimeout = setTimeout(function () {
|
|
11897
12061
|
return setMode(Mode.Open);
|
|
11898
|
-
},
|
|
12062
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11899
12063
|
return function () {
|
|
11900
12064
|
return clearTimeout(openingTimeout);
|
|
11901
12065
|
};
|
|
11902
12066
|
}, [mode]);
|
|
11903
12067
|
useEffect(function () {
|
|
11904
12068
|
if (mode !== Mode.AutoOpen) return;
|
|
11905
|
-
var stayingTimeout = setTimeout(handleClose,
|
|
12069
|
+
var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
|
|
11906
12070
|
return function () {
|
|
11907
12071
|
return clearTimeout(stayingTimeout);
|
|
11908
12072
|
};
|
|
@@ -11936,11 +12100,11 @@ var Popover = function Popover(_ref) {
|
|
|
11936
12100
|
}, content)), children));
|
|
11937
12101
|
};
|
|
11938
12102
|
|
|
11939
|
-
var _excluded$
|
|
12103
|
+
var _excluded$7 = ["className", "children"];
|
|
11940
12104
|
var PromoBanner = function PromoBanner(_ref) {
|
|
11941
12105
|
var className = _ref.className,
|
|
11942
12106
|
children = _ref.children,
|
|
11943
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12107
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
11944
12108
|
|
|
11945
12109
|
var length = Children.count(children);
|
|
11946
12110
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
@@ -11959,7 +12123,7 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
11959
12123
|
})));
|
|
11960
12124
|
};
|
|
11961
12125
|
|
|
11962
|
-
var _excluded$
|
|
12126
|
+
var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
|
|
11963
12127
|
var RadioButton = function RadioButton(_ref) {
|
|
11964
12128
|
var className = _ref.className,
|
|
11965
12129
|
checked = _ref.checked,
|
|
@@ -11967,7 +12131,7 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
11967
12131
|
value = _ref.value,
|
|
11968
12132
|
tabIndex = _ref.tabIndex,
|
|
11969
12133
|
disabled = _ref.disabled,
|
|
11970
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12134
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
11971
12135
|
|
|
11972
12136
|
var inputRef = useRef(null);
|
|
11973
12137
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -12004,14 +12168,14 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
12004
12168
|
}, children));
|
|
12005
12169
|
};
|
|
12006
12170
|
|
|
12007
|
-
var _excluded$
|
|
12171
|
+
var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
|
|
12008
12172
|
var SelectableButton = function SelectableButton(_ref) {
|
|
12009
12173
|
var className = _ref.className,
|
|
12010
12174
|
hover = _ref.hover,
|
|
12011
12175
|
selected = _ref.selected,
|
|
12012
12176
|
unavailable = _ref.unavailable,
|
|
12013
12177
|
children = _ref.children,
|
|
12014
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12178
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12015
12179
|
|
|
12016
12180
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
12017
12181
|
className: classNames('SelectableButton', {
|
|
@@ -12022,34 +12186,13 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12022
12186
|
}, rest), /*#__PURE__*/React__default.createElement("span", null, children));
|
|
12023
12187
|
};
|
|
12024
12188
|
|
|
12025
|
-
var _excluded$
|
|
12026
|
-
var Stack = function Stack(_ref) {
|
|
12027
|
-
var className = _ref.className,
|
|
12028
|
-
children = _ref.children,
|
|
12029
|
-
space = _ref.space,
|
|
12030
|
-
_ref$direction = _ref.direction,
|
|
12031
|
-
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
12032
|
-
alignItems = _ref.alignItems,
|
|
12033
|
-
justifyContent = _ref.justifyContent,
|
|
12034
|
-
style = _ref.style,
|
|
12035
|
-
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
12036
|
-
|
|
12037
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12038
|
-
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
12039
|
-
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
12040
|
-
alignItems: alignItems,
|
|
12041
|
-
justifyContent: justifyContent
|
|
12042
|
-
})
|
|
12043
|
-
}, rest), children);
|
|
12044
|
-
};
|
|
12045
|
-
|
|
12046
|
-
var _excluded$6 = ["className", "disabled", "onRemove", "children"];
|
|
12189
|
+
var _excluded$4 = ["className", "disabled", "onRemove", "children"];
|
|
12047
12190
|
var Tag = function Tag(_ref) {
|
|
12048
12191
|
var className = _ref.className,
|
|
12049
12192
|
disabled = _ref.disabled,
|
|
12050
12193
|
onRemove = _ref.onRemove,
|
|
12051
12194
|
children = _ref.children,
|
|
12052
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12195
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
12053
12196
|
|
|
12054
12197
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12055
12198
|
className: classNames('Tag', className, {
|
|
@@ -12062,13 +12205,13 @@ var Tag = function Tag(_ref) {
|
|
|
12062
12205
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12063
12206
|
};
|
|
12064
12207
|
|
|
12065
|
-
var _excluded$
|
|
12208
|
+
var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
|
|
12066
12209
|
var Tabs = function Tabs(_ref) {
|
|
12067
12210
|
var tabs = _ref.tabs,
|
|
12068
12211
|
onTabClicked = _ref.onTabClicked,
|
|
12069
12212
|
activeTab = _ref.activeTab,
|
|
12070
12213
|
className = _ref.className,
|
|
12071
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12214
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
12072
12215
|
|
|
12073
12216
|
var _useState = useState(activeTab || tabs[0].name),
|
|
12074
12217
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12148,7 +12291,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
12148
12291
|
}, children);
|
|
12149
12292
|
};
|
|
12150
12293
|
|
|
12151
|
-
var _excluded$
|
|
12294
|
+
var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
|
|
12152
12295
|
var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
12153
12296
|
var className = _ref.className,
|
|
12154
12297
|
disabled = _ref.disabled,
|
|
@@ -12157,7 +12300,7 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12157
12300
|
placeholder = _ref.placeholder,
|
|
12158
12301
|
label = _ref.label,
|
|
12159
12302
|
_onChange = _ref.onChange,
|
|
12160
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12303
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
12161
12304
|
|
|
12162
12305
|
return /*#__PURE__*/React__default.createElement("textarea", _extends$1({
|
|
12163
12306
|
className: classNames('Textarea', className, {
|
|
@@ -12176,13 +12319,13 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12176
12319
|
});
|
|
12177
12320
|
Textarea.displayName = 'Textarea';
|
|
12178
12321
|
|
|
12179
|
-
var _excluded$
|
|
12322
|
+
var _excluded$1 = ["theme", "className", "onRemove", "children"];
|
|
12180
12323
|
var Toast = function Toast(_ref) {
|
|
12181
12324
|
var theme = _ref.theme,
|
|
12182
12325
|
className = _ref.className,
|
|
12183
12326
|
onRemove = _ref.onRemove,
|
|
12184
12327
|
children = _ref.children,
|
|
12185
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12328
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12186
12329
|
|
|
12187
12330
|
return /*#__PURE__*/React__default.createElement(Stack, _extends$1({
|
|
12188
12331
|
className: classNames('Toast', "Toast--".concat(theme), className),
|
|
@@ -12199,11 +12342,11 @@ var Toast = function Toast(_ref) {
|
|
|
12199
12342
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12200
12343
|
};
|
|
12201
12344
|
|
|
12202
|
-
var _excluded
|
|
12345
|
+
var _excluded = ["className", "double"];
|
|
12203
12346
|
var VerticalDivider = function VerticalDivider(_ref) {
|
|
12204
12347
|
var className = _ref.className,
|
|
12205
12348
|
_double = _ref["double"],
|
|
12206
|
-
rest = _objectWithoutProperties(_ref, _excluded
|
|
12349
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12207
12350
|
|
|
12208
12351
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12209
12352
|
className: classNames('VerticalDivider', {
|
|
@@ -12242,102 +12385,6 @@ var PasswordInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12242
12385
|
});
|
|
12243
12386
|
PasswordInput.displayName = 'PasswordInput';
|
|
12244
12387
|
|
|
12245
|
-
var isRenderProps = function isRenderProps(children) {
|
|
12246
|
-
return typeof children === 'function';
|
|
12247
|
-
};
|
|
12248
|
-
|
|
12249
|
-
var truncate = function truncate(string) {
|
|
12250
|
-
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
12251
|
-
if (!string) return null;
|
|
12252
|
-
var ellipsis = string.length > maxLength;
|
|
12253
|
-
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
12254
|
-
};
|
|
12255
|
-
|
|
12256
|
-
var stringifyProps = function stringifyProps(props) {
|
|
12257
|
-
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
12258
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
12259
|
-
key = _ref2[0],
|
|
12260
|
-
value = _ref2[1];
|
|
12261
|
-
|
|
12262
|
-
if (key === 'children') return "".concat(memo, " children={...}");
|
|
12263
|
-
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
12264
|
-
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
12265
|
-
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
12266
|
-
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
12267
|
-
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
12268
|
-
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
12269
|
-
}, '');
|
|
12270
|
-
return stringifiedProps.trim();
|
|
12271
|
-
};
|
|
12272
|
-
|
|
12273
|
-
var omit = function omit(obj) {
|
|
12274
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12275
|
-
keys[_key - 1] = arguments[_key];
|
|
12276
|
-
}
|
|
12277
|
-
|
|
12278
|
-
return Object.entries(obj).filter(function (_ref) {
|
|
12279
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
12280
|
-
key = _ref2[0];
|
|
12281
|
-
|
|
12282
|
-
return !keys.includes(key);
|
|
12283
|
-
}).reduce(function (obj, _ref3) {
|
|
12284
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
12285
|
-
key = _ref4[0],
|
|
12286
|
-
val = _ref4[1];
|
|
12287
|
-
|
|
12288
|
-
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
12289
|
-
}, {});
|
|
12290
|
-
};
|
|
12291
|
-
|
|
12292
|
-
var isEmpty = function isEmpty(obj) {
|
|
12293
|
-
return Object.entries(obj || {}).length === 0;
|
|
12294
|
-
};
|
|
12295
|
-
|
|
12296
|
-
var StatesProps = function StatesProps(_ref) {
|
|
12297
|
-
var props = _ref.props,
|
|
12298
|
-
children = _ref.children;
|
|
12299
|
-
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
12300
|
-
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
12301
|
-
className: "StatesProps",
|
|
12302
|
-
space: 2,
|
|
12303
|
-
direction: "horizontal"
|
|
12304
|
-
}, /*#__PURE__*/React__default.createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default.createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default.createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default.createElement("span", null, " "));
|
|
12305
|
-
};
|
|
12306
|
-
|
|
12307
|
-
var _excluded$1 = ["props", "children"];
|
|
12308
|
-
var State = function State(_ref) {
|
|
12309
|
-
var props = _ref.props,
|
|
12310
|
-
children = _ref.children,
|
|
12311
|
-
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12312
|
-
|
|
12313
|
-
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
12314
|
-
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
12315
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12316
|
-
className: "State"
|
|
12317
|
-
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
12318
|
-
className: "State__props"
|
|
12319
|
-
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
12320
|
-
props: props
|
|
12321
|
-
}, innerChildren)));
|
|
12322
|
-
};
|
|
12323
|
-
|
|
12324
|
-
var _excluded = ["states", "children"];
|
|
12325
|
-
var States = function States(_ref) {
|
|
12326
|
-
var _ref$states = _ref.states,
|
|
12327
|
-
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
12328
|
-
children = _ref.children,
|
|
12329
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12330
|
-
|
|
12331
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12332
|
-
className: "States"
|
|
12333
|
-
}, states.map(function (props, i) {
|
|
12334
|
-
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
12335
|
-
key: i,
|
|
12336
|
-
props: props
|
|
12337
|
-
}, rest), children);
|
|
12338
|
-
}));
|
|
12339
|
-
};
|
|
12340
|
-
|
|
12341
12388
|
var tokens = {
|
|
12342
12389
|
colors: dist$4.colors,
|
|
12343
12390
|
typography: dist$4.typography,
|