@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.cjs.js
CHANGED
|
@@ -26,8 +26,8 @@ function _interopNamespace(e) {
|
|
|
26
26
|
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
29
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
31
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
32
32
|
|
|
33
33
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -1147,7 +1147,7 @@ function _defineProperty$1(obj, key, value) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
1149
|
function _extends$1() {
|
|
1150
|
-
_extends$1 = Object.assign
|
|
1150
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1151
1151
|
for (var i = 1; i < arguments.length; i++) {
|
|
1152
1152
|
var source = arguments[i];
|
|
1153
1153
|
|
|
@@ -1160,7 +1160,6 @@ function _extends$1() {
|
|
|
1160
1160
|
|
|
1161
1161
|
return target;
|
|
1162
1162
|
};
|
|
1163
|
-
|
|
1164
1163
|
return _extends$1.apply(this, arguments);
|
|
1165
1164
|
}
|
|
1166
1165
|
|
|
@@ -1275,6 +1274,182 @@ function _nonIterableRest() {
|
|
|
1275
1274
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1276
1275
|
}
|
|
1277
1276
|
|
|
1277
|
+
var isRenderProps = function isRenderProps(children) {
|
|
1278
|
+
return typeof children === 'function';
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1281
|
+
var classnames = {exports: {}};
|
|
1282
|
+
|
|
1283
|
+
(function (module) {
|
|
1284
|
+
/* global define */
|
|
1285
|
+
(function () {
|
|
1286
|
+
|
|
1287
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1288
|
+
|
|
1289
|
+
function classNames() {
|
|
1290
|
+
var classes = [];
|
|
1291
|
+
|
|
1292
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1293
|
+
var arg = arguments[i];
|
|
1294
|
+
if (!arg) continue;
|
|
1295
|
+
|
|
1296
|
+
var argType = _typeof(arg);
|
|
1297
|
+
|
|
1298
|
+
if (argType === 'string' || argType === 'number') {
|
|
1299
|
+
classes.push(arg);
|
|
1300
|
+
} else if (Array.isArray(arg)) {
|
|
1301
|
+
if (arg.length) {
|
|
1302
|
+
var inner = classNames.apply(null, arg);
|
|
1303
|
+
|
|
1304
|
+
if (inner) {
|
|
1305
|
+
classes.push(inner);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
} else if (argType === 'object') {
|
|
1309
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1310
|
+
for (var key in arg) {
|
|
1311
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1312
|
+
classes.push(key);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
} else {
|
|
1316
|
+
classes.push(arg.toString());
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
return classes.join(' ');
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
if (module.exports) {
|
|
1325
|
+
classNames["default"] = classNames;
|
|
1326
|
+
module.exports = classNames;
|
|
1327
|
+
} else {
|
|
1328
|
+
window.classNames = classNames;
|
|
1329
|
+
}
|
|
1330
|
+
})();
|
|
1331
|
+
})(classnames);
|
|
1332
|
+
|
|
1333
|
+
var classNames = classnames.exports;
|
|
1334
|
+
|
|
1335
|
+
var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1336
|
+
var Stack = function Stack(_ref) {
|
|
1337
|
+
var className = _ref.className,
|
|
1338
|
+
children = _ref.children,
|
|
1339
|
+
space = _ref.space,
|
|
1340
|
+
_ref$direction = _ref.direction,
|
|
1341
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
1342
|
+
alignItems = _ref.alignItems,
|
|
1343
|
+
justifyContent = _ref.justifyContent,
|
|
1344
|
+
style = _ref.style,
|
|
1345
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
1346
|
+
|
|
1347
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1348
|
+
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
1349
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1350
|
+
alignItems: alignItems,
|
|
1351
|
+
justifyContent: justifyContent
|
|
1352
|
+
})
|
|
1353
|
+
}, rest), children);
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
var omit = function omit(obj) {
|
|
1357
|
+
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1358
|
+
keys[_key - 1] = arguments[_key];
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
return Object.entries(obj).filter(function (_ref) {
|
|
1362
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1363
|
+
key = _ref2[0];
|
|
1364
|
+
|
|
1365
|
+
return !keys.includes(key);
|
|
1366
|
+
}).reduce(function (obj, _ref3) {
|
|
1367
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1368
|
+
key = _ref4[0],
|
|
1369
|
+
val = _ref4[1];
|
|
1370
|
+
|
|
1371
|
+
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
1372
|
+
}, {});
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
var truncate = function truncate(string) {
|
|
1376
|
+
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
1377
|
+
if (!string) return null;
|
|
1378
|
+
var ellipsis = string.length > maxLength;
|
|
1379
|
+
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
1380
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
var stringifyProps = function stringifyProps(props) {
|
|
1384
|
+
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
1385
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1386
|
+
key = _ref2[0],
|
|
1387
|
+
value = _ref2[1];
|
|
1388
|
+
|
|
1389
|
+
if (key === 'children') return "".concat(memo, " children={...}");
|
|
1390
|
+
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
1391
|
+
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
1392
|
+
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
1393
|
+
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
1394
|
+
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
1395
|
+
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
1396
|
+
}, '');
|
|
1397
|
+
return stringifiedProps.trim();
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1401
|
+
|
|
1402
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1403
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1404
|
+
var isEmpty = function isEmpty(obj) {
|
|
1405
|
+
return Object.entries(obj || {}).length === 0;
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
var StatesProps = function StatesProps(_ref) {
|
|
1409
|
+
var props = _ref.props,
|
|
1410
|
+
children = _ref.children;
|
|
1411
|
+
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1412
|
+
return /*#__PURE__*/React__default["default"].createElement(Stack, {
|
|
1413
|
+
className: "StatesProps",
|
|
1414
|
+
space: 2,
|
|
1415
|
+
direction: "horizontal"
|
|
1416
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
var _excluded$D = ["props", "children"];
|
|
1420
|
+
var State = function State(_ref) {
|
|
1421
|
+
var props = _ref.props,
|
|
1422
|
+
children = _ref.children,
|
|
1423
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
1424
|
+
|
|
1425
|
+
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
|
|
1426
|
+
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
1427
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1428
|
+
className: "State"
|
|
1429
|
+
}, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
|
|
1430
|
+
className: "State__props"
|
|
1431
|
+
}, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
|
|
1432
|
+
props: props
|
|
1433
|
+
}, innerChildren)));
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
var _excluded$C = ["states", "children"];
|
|
1437
|
+
var States = function States(_ref) {
|
|
1438
|
+
var _ref$states = _ref.states,
|
|
1439
|
+
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1440
|
+
children = _ref.children,
|
|
1441
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
1442
|
+
|
|
1443
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1444
|
+
className: "States"
|
|
1445
|
+
}, states.map(function (props, index) {
|
|
1446
|
+
return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
|
|
1447
|
+
key: index,
|
|
1448
|
+
props: props
|
|
1449
|
+
}, rest), children);
|
|
1450
|
+
}));
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1278
1453
|
var _assign = function __assign() {
|
|
1279
1454
|
_assign = Object.assign || function __assign(t) {
|
|
1280
1455
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1629,7 +1804,7 @@ RemoveScroll.classNames = {
|
|
|
1629
1804
|
};
|
|
1630
1805
|
|
|
1631
1806
|
function _extends() {
|
|
1632
|
-
_extends = Object.assign
|
|
1807
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1633
1808
|
for (var i = 1; i < arguments.length; i++) {
|
|
1634
1809
|
var source = arguments[i];
|
|
1635
1810
|
|
|
@@ -1642,7 +1817,6 @@ function _extends() {
|
|
|
1642
1817
|
|
|
1643
1818
|
return target;
|
|
1644
1819
|
};
|
|
1645
|
-
|
|
1646
1820
|
return _extends.apply(this, arguments);
|
|
1647
1821
|
}
|
|
1648
1822
|
|
|
@@ -3328,11 +3502,10 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
|
|
|
3328
3502
|
});
|
|
3329
3503
|
|
|
3330
3504
|
function _setPrototypeOf(o, p) {
|
|
3331
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
3505
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3332
3506
|
o.__proto__ = p;
|
|
3333
3507
|
return o;
|
|
3334
3508
|
};
|
|
3335
|
-
|
|
3336
3509
|
return _setPrototypeOf(o, p);
|
|
3337
3510
|
}
|
|
3338
3511
|
|
|
@@ -4452,24 +4625,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
|
|
|
4452
4625
|
};
|
|
4453
4626
|
};
|
|
4454
4627
|
|
|
4628
|
+
/**
|
|
4629
|
+
* creates a hook to control style singleton
|
|
4630
|
+
* @see {@link styleSingleton} for a safer component version
|
|
4631
|
+
* @example
|
|
4632
|
+
* ```tsx
|
|
4633
|
+
* const useStyle = styleHookSingleton();
|
|
4634
|
+
* ///
|
|
4635
|
+
* useStyle('body { overflow: hidden}');
|
|
4636
|
+
*/
|
|
4637
|
+
|
|
4455
4638
|
var styleHookSingleton = function styleHookSingleton() {
|
|
4456
4639
|
var sheet = stylesheetSingleton();
|
|
4457
|
-
return function (styles) {
|
|
4640
|
+
return function (styles, isDynamic) {
|
|
4458
4641
|
React__namespace.useEffect(function () {
|
|
4459
4642
|
sheet.add(styles);
|
|
4460
4643
|
return function () {
|
|
4461
4644
|
sheet.remove();
|
|
4462
4645
|
};
|
|
4463
|
-
}, [styles]);
|
|
4646
|
+
}, [styles && isDynamic]);
|
|
4464
4647
|
};
|
|
4465
4648
|
};
|
|
4466
4649
|
|
|
4650
|
+
/**
|
|
4651
|
+
* create a Component to add styles on demand
|
|
4652
|
+
* - styles are added when first instance is mounted
|
|
4653
|
+
* - styles are removed when the last instance is unmounted
|
|
4654
|
+
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
4655
|
+
*/
|
|
4656
|
+
|
|
4467
4657
|
var styleSingleton = function styleSingleton() {
|
|
4468
4658
|
var useStyle = styleHookSingleton();
|
|
4469
4659
|
|
|
4470
4660
|
var Sheet = function Sheet(_a) {
|
|
4471
|
-
var styles = _a.styles
|
|
4472
|
-
|
|
4661
|
+
var styles = _a.styles,
|
|
4662
|
+
dynamic = _a.dynamic;
|
|
4663
|
+
useStyle(styles, dynamic);
|
|
4473
4664
|
return null;
|
|
4474
4665
|
};
|
|
4475
4666
|
|
|
@@ -4489,6 +4680,13 @@ var parse = function parse(x) {
|
|
|
4489
4680
|
|
|
4490
4681
|
var getOffset = function getOffset(gapMode) {
|
|
4491
4682
|
var cs = window.getComputedStyle(document.body);
|
|
4683
|
+
|
|
4684
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4685
|
+
if (cs.overflowY === 'hidden') {
|
|
4686
|
+
console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4492
4690
|
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
4493
4691
|
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
4494
4692
|
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
@@ -4537,17 +4735,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
4537
4735
|
|
|
4538
4736
|
|
|
4539
4737
|
var RemoveScrollBar = function RemoveScrollBar(props) {
|
|
4540
|
-
var _a = React__namespace.useState(getGapWidth(props.gapMode)),
|
|
4541
|
-
gap = _a[0],
|
|
4542
|
-
setGap = _a[1];
|
|
4543
|
-
|
|
4544
|
-
React__namespace.useEffect(function () {
|
|
4545
|
-
setGap(getGapWidth(props.gapMode));
|
|
4546
|
-
}, [props.gapMode]);
|
|
4547
4738
|
var noRelative = props.noRelative,
|
|
4548
4739
|
noImportant = props.noImportant,
|
|
4549
|
-
|
|
4550
|
-
gapMode =
|
|
4740
|
+
_a = props.gapMode,
|
|
4741
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
4742
|
+
var gap = React__namespace.useMemo(function () {
|
|
4743
|
+
return getGapWidth(gapMode);
|
|
4744
|
+
}, [gapMode]);
|
|
4551
4745
|
return /*#__PURE__*/React__namespace.createElement(Style$1, {
|
|
4552
4746
|
styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
|
|
4553
4747
|
});
|
|
@@ -5120,60 +5314,6 @@ var FocusOn = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
|
5120
5314
|
}));
|
|
5121
5315
|
});
|
|
5122
5316
|
|
|
5123
|
-
var classnames = {exports: {}};
|
|
5124
|
-
|
|
5125
|
-
(function (module) {
|
|
5126
|
-
/* global define */
|
|
5127
|
-
(function () {
|
|
5128
|
-
|
|
5129
|
-
var hasOwn = {}.hasOwnProperty;
|
|
5130
|
-
|
|
5131
|
-
function classNames() {
|
|
5132
|
-
var classes = [];
|
|
5133
|
-
|
|
5134
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
5135
|
-
var arg = arguments[i];
|
|
5136
|
-
if (!arg) continue;
|
|
5137
|
-
|
|
5138
|
-
var argType = _typeof(arg);
|
|
5139
|
-
|
|
5140
|
-
if (argType === 'string' || argType === 'number') {
|
|
5141
|
-
classes.push(arg);
|
|
5142
|
-
} else if (Array.isArray(arg)) {
|
|
5143
|
-
if (arg.length) {
|
|
5144
|
-
var inner = classNames.apply(null, arg);
|
|
5145
|
-
|
|
5146
|
-
if (inner) {
|
|
5147
|
-
classes.push(inner);
|
|
5148
|
-
}
|
|
5149
|
-
}
|
|
5150
|
-
} else if (argType === 'object') {
|
|
5151
|
-
if (arg.toString === Object.prototype.toString) {
|
|
5152
|
-
for (var key in arg) {
|
|
5153
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
5154
|
-
classes.push(key);
|
|
5155
|
-
}
|
|
5156
|
-
}
|
|
5157
|
-
} else {
|
|
5158
|
-
classes.push(arg.toString());
|
|
5159
|
-
}
|
|
5160
|
-
}
|
|
5161
|
-
}
|
|
5162
|
-
|
|
5163
|
-
return classes.join(' ');
|
|
5164
|
-
}
|
|
5165
|
-
|
|
5166
|
-
if (module.exports) {
|
|
5167
|
-
classNames["default"] = classNames;
|
|
5168
|
-
module.exports = classNames;
|
|
5169
|
-
} else {
|
|
5170
|
-
window.classNames = classNames;
|
|
5171
|
-
}
|
|
5172
|
-
})();
|
|
5173
|
-
})(classnames);
|
|
5174
|
-
|
|
5175
|
-
var classNames = classnames.exports;
|
|
5176
|
-
|
|
5177
5317
|
var dist$3 = {};
|
|
5178
5318
|
|
|
5179
5319
|
var scale = {};
|
|
@@ -5281,7 +5421,7 @@ var scale = {};
|
|
|
5281
5421
|
__exportStar(scale, exports);
|
|
5282
5422
|
})(dist$3);
|
|
5283
5423
|
|
|
5284
|
-
var _excluded$
|
|
5424
|
+
var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5285
5425
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5286
5426
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5287
5427
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5296,7 +5436,7 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
5296
5436
|
outlined = _ref$outlined === void 0 ? false : _ref$outlined,
|
|
5297
5437
|
children = _ref.children,
|
|
5298
5438
|
className = _ref.className,
|
|
5299
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5439
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5300
5440
|
|
|
5301
5441
|
var _scale = dist$3.scale({
|
|
5302
5442
|
width: aspectWidth,
|
|
@@ -5326,23 +5466,23 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
5326
5466
|
});
|
|
5327
5467
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5328
5468
|
|
|
5329
|
-
var _excluded$
|
|
5469
|
+
var _excluded$A = ["className", "theme", "children"];
|
|
5330
5470
|
var Badge = function Badge(_ref) {
|
|
5331
5471
|
var className = _ref.className,
|
|
5332
5472
|
theme = _ref.theme,
|
|
5333
5473
|
children = _ref.children,
|
|
5334
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5474
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5335
5475
|
|
|
5336
5476
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
|
|
5337
5477
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5338
5478
|
}, rest), children);
|
|
5339
5479
|
};
|
|
5340
5480
|
|
|
5341
|
-
var _excluded$
|
|
5481
|
+
var _excluded$z = ["children", "className"];
|
|
5342
5482
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5343
5483
|
var children = _ref.children,
|
|
5344
5484
|
className = _ref.className,
|
|
5345
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5485
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5346
5486
|
|
|
5347
5487
|
var position = 0;
|
|
5348
5488
|
return /*#__PURE__*/React__default["default"].createElement("ol", _extends$1({
|
|
@@ -5362,7 +5502,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5362
5502
|
}));
|
|
5363
5503
|
};
|
|
5364
5504
|
|
|
5365
|
-
var _excluded$
|
|
5505
|
+
var _excluded$y = ["className", "styleless", "disabled"];
|
|
5366
5506
|
|
|
5367
5507
|
var isLink = function isLink(props) {
|
|
5368
5508
|
return 'to' in props;
|
|
@@ -5381,7 +5521,7 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
5381
5521
|
_ref$styleless = _ref.styleless,
|
|
5382
5522
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5383
5523
|
disabled = _ref.disabled,
|
|
5384
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5524
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5385
5525
|
|
|
5386
5526
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5387
5527
|
className: classNames({
|
|
@@ -5404,14 +5544,14 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
5404
5544
|
});
|
|
5405
5545
|
Clickable.displayName = 'Clickable';
|
|
5406
5546
|
|
|
5407
|
-
var _excluded$
|
|
5547
|
+
var _excluded$x = ["className", "disabled", "children", "underlined"];
|
|
5408
5548
|
var ControlLink = function ControlLink(_ref) {
|
|
5409
5549
|
var className = _ref.className,
|
|
5410
5550
|
disabled = _ref.disabled,
|
|
5411
5551
|
children = _ref.children,
|
|
5412
5552
|
_ref$underlined = _ref.underlined,
|
|
5413
5553
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5414
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5554
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
5415
5555
|
|
|
5416
5556
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({}, rest, {
|
|
5417
5557
|
className: classNames('ControlLink', {
|
|
@@ -5423,12 +5563,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5423
5563
|
}), children);
|
|
5424
5564
|
};
|
|
5425
5565
|
|
|
5426
|
-
var _excluded$
|
|
5566
|
+
var _excluded$w = ["children", "position", "className"];
|
|
5427
5567
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5428
5568
|
var children = _ref.children,
|
|
5429
5569
|
position = _ref.position,
|
|
5430
5570
|
className = _ref.className,
|
|
5431
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5571
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
5432
5572
|
|
|
5433
5573
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
5434
5574
|
className: classNames('Breadcrumb', className),
|
|
@@ -5447,7 +5587,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5447
5587
|
}));
|
|
5448
5588
|
};
|
|
5449
5589
|
|
|
5450
|
-
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
5590
|
+
var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
5591
|
+
|
|
5451
5592
|
var ONE_PIXEL = 1 / 16;
|
|
5452
5593
|
var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
5453
5594
|
var mode = _ref.mode,
|
|
@@ -5457,21 +5598,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
|
5457
5598
|
case 'at':
|
|
5458
5599
|
{
|
|
5459
5600
|
var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
|
|
5460
|
-
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
|
|
5601
|
+
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
|
|
5461
5602
|
return {
|
|
5462
5603
|
min: prevWidth,
|
|
5463
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5604
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5464
5605
|
};
|
|
5465
5606
|
}
|
|
5466
5607
|
|
|
5467
5608
|
case 'gt':
|
|
5468
5609
|
return {
|
|
5469
|
-
min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
|
|
5610
|
+
min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
|
|
5470
5611
|
};
|
|
5471
5612
|
|
|
5472
5613
|
case 'lt':
|
|
5473
5614
|
return {
|
|
5474
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5615
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5475
5616
|
};
|
|
5476
5617
|
}
|
|
5477
5618
|
};
|
|
@@ -5561,10 +5702,10 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
5561
5702
|
};
|
|
5562
5703
|
};
|
|
5563
5704
|
|
|
5564
|
-
var _excluded$
|
|
5705
|
+
var _excluded$v = ["children"];
|
|
5565
5706
|
var Breakpoint = function Breakpoint(_ref) {
|
|
5566
5707
|
var children = _ref.children,
|
|
5567
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5708
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
5568
5709
|
|
|
5569
5710
|
var _discriminate = discriminate(rest),
|
|
5570
5711
|
mode = _discriminate.mode,
|
|
@@ -5578,7 +5719,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
5578
5719
|
}, children) : null;
|
|
5579
5720
|
};
|
|
5580
5721
|
|
|
5581
|
-
var _excluded$
|
|
5722
|
+
var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
|
|
5582
5723
|
var Button = function Button(_ref) {
|
|
5583
5724
|
var secondary = _ref.secondary,
|
|
5584
5725
|
chip = _ref.chip,
|
|
@@ -5586,7 +5727,7 @@ var Button = function Button(_ref) {
|
|
|
5586
5727
|
focus = _ref.focus,
|
|
5587
5728
|
disabled = _ref.disabled,
|
|
5588
5729
|
className = _ref.className,
|
|
5589
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5730
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
5590
5731
|
|
|
5591
5732
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
|
|
5592
5733
|
className: classNames('Button', {
|
|
@@ -5737,7 +5878,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
5737
5878
|
|
|
5738
5879
|
Circle12.displayName = 'Circle12';
|
|
5739
5880
|
|
|
5740
|
-
var _excluded$
|
|
5881
|
+
var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
|
|
5741
5882
|
var CHECKED_ITEM_PROPS = {
|
|
5742
5883
|
className: 'Checkbox__check-mark',
|
|
5743
5884
|
height: '85%',
|
|
@@ -5753,9 +5894,9 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5753
5894
|
value = _ref.value,
|
|
5754
5895
|
onChange = _ref.onChange,
|
|
5755
5896
|
disabled = _ref.disabled,
|
|
5756
|
-
_ref$
|
|
5757
|
-
|
|
5758
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5897
|
+
_ref$checkIcon = _ref.checkIcon,
|
|
5898
|
+
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
5899
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
5759
5900
|
|
|
5760
5901
|
var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
5761
5902
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5780,7 +5921,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5780
5921
|
className: classNames('Checkbox__indicator', {
|
|
5781
5922
|
'Checkbox__indicator--disabled': disabled
|
|
5782
5923
|
})
|
|
5783
|
-
}, isChecked && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5924
|
+
}, isChecked && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, checkIcon === 'checkmark' && /*#__PURE__*/React__default["default"].createElement(Checkmark16, CHECKED_ITEM_PROPS), checkIcon === 'circle' && /*#__PURE__*/React__default["default"].createElement(Circle12, CHECKED_ITEM_PROPS))), /*#__PURE__*/React__default["default"].createElement("input", _extends$1({
|
|
5784
5925
|
tabIndex: -1,
|
|
5785
5926
|
className: "Checkbox__input",
|
|
5786
5927
|
type: "checkbox",
|
|
@@ -5843,7 +5984,7 @@ var SKU_COLORS = {
|
|
|
5843
5984
|
yellow: '#ffca44'
|
|
5844
5985
|
};
|
|
5845
5986
|
|
|
5846
|
-
var _excluded$
|
|
5987
|
+
var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
|
|
5847
5988
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
5848
5989
|
var className = _ref.className,
|
|
5849
5990
|
size = _ref.size,
|
|
@@ -5857,7 +5998,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5857
5998
|
onClick = _ref.onClick,
|
|
5858
5999
|
onMouseEnter = _ref.onMouseEnter,
|
|
5859
6000
|
disabled = _ref.disabled,
|
|
5860
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6001
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
5861
6002
|
|
|
5862
6003
|
var handleClick = React.useCallback(function (_event) {
|
|
5863
6004
|
onClick && onClick(color);
|
|
@@ -5893,22 +6034,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5893
6034
|
}));
|
|
5894
6035
|
};
|
|
5895
6036
|
|
|
5896
|
-
var _excluded$
|
|
6037
|
+
var _excluded$r = ["className", "children"];
|
|
5897
6038
|
var Constrain = function Constrain(_ref) {
|
|
5898
6039
|
var className = _ref.className,
|
|
5899
6040
|
children = _ref.children,
|
|
5900
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6041
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
5901
6042
|
|
|
5902
6043
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
5903
6044
|
className: classNames('Constrain', className)
|
|
5904
6045
|
}, rest), children);
|
|
5905
6046
|
};
|
|
5906
6047
|
|
|
5907
|
-
var _excluded$
|
|
6048
|
+
var _excluded$q = ["className", "children"];
|
|
5908
6049
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
5909
6050
|
var className = _ref.className,
|
|
5910
6051
|
children = _ref.children,
|
|
5911
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6052
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
5912
6053
|
|
|
5913
6054
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
5914
6055
|
className: classNames('ExceedConstrain', className)
|
|
@@ -8320,7 +8461,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
8320
8461
|
|
|
8321
8462
|
Warning16.displayName = 'Warning16';
|
|
8322
8463
|
|
|
8323
|
-
var _excluded$
|
|
8464
|
+
var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
8324
8465
|
var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
8325
8466
|
var className = _ref.className,
|
|
8326
8467
|
disabled = _ref.disabled,
|
|
@@ -8330,7 +8471,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
8330
8471
|
label = _ref.label,
|
|
8331
8472
|
_onChange = _ref.onChange,
|
|
8332
8473
|
onChangeEvent = _ref.onChangeEvent,
|
|
8333
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8474
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
8334
8475
|
|
|
8335
8476
|
return /*#__PURE__*/React__default["default"].createElement("input", _extends$1({
|
|
8336
8477
|
className: classNames('TextInput', className, {
|
|
@@ -8669,7 +8810,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8669
8810
|
return function () {
|
|
8670
8811
|
el.removeEventListener('keydown', handleKeyDown);
|
|
8671
8812
|
};
|
|
8672
|
-
}, [handleKeyDown, ref, idleTimeout]);
|
|
8813
|
+
}, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8814
|
+
|
|
8673
8815
|
React.useEffect(function () {
|
|
8674
8816
|
return dispatch({
|
|
8675
8817
|
type: 'RESET',
|
|
@@ -8685,6 +8827,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8685
8827
|
});
|
|
8686
8828
|
};
|
|
8687
8829
|
|
|
8830
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8688
8831
|
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
8689
8832
|
var didMountRef = React.useRef(false);
|
|
8690
8833
|
React.useEffect(function () {
|
|
@@ -8696,7 +8839,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
8696
8839
|
}, deps);
|
|
8697
8840
|
};
|
|
8698
8841
|
|
|
8699
|
-
var _excluded$
|
|
8842
|
+
var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
|
|
8700
8843
|
var Text = function Text(_ref) {
|
|
8701
8844
|
var className = _ref.className,
|
|
8702
8845
|
_ref$treatment = _ref.treatment,
|
|
@@ -8706,7 +8849,7 @@ var Text = function Text(_ref) {
|
|
|
8706
8849
|
family = _ref.family,
|
|
8707
8850
|
children = _ref.children,
|
|
8708
8851
|
style = _ref.style,
|
|
8709
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8852
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
8710
8853
|
|
|
8711
8854
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
|
|
8712
8855
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
@@ -8863,7 +9006,7 @@ var Search20 = function Search20(_a) {
|
|
|
8863
9006
|
|
|
8864
9007
|
Search20.displayName = 'Search20';
|
|
8865
9008
|
|
|
8866
|
-
var _excluded$
|
|
9009
|
+
var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
|
|
8867
9010
|
var DEFAULT_INPUT_VALUE = '';
|
|
8868
9011
|
var SearchInput = function SearchInput(_ref) {
|
|
8869
9012
|
var className = _ref.className,
|
|
@@ -8872,7 +9015,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
8872
9015
|
onClear = _ref.onClear,
|
|
8873
9016
|
_ref$value = _ref.value,
|
|
8874
9017
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
8875
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9018
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
8876
9019
|
|
|
8877
9020
|
var ref = React.useRef(null);
|
|
8878
9021
|
|
|
@@ -9098,7 +9241,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9098
9241
|
}, option.label);
|
|
9099
9242
|
};
|
|
9100
9243
|
|
|
9101
|
-
var _excluded$
|
|
9244
|
+
var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
|
|
9102
9245
|
var SelectOptions = function SelectOptions(_ref) {
|
|
9103
9246
|
var idRef = _ref.idRef,
|
|
9104
9247
|
searchable = _ref.searchable,
|
|
@@ -9109,7 +9252,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9109
9252
|
onSelect = _ref.onSelect,
|
|
9110
9253
|
onFocus = _ref.onFocus,
|
|
9111
9254
|
className = _ref.className,
|
|
9112
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9255
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
9113
9256
|
|
|
9114
9257
|
var _useState = React.useState(''),
|
|
9115
9258
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -9287,7 +9430,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
9287
9430
|
};
|
|
9288
9431
|
};
|
|
9289
9432
|
|
|
9290
|
-
var _excluded$
|
|
9433
|
+
var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value"];
|
|
9291
9434
|
var Select = function Select(_ref) {
|
|
9292
9435
|
var _ref2;
|
|
9293
9436
|
|
|
@@ -9308,11 +9451,12 @@ var Select = function Select(_ref) {
|
|
|
9308
9451
|
name = _ref.name,
|
|
9309
9452
|
onChange = _ref.onChange,
|
|
9310
9453
|
options = _ref.options,
|
|
9454
|
+
placeholder = _ref.placeholder,
|
|
9311
9455
|
searchable = _ref.searchable,
|
|
9312
9456
|
_ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
|
|
9313
9457
|
shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
|
|
9314
9458
|
value = _ref.value,
|
|
9315
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9459
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
9316
9460
|
|
|
9317
9461
|
var _useSelect = useSelect({
|
|
9318
9462
|
value: value,
|
|
@@ -9387,7 +9531,7 @@ var Select = function Select(_ref) {
|
|
|
9387
9531
|
title: "Select"
|
|
9388
9532
|
}, /*#__PURE__*/React__default["default"].createElement(SelectLabel, {
|
|
9389
9533
|
idRef: idRef,
|
|
9390
|
-
label: label,
|
|
9534
|
+
label: label || (selected === undefined ? placeholder : undefined),
|
|
9391
9535
|
hasValue: focused != null || selected != null
|
|
9392
9536
|
}), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9393
9537
|
className: classNames('Select__icon', {
|
|
@@ -10978,7 +11122,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
10978
11122
|
|
|
10979
11123
|
Exit16.displayName = 'Exit16';
|
|
10980
11124
|
|
|
10981
|
-
var _excluded$
|
|
11125
|
+
var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
10982
11126
|
var MultiSelect = function MultiSelect(_ref) {
|
|
10983
11127
|
var className = _ref.className,
|
|
10984
11128
|
defaultValue = _ref.defaultValue,
|
|
@@ -10993,7 +11137,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10993
11137
|
searchable = _ref.searchable,
|
|
10994
11138
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
10995
11139
|
value = _ref.value,
|
|
10996
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11140
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10997
11141
|
|
|
10998
11142
|
var _useSelect = useSelect({
|
|
10999
11143
|
value: value,
|
|
@@ -11093,14 +11237,14 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11093
11237
|
}));
|
|
11094
11238
|
};
|
|
11095
11239
|
|
|
11096
|
-
var _excluded$
|
|
11240
|
+
var _excluded$j = ["className", "children", "error", "label", "placeholder"];
|
|
11097
11241
|
var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
11098
11242
|
var className = _ref.className,
|
|
11099
11243
|
children = _ref.children,
|
|
11100
11244
|
error = _ref.error,
|
|
11101
11245
|
label = _ref.label,
|
|
11102
11246
|
placeholder = _ref.placeholder,
|
|
11103
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11247
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11104
11248
|
|
|
11105
11249
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
11106
11250
|
className: classNames('Field', className)
|
|
@@ -11129,17 +11273,17 @@ var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
11129
11273
|
});
|
|
11130
11274
|
Field.displayName = 'Field';
|
|
11131
11275
|
|
|
11132
|
-
var _excluded$
|
|
11276
|
+
var _excluded$i = ["onChange"];
|
|
11133
11277
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11134
11278
|
var onChange = _ref.onChange,
|
|
11135
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11279
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11136
11280
|
|
|
11137
11281
|
return /*#__PURE__*/React__default["default"].createElement(Field, _extends$1({}, rest, {
|
|
11138
11282
|
onChangeEvent: onChange
|
|
11139
11283
|
}));
|
|
11140
11284
|
};
|
|
11141
11285
|
|
|
11142
|
-
var _excluded$
|
|
11286
|
+
var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11143
11287
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11144
11288
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11145
11289
|
var _ref2;
|
|
@@ -11154,7 +11298,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11154
11298
|
onFocus = _ref.onFocus,
|
|
11155
11299
|
onBlur = _ref.onBlur,
|
|
11156
11300
|
onChange = _ref.onChange,
|
|
11157
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11301
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11158
11302
|
|
|
11159
11303
|
var _useState = React.useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11160
11304
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11180,6 +11324,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11180
11324
|
setValue(event.target.value);
|
|
11181
11325
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
|
|
11182
11326
|
}, [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
|
|
11327
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11183
11328
|
|
|
11184
11329
|
var renderInputField = function renderInputField(inputProps) {
|
|
11185
11330
|
return /*#__PURE__*/React__default["default"].createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
|
|
@@ -11199,19 +11344,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11199
11344
|
}, renderInputField);
|
|
11200
11345
|
};
|
|
11201
11346
|
|
|
11202
|
-
var _excluded$
|
|
11347
|
+
var _excluded$g = ["term", "children", "className"];
|
|
11203
11348
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11204
11349
|
var term = _ref.term,
|
|
11205
11350
|
children = _ref.children,
|
|
11206
11351
|
className = _ref.className,
|
|
11207
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11352
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11208
11353
|
|
|
11209
11354
|
return /*#__PURE__*/React__default["default"].createElement("dl", _extends$1({
|
|
11210
11355
|
className: classNames('DefinitionList', className)
|
|
11211
11356
|
}, rest), /*#__PURE__*/React__default["default"].createElement("dt", null, term), /*#__PURE__*/React__default["default"].createElement("dd", null, children));
|
|
11212
11357
|
};
|
|
11213
11358
|
|
|
11214
|
-
var _excluded$
|
|
11359
|
+
var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
|
|
11215
11360
|
var Expandable = function Expandable(_ref) {
|
|
11216
11361
|
var name = _ref.name,
|
|
11217
11362
|
children = _ref.children,
|
|
@@ -11223,7 +11368,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11223
11368
|
dataTestId = _ref['data-testid'],
|
|
11224
11369
|
_ref$expanded = _ref.expanded,
|
|
11225
11370
|
__expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
11226
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11371
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11227
11372
|
|
|
11228
11373
|
var _useState = React.useState(__expanded__),
|
|
11229
11374
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11252,7 +11397,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11252
11397
|
}, expanded || !virtual ? children : null));
|
|
11253
11398
|
};
|
|
11254
11399
|
|
|
11255
|
-
var _excluded$
|
|
11400
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11256
11401
|
var Divider = function Divider(_ref) {
|
|
11257
11402
|
var text = _ref.text,
|
|
11258
11403
|
treatment = _ref.treatment,
|
|
@@ -11260,7 +11405,7 @@ var Divider = function Divider(_ref) {
|
|
|
11260
11405
|
family = _ref.family,
|
|
11261
11406
|
type = _ref.type,
|
|
11262
11407
|
className = _ref.className,
|
|
11263
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11408
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11264
11409
|
|
|
11265
11410
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11266
11411
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
@@ -11276,21 +11421,21 @@ var Divider = function Divider(_ref) {
|
|
|
11276
11421
|
|
|
11277
11422
|
var TwoLineDivider = function TwoLineDivider(props) {
|
|
11278
11423
|
return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
|
|
11279
|
-
type:
|
|
11424
|
+
type: "two-line"
|
|
11280
11425
|
}));
|
|
11281
11426
|
};
|
|
11282
11427
|
|
|
11283
11428
|
var NoLineDivider = function NoLineDivider(props) {
|
|
11284
11429
|
return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
|
|
11285
|
-
type:
|
|
11430
|
+
type: "no-line"
|
|
11286
11431
|
}));
|
|
11287
11432
|
};
|
|
11288
11433
|
|
|
11289
|
-
var _excluded$
|
|
11434
|
+
var _excluded$d = ["className", "hidden"];
|
|
11290
11435
|
var Label = function Label(_ref) {
|
|
11291
11436
|
var className = _ref.className,
|
|
11292
11437
|
hidden = _ref.hidden,
|
|
11293
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11438
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11294
11439
|
|
|
11295
11440
|
return /*#__PURE__*/React__default["default"].createElement("label", _extends$1({
|
|
11296
11441
|
className: classNames('Label', className, {
|
|
@@ -11422,11 +11567,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11422
11567
|
}));
|
|
11423
11568
|
};
|
|
11424
11569
|
|
|
11425
|
-
var _excluded$
|
|
11570
|
+
var _excluded$c = ["className"];
|
|
11426
11571
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11427
11572
|
var Loading = function Loading(_ref) {
|
|
11428
11573
|
var className = _ref.className,
|
|
11429
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11574
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11430
11575
|
|
|
11431
11576
|
var _useCursor = dist.useCursor({
|
|
11432
11577
|
max: FRAMES.length
|
|
@@ -11434,8 +11579,9 @@ var Loading = function Loading(_ref) {
|
|
|
11434
11579
|
index = _useCursor.index,
|
|
11435
11580
|
handleNext = _useCursor.handleNext;
|
|
11436
11581
|
|
|
11582
|
+
var ONE_SECOND_INTERVAL = 1000;
|
|
11437
11583
|
React.useEffect(function () {
|
|
11438
|
-
var interval = setInterval(handleNext,
|
|
11584
|
+
var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
|
|
11439
11585
|
return function () {
|
|
11440
11586
|
return clearInterval(interval);
|
|
11441
11587
|
};
|
|
@@ -11501,13 +11647,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
|
|
|
11501
11647
|
})));
|
|
11502
11648
|
};
|
|
11503
11649
|
|
|
11504
|
-
var _excluded$
|
|
11650
|
+
var _excluded$b = ["className", "children", "onClose", "shards"];
|
|
11505
11651
|
var Modal = function Modal(_ref) {
|
|
11506
11652
|
var className = _ref.className,
|
|
11507
11653
|
children = _ref.children,
|
|
11508
11654
|
onClose = _ref.onClose,
|
|
11509
11655
|
shards = _ref.shards,
|
|
11510
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11656
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11511
11657
|
|
|
11512
11658
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
11513
11659
|
className: classNames('Modal', className)
|
|
@@ -11518,14 +11664,14 @@ var Modal = function Modal(_ref) {
|
|
|
11518
11664
|
}, children));
|
|
11519
11665
|
};
|
|
11520
11666
|
|
|
11521
|
-
var _excluded$
|
|
11667
|
+
var _excluded$a = ["className", "children", "show"];
|
|
11522
11668
|
var UNMOUNT_DELAY_MS = 500;
|
|
11523
11669
|
var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
11524
11670
|
var className = _ref.className,
|
|
11525
11671
|
children = _ref.children,
|
|
11526
11672
|
_ref$show = _ref.show,
|
|
11527
11673
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11528
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11674
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
11529
11675
|
|
|
11530
11676
|
var _useState = React.useState(show),
|
|
11531
11677
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11555,7 +11701,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
11555
11701
|
});
|
|
11556
11702
|
Overlay.displayName = 'Overlay';
|
|
11557
11703
|
|
|
11558
|
-
var _excluded$
|
|
11704
|
+
var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
|
|
11559
11705
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
11560
11706
|
var children = _ref.children,
|
|
11561
11707
|
className = _ref.className,
|
|
@@ -11565,7 +11711,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
11565
11711
|
_ref$show = _ref.show,
|
|
11566
11712
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11567
11713
|
shards = _ref.shards,
|
|
11568
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11714
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
11569
11715
|
|
|
11570
11716
|
var element = React.useMemo(function () {
|
|
11571
11717
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
@@ -11836,8 +11982,11 @@ var Paginator = function Paginator(_ref) {
|
|
|
11836
11982
|
})));
|
|
11837
11983
|
};
|
|
11838
11984
|
|
|
11839
|
-
var _excluded$
|
|
11985
|
+
var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
|
|
11840
11986
|
var POPOVER_MOUSEOUT_DELAY_MS = 200;
|
|
11987
|
+
var THREE_QUARTER_SECOND_DELAY = 750;
|
|
11988
|
+
var ONE_SECOND_DELAY = 1000;
|
|
11989
|
+
var FIVE_SECOND_DELAY = 5000;
|
|
11841
11990
|
var Mode;
|
|
11842
11991
|
|
|
11843
11992
|
(function (Mode) {
|
|
@@ -11861,7 +12010,7 @@ var Popover = function Popover(_ref) {
|
|
|
11861
12010
|
autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
|
|
11862
12011
|
_ref$smoothTransition = _ref.smoothTransitioning,
|
|
11863
12012
|
smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
|
|
11864
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12013
|
+
rest = _objectWithoutProperties(_ref, _excluded$8);
|
|
11865
12014
|
|
|
11866
12015
|
var _useState = React.useState(function () {
|
|
11867
12016
|
if (open && smoothTransitioning) {
|
|
@@ -11905,7 +12054,7 @@ var Popover = function Popover(_ref) {
|
|
|
11905
12054
|
if (mode !== Mode.Closing) return;
|
|
11906
12055
|
var closingTimeout = setTimeout(function () {
|
|
11907
12056
|
return setMode(Mode.Closed);
|
|
11908
|
-
},
|
|
12057
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11909
12058
|
return function () {
|
|
11910
12059
|
return clearTimeout(closingTimeout);
|
|
11911
12060
|
};
|
|
@@ -11914,7 +12063,7 @@ var Popover = function Popover(_ref) {
|
|
|
11914
12063
|
if (mode !== Mode.AutoOpening) return;
|
|
11915
12064
|
var openingTimeout = setTimeout(function () {
|
|
11916
12065
|
return setMode(Mode.AutoOpen);
|
|
11917
|
-
},
|
|
12066
|
+
}, ONE_SECOND_DELAY);
|
|
11918
12067
|
return function () {
|
|
11919
12068
|
return clearTimeout(openingTimeout);
|
|
11920
12069
|
};
|
|
@@ -11923,14 +12072,14 @@ var Popover = function Popover(_ref) {
|
|
|
11923
12072
|
if (mode !== Mode.Opening) return;
|
|
11924
12073
|
var openingTimeout = setTimeout(function () {
|
|
11925
12074
|
return setMode(Mode.Open);
|
|
11926
|
-
},
|
|
12075
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11927
12076
|
return function () {
|
|
11928
12077
|
return clearTimeout(openingTimeout);
|
|
11929
12078
|
};
|
|
11930
12079
|
}, [mode]);
|
|
11931
12080
|
React.useEffect(function () {
|
|
11932
12081
|
if (mode !== Mode.AutoOpen) return;
|
|
11933
|
-
var stayingTimeout = setTimeout(handleClose,
|
|
12082
|
+
var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
|
|
11934
12083
|
return function () {
|
|
11935
12084
|
return clearTimeout(stayingTimeout);
|
|
11936
12085
|
};
|
|
@@ -11964,11 +12113,11 @@ var Popover = function Popover(_ref) {
|
|
|
11964
12113
|
}, content)), children));
|
|
11965
12114
|
};
|
|
11966
12115
|
|
|
11967
|
-
var _excluded$
|
|
12116
|
+
var _excluded$7 = ["className", "children"];
|
|
11968
12117
|
var PromoBanner = function PromoBanner(_ref) {
|
|
11969
12118
|
var className = _ref.className,
|
|
11970
12119
|
children = _ref.children,
|
|
11971
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12120
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
11972
12121
|
|
|
11973
12122
|
var length = React.Children.count(children);
|
|
11974
12123
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
@@ -11987,7 +12136,7 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
11987
12136
|
})));
|
|
11988
12137
|
};
|
|
11989
12138
|
|
|
11990
|
-
var _excluded$
|
|
12139
|
+
var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
|
|
11991
12140
|
var RadioButton = function RadioButton(_ref) {
|
|
11992
12141
|
var className = _ref.className,
|
|
11993
12142
|
checked = _ref.checked,
|
|
@@ -11995,7 +12144,7 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
11995
12144
|
value = _ref.value,
|
|
11996
12145
|
tabIndex = _ref.tabIndex,
|
|
11997
12146
|
disabled = _ref.disabled,
|
|
11998
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12147
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
11999
12148
|
|
|
12000
12149
|
var inputRef = React.useRef(null);
|
|
12001
12150
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
@@ -12032,14 +12181,14 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
12032
12181
|
}, children));
|
|
12033
12182
|
};
|
|
12034
12183
|
|
|
12035
|
-
var _excluded$
|
|
12184
|
+
var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
|
|
12036
12185
|
var SelectableButton = function SelectableButton(_ref) {
|
|
12037
12186
|
var className = _ref.className,
|
|
12038
12187
|
hover = _ref.hover,
|
|
12039
12188
|
selected = _ref.selected,
|
|
12040
12189
|
unavailable = _ref.unavailable,
|
|
12041
12190
|
children = _ref.children,
|
|
12042
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12191
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12043
12192
|
|
|
12044
12193
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
|
|
12045
12194
|
className: classNames('SelectableButton', {
|
|
@@ -12050,34 +12199,13 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12050
12199
|
}, rest), /*#__PURE__*/React__default["default"].createElement("span", null, children));
|
|
12051
12200
|
};
|
|
12052
12201
|
|
|
12053
|
-
var _excluded$
|
|
12054
|
-
var Stack = function Stack(_ref) {
|
|
12055
|
-
var className = _ref.className,
|
|
12056
|
-
children = _ref.children,
|
|
12057
|
-
space = _ref.space,
|
|
12058
|
-
_ref$direction = _ref.direction,
|
|
12059
|
-
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
12060
|
-
alignItems = _ref.alignItems,
|
|
12061
|
-
justifyContent = _ref.justifyContent,
|
|
12062
|
-
style = _ref.style,
|
|
12063
|
-
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
12064
|
-
|
|
12065
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12066
|
-
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
12067
|
-
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
12068
|
-
alignItems: alignItems,
|
|
12069
|
-
justifyContent: justifyContent
|
|
12070
|
-
})
|
|
12071
|
-
}, rest), children);
|
|
12072
|
-
};
|
|
12073
|
-
|
|
12074
|
-
var _excluded$6 = ["className", "disabled", "onRemove", "children"];
|
|
12202
|
+
var _excluded$4 = ["className", "disabled", "onRemove", "children"];
|
|
12075
12203
|
var Tag = function Tag(_ref) {
|
|
12076
12204
|
var className = _ref.className,
|
|
12077
12205
|
disabled = _ref.disabled,
|
|
12078
12206
|
onRemove = _ref.onRemove,
|
|
12079
12207
|
children = _ref.children,
|
|
12080
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12208
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
12081
12209
|
|
|
12082
12210
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12083
12211
|
className: classNames('Tag', className, {
|
|
@@ -12090,13 +12218,13 @@ var Tag = function Tag(_ref) {
|
|
|
12090
12218
|
}, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
|
|
12091
12219
|
};
|
|
12092
12220
|
|
|
12093
|
-
var _excluded$
|
|
12221
|
+
var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
|
|
12094
12222
|
var Tabs = function Tabs(_ref) {
|
|
12095
12223
|
var tabs = _ref.tabs,
|
|
12096
12224
|
onTabClicked = _ref.onTabClicked,
|
|
12097
12225
|
activeTab = _ref.activeTab,
|
|
12098
12226
|
className = _ref.className,
|
|
12099
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12227
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
12100
12228
|
|
|
12101
12229
|
var _useState = React.useState(activeTab || tabs[0].name),
|
|
12102
12230
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12176,7 +12304,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
12176
12304
|
}, children);
|
|
12177
12305
|
};
|
|
12178
12306
|
|
|
12179
|
-
var _excluded$
|
|
12307
|
+
var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
|
|
12180
12308
|
var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
12181
12309
|
var className = _ref.className,
|
|
12182
12310
|
disabled = _ref.disabled,
|
|
@@ -12185,7 +12313,7 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
12185
12313
|
placeholder = _ref.placeholder,
|
|
12186
12314
|
label = _ref.label,
|
|
12187
12315
|
_onChange = _ref.onChange,
|
|
12188
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12316
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
12189
12317
|
|
|
12190
12318
|
return /*#__PURE__*/React__default["default"].createElement("textarea", _extends$1({
|
|
12191
12319
|
className: classNames('Textarea', className, {
|
|
@@ -12204,13 +12332,13 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
12204
12332
|
});
|
|
12205
12333
|
Textarea.displayName = 'Textarea';
|
|
12206
12334
|
|
|
12207
|
-
var _excluded$
|
|
12335
|
+
var _excluded$1 = ["theme", "className", "onRemove", "children"];
|
|
12208
12336
|
var Toast = function Toast(_ref) {
|
|
12209
12337
|
var theme = _ref.theme,
|
|
12210
12338
|
className = _ref.className,
|
|
12211
12339
|
onRemove = _ref.onRemove,
|
|
12212
12340
|
children = _ref.children,
|
|
12213
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12341
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12214
12342
|
|
|
12215
12343
|
return /*#__PURE__*/React__default["default"].createElement(Stack, _extends$1({
|
|
12216
12344
|
className: classNames('Toast', "Toast--".concat(theme), className),
|
|
@@ -12227,11 +12355,11 @@ var Toast = function Toast(_ref) {
|
|
|
12227
12355
|
}, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
|
|
12228
12356
|
};
|
|
12229
12357
|
|
|
12230
|
-
var _excluded
|
|
12358
|
+
var _excluded = ["className", "double"];
|
|
12231
12359
|
var VerticalDivider = function VerticalDivider(_ref) {
|
|
12232
12360
|
var className = _ref.className,
|
|
12233
12361
|
_double = _ref["double"],
|
|
12234
|
-
rest = _objectWithoutProperties(_ref, _excluded
|
|
12362
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12235
12363
|
|
|
12236
12364
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12237
12365
|
className: classNames('VerticalDivider', {
|
|
@@ -12270,102 +12398,6 @@ var PasswordInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12270
12398
|
});
|
|
12271
12399
|
PasswordInput.displayName = 'PasswordInput';
|
|
12272
12400
|
|
|
12273
|
-
var isRenderProps = function isRenderProps(children) {
|
|
12274
|
-
return typeof children === 'function';
|
|
12275
|
-
};
|
|
12276
|
-
|
|
12277
|
-
var truncate = function truncate(string) {
|
|
12278
|
-
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
12279
|
-
if (!string) return null;
|
|
12280
|
-
var ellipsis = string.length > maxLength;
|
|
12281
|
-
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
12282
|
-
};
|
|
12283
|
-
|
|
12284
|
-
var stringifyProps = function stringifyProps(props) {
|
|
12285
|
-
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
12286
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
12287
|
-
key = _ref2[0],
|
|
12288
|
-
value = _ref2[1];
|
|
12289
|
-
|
|
12290
|
-
if (key === 'children') return "".concat(memo, " children={...}");
|
|
12291
|
-
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
12292
|
-
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
12293
|
-
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
12294
|
-
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
12295
|
-
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
12296
|
-
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
12297
|
-
}, '');
|
|
12298
|
-
return stringifiedProps.trim();
|
|
12299
|
-
};
|
|
12300
|
-
|
|
12301
|
-
var omit = function omit(obj) {
|
|
12302
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12303
|
-
keys[_key - 1] = arguments[_key];
|
|
12304
|
-
}
|
|
12305
|
-
|
|
12306
|
-
return Object.entries(obj).filter(function (_ref) {
|
|
12307
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
12308
|
-
key = _ref2[0];
|
|
12309
|
-
|
|
12310
|
-
return !keys.includes(key);
|
|
12311
|
-
}).reduce(function (obj, _ref3) {
|
|
12312
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
12313
|
-
key = _ref4[0],
|
|
12314
|
-
val = _ref4[1];
|
|
12315
|
-
|
|
12316
|
-
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
12317
|
-
}, {});
|
|
12318
|
-
};
|
|
12319
|
-
|
|
12320
|
-
var isEmpty = function isEmpty(obj) {
|
|
12321
|
-
return Object.entries(obj || {}).length === 0;
|
|
12322
|
-
};
|
|
12323
|
-
|
|
12324
|
-
var StatesProps = function StatesProps(_ref) {
|
|
12325
|
-
var props = _ref.props,
|
|
12326
|
-
children = _ref.children;
|
|
12327
|
-
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
12328
|
-
return /*#__PURE__*/React__default["default"].createElement(Stack, {
|
|
12329
|
-
className: "StatesProps",
|
|
12330
|
-
space: 2,
|
|
12331
|
-
direction: "horizontal"
|
|
12332
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
|
|
12333
|
-
};
|
|
12334
|
-
|
|
12335
|
-
var _excluded$1 = ["props", "children"];
|
|
12336
|
-
var State = function State(_ref) {
|
|
12337
|
-
var props = _ref.props,
|
|
12338
|
-
children = _ref.children,
|
|
12339
|
-
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12340
|
-
|
|
12341
|
-
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
|
|
12342
|
-
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
12343
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12344
|
-
className: "State"
|
|
12345
|
-
}, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
|
|
12346
|
-
className: "State__props"
|
|
12347
|
-
}, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
|
|
12348
|
-
props: props
|
|
12349
|
-
}, innerChildren)));
|
|
12350
|
-
};
|
|
12351
|
-
|
|
12352
|
-
var _excluded = ["states", "children"];
|
|
12353
|
-
var States = function States(_ref) {
|
|
12354
|
-
var _ref$states = _ref.states,
|
|
12355
|
-
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
12356
|
-
children = _ref.children,
|
|
12357
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12358
|
-
|
|
12359
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
12360
|
-
className: "States"
|
|
12361
|
-
}, states.map(function (props, i) {
|
|
12362
|
-
return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
|
|
12363
|
-
key: i,
|
|
12364
|
-
props: props
|
|
12365
|
-
}, rest), children);
|
|
12366
|
-
}));
|
|
12367
|
-
};
|
|
12368
|
-
|
|
12369
12401
|
var tokens = {
|
|
12370
12402
|
colors: dist$4.colors,
|
|
12371
12403
|
typography: dist$4.typography,
|