@jobber/components 4.85.4-CJS-to-ESM.2 → 4.85.4
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/.eslintrc.js +10 -0
- package/AnimatedPresence.d.ts +1 -0
- package/AnimatedPresence.js +17 -0
- package/AnimatedSwitcher.d.ts +1 -0
- package/AnimatedSwitcher.js +17 -0
- package/Autocomplete.d.ts +1 -0
- package/Autocomplete.js +17 -0
- package/Avatar.d.ts +1 -0
- package/Avatar.js +17 -0
- package/Banner.d.ts +1 -0
- package/Banner.js +17 -0
- package/Button.d.ts +1 -0
- package/Button.js +17 -0
- package/ButtonDismiss.d.ts +1 -0
- package/ButtonDismiss.js +17 -0
- package/Card.d.ts +1 -0
- package/Card.js +17 -0
- package/Checkbox.d.ts +1 -0
- package/Checkbox.js +17 -0
- package/Chip.d.ts +1 -0
- package/Chip.js +17 -0
- package/Chips.d.ts +1 -0
- package/Chips.js +17 -0
- package/Combobox.d.ts +1 -0
- package/Combobox.js +17 -0
- package/ConfirmationModal.d.ts +1 -0
- package/ConfirmationModal.js +17 -0
- package/Content.d.ts +1 -0
- package/Content.js +17 -0
- package/Countdown.d.ts +1 -0
- package/Countdown.js +17 -0
- package/DataDump.d.ts +1 -0
- package/DataDump.js +17 -0
- package/DataList.d.ts +1 -0
- package/DataList.js +17 -0
- package/DataTable.d.ts +1 -0
- package/DataTable.js +17 -0
- package/DatePicker.d.ts +1 -0
- package/DatePicker.js +17 -0
- package/DescriptionList.d.ts +1 -0
- package/DescriptionList.js +17 -0
- package/Disclosure.d.ts +1 -0
- package/Disclosure.js +17 -0
- package/Divider.d.ts +1 -0
- package/Divider.js +17 -0
- package/Drawer.d.ts +1 -0
- package/Drawer.js +17 -0
- package/Emphasis.d.ts +1 -0
- package/Emphasis.js +17 -0
- package/FeatureSwitch.d.ts +1 -0
- package/FeatureSwitch.js +17 -0
- package/Flex.d.ts +1 -0
- package/Flex.js +17 -0
- package/Form.d.ts +1 -0
- package/Form.js +17 -0
- package/FormField.d.ts +1 -0
- package/FormField.js +17 -0
- package/FormatDate.d.ts +1 -0
- package/FormatDate.js +17 -0
- package/FormatEmail.d.ts +1 -0
- package/FormatEmail.js +17 -0
- package/FormatFile.d.ts +1 -0
- package/FormatFile.js +17 -0
- package/FormatRelativeDateTime.d.ts +1 -0
- package/FormatRelativeDateTime.js +17 -0
- package/FormatTime.d.ts +1 -0
- package/FormatTime.js +17 -0
- package/Gallery.d.ts +1 -0
- package/Gallery.js +17 -0
- package/Glimmer.d.ts +1 -0
- package/Glimmer.js +17 -0
- package/Grid.d.ts +1 -0
- package/Grid.js +17 -0
- package/Heading.d.ts +1 -0
- package/Heading.js +17 -0
- package/Icon.d.ts +1 -0
- package/Icon.js +17 -0
- package/InlineLabel.d.ts +1 -0
- package/InlineLabel.js +17 -0
- package/InputAvatar.d.ts +1 -0
- package/InputAvatar.js +17 -0
- package/InputDate.d.ts +1 -0
- package/InputDate.js +17 -0
- package/InputEmail.d.ts +1 -0
- package/InputEmail.js +17 -0
- package/InputFile.d.ts +1 -0
- package/InputFile.js +17 -0
- package/InputGroup.d.ts +1 -0
- package/InputGroup.js +17 -0
- package/InputNumber.d.ts +1 -0
- package/InputNumber.js +17 -0
- package/InputPassword.d.ts +1 -0
- package/InputPassword.js +17 -0
- package/InputPhoneNumber.d.ts +1 -0
- package/InputPhoneNumber.js +17 -0
- package/InputText.d.ts +1 -0
- package/InputText.js +17 -0
- package/InputTime.d.ts +1 -0
- package/InputTime.js +17 -0
- package/InputValidation.d.ts +1 -0
- package/InputValidation.js +17 -0
- package/LightBox.d.ts +1 -0
- package/LightBox.js +17 -0
- package/Link.d.ts +1 -0
- package/Link.js +17 -0
- package/List.d.ts +1 -0
- package/List.js +17 -0
- package/Markdown.d.ts +1 -0
- package/Markdown.js +17 -0
- package/Menu.d.ts +1 -0
- package/Menu.js +17 -0
- package/Modal.d.ts +1 -0
- package/Modal.js +17 -0
- package/MultiSelect.d.ts +1 -0
- package/MultiSelect.js +17 -0
- package/Page.d.ts +1 -0
- package/Page.js +17 -0
- package/Popover.d.ts +1 -0
- package/Popover.js +17 -0
- package/ProgressBar.d.ts +1 -0
- package/ProgressBar.js +17 -0
- package/RadioGroup.d.ts +1 -0
- package/RadioGroup.js +17 -0
- package/RecurringSelect.d.ts +1 -0
- package/RecurringSelect.js +17 -0
- package/Select.d.ts +1 -0
- package/Select.js +17 -0
- package/Spinner.d.ts +1 -0
- package/Spinner.js +17 -0
- package/StatusIndicator.d.ts +1 -0
- package/StatusIndicator.js +17 -0
- package/StatusLabel.d.ts +1 -0
- package/StatusLabel.js +17 -0
- package/Switch.d.ts +1 -0
- package/Switch.js +17 -0
- package/Table.d.ts +1 -0
- package/Table.js +17 -0
- package/Tabs.d.ts +1 -0
- package/Tabs.js +17 -0
- package/Text.d.ts +1 -0
- package/Text.js +17 -0
- package/Toast.d.ts +1 -0
- package/Toast.js +17 -0
- package/Tooltip.d.ts +1 -0
- package/Tooltip.js +17 -0
- package/Typography.d.ts +1 -0
- package/Typography.js +17 -0
- package/dist/{AnimatedPresence.cjs → AnimatedPresence/index.js} +1 -1
- package/dist/{AnimatedSwitcher.cjs → AnimatedSwitcher/index.js} +2 -2
- package/dist/{Autocomplete-b35c7ff5.js → Autocomplete/index.js} +20 -7
- package/dist/{Avatar.cjs → Avatar/index.js} +3 -3
- package/dist/{Avatar-cccf72b9.js → Avatar-76a799fa.js} +1 -1
- package/dist/Banner/index.js +110 -0
- package/dist/{Button.cjs → Button/index.js} +4 -4
- package/dist/Button-b73a5e01.js +57 -0
- package/dist/{ButtonDismiss.cjs → ButtonDismiss/index.js} +5 -5
- package/dist/{ButtonDismiss-d7417429.js → ButtonDismiss-350af163.js} +1 -1
- package/dist/Card/colors.css.d.ts +89 -0
- package/dist/{Card.cjs → Card/index.js} +8 -8
- package/dist/{Card-27375ded.js → Card-e3144022.js} +4 -4
- package/dist/Checkbox/index.js +18 -0
- package/dist/{Checkbox-b6e46d80.js → Checkbox-787e2e47.js} +2 -2
- package/dist/{ChipDismissible-a8ecc894.js → Chip/index.js} +18 -3
- package/dist/Chip-3d1bfddc.js +89 -0
- package/dist/{Chips-a8f4c9f2.js → Chips/index.js} +31 -12
- package/dist/{Combobox.cjs → Combobox/index.js} +15 -15
- package/dist/{Combobox-d8d28b1e.js → Combobox-a24c8241.js} +15 -15
- package/dist/ConfirmationModal/index.js +31 -0
- package/dist/{ConfirmationModal-09ec5d02.js → ConfirmationModal-52e16873.js} +3 -3
- package/dist/Content/Spacing.css.d.ts +13 -0
- package/dist/{Content.cjs → Content/index.js} +2 -2
- package/dist/{Content-60a3452a.js → Content-e3f7b6fc.js} +1 -1
- package/dist/{Countdown-961d8a6e.js → Countdown/index.js} +2 -0
- package/dist/{DataDump-f427abfe.js → DataDump/index.js} +19 -3
- package/dist/{DataList-4b0f9e5d.js → DataList/index.js} +48 -33
- package/dist/{DataTable-aab7f6b9.js → DataTable/index.js} +59 -10
- package/dist/{DatePicker.cjs → DatePicker/index.js} +5 -5
- package/dist/{DatePicker-c091c0d2.js → DatePicker-64c5ab1a.js} +3 -3
- package/dist/{DescriptionList-74db99a5.js → DescriptionList/index.js} +6 -3
- package/dist/Disclosure/index.js +46 -0
- package/dist/{Divider-1e6ac1ec.js → Divider/index.js} +4 -2
- package/dist/Drawer/index.js +49 -0
- package/dist/{Emphasis.cjs → Emphasis/index.js} +3 -3
- package/dist/{Emphasis-84de1f3f.js → Emphasis-bda56d3b.js} +1 -1
- package/dist/{FeatureSwitch-ddaebf27.js → FeatureSwitch/index.js} +17 -9
- package/dist/{Flex.cjs → Flex/index.js} +2 -2
- package/dist/{Flex-ddf28839.js → Flex-d490c4db.js} +1 -1
- package/dist/{Form-927647ef.js → Form/index.js} +3 -1
- package/dist/FormField/index.js +24 -0
- package/dist/{FormField-fc30bb1a.js → FormField-6ff183f8.js} +6 -6
- package/dist/{FormatDate.cjs → FormatDate/index.js} +1 -1
- package/dist/{FormatEmail-298393bb.js → FormatEmail/index.js} +3 -1
- package/dist/FormatFile/index.js +36 -0
- package/dist/{FormatFile-d57b8dfa.js → FormatFile-f036902d.js} +8 -8
- package/dist/{FormatRelativeDateTime-6336002d.js → FormatRelativeDateTime/index.js} +2 -0
- package/dist/{FormatTime-20538519.js → FormatTime/index.js} +2 -0
- package/dist/Gallery/Gallery.css.d.ts +9 -0
- package/dist/{Gallery-8d4d79a2.js → Gallery/index.js} +31 -5
- package/dist/{Glimmer.cjs → Glimmer/index.js} +4 -4
- package/dist/Glimmer/style/Shape.css.d.ts +9 -0
- package/dist/Glimmer/style/Sizes.css.d.ts +10 -0
- package/dist/Glimmer/style/Timing.css.d.ts +6 -0
- package/dist/{Glimmer-3fcdae65.js → Glimmer-84dee1ed.js} +4 -4
- package/dist/Grid/GridAlign.css.d.ts +8 -0
- package/dist/{Grid-cce44c9d.js → Grid/index.js} +5 -3
- package/dist/Heading/index.js +14 -0
- package/dist/{Heading-a8a24775.js → Heading-1e8e4bd3.js} +1 -1
- package/dist/{Icon.cjs → Icon/index.js} +1 -1
- package/dist/{InlineLabel.cjs → InlineLabel/index.js} +3 -3
- package/dist/InlineLabel-a6557829.js +28 -0
- package/dist/{InputAvatar-95c98620.js → InputAvatar/index.js} +21 -7
- package/dist/{InputDate-c5f19423.js → InputDate/index.js} +20 -2
- package/dist/{InputEmail-4efba03d.js → InputEmail/index.js} +17 -1
- package/dist/InputFile/index.js +25 -0
- package/dist/{InputFile-921c050e.js → InputFile-bb945071.js} +5 -5
- package/dist/{InputGroup.cjs → InputGroup/index.js} +2 -2
- package/dist/InputNumber/index.js +25 -0
- package/dist/{InputNumber-df9cb825.js → InputNumber-d451b52e.js} +1 -1
- package/dist/{InputPassword-08d2dfa1.js → InputPassword/index.js} +17 -1
- package/dist/{InputPhoneNumber-cbb2ca7d.js → InputPhoneNumber/index.js} +17 -4
- package/dist/InputText/index.js +26 -0
- package/dist/{InputText-125769fd.js → InputText-55b6cb65.js} +1 -1
- package/dist/{InputTime-3c4bdff0.js → InputTime/index.js} +17 -2
- package/dist/{InputValidation.cjs → InputValidation/index.js} +5 -5
- package/dist/{InputValidation-4a61254d.js → InputValidation-05e839fa.js} +2 -2
- package/dist/{LightBox.cjs → LightBox/index.js} +6 -6
- package/dist/{LightBox-3d6e74ba.js → LightBox-a89d8863.js} +3 -3
- package/dist/{Link-fd7301ec.js → Link/index.js} +2 -0
- package/dist/{List-821f249d.js → List/index.js} +16 -10
- package/dist/Markdown/index.js +19 -0
- package/dist/{Markdown-36854bd5.js → Markdown-f7c55304.js} +4 -4
- package/dist/{Menu.cjs → Menu/index.js} +5 -5
- package/dist/{Menu-5ce3cf41.js → Menu-083fc4c4.js} +3 -3
- package/dist/Modal/Sizes.css.d.ts +6 -0
- package/dist/{Modal.cjs → Modal/index.js} +8 -8
- package/dist/{Modal-cda55f02.js → Modal-c336cac6.js} +5 -5
- package/dist/{MultiSelect-707000e1.js → MultiSelect/index.js} +12 -6
- package/dist/{Option-73515eec.js → Option-3c4d377e.js} +1 -1
- package/dist/{Page-fdb087db.js → Page/index.js} +21 -9
- package/dist/Popover/index.js +61 -0
- package/dist/ProgressBar/Sizes.css.d.ts +7 -0
- package/dist/{ProgressBar.cjs → ProgressBar/index.js} +2 -2
- package/dist/{ProgressBar-4ee648b7.js → ProgressBar-b68edc8f.js} +1 -1
- package/dist/{RadioGroup.cjs → RadioGroup/index.js} +4 -4
- package/dist/{RadioGroup-68edd1e3.js → RadioGroup-17b67ade.js} +2 -2
- package/dist/{RecurringSelect-e391af31.js → RecurringSelect/index.js} +27 -14
- package/dist/Select/index.js +26 -0
- package/dist/{Spinner.cjs → Spinner/index.js} +2 -2
- package/dist/Spinner-9d8fc7ff.js +24 -0
- package/dist/{StatusIndicator.cjs → StatusIndicator/index.js} +2 -2
- package/dist/{StatusIndicator-0c680acb.js → StatusIndicator-b179d06e.js} +1 -1
- package/dist/{StatusLabel-5bf96fdb.js → StatusLabel/index.js} +7 -4
- package/dist/{Switch.cjs → Switch/index.js} +3 -3
- package/dist/Switch-7d4aa7c3.js +56 -0
- package/dist/{Body-22878526.js → Table/index.js} +5 -3
- package/dist/{Tabs-d6c8b965.js → Tabs/index.js} +5 -3
- package/dist/{Text.cjs → Text/index.js} +3 -3
- package/dist/{Text-714f7d14.js → Text-259af966.js} +1 -1
- package/dist/{showToast-63be1cf0.js → Toast/index.js} +10 -5
- package/dist/{Tooltip.cjs → Tooltip/index.js} +2 -2
- package/dist/{Tooltip-2e477150.js → Tooltip-ef3d6ef4.js} +1 -1
- package/dist/Typography/css/Emphasis.css.d.ts +6 -0
- package/dist/Typography/css/FontFamilies.css.d.ts +6 -0
- package/dist/Typography/css/FontSizes.css.d.ts +12 -0
- package/dist/Typography/css/FontWeights.css.d.ts +10 -0
- package/dist/Typography/css/TextAlignment.css.d.ts +7 -0
- package/dist/Typography/css/TextCases.css.d.ts +7 -0
- package/dist/Typography/css/TextColors.css.d.ts +22 -0
- package/dist/Typography/css/Truncate.css.d.ts +5 -0
- package/dist/Typography/css/Typography.css.d.ts +5 -0
- package/dist/{Typography.cjs → Typography/index.js} +2 -2
- package/dist/Typography-c45bf216.js +62 -0
- package/package.json +7 -15
- package/rollup.config.js +131 -0
- package/dist/AnimatedPresence-bbccdaf7.js +0 -98
- package/dist/AnimatedPresence.js +0 -4
- package/dist/AnimatedSwitcher-3aff3d12.js +0 -90
- package/dist/AnimatedSwitcher.js +0 -5
- package/dist/Autocomplete-dc7a4b9e.js +0 -188
- package/dist/Autocomplete.cjs +0 -33
- package/dist/Autocomplete.js +0 -25
- package/dist/Avatar-229083ec.js +0 -70
- package/dist/Avatar.js +0 -7
- package/dist/Banner-18d94700.js +0 -105
- package/dist/Banner-5475a9ea.js +0 -98
- package/dist/Banner.cjs +0 -20
- package/dist/Banner.js +0 -12
- package/dist/Body-4fbe21ac.js +0 -50
- package/dist/Button-30154871.js +0 -50
- package/dist/Button-ec64869e.js +0 -57
- package/dist/Button.js +0 -8
- package/dist/ButtonDismiss-a11eef74.js +0 -8
- package/dist/ButtonDismiss.js +0 -9
- package/dist/Card-35bd61ce.js +0 -86
- package/dist/Card.js +0 -16
- package/dist/Checkbox-a91b14f7.js +0 -56
- package/dist/Checkbox.cjs +0 -18
- package/dist/Checkbox.js +0 -10
- package/dist/Chip-01343f8b.js +0 -81
- package/dist/Chip-24613c57.js +0 -89
- package/dist/Chip.cjs +0 -27
- package/dist/Chip.js +0 -17
- package/dist/ChipDismissible-1f2754bd.js +0 -19
- package/dist/Chips-7c44a2f9.js +0 -494
- package/dist/Chips.cjs +0 -46
- package/dist/Chips.js +0 -37
- package/dist/Combobox-44f0ec2a.js +0 -468
- package/dist/Combobox.js +0 -31
- package/dist/ConfirmationModal-64f82a31.js +0 -94
- package/dist/ConfirmationModal.cjs +0 -31
- package/dist/ConfirmationModal.js +0 -23
- package/dist/Content-c96e9299.js +0 -18
- package/dist/Content.js +0 -4
- package/dist/Countdown-ac081ced.js +0 -63
- package/dist/Countdown.cjs +0 -12
- package/dist/Countdown.js +0 -4
- package/dist/DataDump-6fae2727.js +0 -15
- package/dist/DataDump.cjs +0 -27
- package/dist/DataDump.js +0 -19
- package/dist/DataList-18f2d692.js +0 -1310
- package/dist/DataList.cjs +0 -52
- package/dist/DataList.js +0 -44
- package/dist/DataTable-0f6649e0.js +0 -245
- package/dist/DataTable.cjs +0 -65
- package/dist/DataTable.js +0 -36
- package/dist/DatePicker-5d0c0353.js +0 -125
- package/dist/DatePicker.js +0 -12
- package/dist/DescriptionList-2cb975a9.js +0 -15
- package/dist/DescriptionList.cjs +0 -13
- package/dist/DescriptionList.js +0 -5
- package/dist/Disclosure-00a9459b.js +0 -36
- package/dist/Disclosure-56309ff3.js +0 -42
- package/dist/Disclosure.cjs +0 -16
- package/dist/Disclosure.js +0 -8
- package/dist/Divider-589745c1.js +0 -20
- package/dist/Divider.cjs +0 -12
- package/dist/Divider.js +0 -4
- package/dist/Drawer.cjs +0 -21
- package/dist/Drawer.js +0 -12
- package/dist/DrawerGrid-0861e529.js +0 -33
- package/dist/DrawerGrid-b233d837.js +0 -41
- package/dist/Emphasis-2a640962.js +0 -13
- package/dist/Emphasis.js +0 -5
- package/dist/FeatureSwitch-e33e30a9.js +0 -55
- package/dist/FeatureSwitch.cjs +0 -26
- package/dist/FeatureSwitch.js +0 -18
- package/dist/Flex-041db5c8.js +0 -31
- package/dist/Flex.js +0 -4
- package/dist/Form-6a161b07.js +0 -48
- package/dist/Form.cjs +0 -12
- package/dist/Form.js +0 -4
- package/dist/FormField-f1f405d2.js +0 -246
- package/dist/FormField.cjs +0 -24
- package/dist/FormField.js +0 -16
- package/dist/FormatDate-720b39cf.js +0 -27
- package/dist/FormatDate.js +0 -2
- package/dist/FormatEmail-04ee4085.js +0 -14
- package/dist/FormatEmail.cjs +0 -12
- package/dist/FormatEmail.js +0 -4
- package/dist/FormatFile-648aea3e.js +0 -154
- package/dist/FormatFile.cjs +0 -36
- package/dist/FormatFile.js +0 -28
- package/dist/FormatRelativeDateTime-529dc36b.js +0 -64
- package/dist/FormatRelativeDateTime.cjs +0 -10
- package/dist/FormatRelativeDateTime.js +0 -2
- package/dist/FormatTime-764fd3c8.js +0 -28
- package/dist/FormatTime.cjs +0 -10
- package/dist/FormatTime.js +0 -2
- package/dist/Gallery-7760f21f.js +0 -66
- package/dist/Gallery.cjs +0 -39
- package/dist/Gallery.js +0 -31
- package/dist/Glimmer-6bf75ae0.js +0 -69
- package/dist/Glimmer.js +0 -6
- package/dist/Grid-c28e226d.js +0 -66
- package/dist/Grid.cjs +0 -14
- package/dist/Grid.js +0 -5
- package/dist/Heading-dfd4f1cf.js +0 -49
- package/dist/Heading.cjs +0 -14
- package/dist/Heading.js +0 -6
- package/dist/Icon-22723fe6.js +0 -34
- package/dist/Icon.js +0 -3
- package/dist/InlineLabel-20f9095e.js +0 -21
- package/dist/InlineLabel-5144fa06.js +0 -28
- package/dist/InlineLabel.js +0 -5
- package/dist/InputAvatar-3a10bdb1.js +0 -50
- package/dist/InputAvatar.cjs +0 -28
- package/dist/InputAvatar.js +0 -20
- package/dist/InputDate-c258f5cb.js +0 -32
- package/dist/InputDate.cjs +0 -29
- package/dist/InputDate.js +0 -21
- package/dist/InputEmail-812bdffe.js +0 -20
- package/dist/InputEmail.cjs +0 -26
- package/dist/InputEmail.js +0 -17
- package/dist/InputFile-d089b486.js +0 -181
- package/dist/InputFile.cjs +0 -25
- package/dist/InputFile.js +0 -16
- package/dist/InputGroup-436859cf.js +0 -26
- package/dist/InputGroup.js +0 -4
- package/dist/InputNumber-4bd38b8e.js +0 -56
- package/dist/InputNumber.cjs +0 -25
- package/dist/InputNumber.js +0 -17
- package/dist/InputPassword-6b937a91.js +0 -19
- package/dist/InputPassword.cjs +0 -25
- package/dist/InputPassword.js +0 -17
- package/dist/InputPhoneNumber-947bdb49.js +0 -97
- package/dist/InputPhoneNumber.cjs +0 -25
- package/dist/InputPhoneNumber.js +0 -17
- package/dist/InputText-2fd8f942.js +0 -96
- package/dist/InputText.cjs +0 -26
- package/dist/InputText.js +0 -18
- package/dist/InputTime-ef8af2d9.js +0 -187
- package/dist/InputTime.cjs +0 -27
- package/dist/InputTime.js +0 -19
- package/dist/InputValidation-fe42fc3f.js +0 -23
- package/dist/InputValidation.js +0 -9
- package/dist/LightBox-8cc72953.js +0 -109
- package/dist/LightBox.js +0 -16
- package/dist/Link-b41bc1d3.js +0 -7
- package/dist/Link.cjs +0 -10
- package/dist/Link.js +0 -2
- package/dist/List-4fe52f57.js +0 -77
- package/dist/List.cjs +0 -25
- package/dist/List.js +0 -16
- package/dist/Markdown-7b84fcdb.js +0 -55
- package/dist/Markdown.cjs +0 -19
- package/dist/Markdown.js +0 -11
- package/dist/Menu-fb0b2e9b.js +0 -132
- package/dist/Menu.js +0 -13
- package/dist/Modal-eeb52d66.js +0 -63
- package/dist/Modal.js +0 -17
- package/dist/MultiSelect-0af9c956.js +0 -169
- package/dist/MultiSelect.cjs +0 -19
- package/dist/MultiSelect.js +0 -11
- package/dist/Option-58d7cab6.js +0 -12
- package/dist/Page-0b334096.js +0 -59
- package/dist/Page.cjs +0 -30
- package/dist/Page.js +0 -22
- package/dist/Popover-798f548e.js +0 -47
- package/dist/Popover-968c63b2.js +0 -53
- package/dist/Popover.cjs +0 -20
- package/dist/Popover.js +0 -12
- package/dist/ProgressBar-022ef3f6.js +0 -36
- package/dist/ProgressBar.js +0 -4
- package/dist/RadioGroup-a089f132.js +0 -39
- package/dist/RadioGroup.js +0 -6
- package/dist/RecurringSelect-2de4014c.js +0 -208
- package/dist/RecurringSelect.cjs +0 -38
- package/dist/RecurringSelect.js +0 -22
- package/dist/Select.cjs +0 -26
- package/dist/Select.js +0 -17
- package/dist/Spinner-3480bc34.js +0 -24
- package/dist/Spinner-90081e20.js +0 -17
- package/dist/Spinner.js +0 -4
- package/dist/StatusIndicator-d6f9aefa.js +0 -12
- package/dist/StatusIndicator.js +0 -3
- package/dist/StatusLabel-66214fc7.js +0 -19
- package/dist/StatusLabel.cjs +0 -15
- package/dist/StatusLabel.js +0 -7
- package/dist/Switch-6c6c727b.js +0 -56
- package/dist/Switch-87706cde.js +0 -49
- package/dist/Switch.js +0 -5
- package/dist/Table.cjs +0 -20
- package/dist/Table.js +0 -5
- package/dist/Tabs-109f1f10.js +0 -70
- package/dist/Tabs.cjs +0 -14
- package/dist/Tabs.js +0 -5
- package/dist/Text-c92ddeb3.js +0 -25
- package/dist/Text.js +0 -5
- package/dist/Toast.cjs +0 -19
- package/dist/Toast.js +0 -11
- package/dist/Tooltip-a40fffbd.js +0 -104
- package/dist/Tooltip.js +0 -8
- package/dist/Typography-52ed1386.js +0 -55
- package/dist/Typography-fd88fcce.js +0 -62
- package/dist/Typography.js +0 -4
- package/dist/getAtlantisConfig-5b50057c.js +0 -11
- package/dist/index.cjs +0 -224
- package/dist/index.d.ts +0 -73
- package/dist/index.js +0 -112
- package/dist/showToast-ff666be8.js +0 -100
- package/dist/style-inject.es-a0e1a0ba.js +0 -28
- package/dist/tslib.es6-c563c1dd.js +0 -43
package/dist/DatePicker.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { D as DatePicker } from './DatePicker-5d0c0353.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import 'react-datepicker';
|
|
5
|
-
import '@jobber/hooks/useRefocusOnActivator';
|
|
6
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
7
|
-
import './Typography-52ed1386.js';
|
|
8
|
-
import './Button-30154871.js';
|
|
9
|
-
import 'react-router-dom';
|
|
10
|
-
import './Icon-22723fe6.js';
|
|
11
|
-
import '@jobber/design';
|
|
12
|
-
import 'lodash/omit';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
3
|
-
import { T as Typography } from './Typography-52ed1386.js';
|
|
4
|
-
|
|
5
|
-
var css_248z = ".EQDmgmJchDA- {\n margin: 0;\n}\n\n.DkzfClUGQlc- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n padding: var(--space-small) 0;\n border-bottom: var(--border-base) solid var(--color-border);\n}\n\n.DkzfClUGQlc-:first-child {\n padding-top: 0;\n}\n\n.DkzfClUGQlc-:last-child {\n padding-bottom: 0;\n border-bottom: none;\n}\n\n.DkzfClUGQlc- dd {\n min-width: calc(var(--base-unit) * 7.5);\n box-sizing: border-box;\n padding-right: var(--space-small);\n -webkit-margin-start: 0;\n margin-left: 0;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n}\n\n.DkzfClUGQlc- dt {\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n}\n";
|
|
6
|
-
var styles = {"descriptionList":"EQDmgmJchDA-","termGroup":"DkzfClUGQlc-"};
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
function DescriptionList({ data }) {
|
|
10
|
-
return (React.createElement("dl", { className: styles.descriptionList }, data.map(([term, description]) => (React.createElement("div", { key: term, className: styles.termGroup },
|
|
11
|
-
React.createElement(Typography, { element: "dt", textColor: "heading", size: "base" }, term),
|
|
12
|
-
React.createElement(Typography, { element: "dd", textColor: "text", size: "base" }, description))))));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { DescriptionList as D };
|
package/dist/DescriptionList.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var DescriptionList = require('./DescriptionList-74db99a5.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
8
|
-
require('./Typography-fd88fcce.js');
|
|
9
|
-
require('classnames');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.DescriptionList = DescriptionList.DescriptionList;
|
package/dist/DescriptionList.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { useResizeObserver, Breakpoints } from '@jobber/hooks/useResizeObserver';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
4
|
-
import { I as Icon } from './Icon-22723fe6.js';
|
|
5
|
-
import { T as Typography } from './Typography-52ed1386.js';
|
|
6
|
-
|
|
7
|
-
var css_248z = ".WcgASR88I1c- {\n -webkit-transform-origin: 50% 47.5% 0;\n transform-origin: 50% 47.5% 0;\n transition: -webkit-transform var(--timing-quick);\n transition: transform var(--timing-quick);\n transition: transform var(--timing-quick), -webkit-transform var(--timing-quick);\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n}\n\n.N-W4pXaLGt4-[open] .WcgASR88I1c- {\n -webkit-transform: rotateX(180deg);\n transform: rotateX(180deg);\n}\n\n.PMjHZZhHiUY- {\n padding: var(--space-smaller) 0 var(--space-smallest) 0;\n border: none;\n list-style: none;\n cursor: pointer;\n outline-color: none;\n transition: background var(--timing-quick), box-shadow var(--timing-base);\n}\n\n.PMjHZZhHiUY-::-webkit-details-marker {\n display: none;\n}\n\n.PMjHZZhHiUY-:hover,\n.PMjHZZhHiUY-:focus {\n background: var(--color-surface--hover);\n}\n\n.PMjHZZhHiUY-:focus,\n.PMjHZZhHiUY-:active {\n box-shadow: var(--shadow-focus);\n border: none;\n outline: none;\n}\n\n.PMjHZZhHiUY- * {\n pointer-events: none;\n}\n\n.-E1lerklSHw- {\n -ms-flex-align: baseline;\n align-items: baseline;\n display: -ms-flexbox;\n display: flex;\n}\n\n.-E1lerklSHw- h4 {\n -ms-flex: 1 0 0px;\n flex: 1 0 0;\n}\n\n.CjRRsbZQp1Y- {\n display: block;\n padding: var(--space-small) 0;\n}\n\n.N-W4pXaLGt4-[open] > .CjRRsbZQp1Y- {\n -webkit-animation: vWj6tOjTVYA- var(--timing-base);\n animation: vWj6tOjTVYA- var(--timing-base);\n}\n\n@-webkit-keyframes vWj6tOjTVYA- {\n 0% {\n margin-top: calc(var(--space-small) * -1);\n opacity: 0;\n }\n 100% {\n margin-top: 0px;\n opacity: 1;\n }\n}\n\n@keyframes vWj6tOjTVYA- {\n 0% {\n margin-top: calc(var(--space-small) * -1);\n opacity: 0;\n }\n 100% {\n margin-top: 0px;\n opacity: 1;\n }\n}\n";
|
|
8
|
-
var styles = {"arrowIconWrapper":"WcgASR88I1c-","details":"N-W4pXaLGt4-","summary":"PMjHZZhHiUY-","summaryWrap":"-E1lerklSHw-","content":"CjRRsbZQp1Y-","openAnimation":"vWj6tOjTVYA-"};
|
|
9
|
-
styleInject(css_248z);
|
|
10
|
-
|
|
11
|
-
function Disclosure({ children, title, defaultOpen = false, }) {
|
|
12
|
-
const [isOpen, setOpen] = useState(defaultOpen);
|
|
13
|
-
const [isMounted, setMount] = useState(false);
|
|
14
|
-
const [titleRef, { exactWidth }] = useResizeObserver();
|
|
15
|
-
const isBelowBreakpoint = exactWidth && exactWidth < Breakpoints.small;
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
setMount(true);
|
|
18
|
-
}, []);
|
|
19
|
-
return (React.createElement("details", { open: isOpen, onToggle: onToggle, className: styles.details },
|
|
20
|
-
React.createElement("summary", { className: styles.summary },
|
|
21
|
-
React.createElement("div", { className: styles.summaryWrap, ref: titleRef },
|
|
22
|
-
React.createElement(Typography, { element: "h4", size: isBelowBreakpoint ? "base" : "large", fontWeight: "bold", textColor: "heading" }, title),
|
|
23
|
-
React.createElement("span", { className: styles.arrowIconWrapper },
|
|
24
|
-
React.createElement(Icon, { size: "large", name: "arrowDown", color: "green" })))),
|
|
25
|
-
React.createElement("span", { className: styles.content }, children)));
|
|
26
|
-
function onToggle(event) {
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
const { open: currentToggleState } = event.target;
|
|
29
|
-
if (!isMounted || currentToggleState === isOpen) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
setOpen(!currentToggleState);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { Disclosure as D };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var jobberHooks = require('@jobber/hooks/useResizeObserver');
|
|
5
|
-
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
6
|
-
var Icon = require('./Icon-405a216c.js');
|
|
7
|
-
var Typography = require('./Typography-fd88fcce.js');
|
|
8
|
-
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
-
|
|
13
|
-
var css_248z = ".WcgASR88I1c- {\n -webkit-transform-origin: 50% 47.5% 0;\n transform-origin: 50% 47.5% 0;\n transition: -webkit-transform var(--timing-quick);\n transition: transform var(--timing-quick);\n transition: transform var(--timing-quick), -webkit-transform var(--timing-quick);\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n}\n\n.N-W4pXaLGt4-[open] .WcgASR88I1c- {\n -webkit-transform: rotateX(180deg);\n transform: rotateX(180deg);\n}\n\n.PMjHZZhHiUY- {\n padding: var(--space-smaller) 0 var(--space-smallest) 0;\n border: none;\n list-style: none;\n cursor: pointer;\n outline-color: none;\n transition: background var(--timing-quick), box-shadow var(--timing-base);\n}\n\n.PMjHZZhHiUY-::-webkit-details-marker {\n display: none;\n}\n\n.PMjHZZhHiUY-:hover,\n.PMjHZZhHiUY-:focus {\n background: var(--color-surface--hover);\n}\n\n.PMjHZZhHiUY-:focus,\n.PMjHZZhHiUY-:active {\n box-shadow: var(--shadow-focus);\n border: none;\n outline: none;\n}\n\n.PMjHZZhHiUY- * {\n pointer-events: none;\n}\n\n.-E1lerklSHw- {\n -ms-flex-align: baseline;\n align-items: baseline;\n display: -ms-flexbox;\n display: flex;\n}\n\n.-E1lerklSHw- h4 {\n -ms-flex: 1 0 0px;\n flex: 1 0 0;\n}\n\n.CjRRsbZQp1Y- {\n display: block;\n padding: var(--space-small) 0;\n}\n\n.N-W4pXaLGt4-[open] > .CjRRsbZQp1Y- {\n -webkit-animation: vWj6tOjTVYA- var(--timing-base);\n animation: vWj6tOjTVYA- var(--timing-base);\n}\n\n@-webkit-keyframes vWj6tOjTVYA- {\n 0% {\n margin-top: calc(var(--space-small) * -1);\n opacity: 0;\n }\n 100% {\n margin-top: 0px;\n opacity: 1;\n }\n}\n\n@keyframes vWj6tOjTVYA- {\n 0% {\n margin-top: calc(var(--space-small) * -1);\n opacity: 0;\n }\n 100% {\n margin-top: 0px;\n opacity: 1;\n }\n}\n";
|
|
14
|
-
var styles = {"arrowIconWrapper":"WcgASR88I1c-","details":"N-W4pXaLGt4-","summary":"PMjHZZhHiUY-","summaryWrap":"-E1lerklSHw-","content":"CjRRsbZQp1Y-","openAnimation":"vWj6tOjTVYA-"};
|
|
15
|
-
styleInject_es.styleInject(css_248z);
|
|
16
|
-
|
|
17
|
-
function Disclosure({ children, title, defaultOpen = false, }) {
|
|
18
|
-
const [isOpen, setOpen] = React.useState(defaultOpen);
|
|
19
|
-
const [isMounted, setMount] = React.useState(false);
|
|
20
|
-
const [titleRef, { exactWidth }] = jobberHooks.useResizeObserver();
|
|
21
|
-
const isBelowBreakpoint = exactWidth && exactWidth < jobberHooks.Breakpoints.small;
|
|
22
|
-
React.useEffect(() => {
|
|
23
|
-
setMount(true);
|
|
24
|
-
}, []);
|
|
25
|
-
return (React__default["default"].createElement("details", { open: isOpen, onToggle: onToggle, className: styles.details },
|
|
26
|
-
React__default["default"].createElement("summary", { className: styles.summary },
|
|
27
|
-
React__default["default"].createElement("div", { className: styles.summaryWrap, ref: titleRef },
|
|
28
|
-
React__default["default"].createElement(Typography.Typography, { element: "h4", size: isBelowBreakpoint ? "base" : "large", fontWeight: "bold", textColor: "heading" }, title),
|
|
29
|
-
React__default["default"].createElement("span", { className: styles.arrowIconWrapper },
|
|
30
|
-
React__default["default"].createElement(Icon.Icon, { size: "large", name: "arrowDown", color: "green" })))),
|
|
31
|
-
React__default["default"].createElement("span", { className: styles.content }, children)));
|
|
32
|
-
function onToggle(event) {
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
const { open: currentToggleState } = event.target;
|
|
35
|
-
if (!isMounted || currentToggleState === isOpen) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
setOpen(!currentToggleState);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
exports.Disclosure = Disclosure;
|
package/dist/Disclosure.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var Disclosure = require('./Disclosure-56309ff3.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('@jobber/hooks/useResizeObserver');
|
|
8
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
9
|
-
require('./Icon-405a216c.js');
|
|
10
|
-
require('@jobber/design');
|
|
11
|
-
require('./Typography-fd88fcce.js');
|
|
12
|
-
require('classnames');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.Disclosure = Disclosure.Disclosure;
|
package/dist/Disclosure.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { D as Disclosure } from './Disclosure-00a9459b.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@jobber/hooks/useResizeObserver';
|
|
4
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
5
|
-
import './Icon-22723fe6.js';
|
|
6
|
-
import '@jobber/design';
|
|
7
|
-
import './Typography-52ed1386.js';
|
|
8
|
-
import 'classnames';
|
package/dist/Divider-589745c1.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
4
|
-
|
|
5
|
-
var css_248z = ".dH7SqeSo70A- {\n --divider-width: var(--border-base);\n --divider-color: var(--color-border);\n margin: 0;\n padding: 0;\n border: none;\n}\n\n._07xjw8ykfvg- {\n --divider-width: var(--border-thick);\n opacity: 0.875;\n}\n\n.TGD22T-KP78- {\n --divider-width: var(--border-thicker);\n opacity: 0.625;\n}\n\n.UUndaiRIryU- {\n --divider-width: var(--border-thickest);\n opacity: 0.375;\n}\n\n.HzWBc8FoucI- {\n height: var(--space-minuscule);\n border-bottom: var(--divider-width) solid var(--divider-color);\n}\n\n.vu46ZKcGBWM- {\n width: var(--space-miniscule);\n height: auto;\n border-right: var(--divider-width) solid var(--divider-color);\n}\n";
|
|
6
|
-
var styles = {"divider":"dH7SqeSo70A-","large":"_07xjw8ykfvg-","larger":"TGD22T-KP78-","largest":"UUndaiRIryU-","horizontal":"HzWBc8FoucI-","vertical":"vu46ZKcGBWM-"};
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
function Divider({ size = "base", direction = "horizontal", }) {
|
|
10
|
-
const className = classnames(styles.divider, {
|
|
11
|
-
[styles.large]: size === "large",
|
|
12
|
-
[styles.larger]: size === "larger",
|
|
13
|
-
[styles.largest]: size === "largest",
|
|
14
|
-
[styles.horizontal]: direction == "horizontal",
|
|
15
|
-
[styles.vertical]: direction == "vertical",
|
|
16
|
-
});
|
|
17
|
-
return React.createElement("div", { className: className, role: "none presentation" });
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Divider as D };
|
package/dist/Divider.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var Divider = require('./Divider-1e6ac1ec.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.Divider = Divider.Divider;
|
package/dist/Divider.js
DELETED
package/dist/Drawer.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var DrawerGrid = require('./DrawerGrid-b233d837.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
9
|
-
require('./Heading-a8a24775.js');
|
|
10
|
-
require('./Typography-fd88fcce.js');
|
|
11
|
-
require('./getAtlantisConfig-0f3e8af2.js');
|
|
12
|
-
require('./ButtonDismiss-d7417429.js');
|
|
13
|
-
require('./Button-ec64869e.js');
|
|
14
|
-
require('react-router-dom');
|
|
15
|
-
require('./Icon-405a216c.js');
|
|
16
|
-
require('@jobber/design');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.Drawer = DrawerGrid.Drawer;
|
|
21
|
-
exports.DrawerGrid = DrawerGrid.DrawerGrid;
|
package/dist/Drawer.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { D as Drawer, a as DrawerGrid } from './DrawerGrid-0861e529.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
5
|
-
import './Heading-dfd4f1cf.js';
|
|
6
|
-
import './Typography-52ed1386.js';
|
|
7
|
-
import './getAtlantisConfig-5b50057c.js';
|
|
8
|
-
import './ButtonDismiss-a11eef74.js';
|
|
9
|
-
import './Button-30154871.js';
|
|
10
|
-
import 'react-router-dom';
|
|
11
|
-
import './Icon-22723fe6.js';
|
|
12
|
-
import '@jobber/design';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
4
|
-
import { H as Heading } from './Heading-dfd4f1cf.js';
|
|
5
|
-
import { B as ButtonDismiss } from './ButtonDismiss-a11eef74.js';
|
|
6
|
-
|
|
7
|
-
var css_248z$1 = ":root {\n --drawer-width: calc(var(--space-base) * 17.5);\n --drawer--base-padding: var(--space-base);\n}\n\n.jobber-retheme {\n --drawer--base-padding: var(--space-large);\n}\n\n.IJAyrFb2GpA- {\n display: none;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--elevation-modal);\n overflow: hidden;\n\n /* SPECIAL CASE:\n Drawer is primarily used in Jobber Online and is currently used in a layout\n that rearranges at 640px. For compatibility, this is hardcoded here\n rather than using the breakpoint custom properties.\n DO NOT COPY THIS - USE THE BREAKPOINTS DEFINED IN THE @jobber/design package!\n */\n}\n\n@media (min-width: 640px), print {\n\n.IJAyrFb2GpA- {\n position: relative;\n z-index: auto;\n width: calc(var(--space-base) * 17.5);\n width: var(--drawer-width);\n}\n }\n\n@media (--large-screens-and-up) {\n\n.IJAyrFb2GpA- {\n --drawer-width: calc(var(--space-base) * 26.25);\n}\n }\n\n.jobber-retheme .IJAyrFb2GpA- {\n box-shadow: var(--shadow-base);\n border-top-left-radius: var(--radius-base);\n}\n\n.Hsmk6Pg14PQ- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n border: var(--border-base) solid var(--color-border);\n background-color: var(--color-surface);\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.jobber-retheme .Hsmk6Pg14PQ- {\n border-top-left-radius: var(--radius-base);\n}\n\n.DwF3Q9EMPvQ- {\n display: -ms-flexbox;\n display: flex;\n}\n\n.TcdyXiTbnMU- {\n display: -ms-flexbox;\n display: flex;\n padding: var(--space-small) var(--space-base);\n padding: var(--space-small) var(--drawer--base-padding);\n background-color: var(--color-surface--background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.jobber-retheme .TcdyXiTbnMU- {\n padding: var(--space-base) var(--space-base) 0 var(--space-base);\n padding: var(--space-base) var(--space-base) 0 var(--drawer--base-padding);\n background-color: transparent;\n}\n\n.srL7xqEzwhM- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n height: 100%;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow-y: auto;\n}\n\n.p6-yqttoIJI- {\n width: 100%;\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n.p6-yqttoIJI- > * {\n --public-content--padding: var(--drawer--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n.p6-yqttoIJI- > * > * {\n --public-content--padding: 0;\n}\n";
|
|
8
|
-
var styles$1 = {"container":"IJAyrFb2GpA-","drawer":"Hsmk6Pg14PQ-","open":"DwF3Q9EMPvQ-","header":"TcdyXiTbnMU-","contentScroll":"srL7xqEzwhM-","content":"p6-yqttoIJI-"};
|
|
9
|
-
styleInject(css_248z$1);
|
|
10
|
-
|
|
11
|
-
function Drawer({ title, children, open = true, onRequestClose, id, }) {
|
|
12
|
-
const drawerClassNames = classnames(styles$1.container, open && styles$1.open);
|
|
13
|
-
return (React.createElement("aside", { className: drawerClassNames, "data-testid": "drawer-container", "aria-label": title, "aria-hidden": !open, id: id },
|
|
14
|
-
React.createElement("div", { className: styles$1.drawer },
|
|
15
|
-
React.createElement(Header, { title: title, onRequestClose: onRequestClose }),
|
|
16
|
-
React.createElement("div", { className: styles$1.contentScroll },
|
|
17
|
-
React.createElement("div", { className: styles$1.content }, children)))));
|
|
18
|
-
}
|
|
19
|
-
function Header({ title, onRequestClose }) {
|
|
20
|
-
return (React.createElement("div", { className: styles$1.header, "data-testid": "drawer-header" },
|
|
21
|
-
React.createElement(Heading, { level: 3 }, title),
|
|
22
|
-
React.createElement(ButtonDismiss, { onClick: onRequestClose, ariaLabel: `Close ${title || "drawer"}` })));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var css_248z = "._50Jq09W07gg- {\n display: grid;\n width: 100%;\n height: 100%;\n overflow: hidden;\n grid-template-columns: minmax(0, 1fr) minmax(-webkit-min-content, -webkit-max-content);\n grid-template-columns: minmax(0, 1fr) minmax(min-content, max-content);\n grid-template-rows: 1fr;\n}\n";
|
|
26
|
-
var styles = {"drawerGrid":"_50Jq09W07gg-"};
|
|
27
|
-
styleInject(css_248z);
|
|
28
|
-
|
|
29
|
-
function DrawerGrid({ children }) {
|
|
30
|
-
return React.createElement("div", { className: styles.drawerGrid }, children);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { Drawer as D, DrawerGrid as a };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var classnames = require('classnames');
|
|
5
|
-
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
6
|
-
var Heading = require('./Heading-a8a24775.js');
|
|
7
|
-
var ButtonDismiss = require('./ButtonDismiss-d7417429.js');
|
|
8
|
-
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
-
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
13
|
-
|
|
14
|
-
var css_248z$1 = ":root {\n --drawer-width: calc(var(--space-base) * 17.5);\n --drawer--base-padding: var(--space-base);\n}\n\n.jobber-retheme {\n --drawer--base-padding: var(--space-large);\n}\n\n.IJAyrFb2GpA- {\n display: none;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--elevation-modal);\n overflow: hidden;\n\n /* SPECIAL CASE:\n Drawer is primarily used in Jobber Online and is currently used in a layout\n that rearranges at 640px. For compatibility, this is hardcoded here\n rather than using the breakpoint custom properties.\n DO NOT COPY THIS - USE THE BREAKPOINTS DEFINED IN THE @jobber/design package!\n */\n}\n\n@media (min-width: 640px), print {\n\n.IJAyrFb2GpA- {\n position: relative;\n z-index: auto;\n width: calc(var(--space-base) * 17.5);\n width: var(--drawer-width);\n}\n }\n\n@media (--large-screens-and-up) {\n\n.IJAyrFb2GpA- {\n --drawer-width: calc(var(--space-base) * 26.25);\n}\n }\n\n.jobber-retheme .IJAyrFb2GpA- {\n box-shadow: var(--shadow-base);\n border-top-left-radius: var(--radius-base);\n}\n\n.Hsmk6Pg14PQ- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n border: var(--border-base) solid var(--color-border);\n background-color: var(--color-surface);\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.jobber-retheme .Hsmk6Pg14PQ- {\n border-top-left-radius: var(--radius-base);\n}\n\n.DwF3Q9EMPvQ- {\n display: -ms-flexbox;\n display: flex;\n}\n\n.TcdyXiTbnMU- {\n display: -ms-flexbox;\n display: flex;\n padding: var(--space-small) var(--space-base);\n padding: var(--space-small) var(--drawer--base-padding);\n background-color: var(--color-surface--background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.jobber-retheme .TcdyXiTbnMU- {\n padding: var(--space-base) var(--space-base) 0 var(--space-base);\n padding: var(--space-base) var(--space-base) 0 var(--drawer--base-padding);\n background-color: transparent;\n}\n\n.srL7xqEzwhM- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n height: 100%;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow-y: auto;\n}\n\n.p6-yqttoIJI- {\n width: 100%;\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n.p6-yqttoIJI- > * {\n --public-content--padding: var(--drawer--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n.p6-yqttoIJI- > * > * {\n --public-content--padding: 0;\n}\n";
|
|
15
|
-
var styles$1 = {"container":"IJAyrFb2GpA-","drawer":"Hsmk6Pg14PQ-","open":"DwF3Q9EMPvQ-","header":"TcdyXiTbnMU-","contentScroll":"srL7xqEzwhM-","content":"p6-yqttoIJI-"};
|
|
16
|
-
styleInject_es.styleInject(css_248z$1);
|
|
17
|
-
|
|
18
|
-
function Drawer({ title, children, open = true, onRequestClose, id, }) {
|
|
19
|
-
const drawerClassNames = classnames__default["default"](styles$1.container, open && styles$1.open);
|
|
20
|
-
return (React__default["default"].createElement("aside", { className: drawerClassNames, "data-testid": "drawer-container", "aria-label": title, "aria-hidden": !open, id: id },
|
|
21
|
-
React__default["default"].createElement("div", { className: styles$1.drawer },
|
|
22
|
-
React__default["default"].createElement(Header, { title: title, onRequestClose: onRequestClose }),
|
|
23
|
-
React__default["default"].createElement("div", { className: styles$1.contentScroll },
|
|
24
|
-
React__default["default"].createElement("div", { className: styles$1.content }, children)))));
|
|
25
|
-
}
|
|
26
|
-
function Header({ title, onRequestClose }) {
|
|
27
|
-
return (React__default["default"].createElement("div", { className: styles$1.header, "data-testid": "drawer-header" },
|
|
28
|
-
React__default["default"].createElement(Heading.Heading, { level: 3 }, title),
|
|
29
|
-
React__default["default"].createElement(ButtonDismiss.ButtonDismiss, { onClick: onRequestClose, ariaLabel: `Close ${title || "drawer"}` })));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var css_248z = "._50Jq09W07gg- {\n display: grid;\n width: 100%;\n height: 100%;\n overflow: hidden;\n grid-template-columns: minmax(0, 1fr) minmax(-webkit-min-content, -webkit-max-content);\n grid-template-columns: minmax(0, 1fr) minmax(min-content, max-content);\n grid-template-rows: 1fr;\n}\n";
|
|
33
|
-
var styles = {"drawerGrid":"_50Jq09W07gg-"};
|
|
34
|
-
styleInject_es.styleInject(css_248z);
|
|
35
|
-
|
|
36
|
-
function DrawerGrid({ children }) {
|
|
37
|
-
return React__default["default"].createElement("div", { className: styles.drawerGrid }, children);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
exports.Drawer = Drawer;
|
|
41
|
-
exports.DrawerGrid = DrawerGrid;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { T as Typography } from './Typography-52ed1386.js';
|
|
3
|
-
|
|
4
|
-
function Emphasis({ variation, children }) {
|
|
5
|
-
const variationMap = {
|
|
6
|
-
bold: { element: "b", fontWeight: "bold" },
|
|
7
|
-
italic: { element: "em", emphasisType: "italic" },
|
|
8
|
-
highlight: { element: "strong", emphasisType: "highlight" },
|
|
9
|
-
};
|
|
10
|
-
return React.createElement(Typography, Object.assign({}, variationMap[variation]), children);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Emphasis as E };
|
package/dist/Emphasis.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
3
|
-
import classnames from 'classnames';
|
|
4
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
5
|
-
import { H as Heading } from './Heading-dfd4f1cf.js';
|
|
6
|
-
import { T as Text } from './Text-c92ddeb3.js';
|
|
7
|
-
import { C as Content } from './Content-c96e9299.js';
|
|
8
|
-
import { S as Switch } from './Switch-87706cde.js';
|
|
9
|
-
import { B as Button } from './Button-30154871.js';
|
|
10
|
-
import { E as Emphasis } from './Emphasis-2a640962.js';
|
|
11
|
-
import { M as Markdown } from './Markdown-7b84fcdb.js';
|
|
12
|
-
|
|
13
|
-
var css_248z = ".-sVnhIK4hZw- {\n display: -ms-flexbox;\n display: flex;\n}\n\n.ZJaXf-cIFgU- {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n -ms-flex-item-align: center;\n align-self: center;\n padding-right: var(--space-base);\n transition: opacity var(--timing-base);\n}\n\n.OA-s1YYLMMM- {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n -ms-flex-item-align: start;\n align-self: flex-start;\n position: relative;\n}\n\n.lN90IIewHq8- {\n position: absolute;\n top: 100%;\n width: 100%;\n margin-top: var(--space-smallest);\n text-align: center;\n}\n\n.mW56hvBHqPM- {\n opacity: 0.5;\n}\n\n.QfZjM5S-Ls0- {\n opacity: 1;\n}\n";
|
|
14
|
-
var styles = {"container":"-sVnhIK4hZw-","content":"ZJaXf-cIFgU-","action":"OA-s1YYLMMM-","savedIndicator":"lN90IIewHq8-","featureContent":"mW56hvBHqPM-","enabled":"QfZjM5S-Ls0-"};
|
|
15
|
-
styleInject(css_248z);
|
|
16
|
-
|
|
17
|
-
function FeatureSwitch({ children, description, disabled = false, enabled, externalLink = false, onEdit, onSwitch, hasSaveIndicator = false, title, }) {
|
|
18
|
-
const [savedIndicator, setSavedIndicator] = useState(false);
|
|
19
|
-
const featureContentClassnames = classnames(styles.featureContent, styles.content, enabled && styles.enabled);
|
|
20
|
-
shouldShowSavedIndicator();
|
|
21
|
-
return (React.createElement(Content, null,
|
|
22
|
-
React.createElement("div", { className: styles.container },
|
|
23
|
-
React.createElement("div", { className: styles.content },
|
|
24
|
-
React.createElement(Content, null,
|
|
25
|
-
title && React.createElement(Heading, { level: 4 }, title),
|
|
26
|
-
description && (React.createElement(Text, null,
|
|
27
|
-
React.createElement(Markdown, { content: description, basicUsage: true, externalLink: externalLink }))))),
|
|
28
|
-
onSwitch && (React.createElement("div", { className: styles.action },
|
|
29
|
-
React.createElement(Switch, { value: enabled, onChange: onSwitch, ariaLabel: description, disabled: disabled }),
|
|
30
|
-
React.createElement(AnimatePresence, null, hasSaveIndicator && savedIndicator && (React.createElement(motion.div, { className: styles.savedIndicator, initial: { y: -4, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -4, opacity: 0 }, transition: {
|
|
31
|
-
delay: 0.2,
|
|
32
|
-
type: "spring",
|
|
33
|
-
damping: 20,
|
|
34
|
-
stiffness: 300,
|
|
35
|
-
}, onAnimationComplete: handleAnimationComplete },
|
|
36
|
-
React.createElement(Text, { variation: "success" },
|
|
37
|
-
React.createElement(Emphasis, { variation: "italic" }, "Saved")))))))),
|
|
38
|
-
(children || onEdit) && (React.createElement("div", { className: styles.container },
|
|
39
|
-
children && (React.createElement("div", { className: featureContentClassnames }, children)),
|
|
40
|
-
onEdit && (React.createElement("div", { className: styles.action },
|
|
41
|
-
React.createElement(Button, { label: "Edit", type: "tertiary", onClick: onEdit })))))));
|
|
42
|
-
function shouldShowSavedIndicator() {
|
|
43
|
-
// Check if the component is mounted
|
|
44
|
-
const [didMount, setDidMount] = useState(false);
|
|
45
|
-
useEffect(() => setDidMount(true), []);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
didMount && hasSaveIndicator && setSavedIndicator(true);
|
|
48
|
-
}, [enabled]);
|
|
49
|
-
}
|
|
50
|
-
function handleAnimationComplete() {
|
|
51
|
-
setSavedIndicator(false);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { FeatureSwitch as F };
|
package/dist/FeatureSwitch.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var FeatureSwitch = require('./FeatureSwitch-ddaebf27.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('framer-motion');
|
|
8
|
-
require('classnames');
|
|
9
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
10
|
-
require('./Heading-a8a24775.js');
|
|
11
|
-
require('./Typography-fd88fcce.js');
|
|
12
|
-
require('./getAtlantisConfig-0f3e8af2.js');
|
|
13
|
-
require('./Text-714f7d14.js');
|
|
14
|
-
require('./Content-60a3452a.js');
|
|
15
|
-
require('./Switch-6c6c727b.js');
|
|
16
|
-
require('./Button-ec64869e.js');
|
|
17
|
-
require('react-router-dom');
|
|
18
|
-
require('./Icon-405a216c.js');
|
|
19
|
-
require('@jobber/design');
|
|
20
|
-
require('./Emphasis-84de1f3f.js');
|
|
21
|
-
require('./Markdown-36854bd5.js');
|
|
22
|
-
require('react-markdown');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.FeatureSwitch = FeatureSwitch.FeatureSwitch;
|
package/dist/FeatureSwitch.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { F as FeatureSwitch } from './FeatureSwitch-e33e30a9.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'framer-motion';
|
|
4
|
-
import 'classnames';
|
|
5
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
6
|
-
import './Heading-dfd4f1cf.js';
|
|
7
|
-
import './Typography-52ed1386.js';
|
|
8
|
-
import './getAtlantisConfig-5b50057c.js';
|
|
9
|
-
import './Text-c92ddeb3.js';
|
|
10
|
-
import './Content-c96e9299.js';
|
|
11
|
-
import './Switch-87706cde.js';
|
|
12
|
-
import './Button-30154871.js';
|
|
13
|
-
import 'react-router-dom';
|
|
14
|
-
import './Icon-22723fe6.js';
|
|
15
|
-
import '@jobber/design';
|
|
16
|
-
import './Emphasis-2a640962.js';
|
|
17
|
-
import './Markdown-7b84fcdb.js';
|
|
18
|
-
import 'react-markdown';
|
package/dist/Flex-041db5c8.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
4
|
-
|
|
5
|
-
var css_248z = "._8VpnrMKmsqQ- {\n display: grid;\n /* If this gets wrapped in a flex container, it should take the remaining space */\n -ms-flex: 1;\n flex: 1;\n}\n\n.ooF1YfV4Usc- {\n gap: var(--space-smallest);\n}\n\n.ppCZfXq-Kqc- {\n gap: var(--space-smaller);\n}\n\n.tElkBalXH3g- {\n gap: var(--space-small);\n}\n\n._4u3OwUKxxbg- {\n gap: var(--space-base);\n}\n\n.RL7CJla0AAI- {\n gap: var(--space-large);\n}\n\n.fV4cvFYkhgo- {\n gap: 0;\n}\n\n._04xVVjZgr-0- {\n -ms-flex-align: start;\n align-items: start;\n}\n\n.Nc3zrqHHYSg- {\n -ms-flex-align: center;\n align-items: center;\n}\n\n.qA-v50wBX1U- {\n -ms-flex-align: end;\n align-items: end;\n}\n";
|
|
6
|
-
var styles = {"flexible":"_8VpnrMKmsqQ-","smallestGap":"ooF1YfV4Usc-","smallerGap":"ppCZfXq-Kqc-","smallGap":"tElkBalXH3g-","baseGap":"_4u3OwUKxxbg-","largeGap":"RL7CJla0AAI-","noneGap":"fV4cvFYkhgo-","startAlign":"_04xVVjZgr-0-","centerAlign":"Nc3zrqHHYSg-","endAlign":"qA-v50wBX1U-"};
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
function Flex({ align = "center", children, direction = "row", gap = "base", template, }) {
|
|
10
|
-
return (React.createElement("div", { className: classnames(styles.flexible, {
|
|
11
|
-
[styles[`${gap}Gap`]]: Boolean(gap),
|
|
12
|
-
[styles[`${align}Align`]]: Boolean(align),
|
|
13
|
-
}), style: generateGridStylesFromTemplate(direction, template) }, children));
|
|
14
|
-
}
|
|
15
|
-
function generateGridStylesFromTemplate(direction, layoutTemplate) {
|
|
16
|
-
const containerStyles = {};
|
|
17
|
-
const templateKeys = {
|
|
18
|
-
row: "gridTemplateColumns",
|
|
19
|
-
column: "gridTemplateRows",
|
|
20
|
-
};
|
|
21
|
-
const templateValues = {
|
|
22
|
-
grow: "1fr",
|
|
23
|
-
shrink: "max-content",
|
|
24
|
-
};
|
|
25
|
-
containerStyles[templateKeys[direction]] = layoutTemplate
|
|
26
|
-
.map(key => templateValues[key])
|
|
27
|
-
.join(" ");
|
|
28
|
-
return containerStyles;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Flex as F };
|
package/dist/Flex.js
DELETED
package/dist/Form-6a161b07.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { a as __awaiter } from './tslib.es6-c563c1dd.js';
|
|
2
|
-
import React, { forwardRef, useEffect, useImperativeHandle } from 'react';
|
|
3
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
4
|
-
|
|
5
|
-
const Form = forwardRef(function InternalForm({ onSubmit, children, onStateChange }, ref) {
|
|
6
|
-
const methods = useForm({ mode: "onTouched" });
|
|
7
|
-
const { trigger, handleSubmit, formState: { isDirty, isValid, errors }, } = methods;
|
|
8
|
-
useEffect(() => onStateChange && onStateChange({ isDirty, isValid }), [isDirty, isValid]);
|
|
9
|
-
useImperativeHandle(ref, () => ({
|
|
10
|
-
/**
|
|
11
|
-
* The `trigger()` method can also accept an array
|
|
12
|
-
* of fields to validate. We may at some point want
|
|
13
|
-
* to consider adding a `validate()` method to the
|
|
14
|
-
* `Form` component.
|
|
15
|
-
*/
|
|
16
|
-
submit: () => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const valid = yield trigger();
|
|
18
|
-
if (valid) {
|
|
19
|
-
submitHandler();
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
trigger();
|
|
23
|
-
errorHandler(errors);
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
}));
|
|
27
|
-
/**
|
|
28
|
-
* If an onSubmit is not passed into a form, it will only be used
|
|
29
|
-
* for validation. For that, we do not need to wrap it in a <form>
|
|
30
|
-
* tag. This allows the <Form> component to be used in legacy code.
|
|
31
|
-
*/
|
|
32
|
-
const Wrapper = onSubmit ? "form" : "div";
|
|
33
|
-
const formProps = {
|
|
34
|
-
onSubmit: onSubmit && handleSubmit(submitHandler, errorHandler),
|
|
35
|
-
};
|
|
36
|
-
return (React.createElement(FormProvider, Object.assign({}, methods),
|
|
37
|
-
React.createElement(Wrapper, Object.assign({}, formProps, { "data-testid": "atlantis-form" }), children)));
|
|
38
|
-
function submitHandler() {
|
|
39
|
-
onSubmit && onSubmit();
|
|
40
|
-
}
|
|
41
|
-
function errorHandler(errs) {
|
|
42
|
-
const firstErrName = Object.keys(errs)[0];
|
|
43
|
-
const element = document.querySelector(`[name="${firstErrName}"]`);
|
|
44
|
-
element === null || element === void 0 ? void 0 : element.focus();
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export { Form as F };
|
package/dist/Form.cjs
DELETED
package/dist/Form.js
DELETED