@simplybusiness/mobius 10.2.0 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +426 -343
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +426 -343
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +47 -18
- package/dist/cjs/components/Alert/Alert.js.map +3 -3
- package/dist/cjs/components/Alert/index.js +47 -18
- package/dist/cjs/components/Alert/index.js.map +3 -3
- package/dist/cjs/components/Box/Box.js +18 -3
- package/dist/cjs/components/Box/Box.js.map +3 -3
- package/dist/cjs/components/Box/index.js +18 -3
- package/dist/cjs/components/Box/index.js.map +3 -3
- package/dist/cjs/components/Breadcrumbs/BreadcrumbItem.js +18 -3
- package/dist/cjs/components/Breadcrumbs/BreadcrumbItem.js.map +3 -3
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/components/Breadcrumbs/index.js +18 -3
- package/dist/cjs/components/Breadcrumbs/index.js.map +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.js +370 -287
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +375 -292
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +382 -299
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +421 -338
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +421 -338
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +386 -303
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +386 -303
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +363 -280
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +363 -280
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +360 -277
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +360 -277
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/Grid/Grid.js +2 -2
- package/dist/cjs/components/Grid/Grid.js.map +2 -2
- package/dist/cjs/components/Grid/Item.js +3 -3
- package/dist/cjs/components/Grid/Item.js.map +2 -2
- package/dist/cjs/components/Grid/index.js +5 -5
- package/dist/cjs/components/Grid/index.js.map +2 -2
- package/dist/cjs/components/List/List.js +15 -7
- package/dist/cjs/components/List/List.js.map +2 -2
- package/dist/cjs/components/List/index.js +15 -7
- package/dist/cjs/components/List/index.js.map +2 -2
- package/dist/cjs/components/Logo/Logo.js.map +2 -2
- package/dist/cjs/components/Logo/index.js.map +2 -2
- package/dist/cjs/components/MaskedField/MaskedField.js +381 -298
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +381 -298
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/Modal/Header.js +38 -21
- package/dist/cjs/components/Modal/Header.js.map +3 -3
- package/dist/cjs/components/Modal/Modal.js +13 -3
- package/dist/cjs/components/Modal/Modal.js.map +2 -2
- package/dist/cjs/components/Modal/ModalContext.js +4 -1
- package/dist/cjs/components/Modal/ModalContext.js.map +2 -2
- package/dist/cjs/components/Modal/index.js +63 -39
- package/dist/cjs/components/Modal/index.js.map +3 -3
- package/dist/cjs/components/Modal/types.js.map +1 -1
- package/dist/cjs/components/Modal/useModal.js +6 -3
- package/dist/cjs/components/Modal/useModal.js.map +2 -2
- package/dist/cjs/components/NumberField/NumberField.js +381 -298
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +381 -298
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +381 -298
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +360 -277
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +381 -298
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +363 -280
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +363 -280
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +363 -280
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/SVG/SVG.js.map +2 -2
- package/dist/cjs/components/SVG/index.js.map +2 -2
- package/dist/cjs/components/Segment/Segment.js +2 -2
- package/dist/cjs/components/Segment/Segment.js.map +2 -2
- package/dist/cjs/components/Segment/index.js +2 -2
- package/dist/cjs/components/Segment/index.js.map +2 -2
- package/dist/cjs/components/Select/Select.js +363 -280
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +363 -280
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/Table/HeaderCell.js +2 -2
- package/dist/cjs/components/Table/HeaderCell.js.map +2 -2
- package/dist/cjs/components/Table/index.js +2 -2
- package/dist/cjs/components/Table/index.js.map +2 -2
- package/dist/cjs/components/Text/Text.js +12 -8
- package/dist/cjs/components/Text/Text.js.map +2 -2
- package/dist/cjs/components/Text/index.js +12 -8
- package/dist/cjs/components/Text/index.js.map +2 -2
- package/dist/cjs/components/TextArea/TextArea.js +363 -280
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +363 -280
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +381 -298
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +381 -298
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/TextOrHTML/TextOrHTML.js +42 -13
- package/dist/cjs/components/TextOrHTML/TextOrHTML.js.map +3 -3
- package/dist/cjs/components/TextOrHTML/index.js +42 -13
- package/dist/cjs/components/TextOrHTML/index.js.map +3 -3
- package/dist/cjs/components/index.js +396 -312
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +396 -312
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1063 -578
- package/dist/cjs/utils/filterUnsetValues.js +36 -0
- package/dist/cjs/utils/filterUnsetValues.js.map +7 -0
- package/dist/cjs/utils/index.js +13 -0
- package/dist/cjs/utils/index.js.map +3 -3
- package/dist/esm/{chunk-NYFCN7EA.js → chunk-6GGDGE7D.js} +4 -4
- package/dist/esm/{chunk-OUKMP3DO.js → chunk-7JT4DKQA.js} +2 -2
- package/dist/esm/{chunk-SNRPWCHL.js → chunk-A66R42LG.js} +12 -8
- package/dist/esm/chunk-A66R42LG.js.map +7 -0
- package/dist/esm/chunk-CZWEMAKZ.js +16 -0
- package/dist/esm/chunk-CZWEMAKZ.js.map +7 -0
- package/dist/esm/{chunk-Q5YY6HPF.js → chunk-DZVBN6ZI.js} +5 -5
- package/dist/esm/{chunk-OC6ULO4M.js → chunk-EJLNC5X5.js} +2 -2
- package/dist/esm/{chunk-LVZ2T6AY.js → chunk-EZ4S7XVZ.js} +16 -8
- package/dist/esm/chunk-EZ4S7XVZ.js.map +7 -0
- package/dist/esm/chunk-FIAL4HTE.js +1 -0
- package/dist/esm/{chunk-YLL2DKVF.js → chunk-FQ6P6JB5.js} +3 -3
- package/dist/esm/chunk-FQ6P6JB5.js.map +7 -0
- package/dist/esm/{chunk-OZ2IUZIJ.js → chunk-HP2NRM7T.js} +2 -2
- package/dist/esm/chunk-HPUPB75I.js +67 -0
- package/dist/esm/chunk-HPUPB75I.js.map +7 -0
- package/dist/esm/{chunk-3IMYDZRT.js → chunk-JFDDW3IV.js} +1 -1
- package/dist/esm/chunk-JFDDW3IV.js.map +7 -0
- package/dist/esm/{chunk-4IB5ROL6.js → chunk-KXLTGNKF.js} +12 -5
- package/dist/esm/chunk-KXLTGNKF.js.map +7 -0
- package/dist/esm/{chunk-TL4OCKNP.js → chunk-LWRY3VIB.js} +2 -2
- package/dist/esm/{chunk-RR4UQSOZ.js → chunk-M7LTJZQU.js} +11 -11
- package/dist/esm/chunk-MPB5F6QL.js +53 -0
- package/dist/esm/chunk-MPB5F6QL.js.map +7 -0
- package/dist/esm/{chunk-N5WGQAHM.js → chunk-NRU3WNV7.js} +4 -4
- package/dist/esm/{chunk-DNMS6KEY.js → chunk-PARKMZYZ.js} +4 -4
- package/dist/esm/{chunk-DNMS6KEY.js.map → chunk-PARKMZYZ.js.map} +2 -2
- package/dist/esm/chunk-Q5MIALGZ.js +15 -0
- package/dist/esm/{chunk-ZHX7Z5IU.js.map → chunk-Q5MIALGZ.js.map} +2 -2
- package/dist/esm/{chunk-KLXMVFIR.js → chunk-TBKQA5ZF.js} +5 -2
- package/dist/esm/{chunk-KLXMVFIR.js.map → chunk-TBKQA5ZF.js.map} +2 -2
- package/dist/esm/{chunk-B243ELKZ.js → chunk-TJCUKTFX.js} +10 -4
- package/dist/esm/chunk-TJCUKTFX.js.map +7 -0
- package/dist/esm/{chunk-P5ZPHAQT.js → chunk-UCNWPF7R.js} +3 -3
- package/dist/esm/chunk-UCNWPF7R.js.map +7 -0
- package/dist/esm/{chunk-S37ULE57.js → chunk-VASDBM4Z.js} +1 -1
- package/dist/esm/{chunk-S37ULE57.js.map → chunk-VASDBM4Z.js.map} +2 -2
- package/dist/esm/{chunk-SDGIWQ3R.js → chunk-WP5OEMNG.js} +3 -3
- package/dist/esm/{chunk-SDGIWQ3R.js.map → chunk-WP5OEMNG.js.map} +2 -2
- package/dist/esm/{chunk-MLN5ELQR.js → chunk-WXRQIMMM.js} +1 -1
- package/dist/esm/chunk-WXRQIMMM.js.map +7 -0
- package/dist/esm/{chunk-O47IW7HD.js → chunk-YCE2KOB2.js} +5 -5
- package/dist/esm/components/Accordion/Accordion.js +7 -6
- package/dist/esm/components/Accordion/AccordionLink.js +6 -5
- package/dist/esm/components/Accordion/AccordionList.js +8 -7
- package/dist/esm/components/Accordion/index.js +8 -7
- package/dist/esm/components/AddressLookup/AddressLookup.js +41 -40
- package/dist/esm/components/AddressLookup/__mocks__/LoqateAddressLookupService.js +2 -1
- package/dist/esm/components/AddressLookup/__mocks__/LoqateAddressLookupService.js.map +1 -1
- package/dist/esm/components/AddressLookup/index.js +41 -40
- package/dist/esm/components/Alert/Alert.js +4 -4
- package/dist/esm/components/Alert/index.js +4 -4
- package/dist/esm/components/Box/Box.js +3 -2
- package/dist/esm/components/Box/index.js +3 -2
- package/dist/esm/components/Breadcrumbs/BreadcrumbItem.js +4 -3
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/components/Breadcrumbs/index.js +7 -6
- package/dist/esm/components/Checkbox/Checkbox.js +41 -40
- package/dist/esm/components/Checkbox/CheckboxGroup.js +41 -40
- package/dist/esm/components/Checkbox/index.js +41 -40
- package/dist/esm/components/Combobox/Combobox.js +41 -40
- package/dist/esm/components/Combobox/index.js +41 -40
- package/dist/esm/components/Container/Container.js +2 -1
- package/dist/esm/components/Container/index.js +2 -1
- package/dist/esm/components/DateField/DateField.js +41 -40
- package/dist/esm/components/DateField/index.js +41 -40
- package/dist/esm/components/Drawer/Drawer.js +4 -3
- package/dist/esm/components/Drawer/index.js +4 -3
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +41 -40
- package/dist/esm/components/ErrorMessage/index.js +41 -40
- package/dist/esm/components/ExpandableText/ExpandableText.js +41 -40
- package/dist/esm/components/ExpandableText/index.js +41 -40
- package/dist/esm/components/Fieldset/Fieldset.js +2 -1
- package/dist/esm/components/Fieldset/index.js +2 -1
- package/dist/esm/components/Flex/Flex.js +2 -1
- package/dist/esm/components/Flex/index.js +2 -1
- package/dist/esm/components/Flex/propUtils.js +2 -1
- package/dist/esm/components/Grid/Grid.js +3 -2
- package/dist/esm/components/Grid/Item.js +5 -4
- package/dist/esm/components/Grid/index.js +7 -6
- package/dist/esm/components/List/List.js +1 -1
- package/dist/esm/components/List/index.js +1 -1
- package/dist/esm/components/Logo/Logo.js +1 -1
- package/dist/esm/components/Logo/index.js +1 -1
- package/dist/esm/components/MaskedField/MaskedField.js +41 -40
- package/dist/esm/components/MaskedField/MaskedField.js.map +1 -1
- package/dist/esm/components/MaskedField/index.js +41 -40
- package/dist/esm/components/Modal/Header.js +3 -3
- package/dist/esm/components/Modal/Modal.js +6 -5
- package/dist/esm/components/Modal/ModalContext.js +1 -1
- package/dist/esm/components/Modal/index.js +10 -9
- package/dist/esm/components/Modal/useModal.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +41 -40
- package/dist/esm/components/NumberField/index.js +41 -40
- package/dist/esm/components/PasswordField/PasswordField.js +41 -40
- package/dist/esm/components/PasswordField/ShowHideButton.js +41 -40
- package/dist/esm/components/PasswordField/index.js +41 -40
- package/dist/esm/components/Radio/Radio.js +41 -40
- package/dist/esm/components/Radio/RadioGroup.js +41 -40
- package/dist/esm/components/Radio/index.js +41 -40
- package/dist/esm/components/SVG/SVG.js +1 -1
- package/dist/esm/components/SVG/index.js +1 -1
- package/dist/esm/components/Segment/Segment.js +1 -1
- package/dist/esm/components/Segment/index.js +1 -1
- package/dist/esm/components/Select/Select.js +41 -40
- package/dist/esm/components/Select/index.js +41 -40
- package/dist/esm/components/Slider/Slider.js +4 -3
- package/dist/esm/components/Slider/index.js +4 -3
- package/dist/esm/components/Table/HeaderCell.js +1 -1
- package/dist/esm/components/Table/index.js +2 -2
- package/dist/esm/components/Text/Text.js +5 -3
- package/dist/esm/components/Text/index.js +5 -3
- package/dist/esm/components/TextArea/TextArea.js +41 -40
- package/dist/esm/components/TextArea/index.js +41 -40
- package/dist/esm/components/TextField/TextField.js +41 -40
- package/dist/esm/components/TextField/index.js +41 -40
- package/dist/esm/components/TextOrHTML/TextOrHTML.js +2 -2
- package/dist/esm/components/TextOrHTML/index.js +2 -2
- package/dist/esm/components/Title/Title.js +2 -1
- package/dist/esm/components/Title/index.js +2 -1
- package/dist/esm/components/Toast/index.js +3 -3
- package/dist/esm/components/Trust/Trust.js +2 -1
- package/dist/esm/components/Trust/index.js +2 -1
- package/dist/esm/components/index.js +57 -54
- package/dist/esm/hooks/index.js +6 -5
- package/dist/esm/hooks/useDialog/index.js +2 -1
- package/dist/esm/hooks/useDialog/useDialog.js +2 -1
- package/dist/esm/hooks/useDialogPolyfill/index.js +2 -1
- package/dist/esm/hooks/useDialogPolyfill/useDialogPolyfill.js +2 -1
- package/dist/esm/index.js +59 -56
- package/dist/esm/meta.json +5712 -5366
- package/dist/esm/utils/filterUnsetValues.js +8 -0
- package/dist/esm/utils/filterUnsetValues.js.map +7 -0
- package/dist/esm/utils/index.js +5 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/components/Grid/Grid.d.ts +1 -1
- package/dist/types/components/Grid/Item.d.ts +1 -1
- package/dist/types/components/List/List.d.ts +1 -1
- package/dist/types/components/Logo/Logo.d.ts +8 -0
- package/dist/types/components/Modal/types.d.ts +2 -0
- package/dist/types/components/Modal/useModal.d.ts +2 -0
- package/dist/types/components/SVG/SVG.d.ts +4 -0
- package/dist/types/components/Segment/Segment.d.ts +4 -3
- package/dist/types/components/Table/HeaderCell.d.ts +2 -1
- package/dist/types/components/Text/Text.d.ts +2 -1
- package/dist/types/utils/filterUnsetValues.d.ts +6 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/components/Accordion/Accordion.test.tsx +7 -0
- package/src/components/Box/Box.test.tsx +24 -0
- package/src/components/Box/Box.tsx +11 -3
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +130 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Button/Button.test.tsx +77 -0
- package/src/components/Container/Container.test.tsx +19 -0
- package/src/components/Divider/Divider.test.tsx +18 -0
- package/src/components/Flex/Flex.test.tsx +7 -0
- package/src/components/Grid/Grid.test.tsx +30 -0
- package/src/components/Grid/Grid.tsx +2 -2
- package/src/components/Grid/Item.tsx +3 -3
- package/src/components/Icon/Icon.test.tsx +33 -0
- package/src/components/Image/Image.test.tsx +7 -0
- package/src/components/Label/Label.test.tsx +7 -0
- package/src/components/Link/Link.test.tsx +44 -0
- package/src/components/List/List.test.tsx +11 -0
- package/src/components/List/List.tsx +6 -2
- package/src/components/Logo/Logo.test.tsx +36 -0
- package/src/components/Logo/Logo.tsx +8 -0
- package/src/components/Modal/Header.tsx +13 -2
- package/src/components/Modal/Modal.test.tsx +19 -1
- package/src/components/Modal/Modal.tsx +11 -2
- package/src/components/Modal/ModalContext.tsx +2 -0
- package/src/components/Modal/types.ts +2 -0
- package/src/components/Modal/useModal.ts +2 -2
- package/src/components/Option/Option.test.tsx +67 -0
- package/src/components/Progress/Progress.test.tsx +7 -0
- package/src/components/SVG/SVG.test.tsx +40 -0
- package/src/components/SVG/SVG.tsx +4 -0
- package/src/components/Segment/Segment.test.tsx +72 -0
- package/src/components/Segment/Segment.tsx +7 -4
- package/src/components/Stack/Stack.test.tsx +41 -1
- package/src/components/Table/HeaderCell.tsx +3 -2
- package/src/components/Table/Table.test.tsx +177 -0
- package/src/components/Text/Text.test.tsx +79 -0
- package/src/components/Text/Text.tsx +14 -9
- package/src/components/TextAreaInput/TextAreaInput.test.tsx +51 -0
- package/src/components/TextOrHTML/TextOrHTML.test.tsx +36 -3
- package/src/components/TextOrHTML/TextOrHTML.tsx +45 -9
- package/src/components/Trust/Trust.test.tsx +52 -1
- package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +66 -0
- package/src/utils/filterUndefinedProps.test.ts +11 -0
- package/src/utils/filterUnsetValues.test.ts +16 -0
- package/src/utils/filterUnsetValues.ts +17 -0
- package/src/utils/index.ts +1 -0
- package/dist/esm/chunk-3IMYDZRT.js.map +0 -7
- package/dist/esm/chunk-4IB5ROL6.js.map +0 -7
- package/dist/esm/chunk-B243ELKZ.js.map +0 -7
- package/dist/esm/chunk-DSYPZETD.js +0 -1
- package/dist/esm/chunk-LVZ2T6AY.js.map +0 -7
- package/dist/esm/chunk-MLN5ELQR.js.map +0 -7
- package/dist/esm/chunk-P5ZPHAQT.js.map +0 -7
- package/dist/esm/chunk-QRHDVVRK.js +0 -40
- package/dist/esm/chunk-QRHDVVRK.js.map +0 -7
- package/dist/esm/chunk-SNRPWCHL.js.map +0 -7
- package/dist/esm/chunk-XNVA7FCA.js +0 -39
- package/dist/esm/chunk-XNVA7FCA.js.map +0 -7
- package/dist/esm/chunk-YLL2DKVF.js.map +0 -7
- package/dist/esm/chunk-ZHX7Z5IU.js +0 -15
- /package/dist/esm/{chunk-NYFCN7EA.js.map → chunk-6GGDGE7D.js.map} +0 -0
- /package/dist/esm/{chunk-OUKMP3DO.js.map → chunk-7JT4DKQA.js.map} +0 -0
- /package/dist/esm/{chunk-Q5YY6HPF.js.map → chunk-DZVBN6ZI.js.map} +0 -0
- /package/dist/esm/{chunk-OC6ULO4M.js.map → chunk-EJLNC5X5.js.map} +0 -0
- /package/dist/esm/{chunk-DSYPZETD.js.map → chunk-FIAL4HTE.js.map} +0 -0
- /package/dist/esm/{chunk-OZ2IUZIJ.js.map → chunk-HP2NRM7T.js.map} +0 -0
- /package/dist/esm/{chunk-TL4OCKNP.js.map → chunk-LWRY3VIB.js.map} +0 -0
- /package/dist/esm/{chunk-RR4UQSOZ.js.map → chunk-M7LTJZQU.js.map} +0 -0
- /package/dist/esm/{chunk-N5WGQAHM.js.map → chunk-NRU3WNV7.js.map} +0 -0
- /package/dist/esm/{chunk-O47IW7HD.js.map → chunk-YCE2KOB2.js.map} +0 -0
|
@@ -219,6 +219,24 @@ var init_filterUndefinedProps = __esm({
|
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
|
|
222
|
+
// src/utils/filterUnsetValues.ts
|
|
223
|
+
var filterUnsetValues;
|
|
224
|
+
var init_filterUnsetValues = __esm({
|
|
225
|
+
"src/utils/filterUnsetValues.ts"() {
|
|
226
|
+
"use strict";
|
|
227
|
+
filterUnsetValues = (props) => {
|
|
228
|
+
const filtered = {};
|
|
229
|
+
Object.keys(props).forEach((key) => {
|
|
230
|
+
const value = props[key];
|
|
231
|
+
if (value !== void 0 && value !== null && value !== "") {
|
|
232
|
+
filtered[key] = value;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return filtered;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
|
|
222
240
|
// src/utils/getSpacingValue.ts
|
|
223
241
|
var getSpacingValue;
|
|
224
242
|
var init_getSpacingValue = __esm({
|
|
@@ -310,6 +328,7 @@ var init_utils = __esm({
|
|
|
310
328
|
init_delay();
|
|
311
329
|
init_excludeControls();
|
|
312
330
|
init_filterUndefinedProps();
|
|
331
|
+
init_filterUnsetValues();
|
|
313
332
|
init_getSpacingValue();
|
|
314
333
|
init_mergeRefs();
|
|
315
334
|
init_polyfill_tests();
|
|
@@ -1163,15 +1182,18 @@ var init_Text = __esm({
|
|
|
1163
1182
|
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
1164
1183
|
import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1165
1184
|
getElementType = (variant, elementType) => {
|
|
1166
|
-
if (
|
|
1167
|
-
return
|
|
1185
|
+
if (elementType) {
|
|
1186
|
+
return elementType;
|
|
1168
1187
|
}
|
|
1169
|
-
|
|
1188
|
+
if (variant && ["h1", "h2", "h3", "h4"].includes(variant)) {
|
|
1189
|
+
return variant;
|
|
1190
|
+
}
|
|
1191
|
+
return "p";
|
|
1170
1192
|
};
|
|
1171
|
-
Text = ({ ref, elementType
|
|
1193
|
+
Text = ({ ref, elementType, ...props }) => {
|
|
1172
1194
|
const { variant, className, spacing, ...otherProps } = props;
|
|
1173
|
-
const
|
|
1174
|
-
const variantType = variant ||
|
|
1195
|
+
const Element = getElementType(variant, elementType);
|
|
1196
|
+
const variantType = variant || Element;
|
|
1175
1197
|
const classes = (0, import_dedupe7.default)(
|
|
1176
1198
|
"mobius",
|
|
1177
1199
|
"mobius-text",
|
|
@@ -1179,21 +1201,35 @@ var init_Text = __esm({
|
|
|
1179
1201
|
{ [`--has-line-height-${spacing}`]: spacing },
|
|
1180
1202
|
className
|
|
1181
1203
|
);
|
|
1182
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1183
1205
|
};
|
|
1184
1206
|
Text.displayName = "Text";
|
|
1185
1207
|
}
|
|
1186
1208
|
});
|
|
1187
1209
|
|
|
1188
1210
|
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
1189
|
-
var import_react9, import_jsx_runtime8,
|
|
1211
|
+
var import_dedupe8, import_react9, import_jsx_runtime8, isBlockHTML, containsHTML, buildTextClasses, TextOrHTML;
|
|
1190
1212
|
var init_TextOrHTML = __esm({
|
|
1191
1213
|
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
1192
1214
|
"use strict";
|
|
1215
|
+
import_dedupe8 = __toESM(require("classnames/dedupe"));
|
|
1193
1216
|
import_react9 = require("react");
|
|
1194
1217
|
init_Text();
|
|
1195
1218
|
import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1196
|
-
|
|
1219
|
+
isBlockHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
1220
|
+
containsHTML = (text) => /<[a-z/]/i.test(text);
|
|
1221
|
+
buildTextClasses = (textProps, htmlClassName) => {
|
|
1222
|
+
const { variant, elementType, spacing, className } = textProps;
|
|
1223
|
+
const variantType = variant || getElementType(variant, elementType);
|
|
1224
|
+
return (0, import_dedupe8.default)(
|
|
1225
|
+
"mobius",
|
|
1226
|
+
"mobius-text",
|
|
1227
|
+
{ [`--is-${variantType}`]: variantType },
|
|
1228
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
1229
|
+
className,
|
|
1230
|
+
htmlClassName
|
|
1231
|
+
);
|
|
1232
|
+
};
|
|
1197
1233
|
TextOrHTML = ({
|
|
1198
1234
|
ref,
|
|
1199
1235
|
text,
|
|
@@ -1203,11 +1239,23 @@ var init_TextOrHTML = __esm({
|
|
|
1203
1239
|
autoDetect = false,
|
|
1204
1240
|
...textProps
|
|
1205
1241
|
}) => {
|
|
1206
|
-
const
|
|
1207
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
1208
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
1209
|
-
const DangerousComponent = resolvedElementType;
|
|
1242
|
+
const textIsBlockHTML = autoDetect && isBlockHTML(text);
|
|
1210
1243
|
const dangerousHTML = (0, import_react9.useMemo)(() => ({ __html: text }), [text]);
|
|
1244
|
+
if (autoDetect && !textIsBlockHTML) {
|
|
1245
|
+
const { variant, spacing, elementType, className, ...domProps } = textProps;
|
|
1246
|
+
const Element = getElementType(variant, elementType);
|
|
1247
|
+
const classes = buildTextClasses(textProps, htmlClassName);
|
|
1248
|
+
return containsHTML(text) ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1249
|
+
Element,
|
|
1250
|
+
{
|
|
1251
|
+
ref,
|
|
1252
|
+
...domProps,
|
|
1253
|
+
className: classes,
|
|
1254
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
1255
|
+
}
|
|
1256
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Element, { ref, ...domProps, className: classes, children: text });
|
|
1257
|
+
}
|
|
1258
|
+
const DangerousComponent = htmlElementType ?? (textIsBlockHTML ? "div" : "span");
|
|
1211
1259
|
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1212
1260
|
DangerousComponent,
|
|
1213
1261
|
{
|
|
@@ -1215,7 +1263,7 @@ var init_TextOrHTML = __esm({
|
|
|
1215
1263
|
dangerouslySetInnerHTML: dangerousHTML
|
|
1216
1264
|
}
|
|
1217
1265
|
);
|
|
1218
|
-
if (
|
|
1266
|
+
if (textWrapper) {
|
|
1219
1267
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
1220
1268
|
}
|
|
1221
1269
|
return dangerousElement;
|
|
@@ -1236,12 +1284,12 @@ var init_TextOrHTML2 = __esm({
|
|
|
1236
1284
|
function isAlertVariant(value) {
|
|
1237
1285
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
1238
1286
|
}
|
|
1239
|
-
var import_icons2,
|
|
1287
|
+
var import_icons2, import_dedupe9, import_Alert, import_jsx_runtime9, Alert;
|
|
1240
1288
|
var init_Alert = __esm({
|
|
1241
1289
|
"src/components/Alert/Alert.tsx"() {
|
|
1242
1290
|
"use strict";
|
|
1243
1291
|
import_icons2 = require("@simplybusiness/icons");
|
|
1244
|
-
|
|
1292
|
+
import_dedupe9 = __toESM(require("classnames/dedupe"));
|
|
1245
1293
|
init_Icon2();
|
|
1246
1294
|
init_TextOrHTML2();
|
|
1247
1295
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
@@ -1258,7 +1306,7 @@ var init_Alert = __esm({
|
|
|
1258
1306
|
if (!show) return null;
|
|
1259
1307
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
1260
1308
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
1261
|
-
const classes = (0,
|
|
1309
|
+
const classes = (0, import_dedupe9.default)(
|
|
1262
1310
|
"mobius",
|
|
1263
1311
|
"mobius-alert",
|
|
1264
1312
|
{
|
|
@@ -1276,9 +1324,9 @@ var init_Alert = __esm({
|
|
|
1276
1324
|
warning: import_icons2.warning,
|
|
1277
1325
|
error: import_icons2.error
|
|
1278
1326
|
};
|
|
1279
|
-
const headerClasses = (0,
|
|
1280
|
-
const iconClasses = (0,
|
|
1281
|
-
const contentClasses = (0,
|
|
1327
|
+
const headerClasses = (0, import_dedupe9.default)("mobius", "mobius-alert__header");
|
|
1328
|
+
const iconClasses = (0, import_dedupe9.default)("mobius", "mobius-alert__icon");
|
|
1329
|
+
const contentClasses = (0, import_dedupe9.default)("mobius", "mobius-alert__content");
|
|
1282
1330
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
1283
1331
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
1284
1332
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
@@ -1309,11 +1357,11 @@ var init_Alert2 = __esm({
|
|
|
1309
1357
|
});
|
|
1310
1358
|
|
|
1311
1359
|
// src/components/Box/Box.tsx
|
|
1312
|
-
var
|
|
1360
|
+
var import_dedupe10, import_Box, import_jsx_runtime10, Box;
|
|
1313
1361
|
var init_Box = __esm({
|
|
1314
1362
|
"src/components/Box/Box.tsx"() {
|
|
1315
1363
|
"use strict";
|
|
1316
|
-
|
|
1364
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
1317
1365
|
init_utils();
|
|
1318
1366
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
1319
1367
|
import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -1342,8 +1390,8 @@ var init_Box = __esm({
|
|
|
1342
1390
|
style,
|
|
1343
1391
|
...otherProps
|
|
1344
1392
|
} = props;
|
|
1345
|
-
const classes = (0,
|
|
1346
|
-
const
|
|
1393
|
+
const classes = (0, import_dedupe10.default)("mobius", "mobius-box", otherProps.className);
|
|
1394
|
+
const fromProps = filterUndefinedProps({
|
|
1347
1395
|
padding: getSpacingValue(padding),
|
|
1348
1396
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
1349
1397
|
paddingBlock: getSpacingValue(paddingBlock || paddingY),
|
|
@@ -1356,8 +1404,11 @@ var init_Box = __esm({
|
|
|
1356
1404
|
maxWidth,
|
|
1357
1405
|
maxHeight,
|
|
1358
1406
|
width,
|
|
1359
|
-
height
|
|
1360
|
-
|
|
1407
|
+
height
|
|
1408
|
+
});
|
|
1409
|
+
const styleProps = filterUndefinedProps({
|
|
1410
|
+
...fromProps,
|
|
1411
|
+
...style ? filterUnsetValues(style) : {}
|
|
1361
1412
|
});
|
|
1362
1413
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
1363
1414
|
};
|
|
@@ -1374,13 +1425,13 @@ var init_Box2 = __esm({
|
|
|
1374
1425
|
});
|
|
1375
1426
|
|
|
1376
1427
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1377
|
-
var import_react10,
|
|
1428
|
+
var import_react10, import_dedupe11, import_Breadcrumbs, import_jsx_runtime11, Breadcrumbs;
|
|
1378
1429
|
var init_Breadcrumbs = __esm({
|
|
1379
1430
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1380
1431
|
"use strict";
|
|
1381
1432
|
"use client";
|
|
1382
1433
|
import_react10 = require("react");
|
|
1383
|
-
|
|
1434
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
1384
1435
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
1385
1436
|
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1386
1437
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
@@ -1388,7 +1439,7 @@ var init_Breadcrumbs = __esm({
|
|
|
1388
1439
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
1389
1440
|
const { children, ...otherProps } = props;
|
|
1390
1441
|
const childArray = import_react10.Children.toArray(children);
|
|
1391
|
-
const classes = (0,
|
|
1442
|
+
const classes = (0, import_dedupe11.default)(
|
|
1392
1443
|
"mobius",
|
|
1393
1444
|
"mobius-breadcrumb",
|
|
1394
1445
|
otherProps.className
|
|
@@ -1408,13 +1459,13 @@ var init_Breadcrumbs = __esm({
|
|
|
1408
1459
|
});
|
|
1409
1460
|
|
|
1410
1461
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
1411
|
-
var import_react11,
|
|
1462
|
+
var import_react11, import_dedupe12, import_jsx_runtime12, BreadcrumbItem;
|
|
1412
1463
|
var init_BreadcrumbItem = __esm({
|
|
1413
1464
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
1414
1465
|
"use strict";
|
|
1415
1466
|
"use client";
|
|
1416
1467
|
import_react11 = require("react");
|
|
1417
|
-
|
|
1468
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
1418
1469
|
init_Box2();
|
|
1419
1470
|
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1420
1471
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
@@ -1433,7 +1484,7 @@ var init_BreadcrumbItem = __esm({
|
|
|
1433
1484
|
...otherProps
|
|
1434
1485
|
}
|
|
1435
1486
|
};
|
|
1436
|
-
const classes = (0,
|
|
1487
|
+
const classes = (0, import_dedupe12.default)(
|
|
1437
1488
|
"mobius",
|
|
1438
1489
|
"mobius-breadcrumb__item",
|
|
1439
1490
|
props.className
|
|
@@ -1543,12 +1594,12 @@ var init_Success = __esm({
|
|
|
1543
1594
|
});
|
|
1544
1595
|
|
|
1545
1596
|
// src/components/Button/Button.tsx
|
|
1546
|
-
var
|
|
1597
|
+
var import_dedupe13, import_Button, import_jsx_runtime16, Button;
|
|
1547
1598
|
var init_Button = __esm({
|
|
1548
1599
|
"src/components/Button/Button.tsx"() {
|
|
1549
1600
|
"use strict";
|
|
1550
1601
|
"use client";
|
|
1551
|
-
|
|
1602
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
1552
1603
|
init_Loading();
|
|
1553
1604
|
init_useButton2();
|
|
1554
1605
|
init_Success();
|
|
@@ -1568,7 +1619,7 @@ var init_Button = __esm({
|
|
|
1568
1619
|
...otherProps
|
|
1569
1620
|
} = props;
|
|
1570
1621
|
const { buttonProps } = useButton(props);
|
|
1571
|
-
otherProps.className = (0,
|
|
1622
|
+
otherProps.className = (0, import_dedupe13.default)(
|
|
1572
1623
|
"mobius",
|
|
1573
1624
|
"mobius-button",
|
|
1574
1625
|
`--variant-${variant}`,
|
|
@@ -1598,16 +1649,16 @@ var init_Button2 = __esm({
|
|
|
1598
1649
|
});
|
|
1599
1650
|
|
|
1600
1651
|
// src/components/Stack/Stack.tsx
|
|
1601
|
-
var
|
|
1652
|
+
var import_dedupe14, import_Stack, import_jsx_runtime17, Stack;
|
|
1602
1653
|
var init_Stack = __esm({
|
|
1603
1654
|
"src/components/Stack/Stack.tsx"() {
|
|
1604
1655
|
"use strict";
|
|
1605
|
-
|
|
1656
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
1606
1657
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
1607
1658
|
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1608
1659
|
Stack = ({ ref, ...props }) => {
|
|
1609
1660
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
1610
|
-
const classes = (0,
|
|
1661
|
+
const classes = (0, import_dedupe14.default)(
|
|
1611
1662
|
"mobius",
|
|
1612
1663
|
"mobius-stack",
|
|
1613
1664
|
{
|
|
@@ -1630,13 +1681,13 @@ var init_Stack2 = __esm({
|
|
|
1630
1681
|
});
|
|
1631
1682
|
|
|
1632
1683
|
// src/components/Checkbox/Checkbox.tsx
|
|
1633
|
-
var import_react12,
|
|
1684
|
+
var import_react12, import_dedupe15, import_icons5, import_Checkbox, import_jsx_runtime18, Checkbox;
|
|
1634
1685
|
var init_Checkbox = __esm({
|
|
1635
1686
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
1636
1687
|
"use strict";
|
|
1637
1688
|
"use client";
|
|
1638
1689
|
import_react12 = require("react");
|
|
1639
|
-
|
|
1690
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
1640
1691
|
import_icons5 = require("@simplybusiness/icons");
|
|
1641
1692
|
init_ErrorMessage2();
|
|
1642
1693
|
init_spaceDelimitedList();
|
|
@@ -1675,7 +1726,7 @@ var init_Checkbox = __esm({
|
|
|
1675
1726
|
}
|
|
1676
1727
|
}, [selected, isControlled]);
|
|
1677
1728
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1678
|
-
const sharedClasses = (0,
|
|
1729
|
+
const sharedClasses = (0, import_dedupe15.default)(
|
|
1679
1730
|
{
|
|
1680
1731
|
"--is-disabled": isDisabled,
|
|
1681
1732
|
"--is-selected": checked,
|
|
@@ -1684,15 +1735,15 @@ var init_Checkbox = __esm({
|
|
|
1684
1735
|
},
|
|
1685
1736
|
validationClasses
|
|
1686
1737
|
);
|
|
1687
|
-
const wrapperClasses = (0,
|
|
1738
|
+
const wrapperClasses = (0, import_dedupe15.default)(
|
|
1688
1739
|
"mobius",
|
|
1689
1740
|
"mobius-checkbox",
|
|
1690
1741
|
sharedClasses,
|
|
1691
1742
|
className
|
|
1692
1743
|
);
|
|
1693
|
-
const labelClasses = (0,
|
|
1694
|
-
const inputClasses = (0,
|
|
1695
|
-
const iconClasses = (0,
|
|
1744
|
+
const labelClasses = (0, import_dedupe15.default)("mobius-checkbox__label", sharedClasses);
|
|
1745
|
+
const inputClasses = (0, import_dedupe15.default)("mobius-checkbox__input", sharedClasses);
|
|
1746
|
+
const iconClasses = (0, import_dedupe15.default)("mobius-checkbox__icon", sharedClasses);
|
|
1696
1747
|
const errorMessageId = (0, import_react12.useId)();
|
|
1697
1748
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1698
1749
|
const describedBy = spaceDelimitedList([
|
|
@@ -1747,16 +1798,16 @@ var init_Checkbox = __esm({
|
|
|
1747
1798
|
});
|
|
1748
1799
|
|
|
1749
1800
|
// src/components/Label/Label.tsx
|
|
1750
|
-
var
|
|
1801
|
+
var import_dedupe16, import_Label, import_jsx_runtime19, Label;
|
|
1751
1802
|
var init_Label = __esm({
|
|
1752
1803
|
"src/components/Label/Label.tsx"() {
|
|
1753
1804
|
"use strict";
|
|
1754
|
-
|
|
1805
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
1755
1806
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
1756
1807
|
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1757
1808
|
Label = ({ ref, ...props }) => {
|
|
1758
1809
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
1759
|
-
const classes = (0,
|
|
1810
|
+
const classes = (0, import_dedupe16.default)("mobius", "mobius-label", props.className);
|
|
1760
1811
|
otherProps.className = classes;
|
|
1761
1812
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
1762
1813
|
};
|
|
@@ -1773,12 +1824,12 @@ var init_Label2 = __esm({
|
|
|
1773
1824
|
});
|
|
1774
1825
|
|
|
1775
1826
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
1776
|
-
var
|
|
1827
|
+
var import_dedupe17, import_react13, import_CheckboxGroup, import_jsx_runtime20, CheckboxGroup;
|
|
1777
1828
|
var init_CheckboxGroup = __esm({
|
|
1778
1829
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
1779
1830
|
"use strict";
|
|
1780
1831
|
"use client";
|
|
1781
|
-
|
|
1832
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
1782
1833
|
import_react13 = require("react");
|
|
1783
1834
|
init_hooks();
|
|
1784
1835
|
init_spaceDelimitedList();
|
|
@@ -1817,7 +1868,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1817
1868
|
isInitializedRef.current = true;
|
|
1818
1869
|
}
|
|
1819
1870
|
}, [defaultValue]);
|
|
1820
|
-
const checkboxGroupClasses = (0,
|
|
1871
|
+
const checkboxGroupClasses = (0, import_dedupe17.default)(
|
|
1821
1872
|
"mobius",
|
|
1822
1873
|
"mobius-checkbox-group",
|
|
1823
1874
|
className,
|
|
@@ -1829,7 +1880,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1829
1880
|
}
|
|
1830
1881
|
);
|
|
1831
1882
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1832
|
-
const labelClasses = (0,
|
|
1883
|
+
const labelClasses = (0, import_dedupe17.default)(
|
|
1833
1884
|
{
|
|
1834
1885
|
"--is-disabled": isDisabled
|
|
1835
1886
|
},
|
|
@@ -1925,17 +1976,17 @@ var init_Checkbox2 = __esm({
|
|
|
1925
1976
|
});
|
|
1926
1977
|
|
|
1927
1978
|
// src/components/Container/Container.tsx
|
|
1928
|
-
var
|
|
1979
|
+
var import_dedupe18, import_Container, import_jsx_runtime21, Container;
|
|
1929
1980
|
var init_Container = __esm({
|
|
1930
1981
|
"src/components/Container/Container.tsx"() {
|
|
1931
1982
|
"use strict";
|
|
1932
|
-
|
|
1983
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
1933
1984
|
init_utils();
|
|
1934
1985
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
1935
1986
|
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1936
1987
|
Container = ({ ref, ...props }) => {
|
|
1937
1988
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
1938
|
-
const classes = (0,
|
|
1989
|
+
const classes = (0, import_dedupe18.default)(
|
|
1939
1990
|
"mobius",
|
|
1940
1991
|
"mobius-container",
|
|
1941
1992
|
sizeClasses(size),
|
|
@@ -1994,12 +2045,12 @@ var init_validation = __esm({
|
|
|
1994
2045
|
});
|
|
1995
2046
|
|
|
1996
2047
|
// src/components/DateField/DateField.tsx
|
|
1997
|
-
var
|
|
2048
|
+
var import_dedupe19, import_react14, import_jsx_runtime22, MIN_MAX_ERROR, DateField;
|
|
1998
2049
|
var init_DateField = __esm({
|
|
1999
2050
|
"src/components/DateField/DateField.tsx"() {
|
|
2000
2051
|
"use strict";
|
|
2001
2052
|
"use client";
|
|
2002
|
-
|
|
2053
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2003
2054
|
import_react14 = require("react");
|
|
2004
2055
|
init_mergeRefs();
|
|
2005
2056
|
init_TextField2();
|
|
@@ -2020,7 +2071,7 @@ var init_DateField = __esm({
|
|
|
2020
2071
|
const [error3, setError] = (0, import_react14.useState)(errorMessage);
|
|
2021
2072
|
const [isInvalid, setIsInvalid] = (0, import_react14.useState)(void 0);
|
|
2022
2073
|
const localRef = (0, import_react14.useRef)(null);
|
|
2023
|
-
const classes = (0,
|
|
2074
|
+
const classes = (0, import_dedupe19.default)("mobius-date-field", className);
|
|
2024
2075
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2025
2076
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2026
2077
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2123,12 +2174,12 @@ var init_DrawerContext = __esm({
|
|
|
2123
2174
|
});
|
|
2124
2175
|
|
|
2125
2176
|
// src/components/Drawer/Drawer.tsx
|
|
2126
|
-
var
|
|
2177
|
+
var import_dedupe20, import_react16, import_Drawer, import_jsx_runtime24, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2127
2178
|
var init_Drawer = __esm({
|
|
2128
2179
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2129
2180
|
"use strict";
|
|
2130
2181
|
"use client";
|
|
2131
|
-
|
|
2182
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2132
2183
|
import_react16 = require("react");
|
|
2133
2184
|
init_hooks();
|
|
2134
2185
|
init_utils();
|
|
@@ -2162,7 +2213,7 @@ var init_Drawer = __esm({
|
|
|
2162
2213
|
});
|
|
2163
2214
|
const hiddenId = `dialog-screen-reader-announce-${(0, import_react16.useId)()}`;
|
|
2164
2215
|
const headerId = `dialog-header-${(0, import_react16.useId)()}`;
|
|
2165
|
-
const dialogClasses = (0,
|
|
2216
|
+
const dialogClasses = (0, import_dedupe20.default)(
|
|
2166
2217
|
"mobius",
|
|
2167
2218
|
"mobius-drawer",
|
|
2168
2219
|
`--${direction}`,
|
|
@@ -2268,14 +2319,14 @@ var init_Drawer2 = __esm({
|
|
|
2268
2319
|
});
|
|
2269
2320
|
|
|
2270
2321
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2271
|
-
var import_react18, import_react_accessible_dropdown_menu_hook,
|
|
2322
|
+
var import_react18, import_react_accessible_dropdown_menu_hook, import_dedupe21, import_DropdownMenu, import_jsx_runtime26, DropdownMenu;
|
|
2272
2323
|
var init_DropdownMenu = __esm({
|
|
2273
2324
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2274
2325
|
"use strict";
|
|
2275
2326
|
"use client";
|
|
2276
2327
|
import_react18 = require("react");
|
|
2277
2328
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2278
|
-
|
|
2329
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2279
2330
|
init_Button2();
|
|
2280
2331
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2281
2332
|
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
@@ -2295,13 +2346,13 @@ var init_DropdownMenu = __esm({
|
|
|
2295
2346
|
isOpen: open,
|
|
2296
2347
|
setIsOpen
|
|
2297
2348
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2298
|
-
const classes = (0,
|
|
2349
|
+
const classes = (0, import_dedupe21.default)(
|
|
2299
2350
|
"mobius",
|
|
2300
2351
|
"mobius-dropdown-menu",
|
|
2301
2352
|
otherProps.className
|
|
2302
2353
|
);
|
|
2303
|
-
const triggerClasses = (0,
|
|
2304
|
-
const listClasses = (0,
|
|
2354
|
+
const triggerClasses = (0, import_dedupe21.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2355
|
+
const listClasses = (0, import_dedupe21.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2305
2356
|
"--is-open": open
|
|
2306
2357
|
});
|
|
2307
2358
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2335,12 +2386,12 @@ var init_DropdownMenu = __esm({
|
|
|
2335
2386
|
});
|
|
2336
2387
|
|
|
2337
2388
|
// src/components/DropdownMenu/Item.tsx
|
|
2338
|
-
var import_react19,
|
|
2389
|
+
var import_react19, import_dedupe22, import_jsx_runtime27, Item;
|
|
2339
2390
|
var init_Item = __esm({
|
|
2340
2391
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
2341
2392
|
"use strict";
|
|
2342
2393
|
import_react19 = require("react");
|
|
2343
|
-
|
|
2394
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2344
2395
|
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2345
2396
|
Item = ({ ref, ...props }) => {
|
|
2346
2397
|
const {
|
|
@@ -2350,7 +2401,7 @@ var init_Item = __esm({
|
|
|
2350
2401
|
children,
|
|
2351
2402
|
...otherProps
|
|
2352
2403
|
} = props;
|
|
2353
|
-
const classes = (0,
|
|
2404
|
+
const classes = (0, import_dedupe22.default)(
|
|
2354
2405
|
"mobius",
|
|
2355
2406
|
"mobius-dropdown-menu__item",
|
|
2356
2407
|
{ "--is-active": active },
|
|
@@ -2358,7 +2409,7 @@ var init_Item = __esm({
|
|
|
2358
2409
|
);
|
|
2359
2410
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Element, { ref, onClick, ...otherProps, children: import_react19.Children.map(children, (child) => {
|
|
2360
2411
|
if ((0, import_react19.isValidElement)(child)) {
|
|
2361
|
-
const childClasses = (0,
|
|
2412
|
+
const childClasses = (0, import_dedupe22.default)(
|
|
2362
2413
|
child.props.className,
|
|
2363
2414
|
classes
|
|
2364
2415
|
);
|
|
@@ -2394,12 +2445,12 @@ var init_DropdownMenu2 = __esm({
|
|
|
2394
2445
|
});
|
|
2395
2446
|
|
|
2396
2447
|
// src/components/Fieldset/Fieldset.tsx
|
|
2397
|
-
var
|
|
2448
|
+
var import_dedupe23, import_react20, import_Fieldset, import_jsx_runtime28, useFieldset, Fieldset;
|
|
2398
2449
|
var init_Fieldset = __esm({
|
|
2399
2450
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
2400
2451
|
"use strict";
|
|
2401
2452
|
"use client";
|
|
2402
|
-
|
|
2453
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2403
2454
|
import_react20 = require("react");
|
|
2404
2455
|
init_Flex2();
|
|
2405
2456
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
@@ -2434,7 +2485,7 @@ var init_Fieldset = __esm({
|
|
|
2434
2485
|
...otherProps
|
|
2435
2486
|
} = props;
|
|
2436
2487
|
const { legendProps, containerProps } = useFieldset(props);
|
|
2437
|
-
const classes = (0,
|
|
2488
|
+
const classes = (0, import_dedupe23.default)("mobius", "mobius-fieldset", props.className);
|
|
2438
2489
|
legendProps.className = "mobius-fieldset__legend";
|
|
2439
2490
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
2440
2491
|
legend && (0, import_react20.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
@@ -2454,14 +2505,14 @@ var init_Fieldset2 = __esm({
|
|
|
2454
2505
|
});
|
|
2455
2506
|
|
|
2456
2507
|
// src/components/Grid/Grid.tsx
|
|
2457
|
-
var
|
|
2508
|
+
var import_dedupe24, import_jsx_runtime29, Grid;
|
|
2458
2509
|
var init_Grid = __esm({
|
|
2459
2510
|
"src/components/Grid/Grid.tsx"() {
|
|
2460
2511
|
"use strict";
|
|
2461
|
-
|
|
2512
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2462
2513
|
init_utils();
|
|
2463
2514
|
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2464
|
-
Grid = ({ ref
|
|
2515
|
+
Grid = ({ ref, ...props }) => {
|
|
2465
2516
|
const {
|
|
2466
2517
|
columns = 12,
|
|
2467
2518
|
gap,
|
|
@@ -2475,7 +2526,7 @@ var init_Grid = __esm({
|
|
|
2475
2526
|
style,
|
|
2476
2527
|
...rest
|
|
2477
2528
|
} = props;
|
|
2478
|
-
const classes = (0,
|
|
2529
|
+
const classes = (0, import_dedupe24.default)("mobius", "mobius-grid", className);
|
|
2479
2530
|
const styles = filterUndefinedProps({
|
|
2480
2531
|
boxSizing: "border-box",
|
|
2481
2532
|
display: "grid",
|
|
@@ -2489,20 +2540,20 @@ var init_Grid = __esm({
|
|
|
2489
2540
|
justifyItems,
|
|
2490
2541
|
...style
|
|
2491
2542
|
});
|
|
2492
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: styles, className: classes, ...rest });
|
|
2543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, style: styles, className: classes, ...rest });
|
|
2493
2544
|
};
|
|
2494
2545
|
Grid.displayName = "Grid";
|
|
2495
2546
|
}
|
|
2496
2547
|
});
|
|
2497
2548
|
|
|
2498
2549
|
// src/components/Grid/Item.tsx
|
|
2499
|
-
var import_react21,
|
|
2550
|
+
var import_react21, import_dedupe25, import_jsx_runtime30, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
2500
2551
|
var init_Item2 = __esm({
|
|
2501
2552
|
"src/components/Grid/Item.tsx"() {
|
|
2502
2553
|
"use strict";
|
|
2503
2554
|
"use client";
|
|
2504
2555
|
import_react21 = require("react");
|
|
2505
|
-
|
|
2556
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
2506
2557
|
init_hooks();
|
|
2507
2558
|
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2508
2559
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
@@ -2514,7 +2565,7 @@ var init_Item2 = __esm({
|
|
|
2514
2565
|
{}
|
|
2515
2566
|
);
|
|
2516
2567
|
DEFAULT_SPAN = 12;
|
|
2517
|
-
GridItem = ({ ref
|
|
2568
|
+
GridItem = ({ ref, ...props }) => {
|
|
2518
2569
|
const {
|
|
2519
2570
|
breakpoint: { size: breakpointSize }
|
|
2520
2571
|
} = useBreakpoint();
|
|
@@ -2540,7 +2591,7 @@ var init_Item2 = __esm({
|
|
|
2540
2591
|
xxl
|
|
2541
2592
|
});
|
|
2542
2593
|
const [responsiveSpan, setResponsiveSpan] = (0, import_react21.useState)();
|
|
2543
|
-
const classes = (0,
|
|
2594
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-grid__item", className);
|
|
2544
2595
|
(0, import_react21.useEffect)(() => {
|
|
2545
2596
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
2546
2597
|
}, [breakpointSize, breakpointMap]);
|
|
@@ -2549,7 +2600,7 @@ var init_Item2 = __esm({
|
|
|
2549
2600
|
alignSelf,
|
|
2550
2601
|
justifySelf
|
|
2551
2602
|
};
|
|
2552
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, style: { ...styles }, className: classes, ...rest });
|
|
2553
2604
|
};
|
|
2554
2605
|
GridItem.displayName = "GridItem";
|
|
2555
2606
|
}
|
|
@@ -2570,11 +2621,11 @@ var init_Grid2 = __esm({
|
|
|
2570
2621
|
});
|
|
2571
2622
|
|
|
2572
2623
|
// src/components/Image/Image.tsx
|
|
2573
|
-
var
|
|
2624
|
+
var import_dedupe26, import_jsx_runtime31, Image;
|
|
2574
2625
|
var init_Image = __esm({
|
|
2575
2626
|
"src/components/Image/Image.tsx"() {
|
|
2576
2627
|
"use strict";
|
|
2577
|
-
|
|
2628
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
2578
2629
|
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2579
2630
|
Image = ({
|
|
2580
2631
|
ref,
|
|
@@ -2582,7 +2633,7 @@ var init_Image = __esm({
|
|
|
2582
2633
|
elementType: Component = "img",
|
|
2583
2634
|
...otherProps
|
|
2584
2635
|
}) => {
|
|
2585
|
-
const classes = (0,
|
|
2636
|
+
const classes = (0, import_dedupe26.default)("mobius", "mobius-image", otherProps.className);
|
|
2586
2637
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
2587
2638
|
};
|
|
2588
2639
|
Image.displayName = "Image";
|
|
@@ -2598,11 +2649,11 @@ var init_Image2 = __esm({
|
|
|
2598
2649
|
});
|
|
2599
2650
|
|
|
2600
2651
|
// src/components/Link/Link.tsx
|
|
2601
|
-
var
|
|
2652
|
+
var import_dedupe27, import_Link, import_jsx_runtime32, Link;
|
|
2602
2653
|
var init_Link = __esm({
|
|
2603
2654
|
"src/components/Link/Link.tsx"() {
|
|
2604
2655
|
"use strict";
|
|
2605
|
-
|
|
2656
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
2606
2657
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
2607
2658
|
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2608
2659
|
Link = ({ ref, ...props }) => {
|
|
@@ -2618,7 +2669,7 @@ var init_Link = __esm({
|
|
|
2618
2669
|
pointerEvents: "none"
|
|
2619
2670
|
};
|
|
2620
2671
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
2621
|
-
const classes = (0,
|
|
2672
|
+
const classes = (0, import_dedupe27.default)(
|
|
2622
2673
|
"mobius",
|
|
2623
2674
|
"mobius-link",
|
|
2624
2675
|
className,
|
|
@@ -2652,11 +2703,11 @@ var init_Link2 = __esm({
|
|
|
2652
2703
|
});
|
|
2653
2704
|
|
|
2654
2705
|
// src/components/LinkButton/LinkButton.tsx
|
|
2655
|
-
var
|
|
2706
|
+
var import_dedupe28, import_jsx_runtime33;
|
|
2656
2707
|
var init_LinkButton = __esm({
|
|
2657
2708
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
2658
2709
|
"use strict";
|
|
2659
|
-
|
|
2710
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
2660
2711
|
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2661
2712
|
}
|
|
2662
2713
|
});
|
|
@@ -2670,12 +2721,12 @@ var init_LinkButton2 = __esm({
|
|
|
2670
2721
|
});
|
|
2671
2722
|
|
|
2672
2723
|
// src/components/List/List.tsx
|
|
2673
|
-
var import_react22,
|
|
2724
|
+
var import_react22, import_dedupe29, import_List, import_jsx_runtime34, List;
|
|
2674
2725
|
var init_List = __esm({
|
|
2675
2726
|
"src/components/List/List.tsx"() {
|
|
2676
2727
|
"use strict";
|
|
2677
2728
|
import_react22 = require("react");
|
|
2678
|
-
|
|
2729
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
2679
2730
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
2680
2731
|
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2681
2732
|
List = ({ ref, ...props }) => {
|
|
@@ -2686,7 +2737,7 @@ var init_List = __esm({
|
|
|
2686
2737
|
...restProps,
|
|
2687
2738
|
reversed: isReversed
|
|
2688
2739
|
};
|
|
2689
|
-
const classes = (0,
|
|
2740
|
+
const classes = (0, import_dedupe29.default)(
|
|
2690
2741
|
"mobius",
|
|
2691
2742
|
"mobius-list",
|
|
2692
2743
|
{
|
|
@@ -2695,30 +2746,38 @@ var init_List = __esm({
|
|
|
2695
2746
|
},
|
|
2696
2747
|
otherProps.className
|
|
2697
2748
|
);
|
|
2698
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2750
|
+
Component,
|
|
2751
|
+
{
|
|
2752
|
+
ref,
|
|
2753
|
+
...mappedProps,
|
|
2754
|
+
className: classes,
|
|
2755
|
+
children: import_react22.Children.map(children, (child) => {
|
|
2756
|
+
if ((0, import_react22.isValidElement)(child)) {
|
|
2757
|
+
return (0, import_react22.cloneElement)(child, {
|
|
2758
|
+
parentIcon: icon
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
return child;
|
|
2762
|
+
})
|
|
2703
2763
|
}
|
|
2704
|
-
|
|
2705
|
-
}) });
|
|
2764
|
+
);
|
|
2706
2765
|
};
|
|
2707
2766
|
List.displayName = "List";
|
|
2708
2767
|
}
|
|
2709
2768
|
});
|
|
2710
2769
|
|
|
2711
2770
|
// src/components/List/ListItem.tsx
|
|
2712
|
-
var
|
|
2771
|
+
var import_dedupe30, import_jsx_runtime35, ListItem;
|
|
2713
2772
|
var init_ListItem = __esm({
|
|
2714
2773
|
"src/components/List/ListItem.tsx"() {
|
|
2715
2774
|
"use strict";
|
|
2716
|
-
|
|
2775
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
2717
2776
|
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2718
2777
|
ListItem = ({ ref, ...props }) => {
|
|
2719
2778
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
2720
2779
|
const iconContent = icon || parentIcon;
|
|
2721
|
-
const classes = (0,
|
|
2780
|
+
const classes = (0, import_dedupe30.default)(
|
|
2722
2781
|
"mobius",
|
|
2723
2782
|
"mobius-list__item",
|
|
2724
2783
|
{
|
|
@@ -2726,8 +2785,8 @@ var init_ListItem = __esm({
|
|
|
2726
2785
|
},
|
|
2727
2786
|
props.className
|
|
2728
2787
|
);
|
|
2729
|
-
const contentClasses = (0,
|
|
2730
|
-
const iconClasses = (0,
|
|
2788
|
+
const contentClasses = (0, import_dedupe30.default)("mobius", "mobius-list__item-content");
|
|
2789
|
+
const iconClasses = (0, import_dedupe30.default)("mobius", "mobius-list__icon");
|
|
2731
2790
|
if (iconContent) {
|
|
2732
2791
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: contentClasses, children: [
|
|
2733
2792
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
@@ -2750,18 +2809,18 @@ var init_List2 = __esm({
|
|
|
2750
2809
|
});
|
|
2751
2810
|
|
|
2752
2811
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
2753
|
-
var
|
|
2812
|
+
var import_dedupe31, import_icons7, import_LoadingIndicator, import_jsx_runtime36, LoadingIndicator;
|
|
2754
2813
|
var init_LoadingIndicator = __esm({
|
|
2755
2814
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
2756
2815
|
"use strict";
|
|
2757
|
-
|
|
2816
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
2758
2817
|
import_icons7 = require("@simplybusiness/icons");
|
|
2759
2818
|
init_Icon2();
|
|
2760
2819
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
2761
2820
|
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2762
2821
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
2763
2822
|
const { icon = import_icons7.loading, ...otherProps } = props;
|
|
2764
|
-
const classes = (0,
|
|
2823
|
+
const classes = (0, import_dedupe31.default)(
|
|
2765
2824
|
"mobius",
|
|
2766
2825
|
"mobius-loading-indicator",
|
|
2767
2826
|
otherProps.className
|
|
@@ -2781,15 +2840,15 @@ var init_LoadingIndicator2 = __esm({
|
|
|
2781
2840
|
});
|
|
2782
2841
|
|
|
2783
2842
|
// src/components/Logo/Logo.tsx
|
|
2784
|
-
var
|
|
2843
|
+
var import_dedupe32, import_jsx_runtime37, Logo;
|
|
2785
2844
|
var init_Logo = __esm({
|
|
2786
2845
|
"src/components/Logo/Logo.tsx"() {
|
|
2787
2846
|
"use strict";
|
|
2788
|
-
|
|
2847
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
2789
2848
|
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2790
2849
|
Logo = ({ ref, ...props }) => {
|
|
2791
2850
|
const { className, width, height, ...otherProps } = props;
|
|
2792
|
-
const classes = (0,
|
|
2851
|
+
const classes = (0, import_dedupe32.default)("mobius", "mobius-logo", className);
|
|
2793
2852
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2794
2853
|
"svg",
|
|
2795
2854
|
{
|
|
@@ -2873,7 +2932,10 @@ var init_ModalContext = __esm({
|
|
|
2873
2932
|
ModalContext = (0, import_react23.createContext)({
|
|
2874
2933
|
onClose: () => {
|
|
2875
2934
|
},
|
|
2876
|
-
closeLabel: void 0
|
|
2935
|
+
closeLabel: void 0,
|
|
2936
|
+
titleId: void 0,
|
|
2937
|
+
setTitleId: () => {
|
|
2938
|
+
}
|
|
2877
2939
|
});
|
|
2878
2940
|
}
|
|
2879
2941
|
});
|
|
@@ -2886,54 +2948,68 @@ var init_useModal = __esm({
|
|
|
2886
2948
|
import_react24 = require("react");
|
|
2887
2949
|
init_ModalContext();
|
|
2888
2950
|
useModal = () => {
|
|
2889
|
-
const { onClose, closeLabel } = (0, import_react24.useContext)(ModalContext);
|
|
2890
|
-
return { onClose, closeLabel };
|
|
2951
|
+
const { onClose, closeLabel, titleId, setTitleId } = (0, import_react24.useContext)(ModalContext);
|
|
2952
|
+
return { onClose, closeLabel, titleId, setTitleId };
|
|
2891
2953
|
};
|
|
2892
2954
|
}
|
|
2893
2955
|
});
|
|
2894
2956
|
|
|
2895
2957
|
// src/components/Modal/Header.tsx
|
|
2896
|
-
var import_icons8, import_jsx_runtime39, Header2;
|
|
2958
|
+
var import_react25, import_icons8, import_jsx_runtime39, Header2;
|
|
2897
2959
|
var init_Header2 = __esm({
|
|
2898
2960
|
"src/components/Modal/Header.tsx"() {
|
|
2899
2961
|
"use strict";
|
|
2962
|
+
import_react25 = require("react");
|
|
2900
2963
|
import_icons8 = require("@simplybusiness/icons");
|
|
2901
2964
|
init_Button2();
|
|
2902
2965
|
init_Icon2();
|
|
2903
2966
|
init_useModal();
|
|
2904
2967
|
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2905
2968
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
2906
|
-
const { onClose, closeLabel } = useModal();
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2969
|
+
const { onClose, closeLabel, setTitleId } = useModal();
|
|
2970
|
+
const titleId = (0, import_react25.useId)();
|
|
2971
|
+
(0, import_react25.useEffect)(() => {
|
|
2972
|
+
setTitleId(titleId);
|
|
2973
|
+
}, [titleId, setTitleId]);
|
|
2974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2975
|
+
"header",
|
|
2976
|
+
{
|
|
2977
|
+
ref,
|
|
2978
|
+
...otherProps,
|
|
2979
|
+
className: "mobius-modal__header",
|
|
2980
|
+
id: titleId,
|
|
2981
|
+
children: [
|
|
2982
|
+
children,
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2984
|
+
Button,
|
|
2985
|
+
{
|
|
2986
|
+
"aria-label": "Close",
|
|
2987
|
+
variant: "basic",
|
|
2988
|
+
onPress: onClose,
|
|
2989
|
+
className: "mobius-modal__close",
|
|
2990
|
+
children: [
|
|
2991
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { icon: import_icons8.cross }),
|
|
2992
|
+
" ",
|
|
2993
|
+
closeLabel
|
|
2994
|
+
]
|
|
2995
|
+
}
|
|
2996
|
+
)
|
|
2997
|
+
]
|
|
2998
|
+
}
|
|
2999
|
+
);
|
|
2924
3000
|
};
|
|
2925
3001
|
Header2.displayName = "Header";
|
|
2926
3002
|
}
|
|
2927
3003
|
});
|
|
2928
3004
|
|
|
2929
3005
|
// src/components/Modal/Modal.tsx
|
|
2930
|
-
var
|
|
3006
|
+
var import_dedupe33, import_react26, import_Modal, import_jsx_runtime40, TRANSITION_CSS_VARIABLE2, Modal;
|
|
2931
3007
|
var init_Modal = __esm({
|
|
2932
3008
|
"src/components/Modal/Modal.tsx"() {
|
|
2933
3009
|
"use strict";
|
|
2934
3010
|
"use client";
|
|
2935
|
-
|
|
2936
|
-
|
|
3011
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3012
|
+
import_react26 = require("react");
|
|
2937
3013
|
init_hooks();
|
|
2938
3014
|
init_utils();
|
|
2939
3015
|
init_polyfill_tests();
|
|
@@ -2953,11 +3029,11 @@ var init_Modal = __esm({
|
|
|
2953
3029
|
animation,
|
|
2954
3030
|
...rest
|
|
2955
3031
|
} = props;
|
|
2956
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2957
|
-
(0,
|
|
3032
|
+
const [shouldTransition, setShouldTransition] = (0, import_react26.useState)(false);
|
|
3033
|
+
(0, import_react26.useEffect)(() => {
|
|
2958
3034
|
setShouldTransition(supportsDialog());
|
|
2959
3035
|
}, []);
|
|
2960
|
-
const dialogRef = (0,
|
|
3036
|
+
const dialogRef = (0, import_react26.useRef)(null);
|
|
2961
3037
|
const { close } = useDialog({
|
|
2962
3038
|
ref: dialogRef,
|
|
2963
3039
|
isOpen,
|
|
@@ -2968,7 +3044,7 @@ var init_Modal = __esm({
|
|
|
2968
3044
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
2969
3045
|
}
|
|
2970
3046
|
});
|
|
2971
|
-
const modalClasses = (0,
|
|
3047
|
+
const modalClasses = (0, import_dedupe33.default)(
|
|
2972
3048
|
"mobius",
|
|
2973
3049
|
"mobius-modal",
|
|
2974
3050
|
{
|
|
@@ -2981,12 +3057,18 @@ var init_Modal = __esm({
|
|
|
2981
3057
|
},
|
|
2982
3058
|
className
|
|
2983
3059
|
);
|
|
2984
|
-
const
|
|
3060
|
+
const [titleId, setTitleId] = (0, import_react26.useState)(void 0);
|
|
3061
|
+
const handleSetTitleId = (0, import_react26.useCallback)((id) => {
|
|
3062
|
+
setTitleId(id);
|
|
3063
|
+
}, []);
|
|
3064
|
+
const contextValue = (0, import_react26.useMemo)(
|
|
2985
3065
|
() => ({
|
|
2986
3066
|
onClose: close,
|
|
2987
|
-
closeLabel
|
|
3067
|
+
closeLabel,
|
|
3068
|
+
titleId,
|
|
3069
|
+
setTitleId: handleSetTitleId
|
|
2988
3070
|
}),
|
|
2989
|
-
[close, closeLabel]
|
|
3071
|
+
[close, closeLabel, titleId, handleSetTitleId]
|
|
2990
3072
|
);
|
|
2991
3073
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2992
3074
|
"dialog",
|
|
@@ -2994,6 +3076,7 @@ var init_Modal = __esm({
|
|
|
2994
3076
|
ref: mergeRefs([dialogRef, ref]),
|
|
2995
3077
|
onCancel: close,
|
|
2996
3078
|
className: modalClasses,
|
|
3079
|
+
"aria-labelledby": titleId,
|
|
2997
3080
|
...rest,
|
|
2998
3081
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
2999
3082
|
}
|
|
@@ -3020,13 +3103,13 @@ var init_Modal2 = __esm({
|
|
|
3020
3103
|
});
|
|
3021
3104
|
|
|
3022
3105
|
// src/components/NumberField/NumberField.tsx
|
|
3023
|
-
var
|
|
3106
|
+
var import_dedupe34, import_react27, import_NumberField, import_jsx_runtime41, NumberField;
|
|
3024
3107
|
var init_NumberField = __esm({
|
|
3025
3108
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3026
3109
|
"use strict";
|
|
3027
3110
|
"use client";
|
|
3028
|
-
|
|
3029
|
-
|
|
3111
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3112
|
+
import_react27 = require("react");
|
|
3030
3113
|
init_TextField2();
|
|
3031
3114
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3032
3115
|
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
@@ -3045,15 +3128,15 @@ var init_NumberField = __esm({
|
|
|
3045
3128
|
onBlur: customOnBlur,
|
|
3046
3129
|
...rest
|
|
3047
3130
|
} = otherProps;
|
|
3048
|
-
const focusedInputRef = (0,
|
|
3049
|
-
const wheelHandler = (0,
|
|
3050
|
-
(0,
|
|
3131
|
+
const focusedInputRef = (0, import_react27.useRef)(null);
|
|
3132
|
+
const wheelHandler = (0, import_react27.useCallback)((ev) => ev.preventDefault(), []);
|
|
3133
|
+
(0, import_react27.useEffect)(() => {
|
|
3051
3134
|
return () => {
|
|
3052
3135
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3053
3136
|
focusedInputRef.current = null;
|
|
3054
3137
|
};
|
|
3055
3138
|
}, [wheelHandler]);
|
|
3056
|
-
const containerClasses = (0,
|
|
3139
|
+
const containerClasses = (0, import_dedupe34.default)("mobius-number-field", className, {
|
|
3057
3140
|
"--hide-spin-buttons": hideSpinButtons
|
|
3058
3141
|
});
|
|
3059
3142
|
const handleBeforeInput = (event) => {
|
|
@@ -3179,13 +3262,13 @@ var init_ShowHideButton = __esm({
|
|
|
3179
3262
|
});
|
|
3180
3263
|
|
|
3181
3264
|
// src/components/PasswordField/PasswordField.tsx
|
|
3182
|
-
var
|
|
3265
|
+
var import_dedupe35, import_react28, import_PasswordField, import_jsx_runtime44, PasswordField;
|
|
3183
3266
|
var init_PasswordField = __esm({
|
|
3184
3267
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3185
3268
|
"use strict";
|
|
3186
3269
|
"use client";
|
|
3187
|
-
|
|
3188
|
-
|
|
3270
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3271
|
+
import_react28 = require("react");
|
|
3189
3272
|
init_mergeRefs();
|
|
3190
3273
|
init_TextField2();
|
|
3191
3274
|
init_ShowHideButton();
|
|
@@ -3197,10 +3280,10 @@ var init_PasswordField = __esm({
|
|
|
3197
3280
|
autoComplete = "current-password",
|
|
3198
3281
|
...props
|
|
3199
3282
|
}) => {
|
|
3200
|
-
const [show, setShow] = (0,
|
|
3283
|
+
const [show, setShow] = (0, import_react28.useState)(false);
|
|
3201
3284
|
const type = show ? "text" : "password";
|
|
3202
|
-
const classes = (0,
|
|
3203
|
-
const localRef = (0,
|
|
3285
|
+
const classes = (0, import_dedupe35.default)("mobius-password-field", className);
|
|
3286
|
+
const localRef = (0, import_react28.useRef)(null);
|
|
3204
3287
|
const handleShowHideButtonClick = () => {
|
|
3205
3288
|
const selectionStart = localRef.current?.selectionStart;
|
|
3206
3289
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3237,14 +3320,14 @@ var init_PasswordField2 = __esm({
|
|
|
3237
3320
|
});
|
|
3238
3321
|
|
|
3239
3322
|
// src/components/Popover/Popover.tsx
|
|
3240
|
-
var
|
|
3323
|
+
var import_react29, import_icons10, import_dedupe36, import_react30, import_mobius_hooks4, import_Popover, import_jsx_runtime45;
|
|
3241
3324
|
var init_Popover = __esm({
|
|
3242
3325
|
"src/components/Popover/Popover.tsx"() {
|
|
3243
3326
|
"use strict";
|
|
3244
|
-
|
|
3327
|
+
import_react29 = require("@floating-ui/react");
|
|
3245
3328
|
import_icons10 = require("@simplybusiness/icons");
|
|
3246
|
-
|
|
3247
|
-
|
|
3329
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3330
|
+
import_react30 = require("react");
|
|
3248
3331
|
import_mobius_hooks4 = require("@simplybusiness/mobius-hooks");
|
|
3249
3332
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3250
3333
|
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
@@ -3271,13 +3354,13 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3271
3354
|
console.warn("Progress value is greater than maxValue");
|
|
3272
3355
|
}
|
|
3273
3356
|
}
|
|
3274
|
-
var
|
|
3357
|
+
var import_dedupe37, import_react31, import_Progress, import_jsx_runtime46, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3275
3358
|
var init_Progress = __esm({
|
|
3276
3359
|
"src/components/Progress/Progress.tsx"() {
|
|
3277
3360
|
"use strict";
|
|
3278
3361
|
"use client";
|
|
3279
|
-
|
|
3280
|
-
|
|
3362
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3363
|
+
import_react31 = require("react");
|
|
3281
3364
|
init_Label2();
|
|
3282
3365
|
init_VisuallyHidden2();
|
|
3283
3366
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
@@ -3314,8 +3397,8 @@ var init_Progress = __esm({
|
|
|
3314
3397
|
DEFAULT_MIN_VALUE = 0;
|
|
3315
3398
|
DEFAULT_MAX_VALUE = 100;
|
|
3316
3399
|
Progress = ({ ref, ...props }) => {
|
|
3317
|
-
const progressId = (0,
|
|
3318
|
-
const progressLabelId = (0,
|
|
3400
|
+
const progressId = (0, import_react31.useId)();
|
|
3401
|
+
const progressLabelId = (0, import_react31.useId)();
|
|
3319
3402
|
const {
|
|
3320
3403
|
id,
|
|
3321
3404
|
label,
|
|
@@ -3340,7 +3423,7 @@ var init_Progress = __esm({
|
|
|
3340
3423
|
100
|
|
3341
3424
|
);
|
|
3342
3425
|
const barWidth = `${percentage}%`;
|
|
3343
|
-
const classes = (0,
|
|
3426
|
+
const classes = (0, import_dedupe37.default)("mobius", "mobius-progress", className, {
|
|
3344
3427
|
"--is-primary": variant === "primary",
|
|
3345
3428
|
"--is-secondary": variant === "secondary"
|
|
3346
3429
|
});
|
|
@@ -3380,13 +3463,13 @@ var init_Progress2 = __esm({
|
|
|
3380
3463
|
});
|
|
3381
3464
|
|
|
3382
3465
|
// src/components/Radio/Radio.tsx
|
|
3383
|
-
var
|
|
3466
|
+
var import_dedupe38, import_react32, import_Radio, import_jsx_runtime47, Radio;
|
|
3384
3467
|
var init_Radio = __esm({
|
|
3385
3468
|
"src/components/Radio/Radio.tsx"() {
|
|
3386
3469
|
"use strict";
|
|
3387
3470
|
"use client";
|
|
3388
|
-
|
|
3389
|
-
|
|
3471
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3472
|
+
import_react32 = require("react");
|
|
3390
3473
|
init_ErrorMessage2();
|
|
3391
3474
|
init_Label2();
|
|
3392
3475
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
@@ -3414,19 +3497,19 @@ var init_Radio = __esm({
|
|
|
3414
3497
|
const isMultiline = label && children;
|
|
3415
3498
|
const isControlled = selected !== void 0;
|
|
3416
3499
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3417
|
-
const contentRef = (0,
|
|
3418
|
-
const prevOverflowRef = (0,
|
|
3500
|
+
const contentRef = (0, import_react32.useRef)(null);
|
|
3501
|
+
const prevOverflowRef = (0, import_react32.useRef)({
|
|
3419
3502
|
vertical: false,
|
|
3420
3503
|
horizontal: false
|
|
3421
3504
|
});
|
|
3422
|
-
const hasIconFirst = (0,
|
|
3423
|
-
if (!children ||
|
|
3424
|
-
const firstChild =
|
|
3425
|
-
if (!(0,
|
|
3505
|
+
const hasIconFirst = (0, import_react32.useMemo)(() => {
|
|
3506
|
+
if (!children || import_react32.Children.count(children) === 0) return false;
|
|
3507
|
+
const firstChild = import_react32.Children.toArray(children)[0];
|
|
3508
|
+
if (!(0, import_react32.isValidElement)(firstChild)) return false;
|
|
3426
3509
|
const props2 = firstChild.props;
|
|
3427
3510
|
return "icon" in props2 && props2.icon !== void 0;
|
|
3428
3511
|
}, [children]);
|
|
3429
|
-
(0,
|
|
3512
|
+
(0, import_react32.useLayoutEffect)(() => {
|
|
3430
3513
|
if (!contentRef.current || !onOverflow) return;
|
|
3431
3514
|
if (orientation === "vertical") {
|
|
3432
3515
|
return;
|
|
@@ -3455,13 +3538,13 @@ var init_Radio = __esm({
|
|
|
3455
3538
|
"--is-multiline": !!isMultiline,
|
|
3456
3539
|
"--is-required": isRequired
|
|
3457
3540
|
};
|
|
3458
|
-
const containerClasses = (0,
|
|
3541
|
+
const containerClasses = (0, import_dedupe38.default)(
|
|
3459
3542
|
"mobius-radio__label",
|
|
3460
3543
|
radioClasses,
|
|
3461
3544
|
className,
|
|
3462
3545
|
{ "--has-icon-first": hasIconFirst }
|
|
3463
3546
|
);
|
|
3464
|
-
const inputClasses = (0,
|
|
3547
|
+
const inputClasses = (0, import_dedupe38.default)("mobius-radio__input", radioClasses);
|
|
3465
3548
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
3466
3549
|
const handleChange = (event) => {
|
|
3467
3550
|
if (setSelected) {
|
|
@@ -3507,13 +3590,13 @@ var init_Radio = __esm({
|
|
|
3507
3590
|
});
|
|
3508
3591
|
|
|
3509
3592
|
// src/components/Radio/RadioGroup.tsx
|
|
3510
|
-
var
|
|
3593
|
+
var import_dedupe39, import_react33, import_jsx_runtime48, getDefaultVal, RadioGroup;
|
|
3511
3594
|
var init_RadioGroup = __esm({
|
|
3512
3595
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
3513
3596
|
"use strict";
|
|
3514
3597
|
"use client";
|
|
3515
|
-
|
|
3516
|
-
|
|
3598
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3599
|
+
import_react33 = require("react");
|
|
3517
3600
|
init_hooks();
|
|
3518
3601
|
init_spaceDelimitedList();
|
|
3519
3602
|
init_ErrorMessage2();
|
|
@@ -3547,15 +3630,15 @@ var init_RadioGroup = __esm({
|
|
|
3547
3630
|
...rest
|
|
3548
3631
|
} = props;
|
|
3549
3632
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
3550
|
-
const [selected, setSelected] = (0,
|
|
3551
|
-
const overflowsRef = (0,
|
|
3552
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
3553
|
-
(0,
|
|
3633
|
+
const [selected, setSelected] = (0, import_react33.useState)(defaultSelected);
|
|
3634
|
+
const overflowsRef = (0, import_react33.useRef)({});
|
|
3635
|
+
const [hasOverflow, setHasOverflow] = (0, import_react33.useState)(false);
|
|
3636
|
+
(0, import_react33.useEffect)(() => {
|
|
3554
3637
|
if (value !== void 0) {
|
|
3555
3638
|
setSelected(value);
|
|
3556
3639
|
}
|
|
3557
3640
|
}, [value]);
|
|
3558
|
-
const handleOverflow = (0,
|
|
3641
|
+
const handleOverflow = (0, import_react33.useCallback)(
|
|
3559
3642
|
(radioValue, overflow) => {
|
|
3560
3643
|
overflowsRef.current = {
|
|
3561
3644
|
...overflowsRef.current,
|
|
@@ -3579,25 +3662,25 @@ var init_RadioGroup = __esm({
|
|
|
3579
3662
|
[`--is-${effectiveOrientation}`]: true,
|
|
3580
3663
|
[className || ""]: true
|
|
3581
3664
|
};
|
|
3582
|
-
const radioGroupClasses = (0,
|
|
3665
|
+
const radioGroupClasses = (0, import_dedupe39.default)(
|
|
3583
3666
|
"mobius",
|
|
3584
3667
|
"mobius-radio-group",
|
|
3585
3668
|
radioClasses,
|
|
3586
3669
|
validationClasses
|
|
3587
3670
|
);
|
|
3588
|
-
const radioWrapperClasses = (0,
|
|
3671
|
+
const radioWrapperClasses = (0, import_dedupe39.default)("mobius-radio__wrapper", {
|
|
3589
3672
|
[`--is-${effectiveOrientation}`]: true
|
|
3590
3673
|
});
|
|
3591
|
-
const labelClasses = (0,
|
|
3592
|
-
const errorMessageId = (0,
|
|
3593
|
-
const defaultNameAttrId = (0,
|
|
3674
|
+
const labelClasses = (0, import_dedupe39.default)(radioClasses, validationClasses);
|
|
3675
|
+
const errorMessageId = (0, import_react33.useId)();
|
|
3676
|
+
const defaultNameAttrId = (0, import_react33.useId)();
|
|
3594
3677
|
const nameAttribute = name || defaultNameAttrId;
|
|
3595
3678
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3596
3679
|
const describedBy = spaceDelimitedList([
|
|
3597
3680
|
shouldErrorMessageShow,
|
|
3598
3681
|
props["aria-describedby"]
|
|
3599
3682
|
]);
|
|
3600
|
-
const labelId = (0,
|
|
3683
|
+
const labelId = (0, import_react33.useId)();
|
|
3601
3684
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3602
3685
|
"div",
|
|
3603
3686
|
{
|
|
@@ -3616,10 +3699,10 @@ var init_RadioGroup = __esm({
|
|
|
3616
3699
|
role: "radiogroup",
|
|
3617
3700
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Stack, { gap: "xs", children: [
|
|
3618
3701
|
label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3619
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: radioWrapperClasses, children:
|
|
3620
|
-
if ((0,
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: radioWrapperClasses, children: import_react33.Children.map(children, (child) => {
|
|
3703
|
+
if ((0, import_react33.isValidElement)(child)) {
|
|
3621
3704
|
const childValue = child.props.value;
|
|
3622
|
-
return (0,
|
|
3705
|
+
return (0, import_react33.cloneElement)(
|
|
3623
3706
|
child,
|
|
3624
3707
|
{
|
|
3625
3708
|
orientation: effectiveOrientation,
|
|
@@ -3656,16 +3739,16 @@ var init_Radio2 = __esm({
|
|
|
3656
3739
|
});
|
|
3657
3740
|
|
|
3658
3741
|
// src/components/Segment/SegmentGroup.tsx
|
|
3659
|
-
var
|
|
3742
|
+
var import_dedupe40, import_jsx_runtime49, SegmentGroup;
|
|
3660
3743
|
var init_SegmentGroup = __esm({
|
|
3661
3744
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
3662
3745
|
"use strict";
|
|
3663
|
-
|
|
3746
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
3664
3747
|
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3665
3748
|
SegmentGroup = (props) => {
|
|
3666
3749
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
3667
3750
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
3668
|
-
const classes = (0,
|
|
3751
|
+
const classes = (0, import_dedupe40.default)(
|
|
3669
3752
|
"mobius",
|
|
3670
3753
|
"mobius-segment-group",
|
|
3671
3754
|
className,
|
|
@@ -3679,23 +3762,23 @@ var init_SegmentGroup = __esm({
|
|
|
3679
3762
|
});
|
|
3680
3763
|
|
|
3681
3764
|
// src/components/Segment/Segment.tsx
|
|
3682
|
-
var
|
|
3765
|
+
var import_dedupe41, import_Segment, import_jsx_runtime50, Segment;
|
|
3683
3766
|
var init_Segment = __esm({
|
|
3684
3767
|
"src/components/Segment/Segment.tsx"() {
|
|
3685
3768
|
"use strict";
|
|
3686
|
-
|
|
3769
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
3687
3770
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
3688
3771
|
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3689
|
-
Segment = (props) => {
|
|
3772
|
+
Segment = ({ ref, ...props }) => {
|
|
3690
3773
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
3691
|
-
const classes = (0,
|
|
3774
|
+
const classes = (0, import_dedupe41.default)(
|
|
3692
3775
|
"mobius",
|
|
3693
3776
|
"mobius-segment",
|
|
3694
3777
|
colour,
|
|
3695
3778
|
{ inverted },
|
|
3696
3779
|
className
|
|
3697
3780
|
);
|
|
3698
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: classes, ...rest, children: [
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: classes, ...rest, children: [
|
|
3699
3782
|
heading && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
3700
3783
|
children
|
|
3701
3784
|
] });
|
|
@@ -3714,14 +3797,14 @@ var init_Segment2 = __esm({
|
|
|
3714
3797
|
});
|
|
3715
3798
|
|
|
3716
3799
|
// src/components/Select/Select.tsx
|
|
3717
|
-
var import_icons11,
|
|
3800
|
+
var import_icons11, import_dedupe42, import_react34, import_Select, import_jsx_runtime51, Select;
|
|
3718
3801
|
var init_Select = __esm({
|
|
3719
3802
|
"src/components/Select/Select.tsx"() {
|
|
3720
3803
|
"use strict";
|
|
3721
3804
|
"use client";
|
|
3722
3805
|
import_icons11 = require("@simplybusiness/icons");
|
|
3723
|
-
|
|
3724
|
-
|
|
3806
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
3807
|
+
import_react34 = require("react");
|
|
3725
3808
|
init_hooks();
|
|
3726
3809
|
init_useLabel2();
|
|
3727
3810
|
init_spaceDelimitedList();
|
|
@@ -3751,24 +3834,24 @@ var init_Select = __esm({
|
|
|
3751
3834
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
3752
3835
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
3753
3836
|
};
|
|
3754
|
-
const sharedClasses = (0,
|
|
3755
|
-
const wrapperClasses = (0,
|
|
3837
|
+
const sharedClasses = (0, import_dedupe42.default)(validationClasses, stateClasses);
|
|
3838
|
+
const wrapperClasses = (0, import_dedupe42.default)(
|
|
3756
3839
|
"mobius-select__wrapper",
|
|
3757
3840
|
sharedClasses,
|
|
3758
3841
|
otherProps.className
|
|
3759
3842
|
);
|
|
3760
|
-
const selectClasses = (0,
|
|
3843
|
+
const selectClasses = (0, import_dedupe42.default)(
|
|
3761
3844
|
"mobius-select",
|
|
3762
3845
|
sharedClasses,
|
|
3763
3846
|
otherProps.className
|
|
3764
3847
|
);
|
|
3765
|
-
const labelClasses = (0,
|
|
3848
|
+
const labelClasses = (0, import_dedupe42.default)(
|
|
3766
3849
|
"mobius-label",
|
|
3767
3850
|
sharedClasses,
|
|
3768
3851
|
otherProps.className
|
|
3769
3852
|
);
|
|
3770
|
-
const iconClasses = (0,
|
|
3771
|
-
const errorMessageId = (0,
|
|
3853
|
+
const iconClasses = (0, import_dedupe42.default)("mobius-select__icon", sharedClasses);
|
|
3854
|
+
const errorMessageId = (0, import_react34.useId)();
|
|
3772
3855
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3773
3856
|
const describedBy = spaceDelimitedList([
|
|
3774
3857
|
shouldErrorMessageShow,
|
|
@@ -3816,13 +3899,13 @@ var init_Select2 = __esm({
|
|
|
3816
3899
|
});
|
|
3817
3900
|
|
|
3818
3901
|
// src/components/Slider/Slider.tsx
|
|
3819
|
-
var
|
|
3902
|
+
var import_dedupe43, import_react35, import_Slider, import_jsx_runtime52;
|
|
3820
3903
|
var init_Slider = __esm({
|
|
3821
3904
|
"src/components/Slider/Slider.tsx"() {
|
|
3822
3905
|
"use strict";
|
|
3823
3906
|
"use client";
|
|
3824
|
-
|
|
3825
|
-
|
|
3907
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
3908
|
+
import_react35 = require("react");
|
|
3826
3909
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
3827
3910
|
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3828
3911
|
}
|
|
@@ -3837,17 +3920,17 @@ var init_Slider2 = __esm({
|
|
|
3837
3920
|
});
|
|
3838
3921
|
|
|
3839
3922
|
// src/components/SVG/SVG.tsx
|
|
3840
|
-
var
|
|
3923
|
+
var import_react36, import_dedupe44, import_jsx_runtime53, SVG;
|
|
3841
3924
|
var init_SVG = __esm({
|
|
3842
3925
|
"src/components/SVG/SVG.tsx"() {
|
|
3843
3926
|
"use strict";
|
|
3844
|
-
|
|
3845
|
-
|
|
3927
|
+
import_react36 = require("react");
|
|
3928
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
3846
3929
|
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3847
3930
|
SVG = ({ ref, ...props }) => {
|
|
3848
3931
|
const { children, className, ...otherProps } = props;
|
|
3849
|
-
const classes = (0,
|
|
3850
|
-
const svgNode =
|
|
3932
|
+
const classes = (0, import_dedupe44.default)("mobius", "mobius-svg", className);
|
|
3933
|
+
const svgNode = import_react36.Children.only(children);
|
|
3851
3934
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
3852
3935
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3853
3936
|
"svg",
|
|
@@ -3874,13 +3957,13 @@ var init_SVG2 = __esm({
|
|
|
3874
3957
|
});
|
|
3875
3958
|
|
|
3876
3959
|
// src/components/Switch/Switch.tsx
|
|
3877
|
-
var
|
|
3960
|
+
var import_react37, import_dedupe45, import_Switch, import_jsx_runtime54, Switch;
|
|
3878
3961
|
var init_Switch = __esm({
|
|
3879
3962
|
"src/components/Switch/Switch.tsx"() {
|
|
3880
3963
|
"use strict";
|
|
3881
3964
|
"use client";
|
|
3882
|
-
|
|
3883
|
-
|
|
3965
|
+
import_react37 = require("react");
|
|
3966
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
3884
3967
|
init_VisuallyHidden2();
|
|
3885
3968
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
3886
3969
|
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
@@ -3892,11 +3975,11 @@ var init_Switch = __esm({
|
|
|
3892
3975
|
isDisabled = false,
|
|
3893
3976
|
...otherProps
|
|
3894
3977
|
} = props;
|
|
3895
|
-
const [enabled, setEnabled] = (0,
|
|
3896
|
-
(0,
|
|
3978
|
+
const [enabled, setEnabled] = (0, import_react37.useState)(checked);
|
|
3979
|
+
(0, import_react37.useEffect)(() => {
|
|
3897
3980
|
setEnabled(checked);
|
|
3898
3981
|
}, [checked]);
|
|
3899
|
-
const classes = (0,
|
|
3982
|
+
const classes = (0, import_dedupe45.default)(
|
|
3900
3983
|
"mobius",
|
|
3901
3984
|
"mobius-switch",
|
|
3902
3985
|
{
|
|
@@ -3940,15 +4023,15 @@ var init_Switch2 = __esm({
|
|
|
3940
4023
|
});
|
|
3941
4024
|
|
|
3942
4025
|
// src/components/Table/Table.tsx
|
|
3943
|
-
var
|
|
4026
|
+
var import_dedupe46, import_Table, import_jsx_runtime55, Table;
|
|
3944
4027
|
var init_Table = __esm({
|
|
3945
4028
|
"src/components/Table/Table.tsx"() {
|
|
3946
4029
|
"use strict";
|
|
3947
|
-
|
|
4030
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
3948
4031
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
3949
4032
|
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3950
4033
|
Table = ({ ref, ...props }) => {
|
|
3951
|
-
const classes = (0,
|
|
4034
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-table", props.className);
|
|
3952
4035
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("table", { ref, ...props, className: classes });
|
|
3953
4036
|
};
|
|
3954
4037
|
Table.displayName = "Table";
|
|
@@ -3956,14 +4039,14 @@ var init_Table = __esm({
|
|
|
3956
4039
|
});
|
|
3957
4040
|
|
|
3958
4041
|
// src/components/Table/Head.tsx
|
|
3959
|
-
var
|
|
4042
|
+
var import_dedupe47, import_jsx_runtime56, Head;
|
|
3960
4043
|
var init_Head = __esm({
|
|
3961
4044
|
"src/components/Table/Head.tsx"() {
|
|
3962
4045
|
"use strict";
|
|
3963
|
-
|
|
4046
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
3964
4047
|
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3965
4048
|
Head = ({ ref, ...props }) => {
|
|
3966
|
-
const classes = (0,
|
|
4049
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table__head", props.className);
|
|
3967
4050
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("thead", { ref, ...props, className: classes });
|
|
3968
4051
|
};
|
|
3969
4052
|
Head.displayName = "Table.Head";
|
|
@@ -3971,14 +4054,14 @@ var init_Head = __esm({
|
|
|
3971
4054
|
});
|
|
3972
4055
|
|
|
3973
4056
|
// src/components/Table/Body.tsx
|
|
3974
|
-
var
|
|
4057
|
+
var import_dedupe48, import_jsx_runtime57, Body;
|
|
3975
4058
|
var init_Body = __esm({
|
|
3976
4059
|
"src/components/Table/Body.tsx"() {
|
|
3977
4060
|
"use strict";
|
|
3978
|
-
|
|
4061
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
3979
4062
|
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3980
4063
|
Body = ({ ref, ...props }) => {
|
|
3981
|
-
const classes = (0,
|
|
4064
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__body", props.className);
|
|
3982
4065
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("tbody", { ref, ...props, className: classes });
|
|
3983
4066
|
};
|
|
3984
4067
|
Body.displayName = "Table.Body";
|
|
@@ -3986,14 +4069,14 @@ var init_Body = __esm({
|
|
|
3986
4069
|
});
|
|
3987
4070
|
|
|
3988
4071
|
// src/components/Table/Foot.tsx
|
|
3989
|
-
var
|
|
4072
|
+
var import_dedupe49, import_jsx_runtime58, Foot;
|
|
3990
4073
|
var init_Foot = __esm({
|
|
3991
4074
|
"src/components/Table/Foot.tsx"() {
|
|
3992
4075
|
"use strict";
|
|
3993
|
-
|
|
4076
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
3994
4077
|
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3995
4078
|
Foot = ({ ref, ...props }) => {
|
|
3996
|
-
const classes = (0,
|
|
4079
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__foot", props.className);
|
|
3997
4080
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tfoot", { ref, ...props, className: classes });
|
|
3998
4081
|
};
|
|
3999
4082
|
Foot.displayName = "Table.Foot";
|
|
@@ -4001,14 +4084,14 @@ var init_Foot = __esm({
|
|
|
4001
4084
|
});
|
|
4002
4085
|
|
|
4003
4086
|
// src/components/Table/Row.tsx
|
|
4004
|
-
var
|
|
4087
|
+
var import_dedupe50, import_jsx_runtime59, Row;
|
|
4005
4088
|
var init_Row = __esm({
|
|
4006
4089
|
"src/components/Table/Row.tsx"() {
|
|
4007
4090
|
"use strict";
|
|
4008
|
-
|
|
4091
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4009
4092
|
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4010
4093
|
Row = ({ ref, ...props }) => {
|
|
4011
|
-
const classes = (0,
|
|
4094
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__row", props.className);
|
|
4012
4095
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tr", { ref, ...props, className: classes });
|
|
4013
4096
|
};
|
|
4014
4097
|
Row.displayName = "Table.Row";
|
|
@@ -4016,33 +4099,33 @@ var init_Row = __esm({
|
|
|
4016
4099
|
});
|
|
4017
4100
|
|
|
4018
4101
|
// src/components/Table/HeaderCell.tsx
|
|
4019
|
-
var
|
|
4102
|
+
var import_dedupe51, import_jsx_runtime60, HeaderCell;
|
|
4020
4103
|
var init_HeaderCell = __esm({
|
|
4021
4104
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4022
4105
|
"use strict";
|
|
4023
|
-
|
|
4106
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4024
4107
|
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4025
|
-
HeaderCell = ({ ref, ...props }) => {
|
|
4026
|
-
const classes = (0,
|
|
4108
|
+
HeaderCell = ({ ref, scope = "col", ...props }) => {
|
|
4109
|
+
const classes = (0, import_dedupe51.default)(
|
|
4027
4110
|
"mobius",
|
|
4028
4111
|
"mobius-table__head-cell",
|
|
4029
4112
|
props.className
|
|
4030
4113
|
);
|
|
4031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("th", { ...props, ref, className: classes });
|
|
4114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("th", { ...props, ref, scope, className: classes });
|
|
4032
4115
|
};
|
|
4033
4116
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4034
4117
|
}
|
|
4035
4118
|
});
|
|
4036
4119
|
|
|
4037
4120
|
// src/components/Table/Cell.tsx
|
|
4038
|
-
var
|
|
4121
|
+
var import_dedupe52, import_jsx_runtime61, Cell;
|
|
4039
4122
|
var init_Cell = __esm({
|
|
4040
4123
|
"src/components/Table/Cell.tsx"() {
|
|
4041
4124
|
"use strict";
|
|
4042
|
-
|
|
4125
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4043
4126
|
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4044
4127
|
Cell = ({ ref, ...props }) => {
|
|
4045
|
-
const classes = (0,
|
|
4128
|
+
const classes = (0, import_dedupe52.default)(
|
|
4046
4129
|
"mobius",
|
|
4047
4130
|
"mobius-table__body-cell",
|
|
4048
4131
|
props.className
|
|
@@ -4086,15 +4169,15 @@ var init_Text2 = __esm({
|
|
|
4086
4169
|
});
|
|
4087
4170
|
|
|
4088
4171
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4089
|
-
var
|
|
4172
|
+
var import_dedupe53, import_jsx_runtime62, TextAreaInput;
|
|
4090
4173
|
var init_TextAreaInput = __esm({
|
|
4091
4174
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4092
4175
|
"use strict";
|
|
4093
|
-
|
|
4176
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4094
4177
|
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4095
4178
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4096
4179
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4097
|
-
const classes = (0,
|
|
4180
|
+
const classes = (0, import_dedupe53.default)(
|
|
4098
4181
|
"mobius",
|
|
4099
4182
|
"mobius-text-area__input",
|
|
4100
4183
|
{
|
|
@@ -4128,12 +4211,12 @@ var init_TextAreaInput2 = __esm({
|
|
|
4128
4211
|
});
|
|
4129
4212
|
|
|
4130
4213
|
// src/components/TextArea/TextArea.tsx
|
|
4131
|
-
var
|
|
4214
|
+
var import_dedupe54, import_TextArea, import_jsx_runtime63, TextArea;
|
|
4132
4215
|
var init_TextArea = __esm({
|
|
4133
4216
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4134
4217
|
"use strict";
|
|
4135
4218
|
"use client";
|
|
4136
|
-
|
|
4219
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4137
4220
|
init_hooks();
|
|
4138
4221
|
init_ErrorMessage2();
|
|
4139
4222
|
init_Label2();
|
|
@@ -4151,10 +4234,10 @@ var init_TextArea = __esm({
|
|
|
4151
4234
|
...otherProps
|
|
4152
4235
|
} = props;
|
|
4153
4236
|
const { inputProps, labelProps, errorMessageProps } = useTextField(props);
|
|
4154
|
-
const classes = (0,
|
|
4237
|
+
const classes = (0, import_dedupe54.default)("mobius", "mobius-text-area", className);
|
|
4155
4238
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
4156
|
-
const inputClasses = (0,
|
|
4157
|
-
const labelClasses = (0,
|
|
4239
|
+
const inputClasses = (0, import_dedupe54.default)("mobius-text-area__input", validationClasses);
|
|
4240
|
+
const labelClasses = (0, import_dedupe54.default)(
|
|
4158
4241
|
{
|
|
4159
4242
|
"--is-disabled": isDisabled
|
|
4160
4243
|
},
|
|
@@ -4189,11 +4272,11 @@ var init_TextArea2 = __esm({
|
|
|
4189
4272
|
});
|
|
4190
4273
|
|
|
4191
4274
|
// src/components/Title/Title.tsx
|
|
4192
|
-
var
|
|
4275
|
+
var import_dedupe55, import_Title, import_jsx_runtime64, Title;
|
|
4193
4276
|
var init_Title = __esm({
|
|
4194
4277
|
"src/components/Title/Title.tsx"() {
|
|
4195
4278
|
"use strict";
|
|
4196
|
-
|
|
4279
|
+
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4197
4280
|
init_Flex2();
|
|
4198
4281
|
import_Title = require("@simplybusiness/mobius/src/components/Title/Title.css");
|
|
4199
4282
|
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
@@ -4204,10 +4287,10 @@ var init_Title = __esm({
|
|
|
4204
4287
|
description,
|
|
4205
4288
|
...otherProps
|
|
4206
4289
|
} = props;
|
|
4207
|
-
const classes = (0,
|
|
4208
|
-
const headerClasses = (0,
|
|
4209
|
-
const contentClasses = (0,
|
|
4210
|
-
const containerClasses = (0,
|
|
4290
|
+
const classes = (0, import_dedupe55.default)("mobius", "mobius-title", otherProps.className);
|
|
4291
|
+
const headerClasses = (0, import_dedupe55.default)("mobius", "mobius-title__header");
|
|
4292
|
+
const contentClasses = (0, import_dedupe55.default)("mobius", "mobius-title__description");
|
|
4293
|
+
const containerClasses = (0, import_dedupe55.default)("mobius", "mobius-title__container");
|
|
4211
4294
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Element, { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Flex, { flexDirection: "column", className: containerClasses, children: [
|
|
4212
4295
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: headerClasses, children: title }),
|
|
4213
4296
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: contentClasses, children: description })
|
|
@@ -4233,12 +4316,12 @@ var init_Toast = __esm({
|
|
|
4233
4316
|
});
|
|
4234
4317
|
|
|
4235
4318
|
// src/components/Trust/Trust.tsx
|
|
4236
|
-
var
|
|
4319
|
+
var import_dedupe56, import_react38, import_jsx_runtime65;
|
|
4237
4320
|
var init_Trust = __esm({
|
|
4238
4321
|
"src/components/Trust/Trust.tsx"() {
|
|
4239
4322
|
"use strict";
|
|
4240
|
-
|
|
4241
|
-
|
|
4323
|
+
import_dedupe56 = __toESM(require("classnames/dedupe"));
|
|
4324
|
+
import_react38 = require("react");
|
|
4242
4325
|
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4243
4326
|
}
|
|
4244
4327
|
});
|
|
@@ -4260,13 +4343,13 @@ var init_Trust2 = __esm({
|
|
|
4260
4343
|
});
|
|
4261
4344
|
|
|
4262
4345
|
// src/components/ExpandableText/ExpandableText.tsx
|
|
4263
|
-
var
|
|
4346
|
+
var import_dedupe57, import_react39, import_ExpandableText, import_jsx_runtime66, ExpandableText;
|
|
4264
4347
|
var init_ExpandableText = __esm({
|
|
4265
4348
|
"src/components/ExpandableText/ExpandableText.tsx"() {
|
|
4266
4349
|
"use strict";
|
|
4267
4350
|
"use client";
|
|
4268
|
-
|
|
4269
|
-
|
|
4351
|
+
import_dedupe57 = __toESM(require("classnames/dedupe"));
|
|
4352
|
+
import_react39 = require("react");
|
|
4270
4353
|
init_src();
|
|
4271
4354
|
import_ExpandableText = require("@simplybusiness/mobius/src/components/ExpandableText/ExpandableText.css");
|
|
4272
4355
|
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
@@ -4283,14 +4366,14 @@ var init_ExpandableText = __esm({
|
|
|
4283
4366
|
onToggle,
|
|
4284
4367
|
...otherProps
|
|
4285
4368
|
} = props;
|
|
4286
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
4287
|
-
const [isCollapsed, setIsCollapsed] = (0,
|
|
4288
|
-
const textRef = (0,
|
|
4369
|
+
const [isExpanded, setIsExpanded] = (0, import_react39.useState)(false);
|
|
4370
|
+
const [isCollapsed, setIsCollapsed] = (0, import_react39.useState)(false);
|
|
4371
|
+
const textRef = (0, import_react39.useRef)(null);
|
|
4289
4372
|
const { down } = useBreakpoint();
|
|
4290
|
-
const baseId = (0,
|
|
4373
|
+
const baseId = (0, import_react39.useId)();
|
|
4291
4374
|
const expandButtonId = `expandable-text-expand-${baseId}`;
|
|
4292
4375
|
const shouldCollapse = breakpoint ? down(breakpoint) : true;
|
|
4293
|
-
(0,
|
|
4376
|
+
(0, import_react39.useEffect)(() => {
|
|
4294
4377
|
if (!shouldCollapse || !textRef.current) {
|
|
4295
4378
|
setIsCollapsed(false);
|
|
4296
4379
|
return;
|
|
@@ -4306,8 +4389,8 @@ var init_ExpandableText = __esm({
|
|
|
4306
4389
|
setIsExpanded(expanded);
|
|
4307
4390
|
onToggle?.(expanded);
|
|
4308
4391
|
};
|
|
4309
|
-
const classes = (0,
|
|
4310
|
-
const textContainerClasses = (0,
|
|
4392
|
+
const classes = (0, import_dedupe57.default)("mobius-expandable-text", className);
|
|
4393
|
+
const textContainerClasses = (0, import_dedupe57.default)("mobius-expandable-text__content", {
|
|
4311
4394
|
"mobius-expandable-text__content--collapsed": !isExpanded
|
|
4312
4395
|
});
|
|
4313
4396
|
const textContainerStyle = {
|
|
@@ -4367,17 +4450,17 @@ var MaskedField_exports = {};
|
|
|
4367
4450
|
__export(MaskedField_exports, {
|
|
4368
4451
|
MaskedField: () => MaskedField
|
|
4369
4452
|
});
|
|
4370
|
-
var
|
|
4453
|
+
var import_react40, import_react_imask, import_jsx_runtime67, useAcceptHandler, useCombinedRef, useBlurHandler, ControlledMaskedField, UncontrolledMaskedField, MaskedField;
|
|
4371
4454
|
var init_MaskedField = __esm({
|
|
4372
4455
|
"src/components/MaskedField/MaskedField.tsx"() {
|
|
4373
4456
|
"use strict";
|
|
4374
4457
|
"use client";
|
|
4375
|
-
|
|
4458
|
+
import_react40 = require("react");
|
|
4376
4459
|
import_react_imask = require("react-imask");
|
|
4377
4460
|
init_TextField2();
|
|
4378
4461
|
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4379
4462
|
useAcceptHandler = (onChange, useMaskedValue, name) => {
|
|
4380
|
-
return (0,
|
|
4463
|
+
return (0, import_react40.useCallback)(
|
|
4381
4464
|
(maskedValue, maskInstance) => {
|
|
4382
4465
|
if (!onChange) {
|
|
4383
4466
|
return;
|
|
@@ -4393,7 +4476,7 @@ var init_MaskedField = __esm({
|
|
|
4393
4476
|
);
|
|
4394
4477
|
};
|
|
4395
4478
|
useCombinedRef = (imaskRef, forwardedRef) => {
|
|
4396
|
-
return (0,
|
|
4479
|
+
return (0, import_react40.useCallback)(
|
|
4397
4480
|
(element) => {
|
|
4398
4481
|
imaskRef.current = element;
|
|
4399
4482
|
if (typeof forwardedRef === "function") {
|
|
@@ -4406,7 +4489,7 @@ var init_MaskedField = __esm({
|
|
|
4406
4489
|
);
|
|
4407
4490
|
};
|
|
4408
4491
|
useBlurHandler = (onBlur, maskRef, useMaskedValue, name) => {
|
|
4409
|
-
return (0,
|
|
4492
|
+
return (0, import_react40.useCallback)(
|
|
4410
4493
|
(event) => {
|
|
4411
4494
|
if (!onBlur || !maskRef.current) {
|
|
4412
4495
|
return;
|
|
@@ -4436,7 +4519,7 @@ var init_MaskedField = __esm({
|
|
|
4436
4519
|
const { ref: imaskRef, maskRef, setValue } = (0, import_react_imask.useIMask)(mask, { onAccept });
|
|
4437
4520
|
const combinedRef = useCombinedRef(imaskRef, forwardedRef);
|
|
4438
4521
|
const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);
|
|
4439
|
-
(0,
|
|
4522
|
+
(0, import_react40.useEffect)(() => {
|
|
4440
4523
|
if (!maskRef.current) {
|
|
4441
4524
|
return;
|
|
4442
4525
|
}
|
|
@@ -4657,12 +4740,12 @@ var init_src = __esm({
|
|
|
4657
4740
|
});
|
|
4658
4741
|
|
|
4659
4742
|
// src/components/ErrorMessage/ErrorMessage.tsx
|
|
4660
|
-
var import_icons12,
|
|
4743
|
+
var import_icons12, import_dedupe58, import_ErrorMessage7, import_jsx_runtime69, ErrorMessage;
|
|
4661
4744
|
var init_ErrorMessage = __esm({
|
|
4662
4745
|
"src/components/ErrorMessage/ErrorMessage.tsx"() {
|
|
4663
4746
|
"use strict";
|
|
4664
4747
|
import_icons12 = require("@simplybusiness/icons");
|
|
4665
|
-
|
|
4748
|
+
import_dedupe58 = __toESM(require("classnames/dedupe"));
|
|
4666
4749
|
init_src();
|
|
4667
4750
|
init_Icon2();
|
|
4668
4751
|
import_ErrorMessage7 = require("@simplybusiness/mobius/src/components/ErrorMessage/ErrorMessage.css");
|
|
@@ -4672,7 +4755,7 @@ var init_ErrorMessage = __esm({
|
|
|
4672
4755
|
errorMessage,
|
|
4673
4756
|
className
|
|
4674
4757
|
}) => {
|
|
4675
|
-
const classes = (0,
|
|
4758
|
+
const classes = (0, import_dedupe58.default)("mobius", "mobius-error-message", className);
|
|
4676
4759
|
if (!errorMessage) return null;
|
|
4677
4760
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { id, className: classes, "data-testid": "ErrorMessage", role: "alert", children: [
|
|
4678
4761
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
@@ -4706,16 +4789,16 @@ var init_ErrorMessage2 = __esm({
|
|
|
4706
4789
|
});
|
|
4707
4790
|
|
|
4708
4791
|
// src/components/TextField/adornmentWithClassName.ts
|
|
4709
|
-
var
|
|
4792
|
+
var import_dedupe59, import_react41, adornmentWithClassName;
|
|
4710
4793
|
var init_adornmentWithClassName = __esm({
|
|
4711
4794
|
"src/components/TextField/adornmentWithClassName.ts"() {
|
|
4712
4795
|
"use strict";
|
|
4713
|
-
|
|
4714
|
-
|
|
4796
|
+
import_dedupe59 = __toESM(require("classnames/dedupe"));
|
|
4797
|
+
import_react41 = require("react");
|
|
4715
4798
|
adornmentWithClassName = (component, validationClasses, className) => {
|
|
4716
4799
|
if (!component) return null;
|
|
4717
|
-
return (0,
|
|
4718
|
-
className: (0,
|
|
4800
|
+
return (0, import_react41.cloneElement)(component, {
|
|
4801
|
+
className: (0, import_dedupe59.default)(
|
|
4719
4802
|
component.props.className,
|
|
4720
4803
|
validationClasses,
|
|
4721
4804
|
className
|
|
@@ -4726,12 +4809,12 @@ var init_adornmentWithClassName = __esm({
|
|
|
4726
4809
|
});
|
|
4727
4810
|
|
|
4728
4811
|
// src/components/TextField/TextField.tsx
|
|
4729
|
-
var
|
|
4812
|
+
var import_dedupe60, import_TextField6, import_jsx_runtime70, TextField;
|
|
4730
4813
|
var init_TextField = __esm({
|
|
4731
4814
|
"src/components/TextField/TextField.tsx"() {
|
|
4732
4815
|
"use strict";
|
|
4733
4816
|
"use client";
|
|
4734
|
-
|
|
4817
|
+
import_dedupe60 = __toESM(require("classnames/dedupe"));
|
|
4735
4818
|
init_hooks();
|
|
4736
4819
|
init_ErrorMessage2();
|
|
4737
4820
|
init_Label2();
|
|
@@ -4772,24 +4855,24 @@ var init_TextField = __esm({
|
|
|
4772
4855
|
"--is-hidden": hidden,
|
|
4773
4856
|
[className || ""]: true
|
|
4774
4857
|
};
|
|
4775
|
-
const sharedClasses = (0,
|
|
4776
|
-
const labelClasses = (0,
|
|
4858
|
+
const sharedClasses = (0, import_dedupe60.default)(validationClasses, textfieldClasses);
|
|
4859
|
+
const labelClasses = (0, import_dedupe60.default)(
|
|
4777
4860
|
{
|
|
4778
4861
|
"--is-disabled": isDisabled
|
|
4779
4862
|
},
|
|
4780
4863
|
validationClasses
|
|
4781
4864
|
);
|
|
4782
|
-
const containerClasses = (0,
|
|
4865
|
+
const containerClasses = (0, import_dedupe60.default)(
|
|
4783
4866
|
"mobius",
|
|
4784
4867
|
"mobius-text-field",
|
|
4785
4868
|
sharedClasses
|
|
4786
4869
|
);
|
|
4787
|
-
const inputClasses = (0,
|
|
4870
|
+
const inputClasses = (0, import_dedupe60.default)(
|
|
4788
4871
|
"mobius",
|
|
4789
4872
|
"mobius-text-field__input",
|
|
4790
4873
|
sharedClasses
|
|
4791
4874
|
);
|
|
4792
|
-
const inputWrapperClasses = (0,
|
|
4875
|
+
const inputWrapperClasses = (0, import_dedupe60.default)(
|
|
4793
4876
|
"mobius-text-field__input-wrapper",
|
|
4794
4877
|
sharedClasses
|
|
4795
4878
|
);
|
|
@@ -4874,12 +4957,12 @@ var init_utils2 = __esm({
|
|
|
4874
4957
|
});
|
|
4875
4958
|
|
|
4876
4959
|
// src/components/Combobox/Option.tsx
|
|
4877
|
-
var
|
|
4960
|
+
var import_react42, import_dedupe61, import_jsx_runtime71, Option2;
|
|
4878
4961
|
var init_Option3 = __esm({
|
|
4879
4962
|
"src/components/Combobox/Option.tsx"() {
|
|
4880
4963
|
"use strict";
|
|
4881
|
-
|
|
4882
|
-
|
|
4964
|
+
import_react42 = require("react");
|
|
4965
|
+
import_dedupe61 = __toESM(require("classnames/dedupe"));
|
|
4883
4966
|
init_utils2();
|
|
4884
4967
|
import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4885
4968
|
Option2 = ({
|
|
@@ -4890,13 +4973,13 @@ var init_Option3 = __esm({
|
|
|
4890
4973
|
optionTestIdPrefix,
|
|
4891
4974
|
id
|
|
4892
4975
|
}) => {
|
|
4893
|
-
const optionRef = (0,
|
|
4976
|
+
const optionRef = (0, import_react42.useRef)(null);
|
|
4894
4977
|
const optionValue = getOptionValue(option) || "";
|
|
4895
4978
|
const testId = buildOptionTestId(
|
|
4896
4979
|
optionTestIdPrefix || "combobox-option",
|
|
4897
4980
|
optionValue
|
|
4898
4981
|
);
|
|
4899
|
-
(0,
|
|
4982
|
+
(0, import_react42.useEffect)(() => {
|
|
4900
4983
|
if (isHighlighted && optionRef.current && optionRef.current.scrollIntoView) {
|
|
4901
4984
|
optionRef.current.scrollIntoView({ block: "nearest" });
|
|
4902
4985
|
}
|
|
@@ -4910,7 +4993,7 @@ var init_Option3 = __esm({
|
|
|
4910
4993
|
id,
|
|
4911
4994
|
"aria-selected": isHighlighted,
|
|
4912
4995
|
onMouseDown: () => onOptionSelect(option),
|
|
4913
|
-
className: (0,
|
|
4996
|
+
className: (0, import_dedupe61.default)("mobius-combobox__option", "has-pii", {
|
|
4914
4997
|
"mobius-combobox__option--is-highlighted": isHighlighted
|
|
4915
4998
|
}),
|
|
4916
4999
|
children: OptionComponent ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(OptionComponent, { option, isHighlighted }) : getOptionLabel(option)
|
|
@@ -4922,11 +5005,11 @@ var init_Option3 = __esm({
|
|
|
4922
5005
|
});
|
|
4923
5006
|
|
|
4924
5007
|
// src/components/Combobox/Listbox.tsx
|
|
4925
|
-
var
|
|
5008
|
+
var import_dedupe62, import_jsx_runtime72, getOptionKey, Listbox;
|
|
4926
5009
|
var init_Listbox = __esm({
|
|
4927
5010
|
"src/components/Combobox/Listbox.tsx"() {
|
|
4928
5011
|
"use strict";
|
|
4929
|
-
|
|
5012
|
+
import_dedupe62 = __toESM(require("classnames/dedupe"));
|
|
4930
5013
|
init_Option3();
|
|
4931
5014
|
init_utils2();
|
|
4932
5015
|
import_jsx_runtime72 = require("react/jsx-runtime");
|
|
@@ -4948,7 +5031,7 @@ var init_Listbox = __esm({
|
|
|
4948
5031
|
optionComponent,
|
|
4949
5032
|
optionTestIdPrefix
|
|
4950
5033
|
}) => {
|
|
4951
|
-
const classes = (0,
|
|
5034
|
+
const classes = (0, import_dedupe62.default)("mobius-combobox__list", {
|
|
4952
5035
|
"mobius-combobox__list--hidden": !isOpen
|
|
4953
5036
|
});
|
|
4954
5037
|
function getOptionId(option, groupIndex, index) {
|
|
@@ -5012,10 +5095,10 @@ var init_Listbox = __esm({
|
|
|
5012
5095
|
|
|
5013
5096
|
// src/components/Combobox/useComboboxHighlight.tsx
|
|
5014
5097
|
function useComboboxHighlight(options) {
|
|
5015
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
5098
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react43.useState)(
|
|
5016
5099
|
options && options.length ? 0 : -1
|
|
5017
5100
|
);
|
|
5018
|
-
const [highlightedGroupIndex, setHighlightedGroupIndex] = (0,
|
|
5101
|
+
const [highlightedGroupIndex, setHighlightedGroupIndex] = (0, import_react43.useState)(0);
|
|
5019
5102
|
function highlightNextOption() {
|
|
5020
5103
|
const isGroup = isOptionGroup(options);
|
|
5021
5104
|
if (!options) {
|
|
@@ -5091,11 +5174,11 @@ function useComboboxHighlight(options) {
|
|
|
5091
5174
|
clearHighlight
|
|
5092
5175
|
};
|
|
5093
5176
|
}
|
|
5094
|
-
var
|
|
5177
|
+
var import_react43;
|
|
5095
5178
|
var init_useComboboxHighlight = __esm({
|
|
5096
5179
|
"src/components/Combobox/useComboboxHighlight.tsx"() {
|
|
5097
5180
|
"use strict";
|
|
5098
|
-
|
|
5181
|
+
import_react43 = require("react");
|
|
5099
5182
|
init_utils2();
|
|
5100
5183
|
}
|
|
5101
5184
|
});
|
|
@@ -5110,19 +5193,19 @@ function useComboboxOptions({
|
|
|
5110
5193
|
skipNextDebounceRef,
|
|
5111
5194
|
onSearched
|
|
5112
5195
|
}) {
|
|
5113
|
-
const [filteredOptions, setFilteredOptions] = (0,
|
|
5196
|
+
const [filteredOptions, setFilteredOptions] = (0, import_react44.useState)(void 0);
|
|
5114
5197
|
const debouncedInputValue = (0, import_mobius_hooks5.useDebouncedValue)(
|
|
5115
5198
|
inputValue,
|
|
5116
5199
|
// Don't debounce synchronous options
|
|
5117
5200
|
options ? 0 : delay
|
|
5118
5201
|
);
|
|
5119
|
-
const [isLoading, setIsLoading] = (0,
|
|
5120
|
-
const [error3, setError] = (0,
|
|
5121
|
-
const asyncOptionsRef = (0,
|
|
5202
|
+
const [isLoading, setIsLoading] = (0, import_react44.useState)(false);
|
|
5203
|
+
const [error3, setError] = (0, import_react44.useState)(null);
|
|
5204
|
+
const asyncOptionsRef = (0, import_react44.useRef)(asyncOptions);
|
|
5122
5205
|
asyncOptionsRef.current = asyncOptions;
|
|
5123
|
-
const onSearchedRef = (0,
|
|
5206
|
+
const onSearchedRef = (0, import_react44.useRef)(onSearched);
|
|
5124
5207
|
onSearchedRef.current = onSearched;
|
|
5125
|
-
(0,
|
|
5208
|
+
(0, import_react44.useEffect)(() => {
|
|
5126
5209
|
const controller = new AbortController();
|
|
5127
5210
|
const { signal } = controller;
|
|
5128
5211
|
const fetchOptions = async () => {
|
|
@@ -5180,24 +5263,24 @@ function useComboboxOptions({
|
|
|
5180
5263
|
isError: error3 != null
|
|
5181
5264
|
};
|
|
5182
5265
|
}
|
|
5183
|
-
var import_mobius_hooks5,
|
|
5266
|
+
var import_mobius_hooks5, import_react44;
|
|
5184
5267
|
var init_useComboboxOptions = __esm({
|
|
5185
5268
|
"src/components/Combobox/useComboboxOptions.ts"() {
|
|
5186
5269
|
"use strict";
|
|
5187
5270
|
import_mobius_hooks5 = require("@simplybusiness/mobius-hooks");
|
|
5188
|
-
|
|
5271
|
+
import_react44 = require("react");
|
|
5189
5272
|
init_utils2();
|
|
5190
5273
|
}
|
|
5191
5274
|
});
|
|
5192
5275
|
|
|
5193
5276
|
// src/components/Combobox/Combobox.tsx
|
|
5194
|
-
var import_mobius_hooks6,
|
|
5277
|
+
var import_mobius_hooks6, import_dedupe63, import_react45, import_Combobox, import_jsx_runtime73, ComboboxInner, Combobox;
|
|
5195
5278
|
var init_Combobox = __esm({
|
|
5196
5279
|
"src/components/Combobox/Combobox.tsx"() {
|
|
5197
5280
|
"use strict";
|
|
5198
5281
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
5199
|
-
|
|
5200
|
-
|
|
5282
|
+
import_dedupe63 = __toESM(require("classnames/dedupe"));
|
|
5283
|
+
import_react45 = require("react");
|
|
5201
5284
|
init_hooks();
|
|
5202
5285
|
init_TextField2();
|
|
5203
5286
|
init_VisuallyHidden2();
|
|
@@ -5232,11 +5315,11 @@ var init_Combobox = __esm({
|
|
|
5232
5315
|
errorMessage,
|
|
5233
5316
|
...otherProps
|
|
5234
5317
|
} = props;
|
|
5235
|
-
const skipNextDebounceRef = (0,
|
|
5236
|
-
const fallbackRef = (0,
|
|
5237
|
-
const [inputValue, setInputValue] = (0,
|
|
5238
|
-
const [isOpen, setIsOpen] = (0,
|
|
5239
|
-
const [isChanging, setIsChanging] = (0,
|
|
5318
|
+
const skipNextDebounceRef = (0, import_react45.useRef)(false);
|
|
5319
|
+
const fallbackRef = (0, import_react45.useRef)(null);
|
|
5320
|
+
const [inputValue, setInputValue] = (0, import_react45.useState)(defaultValue || "");
|
|
5321
|
+
const [isOpen, setIsOpen] = (0, import_react45.useState)(false);
|
|
5322
|
+
const [isChanging, setIsChanging] = (0, import_react45.useState)(false);
|
|
5240
5323
|
const { filteredOptions, updateFilteredOptions, isLoading, error: error3 } = useComboboxOptions({
|
|
5241
5324
|
options,
|
|
5242
5325
|
asyncOptions,
|
|
@@ -5245,7 +5328,7 @@ var init_Combobox = __esm({
|
|
|
5245
5328
|
minSearchLength,
|
|
5246
5329
|
skipNextDebounceRef
|
|
5247
5330
|
});
|
|
5248
|
-
const [validationError, setValidationError] = (0,
|
|
5331
|
+
const [validationError, setValidationError] = (0, import_react45.useState)(
|
|
5249
5332
|
error3?.message || errorMessage
|
|
5250
5333
|
);
|
|
5251
5334
|
const {
|
|
@@ -5258,14 +5341,14 @@ var init_Combobox = __esm({
|
|
|
5258
5341
|
clearHighlight
|
|
5259
5342
|
} = useComboboxHighlight(filteredOptions);
|
|
5260
5343
|
const inputRef = ref || fallbackRef;
|
|
5261
|
-
const listboxId = (0,
|
|
5262
|
-
const statusId = (0,
|
|
5263
|
-
const blurTimeoutRef = (0,
|
|
5264
|
-
const userInteractedRef = (0,
|
|
5265
|
-
const justSelectedRef = (0,
|
|
5344
|
+
const listboxId = (0, import_react45.useId)();
|
|
5345
|
+
const statusId = (0, import_react45.useId)();
|
|
5346
|
+
const blurTimeoutRef = (0, import_react45.useRef)(null);
|
|
5347
|
+
const userInteractedRef = (0, import_react45.useRef)(false);
|
|
5348
|
+
const justSelectedRef = (0, import_react45.useRef)(false);
|
|
5266
5349
|
const { down } = useBreakpoint();
|
|
5267
5350
|
const isMobile = down("md");
|
|
5268
|
-
(0,
|
|
5351
|
+
(0, import_react45.useEffect)(() => {
|
|
5269
5352
|
setValidationError(error3?.message || errorMessage);
|
|
5270
5353
|
}, [error3, errorMessage]);
|
|
5271
5354
|
const getEmptyValue = () => {
|
|
@@ -5294,7 +5377,7 @@ var init_Combobox = __esm({
|
|
|
5294
5377
|
justSelectedRef.current = false;
|
|
5295
5378
|
}
|
|
5296
5379
|
};
|
|
5297
|
-
(0,
|
|
5380
|
+
(0, import_react45.useEffect)(() => {
|
|
5298
5381
|
if (!inputRef || typeof inputRef === "function") return;
|
|
5299
5382
|
const inputElement = inputRef.current;
|
|
5300
5383
|
if (!inputElement) return;
|
|
@@ -5447,17 +5530,17 @@ var init_Combobox = __esm({
|
|
|
5447
5530
|
default:
|
|
5448
5531
|
}
|
|
5449
5532
|
};
|
|
5450
|
-
(0,
|
|
5533
|
+
(0, import_react45.useEffect)(() => {
|
|
5451
5534
|
if (value) {
|
|
5452
5535
|
setInputValue(value);
|
|
5453
5536
|
}
|
|
5454
5537
|
}, [value]);
|
|
5455
|
-
(0,
|
|
5538
|
+
(0, import_react45.useEffect)(() => {
|
|
5456
5539
|
if (asyncOptions && isChanging) {
|
|
5457
5540
|
setIsOpen(!!filteredOptions && filteredOptions.length > 0);
|
|
5458
5541
|
}
|
|
5459
5542
|
}, [filteredOptions, asyncOptions, isChanging]);
|
|
5460
|
-
const classes = (0,
|
|
5543
|
+
const classes = (0, import_dedupe63.default)(
|
|
5461
5544
|
"mobius mobius-combobox",
|
|
5462
5545
|
{
|
|
5463
5546
|
"mobius-combobox--is-expanded": isOpen,
|
|
@@ -5581,11 +5664,11 @@ function optionsFromResponse({ Items }, addressLookupService) {
|
|
|
5581
5664
|
}
|
|
5582
5665
|
}));
|
|
5583
5666
|
}
|
|
5584
|
-
var import_icons13,
|
|
5667
|
+
var import_icons13, import_react46, import_jsx_runtime74, AddressLookup;
|
|
5585
5668
|
var init_AddressLookup2 = __esm({
|
|
5586
5669
|
"src/components/AddressLookup/AddressLookup.tsx"() {
|
|
5587
5670
|
import_icons13 = require("@simplybusiness/icons");
|
|
5588
|
-
|
|
5671
|
+
import_react46 = require("react");
|
|
5589
5672
|
init_Combobox2();
|
|
5590
5673
|
init_Icon2();
|
|
5591
5674
|
init_utils3();
|
|
@@ -5599,15 +5682,15 @@ var init_AddressLookup2 = __esm({
|
|
|
5599
5682
|
errorMessage,
|
|
5600
5683
|
...otherProps
|
|
5601
5684
|
}) => {
|
|
5602
|
-
const [error3, _setError] = (0,
|
|
5603
|
-
const setError = (0,
|
|
5685
|
+
const [error3, _setError] = (0, import_react46.useState)(null);
|
|
5686
|
+
const setError = (0, import_react46.useCallback)(
|
|
5604
5687
|
(newError) => {
|
|
5605
5688
|
if (newError != null) onError?.(newError);
|
|
5606
5689
|
_setError(newError);
|
|
5607
5690
|
},
|
|
5608
5691
|
[onError]
|
|
5609
5692
|
);
|
|
5610
|
-
const asyncOptions = (0,
|
|
5693
|
+
const asyncOptions = (0, import_react46.useCallback)(
|
|
5611
5694
|
async (searchTerm) => {
|
|
5612
5695
|
try {
|
|
5613
5696
|
const response = await addressLookupService.search(searchTerm);
|