@simplybusiness/mobius 4.16.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/cjs/components/Accordion/Accordion.js +8 -8
- package/dist/cjs/components/Accordion/Accordion.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.js +4 -4
- package/dist/cjs/components/Alert/Alert.js.map +1 -1
- package/dist/cjs/components/Box/Box.js +1 -1
- package/dist/cjs/components/Box/Box.js.map +1 -1
- package/dist/cjs/components/Breadcrumbs/BreadcrumbItem.js +2 -2
- package/dist/cjs/components/Breadcrumbs/BreadcrumbItem.js.map +1 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +4 -2
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Button/Loading.js +12 -6
- package/dist/cjs/components/Button/Loading.js.map +1 -1
- package/dist/cjs/components/Button/Success.js +4 -3
- package/dist/cjs/components/Button/Success.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +10 -6
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/cjs/components/Container/Container.js +1 -1
- package/dist/cjs/components/Container/Container.js.map +1 -1
- package/dist/cjs/components/Divider/Divider.js +2 -2
- package/dist/cjs/components/Divider/Divider.js.map +1 -1
- package/dist/cjs/components/Drawer/Content.js +1 -1
- package/dist/cjs/components/Drawer/Content.js.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.js +1 -1
- package/dist/cjs/components/Drawer/Drawer.js.map +1 -1
- package/dist/cjs/components/Drawer/Header.js +2 -2
- package/dist/cjs/components/Drawer/Header.js.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/cjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/cjs/components/DropdownMenu/Item.js +1 -1
- package/dist/cjs/components/DropdownMenu/Item.js.map +1 -1
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +7 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/dist/cjs/components/Fieldset/Fieldset.js +2 -2
- package/dist/cjs/components/Fieldset/Fieldset.js.map +1 -1
- package/dist/cjs/components/Flex/Flex.js +1 -1
- package/dist/cjs/components/Flex/Flex.js.map +1 -1
- package/dist/cjs/components/Grid/Grid.js +1 -1
- package/dist/cjs/components/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/Grid/Item.js +1 -1
- package/dist/cjs/components/Grid/Item.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.js +1 -1
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Image/Image.js +1 -1
- package/dist/cjs/components/Image/Image.js.map +1 -1
- package/dist/cjs/components/Label/Label.js +1 -1
- package/dist/cjs/components/Label/Label.js.map +1 -1
- package/dist/cjs/components/Link/Link.js +1 -1
- package/dist/cjs/components/Link/Link.js.map +1 -1
- package/dist/cjs/components/LinkButton/LinkButton.js +1 -1
- package/dist/cjs/components/LinkButton/LinkButton.js.map +1 -1
- package/dist/cjs/components/List/List.js +1 -1
- package/dist/cjs/components/List/List.js.map +1 -1
- package/dist/cjs/components/List/ListItem.js +3 -3
- package/dist/cjs/components/List/ListItem.js.map +1 -1
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.js +1 -1
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/cjs/components/Logo/Logo.js +1 -1
- package/dist/cjs/components/Logo/Logo.js.map +1 -1
- package/dist/cjs/components/Modal/Content.js +1 -1
- package/dist/cjs/components/Modal/Content.js.map +1 -1
- package/dist/cjs/components/Modal/Header.js +2 -2
- package/dist/cjs/components/Modal/Header.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +1 -1
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/NumberField/NumberField.js +7 -5
- package/dist/cjs/components/NumberField/NumberField.js.map +1 -1
- package/dist/cjs/components/PasswordField/PasswordField.js +1 -1
- package/dist/cjs/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/cjs/components/PasswordField/ShowHideButton.js +1 -1
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +1 -1
- package/dist/cjs/components/Popover/Popover.js +8 -8
- package/dist/cjs/components/Popover/Popover.js.map +1 -1
- package/dist/cjs/components/Progress/Progress.js +5 -5
- package/dist/cjs/components/Progress/Progress.js.map +1 -1
- package/dist/cjs/components/Radio/Radio.js +6 -6
- package/dist/cjs/components/Radio/Radio.js.map +1 -1
- package/dist/cjs/components/Radio/RadioGroup.js +36 -32
- package/dist/cjs/components/Radio/RadioGroup.js.map +1 -1
- package/dist/cjs/components/SVG/SVG.js +1 -1
- package/dist/cjs/components/SVG/SVG.js.map +1 -1
- package/dist/cjs/components/Segment/Segment.js +2 -2
- package/dist/cjs/components/Segment/Segment.js.map +1 -1
- package/dist/cjs/components/Segment/SegmentGroup.js +5 -5
- package/dist/cjs/components/Segment/SegmentGroup.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +8 -8
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/components/Slider/Slider.js +7 -7
- package/dist/cjs/components/Slider/Slider.js.map +1 -1
- package/dist/cjs/components/Stack/Stack.js +72 -0
- package/dist/cjs/components/Stack/Stack.js.map +1 -0
- package/dist/cjs/components/Stack/index.js +20 -0
- package/dist/cjs/components/Stack/index.js.map +1 -0
- package/dist/cjs/components/Table/Body.js +1 -1
- package/dist/cjs/components/Table/Body.js.map +1 -1
- package/dist/cjs/components/Table/Cell.js +1 -1
- package/dist/cjs/components/Table/Cell.js.map +1 -1
- package/dist/cjs/components/Table/Foot.js +1 -1
- package/dist/cjs/components/Table/Foot.js.map +1 -1
- package/dist/cjs/components/Table/Head.js +1 -1
- package/dist/cjs/components/Table/Head.js.map +1 -1
- package/dist/cjs/components/Table/HeaderCell.js +1 -1
- package/dist/cjs/components/Table/HeaderCell.js.map +1 -1
- package/dist/cjs/components/Table/Row.js +1 -1
- package/dist/cjs/components/Table/Row.js.map +1 -1
- package/dist/cjs/components/Table/Table.js +1 -1
- package/dist/cjs/components/Table/Table.js.map +1 -1
- package/dist/cjs/components/Text/Text.js +5 -2
- package/dist/cjs/components/Text/Text.js.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.js +5 -5
- package/dist/cjs/components/TextArea/TextArea.js.map +1 -1
- package/dist/cjs/components/TextAreaInput/TextAreaInput.js +1 -1
- package/dist/cjs/components/TextAreaInput/TextAreaInput.js.map +1 -1
- package/dist/cjs/components/TextField/TextField.js +12 -10
- package/dist/cjs/components/TextField/TextField.js.map +1 -1
- package/dist/cjs/components/Title/Title.js +4 -4
- package/dist/cjs/components/Title/Title.js.map +1 -1
- package/dist/cjs/components/Trust/Trust.js +4 -5
- package/dist/cjs/components/Trust/Trust.js.map +1 -1
- package/dist/cjs/components/Trust/constants.js +3 -3
- package/dist/cjs/components/Trust/constants.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/components/Accordion/Accordion.js +8 -8
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Alert/Alert.js +4 -4
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Box/Box.js +1 -1
- package/dist/esm/components/Box/Box.js.map +1 -1
- package/dist/esm/components/Breadcrumbs/BreadcrumbItem.js +2 -2
- package/dist/esm/components/Breadcrumbs/BreadcrumbItem.js.map +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/esm/components/Button/Button.js +4 -2
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/Loading.js +12 -6
- package/dist/esm/components/Button/Loading.js.map +1 -1
- package/dist/esm/components/Button/Success.js +4 -3
- package/dist/esm/components/Button/Success.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +11 -7
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/esm/components/Container/Container.js +1 -1
- package/dist/esm/components/Container/Container.js.map +1 -1
- package/dist/esm/components/Divider/Divider.js +2 -2
- package/dist/esm/components/Divider/Divider.js.map +1 -1
- package/dist/esm/components/Drawer/Content.js +1 -1
- package/dist/esm/components/Drawer/Content.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +1 -1
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Drawer/Header.js +2 -2
- package/dist/esm/components/Drawer/Header.js.map +1 -1
- package/dist/esm/components/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/esm/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/esm/components/DropdownMenu/Item.js +1 -1
- package/dist/esm/components/DropdownMenu/Item.js.map +1 -1
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +7 -4
- package/dist/esm/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/dist/esm/components/Fieldset/Fieldset.js +2 -2
- package/dist/esm/components/Fieldset/Fieldset.js.map +1 -1
- package/dist/esm/components/Flex/Flex.js +1 -1
- package/dist/esm/components/Flex/Flex.js.map +1 -1
- package/dist/esm/components/Grid/Grid.js +1 -1
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/Grid/Item.js +1 -1
- package/dist/esm/components/Grid/Item.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +1 -1
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/Image/Image.js +1 -1
- package/dist/esm/components/Image/Image.js.map +1 -1
- package/dist/esm/components/Label/Label.js +1 -1
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/Link/Link.js +1 -1
- package/dist/esm/components/Link/Link.js.map +1 -1
- package/dist/esm/components/LinkButton/LinkButton.js +1 -1
- package/dist/esm/components/LinkButton/LinkButton.js.map +1 -1
- package/dist/esm/components/List/List.js +1 -1
- package/dist/esm/components/List/List.js.map +1 -1
- package/dist/esm/components/List/ListItem.js +3 -3
- package/dist/esm/components/List/ListItem.js.map +1 -1
- package/dist/esm/components/LoadingIndicator/LoadingIndicator.js +1 -1
- package/dist/esm/components/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/esm/components/Logo/Logo.js +1 -1
- package/dist/esm/components/Logo/Logo.js.map +1 -1
- package/dist/esm/components/Modal/Content.js +1 -1
- package/dist/esm/components/Modal/Content.js.map +1 -1
- package/dist/esm/components/Modal/Header.js +2 -2
- package/dist/esm/components/Modal/Header.js.map +1 -1
- package/dist/esm/components/Modal/Modal.js +1 -1
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/NumberField/NumberField.js +7 -5
- package/dist/esm/components/NumberField/NumberField.js.map +1 -1
- package/dist/esm/components/PasswordField/PasswordField.js +1 -1
- package/dist/esm/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/esm/components/PasswordField/ShowHideButton.js +1 -1
- package/dist/esm/components/PasswordField/ShowHideButton.js.map +1 -1
- package/dist/esm/components/Popover/Popover.js +8 -8
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/Progress/Progress.js +5 -5
- package/dist/esm/components/Progress/Progress.js.map +1 -1
- package/dist/esm/components/Radio/Radio.js +6 -6
- package/dist/esm/components/Radio/Radio.js.map +1 -1
- package/dist/esm/components/Radio/RadioGroup.js +36 -32
- package/dist/esm/components/Radio/RadioGroup.js.map +1 -1
- package/dist/esm/components/SVG/SVG.js +1 -1
- package/dist/esm/components/SVG/SVG.js.map +1 -1
- package/dist/esm/components/Segment/Segment.js +2 -2
- package/dist/esm/components/Segment/Segment.js.map +1 -1
- package/dist/esm/components/Segment/SegmentGroup.js +5 -5
- package/dist/esm/components/Segment/SegmentGroup.js.map +1 -1
- package/dist/esm/components/Select/Select.js +8 -8
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Slider/Slider.js +7 -7
- package/dist/esm/components/Slider/Slider.js.map +1 -1
- package/dist/esm/components/Stack/Stack.js +16 -0
- package/dist/esm/components/Stack/Stack.js.map +1 -0
- package/dist/esm/components/Stack/index.js +3 -0
- package/dist/esm/components/Stack/index.js.map +1 -0
- package/dist/esm/components/Table/Body.js +1 -1
- package/dist/esm/components/Table/Body.js.map +1 -1
- package/dist/esm/components/Table/Cell.js +1 -1
- package/dist/esm/components/Table/Cell.js.map +1 -1
- package/dist/esm/components/Table/Foot.js +1 -1
- package/dist/esm/components/Table/Foot.js.map +1 -1
- package/dist/esm/components/Table/Head.js +1 -1
- package/dist/esm/components/Table/Head.js.map +1 -1
- package/dist/esm/components/Table/HeaderCell.js +1 -1
- package/dist/esm/components/Table/HeaderCell.js.map +1 -1
- package/dist/esm/components/Table/Row.js +1 -1
- package/dist/esm/components/Table/Row.js.map +1 -1
- package/dist/esm/components/Table/Table.js +1 -1
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Text/Text.js +5 -2
- package/dist/esm/components/Text/Text.js.map +1 -1
- package/dist/esm/components/TextArea/TextArea.js +5 -5
- package/dist/esm/components/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/TextAreaInput/TextAreaInput.js +1 -1
- package/dist/esm/components/TextAreaInput/TextAreaInput.js.map +1 -1
- package/dist/esm/components/TextField/TextField.js +12 -10
- package/dist/esm/components/TextField/TextField.js.map +1 -1
- package/dist/esm/components/Title/Title.js +4 -4
- package/dist/esm/components/Title/Title.js.map +1 -1
- package/dist/esm/components/Trust/Trust.js +4 -5
- package/dist/esm/components/Trust/Trust.js.map +1 -1
- package/dist/esm/components/Trust/constants.js +3 -3
- package/dist/esm/components/Trust/constants.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/types/components/Button/Button.d.ts +2 -2
- package/dist/types/components/Button/Loading.d.ts +5 -1
- package/dist/types/components/Segment/Segment.stories.d.ts +2 -2
- package/dist/types/components/Segment/SegmentGroup.d.ts +1 -1
- package/dist/types/components/Stack/Stack.d.ts +15 -0
- package/dist/types/components/Stack/Stack.stories.d.ts +7 -0
- package/dist/types/components/Stack/Stack.test.d.ts +1 -0
- package/dist/types/components/Stack/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +3 -2
- package/src/components/Accordion/Accordion.css +72 -0
- package/src/components/Accordion/Accordion.mdx +9 -10
- package/src/components/Accordion/Accordion.test.tsx +4 -4
- package/src/components/Accordion/Accordion.tsx +8 -8
- package/src/components/Alert/Alert.css +53 -0
- package/src/components/Alert/Alert.mdx +1 -5
- package/src/components/Alert/Alert.tsx +4 -4
- package/src/components/Box/Box.css +3 -0
- package/src/components/Box/Box.mdx +1 -5
- package/src/components/Box/Box.test.tsx +1 -1
- package/src/components/Box/Box.tsx +1 -1
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.css +34 -0
- package/src/components/Breadcrumbs/Breadcrumbs.mdx +4 -8
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Button/Button.css +253 -0
- package/src/components/Button/Button.mdx +3 -11
- package/src/components/Button/Button.story.styles.css +2 -2
- package/src/components/Button/Button.test.tsx +4 -6
- package/src/components/Button/Button.tsx +4 -4
- package/src/components/Button/Loading.tsx +21 -8
- package/src/components/Button/Success.tsx +5 -3
- package/src/components/Checkbox/Checkbox.css +112 -0
- package/src/components/Checkbox/Checkbox.mdx +6 -12
- package/src/components/Checkbox/Checkbox.test.tsx +1 -7
- package/src/components/Checkbox/Checkbox.tsx +9 -7
- package/src/components/Checkbox/CheckboxGroup.css +26 -0
- package/src/components/Checkbox/CheckboxGroup.mdx +12 -22
- package/src/components/Checkbox/CheckboxGroup.test.tsx +2 -7
- package/src/components/Checkbox/CheckboxGroup.tsx +2 -2
- package/src/components/Container/Container.css +13 -0
- package/src/components/Container/Container.mdx +1 -5
- package/src/components/Container/Container.test.tsx +1 -2
- package/src/components/Container/Container.tsx +1 -1
- package/src/components/Divider/Divider.css +14 -0
- package/src/components/Divider/Divider.mdx +2 -6
- package/src/components/Divider/Divider.test.tsx +1 -1
- package/src/components/Divider/Divider.tsx +2 -2
- package/src/components/Drawer/Content.tsx +1 -1
- package/src/components/Drawer/Drawer.css +189 -0
- package/src/components/Drawer/Drawer.mdx +5 -12
- package/src/components/Drawer/Drawer.test.tsx +2 -2
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/Drawer/Header.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenu.css +70 -0
- package/src/components/DropdownMenu/DropdownMenu.mdx +4 -8
- package/src/components/DropdownMenu/DropdownMenu.story.styles.css +3 -3
- package/src/components/DropdownMenu/DropdownMenu.test.tsx +4 -4
- package/src/components/DropdownMenu/DropdownMenu.tsx +3 -3
- package/src/components/DropdownMenu/Item.tsx +1 -1
- package/src/components/ErrorMessage/ErrorMessage.css +11 -0
- package/src/components/ErrorMessage/ErrorMessage.test.tsx +1 -1
- package/src/components/ErrorMessage/ErrorMessage.tsx +5 -3
- package/src/components/Fieldset/Fieldset.css +15 -0
- package/src/components/Fieldset/Fieldset.mdx +2 -6
- package/src/components/Fieldset/Fieldset.tsx +2 -2
- package/src/components/Flex/Flex.css +4 -0
- package/src/components/Flex/Flex.mdx +1 -5
- package/src/components/Flex/Flex.test.tsx +1 -1
- package/src/components/Flex/Flex.tsx +1 -1
- package/src/components/Grid/Grid.mdx +0 -4
- package/src/components/Grid/Grid.tsx +1 -1
- package/src/components/Grid/Item.tsx +1 -1
- package/src/components/Icon/Icon.css +44 -0
- package/src/components/Icon/Icon.mdx +1 -5
- package/src/components/Icon/Icon.test.tsx +1 -1
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Image/Image.mdx +1 -5
- package/src/components/Image/Image.test.tsx +1 -1
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Label/Label.css +21 -0
- package/src/components/Label/Label.mdx +1 -5
- package/src/components/Label/Label.test.tsx +1 -1
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/Link/Link.css +26 -0
- package/src/components/Link/Link.mdx +1 -5
- package/src/components/Link/Link.test.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/LinkButton/LinkButton.mdx +1 -5
- package/src/components/LinkButton/LinkButton.tsx +1 -1
- package/src/components/List/List.css +60 -0
- package/src/components/List/List.mdx +4 -8
- package/src/components/List/List.test.tsx +4 -4
- package/src/components/List/List.tsx +1 -1
- package/src/components/List/ListItem.tsx +3 -3
- package/src/components/LoadingIndicator/LoadingIndicator.css +3 -0
- package/src/components/LoadingIndicator/LoadingIndicator.mdx +1 -5
- package/src/components/LoadingIndicator/LoadingIndicator.test.tsx +1 -1
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +1 -1
- package/src/components/Logo/Logo.mdx +1 -5
- package/src/components/Logo/Logo.test.tsx +1 -1
- package/src/components/Logo/Logo.tsx +1 -1
- package/src/components/Modal/Content.tsx +1 -1
- package/src/components/Modal/Header.tsx +2 -2
- package/src/components/Modal/Modal.css +145 -0
- package/src/components/Modal/Modal.mdx +5 -12
- package/src/components/Modal/Modal.test.tsx +2 -2
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/NumberField/NumberField.css +64 -0
- package/src/components/NumberField/NumberField.mdx +4 -8
- package/src/components/NumberField/NumberField.tsx +7 -6
- package/src/components/PasswordField/PasswordField.css +31 -0
- package/src/components/PasswordField/PasswordField.mdx +4 -8
- package/src/components/PasswordField/PasswordField.tsx +1 -1
- package/src/components/PasswordField/ShowHideButton.tsx +1 -1
- package/src/components/Popover/Popover.css +43 -0
- package/src/components/Popover/Popover.mdx +7 -11
- package/src/components/Popover/Popover.story.styles.css +3 -3
- package/src/components/Popover/Popover.test.tsx +7 -7
- package/src/components/Popover/Popover.tsx +8 -8
- package/src/components/Progress/Progress.css +30 -0
- package/src/components/Progress/Progress.mdx +5 -11
- package/src/components/Progress/Progress.test.tsx +7 -3
- package/src/components/Progress/Progress.tsx +5 -5
- package/src/components/Radio/Radio.css +185 -0
- package/src/components/Radio/Radio.mdx +9 -13
- package/src/components/Radio/Radio.test.tsx +10 -5
- package/src/components/Radio/Radio.tsx +6 -6
- package/src/components/Radio/RadioGroup.tsx +28 -25
- package/src/components/SVG/SVG.mdx +1 -5
- package/src/components/SVG/SVG.test.tsx +1 -1
- package/src/components/SVG/SVG.tsx +1 -1
- package/src/components/Segment/Segment.css +204 -0
- package/src/components/Segment/Segment.mdx +9 -13
- package/src/components/Segment/Segment.stories.tsx +7 -7
- package/src/components/Segment/Segment.tsx +2 -2
- package/src/components/Segment/SegmentGroup.tsx +6 -6
- package/src/components/Select/Select.css +85 -0
- package/src/components/Select/Select.mdx +4 -8
- package/src/components/Select/Select.test.tsx +2 -2
- package/src/components/Select/Select.tsx +7 -7
- package/src/components/Slider/Slider.css +138 -0
- package/src/components/Slider/Slider.mdx +8 -14
- package/src/components/Slider/Slider.test.tsx +4 -1
- package/src/components/Slider/Slider.tsx +7 -7
- package/src/components/Stack/Stack.css +30 -0
- package/src/components/Stack/Stack.mdx +41 -0
- package/src/components/Stack/Stack.stories.tsx +56 -0
- package/src/components/Stack/Stack.test.tsx +8 -0
- package/src/components/Stack/Stack.tsx +34 -0
- package/src/components/Stack/index.tsx +1 -0
- package/src/components/Table/Body.tsx +1 -1
- package/src/components/Table/Cell.tsx +1 -1
- package/src/components/Table/Foot.tsx +1 -1
- package/src/components/Table/Head.tsx +1 -1
- package/src/components/Table/HeaderCell.tsx +1 -1
- package/src/components/Table/Row.tsx +1 -1
- package/src/components/Table/Table.css +62 -0
- package/src/components/Table/Table.mdx +10 -14
- package/src/components/Table/Table.test.tsx +28 -15
- package/src/components/Table/Table.tsx +1 -1
- package/src/components/Text/Text.css +94 -0
- package/src/components/Text/Text.mdx +1 -5
- package/src/components/Text/Text.test.tsx +1 -1
- package/src/components/Text/Text.tsx +3 -4
- package/src/components/TextArea/TextArea.css +46 -0
- package/src/components/TextArea/TextArea.mdx +4 -8
- package/src/components/TextArea/TextArea.test.tsx +1 -1
- package/src/components/TextArea/TextArea.tsx +8 -5
- package/src/components/TextAreaInput/TextAreaInput.test.tsx +1 -1
- package/src/components/TextAreaInput/TextAreaInput.tsx +1 -1
- package/src/components/TextField/TextField.css +166 -0
- package/src/components/TextField/TextField.mdx +4 -8
- package/src/components/TextField/TextField.test.tsx +10 -10
- package/src/components/TextField/TextField.tsx +14 -11
- package/src/components/Title/Title.css +41 -0
- package/src/components/Title/Title.mdx +4 -8
- package/src/components/Title/Title.tsx +4 -4
- package/src/components/Trust/Trust.mdx +1 -7
- package/src/components/Trust/Trust.test.tsx +1 -1
- package/src/components/Trust/Trust.tsx +4 -5
- package/src/components/Trust/constants.ts +3 -3
- package/src/components/VisuallyHidden/VisuallyHidden.mdx +0 -4
- package/src/components/index.tsx +1 -0
|
@@ -16,6 +16,7 @@ const _spaceDelimitedList = require("../../utils/spaceDelimitedList");
|
|
|
16
16
|
const _ErrorMessage = require("../ErrorMessage");
|
|
17
17
|
const _Label = require("../Label");
|
|
18
18
|
const _hooks = require("../../hooks");
|
|
19
|
+
const _Stack = require("../Stack");
|
|
19
20
|
function _interop_require_default(obj) {
|
|
20
21
|
return obj && obj.__esModule ? obj : {
|
|
21
22
|
default: obj
|
|
@@ -44,8 +45,8 @@ const RadioGroup = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
|
44
45
|
[`--is-${orientation}`]: true,
|
|
45
46
|
[className || ""]: true
|
|
46
47
|
};
|
|
47
|
-
const radioGroupClasses = (0, _dedupe.default)("mobius", "mobius
|
|
48
|
-
const radioWrapperClasses = (0, _dedupe.default)("mobius
|
|
48
|
+
const radioGroupClasses = (0, _dedupe.default)("mobius", "mobius-radio-group", radioClasses, validationClasses);
|
|
49
|
+
const radioWrapperClasses = (0, _dedupe.default)("mobius-radio__wrapper", {
|
|
49
50
|
[`--is-${orientation}`]: true
|
|
50
51
|
});
|
|
51
52
|
const labelClasses = (0, _dedupe.default)(radioClasses, validationClasses);
|
|
@@ -58,7 +59,7 @@ const RadioGroup = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
|
58
59
|
props["aria-describedby"]
|
|
59
60
|
]);
|
|
60
61
|
const labelId = (0, _react.useId)();
|
|
61
|
-
return /*#__PURE__*/ (0, _jsxruntime.
|
|
62
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
62
63
|
...rest,
|
|
63
64
|
"aria-describedby": describedBy,
|
|
64
65
|
"aria-disabled": isDisabled,
|
|
@@ -72,36 +73,39 @@ const RadioGroup = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
|
72
73
|
ref: ref,
|
|
73
74
|
className: radioGroupClasses,
|
|
74
75
|
role: "radiogroup",
|
|
75
|
-
children:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.Stack, {
|
|
77
|
+
gap: "xs",
|
|
78
|
+
children: [
|
|
79
|
+
label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
|
|
80
|
+
htmlFor: name,
|
|
81
|
+
id: labelId,
|
|
82
|
+
className: labelClasses,
|
|
83
|
+
children: label
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
86
|
+
className: radioWrapperClasses,
|
|
87
|
+
children: _react.Children.map(children, (child)=>{
|
|
88
|
+
if (/*#__PURE__*/ (0, _react.isValidElement)(child)) {
|
|
89
|
+
return /*#__PURE__*/ (0, _react.cloneElement)(child, {
|
|
90
|
+
orientation,
|
|
91
|
+
groupDisabled: isDisabled,
|
|
92
|
+
name: nameAttribute,
|
|
93
|
+
selected,
|
|
94
|
+
setSelected,
|
|
95
|
+
isRequired,
|
|
96
|
+
"aria-describedby": describedBy,
|
|
97
|
+
onChange
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return child;
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorMessage.ErrorMessage, {
|
|
104
|
+
id: errorMessageId,
|
|
105
|
+
errorMessage: errorMessage
|
|
98
106
|
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
id: errorMessageId,
|
|
102
|
-
errorMessage: errorMessage
|
|
103
|
-
})
|
|
104
|
-
]
|
|
107
|
+
]
|
|
108
|
+
})
|
|
105
109
|
});
|
|
106
110
|
});
|
|
107
111
|
RadioGroup.displayName = "RadioGroup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Radio/RadioGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n cloneElement,\n forwardRef,\n isValidElement,\n useId,\n useState,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { HTMLElementEvent } from \"../../types/events\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { Validation } from \"../../types\";\nimport { useValidationClasses } from \"../../hooks\";\n\nexport type RadioGroupElementType = HTMLDivElement;\n\nexport interface RadioGroupProps\n extends DOMProps,\n Validation,\n RefAttributes<RadioGroupElementType> {\n children: ReactNode;\n className?: string;\n orientation?: \"horizontal\" | \"vertical\";\n errorMessage?: string;\n // Callback that fires when select changes\n onChange?: (event: HTMLElementEvent<HTMLInputElement>) => void;\n // Defines a string value that labels the current element.\n \"aria-label\"?: string;\n // Identifies the element (or elements) that labels the current element.\n \"aria-labelledby\"?: string;\n // Identifies the element that provides an error message for the object.\n \"aria-errormessage\"?: string;\n // Identifies the element (or elements) that describes the object.\n \"aria-describedby\"?: string;\n // Whether user input is required on the input before form submission.\n isRequired?: boolean;\n // Whether the input is disabled.\n isDisabled?: boolean;\n // Whether the input can be selected but not changed by the user.\n isReadOnly?: boolean;\n // The default value (uncontrolled).\n defaultValue?: string;\n // The content to display as the label.\n label?: ReactNode;\n /**\n * The value of the radio button, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#Value).\n */\n value?: string;\n name?: string;\n}\n\nexport type RadioGroupRef = Ref<RadioGroupElementType>;\n\nconst getDefaultVal = (children: ReactNode, defaultValue?: string) => {\n if (Array.isArray(children) && defaultValue) {\n const option = children?.find(item => item.props.value === defaultValue);\n\n if (!option) return \"\";\n\n return option.props.value;\n }\n\n return \"\";\n};\n\nconst RadioGroup: ForwardedRefComponent<\n RadioGroupProps,\n RadioGroupElementType\n> = forwardRef((props: RadioGroupProps, ref: RadioGroupRef) => {\n const {\n label,\n isDisabled = false,\n isRequired,\n validationState,\n isInvalid,\n orientation = \"vertical\",\n className,\n errorMessage,\n children,\n defaultValue,\n isReadOnly,\n name,\n onChange,\n ...rest\n } = props;\n const defaultSelected = getDefaultVal(children, defaultValue);\n const [selected, setSelected] = useState<string>(defaultSelected);\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n const radioClasses = {\n \"--is-disabled\": isDisabled,\n \"--is-required\": typeof isRequired === \"boolean\" && isRequired,\n \"--is-optional\": typeof isRequired === \"boolean\" && !isRequired,\n [`--is-${orientation}`]: true,\n [className || \"\"]: true,\n };\n const radioGroupClasses = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Radio/RadioGroup.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n cloneElement,\n forwardRef,\n isValidElement,\n useId,\n useState,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { HTMLElementEvent } from \"../../types/events\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { Validation } from \"../../types\";\nimport { useValidationClasses } from \"../../hooks\";\nimport { Stack } from \"../Stack\";\n\nexport type RadioGroupElementType = HTMLDivElement;\n\nexport interface RadioGroupProps\n extends DOMProps,\n Validation,\n RefAttributes<RadioGroupElementType> {\n children: ReactNode;\n className?: string;\n orientation?: \"horizontal\" | \"vertical\";\n errorMessage?: string;\n // Callback that fires when select changes\n onChange?: (event: HTMLElementEvent<HTMLInputElement>) => void;\n // Defines a string value that labels the current element.\n \"aria-label\"?: string;\n // Identifies the element (or elements) that labels the current element.\n \"aria-labelledby\"?: string;\n // Identifies the element that provides an error message for the object.\n \"aria-errormessage\"?: string;\n // Identifies the element (or elements) that describes the object.\n \"aria-describedby\"?: string;\n // Whether user input is required on the input before form submission.\n isRequired?: boolean;\n // Whether the input is disabled.\n isDisabled?: boolean;\n // Whether the input can be selected but not changed by the user.\n isReadOnly?: boolean;\n // The default value (uncontrolled).\n defaultValue?: string;\n // The content to display as the label.\n label?: ReactNode;\n /**\n * The value of the radio button, used when submitting an HTML form.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#Value).\n */\n value?: string;\n name?: string;\n}\n\nexport type RadioGroupRef = Ref<RadioGroupElementType>;\n\nconst getDefaultVal = (children: ReactNode, defaultValue?: string) => {\n if (Array.isArray(children) && defaultValue) {\n const option = children?.find(item => item.props.value === defaultValue);\n\n if (!option) return \"\";\n\n return option.props.value;\n }\n\n return \"\";\n};\n\nconst RadioGroup: ForwardedRefComponent<\n RadioGroupProps,\n RadioGroupElementType\n> = forwardRef((props: RadioGroupProps, ref: RadioGroupRef) => {\n const {\n label,\n isDisabled = false,\n isRequired,\n validationState,\n isInvalid,\n orientation = \"vertical\",\n className,\n errorMessage,\n children,\n defaultValue,\n isReadOnly,\n name,\n onChange,\n ...rest\n } = props;\n const defaultSelected = getDefaultVal(children, defaultValue);\n const [selected, setSelected] = useState<string>(defaultSelected);\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n const radioClasses = {\n \"--is-disabled\": isDisabled,\n \"--is-required\": typeof isRequired === \"boolean\" && isRequired,\n \"--is-optional\": typeof isRequired === \"boolean\" && !isRequired,\n [`--is-${orientation}`]: true,\n [className || \"\"]: true,\n };\n const radioGroupClasses = classNames(\n \"mobius\",\n \"mobius-radio-group\",\n radioClasses,\n validationClasses,\n );\n const radioWrapperClasses = classNames(\"mobius-radio__wrapper\", {\n [`--is-${orientation}`]: true,\n });\n const labelClasses = classNames(radioClasses, validationClasses);\n const errorMessageId = useId();\n const defaultNameAttrId = useId();\n const nameAttribute = name || defaultNameAttrId;\n const shouldErrorMessageShow = errorMessage ? errorMessageId : undefined;\n const describedBy = spaceDelimitedList([\n shouldErrorMessageShow,\n props[\"aria-describedby\"],\n ]);\n const labelId = useId();\n\n return (\n <div\n {...rest}\n aria-describedby={describedBy}\n aria-disabled={isDisabled}\n aria-errormessage={shouldErrorMessageShow}\n aria-invalid={isInvalid}\n aria-label={props[\"aria-label\"]}\n aria-labelledby={props[\"aria-labelledby\"] || labelId}\n aria-orientation={orientation}\n aria-readonly={isReadOnly}\n aria-required={isRequired}\n ref={ref}\n className={radioGroupClasses}\n role=\"radiogroup\"\n >\n <Stack gap=\"xs\">\n {label && (\n <Label htmlFor={name} id={labelId} className={labelClasses}>\n {label}\n </Label>\n )}\n <div className={radioWrapperClasses}>\n {Children.map(children, child => {\n if (isValidElement(child)) {\n return cloneElement(child as ReactElement, {\n orientation,\n groupDisabled: isDisabled,\n name: nameAttribute,\n selected,\n setSelected,\n isRequired,\n \"aria-describedby\": describedBy,\n onChange,\n });\n }\n\n return child;\n })}\n </div>\n <ErrorMessage id={errorMessageId} errorMessage={errorMessage} />\n </Stack>\n </div>\n );\n});\n\nRadioGroup.displayName = \"RadioGroup\";\nexport { RadioGroup };\n"],"names":["RadioGroup","getDefaultVal","children","defaultValue","Array","isArray","option","find","item","props","value","forwardRef","ref","label","isDisabled","isRequired","validationState","isInvalid","orientation","className","errorMessage","isReadOnly","name","onChange","rest","defaultSelected","selected","setSelected","useState","validationClasses","useValidationClasses","radioClasses","radioGroupClasses","classNames","radioWrapperClasses","labelClasses","errorMessageId","useId","defaultNameAttrId","nameAttribute","shouldErrorMessageShow","undefined","describedBy","spaceDelimitedList","labelId","div","aria-describedby","aria-disabled","aria-errormessage","aria-invalid","aria-label","aria-labelledby","aria-orientation","aria-readonly","aria-required","role","Stack","gap","Label","htmlFor","id","Children","map","child","isValidElement","cloneElement","groupDisabled","ErrorMessage","displayName"],"mappings":"AAAA;;;;;+BAiLSA;;;eAAAA;;;;uBApKF;+DACgB;oCAIY;8BACN;uBACP;uBAEe;uBACf;;;;;;AA0CtB,MAAMC,gBAAgB,CAACC,UAAqBC;IAC1C,IAAIC,MAAMC,OAAO,CAACH,aAAaC,cAAc;QAC3C,MAAMG,SAASJ,qBAAAA,+BAAAA,SAAUK,IAAI,CAACC,CAAAA,OAAQA,KAAKC,KAAK,CAACC,KAAK,KAAKP;QAE3D,IAAI,CAACG,QAAQ,OAAO;QAEpB,OAAOA,OAAOG,KAAK,CAACC,KAAK;IAC3B;IAEA,OAAO;AACT;AAEA,MAAMV,2BAGFW,IAAAA,iBAAU,EAAC,CAACF,OAAwBG;IACtC,MAAM,EACJC,KAAK,EACLC,aAAa,KAAK,EAClBC,UAAU,EACVC,eAAe,EACfC,SAAS,EACTC,cAAc,UAAU,EACxBC,SAAS,EACTC,YAAY,EACZlB,QAAQ,EACRC,YAAY,EACZkB,UAAU,EACVC,IAAI,EACJC,QAAQ,EACR,GAAGC,MACJ,GAAGf;IACJ,MAAMgB,kBAAkBxB,cAAcC,UAAUC;IAChD,MAAM,CAACuB,UAAUC,YAAY,GAAGC,IAAAA,eAAQ,EAASH;IACjD,MAAMI,oBAAoBC,IAAAA,2BAAoB,EAAC;QAC7Cd;QACAC;IACF;IACA,MAAMc,eAAe;QACnB,iBAAiBjB;QACjB,iBAAiB,OAAOC,eAAe,aAAaA;QACpD,iBAAiB,OAAOA,eAAe,aAAa,CAACA;QACrD,CAAC,CAAC,KAAK,EAAEG,YAAY,CAAC,CAAC,EAAE;QACzB,CAACC,aAAa,GAAG,EAAE;IACrB;IACA,MAAMa,oBAAoBC,IAAAA,eAAU,EAClC,UACA,sBACAF,cACAF;IAEF,MAAMK,sBAAsBD,IAAAA,eAAU,EAAC,yBAAyB;QAC9D,CAAC,CAAC,KAAK,EAAEf,YAAY,CAAC,CAAC,EAAE;IAC3B;IACA,MAAMiB,eAAeF,IAAAA,eAAU,EAACF,cAAcF;IAC9C,MAAMO,iBAAiBC,IAAAA,YAAK;IAC5B,MAAMC,oBAAoBD,IAAAA,YAAK;IAC/B,MAAME,gBAAgBjB,QAAQgB;IAC9B,MAAME,yBAAyBpB,eAAegB,iBAAiBK;IAC/D,MAAMC,cAAcC,IAAAA,sCAAkB,EAAC;QACrCH;QACA/B,KAAK,CAAC,mBAAmB;KAC1B;IACD,MAAMmC,UAAUP,IAAAA,YAAK;IAErB,qBACE,qBAACQ;QACE,GAAGrB,IAAI;QACRsB,oBAAkBJ;QAClBK,iBAAejC;QACfkC,qBAAmBR;QACnBS,gBAAchC;QACdiC,cAAYzC,KAAK,CAAC,aAAa;QAC/B0C,mBAAiB1C,KAAK,CAAC,kBAAkB,IAAImC;QAC7CQ,oBAAkBlC;QAClBmC,iBAAehC;QACfiC,iBAAevC;QACfH,KAAKA;QACLO,WAAWa;QACXuB,MAAK;kBAEL,cAAA,sBAACC,YAAK;YAACC,KAAI;;gBACR5C,uBACC,qBAAC6C,YAAK;oBAACC,SAASrC;oBAAMsC,IAAIhB;oBAASzB,WAAWgB;8BAC3CtB;;8BAGL,qBAACgC;oBAAI1B,WAAWe;8BACb2B,eAAQ,CAACC,GAAG,CAAC5D,UAAU6D,CAAAA;wBACtB,kBAAIC,IAAAA,qBAAc,EAACD,QAAQ;4BACzB,qBAAOE,IAAAA,mBAAY,EAACF,OAAuB;gCACzC7C;gCACAgD,eAAepD;gCACfQ,MAAMiB;gCACNb;gCACAC;gCACAZ;gCACA,oBAAoB2B;gCACpBnB;4BACF;wBACF;wBAEA,OAAOwC;oBACT;;8BAEF,qBAACI,0BAAY;oBAACP,IAAIxB;oBAAgBhB,cAAcA;;;;;AAIxD;AAEApB,WAAWoE,WAAW,GAAG"}
|
|
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
|
|
|
18
18
|
}
|
|
19
19
|
const SVG = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
20
|
const { children, className, ...otherProps } = props;
|
|
21
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
21
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-svg", className);
|
|
22
22
|
const svgNode = _react.Children.only(children);
|
|
23
23
|
// Remove originalType and mdxType props
|
|
24
24
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SVG/SVG.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, Children } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface SVGProps extends DOMProps, RefAttributes<SVGSVGElement> {\n children: React.ReactElement<React.SVGProps<SVGSVGElement>>;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport type SVGRef = Ref<SVGSVGElement>;\n\nconst SVG: ForwardedRefComponent<SVGProps, SVGSVGElement> = forwardRef(\n (props: SVGProps, ref: SVGRef) => {\n const { children, className, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SVG/SVG.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, Children } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface SVGProps extends DOMProps, RefAttributes<SVGSVGElement> {\n children: React.ReactElement<React.SVGProps<SVGSVGElement>>;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport type SVGRef = Ref<SVGSVGElement>;\n\nconst SVG: ForwardedRefComponent<SVGProps, SVGSVGElement> = forwardRef(\n (props: SVGProps, ref: SVGRef) => {\n const { children, className, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius-svg\", className);\n const svgNode = Children.only(children);\n // Remove originalType and mdxType props\n const { children: svgChildren, viewBox, xmlns } = svgNode.props;\n\n return (\n <svg\n viewBox={viewBox}\n xmlns={xmlns}\n ref={ref}\n {...otherProps}\n className={classes}\n >\n {svgChildren}\n </svg>\n );\n },\n);\n\nSVG.displayName = \"SVG\";\nexport { SVG };\n"],"names":["SVG","forwardRef","props","ref","children","className","otherProps","classes","classNames","svgNode","Children","only","svgChildren","viewBox","xmlns","svg","displayName"],"mappings":";;;;+BAqCSA;;;eAAAA;;;;uBArCgD;+DAClC;;;;;;AAYvB,MAAMA,oBAAsDC,IAAAA,iBAAU,EACpE,CAACC,OAAiBC;IAChB,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,YAAY,GAAGJ;IAE/C,MAAMK,UAAUC,IAAAA,eAAU,EAAC,UAAU,cAAcH;IACnD,MAAMI,UAAUC,eAAQ,CAACC,IAAI,CAACP;IAC9B,wCAAwC;IACxC,MAAM,EAAEA,UAAUQ,WAAW,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGL,QAAQP,KAAK;IAE/D,qBACE,qBAACa;QACCF,SAASA;QACTC,OAAOA;QACPX,KAAKA;QACJ,GAAGG,UAAU;QACdD,WAAWE;kBAEVK;;AAGP;AAGFZ,IAAIgB,WAAW,GAAG"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
}
|
|
18
18
|
const Segment = (props)=>{
|
|
19
19
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-segment", colour, {
|
|
21
21
|
inverted
|
|
22
22
|
}, className);
|
|
23
23
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
@@ -25,7 +25,7 @@ const Segment = (props)=>{
|
|
|
25
25
|
...rest,
|
|
26
26
|
children: [
|
|
27
27
|
heading && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
28
|
-
className: "mobius
|
|
28
|
+
className: "mobius-segment__heading",
|
|
29
29
|
children: heading
|
|
30
30
|
}),
|
|
31
31
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Segment/Segment.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport interface SegmentProps extends DOMProps {\n className?: string;\n heading?: string;\n /** Background colour for Segment */\n colour?: \"subtle\" | \"primary\" | \"secondary\";\n /** When inverted, text is white. Use on darker backgrounds. */\n inverted?: boolean;\n children?: ReactNode;\n}\n\nconst Segment = (props: SegmentProps) => {\n const { heading, children, colour, inverted, className, ...rest } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Segment/Segment.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport interface SegmentProps extends DOMProps {\n className?: string;\n heading?: string;\n /** Background colour for Segment */\n colour?: \"subtle\" | \"primary\" | \"secondary\";\n /** When inverted, text is white. Use on darker backgrounds. */\n inverted?: boolean;\n children?: ReactNode;\n}\n\nconst Segment = (props: SegmentProps) => {\n const { heading, children, colour, inverted, className, ...rest } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius-segment\",\n colour,\n { inverted },\n className,\n );\n\n return (\n <div className={classes} {...rest}>\n {heading && <div className=\"mobius-segment__heading\">{heading}</div>}\n {children}\n </div>\n );\n};\n\nSegment.displayName = \"Segment\";\nexport { Segment };\n"],"names":["Segment","props","heading","children","colour","inverted","className","rest","classes","classNames","div","displayName"],"mappings":";;;;+BAkCSA;;;eAAAA;;;;+DAjCc;;;;;;AAavB,MAAMA,UAAU,CAACC;IACf,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGN;IAEpE,MAAMO,UAAUC,IAAAA,eAAU,EACxB,UACA,kBACAL,QACA;QAAEC;IAAS,GACXC;IAGF,qBACE,sBAACI;QAAIJ,WAAWE;QAAU,GAAGD,IAAI;;YAC9BL,yBAAW,qBAACQ;gBAAIJ,WAAU;0BAA2BJ;;YACrDC;;;AAGP;AAEAH,QAAQW,WAAW,GAAG"}
|
|
@@ -16,11 +16,11 @@ function _interop_require_default(obj) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
const SegmentGroup = (props)=>{
|
|
19
|
-
const { children, horizontal,
|
|
20
|
-
const
|
|
21
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
22
|
-
horizontal
|
|
23
|
-
},
|
|
19
|
+
const { children, horizontal, gap, className, ...rest } = props;
|
|
20
|
+
const gapClass = gap ? `gap-${gap}` : "";
|
|
21
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-segment-group", className, {
|
|
22
|
+
"--is-horizontal": horizontal
|
|
23
|
+
}, gapClass);
|
|
24
24
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
25
25
|
className: classes,
|
|
26
26
|
...rest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Segment/SegmentGroup.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport interface SegmentGroupProps extends DOMProps {\n className?: string;\n horizontal?: boolean;\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Segment/SegmentGroup.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport interface SegmentGroupProps extends DOMProps {\n className?: string;\n horizontal?: boolean;\n gap?: \"size-xs\" | \"size-s\" | \"size-m\" | \"size-l\" | \"size-xl\" | \"size-xxl\";\n children?: ReactNode;\n}\n\nconst SegmentGroup = (props: SegmentGroupProps) => {\n const { children, horizontal, gap, className, ...rest } = props;\n\n const gapClass = gap ? `gap-${gap}` : \"\";\n const classes = classNames(\n \"mobius\",\n \"mobius-segment-group\",\n className,\n { \"--is-horizontal\": horizontal },\n gapClass,\n );\n\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n};\n\nSegmentGroup.displayName = \"SegmentGroup\";\nexport { SegmentGroup };\n"],"names":["SegmentGroup","props","children","horizontal","gap","className","rest","gapClass","classes","classNames","div","displayName"],"mappings":";;;;+BA+BSA;;;eAAAA;;;;+DA9Bc;;;;;;AAUvB,MAAMA,eAAe,CAACC;IACpB,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,GAAG,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGL;IAE1D,MAAMM,WAAWH,MAAM,CAAC,IAAI,EAAEA,IAAI,CAAC,GAAG;IACtC,MAAMI,UAAUC,IAAAA,eAAU,EACxB,UACA,wBACAJ,WACA;QAAE,mBAAmBF;IAAW,GAChCI;IAGF,qBACE,qBAACG;QAAIL,WAAWG;QAAU,GAAGF,IAAI;kBAC9BJ;;AAGP;AAEAF,aAAaW,WAAW,GAAG"}
|
|
@@ -16,10 +16,10 @@ const _icons = require("@simplybusiness/icons");
|
|
|
16
16
|
const _useLabel = require("../../hooks/useLabel");
|
|
17
17
|
const _spaceDelimitedList = require("../../utils/spaceDelimitedList");
|
|
18
18
|
const _ErrorMessage = require("../ErrorMessage");
|
|
19
|
-
const _Flex = require("../Flex");
|
|
20
19
|
const _Label = require("../Label");
|
|
21
20
|
const _hooks = require("../../hooks");
|
|
22
21
|
const _Icon = require("../Icon");
|
|
22
|
+
const _Stack = require("../Stack");
|
|
23
23
|
function _interop_require_default(obj) {
|
|
24
24
|
return obj && obj.__esModule ? obj : {
|
|
25
25
|
default: obj
|
|
@@ -41,10 +41,10 @@ const Select = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
|
41
41
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
42
42
|
};
|
|
43
43
|
const sharedClasses = (0, _dedupe.default)(validationClasses, stateClasses);
|
|
44
|
-
const wrapperClasses = (0, _dedupe.default)("mobius
|
|
45
|
-
const selectClasses = (0, _dedupe.default)("mobius
|
|
46
|
-
const labelClasses = (0, _dedupe.default)("mobius
|
|
47
|
-
const iconClasses = (0, _dedupe.default)("mobius
|
|
44
|
+
const wrapperClasses = (0, _dedupe.default)("mobius-select__wrapper", sharedClasses, otherProps.className);
|
|
45
|
+
const selectClasses = (0, _dedupe.default)("mobius-select", sharedClasses, otherProps.className);
|
|
46
|
+
const labelClasses = (0, _dedupe.default)("mobius-label", sharedClasses, otherProps.className);
|
|
47
|
+
const iconClasses = (0, _dedupe.default)("mobius-select__icon", sharedClasses);
|
|
48
48
|
const errorMessageId = (0, _react.useId)();
|
|
49
49
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : undefined;
|
|
50
50
|
const describedBy = (0, _spaceDelimitedList.spaceDelimitedList)([
|
|
@@ -56,9 +56,9 @@ const Select = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
|
56
56
|
onChange(e);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.Stack, {
|
|
60
|
+
className: "mobius mobius-select__outer",
|
|
61
|
+
gap: "xs",
|
|
62
62
|
children: [
|
|
63
63
|
label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
|
|
64
64
|
...labelProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Select/Select.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n ChangeEvent,\n ReactElement,\n Ref,\n RefAttributes,\n forwardRef,\n useId,\n} from \"react\";\nimport { chevronDown } from \"@simplybusiness/icons\";\nimport { UseLabelProps, useLabel } from \"../../hooks/useLabel\";\nimport { DOMProps, Validation } from \"../../types\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Select/Select.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n ChangeEvent,\n ReactElement,\n Ref,\n RefAttributes,\n forwardRef,\n useId,\n} from \"react\";\nimport { chevronDown } from \"@simplybusiness/icons\";\nimport { UseLabelProps, useLabel } from \"../../hooks/useLabel\";\nimport { DOMProps, Validation } from \"../../types\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { OptionProps } from \"../Option\";\nimport { useValidationClasses } from \"../../hooks\";\nimport { Icon } from \"../Icon\";\nimport { Stack } from \"../Stack\";\n\nexport type SelectElementType = HTMLSelectElement;\nexport interface SelectProps\n extends UseLabelProps,\n Validation,\n DOMProps,\n RefAttributes<SelectElementType> {\n name?: string;\n onChange?: (e: ChangeEvent<HTMLSelectElement>) => void;\n value?: string;\n defaultValue?: string;\n className?: string;\n errorMessage?: string;\n children?: ReactElement<OptionProps>[] | ReactElement<OptionProps>;\n \"aria-describedby\"?: string;\n isDisabled?: boolean;\n}\n\nexport type SelectRef = Ref<SelectElementType>;\n\nconst Select: ForwardedRefComponent<SelectProps, SelectElementType> =\n forwardRef((props: SelectProps, ref: SelectRef) => {\n const {\n label,\n onChange,\n validationState,\n isInvalid,\n errorMessage,\n isDisabled = false,\n isRequired,\n ...otherProps\n } = props;\n\n const { labelProps, fieldProps } = useLabel({\n label,\n ...otherProps,\n });\n\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n\n const stateClasses = {\n \"--is-disabled\": isDisabled,\n \"--is-required\": typeof isRequired === \"boolean\" && isRequired,\n \"--is-optional\": typeof isRequired === \"boolean\" && !isRequired,\n };\n\n const sharedClasses = classNames(validationClasses, stateClasses);\n\n const wrapperClasses = classNames(\n \"mobius-select__wrapper\",\n sharedClasses,\n otherProps.className,\n );\n const selectClasses = classNames(\n \"mobius-select\",\n sharedClasses,\n otherProps.className,\n );\n const labelClasses = classNames(\n \"mobius-label\",\n sharedClasses,\n otherProps.className,\n );\n const iconClasses = classNames(\"mobius-select__icon\", sharedClasses);\n const errorMessageId = useId();\n const shouldErrorMessageShow = errorMessage ? errorMessageId : undefined;\n const describedBy = spaceDelimitedList([\n shouldErrorMessageShow,\n props[\"aria-describedby\"],\n ]);\n\n const handleChange = (e: ChangeEvent<HTMLSelectElement>) => {\n if (onChange) {\n onChange(e);\n }\n };\n\n return (\n <Stack className=\"mobius mobius-select__outer\" gap=\"xs\">\n {label && (\n <Label {...labelProps} className={labelClasses}>\n {label}\n </Label>\n )}\n <div className={wrapperClasses}>\n <select\n {...otherProps}\n {...fieldProps}\n ref={ref}\n multiple={false}\n className={selectClasses}\n disabled={isDisabled}\n aria-invalid={!!errorMessage}\n aria-describedby={describedBy}\n aria-required={isRequired}\n onChange={handleChange}\n />\n <span className={iconClasses}>\n <Icon icon={chevronDown} />\n </span>\n </div>\n {errorMessage && (\n <ErrorMessage id={errorMessageId} errorMessage={errorMessage} />\n )}\n </Stack>\n );\n });\n\nSelect.displayName = \"Select\";\nexport { Select };\n"],"names":["Select","forwardRef","props","ref","label","onChange","validationState","isInvalid","errorMessage","isDisabled","isRequired","otherProps","labelProps","fieldProps","useLabel","validationClasses","useValidationClasses","stateClasses","sharedClasses","classNames","wrapperClasses","className","selectClasses","labelClasses","iconClasses","errorMessageId","useId","shouldErrorMessageShow","undefined","describedBy","spaceDelimitedList","handleChange","e","Stack","gap","Label","div","select","multiple","disabled","aria-invalid","aria-describedby","aria-required","span","Icon","icon","chevronDown","ErrorMessage","id","displayName"],"mappings":"AAAA;;;;;+BAsISA;;;eAAAA;;;;+DApIc;uBAQhB;uBACqB;0BACY;oCAGL;8BACN;uBACP;uBAEe;sBAChB;uBACC;;;;;;AAqBtB,MAAMA,uBACJC,IAAAA,iBAAU,EAAC,CAACC,OAAoBC;IAC9B,MAAM,EACJC,KAAK,EACLC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,YAAY,EACZC,aAAa,KAAK,EAClBC,UAAU,EACV,GAAGC,YACJ,GAAGT;IAEJ,MAAM,EAAEU,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,kBAAQ,EAAC;QAC1CV;QACA,GAAGO,UAAU;IACf;IAEA,MAAMI,oBAAoBC,IAAAA,2BAAoB,EAAC;QAC7CV;QACAC;IACF;IAEA,MAAMU,eAAe;QACnB,iBAAiBR;QACjB,iBAAiB,OAAOC,eAAe,aAAaA;QACpD,iBAAiB,OAAOA,eAAe,aAAa,CAACA;IACvD;IAEA,MAAMQ,gBAAgBC,IAAAA,eAAU,EAACJ,mBAAmBE;IAEpD,MAAMG,iBAAiBD,IAAAA,eAAU,EAC/B,0BACAD,eACAP,WAAWU,SAAS;IAEtB,MAAMC,gBAAgBH,IAAAA,eAAU,EAC9B,iBACAD,eACAP,WAAWU,SAAS;IAEtB,MAAME,eAAeJ,IAAAA,eAAU,EAC7B,gBACAD,eACAP,WAAWU,SAAS;IAEtB,MAAMG,cAAcL,IAAAA,eAAU,EAAC,uBAAuBD;IACtD,MAAMO,iBAAiBC,IAAAA,YAAK;IAC5B,MAAMC,yBAAyBnB,eAAeiB,iBAAiBG;IAC/D,MAAMC,cAAcC,IAAAA,sCAAkB,EAAC;QACrCH;QACAzB,KAAK,CAAC,mBAAmB;KAC1B;IAED,MAAM6B,eAAe,CAACC;QACpB,IAAI3B,UAAU;YACZA,SAAS2B;QACX;IACF;IAEA,qBACE,sBAACC,YAAK;QAACZ,WAAU;QAA8Ba,KAAI;;YAChD9B,uBACC,qBAAC+B,YAAK;gBAAE,GAAGvB,UAAU;gBAAES,WAAWE;0BAC/BnB;;0BAGL,sBAACgC;gBAAIf,WAAWD;;kCACd,qBAACiB;wBACE,GAAG1B,UAAU;wBACb,GAAGE,UAAU;wBACdV,KAAKA;wBACLmC,UAAU;wBACVjB,WAAWC;wBACXiB,UAAU9B;wBACV+B,gBAAc,CAAC,CAAChC;wBAChBiC,oBAAkBZ;wBAClBa,iBAAehC;wBACfL,UAAU0B;;kCAEZ,qBAACY;wBAAKtB,WAAWG;kCACf,cAAA,qBAACoB,UAAI;4BAACC,MAAMC,kBAAW;;;;;YAG1BtC,8BACC,qBAACuC,0BAAY;gBAACC,IAAIvB;gBAAgBjB,cAAcA;;;;AAIxD;AAEFR,OAAOiD,WAAW,GAAG"}
|
|
@@ -32,7 +32,7 @@ const Slider = (props)=>{
|
|
|
32
32
|
"aria-labelledby": ariaLabelledBy
|
|
33
33
|
});
|
|
34
34
|
const formattedValue = (0, _helpers.numberFormatter)(currentValue, formatOptions);
|
|
35
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
35
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-slider", className, {
|
|
36
36
|
"--is-disabled": isDisabled,
|
|
37
37
|
"--is-primary": variant === "primary",
|
|
38
38
|
"--is-secondary": variant === "secondary",
|
|
@@ -58,7 +58,7 @@ const Slider = (props)=>{
|
|
|
58
58
|
className: classes,
|
|
59
59
|
children: [
|
|
60
60
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
61
|
-
className: "mobius
|
|
61
|
+
className: "mobius-slider__label-wrapper",
|
|
62
62
|
children: [
|
|
63
63
|
label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
|
|
64
64
|
...labelProps,
|
|
@@ -75,9 +75,9 @@ const Slider = (props)=>{
|
|
|
75
75
|
}),
|
|
76
76
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
77
77
|
ref: trackRef,
|
|
78
|
-
className: "mobius
|
|
78
|
+
className: "mobius-slider__track-wrapper",
|
|
79
79
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
|
|
80
|
-
className: "mobius
|
|
80
|
+
className: "mobius-slider__track",
|
|
81
81
|
type: "range",
|
|
82
82
|
min: minValue,
|
|
83
83
|
max: maxValue,
|
|
@@ -94,15 +94,15 @@ const Slider = (props)=>{
|
|
|
94
94
|
})
|
|
95
95
|
}),
|
|
96
96
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
97
|
-
className: "mobius
|
|
97
|
+
className: "mobius-slider__labels",
|
|
98
98
|
children: [
|
|
99
99
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
100
|
-
className: "mobius
|
|
100
|
+
className: "mobius-slider__min-label",
|
|
101
101
|
"data-testid": "min-label",
|
|
102
102
|
children: minLabel
|
|
103
103
|
}),
|
|
104
104
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
105
|
-
className: "mobius
|
|
105
|
+
className: "mobius-slider__max-label",
|
|
106
106
|
"data-testid": "max-label",
|
|
107
107
|
children: maxLabel
|
|
108
108
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport { ChangeEvent, useRef, useState } from \"react\";\nimport { DOMProps } from \"../../types/dom\";\nimport { UseLabelProps, useLabel } from \"../../hooks\";\nimport { Label } from \"../Label\";\nimport { numberFormatter } from \"./helpers\";\n\nexport interface SliderProps extends DOMProps, UseLabelProps {\n label?: string;\n variant?: \"primary\" | \"secondary\";\n className?: string;\n minValue?: number;\n maxValue?: number;\n defaultValue?: number;\n value?: number;\n step?: number;\n isDisabled?: boolean;\n onChange?: (value: number | undefined) => void;\n onChangeEnd?: (value: number | undefined) => void;\n minLabel?: string;\n maxLabel?: string;\n formatOptions?: Intl.NumberFormatOptions;\n}\n\nexport const Slider = (props: SliderProps) => {\n const {\n id,\n className,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n minValue,\n maxValue,\n step = 1,\n defaultValue = 0,\n value,\n onChange,\n onChangeEnd,\n variant = \"primary\",\n minLabel,\n maxLabel,\n formatOptions,\n isDisabled = false,\n } = props;\n const trackRef = useRef(null);\n const [currentValue, setCurrentValue] = useState<number>(\n value || defaultValue || 0,\n );\n const [isDragging, setIsDraggging] = useState<boolean>(false);\n const { labelProps, fieldProps } = useLabel({\n id,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n });\n const formattedValue = numberFormatter(currentValue, formatOptions);\n\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport { ChangeEvent, useRef, useState } from \"react\";\nimport { DOMProps } from \"../../types/dom\";\nimport { UseLabelProps, useLabel } from \"../../hooks\";\nimport { Label } from \"../Label\";\nimport { numberFormatter } from \"./helpers\";\n\nexport interface SliderProps extends DOMProps, UseLabelProps {\n label?: string;\n variant?: \"primary\" | \"secondary\";\n className?: string;\n minValue?: number;\n maxValue?: number;\n defaultValue?: number;\n value?: number;\n step?: number;\n isDisabled?: boolean;\n onChange?: (value: number | undefined) => void;\n onChangeEnd?: (value: number | undefined) => void;\n minLabel?: string;\n maxLabel?: string;\n formatOptions?: Intl.NumberFormatOptions;\n}\n\nexport const Slider = (props: SliderProps) => {\n const {\n id,\n className,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n minValue,\n maxValue,\n step = 1,\n defaultValue = 0,\n value,\n onChange,\n onChangeEnd,\n variant = \"primary\",\n minLabel,\n maxLabel,\n formatOptions,\n isDisabled = false,\n } = props;\n const trackRef = useRef(null);\n const [currentValue, setCurrentValue] = useState<number>(\n value || defaultValue || 0,\n );\n const [isDragging, setIsDraggging] = useState<boolean>(false);\n const { labelProps, fieldProps } = useLabel({\n id,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n });\n const formattedValue = numberFormatter(currentValue, formatOptions);\n\n const classes = classNames(\"mobius\", \"mobius-slider\", className, {\n \"--is-disabled\": isDisabled,\n \"--is-primary\": variant === \"primary\",\n \"--is-secondary\": variant === \"secondary\",\n \"--is-dragging\": isDragging,\n });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const val = +e.target.value;\n setCurrentValue(val);\n if (onChange) {\n onChange(val);\n }\n };\n\n const handleChangeStart = () => {\n setIsDraggging(true);\n };\n\n const handleChangeEnd = () => {\n setIsDraggging(false);\n if (onChangeEnd) {\n onChangeEnd(currentValue);\n }\n };\n\n return (\n <div className={classes}>\n <div className=\"mobius-slider__label-wrapper\">\n {label && <Label {...labelProps}>{label}</Label>}\n {label && (\n <output style={{ flex: \"1 0 auto\", textAlign: \"end\" }}>\n {formattedValue}\n </output>\n )}\n </div>\n\n {/* The track element holds the visible track line and the thumb. */}\n <div ref={trackRef} className=\"mobius-slider__track-wrapper\">\n <input\n className=\"mobius-slider__track\"\n type=\"range\"\n min={minValue}\n max={maxValue}\n value={currentValue}\n step={step}\n onChange={handleChange}\n autoComplete=\"off\"\n disabled={isDisabled}\n onMouseDown={handleChangeStart}\n onMouseUp={handleChangeEnd}\n onKeyDown={handleChangeStart}\n onKeyUp={handleChangeEnd}\n {...fieldProps}\n />\n </div>\n\n <div className=\"mobius-slider__labels\">\n <div className=\"mobius-slider__min-label\" data-testid=\"min-label\">\n {minLabel}\n </div>\n <div className=\"mobius-slider__max-label\" data-testid=\"max-label\">\n {maxLabel}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["Slider","props","id","className","label","ariaLabel","ariaLabelledBy","minValue","maxValue","step","defaultValue","value","onChange","onChangeEnd","variant","minLabel","maxLabel","formatOptions","isDisabled","trackRef","useRef","currentValue","setCurrentValue","useState","isDragging","setIsDraggging","labelProps","fieldProps","useLabel","formattedValue","numberFormatter","classes","classNames","handleChange","e","val","target","handleChangeStart","handleChangeEnd","div","Label","output","style","flex","textAlign","ref","input","type","min","max","autoComplete","disabled","onMouseDown","onMouseUp","onKeyDown","onKeyUp","data-testid"],"mappings":"AAAA;;;;;+BA0BaA;;;eAAAA;;;;+DAxBU;uBACuB;uBAEN;uBAClB;yBACU;;;;;;AAmBzB,MAAMA,SAAS,CAACC;IACrB,MAAM,EACJC,EAAE,EACFC,SAAS,EACTC,KAAK,EACL,cAAcC,SAAS,EACvB,mBAAmBC,cAAc,EACjCC,QAAQ,EACRC,QAAQ,EACRC,OAAO,CAAC,EACRC,eAAe,CAAC,EAChBC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,UAAU,SAAS,EACnBC,QAAQ,EACRC,QAAQ,EACRC,aAAa,EACbC,aAAa,KAAK,EACnB,GAAGjB;IACJ,MAAMkB,WAAWC,IAAAA,aAAM,EAAC;IACxB,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,eAAQ,EAC9CZ,SAASD,gBAAgB;IAE3B,MAAM,CAACc,YAAYC,eAAe,GAAGF,IAAAA,eAAQ,EAAU;IACvD,MAAM,EAAEG,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,eAAQ,EAAC;QAC1C1B;QACAE;QACA,cAAcC;QACd,mBAAmBC;IACrB;IACA,MAAMuB,iBAAiBC,IAAAA,wBAAe,EAACT,cAAcJ;IAErD,MAAMc,UAAUC,IAAAA,eAAU,EAAC,UAAU,iBAAiB7B,WAAW;QAC/D,iBAAiBe;QACjB,gBAAgBJ,YAAY;QAC5B,kBAAkBA,YAAY;QAC9B,iBAAiBU;IACnB;IAEA,MAAMS,eAAe,CAACC;QACpB,MAAMC,MAAM,CAACD,EAAEE,MAAM,CAACzB,KAAK;QAC3BW,gBAAgBa;QAChB,IAAIvB,UAAU;YACZA,SAASuB;QACX;IACF;IAEA,MAAME,oBAAoB;QACxBZ,eAAe;IACjB;IAEA,MAAMa,kBAAkB;QACtBb,eAAe;QACf,IAAIZ,aAAa;YACfA,YAAYQ;QACd;IACF;IAEA,qBACE,sBAACkB;QAAIpC,WAAW4B;;0BACd,sBAACQ;gBAAIpC,WAAU;;oBACZC,uBAAS,qBAACoC,YAAK;wBAAE,GAAGd,UAAU;kCAAGtB;;oBACjCA,uBACC,qBAACqC;wBAAOC,OAAO;4BAAEC,MAAM;4BAAYC,WAAW;wBAAM;kCACjDf;;;;0BAMP,qBAACU;gBAAIM,KAAK1B;gBAAUhB,WAAU;0BAC5B,cAAA,qBAAC2C;oBACC3C,WAAU;oBACV4C,MAAK;oBACLC,KAAKzC;oBACL0C,KAAKzC;oBACLG,OAAOU;oBACPZ,MAAMA;oBACNG,UAAUqB;oBACViB,cAAa;oBACbC,UAAUjC;oBACVkC,aAAaf;oBACbgB,WAAWf;oBACXgB,WAAWjB;oBACXkB,SAASjB;oBACR,GAAGX,UAAU;;;0BAIlB,sBAACY;gBAAIpC,WAAU;;kCACb,qBAACoC;wBAAIpC,WAAU;wBAA2BqD,eAAY;kCACnDzC;;kCAEH,qBAACwB;wBAAIpC,WAAU;wBAA2BqD,eAAY;kCACnDxC;;;;;;AAKX"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Stack", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Stack;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
+
const _dedupe = /*#__PURE__*/ _interop_require_default(require("classnames/dedupe"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
+
if (typeof WeakMap !== "function") return null;
|
|
21
|
+
var cacheBabelInterop = new WeakMap();
|
|
22
|
+
var cacheNodeInterop = new WeakMap();
|
|
23
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
24
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
25
|
+
})(nodeInterop);
|
|
26
|
+
}
|
|
27
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
28
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
29
|
+
return obj;
|
|
30
|
+
}
|
|
31
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
32
|
+
return {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
37
|
+
if (cache && cache.has(obj)) {
|
|
38
|
+
return cache.get(obj);
|
|
39
|
+
}
|
|
40
|
+
var newObj = {
|
|
41
|
+
__proto__: null
|
|
42
|
+
};
|
|
43
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
+
for(var key in obj){
|
|
45
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
+
if (desc && (desc.get || desc.set)) {
|
|
48
|
+
Object.defineProperty(newObj, key, desc);
|
|
49
|
+
} else {
|
|
50
|
+
newObj[key] = obj[key];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
newObj.default = obj;
|
|
55
|
+
if (cache) {
|
|
56
|
+
cache.set(obj, newObj);
|
|
57
|
+
}
|
|
58
|
+
return newObj;
|
|
59
|
+
}
|
|
60
|
+
const Stack = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
61
|
+
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
62
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-stack", {
|
|
63
|
+
[`--gap-${gap}`]: gap
|
|
64
|
+
}, otherProps.className);
|
|
65
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Element, {
|
|
66
|
+
ref: ref,
|
|
67
|
+
...otherProps,
|
|
68
|
+
className: classes
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import React, { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport type { DOMProps } from \"../../types/dom\";\nimport type { ForwardedRefComponent } from \"../../types/components\";\nimport { SpacingType } from \"../../types\";\n\nexport type StackElementType = HTMLDivElement;\n\nexport interface StackProps extends DOMProps, RefAttributes<StackElementType> {\n children?: ReactNode;\n /** How big a gap between items */\n gap?: SpacingType;\n /** Custom class name for setting specific CSS */\n className?: string;\n elementType?: string | React.ElementType;\n}\n\nexport type StackRef = Ref<StackElementType>;\n\nexport const Stack: ForwardedRefComponent<StackProps, StackElementType> =\n forwardRef((props: StackProps, ref: StackRef) => {\n const { elementType: Element = \"div\", gap, ...otherProps } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius-stack\",\n {\n [`--gap-${gap}`]: gap,\n },\n otherProps.className,\n );\n\n return <Element ref={ref} {...otherProps} className={classes} />;\n });\n"],"names":["Stack","forwardRef","props","ref","elementType","Element","gap","otherProps","classes","classNames","className"],"mappings":";;;;+BAmBaA;;;eAAAA;;;;+DAnBoD;+DAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBhB,MAAMA,sBACXC,IAAAA,iBAAU,EAAC,CAACC,OAAmBC;IAC7B,MAAM,EAAEC,aAAaC,UAAU,KAAK,EAAEC,GAAG,EAAE,GAAGC,YAAY,GAAGL;IAE7D,MAAMM,UAAUC,IAAAA,eAAU,EACxB,UACA,gBACA;QACE,CAAC,CAAC,MAAM,EAAEH,IAAI,CAAC,CAAC,EAAEA;IACpB,GACAC,WAAWG,SAAS;IAGtB,qBAAO,qBAACL;QAAQF,KAAKA;QAAM,GAAGI,UAAU;QAAEG,WAAWF;;AACvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./Stack"), exports);
|
|
6
|
+
function _export_star(from, to) {
|
|
7
|
+
Object.keys(from).forEach(function(k) {
|
|
8
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
9
|
+
Object.defineProperty(to, k, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return from[k];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return from;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Stack/index.tsx"],"sourcesContent":["export * from \"./Stack\";\n"],"names":[],"mappings":";;;;qBAAc"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const Body = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-table__body", props.className);
|
|
21
21
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("tbody", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Table/Body.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface BodyProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type BodyRef = Ref<HTMLTableSectionElement>;\n\nconst Body: ForwardedRefComponent<BodyProps, HTMLTableSectionElement> =\n forwardRef((props: BodyProps, ref: BodyRef) => {\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Table/Body.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface BodyProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type BodyRef = Ref<HTMLTableSectionElement>;\n\nconst Body: ForwardedRefComponent<BodyProps, HTMLTableSectionElement> =\n forwardRef((props: BodyProps, ref: BodyRef) => {\n const classes = classNames(\"mobius\", \"mobius-table__body\", props.className);\n\n return <tbody ref={ref} {...props} className={classes} />;\n });\n\nBody.displayName = \"Table.Body\";\nexport { Body };\n"],"names":["Body","forwardRef","props","ref","classes","classNames","className","tbody","displayName"],"mappings":";;;;+BAmBSA;;;eAAAA;;;;uBAnBiD;+DACnC;;;;;;AAUvB,MAAMA,qBACJC,IAAAA,iBAAU,EAAC,CAACC,OAAkBC;IAC5B,MAAMC,UAAUC,IAAAA,eAAU,EAAC,UAAU,sBAAsBH,MAAMI,SAAS;IAE1E,qBAAO,qBAACC;QAAMJ,KAAKA;QAAM,GAAGD,KAAK;QAAEI,WAAWF;;AAChD;AAEFJ,KAAKQ,WAAW,GAAG"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const Cell = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-table__body-cell", props.className);
|
|
21
21
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("td", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Table/Cell.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface CellProps extends RefAttributes<HTMLTableCellElement> {\n children?: ReactNode;\n className?: string;\n colSpan?: number;\n rowSpan?: number;\n}\n\nexport type CellRef = Ref<HTMLTableCellElement>;\n\nconst Cell: ForwardedRefComponent<CellProps, HTMLTableCellElement> = forwardRef(\n (props: CellProps, ref: CellRef) => {\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Table/Cell.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface CellProps extends RefAttributes<HTMLTableCellElement> {\n children?: ReactNode;\n className?: string;\n colSpan?: number;\n rowSpan?: number;\n}\n\nexport type CellRef = Ref<HTMLTableCellElement>;\n\nconst Cell: ForwardedRefComponent<CellProps, HTMLTableCellElement> = forwardRef(\n (props: CellProps, ref: CellRef) => {\n const classes = classNames(\n \"mobius\",\n \"mobius-table__body-cell\",\n props.className,\n );\n\n return <td ref={ref} {...props} className={classes} />;\n },\n);\n\nCell.displayName = \"Table.Cell\";\nexport { Cell };\n"],"names":["Cell","forwardRef","props","ref","classes","classNames","className","td","displayName"],"mappings":";;;;+BA0BSA;;;eAAAA;;;;uBA1BiD;+DACnC;;;;;;AAYvB,MAAMA,qBAA+DC,IAAAA,iBAAU,EAC7E,CAACC,OAAkBC;IACjB,MAAMC,UAAUC,IAAAA,eAAU,EACxB,UACA,2BACAH,MAAMI,SAAS;IAGjB,qBAAO,qBAACC;QAAGJ,KAAKA;QAAM,GAAGD,KAAK;QAAEI,WAAWF;;AAC7C;AAGFJ,KAAKQ,WAAW,GAAG"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const Foot = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-table__foot", props.className);
|
|
21
21
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("tfoot", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Table/Foot.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface FootProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type FootRef = Ref<HTMLTableSectionElement>;\n\nconst Foot: ForwardedRefComponent<FootProps, HTMLTableSectionElement> =\n forwardRef((props: FootProps, ref: FootRef) => {\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Table/Foot.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface FootProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type FootRef = Ref<HTMLTableSectionElement>;\n\nconst Foot: ForwardedRefComponent<FootProps, HTMLTableSectionElement> =\n forwardRef((props: FootProps, ref: FootRef) => {\n const classes = classNames(\"mobius\", \"mobius-table__foot\", props.className);\n\n return <tfoot ref={ref} {...props} className={classes} />;\n });\n\nFoot.displayName = \"Table.Foot\";\nexport { Foot };\n"],"names":["Foot","forwardRef","props","ref","classes","classNames","className","tfoot","displayName"],"mappings":";;;;+BAmBSA;;;eAAAA;;;;uBAnBiD;+DACnC;;;;;;AAUvB,MAAMA,qBACJC,IAAAA,iBAAU,EAAC,CAACC,OAAkBC;IAC5B,MAAMC,UAAUC,IAAAA,eAAU,EAAC,UAAU,sBAAsBH,MAAMI,SAAS;IAE1E,qBAAO,qBAACC;QAAMJ,KAAKA;QAAM,GAAGD,KAAK;QAAEI,WAAWF;;AAChD;AAEFJ,KAAKQ,WAAW,GAAG"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const Head = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-table__head", props.className);
|
|
21
21
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("thead", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Table/Head.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface HeadProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type HeadRef = Ref<HTMLTableSectionElement>;\n\nconst Head: ForwardedRefComponent<HeadProps, HTMLTableSectionElement> =\n forwardRef((props: HeadProps, ref: HeadRef) => {\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Table/Head.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface HeadProps extends RefAttributes<HTMLTableSectionElement> {\n children?: ReactNode;\n className?: string;\n}\n\nexport type HeadRef = Ref<HTMLTableSectionElement>;\n\nconst Head: ForwardedRefComponent<HeadProps, HTMLTableSectionElement> =\n forwardRef((props: HeadProps, ref: HeadRef) => {\n const classes = classNames(\"mobius\", \"mobius-table__head\", props.className);\n\n return <thead ref={ref} {...props} className={classes} />;\n });\n\nHead.displayName = \"Table.Head\";\nexport { Head };\n"],"names":["Head","forwardRef","props","ref","classes","classNames","className","thead","displayName"],"mappings":";;;;+BAmBSA;;;eAAAA;;;;uBAnBiD;+DACnC;;;;;;AAUvB,MAAMA,qBACJC,IAAAA,iBAAU,EAAC,CAACC,OAAkBC;IAC5B,MAAMC,UAAUC,IAAAA,eAAU,EAAC,UAAU,sBAAsBH,MAAMI,SAAS;IAE1E,qBAAO,qBAACC;QAAMJ,KAAKA;QAAM,GAAGD,KAAK;QAAEI,WAAWF;;AAChD;AAEFJ,KAAKQ,WAAW,GAAG"}
|
|
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const HeaderCell = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
|
|
20
|
-
const classes = (0, _dedupe.default)("mobius", "mobius
|
|
20
|
+
const classes = (0, _dedupe.default)("mobius", "mobius-table__head-cell", props.className);
|
|
21
21
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("th", {
|
|
22
22
|
...props,
|
|
23
23
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Table/HeaderCell.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface HeaderCellProps extends RefAttributes<HTMLTableCellElement> {\n children?: ReactNode;\n className?: string;\n colSpan?: number;\n rowSpan?: number;\n}\n\nexport type HeaderCellRef = Ref<HTMLTableCellElement>;\n\nconst HeaderCell: ForwardedRefComponent<HeaderCellProps, HTMLTableCellElement> =\n forwardRef((props: HeaderCellProps, ref: HeaderCellRef) => {\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Table/HeaderCell.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes, ReactNode } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport interface HeaderCellProps extends RefAttributes<HTMLTableCellElement> {\n children?: ReactNode;\n className?: string;\n colSpan?: number;\n rowSpan?: number;\n}\n\nexport type HeaderCellRef = Ref<HTMLTableCellElement>;\n\nconst HeaderCell: ForwardedRefComponent<HeaderCellProps, HTMLTableCellElement> =\n forwardRef((props: HeaderCellProps, ref: HeaderCellRef) => {\n const classes = classNames(\n \"mobius\",\n \"mobius-table__head-cell\",\n props.className,\n );\n\n return <th {...props} ref={ref} className={classes} />;\n });\n\nHeaderCell.displayName = \"Table.HeaderCell\";\nexport { HeaderCell };\n"],"names":["HeaderCell","forwardRef","props","ref","classes","classNames","className","th","displayName"],"mappings":";;;;+BAyBSA;;;eAAAA;;;;uBAzBiD;+DACnC;;;;;;AAYvB,MAAMA,2BACJC,IAAAA,iBAAU,EAAC,CAACC,OAAwBC;IAClC,MAAMC,UAAUC,IAAAA,eAAU,EACxB,UACA,2BACAH,MAAMI,SAAS;IAGjB,qBAAO,qBAACC;QAAI,GAAGL,KAAK;QAAEC,KAAKA;QAAKG,WAAWF;;AAC7C;AAEFJ,WAAWQ,WAAW,GAAG"}
|