@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
|
@@ -28,9 +28,9 @@ const useFieldset = (props)=>{
|
|
|
28
28
|
const Fieldset = /*#__PURE__*/ forwardRef((props, _ref)=>{
|
|
29
29
|
const { children, legend, legendComponent = /*#__PURE__*/ _jsx("legend", {}), ...otherProps } = props;
|
|
30
30
|
const { legendProps, containerProps } = useFieldset(props);
|
|
31
|
-
const classes = classNames("mobius", "mobius
|
|
31
|
+
const classes = classNames("mobius", "mobius-fieldset", props.className);
|
|
32
32
|
// Set class on legend
|
|
33
|
-
legendProps.className = "mobius
|
|
33
|
+
legendProps.className = "mobius-fieldset__legend";
|
|
34
34
|
return /*#__PURE__*/ _jsxs(Flex, {
|
|
35
35
|
...containerProps,
|
|
36
36
|
...otherProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n cloneElement,\n forwardRef,\n useId,\n} from \"react\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { Flex } from \"../Flex\";\n\nexport type LegendProps = {\n id?: string;\n className?: string;\n};\n\ntype ContainerProps = {\n \"aria-labelledby\"?: string;\n role: string;\n};\n\nconst useFieldset = (\n props: FieldsetProps,\n): { legendProps: LegendProps; containerProps: ContainerProps } => {\n const { legend } = props;\n\n let legendProps: LegendProps = {};\n let containerProps: ContainerProps = {\n role: \"group\",\n };\n\n const legendId = useId();\n if (legend) {\n legendProps = {\n ...legendProps,\n id: legendId,\n };\n containerProps = {\n ...containerProps,\n \"aria-labelledby\": legendId,\n };\n }\n\n return {\n legendProps,\n containerProps,\n };\n};\n\nexport type FieldsetElementType = HTMLDivElement;\nexport interface FieldsetProps\n extends DOMProps,\n RefAttributes<FieldsetElementType> {\n legend?: string;\n children: ReactNode;\n className?: string;\n legendComponent?: ReactElement<any>;\n}\n\nexport type FieldsetRef = Ref<FieldsetElementType>;\n\nconst Fieldset: ForwardedRefComponent<FieldsetProps, FieldsetElementType> =\n forwardRef((props: FieldsetProps, _ref: FieldsetRef) => {\n const {\n children,\n legend,\n legendComponent = <legend />,\n ...otherProps\n } = props;\n\n const { legendProps, containerProps } = useFieldset(props);\n\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n cloneElement,\n forwardRef,\n useId,\n} from \"react\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { Flex } from \"../Flex\";\n\nexport type LegendProps = {\n id?: string;\n className?: string;\n};\n\ntype ContainerProps = {\n \"aria-labelledby\"?: string;\n role: string;\n};\n\nconst useFieldset = (\n props: FieldsetProps,\n): { legendProps: LegendProps; containerProps: ContainerProps } => {\n const { legend } = props;\n\n let legendProps: LegendProps = {};\n let containerProps: ContainerProps = {\n role: \"group\",\n };\n\n const legendId = useId();\n if (legend) {\n legendProps = {\n ...legendProps,\n id: legendId,\n };\n containerProps = {\n ...containerProps,\n \"aria-labelledby\": legendId,\n };\n }\n\n return {\n legendProps,\n containerProps,\n };\n};\n\nexport type FieldsetElementType = HTMLDivElement;\nexport interface FieldsetProps\n extends DOMProps,\n RefAttributes<FieldsetElementType> {\n legend?: string;\n children: ReactNode;\n className?: string;\n legendComponent?: ReactElement<any>;\n}\n\nexport type FieldsetRef = Ref<FieldsetElementType>;\n\nconst Fieldset: ForwardedRefComponent<FieldsetProps, FieldsetElementType> =\n forwardRef((props: FieldsetProps, _ref: FieldsetRef) => {\n const {\n children,\n legend,\n legendComponent = <legend />,\n ...otherProps\n } = props;\n\n const { legendProps, containerProps } = useFieldset(props);\n\n const classes = classNames(\"mobius\", \"mobius-fieldset\", props.className);\n\n // Set class on legend\n legendProps.className = \"mobius-fieldset__legend\";\n\n return (\n <Flex {...containerProps} {...otherProps} className={classes}>\n {legend && cloneElement(legendComponent, { ...legendProps }, [legend])}\n {children}\n </Flex>\n );\n });\n\nFieldset.displayName = \"Fieldset\";\nexport { Fieldset };\n"],"names":["classNames","cloneElement","forwardRef","useId","Flex","useFieldset","props","legend","legendProps","containerProps","role","legendId","id","Fieldset","_ref","children","legendComponent","otherProps","classes","className","displayName"],"mappings":"AAAA;;AAEA,OAAOA,gBAAgB,oBAAoB;AAC3C,SAKEC,YAAY,EACZC,UAAU,EACVC,KAAK,QACA,QAAQ;AAGf,SAASC,IAAI,QAAQ,UAAU;AAY/B,MAAMC,cAAc,CAClBC;IAEA,MAAM,EAAEC,MAAM,EAAE,GAAGD;IAEnB,IAAIE,cAA2B,CAAC;IAChC,IAAIC,iBAAiC;QACnCC,MAAM;IACR;IAEA,MAAMC,WAAWR;IACjB,IAAII,QAAQ;QACVC,cAAc;YACZ,GAAGA,WAAW;YACdI,IAAID;QACN;QACAF,iBAAiB;YACf,GAAGA,cAAc;YACjB,mBAAmBE;QACrB;IACF;IAEA,OAAO;QACLH;QACAC;IACF;AACF;AAcA,MAAMI,yBACJX,WAAW,CAACI,OAAsBQ;IAChC,MAAM,EACJC,QAAQ,EACRR,MAAM,EACNS,gCAAkB,KAACT,aAAS,EAC5B,GAAGU,YACJ,GAAGX;IAEJ,MAAM,EAAEE,WAAW,EAAEC,cAAc,EAAE,GAAGJ,YAAYC;IAEpD,MAAMY,UAAUlB,WAAW,UAAU,mBAAmBM,MAAMa,SAAS;IAEvE,sBAAsB;IACtBX,YAAYW,SAAS,GAAG;IAExB,qBACE,MAACf;QAAM,GAAGK,cAAc;QAAG,GAAGQ,UAAU;QAAEE,WAAWD;;YAClDX,wBAAUN,aAAae,iBAAiB;gBAAE,GAAGR,WAAW;YAAC,GAAG;gBAACD;aAAO;YACpEQ;;;AAGP;AAEFF,SAASO,WAAW,GAAG;AACvB,SAASP,QAAQ,GAAG"}
|
|
@@ -4,7 +4,7 @@ import classNames from "classnames/dedupe";
|
|
|
4
4
|
import { buildFlexStyles, splitProps } from "./propUtils";
|
|
5
5
|
const Flex = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { elementType: Element = "div", style, className, ...otherProps } = props;
|
|
7
|
-
const classes = classNames("mobius", "mobius
|
|
7
|
+
const classes = classNames("mobius", "mobius-flex", className);
|
|
8
8
|
const [styleProps, restProps] = splitProps(otherProps);
|
|
9
9
|
const flexStyles = buildFlexStyles(styleProps);
|
|
10
10
|
return /*#__PURE__*/ _jsx(Element, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Flex/Flex.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { FlexElementType, FlexProps, FlexRef } from \"./types\";\nimport { buildFlexStyles, splitProps } from \"./propUtils\";\n\nconst Flex: ForwardedRefComponent<FlexProps, FlexElementType> = forwardRef(\n (props: FlexProps, ref: FlexRef) => {\n const {\n elementType: Element = \"div\",\n style,\n className,\n ...otherProps\n } = props;\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Flex/Flex.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { FlexElementType, FlexProps, FlexRef } from \"./types\";\nimport { buildFlexStyles, splitProps } from \"./propUtils\";\n\nconst Flex: ForwardedRefComponent<FlexProps, FlexElementType> = forwardRef(\n (props: FlexProps, ref: FlexRef) => {\n const {\n elementType: Element = \"div\",\n style,\n className,\n ...otherProps\n } = props;\n const classes = classNames(\"mobius\", \"mobius-flex\", className);\n\n const [styleProps, restProps] = splitProps(otherProps);\n const flexStyles = buildFlexStyles(styleProps);\n\n return (\n <Element\n ref={ref}\n style={{\n ...flexStyles,\n ...style,\n }}\n className={classes}\n {...restProps}\n />\n );\n },\n);\n\nFlex.displayName = \"Flex\";\nexport { Flex };\n"],"names":["forwardRef","classNames","buildFlexStyles","splitProps","Flex","props","ref","elementType","Element","style","className","otherProps","classes","styleProps","restProps","flexStyles","displayName"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,OAAOC,gBAAgB,oBAAoB;AAG3C,SAASC,eAAe,EAAEC,UAAU,QAAQ,cAAc;AAE1D,MAAMC,qBAA0DJ,WAC9D,CAACK,OAAkBC;IACjB,MAAM,EACJC,aAAaC,UAAU,KAAK,EAC5BC,KAAK,EACLC,SAAS,EACT,GAAGC,YACJ,GAAGN;IACJ,MAAMO,UAAUX,WAAW,UAAU,eAAeS;IAEpD,MAAM,CAACG,YAAYC,UAAU,GAAGX,WAAWQ;IAC3C,MAAMI,aAAab,gBAAgBW;IAEnC,qBACE,KAACL;QACCF,KAAKA;QACLG,OAAO;YACL,GAAGM,UAAU;YACb,GAAGN,KAAK;QACV;QACAC,WAAWE;QACV,GAAGE,SAAS;;AAGnB;AAGFV,KAAKY,WAAW,GAAG;AACnB,SAASZ,IAAI,GAAG"}
|
|
@@ -4,7 +4,7 @@ import classNames from "classnames/dedupe";
|
|
|
4
4
|
import { filterUndefinedProps, getSpacingValue } from "../../utils";
|
|
5
5
|
const Grid = /*#__PURE__*/ forwardRef((props, _ref)=>{
|
|
6
6
|
const { columns = 12, gap, columnGap, rowGap, alignContent, alignItems, justifyContent, justifyItems, className, style, ...rest } = props;
|
|
7
|
-
const classes = classNames("mobius", "mobius
|
|
7
|
+
const classes = classNames("mobius", "mobius-grid", className);
|
|
8
8
|
const styles = filterUndefinedProps({
|
|
9
9
|
boxSizing: "border-box",
|
|
10
10
|
display: "grid",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import {\n Ref,\n forwardRef,\n ReactNode,\n RefAttributes,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { filterUndefinedProps, getSpacingValue } from \"../../utils\";\nimport { SpacingType } from \"../../types\";\n\nexport type GridElementType = HTMLDivElement;\n\nexport interface GridProps extends RefAttributes<GridElementType>, DOMProps {\n children?: ReactNode;\n /** The number of columns */\n columns?: number;\n /** How big a gap between the columns and rows */\n gap?: SpacingType;\n /** How big a gap between the columns */\n columnGap?: SpacingType;\n /** How big a gap between the rows */\n rowGap?: SpacingType;\n /** Aligns the grid along the block (column) axis */\n alignContent?:\n | \"center\"\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\"\n | \"stretch\";\n /** Aligns the grid along the inline (row) axis */\n justifyContent?:\n | \"center\"\n | \"start\"\n | \"end\"\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\";\n /** Aligns grid items along the block (column) axis */\n alignItems?: \"center\" | \"start\" | \"end\" | \"stretch\" | \"baseline\";\n /** Aligns grid items along the inline (row) axis */\n justifyItems?: \"start\" | \"end\" | \"center\" | \"stretch\";\n /** Custom class name for setting specific CSS */\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport type GridRef = Ref<GridElementType>;\n\nconst Grid: ForwardedRefComponent<GridProps, GridElementType> = forwardRef(\n (props: GridProps, _ref: GridRef) => {\n const {\n columns = 12,\n gap,\n columnGap,\n rowGap,\n alignContent,\n alignItems,\n justifyContent,\n justifyItems,\n className,\n style,\n ...rest\n } = props;\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import {\n Ref,\n forwardRef,\n ReactNode,\n RefAttributes,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { filterUndefinedProps, getSpacingValue } from \"../../utils\";\nimport { SpacingType } from \"../../types\";\n\nexport type GridElementType = HTMLDivElement;\n\nexport interface GridProps extends RefAttributes<GridElementType>, DOMProps {\n children?: ReactNode;\n /** The number of columns */\n columns?: number;\n /** How big a gap between the columns and rows */\n gap?: SpacingType;\n /** How big a gap between the columns */\n columnGap?: SpacingType;\n /** How big a gap between the rows */\n rowGap?: SpacingType;\n /** Aligns the grid along the block (column) axis */\n alignContent?:\n | \"center\"\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\"\n | \"stretch\";\n /** Aligns the grid along the inline (row) axis */\n justifyContent?:\n | \"center\"\n | \"start\"\n | \"end\"\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\";\n /** Aligns grid items along the block (column) axis */\n alignItems?: \"center\" | \"start\" | \"end\" | \"stretch\" | \"baseline\";\n /** Aligns grid items along the inline (row) axis */\n justifyItems?: \"start\" | \"end\" | \"center\" | \"stretch\";\n /** Custom class name for setting specific CSS */\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport type GridRef = Ref<GridElementType>;\n\nconst Grid: ForwardedRefComponent<GridProps, GridElementType> = forwardRef(\n (props: GridProps, _ref: GridRef) => {\n const {\n columns = 12,\n gap,\n columnGap,\n rowGap,\n alignContent,\n alignItems,\n justifyContent,\n justifyItems,\n className,\n style,\n ...rest\n } = props;\n const classes = classNames(\"mobius\", \"mobius-grid\", className);\n\n const styles: CSSProperties = filterUndefinedProps({\n boxSizing: \"border-box\",\n display: \"grid\",\n gridTemplateColumns: `repeat(${columns}, 1fr)`,\n gap: getSpacingValue(gap),\n columnGap: getSpacingValue(columnGap),\n rowGap: getSpacingValue(rowGap),\n alignContent,\n alignItems,\n justifyContent,\n justifyItems,\n ...style,\n });\n\n return <div style={styles} className={classes} {...rest} />;\n },\n);\n\nGrid.displayName = \"Grid\";\nexport { Grid };\n"],"names":["forwardRef","classNames","filterUndefinedProps","getSpacingValue","Grid","props","_ref","columns","gap","columnGap","rowGap","alignContent","alignItems","justifyContent","justifyItems","className","style","rest","classes","styles","boxSizing","display","gridTemplateColumns","div","displayName"],"mappings":";AAAA,SAEEA,UAAU,QAIL,QAAQ;AACf,OAAOC,gBAAgB,oBAAoB;AAG3C,SAASC,oBAAoB,EAAEC,eAAe,QAAQ,cAAc;AAyCpE,MAAMC,qBAA0DJ,WAC9D,CAACK,OAAkBC;IACjB,MAAM,EACJC,UAAU,EAAE,EACZC,GAAG,EACHC,SAAS,EACTC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,cAAc,EACdC,YAAY,EACZC,SAAS,EACTC,KAAK,EACL,GAAGC,MACJ,GAAGZ;IACJ,MAAMa,UAAUjB,WAAW,UAAU,eAAec;IAEpD,MAAMI,SAAwBjB,qBAAqB;QACjDkB,WAAW;QACXC,SAAS;QACTC,qBAAqB,CAAC,OAAO,EAAEf,QAAQ,MAAM,CAAC;QAC9CC,KAAKL,gBAAgBK;QACrBC,WAAWN,gBAAgBM;QAC3BC,QAAQP,gBAAgBO;QACxBC;QACAC;QACAC;QACAC;QACA,GAAGE,KAAK;IACV;IAEA,qBAAO,KAACO;QAAIP,OAAOG;QAAQJ,WAAWG;QAAU,GAAGD,IAAI;;AACzD;AAGFb,KAAKoB,WAAW,GAAG;AACnB,SAASpB,IAAI,GAAG"}
|
|
@@ -24,7 +24,7 @@ const GridItem = /*#__PURE__*/ forwardRef((props, _ref)=>{
|
|
|
24
24
|
xxl
|
|
25
25
|
});
|
|
26
26
|
const [responsiveSpan, setResponsiveSpan] = useState();
|
|
27
|
-
const classes = classNames("mobius
|
|
27
|
+
const classes = classNames("mobius-grid__item", className);
|
|
28
28
|
useEffect(()=>{
|
|
29
29
|
// @ts-expect-error
|
|
30
30
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Grid/Item.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Ref,\n forwardRef,\n RefAttributes,\n useEffect,\n useState,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { useBreakpoint } from \"../../hooks\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { SizeType } from \"../../types\";\n\nexport type GridItemElementType = HTMLDivElement;\n\nexport interface GridItemProps\n extends RefAttributes<GridItemElementType>,\n DOMProps {\n /** How many columns the item spans */\n span?: number | number[];\n /** React children */\n children?: React.ReactNode;\n /** How many columns the item spans on the smallest breakpoint */\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n /** How many columns the item spans on the largest breakpoint */\n xxl?: number;\n /** Aligns the grid item along the block (column) axis */\n alignSelf?: \"center\" | \"start\" | \"end\" | \"stretch\";\n /** Aligns the grid item along the inline (row) axis */\n justifySelf?: \"center\" | \"start\" | \"end\" | \"stretch\";\n /** Custom class name for setting specific CSS */\n className?: string;\n}\n\nexport const getBreakpointMap = (config: Partial<Record<SizeType, number>>) =>\n Object.entries(config).reduce((prev, [key, value]) => {\n const previous = Object.values(prev);\n const lastDefined = previous[previous.length - 1];\n return { ...prev, [key]: value || lastDefined };\n }, {});\n\nexport type GridItemRef = Ref<GridItemElementType>;\n\nexport const DEFAULT_SPAN = 12;\n\nconst GridItem: ForwardedRefComponent<GridItemProps, GridItemElementType> =\n forwardRef((props: GridItemProps, _ref: GridItemRef) => {\n const {\n breakpoint: { size: breakpointSize },\n } = useBreakpoint();\n const {\n span,\n xs = Array.isArray(span) ? DEFAULT_SPAN : span,\n sm,\n md,\n lg,\n xl,\n xxl,\n alignSelf,\n justifySelf,\n className,\n ...rest\n } = props;\n const breakpointMap = getBreakpointMap({\n xs,\n sm,\n md,\n lg,\n xl,\n xxl,\n });\n const [responsiveSpan, setResponsiveSpan] = useState();\n const classes = classNames(\"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Grid/Item.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Ref,\n forwardRef,\n RefAttributes,\n useEffect,\n useState,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { useBreakpoint } from \"../../hooks\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { SizeType } from \"../../types\";\n\nexport type GridItemElementType = HTMLDivElement;\n\nexport interface GridItemProps\n extends RefAttributes<GridItemElementType>,\n DOMProps {\n /** How many columns the item spans */\n span?: number | number[];\n /** React children */\n children?: React.ReactNode;\n /** How many columns the item spans on the smallest breakpoint */\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n /** How many columns the item spans on the largest breakpoint */\n xxl?: number;\n /** Aligns the grid item along the block (column) axis */\n alignSelf?: \"center\" | \"start\" | \"end\" | \"stretch\";\n /** Aligns the grid item along the inline (row) axis */\n justifySelf?: \"center\" | \"start\" | \"end\" | \"stretch\";\n /** Custom class name for setting specific CSS */\n className?: string;\n}\n\nexport const getBreakpointMap = (config: Partial<Record<SizeType, number>>) =>\n Object.entries(config).reduce((prev, [key, value]) => {\n const previous = Object.values(prev);\n const lastDefined = previous[previous.length - 1];\n return { ...prev, [key]: value || lastDefined };\n }, {});\n\nexport type GridItemRef = Ref<GridItemElementType>;\n\nexport const DEFAULT_SPAN = 12;\n\nconst GridItem: ForwardedRefComponent<GridItemProps, GridItemElementType> =\n forwardRef((props: GridItemProps, _ref: GridItemRef) => {\n const {\n breakpoint: { size: breakpointSize },\n } = useBreakpoint();\n const {\n span,\n xs = Array.isArray(span) ? DEFAULT_SPAN : span,\n sm,\n md,\n lg,\n xl,\n xxl,\n alignSelf,\n justifySelf,\n className,\n ...rest\n } = props;\n const breakpointMap = getBreakpointMap({\n xs,\n sm,\n md,\n lg,\n xl,\n xxl,\n });\n const [responsiveSpan, setResponsiveSpan] = useState();\n const classes = classNames(\"mobius-grid__item\", className);\n\n useEffect(() => {\n // @ts-expect-error\n setResponsiveSpan(breakpointMap[breakpointSize]);\n }, [breakpointSize, breakpointMap]);\n\n const styles: CSSProperties = {\n gridColumn: responsiveSpan ? `span ${responsiveSpan}` : undefined,\n alignSelf,\n justifySelf,\n };\n\n return <div style={{ ...styles }} className={classes} {...rest} />;\n });\n\nGridItem.displayName = \"GridItem\";\nexport { GridItem };\n"],"names":["forwardRef","useEffect","useState","classNames","useBreakpoint","getBreakpointMap","config","Object","entries","reduce","prev","key","value","previous","values","lastDefined","length","DEFAULT_SPAN","GridItem","props","_ref","breakpoint","size","breakpointSize","span","xs","Array","isArray","sm","md","lg","xl","xxl","alignSelf","justifySelf","className","rest","breakpointMap","responsiveSpan","setResponsiveSpan","classes","styles","gridColumn","undefined","div","style","displayName"],"mappings":"AAAA;;AAEA,SAEEA,UAAU,EAEVC,SAAS,EACTC,QAAQ,QAEH,QAAQ;AACf,OAAOC,gBAAgB,oBAAoB;AAE3C,SAASC,aAAa,QAAQ,cAAc;AA6B5C,OAAO,MAAMC,mBAAmB,CAACC,SAC/BC,OAAOC,OAAO,CAACF,QAAQG,MAAM,CAAC,CAACC,MAAM,CAACC,KAAKC,MAAM;QAC/C,MAAMC,WAAWN,OAAOO,MAAM,CAACJ;QAC/B,MAAMK,cAAcF,QAAQ,CAACA,SAASG,MAAM,GAAG,EAAE;QACjD,OAAO;YAAE,GAAGN,IAAI;YAAE,CAACC,IAAI,EAAEC,SAASG;QAAY;IAChD,GAAG,CAAC,GAAG;AAIT,OAAO,MAAME,eAAe,GAAG;AAE/B,MAAMC,yBACJlB,WAAW,CAACmB,OAAsBC;IAChC,MAAM,EACJC,YAAY,EAAEC,MAAMC,cAAc,EAAE,EACrC,GAAGnB;IACJ,MAAM,EACJoB,IAAI,EACJC,KAAKC,MAAMC,OAAO,CAACH,QAAQP,eAAeO,IAAI,EAC9CI,EAAE,EACFC,EAAE,EACFC,EAAE,EACFC,EAAE,EACFC,GAAG,EACHC,SAAS,EACTC,WAAW,EACXC,SAAS,EACT,GAAGC,MACJ,GAAGjB;IACJ,MAAMkB,gBAAgBhC,iBAAiB;QACrCoB;QACAG;QACAC;QACAC;QACAC;QACAC;IACF;IACA,MAAM,CAACM,gBAAgBC,kBAAkB,GAAGrC;IAC5C,MAAMsC,UAAUrC,WAAW,qBAAqBgC;IAEhDlC,UAAU;QACR,mBAAmB;QACnBsC,kBAAkBF,aAAa,CAACd,eAAe;IACjD,GAAG;QAACA;QAAgBc;KAAc;IAElC,MAAMI,SAAwB;QAC5BC,YAAYJ,iBAAiB,CAAC,KAAK,EAAEA,eAAe,CAAC,GAAGK;QACxDV;QACAC;IACF;IAEA,qBAAO,KAACU;QAAIC,OAAO;YAAE,GAAGJ,MAAM;QAAC;QAAGN,WAAWK;QAAU,GAAGJ,IAAI;;AAChE;AAEFlB,SAAS4B,WAAW,GAAG;AACvB,SAAS5B,QAAQ,GAAG"}
|
|
@@ -6,7 +6,7 @@ export function Icon({ icon, className, size = "xs", color, fixedWidth, spin, sp
|
|
|
6
6
|
if (!icon) {
|
|
7
7
|
throw new Error("Must specify icon object");
|
|
8
8
|
}
|
|
9
|
-
const classes = classNames("mobius", "mobius
|
|
9
|
+
const classes = classNames("mobius", "mobius-icon", `svg-inline--${ICON_PREFIX}`, `--size-${size}`, className, {
|
|
10
10
|
[`${ICON_PREFIX}-fw`]: fixedWidth,
|
|
11
11
|
[`${ICON_PREFIX}-spin`]: spin || spinReverse,
|
|
12
12
|
[`${ICON_PREFIX}-spin-reverse`]: spinReverse
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import classNames from \"classnames/dedupe\";\nimport { IconProps } from \"./types\";\n\nconst ICON_PREFIX = \"mobius-icon\";\n\nconst capitaliseFirstLetter = (str: string) =>\n str.charAt(0).toUpperCase() + str.slice(1);\n\nexport function Icon({\n icon,\n className,\n size = \"xs\",\n color,\n fixedWidth,\n spin,\n spinReverse,\n title,\n ...otherProps\n}: IconProps) {\n if (!icon) {\n throw new Error(\"Must specify icon object\");\n }\n\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import classNames from \"classnames/dedupe\";\nimport { IconProps } from \"./types\";\n\nconst ICON_PREFIX = \"mobius-icon\";\n\nconst capitaliseFirstLetter = (str: string) =>\n str.charAt(0).toUpperCase() + str.slice(1);\n\nexport function Icon({\n icon,\n className,\n size = \"xs\",\n color,\n fixedWidth,\n spin,\n spinReverse,\n title,\n ...otherProps\n}: IconProps) {\n if (!icon) {\n throw new Error(\"Must specify icon object\");\n }\n\n const classes = classNames(\n \"mobius\",\n \"mobius-icon\",\n `svg-inline--${ICON_PREFIX}`,\n `--size-${size}`,\n className,\n {\n [`${ICON_PREFIX}-fw`]: fixedWidth,\n [`${ICON_PREFIX}-spin`]: spin || spinReverse,\n [`${ICON_PREFIX}-spin-reverse`]: spinReverse,\n },\n );\n\n const { iconName, width, height, svgPathData } = icon;\n const formattedIconName = iconName.split(\"-\").join(\" \");\n\n const defaultTitle = `${capitaliseFirstLetter(formattedIconName)} icon`;\n const titleText = title || defaultTitle;\n\n return (\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n data-icon={iconName}\n className={classes}\n role=\"img\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={`0 0 ${width} ${height}`}\n style={{ color }}\n {...otherProps}\n >\n <title>{titleText}</title>\n <path fill=\"currentColor\" d={svgPathData} />\n </svg>\n );\n}\n"],"names":["classNames","ICON_PREFIX","capitaliseFirstLetter","str","charAt","toUpperCase","slice","Icon","icon","className","size","color","fixedWidth","spin","spinReverse","title","otherProps","Error","classes","iconName","width","height","svgPathData","formattedIconName","split","join","defaultTitle","titleText","svg","aria-hidden","focusable","data-icon","role","xmlns","viewBox","style","path","fill","d"],"mappings":";AAAA,OAAOA,gBAAgB,oBAAoB;AAG3C,MAAMC,cAAc;AAEpB,MAAMC,wBAAwB,CAACC,MAC7BA,IAAIC,MAAM,CAAC,GAAGC,WAAW,KAAKF,IAAIG,KAAK,CAAC;AAE1C,OAAO,SAASC,KAAK,EACnBC,IAAI,EACJC,SAAS,EACTC,OAAO,IAAI,EACXC,KAAK,EACLC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,KAAK,EACL,GAAGC,YACO;IACV,IAAI,CAACR,MAAM;QACT,MAAM,IAAIS,MAAM;IAClB;IAEA,MAAMC,UAAUlB,WACd,UACA,eACA,CAAC,YAAY,EAAEC,YAAY,CAAC,EAC5B,CAAC,OAAO,EAAES,KAAK,CAAC,EAChBD,WACA;QACE,CAAC,CAAC,EAAER,YAAY,GAAG,CAAC,CAAC,EAAEW;QACvB,CAAC,CAAC,EAAEX,YAAY,KAAK,CAAC,CAAC,EAAEY,QAAQC;QACjC,CAAC,CAAC,EAAEb,YAAY,aAAa,CAAC,CAAC,EAAEa;IACnC;IAGF,MAAM,EAAEK,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,WAAW,EAAE,GAAGd;IACjD,MAAMe,oBAAoBJ,SAASK,KAAK,CAAC,KAAKC,IAAI,CAAC;IAEnD,MAAMC,eAAe,CAAC,EAAExB,sBAAsBqB,mBAAmB,KAAK,CAAC;IACvE,MAAMI,YAAYZ,SAASW;IAE3B,qBACE,MAACE;QACCC,eAAY;QACZC,WAAU;QACVC,aAAWZ;QACXV,WAAWS;QACXc,MAAK;QACLC,OAAM;QACNC,SAAS,CAAC,IAAI,EAAEd,MAAM,CAAC,EAAEC,OAAO,CAAC;QACjCc,OAAO;YAAExB;QAAM;QACd,GAAGK,UAAU;;0BAEd,KAACD;0BAAOY;;0BACR,KAACS;gBAAKC,MAAK;gBAAeC,GAAGhB;;;;AAGnC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import classNames from "classnames/dedupe";
|
|
4
4
|
const Image = /*#__PURE__*/ forwardRef(({ alt, elementType: Component = "img", ...otherProps }, ref)=>{
|
|
5
|
-
const classes = classNames("mobius", "mobius
|
|
5
|
+
const classes = classNames("mobius", "mobius-image", otherProps.className);
|
|
6
6
|
return /*#__PURE__*/ _jsx(Component, {
|
|
7
7
|
alt: alt,
|
|
8
8
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Image/Image.tsx"],"sourcesContent":["import { forwardRef, RefAttributes, Ref } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type IntrinsicImage = Omit<\n JSX.IntrinsicElements[\"img\"],\n \"css\" | \"width\" | \"height\" | \"color\"\n> &\n RefAttributes<HTMLImageElement>;\n\nexport interface ImageProps extends DOMProps, IntrinsicImage {\n /** HTML element for the Box */\n elementType?: React.ElementType;\n /** Alternative text for accessibility */\n alt: string;\n /** Path to image asset */\n src: string;\n /** Custom class name for setting specific CSS */\n className?: string;\n}\n\nexport type ImageRef = Ref<HTMLImageElement>;\n\nconst Image: ForwardedRefComponent<ImageProps, HTMLImageElement> = forwardRef(\n (\n { alt, elementType: Component = \"img\", ...otherProps }: ImageProps,\n ref: ImageRef,\n ) => {\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Image/Image.tsx"],"sourcesContent":["import { forwardRef, RefAttributes, Ref } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type IntrinsicImage = Omit<\n JSX.IntrinsicElements[\"img\"],\n \"css\" | \"width\" | \"height\" | \"color\"\n> &\n RefAttributes<HTMLImageElement>;\n\nexport interface ImageProps extends DOMProps, IntrinsicImage {\n /** HTML element for the Box */\n elementType?: React.ElementType;\n /** Alternative text for accessibility */\n alt: string;\n /** Path to image asset */\n src: string;\n /** Custom class name for setting specific CSS */\n className?: string;\n}\n\nexport type ImageRef = Ref<HTMLImageElement>;\n\nconst Image: ForwardedRefComponent<ImageProps, HTMLImageElement> = forwardRef(\n (\n { alt, elementType: Component = \"img\", ...otherProps }: ImageProps,\n ref: ImageRef,\n ) => {\n const classes = classNames(\"mobius\", \"mobius-image\", otherProps.className);\n\n return (\n <Component alt={alt} ref={ref} {...otherProps} className={classes} />\n );\n },\n);\n\nImage.displayName = \"Image\";\nexport { Image };\n"],"names":["forwardRef","classNames","Image","alt","elementType","Component","otherProps","ref","classes","className","displayName"],"mappings":";AAAA,SAASA,UAAU,QAA4B,QAAQ;AACvD,OAAOC,gBAAgB,oBAAoB;AAuB3C,MAAMC,sBAA6DF,WACjE,CACE,EAAEG,GAAG,EAAEC,aAAaC,YAAY,KAAK,EAAE,GAAGC,YAAwB,EAClEC;IAEA,MAAMC,UAAUP,WAAW,UAAU,gBAAgBK,WAAWG,SAAS;IAEzE,qBACE,KAACJ;QAAUF,KAAKA;QAAKI,KAAKA;QAAM,GAAGD,UAAU;QAAEG,WAAWD;;AAE9D;AAGFN,MAAMQ,WAAW,GAAG;AACpB,SAASR,KAAK,GAAG"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import classNames from "classnames/dedupe";
|
|
4
4
|
const Label = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
5
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
6
|
-
const classes = classNames("mobius", "mobius
|
|
6
|
+
const classes = classNames("mobius", "mobius-label", props.className);
|
|
7
7
|
otherProps.className = classes;
|
|
8
8
|
return /*#__PURE__*/ _jsx(Element, {
|
|
9
9
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Label/Label.tsx"],"sourcesContent":["import { forwardRef, ReactNode, Ref, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LabelElementType = HTMLLabelElement;\nexport type IntrinsicLabel = Omit<\n JSX.IntrinsicElements[\"label\"],\n \"css\" | \"color\" | \"ref\"\n>;\n\nexport interface LabelProps\n extends IntrinsicLabel,\n DOMProps,\n RefAttributes<LabelElementType> {\n children?: ReactNode;\n className?: string;\n elementType?: \"label\" | \"span\";\n}\n\nexport type LabelRef = Ref<LabelElementType>;\n\nconst Label: ForwardedRefComponent<LabelProps, LabelElementType> = forwardRef(\n (props: LabelProps, ref: LabelRef) => {\n const { elementType: Element = \"label\", children, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Label/Label.tsx"],"sourcesContent":["import { forwardRef, ReactNode, Ref, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LabelElementType = HTMLLabelElement;\nexport type IntrinsicLabel = Omit<\n JSX.IntrinsicElements[\"label\"],\n \"css\" | \"color\" | \"ref\"\n>;\n\nexport interface LabelProps\n extends IntrinsicLabel,\n DOMProps,\n RefAttributes<LabelElementType> {\n children?: ReactNode;\n className?: string;\n elementType?: \"label\" | \"span\";\n}\n\nexport type LabelRef = Ref<LabelElementType>;\n\nconst Label: ForwardedRefComponent<LabelProps, LabelElementType> = forwardRef(\n (props: LabelProps, ref: LabelRef) => {\n const { elementType: Element = \"label\", children, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius-label\", props.className);\n otherProps.className = classes;\n\n return (\n <Element ref={ref} {...otherProps} className={classes}>\n {children}\n </Element>\n );\n },\n);\n\nLabel.displayName = \"Label\";\nexport { Label };\n"],"names":["forwardRef","classNames","Label","props","ref","elementType","Element","children","otherProps","classes","className","displayName"],"mappings":";AAAA,SAASA,UAAU,QAAuC,QAAQ;AAClE,OAAOC,gBAAgB,oBAAoB;AAqB3C,MAAMC,sBAA6DF,WACjE,CAACG,OAAmBC;IAClB,MAAM,EAAEC,aAAaC,UAAU,OAAO,EAAEC,QAAQ,EAAE,GAAGC,YAAY,GAAGL;IAEpE,MAAMM,UAAUR,WAAW,UAAU,gBAAgBE,MAAMO,SAAS;IACpEF,WAAWE,SAAS,GAAGD;IAEvB,qBACE,KAACH;QAAQF,KAAKA;QAAM,GAAGI,UAAU;QAAEE,WAAWD;kBAC3CF;;AAGP;AAGFL,MAAMS,WAAW,GAAG;AACpB,SAAST,KAAK,GAAG"}
|
|
@@ -10,7 +10,7 @@ const Link = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
10
10
|
...style,
|
|
11
11
|
...isDisabled && disabledStyles
|
|
12
12
|
};
|
|
13
|
-
const classes = classNames("mobius", "mobius
|
|
13
|
+
const classes = classNames("mobius", "mobius-link", className, {
|
|
14
14
|
"--is-disabled": isDisabled
|
|
15
15
|
});
|
|
16
16
|
return /*#__PURE__*/ _jsx(Component, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import React, {\n forwardRef,\n Ref,\n HTMLAttributeAnchorTarget,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LinkElementType = HTMLAnchorElement;\n\nexport interface LinkProps {\n id?: string;\n children?: React.ReactNode;\n /** Path to link resource or page */\n href?: string;\n /** Custom class name for setting specific CSS */\n className?: string;\n title?: string;\n style?: React.CSSProperties;\n referrerPolicy?: ReferrerPolicy;\n download?: boolean | string;\n rel?: string;\n target?: HTMLAttributeAnchorTarget;\n isDisabled?: boolean;\n onClick?: () => void;\n to?: unknown;\n elementType?: React.ElementType;\n}\n\nexport type LinkRef = Ref<LinkElementType>;\n\nconst Link: ForwardedRefComponent<LinkProps, LinkElementType> = forwardRef(\n (props: LinkProps, ref: LinkRef) => {\n const {\n isDisabled = false,\n elementType: Component = \"a\",\n style,\n className,\n ...otherProps\n } = props;\n\n const disabledStyles: CSSProperties = {\n pointerEvents: \"none\",\n };\n\n const styles = { ...style, ...(isDisabled && disabledStyles) };\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import React, {\n forwardRef,\n Ref,\n HTMLAttributeAnchorTarget,\n CSSProperties,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LinkElementType = HTMLAnchorElement;\n\nexport interface LinkProps {\n id?: string;\n children?: React.ReactNode;\n /** Path to link resource or page */\n href?: string;\n /** Custom class name for setting specific CSS */\n className?: string;\n title?: string;\n style?: React.CSSProperties;\n referrerPolicy?: ReferrerPolicy;\n download?: boolean | string;\n rel?: string;\n target?: HTMLAttributeAnchorTarget;\n isDisabled?: boolean;\n onClick?: () => void;\n to?: unknown;\n elementType?: React.ElementType;\n}\n\nexport type LinkRef = Ref<LinkElementType>;\n\nconst Link: ForwardedRefComponent<LinkProps, LinkElementType> = forwardRef(\n (props: LinkProps, ref: LinkRef) => {\n const {\n isDisabled = false,\n elementType: Component = \"a\",\n style,\n className,\n ...otherProps\n } = props;\n\n const disabledStyles: CSSProperties = {\n pointerEvents: \"none\",\n };\n\n const styles = { ...style, ...(isDisabled && disabledStyles) };\n const classes = classNames(\"mobius\", \"mobius-link\", className, {\n \"--is-disabled\": isDisabled,\n });\n\n return (\n <Component\n ref={ref}\n style={styles}\n className={classes}\n aria-disabled={isDisabled}\n {...otherProps}\n >\n {props.children}\n </Component>\n );\n },\n);\n\nLink.displayName = \"Link\";\nexport { Link };\n"],"names":["React","forwardRef","classNames","Link","props","ref","isDisabled","elementType","Component","style","className","otherProps","disabledStyles","pointerEvents","styles","classes","aria-disabled","children","displayName"],"mappings":";AAAA,OAAOA,SACLC,UAAU,QAIL,QAAQ;AACf,OAAOC,gBAAgB,oBAAoB;AA0B3C,MAAMC,qBAA0DF,WAC9D,CAACG,OAAkBC;IACjB,MAAM,EACJC,aAAa,KAAK,EAClBC,aAAaC,YAAY,GAAG,EAC5BC,KAAK,EACLC,SAAS,EACT,GAAGC,YACJ,GAAGP;IAEJ,MAAMQ,iBAAgC;QACpCC,eAAe;IACjB;IAEA,MAAMC,SAAS;QAAE,GAAGL,KAAK;QAAE,GAAIH,cAAcM,cAAc;IAAE;IAC7D,MAAMG,UAAUb,WAAW,UAAU,eAAeQ,WAAW;QAC7D,iBAAiBJ;IACnB;IAEA,qBACE,KAACE;QACCH,KAAKA;QACLI,OAAOK;QACPJ,WAAWK;QACXC,iBAAeV;QACd,GAAGK,UAAU;kBAEbP,MAAMa,QAAQ;;AAGrB;AAGFd,KAAKe,WAAW,GAAG;AACnB,SAASf,IAAI,GAAG"}
|
|
@@ -5,7 +5,7 @@ export function LinkButton({ href, children, className, elementType = "a", ...re
|
|
|
5
5
|
if (!href) {
|
|
6
6
|
throw new Error("LinkButton requires a href prop");
|
|
7
7
|
}
|
|
8
|
-
const classes = classNames("mobius", "mobius
|
|
8
|
+
const classes = classNames("mobius", "mobius-link-button", className);
|
|
9
9
|
return(// @ts-expect-error Button only allows elementType of string, not React component
|
|
10
10
|
/*#__PURE__*/ _jsx(Button, {
|
|
11
11
|
elementType: elementType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/LinkButton/LinkButton.tsx"],"sourcesContent":["import classNames from \"classnames/dedupe\";\nimport { HTMLAttributeAnchorTarget, MouseEvent } from \"react\";\nimport { Button, ButtonProps } from \"../Button\";\n\nexport interface LinkButtonProps extends Omit<ButtonProps, \"elementType\"> {\n href: string;\n title?: string;\n style?: React.CSSProperties;\n referrerPolicy?: ReferrerPolicy;\n download?: boolean | string;\n rel?: string;\n target?: HTMLAttributeAnchorTarget;\n onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n to?: unknown;\n elementType?: React.ElementType;\n}\n\nexport function LinkButton({\n href,\n children,\n className,\n elementType = \"a\",\n ...rest\n}: LinkButtonProps) {\n if (!href) {\n throw new Error(\"LinkButton requires a href prop\");\n }\n\n const classes = classNames(\"mobius\", \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/LinkButton/LinkButton.tsx"],"sourcesContent":["import classNames from \"classnames/dedupe\";\nimport { HTMLAttributeAnchorTarget, MouseEvent } from \"react\";\nimport { Button, ButtonProps } from \"../Button\";\n\nexport interface LinkButtonProps extends Omit<ButtonProps, \"elementType\"> {\n href: string;\n title?: string;\n style?: React.CSSProperties;\n referrerPolicy?: ReferrerPolicy;\n download?: boolean | string;\n rel?: string;\n target?: HTMLAttributeAnchorTarget;\n onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n to?: unknown;\n elementType?: React.ElementType;\n}\n\nexport function LinkButton({\n href,\n children,\n className,\n elementType = \"a\",\n ...rest\n}: LinkButtonProps) {\n if (!href) {\n throw new Error(\"LinkButton requires a href prop\");\n }\n\n const classes = classNames(\"mobius\", \"mobius-link-button\", className);\n\n return (\n // @ts-expect-error Button only allows elementType of string, not React component\n <Button elementType={elementType} href={href} className={classes} {...rest}>\n {children}\n </Button>\n );\n}\n"],"names":["classNames","Button","LinkButton","href","children","className","elementType","rest","Error","classes"],"mappings":";AAAA,OAAOA,gBAAgB,oBAAoB;AAE3C,SAASC,MAAM,QAAqB,YAAY;AAehD,OAAO,SAASC,WAAW,EACzBC,IAAI,EACJC,QAAQ,EACRC,SAAS,EACTC,cAAc,GAAG,EACjB,GAAGC,MACa;IAChB,IAAI,CAACJ,MAAM;QACT,MAAM,IAAIK,MAAM;IAClB;IAEA,MAAMC,UAAUT,WAAW,UAAU,sBAAsBK;IAE3D,OACE,iFAAiF;kBACjF,KAACJ;QAAOK,aAAaA;QAAaH,MAAMA;QAAME,WAAWI;QAAU,GAAGF,IAAI;kBACvEH;;AAGP"}
|
|
@@ -11,7 +11,7 @@ const List = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
11
11
|
...restProps,
|
|
12
12
|
reversed: isReversed
|
|
13
13
|
};
|
|
14
|
-
const classes = classNames("mobius", "mobius
|
|
14
|
+
const classes = classNames("mobius", "mobius-list", {
|
|
15
15
|
"--has-icon": icon,
|
|
16
16
|
[`--is-${liststyletype}`]: liststyletype
|
|
17
17
|
}, otherProps.className);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/List/List.tsx"],"sourcesContent":["import {\n Ref,\n Children,\n cloneElement,\n forwardRef,\n ReactNode,\n RefAttributes,\n isValidElement,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type ListElementType = HTMLOListElement | HTMLUListElement;\nexport type ListStyleType =\n | \"disc\"\n | \"circle\"\n | \"square\"\n | \"decimal\"\n | \"georgian\"\n | \"trad-chinese-informal\"\n | \"kannada\";\n\nexport interface ListProps extends DOMProps, RefAttributes<ListElementType> {\n children?: ReactNode;\n isOrdered?: boolean;\n isReversed?: boolean;\n start?: number;\n liststyletype?: ListStyleType;\n icon?: ReactNode;\n className?: string;\n}\n\nexport type ListRef = Ref<ListElementType>;\n\nconst List: ForwardedRefComponent<ListProps, ListElementType> = forwardRef(\n (props: ListProps, ref: ListRef) => {\n const Component = props.isOrdered ? \"ol\" : \"ul\";\n const { children, icon, ...otherProps } = props;\n\n // Remove props that should not exist on ol or ul element\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isOrdered, liststyletype, isReversed, ...restProps } = otherProps;\n\n const mappedProps = {\n ...restProps,\n reversed: isReversed,\n };\n\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/List/List.tsx"],"sourcesContent":["import {\n Ref,\n Children,\n cloneElement,\n forwardRef,\n ReactNode,\n RefAttributes,\n isValidElement,\n} from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type ListElementType = HTMLOListElement | HTMLUListElement;\nexport type ListStyleType =\n | \"disc\"\n | \"circle\"\n | \"square\"\n | \"decimal\"\n | \"georgian\"\n | \"trad-chinese-informal\"\n | \"kannada\";\n\nexport interface ListProps extends DOMProps, RefAttributes<ListElementType> {\n children?: ReactNode;\n isOrdered?: boolean;\n isReversed?: boolean;\n start?: number;\n liststyletype?: ListStyleType;\n icon?: ReactNode;\n className?: string;\n}\n\nexport type ListRef = Ref<ListElementType>;\n\nconst List: ForwardedRefComponent<ListProps, ListElementType> = forwardRef(\n (props: ListProps, ref: ListRef) => {\n const Component = props.isOrdered ? \"ol\" : \"ul\";\n const { children, icon, ...otherProps } = props;\n\n // Remove props that should not exist on ol or ul element\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isOrdered, liststyletype, isReversed, ...restProps } = otherProps;\n\n const mappedProps = {\n ...restProps,\n reversed: isReversed,\n };\n\n const classes = classNames(\n \"mobius\",\n \"mobius-list\",\n {\n \"--has-icon\": icon,\n [`--is-${liststyletype}`]: liststyletype,\n },\n otherProps.className,\n );\n\n return (\n <Component ref={ref as any} {...mappedProps} className={classes}>\n {Children.map(children, child => {\n if (isValidElement(child)) {\n return cloneElement(child, {\n parentIcon: icon,\n } as any);\n }\n\n return child;\n })}\n </Component>\n );\n },\n);\n\nList.displayName = \"List\";\nexport { List };\n"],"names":["Children","cloneElement","forwardRef","isValidElement","classNames","List","props","ref","Component","isOrdered","children","icon","otherProps","liststyletype","isReversed","restProps","mappedProps","reversed","classes","className","map","child","parentIcon","displayName"],"mappings":";AAAA,SAEEA,QAAQ,EACRC,YAAY,EACZC,UAAU,EAGVC,cAAc,QACT,QAAQ;AACf,OAAOC,gBAAgB,oBAAoB;AA0B3C,MAAMC,qBAA0DH,WAC9D,CAACI,OAAkBC;IACjB,MAAMC,YAAYF,MAAMG,SAAS,GAAG,OAAO;IAC3C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,YAAY,GAAGN;IAE1C,yDAAyD;IACzD,6DAA6D;IAC7D,MAAM,EAAEG,SAAS,EAAEI,aAAa,EAAEC,UAAU,EAAE,GAAGC,WAAW,GAAGH;IAE/D,MAAMI,cAAc;QAClB,GAAGD,SAAS;QACZE,UAAUH;IACZ;IAEA,MAAMI,UAAUd,WACd,UACA,eACA;QACE,cAAcO;QACd,CAAC,CAAC,KAAK,EAAEE,cAAc,CAAC,CAAC,EAAEA;IAC7B,GACAD,WAAWO,SAAS;IAGtB,qBACE,KAACX;QAAUD,KAAKA;QAAa,GAAGS,WAAW;QAAEG,WAAWD;kBACrDlB,SAASoB,GAAG,CAACV,UAAUW,CAAAA;YACtB,kBAAIlB,eAAekB,QAAQ;gBACzB,qBAAOpB,aAAaoB,OAAO;oBACzBC,YAAYX;gBACd;YACF;YAEA,OAAOU;QACT;;AAGN;AAGFhB,KAAKkB,WAAW,GAAG;AACnB,SAASlB,IAAI,GAAG"}
|
|
@@ -4,11 +4,11 @@ import classNames from "classnames/dedupe";
|
|
|
4
4
|
const ListItem = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
5
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
6
6
|
const iconContent = icon || parentIcon;
|
|
7
|
-
const classes = classNames("mobius", "mobius
|
|
7
|
+
const classes = classNames("mobius", "mobius-list__item", {
|
|
8
8
|
"--has-icon": iconContent
|
|
9
9
|
}, props.className);
|
|
10
|
-
const contentClasses = classNames("mobius", "mobius
|
|
11
|
-
const iconClasses = classNames("mobius", "mobius
|
|
10
|
+
const contentClasses = classNames("mobius", "mobius-list__item-content");
|
|
11
|
+
const iconClasses = classNames("mobius", "mobius-list__icon");
|
|
12
12
|
if (iconContent) {
|
|
13
13
|
return /*#__PURE__*/ _jsx("li", {
|
|
14
14
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import { Ref, forwardRef, ReactNode, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type ListItemElementType = HTMLLIElement;\nexport interface ListItemProps\n extends DOMProps,\n RefAttributes<ListItemElementType> {\n children?: ReactNode;\n value?: number;\n className?: string;\n parentIcon?: ReactNode;\n icon?: ReactNode;\n}\n\nexport type ListItemRef = Ref<ListItemElementType>;\n\nconst ListItem: ForwardedRefComponent<ListItemProps, ListItemElementType> =\n forwardRef((props: ListItemProps, ref: ListItemRef) => {\n const { parentIcon, icon, children, ...otherProps } = props;\n const iconContent = icon || parentIcon;\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import { Ref, forwardRef, ReactNode, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type ListItemElementType = HTMLLIElement;\nexport interface ListItemProps\n extends DOMProps,\n RefAttributes<ListItemElementType> {\n children?: ReactNode;\n value?: number;\n className?: string;\n parentIcon?: ReactNode;\n icon?: ReactNode;\n}\n\nexport type ListItemRef = Ref<ListItemElementType>;\n\nconst ListItem: ForwardedRefComponent<ListItemProps, ListItemElementType> =\n forwardRef((props: ListItemProps, ref: ListItemRef) => {\n const { parentIcon, icon, children, ...otherProps } = props;\n const iconContent = icon || parentIcon;\n const classes = classNames(\n \"mobius\",\n \"mobius-list__item\",\n {\n \"--has-icon\": iconContent,\n },\n props.className,\n );\n const contentClasses = classNames(\"mobius\", \"mobius-list__item-content\");\n const iconClasses = classNames(\"mobius\", \"mobius-list__icon\");\n\n if (iconContent) {\n return (\n <li ref={ref} {...otherProps} className={classes}>\n <span className={contentClasses}>\n <span className={iconClasses}>{iconContent}</span>\n {children}\n </span>\n </li>\n );\n }\n\n return (\n <li ref={ref} {...otherProps} className={classes}>\n {children}\n </li>\n );\n });\n\nListItem.displayName = \"ListItem\";\nexport { ListItem };\n"],"names":["forwardRef","classNames","ListItem","props","ref","parentIcon","icon","children","otherProps","iconContent","classes","className","contentClasses","iconClasses","li","span","displayName"],"mappings":";AAAA,SAAcA,UAAU,QAAkC,QAAQ;AAClE,OAAOC,gBAAgB,oBAAoB;AAiB3C,MAAMC,yBACJF,WAAW,CAACG,OAAsBC;IAChC,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,YAAY,GAAGL;IACtD,MAAMM,cAAcH,QAAQD;IAC5B,MAAMK,UAAUT,WACd,UACA,qBACA;QACE,cAAcQ;IAChB,GACAN,MAAMQ,SAAS;IAEjB,MAAMC,iBAAiBX,WAAW,UAAU;IAC5C,MAAMY,cAAcZ,WAAW,UAAU;IAEzC,IAAIQ,aAAa;QACf,qBACE,KAACK;YAAGV,KAAKA;YAAM,GAAGI,UAAU;YAAEG,WAAWD;sBACvC,cAAA,MAACK;gBAAKJ,WAAWC;;kCACf,KAACG;wBAAKJ,WAAWE;kCAAcJ;;oBAC9BF;;;;IAIT;IAEA,qBACE,KAACO;QAAGV,KAAKA;QAAM,GAAGI,UAAU;QAAEG,WAAWD;kBACtCH;;AAGP;AAEFL,SAASc,WAAW,GAAG;AACvB,SAASd,QAAQ,GAAG"}
|
|
@@ -5,7 +5,7 @@ import { loading } from "@simplybusiness/icons";
|
|
|
5
5
|
import { Icon } from "../Icon";
|
|
6
6
|
const LoadingIndicator = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
7
|
const { icon = loading, ...otherProps } = props;
|
|
8
|
-
const classes = classNames("mobius", "mobius
|
|
8
|
+
const classes = classNames("mobius", "mobius-loading-indicator", otherProps.className);
|
|
9
9
|
return /*#__PURE__*/ _jsx(Icon, {
|
|
10
10
|
icon: icon,
|
|
11
11
|
spin: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { loading } from \"@simplybusiness/icons\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { Icon, IconProps } from \"../Icon\";\n\nexport interface LoadingIndicatorProps\n extends RefAttributes<SVGSVGElement>,\n IconProps {}\n\nexport type LoadingIndicatorRef = Ref<SVGSVGElement>;\n\nconst LoadingIndicator: ForwardedRefComponent<\n LoadingIndicatorProps,\n SVGSVGElement\n> = forwardRef((props: LoadingIndicatorProps, ref: LoadingIndicatorRef) => {\n const { icon = loading, ...otherProps } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { loading } from \"@simplybusiness/icons\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { Icon, IconProps } from \"../Icon\";\n\nexport interface LoadingIndicatorProps\n extends RefAttributes<SVGSVGElement>,\n IconProps {}\n\nexport type LoadingIndicatorRef = Ref<SVGSVGElement>;\n\nconst LoadingIndicator: ForwardedRefComponent<\n LoadingIndicatorProps,\n SVGSVGElement\n> = forwardRef((props: LoadingIndicatorProps, ref: LoadingIndicatorRef) => {\n const { icon = loading, ...otherProps } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius-loading-indicator\",\n otherProps.className,\n );\n\n return (\n <Icon icon={icon} spin ref={ref} {...otherProps} className={classes} />\n );\n});\n\nLoadingIndicator.displayName = \"LoadingIndicator\";\nexport { LoadingIndicator };\n"],"names":["forwardRef","classNames","loading","Icon","LoadingIndicator","props","ref","icon","otherProps","classes","className","spin","displayName"],"mappings":";AAAA,SAAcA,UAAU,QAAuB,QAAQ;AACvD,OAAOC,gBAAgB,oBAAoB;AAC3C,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SAASC,IAAI,QAAmB,UAAU;AAQ1C,MAAMC,iCAGFJ,WAAW,CAACK,OAA8BC;IAC5C,MAAM,EAAEC,OAAOL,OAAO,EAAE,GAAGM,YAAY,GAAGH;IAE1C,MAAMI,UAAUR,WACd,UACA,4BACAO,WAAWE,SAAS;IAGtB,qBACE,KAACP;QAAKI,MAAMA;QAAMI,IAAI;QAACL,KAAKA;QAAM,GAAGE,UAAU;QAAEE,WAAWD;;AAEhE;AAEAL,iBAAiBQ,WAAW,GAAG;AAC/B,SAASR,gBAAgB,GAAG"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import classNames from "classnames/dedupe";
|
|
4
4
|
export const Logo = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
5
|
const { className, width, height, ...otherProps } = props;
|
|
6
|
-
const classes = classNames("mobius", "mobius
|
|
6
|
+
const classes = classNames("mobius", "mobius-logo", className);
|
|
7
7
|
return /*#__PURE__*/ _jsxs("svg", {
|
|
8
8
|
width: width,
|
|
9
9
|
height: height,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LogoElementType = SVGSVGElement;\n\nexport interface LogoProps extends DOMProps, RefAttributes<LogoElementType> {\n /** Custom class name for setting specific CSS */\n className?: string;\n /** Custom width. When defined along with height, it will scale proportionally */\n width?: string;\n /** Custom height. When defined along with width, it will scale proportionally */\n height?: string;\n}\n\nexport type LogoRef = Ref<LogoElementType>;\n\nexport const Logo: ForwardedRefComponent<LogoProps, LogoElementType> =\n forwardRef((props: LogoProps, ref: LogoRef) => {\n const { className, width, height, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius/Logo\", className);\n\n return (\n <svg\n width={width}\n height={height}\n ref={ref}\n className={classes}\n viewBox=\"0 0 144 37\"\n {...otherProps}\n >\n <defs>\n <linearGradient\n id=\"logo-gradient\"\n x1=\"83.508%\"\n x2=\"11.891%\"\n y1=\"76.042%\"\n y2=\"26.973%\"\n >\n <stop stopColor=\"#4632D8\" offset=\"0%\" />\n <stop stopColor=\"#9084E8\" offset=\"100%\" />\n </linearGradient>\n </defs>\n <g>\n <path\n fill=\"#0E0A2B\"\n d=\"M68.788 11.307c0-2.486-2.027-3.345-3.833-4.1-1.332-.562-2.471-1.036-2.471-2.072 0-.873.77-1.42 1.968-1.42 1.051 0 1.806.444 2.294.725.193.103.474.222.755.133.192-.06.34-.207.459-.444l.34-.621c.266-.474.163-.888-.281-1.2-.533-.384-1.88-1.05-3.537-1.05-2.738 0-4.647 1.643-4.647 4.01 0 2.413 2.012 3.301 3.788 4.07 1.347.593 2.516 1.096 2.516 2.161 0 .873-.754 1.45-1.924 1.45-1.287 0-2.22-.65-2.678-.961l-.03-.015c-.533-.296-.903-.237-1.228.192l-.415.607c-.444.607-.148.992.134 1.228.828.637 2.427 1.392 4.203 1.392 2.708 0 4.587-1.673 4.587-4.085zm4.44 2.975V6.186c0-.577-.31-.888-.873-.888h-.843c-.563 0-.874.311-.874.888v8.096c0 .577.296.888.874.888h.843c.563 0 .873-.311.873-.888zM71.482 4.203h.755c.518 0 .814-.281.814-.8v-.517c0-.518-.296-.814-.814-.814h-.755c-.518 0-.8.281-.8.814v.518c.016.518.297.8.8.8zM92.645 24.48h.755c.518 0 .814-.282.814-.8v-.518c0-.518-.296-.814-.814-.814h-.755c-.518 0-.799.282-.799.814v.518c0 .518.281.8.8.8zm-6.26-19.42c-1.539 0-2.397.962-2.945 1.895-.444-1.243-1.435-1.895-2.871-1.895-1.362 0-2.146.888-2.723 1.806v-.68c0-.578-.311-.889-.873-.889h-.74c-.563 0-.873.311-.873.888v8.096c0 .577.295.888.873.888h.843c.577 0 .873-.311.873-.888V10.73c0-2.25.888-3.271 2.058-3.271 1.006 0 1.198.71 1.198 1.85v4.987c0 .578.311.888.888.888h.844c.577 0 .873-.31.873-.888v-3.551c0-2.25.873-3.271 2.013-3.271 1.036 0 1.243.74 1.243 1.85v4.987c0 .577.31.888.888.888h.814c.577 0 .888-.31.888-.888V8.835c0-2.5-1.095-3.774-3.27-3.774zm10.804 10.33c2.679 0 4.558-2.13 4.558-5.164 0-3.094-1.776-5.166-4.425-5.166-1.761 0-2.708 1.036-3.049 1.51v-.533c0-.459-.34-.755-.873-.755h-.607c-.562 0-.888.326-.888.888v11.9c0 .576.311.887.888.887h.814c.578 0 .888-.31.888-.888v-3.404c0-.207-.014-.4-.014-.532.325.429 1.184 1.258 2.708 1.258zm-2.768-5.105c0-1.362.622-2.975 2.368-2.975 1.377 0 2.309 1.184 2.309 2.945 0 1.746-.947 2.916-2.338 2.916-1.54 0-2.339-1.45-2.339-2.886zm12.965 4.07v-.652c0-.444-.252-.725-.681-.784-.34-.03-.68-.192-.68-1.066v-9.47c0-.563-.326-.888-.874-.888h-.843c-.563 0-.874.31-.874.888v9.679c0 1.258.34 2.16 1.021 2.678.637.489 1.466.533 2.013.533.607 0 .918-.325.918-.917zm9.457-9.073h-.962c-.518 0-.844.237-.977.726l-1.717 4.972c-.089.311-.192.71-.251.977-.074-.281-.193-.71-.296-1.021l-1.835-4.943c-.163-.489-.489-.71-.977-.71h-1.036c-.415 0-.622.162-.71.295-.09.134-.163.385.014.755l3.685 8.57-.34.813c-.252.592-.77 1.229-1.45 1.229-.267 0-.474-.09-.652-.163h-.014c-.43-.104-.755.074-.962.488l-.163.415c-.119.251-.148.517-.06.725.075.192.237.34.474.429.326.118.814.296 1.391.296 1.628 0 2.975-.977 3.597-2.605l3.996-10.226c.103-.296.088-.563-.045-.755-.163-.163-.4-.267-.71-.267zM67.634 28.297c.977-.592 1.54-1.658 1.54-2.886 0-2.176-1.688-3.567-4.293-3.567h-4.04c-.562 0-.873.311-.873.888v11.899c0 .577.296.888.873.888h4.1c1.346 0 2.5-.34 3.33-.962.932-.71 1.42-1.761 1.42-3.049.03-1.524-.784-2.767-2.057-3.211zm-5.017-.962v-3.212h2.25c1.02 0 1.628.592 1.628 1.584 0 .991-.607 1.643-1.57 1.643h-2.308v-.015zm4.396 4.01c0 1.155-.71 1.865-1.865 1.865h-2.53v-3.714h2.53c1.14.014 1.865.74 1.865 1.85zm12.638-5.712h-.814c-.577 0-.888.31-.888.888v3.655c0 2.176-1.361 3.182-2.634 3.182-1.006 0-1.406-.547-1.406-1.88v-4.942c0-.578-.31-.888-.888-.888h-.814c-.562 0-.888.325-.888.888v5.431c0 2.516 1.17 3.774 3.463 3.774a3.937 3.937 0 003.286-1.761v.651c0 .577.296.888.873.888h.74c.577 0 .888-.31.888-.888v-8.095c-.03-.578-.355-.903-.918-.903zm6.956 3.937c-.917-.311-1.702-.592-1.702-1.184 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.193-.341c.251-.518.133-.947-.326-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.213.222l-.222.34c-.178.252-.237.504-.178.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.03-2.042-1.761-2.649-3.138-3.122zm6.897-3.937h-.844c-.562 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.844c.577 0 .873-.31.873-.888v-8.095c0-.563-.31-.888-.873-.888zm9.324-.237c-1.924 0-2.93 1.154-3.36 1.806v-.681c0-.577-.31-.888-.873-.888h-.74c-.563 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.843c.578 0 .874-.31.874-.888v-3.744c0-1.79 1.14-3.078 2.708-3.078 1.021 0 1.436.547 1.436 1.88v4.942c0 .577.31.888.887.888h.814c.578 0 .888-.31.888-.888v-5.431c0-2.516-1.169-3.789-3.477-3.789zm10.448 0c-2.96 0-5.032 2.131-5.032 5.165 0 2.99 2.235 5.165 5.313 5.165 1.48 0 2.635-.533 3.345-.977.444-.266.562-.695.296-1.198l-.222-.385c-.266-.459-.651-.563-1.184-.31h-.015a3.885 3.885 0 01-2.042.606c-1.54 0-2.634-.962-2.812-2.472h5.816a.935.935 0 00.933-.917c.014-2.827-1.717-4.677-4.396-4.677zm-.044 2.013c1.065 0 1.79.77 1.864 1.968h-4.1c.253-1.213 1.096-1.968 2.236-1.968zm10.152 2.16c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122zm8.791 0c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122z\"\n />\n <path\n fill=\"url(#logo-gradient)\"\n d=\"M22.747 22.288c.607 1.214.918 2.59.918 4.144 0 1.45-.267 2.827-.8 4.1a10.018 10.018 0 01-2.279 3.36c-.991.961-2.235 1.73-3.744 2.278-1.51.563-3.167.829-4.988.829-2.264 0-4.35-.385-6.29-1.14-1.938-.77-3.492-1.598-4.676-2.5-.31-.252-.548-.504-.696-.77a1.332 1.332 0 01-.177-.71.718.718 0 010-.252c.03-.37.207-.785.547-1.199l1.14-1.598c.4-.548.829-.844 1.288-.918a.896.896 0 01.222-.03c.4 0 .873.163 1.39.474 2.487 1.776 4.914 2.679 7.252 2.679 1.643 0 2.96-.385 3.922-1.14.962-.755 1.45-1.746 1.45-2.96 0-.725-.192-1.39-.562-1.983a5.347 5.347 0 00-1.539-1.569 18.207 18.207 0 00-2.235-1.287 56.102 56.102 0 00-2.649-1.214c-.917-.4-1.835-.814-2.752-1.258a19.282 19.282 0 01-2.62-1.539 14.014 14.014 0 01-2.22-1.924c-.666-.695-1.169-1.539-1.554-2.545-.37-.992-.562-2.087-.562-3.271 0-2.042.533-3.863 1.598-5.446 1.066-1.584 2.516-2.797 4.336-3.641C8.303.414 10.345 0 12.624 0c1.91 0 3.685.281 5.358.844 1.657.562 2.96 1.198 3.892 1.88.68.473 1.006 1.035 1.006 1.671 0 .385-.118.785-.37 1.2l-.917 1.657c-.385.74-.903 1.11-1.554 1.11-.4 0-.83-.133-1.318-.4a42.421 42.421 0 00-1.687-.947c-.473-.237-1.14-.488-1.998-.71a9.458 9.458 0 00-2.56-.356c-1.672 0-3.004.37-3.981 1.11-.992.74-1.48 1.717-1.48 2.946 0 .902.31 1.701.932 2.412.622.695 1.421 1.302 2.398 1.79.977.489 2.057.977 3.256 1.466a54.048 54.048 0 013.552 1.628 20.795 20.795 0 013.24 2.042c.948.755 1.732 1.732 2.354 2.945zm31.257 2.945c0 3.197-1.155 6.083-3.256 8.14-2.265 2.205-5.506 3.36-9.368 3.36H30.71c-2.443 0-4.278-1.836-4.278-4.278V4.53c0-1.2.43-2.28 1.214-3.064C28.43.681 29.51.252 30.709.252h9.013c3.419 0 6.32 1.095 8.377 3.182 1.909 1.923 2.945 4.558 2.945 7.429 0 2.294-.622 4.203-1.91 5.816 1.377.77 2.487 1.776 3.286 2.99 1.066 1.583 1.584 3.448 1.584 5.564zm-12.106-7.68c.044-.03 4.913-3.02 4.913-6.675 0-1.761-.607-3.345-1.717-4.455-1.568-1.584-3.788-1.924-5.372-1.924H30.68v28h10.7c2.738 0 4.958-.754 6.408-2.16 1.273-1.243 1.983-3.049 1.983-5.106 0-1.272-.296-2.353-.858-3.196v-.03c-1.362-2.353-6.838-3.774-6.897-3.789l-.844-.222.726-.444z\"\n />\n <path\n fill=\"#0E0A2B\"\n d=\"M138.199 25.455c0-.4.074-.784.222-1.14.148-.354.355-.665.606-.932.267-.266.563-.473.903-.621.34-.148.725-.222 1.11-.222.4 0 .784.074 1.125.222.355.148.666.355.917.621.267.267.474.578.622.933.148.355.222.74.222 1.14 0 .399-.074.784-.222 1.139a2.86 2.86 0 01-.622.932 3.087 3.087 0 01-.917.637 2.646 2.646 0 01-1.125.236c-.4 0-.77-.074-1.11-.236a2.777 2.777 0 01-.903-.637 2.821 2.821 0 01-.606-.932 2.898 2.898 0 01-.222-1.14zm.71 0c0 .326.06.622.163.903.103.281.266.518.459.725a2.051 2.051 0 001.524.666c.31 0 .592-.059.858-.177a2.175 2.175 0 001.155-1.214c.118-.281.162-.577.162-.903 0-.325-.059-.621-.162-.902a2.422 2.422 0 00-.46-.726 2.112 2.112 0 00-.695-.488 2.073 2.073 0 00-.858-.178c-.31 0-.592.06-.844.178a2.051 2.051 0 00-.68.488 2.45 2.45 0 00-.46.726 2.636 2.636 0 00-.162.902zm1.154-1.14c0-.221.119-.34.34-.34h.889c.296 0 .532.09.695.252.178.163.267.4.267.68a.623.623 0 01-.06.297.557.557 0 01-.133.222.512.512 0 01-.163.148c-.059.044-.118.059-.162.074v.014l.03.03c.014.015.014.03.029.06l.044.088.34.666c.06.118.075.207.045.281-.03.074-.104.104-.207.104h-.104c-.192 0-.31-.089-.385-.252l-.384-.829h-.4v.74c0 .222-.104.34-.31.34h-.06c-.207 0-.31-.118-.31-.34v-2.234zm1.051 1.037c.133 0 .252-.045.31-.119.075-.074.104-.192.104-.325s-.03-.252-.103-.326a.413.413 0 00-.296-.118h-.385v.873h.37v.015z\"\n />\n </g>\n </svg>\n );\n });\n"],"names":["forwardRef","classNames","Logo","props","ref","className","width","height","otherProps","classes","svg","viewBox","defs","linearGradient","id","x1","x2","y1","y2","stop","stopColor","offset","g","path","fill","d"],"mappings":";AAAA,SAAcA,UAAU,QAAuB,QAAQ;AACvD,OAAOC,gBAAgB,oBAAoB;AAiB3C,OAAO,MAAMC,qBACXF,WAAW,CAACG,OAAkBC;IAC5B,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGC,YAAY,GAAGL;IAEpD,MAAMM,UAAUR,WAAW,UAAU,eAAeI;IAEpD,qBACE,MAACK;QACCJ,OAAOA;QACPC,QAAQA;QACRH,KAAKA;QACLC,WAAWI;QACXE,SAAQ;QACP,GAAGH,UAAU;;0BAEd,KAACI;0BACC,cAAA,MAACC;oBACCC,IAAG;oBACHC,IAAG;oBACHC,IAAG;oBACHC,IAAG;oBACHC,IAAG;;sCAEH,KAACC;4BAAKC,WAAU;4BAAUC,QAAO;;sCACjC,KAACF;4BAAKC,WAAU;4BAAUC,QAAO;;;;;0BAGrC,MAACC;;kCACC,KAACC;wBACCC,MAAK;wBACLC,GAAE;;kCAEJ,KAACF;wBACCC,MAAK;wBACLC,GAAE;;kCAEJ,KAACF;wBACCC,MAAK;wBACLC,GAAE;;;;;;AAKZ,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import { Ref, forwardRef, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport { DOMProps } from \"../../types/dom\";\nimport { ForwardedRefComponent } from \"../../types/components\";\n\nexport type LogoElementType = SVGSVGElement;\n\nexport interface LogoProps extends DOMProps, RefAttributes<LogoElementType> {\n /** Custom class name for setting specific CSS */\n className?: string;\n /** Custom width. When defined along with height, it will scale proportionally */\n width?: string;\n /** Custom height. When defined along with width, it will scale proportionally */\n height?: string;\n}\n\nexport type LogoRef = Ref<LogoElementType>;\n\nexport const Logo: ForwardedRefComponent<LogoProps, LogoElementType> =\n forwardRef((props: LogoProps, ref: LogoRef) => {\n const { className, width, height, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius-logo\", className);\n\n return (\n <svg\n width={width}\n height={height}\n ref={ref}\n className={classes}\n viewBox=\"0 0 144 37\"\n {...otherProps}\n >\n <defs>\n <linearGradient\n id=\"logo-gradient\"\n x1=\"83.508%\"\n x2=\"11.891%\"\n y1=\"76.042%\"\n y2=\"26.973%\"\n >\n <stop stopColor=\"#4632D8\" offset=\"0%\" />\n <stop stopColor=\"#9084E8\" offset=\"100%\" />\n </linearGradient>\n </defs>\n <g>\n <path\n fill=\"#0E0A2B\"\n d=\"M68.788 11.307c0-2.486-2.027-3.345-3.833-4.1-1.332-.562-2.471-1.036-2.471-2.072 0-.873.77-1.42 1.968-1.42 1.051 0 1.806.444 2.294.725.193.103.474.222.755.133.192-.06.34-.207.459-.444l.34-.621c.266-.474.163-.888-.281-1.2-.533-.384-1.88-1.05-3.537-1.05-2.738 0-4.647 1.643-4.647 4.01 0 2.413 2.012 3.301 3.788 4.07 1.347.593 2.516 1.096 2.516 2.161 0 .873-.754 1.45-1.924 1.45-1.287 0-2.22-.65-2.678-.961l-.03-.015c-.533-.296-.903-.237-1.228.192l-.415.607c-.444.607-.148.992.134 1.228.828.637 2.427 1.392 4.203 1.392 2.708 0 4.587-1.673 4.587-4.085zm4.44 2.975V6.186c0-.577-.31-.888-.873-.888h-.843c-.563 0-.874.311-.874.888v8.096c0 .577.296.888.874.888h.843c.563 0 .873-.311.873-.888zM71.482 4.203h.755c.518 0 .814-.281.814-.8v-.517c0-.518-.296-.814-.814-.814h-.755c-.518 0-.8.281-.8.814v.518c.016.518.297.8.8.8zM92.645 24.48h.755c.518 0 .814-.282.814-.8v-.518c0-.518-.296-.814-.814-.814h-.755c-.518 0-.799.282-.799.814v.518c0 .518.281.8.8.8zm-6.26-19.42c-1.539 0-2.397.962-2.945 1.895-.444-1.243-1.435-1.895-2.871-1.895-1.362 0-2.146.888-2.723 1.806v-.68c0-.578-.311-.889-.873-.889h-.74c-.563 0-.873.311-.873.888v8.096c0 .577.295.888.873.888h.843c.577 0 .873-.311.873-.888V10.73c0-2.25.888-3.271 2.058-3.271 1.006 0 1.198.71 1.198 1.85v4.987c0 .578.311.888.888.888h.844c.577 0 .873-.31.873-.888v-3.551c0-2.25.873-3.271 2.013-3.271 1.036 0 1.243.74 1.243 1.85v4.987c0 .577.31.888.888.888h.814c.577 0 .888-.31.888-.888V8.835c0-2.5-1.095-3.774-3.27-3.774zm10.804 10.33c2.679 0 4.558-2.13 4.558-5.164 0-3.094-1.776-5.166-4.425-5.166-1.761 0-2.708 1.036-3.049 1.51v-.533c0-.459-.34-.755-.873-.755h-.607c-.562 0-.888.326-.888.888v11.9c0 .576.311.887.888.887h.814c.578 0 .888-.31.888-.888v-3.404c0-.207-.014-.4-.014-.532.325.429 1.184 1.258 2.708 1.258zm-2.768-5.105c0-1.362.622-2.975 2.368-2.975 1.377 0 2.309 1.184 2.309 2.945 0 1.746-.947 2.916-2.338 2.916-1.54 0-2.339-1.45-2.339-2.886zm12.965 4.07v-.652c0-.444-.252-.725-.681-.784-.34-.03-.68-.192-.68-1.066v-9.47c0-.563-.326-.888-.874-.888h-.843c-.563 0-.874.31-.874.888v9.679c0 1.258.34 2.16 1.021 2.678.637.489 1.466.533 2.013.533.607 0 .918-.325.918-.917zm9.457-9.073h-.962c-.518 0-.844.237-.977.726l-1.717 4.972c-.089.311-.192.71-.251.977-.074-.281-.193-.71-.296-1.021l-1.835-4.943c-.163-.489-.489-.71-.977-.71h-1.036c-.415 0-.622.162-.71.295-.09.134-.163.385.014.755l3.685 8.57-.34.813c-.252.592-.77 1.229-1.45 1.229-.267 0-.474-.09-.652-.163h-.014c-.43-.104-.755.074-.962.488l-.163.415c-.119.251-.148.517-.06.725.075.192.237.34.474.429.326.118.814.296 1.391.296 1.628 0 2.975-.977 3.597-2.605l3.996-10.226c.103-.296.088-.563-.045-.755-.163-.163-.4-.267-.71-.267zM67.634 28.297c.977-.592 1.54-1.658 1.54-2.886 0-2.176-1.688-3.567-4.293-3.567h-4.04c-.562 0-.873.311-.873.888v11.899c0 .577.296.888.873.888h4.1c1.346 0 2.5-.34 3.33-.962.932-.71 1.42-1.761 1.42-3.049.03-1.524-.784-2.767-2.057-3.211zm-5.017-.962v-3.212h2.25c1.02 0 1.628.592 1.628 1.584 0 .991-.607 1.643-1.57 1.643h-2.308v-.015zm4.396 4.01c0 1.155-.71 1.865-1.865 1.865h-2.53v-3.714h2.53c1.14.014 1.865.74 1.865 1.85zm12.638-5.712h-.814c-.577 0-.888.31-.888.888v3.655c0 2.176-1.361 3.182-2.634 3.182-1.006 0-1.406-.547-1.406-1.88v-4.942c0-.578-.31-.888-.888-.888h-.814c-.562 0-.888.325-.888.888v5.431c0 2.516 1.17 3.774 3.463 3.774a3.937 3.937 0 003.286-1.761v.651c0 .577.296.888.873.888h.74c.577 0 .888-.31.888-.888v-8.095c-.03-.578-.355-.903-.918-.903zm6.956 3.937c-.917-.311-1.702-.592-1.702-1.184 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.193-.341c.251-.518.133-.947-.326-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.213.222l-.222.34c-.178.252-.237.504-.178.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.03-2.042-1.761-2.649-3.138-3.122zm6.897-3.937h-.844c-.562 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.844c.577 0 .873-.31.873-.888v-8.095c0-.563-.31-.888-.873-.888zm9.324-.237c-1.924 0-2.93 1.154-3.36 1.806v-.681c0-.577-.31-.888-.873-.888h-.74c-.563 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.843c.578 0 .874-.31.874-.888v-3.744c0-1.79 1.14-3.078 2.708-3.078 1.021 0 1.436.547 1.436 1.88v4.942c0 .577.31.888.887.888h.814c.578 0 .888-.31.888-.888v-5.431c0-2.516-1.169-3.789-3.477-3.789zm10.448 0c-2.96 0-5.032 2.131-5.032 5.165 0 2.99 2.235 5.165 5.313 5.165 1.48 0 2.635-.533 3.345-.977.444-.266.562-.695.296-1.198l-.222-.385c-.266-.459-.651-.563-1.184-.31h-.015a3.885 3.885 0 01-2.042.606c-1.54 0-2.634-.962-2.812-2.472h5.816a.935.935 0 00.933-.917c.014-2.827-1.717-4.677-4.396-4.677zm-.044 2.013c1.065 0 1.79.77 1.864 1.968h-4.1c.253-1.213 1.096-1.968 2.236-1.968zm10.152 2.16c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122zm8.791 0c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122z\"\n />\n <path\n fill=\"url(#logo-gradient)\"\n d=\"M22.747 22.288c.607 1.214.918 2.59.918 4.144 0 1.45-.267 2.827-.8 4.1a10.018 10.018 0 01-2.279 3.36c-.991.961-2.235 1.73-3.744 2.278-1.51.563-3.167.829-4.988.829-2.264 0-4.35-.385-6.29-1.14-1.938-.77-3.492-1.598-4.676-2.5-.31-.252-.548-.504-.696-.77a1.332 1.332 0 01-.177-.71.718.718 0 010-.252c.03-.37.207-.785.547-1.199l1.14-1.598c.4-.548.829-.844 1.288-.918a.896.896 0 01.222-.03c.4 0 .873.163 1.39.474 2.487 1.776 4.914 2.679 7.252 2.679 1.643 0 2.96-.385 3.922-1.14.962-.755 1.45-1.746 1.45-2.96 0-.725-.192-1.39-.562-1.983a5.347 5.347 0 00-1.539-1.569 18.207 18.207 0 00-2.235-1.287 56.102 56.102 0 00-2.649-1.214c-.917-.4-1.835-.814-2.752-1.258a19.282 19.282 0 01-2.62-1.539 14.014 14.014 0 01-2.22-1.924c-.666-.695-1.169-1.539-1.554-2.545-.37-.992-.562-2.087-.562-3.271 0-2.042.533-3.863 1.598-5.446 1.066-1.584 2.516-2.797 4.336-3.641C8.303.414 10.345 0 12.624 0c1.91 0 3.685.281 5.358.844 1.657.562 2.96 1.198 3.892 1.88.68.473 1.006 1.035 1.006 1.671 0 .385-.118.785-.37 1.2l-.917 1.657c-.385.74-.903 1.11-1.554 1.11-.4 0-.83-.133-1.318-.4a42.421 42.421 0 00-1.687-.947c-.473-.237-1.14-.488-1.998-.71a9.458 9.458 0 00-2.56-.356c-1.672 0-3.004.37-3.981 1.11-.992.74-1.48 1.717-1.48 2.946 0 .902.31 1.701.932 2.412.622.695 1.421 1.302 2.398 1.79.977.489 2.057.977 3.256 1.466a54.048 54.048 0 013.552 1.628 20.795 20.795 0 013.24 2.042c.948.755 1.732 1.732 2.354 2.945zm31.257 2.945c0 3.197-1.155 6.083-3.256 8.14-2.265 2.205-5.506 3.36-9.368 3.36H30.71c-2.443 0-4.278-1.836-4.278-4.278V4.53c0-1.2.43-2.28 1.214-3.064C28.43.681 29.51.252 30.709.252h9.013c3.419 0 6.32 1.095 8.377 3.182 1.909 1.923 2.945 4.558 2.945 7.429 0 2.294-.622 4.203-1.91 5.816 1.377.77 2.487 1.776 3.286 2.99 1.066 1.583 1.584 3.448 1.584 5.564zm-12.106-7.68c.044-.03 4.913-3.02 4.913-6.675 0-1.761-.607-3.345-1.717-4.455-1.568-1.584-3.788-1.924-5.372-1.924H30.68v28h10.7c2.738 0 4.958-.754 6.408-2.16 1.273-1.243 1.983-3.049 1.983-5.106 0-1.272-.296-2.353-.858-3.196v-.03c-1.362-2.353-6.838-3.774-6.897-3.789l-.844-.222.726-.444z\"\n />\n <path\n fill=\"#0E0A2B\"\n d=\"M138.199 25.455c0-.4.074-.784.222-1.14.148-.354.355-.665.606-.932.267-.266.563-.473.903-.621.34-.148.725-.222 1.11-.222.4 0 .784.074 1.125.222.355.148.666.355.917.621.267.267.474.578.622.933.148.355.222.74.222 1.14 0 .399-.074.784-.222 1.139a2.86 2.86 0 01-.622.932 3.087 3.087 0 01-.917.637 2.646 2.646 0 01-1.125.236c-.4 0-.77-.074-1.11-.236a2.777 2.777 0 01-.903-.637 2.821 2.821 0 01-.606-.932 2.898 2.898 0 01-.222-1.14zm.71 0c0 .326.06.622.163.903.103.281.266.518.459.725a2.051 2.051 0 001.524.666c.31 0 .592-.059.858-.177a2.175 2.175 0 001.155-1.214c.118-.281.162-.577.162-.903 0-.325-.059-.621-.162-.902a2.422 2.422 0 00-.46-.726 2.112 2.112 0 00-.695-.488 2.073 2.073 0 00-.858-.178c-.31 0-.592.06-.844.178a2.051 2.051 0 00-.68.488 2.45 2.45 0 00-.46.726 2.636 2.636 0 00-.162.902zm1.154-1.14c0-.221.119-.34.34-.34h.889c.296 0 .532.09.695.252.178.163.267.4.267.68a.623.623 0 01-.06.297.557.557 0 01-.133.222.512.512 0 01-.163.148c-.059.044-.118.059-.162.074v.014l.03.03c.014.015.014.03.029.06l.044.088.34.666c.06.118.075.207.045.281-.03.074-.104.104-.207.104h-.104c-.192 0-.31-.089-.385-.252l-.384-.829h-.4v.74c0 .222-.104.34-.31.34h-.06c-.207 0-.31-.118-.31-.34v-2.234zm1.051 1.037c.133 0 .252-.045.31-.119.075-.074.104-.192.104-.325s-.03-.252-.103-.326a.413.413 0 00-.296-.118h-.385v.873h.37v.015z\"\n />\n </g>\n </svg>\n );\n });\n"],"names":["forwardRef","classNames","Logo","props","ref","className","width","height","otherProps","classes","svg","viewBox","defs","linearGradient","id","x1","x2","y1","y2","stop","stopColor","offset","g","path","fill","d"],"mappings":";AAAA,SAAcA,UAAU,QAAuB,QAAQ;AACvD,OAAOC,gBAAgB,oBAAoB;AAiB3C,OAAO,MAAMC,qBACXF,WAAW,CAACG,OAAkBC;IAC5B,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGC,YAAY,GAAGL;IAEpD,MAAMM,UAAUR,WAAW,UAAU,eAAeI;IAEpD,qBACE,MAACK;QACCJ,OAAOA;QACPC,QAAQA;QACRH,KAAKA;QACLC,WAAWI;QACXE,SAAQ;QACP,GAAGH,UAAU;;0BAEd,KAACI;0BACC,cAAA,MAACC;oBACCC,IAAG;oBACHC,IAAG;oBACHC,IAAG;oBACHC,IAAG;oBACHC,IAAG;;sCAEH,KAACC;4BAAKC,WAAU;4BAAUC,QAAO;;sCACjC,KAACF;4BAAKC,WAAU;4BAAUC,QAAO;;;;;0BAGrC,MAACC;;kCACC,KAACC;wBACCC,MAAK;wBACLC,GAAE;;kCAEJ,KAACF;wBACCC,MAAK;wBACLC,GAAE;;kCAEJ,KAACF;wBACCC,MAAK;wBACLC,GAAE;;;;;;AAKZ,GAAG"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
const Content = /*#__PURE__*/ forwardRef(({ children, ...otherProps }, ref)=>/*#__PURE__*/ _jsx("div", {
|
|
4
4
|
ref: ref,
|
|
5
5
|
...otherProps,
|
|
6
|
-
className: "mobius
|
|
6
|
+
className: "mobius-modal__content",
|
|
7
7
|
children: children
|
|
8
8
|
}));
|
|
9
9
|
Content.displayName = "Content";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Modal/Content.tsx"],"sourcesContent":["import { PropsWithChildren, Ref, RefAttributes, forwardRef } from \"react\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport type DivRef = Ref<HTMLDivElement>;\nexport type DivElementType = HTMLDivElement;\nexport interface ContentProps\n extends DOMProps,\n RefAttributes<DivElementType>,\n PropsWithChildren {}\n\nconst Content = forwardRef(\n ({ children, ...otherProps }: ContentProps, ref: DivRef) => (\n <div ref={ref} {...otherProps} className=\"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Modal/Content.tsx"],"sourcesContent":["import { PropsWithChildren, Ref, RefAttributes, forwardRef } from \"react\";\nimport { DOMProps } from \"../../types/dom\";\n\nexport type DivRef = Ref<HTMLDivElement>;\nexport type DivElementType = HTMLDivElement;\nexport interface ContentProps\n extends DOMProps,\n RefAttributes<DivElementType>,\n PropsWithChildren {}\n\nconst Content = forwardRef(\n ({ children, ...otherProps }: ContentProps, ref: DivRef) => (\n <div ref={ref} {...otherProps} className=\"mobius-modal__content\">\n {children}\n </div>\n ),\n);\n\nContent.displayName = \"Content\";\nexport { Content };\n"],"names":["forwardRef","Content","children","otherProps","ref","div","className","displayName"],"mappings":";AAAA,SAAgDA,UAAU,QAAQ,QAAQ;AAU1E,MAAMC,wBAAUD,WACd,CAAC,EAAEE,QAAQ,EAAE,GAAGC,YAA0B,EAAEC,oBAC1C,KAACC;QAAID,KAAKA;QAAM,GAAGD,UAAU;QAAEG,WAAU;kBACtCJ;;AAKPD,QAAQM,WAAW,GAAG;AACtB,SAASN,OAAO,GAAG"}
|
|
@@ -9,14 +9,14 @@ const Header = /*#__PURE__*/ forwardRef(({ children, ...otherProps }, ref)=>{
|
|
|
9
9
|
return /*#__PURE__*/ _jsxs("header", {
|
|
10
10
|
ref: ref,
|
|
11
11
|
...otherProps,
|
|
12
|
-
className: "mobius
|
|
12
|
+
className: "mobius-modal__header",
|
|
13
13
|
children: [
|
|
14
14
|
children,
|
|
15
15
|
/*#__PURE__*/ _jsxs(Button, {
|
|
16
16
|
"aria-label": "Close",
|
|
17
17
|
variant: "basic",
|
|
18
18
|
onPress: onClose,
|
|
19
|
-
className: "mobius
|
|
19
|
+
className: "mobius-modal__close",
|
|
20
20
|
children: [
|
|
21
21
|
/*#__PURE__*/ _jsx(Icon, {
|
|
22
22
|
icon: cross
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Modal/Header.tsx"],"sourcesContent":["import { PropsWithChildren, Ref, RefAttributes, forwardRef } from \"react\";\n\nimport { cross } from \"@simplybusiness/icons\";\nimport { DOMProps } from \"../../types/dom\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { useModal } from \"./useModal\";\n\nexport type HeaderElementType = HTMLDivElement;\nexport type HeaderRef = Ref<HTMLElement>;\n\nexport interface HeaderProps\n extends DOMProps,\n RefAttributes<HeaderElementType>,\n PropsWithChildren {}\n\nconst Header = forwardRef(\n ({ children, ...otherProps }: HeaderProps, ref: HeaderRef) => {\n const { onClose, closeLabel } = useModal();\n\n return (\n <header ref={ref} {...otherProps} className=\"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Modal/Header.tsx"],"sourcesContent":["import { PropsWithChildren, Ref, RefAttributes, forwardRef } from \"react\";\n\nimport { cross } from \"@simplybusiness/icons\";\nimport { DOMProps } from \"../../types/dom\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { useModal } from \"./useModal\";\n\nexport type HeaderElementType = HTMLDivElement;\nexport type HeaderRef = Ref<HTMLElement>;\n\nexport interface HeaderProps\n extends DOMProps,\n RefAttributes<HeaderElementType>,\n PropsWithChildren {}\n\nconst Header = forwardRef(\n ({ children, ...otherProps }: HeaderProps, ref: HeaderRef) => {\n const { onClose, closeLabel } = useModal();\n\n return (\n <header ref={ref} {...otherProps} className=\"mobius-modal__header\">\n {children}\n <Button\n aria-label=\"Close\"\n variant=\"basic\"\n onPress={onClose}\n className=\"mobius-modal__close\"\n >\n <Icon icon={cross} /> {closeLabel}\n </Button>\n </header>\n );\n },\n);\n\nHeader.displayName = \"Header\";\nexport { Header };\n"],"names":["forwardRef","cross","Button","Icon","useModal","Header","children","otherProps","ref","onClose","closeLabel","header","className","aria-label","variant","onPress","icon","displayName"],"mappings":";AAAA,SAAgDA,UAAU,QAAQ,QAAQ;AAE1E,SAASC,KAAK,QAAQ,wBAAwB;AAE9C,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,IAAI,QAAQ,UAAU;AAC/B,SAASC,QAAQ,QAAQ,aAAa;AAUtC,MAAMC,uBAASL,WACb,CAAC,EAAEM,QAAQ,EAAE,GAAGC,YAAyB,EAAEC;IACzC,MAAM,EAAEC,OAAO,EAAEC,UAAU,EAAE,GAAGN;IAEhC,qBACE,MAACO;QAAOH,KAAKA;QAAM,GAAGD,UAAU;QAAEK,WAAU;;YACzCN;0BACD,MAACJ;gBACCW,cAAW;gBACXC,SAAQ;gBACRC,SAASN;gBACTG,WAAU;;kCAEV,KAACT;wBAAKa,MAAMf;;oBAAS;oBAAES;;;;;AAI/B;AAGFL,OAAOY,WAAW,GAAG;AACrB,SAASZ,MAAM,GAAG"}
|
|
@@ -33,7 +33,7 @@ const Modal = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
33
33
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
const modalClasses = classNames("mobius", "mobius
|
|
36
|
+
const modalClasses = classNames("mobius", "mobius-modal", {
|
|
37
37
|
"--no-dialog-support": !shouldTransition,
|
|
38
38
|
"--should-transition": shouldTransition && animation,
|
|
39
39
|
"--slide-up": animation === "slideUp",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport { Ref, forwardRef, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDialog } from \"../../hooks\";\nimport { useDeprecationWarning } from \"../../hooks/useDeprecationWarning\";\nimport { mergeRefs } from \"../../utils\";\nimport { supportsDialog } from \"../../utils/polyfill-tests\";\nimport { ModalContext } from \"./ModalContext\";\nimport { ModalProps } from \"./types\";\n\nexport type ModalElementType = HTMLDialogElement;\nexport type ModalRef = Ref<ModalElementType>;\n\nconst TRANSITION_CSS_VARIABLE = \"--modal-transition-duration\";\n\nconst Modal = forwardRef((props: ModalProps, ref: ModalRef) => {\n const {\n isOpen,\n onClose,\n onOpen,\n children,\n className,\n closeLabel,\n isFullScreen,\n animation,\n // Deprecated props below\n size,\n appElement,\n preventCloseOnEsc,\n shouldFocusAfterRender,\n parentSelector,\n ...rest\n } = props;\n const [shouldTransition, setShouldTransition] = useState(false);\n\n useDeprecationWarning({\n size,\n appElement,\n preventCloseOnEsc,\n shouldFocusAfterRender,\n parentSelector,\n });\n\n useEffect(() => {\n setShouldTransition(supportsDialog());\n }, []);\n\n const dialogRef = useRef<HTMLDialogElement | null>(null);\n const { close } = useDialog({\n ref: dialogRef,\n isOpen,\n onOpen,\n onClose,\n transition: {\n isEnabled: !!animation,\n CSSVariable: TRANSITION_CSS_VARIABLE,\n },\n });\n\n const modalClasses = classNames(\n \"mobius\",\n \"mobius
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport { Ref, forwardRef, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDialog } from \"../../hooks\";\nimport { useDeprecationWarning } from \"../../hooks/useDeprecationWarning\";\nimport { mergeRefs } from \"../../utils\";\nimport { supportsDialog } from \"../../utils/polyfill-tests\";\nimport { ModalContext } from \"./ModalContext\";\nimport { ModalProps } from \"./types\";\n\nexport type ModalElementType = HTMLDialogElement;\nexport type ModalRef = Ref<ModalElementType>;\n\nconst TRANSITION_CSS_VARIABLE = \"--modal-transition-duration\";\n\nconst Modal = forwardRef((props: ModalProps, ref: ModalRef) => {\n const {\n isOpen,\n onClose,\n onOpen,\n children,\n className,\n closeLabel,\n isFullScreen,\n animation,\n // Deprecated props below\n size,\n appElement,\n preventCloseOnEsc,\n shouldFocusAfterRender,\n parentSelector,\n ...rest\n } = props;\n const [shouldTransition, setShouldTransition] = useState(false);\n\n useDeprecationWarning({\n size,\n appElement,\n preventCloseOnEsc,\n shouldFocusAfterRender,\n parentSelector,\n });\n\n useEffect(() => {\n setShouldTransition(supportsDialog());\n }, []);\n\n const dialogRef = useRef<HTMLDialogElement | null>(null);\n const { close } = useDialog({\n ref: dialogRef,\n isOpen,\n onOpen,\n onClose,\n transition: {\n isEnabled: !!animation,\n CSSVariable: TRANSITION_CSS_VARIABLE,\n },\n });\n\n const modalClasses = classNames(\n \"mobius\",\n \"mobius-modal\",\n {\n \"--no-dialog-support\": !shouldTransition, // This class is used to correctly position modal in x/y middle on iOS <= 15.2\n \"--should-transition\": shouldTransition && animation,\n \"--slide-up\": animation === \"slideUp\",\n \"--fade\": animation === \"fade\",\n \"--is-fullscreen\": isFullScreen,\n },\n className,\n );\n\n const contextValue = useMemo(\n () => ({\n onClose: close,\n closeLabel,\n }),\n [close, closeLabel],\n );\n\n return (\n <dialog\n ref={mergeRefs([dialogRef, ref])}\n onCancel={close}\n className={modalClasses}\n {...rest}\n >\n <ModalContext.Provider value={contextValue}>\n {children}\n </ModalContext.Provider>\n </dialog>\n );\n});\n\nModal.displayName = \"Modal\";\nexport { Modal };\n"],"names":["classNames","forwardRef","useEffect","useMemo","useRef","useState","useDialog","useDeprecationWarning","mergeRefs","supportsDialog","ModalContext","TRANSITION_CSS_VARIABLE","Modal","props","ref","isOpen","onClose","onOpen","children","className","closeLabel","isFullScreen","animation","size","appElement","preventCloseOnEsc","shouldFocusAfterRender","parentSelector","rest","shouldTransition","setShouldTransition","dialogRef","close","transition","isEnabled","CSSVariable","modalClasses","contextValue","dialog","onCancel","Provider","value","displayName"],"mappings":"AAAA;;AAEA,OAAOA,gBAAgB,oBAAoB;AAC3C,SAAcC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC9E,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,YAAY,QAAQ,iBAAiB;AAM9C,MAAMC,0BAA0B;AAEhC,MAAMC,sBAAQX,WAAW,CAACY,OAAmBC;IAC3C,MAAM,EACJC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,SAAS,EACT,yBAAyB;IACzBC,IAAI,EACJC,UAAU,EACVC,iBAAiB,EACjBC,sBAAsB,EACtBC,cAAc,EACd,GAAGC,MACJ,GAAGf;IACJ,MAAM,CAACgB,kBAAkBC,oBAAoB,GAAGzB,SAAS;IAEzDE,sBAAsB;QACpBgB;QACAC;QACAC;QACAC;QACAC;IACF;IAEAzB,UAAU;QACR4B,oBAAoBrB;IACtB,GAAG,EAAE;IAEL,MAAMsB,YAAY3B,OAAiC;IACnD,MAAM,EAAE4B,KAAK,EAAE,GAAG1B,UAAU;QAC1BQ,KAAKiB;QACLhB;QACAE;QACAD;QACAiB,YAAY;YACVC,WAAW,CAAC,CAACZ;YACba,aAAaxB;QACf;IACF;IAEA,MAAMyB,eAAepC,WACnB,UACA,gBACA;QACE,uBAAuB,CAAC6B;QACxB,uBAAuBA,oBAAoBP;QAC3C,cAAcA,cAAc;QAC5B,UAAUA,cAAc;QACxB,mBAAmBD;IACrB,GACAF;IAGF,MAAMkB,eAAelC,QACnB,IAAO,CAAA;YACLa,SAASgB;YACTZ;QACF,CAAA,GACA;QAACY;QAAOZ;KAAW;IAGrB,qBACE,KAACkB;QACCxB,KAAKN,UAAU;YAACuB;YAAWjB;SAAI;QAC/ByB,UAAUP;QACVb,WAAWiB;QACV,GAAGR,IAAI;kBAER,cAAA,KAAClB,aAAa8B,QAAQ;YAACC,OAAOJ;sBAC3BnB;;;AAIT;AAEAN,MAAM8B,WAAW,GAAG;AACpB,SAAS9B,KAAK,GAAG"}
|
|
@@ -6,6 +6,7 @@ import { useLabel, useValidationClasses } from "../../hooks";
|
|
|
6
6
|
import { spaceDelimitedList } from "../../utils/spaceDelimitedList";
|
|
7
7
|
import { ErrorMessage } from "../ErrorMessage";
|
|
8
8
|
import { Label } from "../Label";
|
|
9
|
+
import { Stack } from "../Stack";
|
|
9
10
|
export const NumberField = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
10
11
|
const { id, isDisabled, isRequired, label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, errorMessage, validationState, isInvalid, isReadOnly, minValue, maxValue, step, placeholder, defaultValue = 0, onChange } = props;
|
|
11
12
|
const inputRef = useRef(null);
|
|
@@ -19,19 +20,19 @@ export const NumberField = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
19
20
|
"aria-label": ariaLabel,
|
|
20
21
|
"aria-labelledby": ariaLabelledBy
|
|
21
22
|
});
|
|
22
|
-
const containerClasses = classNames("mobius
|
|
23
|
+
const containerClasses = classNames("mobius-number-field", className, {
|
|
23
24
|
"--is-optional": optional
|
|
24
25
|
});
|
|
25
26
|
const validationClasses = useValidationClasses({
|
|
26
27
|
validationState,
|
|
27
28
|
isInvalid
|
|
28
29
|
});
|
|
29
|
-
const inputClasses = classNames("mobius
|
|
30
|
+
const inputClasses = classNames("mobius-number-field__input", className, {
|
|
30
31
|
"--is-required": required,
|
|
31
32
|
"--is-optional": optional,
|
|
32
33
|
"--is-disabled": isDisabled
|
|
33
34
|
}, validationClasses);
|
|
34
|
-
const labelClasses = classNames("mobius
|
|
35
|
+
const labelClasses = classNames("mobius-number-field__label", {
|
|
35
36
|
"--is-disabled": isDisabled
|
|
36
37
|
}, validationClasses);
|
|
37
38
|
const errorMessageId = useId();
|
|
@@ -59,7 +60,8 @@ export const NumberField = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
59
60
|
event.stopPropagation();
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
|
-
return /*#__PURE__*/ _jsxs(
|
|
63
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
64
|
+
gap: "xs",
|
|
63
65
|
className: containerClasses,
|
|
64
66
|
children: [
|
|
65
67
|
label && /*#__PURE__*/ _jsx(Label, {
|
|
@@ -68,7 +70,7 @@ export const NumberField = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
68
70
|
children: label
|
|
69
71
|
}),
|
|
70
72
|
/*#__PURE__*/ _jsx("div", {
|
|
71
|
-
className: "mobius
|
|
73
|
+
className: "mobius-number-field__input-wrapper",
|
|
72
74
|
children: /*#__PURE__*/ _jsx("input", {
|
|
73
75
|
...fieldProps,
|
|
74
76
|
ref: inputRef || ref,
|