@moda/om 16.1.0 → 16.2.1
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 +316 -284
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +315 -283
- 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 +1 -1
- 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 +0 -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 +0 -0
- package/dist/{components → src/components}/Select/SelectOptions.d.ts +0 -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 +7 -7
- package/src/components/Checkbox/Checkbox.test.tsx +12 -14
- package/src/components/Checkbox/Checkbox.tsx +8 -8
- 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 +13 -8
- package/src/components/Select/SelectOption.tsx +1 -1
- package/src/components/Select/SelectOptions.tsx +5 -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
|
@@ -1120,7 +1120,7 @@ function _defineProperty$1(obj, key, value) {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
1122
|
function _extends$1() {
|
|
1123
|
-
_extends$1 = Object.assign
|
|
1123
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1124
1124
|
for (var i = 1; i < arguments.length; i++) {
|
|
1125
1125
|
var source = arguments[i];
|
|
1126
1126
|
|
|
@@ -1133,7 +1133,6 @@ function _extends$1() {
|
|
|
1133
1133
|
|
|
1134
1134
|
return target;
|
|
1135
1135
|
};
|
|
1136
|
-
|
|
1137
1136
|
return _extends$1.apply(this, arguments);
|
|
1138
1137
|
}
|
|
1139
1138
|
|
|
@@ -1248,6 +1247,182 @@ function _nonIterableRest() {
|
|
|
1248
1247
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1249
1248
|
}
|
|
1250
1249
|
|
|
1250
|
+
var isRenderProps = function isRenderProps(children) {
|
|
1251
|
+
return typeof children === 'function';
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
var classnames = {exports: {}};
|
|
1255
|
+
|
|
1256
|
+
(function (module) {
|
|
1257
|
+
/* global define */
|
|
1258
|
+
(function () {
|
|
1259
|
+
|
|
1260
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1261
|
+
|
|
1262
|
+
function classNames() {
|
|
1263
|
+
var classes = [];
|
|
1264
|
+
|
|
1265
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1266
|
+
var arg = arguments[i];
|
|
1267
|
+
if (!arg) continue;
|
|
1268
|
+
|
|
1269
|
+
var argType = _typeof(arg);
|
|
1270
|
+
|
|
1271
|
+
if (argType === 'string' || argType === 'number') {
|
|
1272
|
+
classes.push(arg);
|
|
1273
|
+
} else if (Array.isArray(arg)) {
|
|
1274
|
+
if (arg.length) {
|
|
1275
|
+
var inner = classNames.apply(null, arg);
|
|
1276
|
+
|
|
1277
|
+
if (inner) {
|
|
1278
|
+
classes.push(inner);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
} else if (argType === 'object') {
|
|
1282
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1283
|
+
for (var key in arg) {
|
|
1284
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1285
|
+
classes.push(key);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
} else {
|
|
1289
|
+
classes.push(arg.toString());
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return classes.join(' ');
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
if (module.exports) {
|
|
1298
|
+
classNames["default"] = classNames;
|
|
1299
|
+
module.exports = classNames;
|
|
1300
|
+
} else {
|
|
1301
|
+
window.classNames = classNames;
|
|
1302
|
+
}
|
|
1303
|
+
})();
|
|
1304
|
+
})(classnames);
|
|
1305
|
+
|
|
1306
|
+
var classNames = classnames.exports;
|
|
1307
|
+
|
|
1308
|
+
var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1309
|
+
var Stack = function Stack(_ref) {
|
|
1310
|
+
var className = _ref.className,
|
|
1311
|
+
children = _ref.children,
|
|
1312
|
+
space = _ref.space,
|
|
1313
|
+
_ref$direction = _ref.direction,
|
|
1314
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
1315
|
+
alignItems = _ref.alignItems,
|
|
1316
|
+
justifyContent = _ref.justifyContent,
|
|
1317
|
+
style = _ref.style,
|
|
1318
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
1319
|
+
|
|
1320
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1321
|
+
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
1322
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1323
|
+
alignItems: alignItems,
|
|
1324
|
+
justifyContent: justifyContent
|
|
1325
|
+
})
|
|
1326
|
+
}, rest), children);
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
var omit = function omit(obj) {
|
|
1330
|
+
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1331
|
+
keys[_key - 1] = arguments[_key];
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
return Object.entries(obj).filter(function (_ref) {
|
|
1335
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1336
|
+
key = _ref2[0];
|
|
1337
|
+
|
|
1338
|
+
return !keys.includes(key);
|
|
1339
|
+
}).reduce(function (obj, _ref3) {
|
|
1340
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1341
|
+
key = _ref4[0],
|
|
1342
|
+
val = _ref4[1];
|
|
1343
|
+
|
|
1344
|
+
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
1345
|
+
}, {});
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
var truncate = function truncate(string) {
|
|
1349
|
+
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
1350
|
+
if (!string) return null;
|
|
1351
|
+
var ellipsis = string.length > maxLength;
|
|
1352
|
+
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
1353
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
var stringifyProps = function stringifyProps(props) {
|
|
1357
|
+
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
1358
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1359
|
+
key = _ref2[0],
|
|
1360
|
+
value = _ref2[1];
|
|
1361
|
+
|
|
1362
|
+
if (key === 'children') return "".concat(memo, " children={...}");
|
|
1363
|
+
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
1364
|
+
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
1365
|
+
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
1366
|
+
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
1367
|
+
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
1368
|
+
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
1369
|
+
}, '');
|
|
1370
|
+
return stringifiedProps.trim();
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1374
|
+
|
|
1375
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1376
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1377
|
+
var isEmpty = function isEmpty(obj) {
|
|
1378
|
+
return Object.entries(obj || {}).length === 0;
|
|
1379
|
+
};
|
|
1380
|
+
|
|
1381
|
+
var StatesProps = function StatesProps(_ref) {
|
|
1382
|
+
var props = _ref.props,
|
|
1383
|
+
children = _ref.children;
|
|
1384
|
+
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1385
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
1386
|
+
className: "StatesProps",
|
|
1387
|
+
space: 2,
|
|
1388
|
+
direction: "horizontal"
|
|
1389
|
+
}, /*#__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, " "));
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
var _excluded$D = ["props", "children"];
|
|
1393
|
+
var State = function State(_ref) {
|
|
1394
|
+
var props = _ref.props,
|
|
1395
|
+
children = _ref.children,
|
|
1396
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
1397
|
+
|
|
1398
|
+
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
1399
|
+
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
1400
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1401
|
+
className: "State"
|
|
1402
|
+
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
1403
|
+
className: "State__props"
|
|
1404
|
+
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
1405
|
+
props: props
|
|
1406
|
+
}, innerChildren)));
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
var _excluded$C = ["states", "children"];
|
|
1410
|
+
var States = function States(_ref) {
|
|
1411
|
+
var _ref$states = _ref.states,
|
|
1412
|
+
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1413
|
+
children = _ref.children,
|
|
1414
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
1415
|
+
|
|
1416
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1417
|
+
className: "States"
|
|
1418
|
+
}, states.map(function (props, index) {
|
|
1419
|
+
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
1420
|
+
key: index,
|
|
1421
|
+
props: props
|
|
1422
|
+
}, rest), children);
|
|
1423
|
+
}));
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1251
1426
|
var _assign = function __assign() {
|
|
1252
1427
|
_assign = Object.assign || function __assign(t) {
|
|
1253
1428
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1602,7 +1777,7 @@ RemoveScroll.classNames = {
|
|
|
1602
1777
|
};
|
|
1603
1778
|
|
|
1604
1779
|
function _extends() {
|
|
1605
|
-
_extends = Object.assign
|
|
1780
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1606
1781
|
for (var i = 1; i < arguments.length; i++) {
|
|
1607
1782
|
var source = arguments[i];
|
|
1608
1783
|
|
|
@@ -1615,7 +1790,6 @@ function _extends() {
|
|
|
1615
1790
|
|
|
1616
1791
|
return target;
|
|
1617
1792
|
};
|
|
1618
|
-
|
|
1619
1793
|
return _extends.apply(this, arguments);
|
|
1620
1794
|
}
|
|
1621
1795
|
|
|
@@ -3301,11 +3475,10 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3301
3475
|
});
|
|
3302
3476
|
|
|
3303
3477
|
function _setPrototypeOf(o, p) {
|
|
3304
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
3478
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3305
3479
|
o.__proto__ = p;
|
|
3306
3480
|
return o;
|
|
3307
3481
|
};
|
|
3308
|
-
|
|
3309
3482
|
return _setPrototypeOf(o, p);
|
|
3310
3483
|
}
|
|
3311
3484
|
|
|
@@ -4425,24 +4598,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
|
|
|
4425
4598
|
};
|
|
4426
4599
|
};
|
|
4427
4600
|
|
|
4601
|
+
/**
|
|
4602
|
+
* creates a hook to control style singleton
|
|
4603
|
+
* @see {@link styleSingleton} for a safer component version
|
|
4604
|
+
* @example
|
|
4605
|
+
* ```tsx
|
|
4606
|
+
* const useStyle = styleHookSingleton();
|
|
4607
|
+
* ///
|
|
4608
|
+
* useStyle('body { overflow: hidden}');
|
|
4609
|
+
*/
|
|
4610
|
+
|
|
4428
4611
|
var styleHookSingleton = function styleHookSingleton() {
|
|
4429
4612
|
var sheet = stylesheetSingleton();
|
|
4430
|
-
return function (styles) {
|
|
4613
|
+
return function (styles, isDynamic) {
|
|
4431
4614
|
React.useEffect(function () {
|
|
4432
4615
|
sheet.add(styles);
|
|
4433
4616
|
return function () {
|
|
4434
4617
|
sheet.remove();
|
|
4435
4618
|
};
|
|
4436
|
-
}, [styles]);
|
|
4619
|
+
}, [styles && isDynamic]);
|
|
4437
4620
|
};
|
|
4438
4621
|
};
|
|
4439
4622
|
|
|
4623
|
+
/**
|
|
4624
|
+
* create a Component to add styles on demand
|
|
4625
|
+
* - styles are added when first instance is mounted
|
|
4626
|
+
* - styles are removed when the last instance is unmounted
|
|
4627
|
+
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
4628
|
+
*/
|
|
4629
|
+
|
|
4440
4630
|
var styleSingleton = function styleSingleton() {
|
|
4441
4631
|
var useStyle = styleHookSingleton();
|
|
4442
4632
|
|
|
4443
4633
|
var Sheet = function Sheet(_a) {
|
|
4444
|
-
var styles = _a.styles
|
|
4445
|
-
|
|
4634
|
+
var styles = _a.styles,
|
|
4635
|
+
dynamic = _a.dynamic;
|
|
4636
|
+
useStyle(styles, dynamic);
|
|
4446
4637
|
return null;
|
|
4447
4638
|
};
|
|
4448
4639
|
|
|
@@ -4462,6 +4653,13 @@ var parse = function parse(x) {
|
|
|
4462
4653
|
|
|
4463
4654
|
var getOffset = function getOffset(gapMode) {
|
|
4464
4655
|
var cs = window.getComputedStyle(document.body);
|
|
4656
|
+
|
|
4657
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4658
|
+
if (cs.overflowY === 'hidden') {
|
|
4659
|
+
console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
|
|
4465
4663
|
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
4466
4664
|
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
4467
4665
|
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
@@ -4510,17 +4708,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
4510
4708
|
|
|
4511
4709
|
|
|
4512
4710
|
var RemoveScrollBar = function RemoveScrollBar(props) {
|
|
4513
|
-
var _a = React.useState(getGapWidth(props.gapMode)),
|
|
4514
|
-
gap = _a[0],
|
|
4515
|
-
setGap = _a[1];
|
|
4516
|
-
|
|
4517
|
-
React.useEffect(function () {
|
|
4518
|
-
setGap(getGapWidth(props.gapMode));
|
|
4519
|
-
}, [props.gapMode]);
|
|
4520
4711
|
var noRelative = props.noRelative,
|
|
4521
4712
|
noImportant = props.noImportant,
|
|
4522
|
-
|
|
4523
|
-
gapMode =
|
|
4713
|
+
_a = props.gapMode,
|
|
4714
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
4715
|
+
var gap = React.useMemo(function () {
|
|
4716
|
+
return getGapWidth(gapMode);
|
|
4717
|
+
}, [gapMode]);
|
|
4524
4718
|
return /*#__PURE__*/React.createElement(Style$1, {
|
|
4525
4719
|
styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
|
|
4526
4720
|
});
|
|
@@ -5093,60 +5287,6 @@ var FocusOn = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5093
5287
|
}));
|
|
5094
5288
|
});
|
|
5095
5289
|
|
|
5096
|
-
var classnames = {exports: {}};
|
|
5097
|
-
|
|
5098
|
-
(function (module) {
|
|
5099
|
-
/* global define */
|
|
5100
|
-
(function () {
|
|
5101
|
-
|
|
5102
|
-
var hasOwn = {}.hasOwnProperty;
|
|
5103
|
-
|
|
5104
|
-
function classNames() {
|
|
5105
|
-
var classes = [];
|
|
5106
|
-
|
|
5107
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
5108
|
-
var arg = arguments[i];
|
|
5109
|
-
if (!arg) continue;
|
|
5110
|
-
|
|
5111
|
-
var argType = _typeof(arg);
|
|
5112
|
-
|
|
5113
|
-
if (argType === 'string' || argType === 'number') {
|
|
5114
|
-
classes.push(arg);
|
|
5115
|
-
} else if (Array.isArray(arg)) {
|
|
5116
|
-
if (arg.length) {
|
|
5117
|
-
var inner = classNames.apply(null, arg);
|
|
5118
|
-
|
|
5119
|
-
if (inner) {
|
|
5120
|
-
classes.push(inner);
|
|
5121
|
-
}
|
|
5122
|
-
}
|
|
5123
|
-
} else if (argType === 'object') {
|
|
5124
|
-
if (arg.toString === Object.prototype.toString) {
|
|
5125
|
-
for (var key in arg) {
|
|
5126
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
5127
|
-
classes.push(key);
|
|
5128
|
-
}
|
|
5129
|
-
}
|
|
5130
|
-
} else {
|
|
5131
|
-
classes.push(arg.toString());
|
|
5132
|
-
}
|
|
5133
|
-
}
|
|
5134
|
-
}
|
|
5135
|
-
|
|
5136
|
-
return classes.join(' ');
|
|
5137
|
-
}
|
|
5138
|
-
|
|
5139
|
-
if (module.exports) {
|
|
5140
|
-
classNames["default"] = classNames;
|
|
5141
|
-
module.exports = classNames;
|
|
5142
|
-
} else {
|
|
5143
|
-
window.classNames = classNames;
|
|
5144
|
-
}
|
|
5145
|
-
})();
|
|
5146
|
-
})(classnames);
|
|
5147
|
-
|
|
5148
|
-
var classNames = classnames.exports;
|
|
5149
|
-
|
|
5150
5290
|
var dist$3 = {};
|
|
5151
5291
|
|
|
5152
5292
|
var scale = {};
|
|
@@ -5254,7 +5394,7 @@ var scale = {};
|
|
|
5254
5394
|
__exportStar(scale, exports);
|
|
5255
5395
|
})(dist$3);
|
|
5256
5396
|
|
|
5257
|
-
var _excluded$
|
|
5397
|
+
var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5258
5398
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5259
5399
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5260
5400
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5269,7 +5409,7 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5269
5409
|
outlined = _ref$outlined === void 0 ? false : _ref$outlined,
|
|
5270
5410
|
children = _ref.children,
|
|
5271
5411
|
className = _ref.className,
|
|
5272
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5412
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5273
5413
|
|
|
5274
5414
|
var _scale = dist$3.scale({
|
|
5275
5415
|
width: aspectWidth,
|
|
@@ -5299,23 +5439,23 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5299
5439
|
});
|
|
5300
5440
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5301
5441
|
|
|
5302
|
-
var _excluded$
|
|
5442
|
+
var _excluded$A = ["className", "theme", "children"];
|
|
5303
5443
|
var Badge = function Badge(_ref) {
|
|
5304
5444
|
var className = _ref.className,
|
|
5305
5445
|
theme = _ref.theme,
|
|
5306
5446
|
children = _ref.children,
|
|
5307
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5447
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5308
5448
|
|
|
5309
5449
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
5310
5450
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5311
5451
|
}, rest), children);
|
|
5312
5452
|
};
|
|
5313
5453
|
|
|
5314
|
-
var _excluded$
|
|
5454
|
+
var _excluded$z = ["children", "className"];
|
|
5315
5455
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5316
5456
|
var children = _ref.children,
|
|
5317
5457
|
className = _ref.className,
|
|
5318
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5458
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5319
5459
|
|
|
5320
5460
|
var position = 0;
|
|
5321
5461
|
return /*#__PURE__*/React__default.createElement("ol", _extends$1({
|
|
@@ -5335,7 +5475,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5335
5475
|
}));
|
|
5336
5476
|
};
|
|
5337
5477
|
|
|
5338
|
-
var _excluded$
|
|
5478
|
+
var _excluded$y = ["className", "styleless", "disabled"];
|
|
5339
5479
|
|
|
5340
5480
|
var isLink = function isLink(props) {
|
|
5341
5481
|
return 'to' in props;
|
|
@@ -5354,7 +5494,7 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5354
5494
|
_ref$styleless = _ref.styleless,
|
|
5355
5495
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5356
5496
|
disabled = _ref.disabled,
|
|
5357
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5497
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5358
5498
|
|
|
5359
5499
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5360
5500
|
className: classNames({
|
|
@@ -5377,14 +5517,14 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5377
5517
|
});
|
|
5378
5518
|
Clickable.displayName = 'Clickable';
|
|
5379
5519
|
|
|
5380
|
-
var _excluded$
|
|
5520
|
+
var _excluded$x = ["className", "disabled", "children", "underlined"];
|
|
5381
5521
|
var ControlLink = function ControlLink(_ref) {
|
|
5382
5522
|
var className = _ref.className,
|
|
5383
5523
|
disabled = _ref.disabled,
|
|
5384
5524
|
children = _ref.children,
|
|
5385
5525
|
_ref$underlined = _ref.underlined,
|
|
5386
5526
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5387
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5527
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
5388
5528
|
|
|
5389
5529
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({}, rest, {
|
|
5390
5530
|
className: classNames('ControlLink', {
|
|
@@ -5396,12 +5536,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5396
5536
|
}), children);
|
|
5397
5537
|
};
|
|
5398
5538
|
|
|
5399
|
-
var _excluded$
|
|
5539
|
+
var _excluded$w = ["children", "position", "className"];
|
|
5400
5540
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5401
5541
|
var children = _ref.children,
|
|
5402
5542
|
position = _ref.position,
|
|
5403
5543
|
className = _ref.className,
|
|
5404
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5544
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
5405
5545
|
|
|
5406
5546
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
5407
5547
|
className: classNames('Breadcrumb', className),
|
|
@@ -5420,7 +5560,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5420
5560
|
}));
|
|
5421
5561
|
};
|
|
5422
5562
|
|
|
5423
|
-
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
5563
|
+
var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
5564
|
+
|
|
5424
5565
|
var ONE_PIXEL = 1 / 16;
|
|
5425
5566
|
var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
5426
5567
|
var mode = _ref.mode,
|
|
@@ -5430,21 +5571,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
|
5430
5571
|
case 'at':
|
|
5431
5572
|
{
|
|
5432
5573
|
var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
|
|
5433
|
-
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
|
|
5574
|
+
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
|
|
5434
5575
|
return {
|
|
5435
5576
|
min: prevWidth,
|
|
5436
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5577
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5437
5578
|
};
|
|
5438
5579
|
}
|
|
5439
5580
|
|
|
5440
5581
|
case 'gt':
|
|
5441
5582
|
return {
|
|
5442
|
-
min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
|
|
5583
|
+
min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
|
|
5443
5584
|
};
|
|
5444
5585
|
|
|
5445
5586
|
case 'lt':
|
|
5446
5587
|
return {
|
|
5447
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5588
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5448
5589
|
};
|
|
5449
5590
|
}
|
|
5450
5591
|
};
|
|
@@ -5534,10 +5675,10 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
5534
5675
|
};
|
|
5535
5676
|
};
|
|
5536
5677
|
|
|
5537
|
-
var _excluded$
|
|
5678
|
+
var _excluded$v = ["children"];
|
|
5538
5679
|
var Breakpoint = function Breakpoint(_ref) {
|
|
5539
5680
|
var children = _ref.children,
|
|
5540
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5681
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
5541
5682
|
|
|
5542
5683
|
var _discriminate = discriminate(rest),
|
|
5543
5684
|
mode = _discriminate.mode,
|
|
@@ -5551,7 +5692,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
5551
5692
|
}, children) : null;
|
|
5552
5693
|
};
|
|
5553
5694
|
|
|
5554
|
-
var _excluded$
|
|
5695
|
+
var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
|
|
5555
5696
|
var Button = function Button(_ref) {
|
|
5556
5697
|
var secondary = _ref.secondary,
|
|
5557
5698
|
chip = _ref.chip,
|
|
@@ -5559,7 +5700,7 @@ var Button = function Button(_ref) {
|
|
|
5559
5700
|
focus = _ref.focus,
|
|
5560
5701
|
disabled = _ref.disabled,
|
|
5561
5702
|
className = _ref.className,
|
|
5562
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5703
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
5563
5704
|
|
|
5564
5705
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
5565
5706
|
className: classNames('Button', {
|
|
@@ -5710,7 +5851,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
5710
5851
|
|
|
5711
5852
|
Circle12.displayName = 'Circle12';
|
|
5712
5853
|
|
|
5713
|
-
var _excluded$
|
|
5854
|
+
var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
|
|
5714
5855
|
var CHECKED_ITEM_PROPS = {
|
|
5715
5856
|
className: 'Checkbox__check-mark',
|
|
5716
5857
|
height: '85%',
|
|
@@ -5726,9 +5867,9 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5726
5867
|
value = _ref.value,
|
|
5727
5868
|
onChange = _ref.onChange,
|
|
5728
5869
|
disabled = _ref.disabled,
|
|
5729
|
-
_ref$
|
|
5730
|
-
|
|
5731
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5870
|
+
_ref$checkIcon = _ref.checkIcon,
|
|
5871
|
+
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
5872
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
5732
5873
|
|
|
5733
5874
|
var _useState = useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
5734
5875
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5753,7 +5894,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5753
5894
|
className: classNames('Checkbox__indicator', {
|
|
5754
5895
|
'Checkbox__indicator--disabled': disabled
|
|
5755
5896
|
})
|
|
5756
|
-
}, isChecked && /*#__PURE__*/React__default.createElement(React__default.Fragment, null,
|
|
5897
|
+
}, isChecked && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, checkIcon === 'checkmark' && /*#__PURE__*/React__default.createElement(Checkmark16, CHECKED_ITEM_PROPS), checkIcon === 'circle' && /*#__PURE__*/React__default.createElement(Circle12, CHECKED_ITEM_PROPS))), /*#__PURE__*/React__default.createElement("input", _extends$1({
|
|
5757
5898
|
tabIndex: -1,
|
|
5758
5899
|
className: "Checkbox__input",
|
|
5759
5900
|
type: "checkbox",
|
|
@@ -5816,7 +5957,7 @@ var SKU_COLORS = {
|
|
|
5816
5957
|
yellow: '#ffca44'
|
|
5817
5958
|
};
|
|
5818
5959
|
|
|
5819
|
-
var _excluded$
|
|
5960
|
+
var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
|
|
5820
5961
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
5821
5962
|
var className = _ref.className,
|
|
5822
5963
|
size = _ref.size,
|
|
@@ -5830,7 +5971,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5830
5971
|
onClick = _ref.onClick,
|
|
5831
5972
|
onMouseEnter = _ref.onMouseEnter,
|
|
5832
5973
|
disabled = _ref.disabled,
|
|
5833
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5974
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
5834
5975
|
|
|
5835
5976
|
var handleClick = useCallback(function (_event) {
|
|
5836
5977
|
onClick && onClick(color);
|
|
@@ -5866,22 +6007,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5866
6007
|
}));
|
|
5867
6008
|
};
|
|
5868
6009
|
|
|
5869
|
-
var _excluded$
|
|
6010
|
+
var _excluded$r = ["className", "children"];
|
|
5870
6011
|
var Constrain = function Constrain(_ref) {
|
|
5871
6012
|
var className = _ref.className,
|
|
5872
6013
|
children = _ref.children,
|
|
5873
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6014
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
5874
6015
|
|
|
5875
6016
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5876
6017
|
className: classNames('Constrain', className)
|
|
5877
6018
|
}, rest), children);
|
|
5878
6019
|
};
|
|
5879
6020
|
|
|
5880
|
-
var _excluded$
|
|
6021
|
+
var _excluded$q = ["className", "children"];
|
|
5881
6022
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
5882
6023
|
var className = _ref.className,
|
|
5883
6024
|
children = _ref.children,
|
|
5884
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6025
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
5885
6026
|
|
|
5886
6027
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5887
6028
|
className: classNames('ExceedConstrain', className)
|
|
@@ -8293,7 +8434,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
8293
8434
|
|
|
8294
8435
|
Warning16.displayName = 'Warning16';
|
|
8295
8436
|
|
|
8296
|
-
var _excluded$
|
|
8437
|
+
var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
8297
8438
|
var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
8298
8439
|
var className = _ref.className,
|
|
8299
8440
|
disabled = _ref.disabled,
|
|
@@ -8303,7 +8444,7 @@ var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
8303
8444
|
label = _ref.label,
|
|
8304
8445
|
_onChange = _ref.onChange,
|
|
8305
8446
|
onChangeEvent = _ref.onChangeEvent,
|
|
8306
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8447
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
8307
8448
|
|
|
8308
8449
|
return /*#__PURE__*/React__default.createElement("input", _extends$1({
|
|
8309
8450
|
className: classNames('TextInput', className, {
|
|
@@ -8642,7 +8783,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8642
8783
|
return function () {
|
|
8643
8784
|
el.removeEventListener('keydown', handleKeyDown);
|
|
8644
8785
|
};
|
|
8645
|
-
}, [handleKeyDown, ref, idleTimeout]);
|
|
8786
|
+
}, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8787
|
+
|
|
8646
8788
|
useEffect(function () {
|
|
8647
8789
|
return dispatch({
|
|
8648
8790
|
type: 'RESET',
|
|
@@ -8658,6 +8800,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8658
8800
|
});
|
|
8659
8801
|
};
|
|
8660
8802
|
|
|
8803
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8661
8804
|
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
8662
8805
|
var didMountRef = useRef(false);
|
|
8663
8806
|
useEffect(function () {
|
|
@@ -8669,7 +8812,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
8669
8812
|
}, deps);
|
|
8670
8813
|
};
|
|
8671
8814
|
|
|
8672
|
-
var _excluded$
|
|
8815
|
+
var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
|
|
8673
8816
|
var Text = function Text(_ref) {
|
|
8674
8817
|
var className = _ref.className,
|
|
8675
8818
|
_ref$treatment = _ref.treatment,
|
|
@@ -8679,7 +8822,7 @@ var Text = function Text(_ref) {
|
|
|
8679
8822
|
family = _ref.family,
|
|
8680
8823
|
children = _ref.children,
|
|
8681
8824
|
style = _ref.style,
|
|
8682
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8825
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
8683
8826
|
|
|
8684
8827
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
8685
8828
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
@@ -8836,7 +8979,7 @@ var Search20 = function Search20(_a) {
|
|
|
8836
8979
|
|
|
8837
8980
|
Search20.displayName = 'Search20';
|
|
8838
8981
|
|
|
8839
|
-
var _excluded$
|
|
8982
|
+
var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
|
|
8840
8983
|
var DEFAULT_INPUT_VALUE = '';
|
|
8841
8984
|
var SearchInput = function SearchInput(_ref) {
|
|
8842
8985
|
var className = _ref.className,
|
|
@@ -8845,7 +8988,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
8845
8988
|
onClear = _ref.onClear,
|
|
8846
8989
|
_ref$value = _ref.value,
|
|
8847
8990
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
8848
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8991
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
8849
8992
|
|
|
8850
8993
|
var ref = useRef(null);
|
|
8851
8994
|
|
|
@@ -9071,7 +9214,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9071
9214
|
}, option.label);
|
|
9072
9215
|
};
|
|
9073
9216
|
|
|
9074
|
-
var _excluded$
|
|
9217
|
+
var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
|
|
9075
9218
|
var SelectOptions = function SelectOptions(_ref) {
|
|
9076
9219
|
var idRef = _ref.idRef,
|
|
9077
9220
|
searchable = _ref.searchable,
|
|
@@ -9082,7 +9225,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9082
9225
|
onSelect = _ref.onSelect,
|
|
9083
9226
|
onFocus = _ref.onFocus,
|
|
9084
9227
|
className = _ref.className,
|
|
9085
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9228
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
9086
9229
|
|
|
9087
9230
|
var _useState = useState(''),
|
|
9088
9231
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -9260,7 +9403,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
9260
9403
|
};
|
|
9261
9404
|
};
|
|
9262
9405
|
|
|
9263
|
-
var _excluded$
|
|
9406
|
+
var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value"];
|
|
9264
9407
|
var Select = function Select(_ref) {
|
|
9265
9408
|
var _ref2;
|
|
9266
9409
|
|
|
@@ -9281,11 +9424,12 @@ var Select = function Select(_ref) {
|
|
|
9281
9424
|
name = _ref.name,
|
|
9282
9425
|
onChange = _ref.onChange,
|
|
9283
9426
|
options = _ref.options,
|
|
9427
|
+
placeholder = _ref.placeholder,
|
|
9284
9428
|
searchable = _ref.searchable,
|
|
9285
9429
|
_ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
|
|
9286
9430
|
shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
|
|
9287
9431
|
value = _ref.value,
|
|
9288
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9432
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
9289
9433
|
|
|
9290
9434
|
var _useSelect = useSelect({
|
|
9291
9435
|
value: value,
|
|
@@ -9360,7 +9504,7 @@ var Select = function Select(_ref) {
|
|
|
9360
9504
|
title: "Select"
|
|
9361
9505
|
}, /*#__PURE__*/React__default.createElement(SelectLabel, {
|
|
9362
9506
|
idRef: idRef,
|
|
9363
|
-
label: label,
|
|
9507
|
+
label: label || (selected === undefined ? placeholder : undefined),
|
|
9364
9508
|
hasValue: focused != null || selected != null
|
|
9365
9509
|
}), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React__default.createElement("span", {
|
|
9366
9510
|
className: classNames('Select__icon', {
|
|
@@ -10951,7 +11095,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
10951
11095
|
|
|
10952
11096
|
Exit16.displayName = 'Exit16';
|
|
10953
11097
|
|
|
10954
|
-
var _excluded$
|
|
11098
|
+
var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
10955
11099
|
var MultiSelect = function MultiSelect(_ref) {
|
|
10956
11100
|
var className = _ref.className,
|
|
10957
11101
|
defaultValue = _ref.defaultValue,
|
|
@@ -10966,7 +11110,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10966
11110
|
searchable = _ref.searchable,
|
|
10967
11111
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
10968
11112
|
value = _ref.value,
|
|
10969
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11113
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10970
11114
|
|
|
10971
11115
|
var _useSelect = useSelect({
|
|
10972
11116
|
value: value,
|
|
@@ -11066,14 +11210,14 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11066
11210
|
}));
|
|
11067
11211
|
};
|
|
11068
11212
|
|
|
11069
|
-
var _excluded$
|
|
11213
|
+
var _excluded$j = ["className", "children", "error", "label", "placeholder"];
|
|
11070
11214
|
var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
11071
11215
|
var className = _ref.className,
|
|
11072
11216
|
children = _ref.children,
|
|
11073
11217
|
error = _ref.error,
|
|
11074
11218
|
label = _ref.label,
|
|
11075
11219
|
placeholder = _ref.placeholder,
|
|
11076
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11220
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11077
11221
|
|
|
11078
11222
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
11079
11223
|
className: classNames('Field', className)
|
|
@@ -11102,17 +11246,17 @@ var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
11102
11246
|
});
|
|
11103
11247
|
Field.displayName = 'Field';
|
|
11104
11248
|
|
|
11105
|
-
var _excluded$
|
|
11249
|
+
var _excluded$i = ["onChange"];
|
|
11106
11250
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11107
11251
|
var onChange = _ref.onChange,
|
|
11108
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11252
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11109
11253
|
|
|
11110
11254
|
return /*#__PURE__*/React__default.createElement(Field, _extends$1({}, rest, {
|
|
11111
11255
|
onChangeEvent: onChange
|
|
11112
11256
|
}));
|
|
11113
11257
|
};
|
|
11114
11258
|
|
|
11115
|
-
var _excluded$
|
|
11259
|
+
var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11116
11260
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11117
11261
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11118
11262
|
var _ref2;
|
|
@@ -11127,7 +11271,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11127
11271
|
onFocus = _ref.onFocus,
|
|
11128
11272
|
onBlur = _ref.onBlur,
|
|
11129
11273
|
onChange = _ref.onChange,
|
|
11130
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11274
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11131
11275
|
|
|
11132
11276
|
var _useState = useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11133
11277
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11153,6 +11297,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11153
11297
|
setValue(event.target.value);
|
|
11154
11298
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
|
|
11155
11299
|
}, [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
|
|
11300
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11156
11301
|
|
|
11157
11302
|
var renderInputField = function renderInputField(inputProps) {
|
|
11158
11303
|
return /*#__PURE__*/React__default.createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
|
|
@@ -11172,19 +11317,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11172
11317
|
}, renderInputField);
|
|
11173
11318
|
};
|
|
11174
11319
|
|
|
11175
|
-
var _excluded$
|
|
11320
|
+
var _excluded$g = ["term", "children", "className"];
|
|
11176
11321
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11177
11322
|
var term = _ref.term,
|
|
11178
11323
|
children = _ref.children,
|
|
11179
11324
|
className = _ref.className,
|
|
11180
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11325
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11181
11326
|
|
|
11182
11327
|
return /*#__PURE__*/React__default.createElement("dl", _extends$1({
|
|
11183
11328
|
className: classNames('DefinitionList', className)
|
|
11184
11329
|
}, rest), /*#__PURE__*/React__default.createElement("dt", null, term), /*#__PURE__*/React__default.createElement("dd", null, children));
|
|
11185
11330
|
};
|
|
11186
11331
|
|
|
11187
|
-
var _excluded$
|
|
11332
|
+
var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
|
|
11188
11333
|
var Expandable = function Expandable(_ref) {
|
|
11189
11334
|
var name = _ref.name,
|
|
11190
11335
|
children = _ref.children,
|
|
@@ -11196,7 +11341,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11196
11341
|
dataTestId = _ref['data-testid'],
|
|
11197
11342
|
_ref$expanded = _ref.expanded,
|
|
11198
11343
|
__expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
11199
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11344
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11200
11345
|
|
|
11201
11346
|
var _useState = useState(__expanded__),
|
|
11202
11347
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11225,7 +11370,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11225
11370
|
}, expanded || !virtual ? children : null));
|
|
11226
11371
|
};
|
|
11227
11372
|
|
|
11228
|
-
var _excluded$
|
|
11373
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11229
11374
|
var Divider = function Divider(_ref) {
|
|
11230
11375
|
var text = _ref.text,
|
|
11231
11376
|
treatment = _ref.treatment,
|
|
@@ -11233,7 +11378,7 @@ var Divider = function Divider(_ref) {
|
|
|
11233
11378
|
family = _ref.family,
|
|
11234
11379
|
type = _ref.type,
|
|
11235
11380
|
className = _ref.className,
|
|
11236
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11381
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11237
11382
|
|
|
11238
11383
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11239
11384
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
@@ -11249,21 +11394,21 @@ var Divider = function Divider(_ref) {
|
|
|
11249
11394
|
|
|
11250
11395
|
var TwoLineDivider = function TwoLineDivider(props) {
|
|
11251
11396
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11252
|
-
type:
|
|
11397
|
+
type: "two-line"
|
|
11253
11398
|
}));
|
|
11254
11399
|
};
|
|
11255
11400
|
|
|
11256
11401
|
var NoLineDivider = function NoLineDivider(props) {
|
|
11257
11402
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11258
|
-
type:
|
|
11403
|
+
type: "no-line"
|
|
11259
11404
|
}));
|
|
11260
11405
|
};
|
|
11261
11406
|
|
|
11262
|
-
var _excluded$
|
|
11407
|
+
var _excluded$d = ["className", "hidden"];
|
|
11263
11408
|
var Label = function Label(_ref) {
|
|
11264
11409
|
var className = _ref.className,
|
|
11265
11410
|
hidden = _ref.hidden,
|
|
11266
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11411
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11267
11412
|
|
|
11268
11413
|
return /*#__PURE__*/React__default.createElement("label", _extends$1({
|
|
11269
11414
|
className: classNames('Label', className, {
|
|
@@ -11395,11 +11540,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11395
11540
|
}));
|
|
11396
11541
|
};
|
|
11397
11542
|
|
|
11398
|
-
var _excluded$
|
|
11543
|
+
var _excluded$c = ["className"];
|
|
11399
11544
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11400
11545
|
var Loading = function Loading(_ref) {
|
|
11401
11546
|
var className = _ref.className,
|
|
11402
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11547
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11403
11548
|
|
|
11404
11549
|
var _useCursor = dist.useCursor({
|
|
11405
11550
|
max: FRAMES.length
|
|
@@ -11407,8 +11552,9 @@ var Loading = function Loading(_ref) {
|
|
|
11407
11552
|
index = _useCursor.index,
|
|
11408
11553
|
handleNext = _useCursor.handleNext;
|
|
11409
11554
|
|
|
11555
|
+
var ONE_SECOND_INTERVAL = 1000;
|
|
11410
11556
|
useEffect(function () {
|
|
11411
|
-
var interval = setInterval(handleNext,
|
|
11557
|
+
var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
|
|
11412
11558
|
return function () {
|
|
11413
11559
|
return clearInterval(interval);
|
|
11414
11560
|
};
|
|
@@ -11474,13 +11620,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
|
|
|
11474
11620
|
})));
|
|
11475
11621
|
};
|
|
11476
11622
|
|
|
11477
|
-
var _excluded$
|
|
11623
|
+
var _excluded$b = ["className", "children", "onClose", "shards"];
|
|
11478
11624
|
var Modal = function Modal(_ref) {
|
|
11479
11625
|
var className = _ref.className,
|
|
11480
11626
|
children = _ref.children,
|
|
11481
11627
|
onClose = _ref.onClose,
|
|
11482
11628
|
shards = _ref.shards,
|
|
11483
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11629
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11484
11630
|
|
|
11485
11631
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
11486
11632
|
className: classNames('Modal', className)
|
|
@@ -11491,14 +11637,14 @@ var Modal = function Modal(_ref) {
|
|
|
11491
11637
|
}, children));
|
|
11492
11638
|
};
|
|
11493
11639
|
|
|
11494
|
-
var _excluded$
|
|
11640
|
+
var _excluded$a = ["className", "children", "show"];
|
|
11495
11641
|
var UNMOUNT_DELAY_MS = 500;
|
|
11496
11642
|
var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11497
11643
|
var className = _ref.className,
|
|
11498
11644
|
children = _ref.children,
|
|
11499
11645
|
_ref$show = _ref.show,
|
|
11500
11646
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11501
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11647
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
11502
11648
|
|
|
11503
11649
|
var _useState = useState(show),
|
|
11504
11650
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11528,7 +11674,7 @@ var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11528
11674
|
});
|
|
11529
11675
|
Overlay.displayName = 'Overlay';
|
|
11530
11676
|
|
|
11531
|
-
var _excluded$
|
|
11677
|
+
var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
|
|
11532
11678
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
11533
11679
|
var children = _ref.children,
|
|
11534
11680
|
className = _ref.className,
|
|
@@ -11538,7 +11684,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
11538
11684
|
_ref$show = _ref.show,
|
|
11539
11685
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11540
11686
|
shards = _ref.shards,
|
|
11541
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11687
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
11542
11688
|
|
|
11543
11689
|
var element = useMemo(function () {
|
|
11544
11690
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
@@ -11809,8 +11955,11 @@ var Paginator = function Paginator(_ref) {
|
|
|
11809
11955
|
})));
|
|
11810
11956
|
};
|
|
11811
11957
|
|
|
11812
|
-
var _excluded$
|
|
11958
|
+
var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
|
|
11813
11959
|
var POPOVER_MOUSEOUT_DELAY_MS = 200;
|
|
11960
|
+
var THREE_QUARTER_SECOND_DELAY = 750;
|
|
11961
|
+
var ONE_SECOND_DELAY = 1000;
|
|
11962
|
+
var FIVE_SECOND_DELAY = 5000;
|
|
11814
11963
|
var Mode;
|
|
11815
11964
|
|
|
11816
11965
|
(function (Mode) {
|
|
@@ -11834,7 +11983,7 @@ var Popover = function Popover(_ref) {
|
|
|
11834
11983
|
autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
|
|
11835
11984
|
_ref$smoothTransition = _ref.smoothTransitioning,
|
|
11836
11985
|
smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
|
|
11837
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11986
|
+
rest = _objectWithoutProperties(_ref, _excluded$8);
|
|
11838
11987
|
|
|
11839
11988
|
var _useState = useState(function () {
|
|
11840
11989
|
if (open && smoothTransitioning) {
|
|
@@ -11878,7 +12027,7 @@ var Popover = function Popover(_ref) {
|
|
|
11878
12027
|
if (mode !== Mode.Closing) return;
|
|
11879
12028
|
var closingTimeout = setTimeout(function () {
|
|
11880
12029
|
return setMode(Mode.Closed);
|
|
11881
|
-
},
|
|
12030
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11882
12031
|
return function () {
|
|
11883
12032
|
return clearTimeout(closingTimeout);
|
|
11884
12033
|
};
|
|
@@ -11887,7 +12036,7 @@ var Popover = function Popover(_ref) {
|
|
|
11887
12036
|
if (mode !== Mode.AutoOpening) return;
|
|
11888
12037
|
var openingTimeout = setTimeout(function () {
|
|
11889
12038
|
return setMode(Mode.AutoOpen);
|
|
11890
|
-
},
|
|
12039
|
+
}, ONE_SECOND_DELAY);
|
|
11891
12040
|
return function () {
|
|
11892
12041
|
return clearTimeout(openingTimeout);
|
|
11893
12042
|
};
|
|
@@ -11896,14 +12045,14 @@ var Popover = function Popover(_ref) {
|
|
|
11896
12045
|
if (mode !== Mode.Opening) return;
|
|
11897
12046
|
var openingTimeout = setTimeout(function () {
|
|
11898
12047
|
return setMode(Mode.Open);
|
|
11899
|
-
},
|
|
12048
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11900
12049
|
return function () {
|
|
11901
12050
|
return clearTimeout(openingTimeout);
|
|
11902
12051
|
};
|
|
11903
12052
|
}, [mode]);
|
|
11904
12053
|
useEffect(function () {
|
|
11905
12054
|
if (mode !== Mode.AutoOpen) return;
|
|
11906
|
-
var stayingTimeout = setTimeout(handleClose,
|
|
12055
|
+
var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
|
|
11907
12056
|
return function () {
|
|
11908
12057
|
return clearTimeout(stayingTimeout);
|
|
11909
12058
|
};
|
|
@@ -11937,11 +12086,11 @@ var Popover = function Popover(_ref) {
|
|
|
11937
12086
|
}, content)), children));
|
|
11938
12087
|
};
|
|
11939
12088
|
|
|
11940
|
-
var _excluded$
|
|
12089
|
+
var _excluded$7 = ["className", "children"];
|
|
11941
12090
|
var PromoBanner = function PromoBanner(_ref) {
|
|
11942
12091
|
var className = _ref.className,
|
|
11943
12092
|
children = _ref.children,
|
|
11944
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12093
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
11945
12094
|
|
|
11946
12095
|
var length = Children.count(children);
|
|
11947
12096
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
@@ -11960,7 +12109,7 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
11960
12109
|
})));
|
|
11961
12110
|
};
|
|
11962
12111
|
|
|
11963
|
-
var _excluded$
|
|
12112
|
+
var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
|
|
11964
12113
|
var RadioButton = function RadioButton(_ref) {
|
|
11965
12114
|
var className = _ref.className,
|
|
11966
12115
|
checked = _ref.checked,
|
|
@@ -11968,7 +12117,7 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
11968
12117
|
value = _ref.value,
|
|
11969
12118
|
tabIndex = _ref.tabIndex,
|
|
11970
12119
|
disabled = _ref.disabled,
|
|
11971
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12120
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
11972
12121
|
|
|
11973
12122
|
var inputRef = useRef(null);
|
|
11974
12123
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -12005,14 +12154,14 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
12005
12154
|
}, children));
|
|
12006
12155
|
};
|
|
12007
12156
|
|
|
12008
|
-
var _excluded$
|
|
12157
|
+
var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
|
|
12009
12158
|
var SelectableButton = function SelectableButton(_ref) {
|
|
12010
12159
|
var className = _ref.className,
|
|
12011
12160
|
hover = _ref.hover,
|
|
12012
12161
|
selected = _ref.selected,
|
|
12013
12162
|
unavailable = _ref.unavailable,
|
|
12014
12163
|
children = _ref.children,
|
|
12015
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12164
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12016
12165
|
|
|
12017
12166
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
12018
12167
|
className: classNames('SelectableButton', {
|
|
@@ -12023,34 +12172,13 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12023
12172
|
}, rest), /*#__PURE__*/React__default.createElement("span", null, children));
|
|
12024
12173
|
};
|
|
12025
12174
|
|
|
12026
|
-
var _excluded$
|
|
12027
|
-
var Stack = function Stack(_ref) {
|
|
12028
|
-
var className = _ref.className,
|
|
12029
|
-
children = _ref.children,
|
|
12030
|
-
space = _ref.space,
|
|
12031
|
-
_ref$direction = _ref.direction,
|
|
12032
|
-
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
12033
|
-
alignItems = _ref.alignItems,
|
|
12034
|
-
justifyContent = _ref.justifyContent,
|
|
12035
|
-
style = _ref.style,
|
|
12036
|
-
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
12037
|
-
|
|
12038
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12039
|
-
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
12040
|
-
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
12041
|
-
alignItems: alignItems,
|
|
12042
|
-
justifyContent: justifyContent
|
|
12043
|
-
})
|
|
12044
|
-
}, rest), children);
|
|
12045
|
-
};
|
|
12046
|
-
|
|
12047
|
-
var _excluded$6 = ["className", "disabled", "onRemove", "children"];
|
|
12175
|
+
var _excluded$4 = ["className", "disabled", "onRemove", "children"];
|
|
12048
12176
|
var Tag = function Tag(_ref) {
|
|
12049
12177
|
var className = _ref.className,
|
|
12050
12178
|
disabled = _ref.disabled,
|
|
12051
12179
|
onRemove = _ref.onRemove,
|
|
12052
12180
|
children = _ref.children,
|
|
12053
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12181
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
12054
12182
|
|
|
12055
12183
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12056
12184
|
className: classNames('Tag', className, {
|
|
@@ -12063,13 +12191,13 @@ var Tag = function Tag(_ref) {
|
|
|
12063
12191
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12064
12192
|
};
|
|
12065
12193
|
|
|
12066
|
-
var _excluded$
|
|
12194
|
+
var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
|
|
12067
12195
|
var Tabs = function Tabs(_ref) {
|
|
12068
12196
|
var tabs = _ref.tabs,
|
|
12069
12197
|
onTabClicked = _ref.onTabClicked,
|
|
12070
12198
|
activeTab = _ref.activeTab,
|
|
12071
12199
|
className = _ref.className,
|
|
12072
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12200
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
12073
12201
|
|
|
12074
12202
|
var _useState = useState(activeTab || tabs[0].name),
|
|
12075
12203
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12149,7 +12277,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
12149
12277
|
}, children);
|
|
12150
12278
|
};
|
|
12151
12279
|
|
|
12152
|
-
var _excluded$
|
|
12280
|
+
var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
|
|
12153
12281
|
var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
12154
12282
|
var className = _ref.className,
|
|
12155
12283
|
disabled = _ref.disabled,
|
|
@@ -12158,7 +12286,7 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12158
12286
|
placeholder = _ref.placeholder,
|
|
12159
12287
|
label = _ref.label,
|
|
12160
12288
|
_onChange = _ref.onChange,
|
|
12161
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12289
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
12162
12290
|
|
|
12163
12291
|
return /*#__PURE__*/React__default.createElement("textarea", _extends$1({
|
|
12164
12292
|
className: classNames('Textarea', className, {
|
|
@@ -12177,13 +12305,13 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12177
12305
|
});
|
|
12178
12306
|
Textarea.displayName = 'Textarea';
|
|
12179
12307
|
|
|
12180
|
-
var _excluded$
|
|
12308
|
+
var _excluded$1 = ["theme", "className", "onRemove", "children"];
|
|
12181
12309
|
var Toast = function Toast(_ref) {
|
|
12182
12310
|
var theme = _ref.theme,
|
|
12183
12311
|
className = _ref.className,
|
|
12184
12312
|
onRemove = _ref.onRemove,
|
|
12185
12313
|
children = _ref.children,
|
|
12186
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12314
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12187
12315
|
|
|
12188
12316
|
return /*#__PURE__*/React__default.createElement(Stack, _extends$1({
|
|
12189
12317
|
className: classNames('Toast', "Toast--".concat(theme), className),
|
|
@@ -12200,11 +12328,11 @@ var Toast = function Toast(_ref) {
|
|
|
12200
12328
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12201
12329
|
};
|
|
12202
12330
|
|
|
12203
|
-
var _excluded
|
|
12331
|
+
var _excluded = ["className", "double"];
|
|
12204
12332
|
var VerticalDivider = function VerticalDivider(_ref) {
|
|
12205
12333
|
var className = _ref.className,
|
|
12206
12334
|
_double = _ref["double"],
|
|
12207
|
-
rest = _objectWithoutProperties(_ref, _excluded
|
|
12335
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12208
12336
|
|
|
12209
12337
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12210
12338
|
className: classNames('VerticalDivider', {
|
|
@@ -12243,102 +12371,6 @@ var PasswordInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12243
12371
|
});
|
|
12244
12372
|
PasswordInput.displayName = 'PasswordInput';
|
|
12245
12373
|
|
|
12246
|
-
var isRenderProps = function isRenderProps(children) {
|
|
12247
|
-
return typeof children === 'function';
|
|
12248
|
-
};
|
|
12249
|
-
|
|
12250
|
-
var truncate = function truncate(string) {
|
|
12251
|
-
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
12252
|
-
if (!string) return null;
|
|
12253
|
-
var ellipsis = string.length > maxLength;
|
|
12254
|
-
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
12255
|
-
};
|
|
12256
|
-
|
|
12257
|
-
var stringifyProps = function stringifyProps(props) {
|
|
12258
|
-
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
12259
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
12260
|
-
key = _ref2[0],
|
|
12261
|
-
value = _ref2[1];
|
|
12262
|
-
|
|
12263
|
-
if (key === 'children') return "".concat(memo, " children={...}");
|
|
12264
|
-
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
12265
|
-
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
12266
|
-
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
12267
|
-
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
12268
|
-
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
12269
|
-
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
12270
|
-
}, '');
|
|
12271
|
-
return stringifiedProps.trim();
|
|
12272
|
-
};
|
|
12273
|
-
|
|
12274
|
-
var omit = function omit(obj) {
|
|
12275
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12276
|
-
keys[_key - 1] = arguments[_key];
|
|
12277
|
-
}
|
|
12278
|
-
|
|
12279
|
-
return Object.entries(obj).filter(function (_ref) {
|
|
12280
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
12281
|
-
key = _ref2[0];
|
|
12282
|
-
|
|
12283
|
-
return !keys.includes(key);
|
|
12284
|
-
}).reduce(function (obj, _ref3) {
|
|
12285
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
12286
|
-
key = _ref4[0],
|
|
12287
|
-
val = _ref4[1];
|
|
12288
|
-
|
|
12289
|
-
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
12290
|
-
}, {});
|
|
12291
|
-
};
|
|
12292
|
-
|
|
12293
|
-
var isEmpty = function isEmpty(obj) {
|
|
12294
|
-
return Object.entries(obj || {}).length === 0;
|
|
12295
|
-
};
|
|
12296
|
-
|
|
12297
|
-
var StatesProps = function StatesProps(_ref) {
|
|
12298
|
-
var props = _ref.props,
|
|
12299
|
-
children = _ref.children;
|
|
12300
|
-
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
12301
|
-
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
12302
|
-
className: "StatesProps",
|
|
12303
|
-
space: 2,
|
|
12304
|
-
direction: "horizontal"
|
|
12305
|
-
}, /*#__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, " "));
|
|
12306
|
-
};
|
|
12307
|
-
|
|
12308
|
-
var _excluded$1 = ["props", "children"];
|
|
12309
|
-
var State = function State(_ref) {
|
|
12310
|
-
var props = _ref.props,
|
|
12311
|
-
children = _ref.children,
|
|
12312
|
-
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12313
|
-
|
|
12314
|
-
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
12315
|
-
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
12316
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12317
|
-
className: "State"
|
|
12318
|
-
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
12319
|
-
className: "State__props"
|
|
12320
|
-
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
12321
|
-
props: props
|
|
12322
|
-
}, innerChildren)));
|
|
12323
|
-
};
|
|
12324
|
-
|
|
12325
|
-
var _excluded = ["states", "children"];
|
|
12326
|
-
var States = function States(_ref) {
|
|
12327
|
-
var _ref$states = _ref.states,
|
|
12328
|
-
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
12329
|
-
children = _ref.children,
|
|
12330
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12331
|
-
|
|
12332
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12333
|
-
className: "States"
|
|
12334
|
-
}, states.map(function (props, i) {
|
|
12335
|
-
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
12336
|
-
key: i,
|
|
12337
|
-
props: props
|
|
12338
|
-
}, rest), children);
|
|
12339
|
-
}));
|
|
12340
|
-
};
|
|
12341
|
-
|
|
12342
12374
|
var tokens = {
|
|
12343
12375
|
colors: dist$4.colors,
|
|
12344
12376
|
typography: dist$4.typography,
|