@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
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { _ as __rest } from './tslib.es6-c563c1dd.js';
|
|
2
|
-
import React, { useRef, useState, useEffect, useId, useImperativeHandle } from 'react';
|
|
3
|
-
import { useFormContext, useForm, Controller } from 'react-hook-form';
|
|
4
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
5
|
-
import classnames from 'classnames';
|
|
6
|
-
import { useShowClear } from '@jobber/hooks/useShowClear';
|
|
7
|
-
import { B as Button } from './Button-30154871.js';
|
|
8
|
-
import { I as Icon } from './Icon-22723fe6.js';
|
|
9
|
-
import { T as Text } from './Text-c92ddeb3.js';
|
|
10
|
-
import { I as InputValidation } from './InputValidation-fe42fc3f.js';
|
|
11
|
-
import { S as Spinner } from './Spinner-90081e20.js';
|
|
12
|
-
|
|
13
|
-
var css_248z$1 = ":root {\n /**\n * These `--public-field` properties are used in other components such\n * as InputGroup, therefore they must stay on :root\n **/\n --public-field--top-left-radius: var(--radius-base);\n --public-field--top-right-radius: var(--radius-base);\n --public-field--bottom-left-radius: var(--radius-base);\n --public-field--bottom-right-radius: var(--radius-base);\n\n --field--placeholder-color: var(--color-greyBlue--light);\n --field--value-color: var(--color-heading);\n --field--border-color: var(--color-border);\n}\n\n.geR7qBhrMfk- {\n width: 100%;\n}\n\n/**\n * Wrapper\n **/\n\n.nPGhTEEzsoU- {\n --field--placeholder-offset: 50%;\n --field--placeholder-transform: -50%;\n\n --field--textAlign: left;\n\n --field--height: var(--space-largest);\n\n --field--padding-top: calc(var(--space-base) - var(--space-smallest));\n --field--padding-bottom: calc(var(--space-base) - var(--space-smallest));\n --field--padding-left: var(--space-base);\n --field--padding-right: var(--space-base);\n\n --field--value-lineHeight: calc(var(--base-unit) * 1.25);\n\n --field--background-color: var(--color-surface);\n\n --field--base-elevation: var(--elevation-base);\n --field--label-elevation: calc(var(--field--base-elevation) + 1);\n --field--postfix-elevation: calc(var(--field--base-elevation) - 1);\n --field--postfix-action-elevation: calc(var(--field--base-elevation) + 2);\n\n display: -ms-flexbox;\n\n display: flex;\n width: 100%;\n height: var(--space-largest);\n height: var(--field--height);\n border: var(--border-base) solid var(--color-border);\n border: var(--border-base) solid var(--field--border-color);\n border-radius: var(--radius-base);\n border-top-right-radius: var(--radius-base);\n border-top-right-radius: var(--public-field--top-right-radius);\n border-bottom-right-radius: var(--radius-base);\n border-bottom-right-radius: var(--public-field--bottom-right-radius);\n border-bottom-left-radius: var(--radius-base);\n border-bottom-left-radius: var(--public-field--bottom-left-radius);\n border-top-left-radius: var(--radius-base);\n border-top-left-radius: var(--public-field--top-left-radius);\n color: var(--color-heading);\n color: var(--field--value-color);\n font-size: var(--typography--fontSize-base);\n background-color: var(--color-surface);\n background-color: var(--field--background-color);\n}\n\n.nPGhTEEzsoU- * {\n box-sizing: border-box;\n}\n\n.nPGhTEEzsoU-:focus-within {\n position: relative;\n z-index: var(--field--base-elevation);\n box-shadow: var(--shadow-focus);\n}\n\n.YhserUiOeFE-:not(:focus-within) input {\n color: var(--field--background-color);\n -webkit-text-fill-color: var(--field--background-color);\n}\n\n.YhserUiOeFE-:focus-within,\n.UIZq8hTmJVU- {\n --field--placeholder-color: var(--color-text--secondary);\n --field--placeholder-offset: var(--space-smallest);\n --field--placeholder-transform: 0;\n --field--padding-top: calc(var(--space-base) + var(--space-smaller));\n --field--padding-bottom: var(--space-small);\n}\n\n.YhserUiOeFE-.Ku8sWS0mLew-:focus-within,\n.UIZq8hTmJVU-.Ku8sWS0mLew- {\n --field--padding-top: calc(var(--space-large) + var(--space-smaller));\n}\n\n.nPGhTEEzsoU-.mgPacJ6Z71Y- {\n --field--placeholder-offset: 0;\n --field--placeholder-transform: 0;\n height: auto;\n min-height: auto;\n}\n\n.gJ-15M615eY-,\n.gJ-15M615eY-:focus-within {\n --field--border-color: var(--color-critical);\n position: relative;\n}\n\n._1rsTLm5GwcM- {\n --field--placeholder-color: var(--color-disabled);\n --field--value-color: var(--color-disabled);\n --field--background-color: var(--color-surface--background);\n --field--border-color: var(--color-disabled--secondary);\n}\n\n/* override iOS default styling for disabled input */\n\n._1rsTLm5GwcM- :disabled {\n -webkit-text-fill-color: var(--color-heading);\n -webkit-text-fill-color: var(--field--value-color);\n opacity: 1;\n}\n\n.o8D-H-lKfDk- {\n --field--padding-left: calc(var(--space-base) - var(--space-smaller));\n --field--padding-right: calc(var(--space-base) - var(--space-smaller));\n --field--padding-top: var(--space-small);\n --field--padding-bottom: var(--space-small);\n --field--height: calc(var(--space-larger) + var(--space-smaller));\n}\n\n.Ku8sWS0mLew- {\n --field--padding-left: var(--space-large);\n --field--padding-right: var(--space-large);\n --field--height: calc(var(--space-extravagant));\n}\n\n._5Hu2F3cBvng- {\n display: inline-block;\n width: auto;\n}\n\n.s1WLQs6ffD8- {\n --field--textAlign: center;\n}\n\n.a2r4QheWYIA- {\n --field--textAlign: right;\n}\n\n/**\n * The custom property --formField-maxLength is getting defined inside the\n * component.\n */\n\n.KdAnXK1gClo- {\n width: calc(\n (var(--base-unit) * var(--formField-maxLength)) + var(--field--padding-left) +\n var(--field--padding-right)\n );\n}\n\n/**\n * Input Wrapper\n **/\n\n.iQFhpFYnz-8- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 1;\n flex: 1;\n position: relative;\n /* Ensure input stays with the rest of the element stack */\n z-index: var(--elevation-default);\n}\n\n.Yo2Wi9dpa-Y- {\n position: relative;\n -ms-flex: 1;\n flex: 1;\n}\n\n/**\n * Input\n **/\n\n.LSHPV7PwOTg- {\n position: relative;\n z-index: var(--field--base-elevation);\n width: 100%;\n height: 100%;\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n border: none;\n border-radius: 0;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n background: transparent;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.LSHPV7PwOTg-:focus {\n outline: none;\n}\n\n.mgPacJ6Z71Y- .LSHPV7PwOTg- {\n resize: vertical;\n}\n\n.i31GQXcMz54- .LSHPV7PwOTg- {\n z-index: var(--field--label-elevation);\n}\n\n.LSHPV7PwOTg-:-webkit-autofill,\n.LSHPV7PwOTg-:-webkit-autofill:hover,\n.LSHPV7PwOTg-:-webkit-autofill:focus,\n.LSHPV7PwOTg-:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px var(--color-surface) inset !important;\n}\n\n/**\n * Label\n **/\n\n._3xREbTN5pPg- {\n position: absolute;\n top: var(--field--placeholder-offset);\n z-index: var(--field--label-elevation);\n width: 100%;\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n overflow: hidden;\n color: var(--color-greyBlue--light);\n color: var(--field--placeholder-color);\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n -webkit-transform: translateY(var(--field--placeholder-transform));\n transform: translateY(var(--field--placeholder-transform));\n transition: all var(--timing-quick);\n}\n\n.mgPacJ6Z71Y- ._3xREbTN5pPg- {\n /* Changes the width so that the scrollbar on the textarea doesn't get cut off */\n width: calc(100% - var(--field--padding-right));\n padding-top: var(--field--padding-top);\n /* Remove padding on right to make use of the entire width */\n padding-right: 0;\n -webkit-transform: translateY(--field--placeholder-transform);\n transform: translateY(--field--placeholder-transform);\n}\n\n.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-:focus-within ._3xREbTN5pPg- {\n font-size: var(--typography--fontSize-small);\n}\n\n.mgPacJ6Z71Y-.UIZq8hTmJVU- ._3xREbTN5pPg- {\n padding-top: var(--space-smallest);\n background-color: var(--field--background-color);\n}\n\n.o8D-H-lKfDk-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.o8D-H-lKfDk-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n display: none;\n}\n\n/**This is valid cascading order **/\n\n/* stylelint-disable-next-line no-descending-specificity */\n\n.Ku8sWS0mLew-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.Ku8sWS0mLew-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n padding-top: var(--space-small);\n}\n\n/**\n * Postfix\n **/\n\n.VtnAk1HYMMk- {\n position: absolute;\n top: 50%;\n right: var(--space-base);\n z-index: var(--field--postfix-elevation);\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n/**\n * Affix\n **/\n\n.uPLklxvtfJw- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0 calc(var(--field--padding-left) * -1) 0 0;\n padding: 0 var(--field--padding-right) 0 var(--field--padding-left);\n}\n\n@supports (aspect-ratio: 1/1) {\n .uPLklxvtfJw- {\n /*\n * disabling property-no-unknown here as this is a real property\n * that stylelint just doesn't know about. We may be able to remove\n * this when we update our stylelint to not care about IE11.\n */\n /* stylelint-disable-next-line property-no-unknown */\n aspect-ratio: 1/1;\n padding: 0;\n }\n}\n\n.uPLklxvtfJw-.pYqqDvv57JE- {\n margin: 0 0 0 calc(var(--field--padding-right) * -1);\n}\n\n.uPLklxvtfJw-.eI44oQpuVlk- {\n position: relative;\n z-index: var(--field--postfix-action-elevation);\n}\n\n.jO8P2iSHilM- {\n display: -ms-flexbox;\n display: flex;\n margin: 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1) 0 0;\n padding: 0 0 0 var(--field--padding-left);\n line-height: var(--field--value-lineHeight);\n -ms-flex-align: center;\n align-items: center;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n\n.jO8P2iSHilM-.pYqqDvv57JE- {\n margin: 0 0 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1);\n padding: 0 var(--field--padding-left) 0 0;\n}\n\n.UIZq8hTmJVU-:not(.o8D-H-lKfDk-) .jO8P2iSHilM- {\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n}\n\n._2GfgzNnLOSI- {\n margin-top: var(--space-smaller);\n}\n";
|
|
14
|
-
var styles$1 = {"container":"geR7qBhrMfk-","wrapper":"nPGhTEEzsoU-","timeInputLabel":"YhserUiOeFE-","miniLabel":"UIZq8hTmJVU-","large":"Ku8sWS0mLew-","textarea":"mgPacJ6Z71Y-","invalid":"gJ-15M615eY-","disabled":"_1rsTLm5GwcM-","small":"o8D-H-lKfDk-","inline":"_5Hu2F3cBvng-","center":"s1WLQs6ffD8-","right":"a2r4QheWYIA-","maxLength":"KdAnXK1gClo-","inputWrapper":"iQFhpFYnz-8-","childrenWrapper":"Yo2Wi9dpa-Y-","input":"LSHPV7PwOTg-","select":"i31GQXcMz54-","label":"_3xREbTN5pPg-","postfix":"VtnAk1HYMMk-","affixIcon":"uPLklxvtfJw-","suffix":"pYqqDvv57JE-","hasAction":"eI44oQpuVlk-","affixLabel":"jO8P2iSHilM-","description":"_2GfgzNnLOSI-"};
|
|
15
|
-
styleInject(css_248z$1);
|
|
16
|
-
|
|
17
|
-
function AffixLabel({ label, variation = "prefix", labelRef, }) {
|
|
18
|
-
const affixLabelClass = classnames(styles$1.affixLabel, {
|
|
19
|
-
[styles$1.suffix]: variation === "suffix",
|
|
20
|
-
});
|
|
21
|
-
return (React.createElement("div", { ref: labelRef, className: affixLabelClass }, label));
|
|
22
|
-
}
|
|
23
|
-
function AffixIcon({ icon, onClick, ariaLabel, variation = "prefix", size, }) {
|
|
24
|
-
const affixIconClass = classnames(styles$1.affixIcon, {
|
|
25
|
-
[styles$1.suffix]: variation === "suffix",
|
|
26
|
-
[styles$1.hasAction]: onClick,
|
|
27
|
-
});
|
|
28
|
-
const iconSize = size === "small" ? "small" : "base";
|
|
29
|
-
if (!icon)
|
|
30
|
-
return React.createElement(React.Fragment, null);
|
|
31
|
-
return (React.createElement("div", { className: affixIconClass }, onClick ? (React.createElement(Button
|
|
32
|
-
/**
|
|
33
|
-
* We can cast the ariaLabel here as a `Suffix`
|
|
34
|
-
* requires an ariaLabel if there is an action
|
|
35
|
-
*/
|
|
36
|
-
, {
|
|
37
|
-
/**
|
|
38
|
-
* We can cast the ariaLabel here as a `Suffix`
|
|
39
|
-
* requires an ariaLabel if there is an action
|
|
40
|
-
*/
|
|
41
|
-
ariaLabel: ariaLabel, icon: icon, onClick: onClick, variation: "subtle", type: "tertiary", size: iconSize })) : (React.createElement(Icon, { name: icon, size: iconSize, color: "greyBlue" }))));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function FormFieldDescription({ id, description, }) {
|
|
45
|
-
return (React.createElement("div", { id: id, className: styles$1.description },
|
|
46
|
-
React.createElement(Text, { size: "small", variation: "subdued" }, description)));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var css_248z = "._07kZJ5ltI5E- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n padding-left: var(--space-small);\n}\n\n.t1fFX8kDJh8- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n right: var(--space-small);\n z-index: var(--elevation-tooltip);\n width: var(--space-large);\n height: var(--space-large);\n padding: 0;\n border: none;\n border-radius: var(--radius-circle);\n background-color: var(--color-surface--background);\n cursor: pointer;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.t1fFX8kDJh8-:focus {\n outline: none;\n}\n\n.t1fFX8kDJh8-:hover,\n.t1fFX8kDJh8-:focus-visible {\n outline: none;\n background-color: var(--color-surface--background);\n}\n\n.t1fFX8kDJh8-:focus-visible {\n box-shadow: var(--shadow-focus);\n}\n";
|
|
50
|
-
var styles = {"clearContainer":"_07kZJ5ltI5E-","clearInput":"t1fFX8kDJh8-"};
|
|
51
|
-
styleInject(css_248z);
|
|
52
|
-
|
|
53
|
-
function ClearAction({ onClick }) {
|
|
54
|
-
return (React.createElement("div", { className: styles.clearContainer },
|
|
55
|
-
React.createElement("button", { className: styles.clearInput, onClick: onClick, type: "button", "aria-label": "Clear input" },
|
|
56
|
-
React.createElement(Icon, { name: "remove", size: "small" }))));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function FormFieldWrapper({ align, description, descriptionIdentifier, placeholder, value, children, invalid, error, size, prefix, suffix, max, maxLength, type, disabled, inline, identifier, clearable, onClear, }) {
|
|
60
|
-
const wrapperClasses = classnames(styles$1.wrapper, size && styles$1[size], align && styles$1[align], {
|
|
61
|
-
[styles$1.miniLabel]: (placeholder && value !== "") ||
|
|
62
|
-
(placeholder && type === "select") ||
|
|
63
|
-
// Naively assume that if the the type is tel, it is the InputPhoneNumber
|
|
64
|
-
(placeholder && type === "tel"),
|
|
65
|
-
[styles$1.textarea]: type === "textarea",
|
|
66
|
-
[styles$1.select]: type === "select",
|
|
67
|
-
[styles$1.invalid]: invalid !== null && invalid !== void 0 ? invalid : error,
|
|
68
|
-
[styles$1.disabled]: disabled,
|
|
69
|
-
[styles$1.maxLength]: maxLength,
|
|
70
|
-
[styles$1.timeInputLabel]: placeholder && type === "time" && placeholder && value === "",
|
|
71
|
-
});
|
|
72
|
-
const containerClasses = classnames(styles$1.container, {
|
|
73
|
-
[styles$1.inline]: inline,
|
|
74
|
-
});
|
|
75
|
-
const wrapperInlineStyle = {
|
|
76
|
-
["--formField-maxLength"]: maxLength || max,
|
|
77
|
-
};
|
|
78
|
-
const prefixRef = useRef();
|
|
79
|
-
const suffixRef = useRef();
|
|
80
|
-
const [labelStyle, setLabelStyle] = useState({
|
|
81
|
-
paddingLeft: undefined,
|
|
82
|
-
paddingRight: undefined,
|
|
83
|
-
});
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
setLabelStyle(getAffixPaddding);
|
|
86
|
-
}, [value]);
|
|
87
|
-
const [focused, setFocused] = useState(false);
|
|
88
|
-
const showClear = useShowClear({
|
|
89
|
-
clearable,
|
|
90
|
-
multiline: type === "textarea",
|
|
91
|
-
focused,
|
|
92
|
-
hasValue: Boolean(value),
|
|
93
|
-
disabled,
|
|
94
|
-
});
|
|
95
|
-
return (React.createElement("div", { className: containerClasses, onFocus: () => setFocused(true), onBlur: () => setFocused(false) },
|
|
96
|
-
React.createElement("div", { className: wrapperClasses, style: wrapperInlineStyle, "data-testid": "Form-Field-Wrapper" },
|
|
97
|
-
(prefix === null || prefix === void 0 ? void 0 : prefix.icon) && React.createElement(AffixIcon, Object.assign({}, prefix, { size: size })),
|
|
98
|
-
React.createElement("div", { className: styles$1.inputWrapper },
|
|
99
|
-
placeholder && (React.createElement("label", { className: styles$1.label, htmlFor: identifier, style: (prefixRef === null || prefixRef === void 0 ? void 0 : prefixRef.current) || (suffixRef === null || suffixRef === void 0 ? void 0 : suffixRef.current)
|
|
100
|
-
? labelStyle
|
|
101
|
-
: undefined }, placeholder)),
|
|
102
|
-
(prefix === null || prefix === void 0 ? void 0 : prefix.label) && React.createElement(AffixLabel, Object.assign({}, prefix, { labelRef: prefixRef })),
|
|
103
|
-
React.createElement("div", { className: styles$1.childrenWrapper }, children),
|
|
104
|
-
(suffix === null || suffix === void 0 ? void 0 : suffix.label) && (React.createElement(AffixLabel, Object.assign({}, suffix, { labelRef: suffixRef, variation: "suffix" })))),
|
|
105
|
-
showClear && React.createElement(ClearAction, { onClick: onClear }),
|
|
106
|
-
(suffix === null || suffix === void 0 ? void 0 : suffix.icon) && (React.createElement(AffixIcon, Object.assign({}, suffix, { variation: "suffix", size: size })))),
|
|
107
|
-
description && !inline && (React.createElement(FormFieldDescription, { id: descriptionIdentifier, description: description })),
|
|
108
|
-
error && !inline && React.createElement(InputValidation, { message: error })));
|
|
109
|
-
function getAffixPaddding() {
|
|
110
|
-
const hasValue = value !== "";
|
|
111
|
-
const newPadding = {
|
|
112
|
-
paddingLeft: undefined,
|
|
113
|
-
paddingRight: undefined,
|
|
114
|
-
};
|
|
115
|
-
// Naively assume that if the the type is tel, it is the InputPhoneNumber
|
|
116
|
-
if (type === "tel")
|
|
117
|
-
return newPadding;
|
|
118
|
-
if ((prefixRef === null || prefixRef === void 0 ? void 0 : prefixRef.current) && !hasValue) {
|
|
119
|
-
const { offsetWidth } = prefixRef.current;
|
|
120
|
-
newPadding.paddingLeft = offset(offsetWidth);
|
|
121
|
-
}
|
|
122
|
-
if ((suffixRef === null || suffixRef === void 0 ? void 0 : suffixRef.current) && !hasValue) {
|
|
123
|
-
const { offsetWidth } = suffixRef.current;
|
|
124
|
-
newPadding.paddingRight = offset(offsetWidth);
|
|
125
|
-
}
|
|
126
|
-
function offset(width) {
|
|
127
|
-
return `calc(${width}px + var(--space-smallest)`;
|
|
128
|
-
}
|
|
129
|
-
return newPadding;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function FormFieldPostFix({ variation }) {
|
|
134
|
-
return (React.createElement("span", { className: styles$1.postfix }, variation === "select" ? (React.createElement(Icon, { name: "arrowDown" })) : (React.createElement(Spinner, { size: "small" }))));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Added 13th statement to accommodate getErrorMessage function
|
|
138
|
-
/*eslint max-statements: ["error", 13]*/
|
|
139
|
-
function FormField(props) {
|
|
140
|
-
var _a, _b;
|
|
141
|
-
const { actionsRef, autocomplete = true, children, defaultValue, description, disabled, inputRef, inline, keyboard, max, maxLength, min, name, readonly, rows, loading, type = "text", validations, value, onChange, onEnter, onFocus, onBlur, onValidation, onKeyUp, clearable = "never", } = props;
|
|
142
|
-
const { control, formState: { errors }, setValue, watch, } = useFormContext() != undefined
|
|
143
|
-
? useFormContext()
|
|
144
|
-
: // If there isn't a Form Context being provided, get a form for this field.
|
|
145
|
-
useForm({ mode: "onTouched" });
|
|
146
|
-
const [identifier] = useState(useId());
|
|
147
|
-
const [descriptionIdentifier] = useState(`descriptionUUID--${useId()}`);
|
|
148
|
-
/**
|
|
149
|
-
* Generate a name if one is not supplied, this is the name
|
|
150
|
-
* that will be used for react-hook-form and not neccessarily
|
|
151
|
-
* attached to the DOM
|
|
152
|
-
*/
|
|
153
|
-
const [controlledName] = useState(name ? name : `generatedName--${identifier}`);
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
if (value != undefined) {
|
|
156
|
-
setValue(controlledName, value);
|
|
157
|
-
}
|
|
158
|
-
}, [value, watch(controlledName)]);
|
|
159
|
-
useImperativeHandle(actionsRef, () => ({
|
|
160
|
-
setValue: newValue => {
|
|
161
|
-
setValue(controlledName, newValue, { shouldValidate: true });
|
|
162
|
-
},
|
|
163
|
-
}));
|
|
164
|
-
const message = (_a = errors[controlledName]) === null || _a === void 0 ? void 0 : _a.message;
|
|
165
|
-
const error = getErrorMessage();
|
|
166
|
-
useEffect(() => handleValidation(), [error]);
|
|
167
|
-
return (React.createElement(Controller, { control: control, name: controlledName, rules: Object.assign({}, validations), defaultValue: (_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : "", render: (_a) => {
|
|
168
|
-
var _b = _a.field, { onChange: onControllerChange, onBlur: onControllerBlur, name: controllerName } = _b, rest = __rest(_b, ["onChange", "onBlur", "name"]);
|
|
169
|
-
const fieldProps = Object.assign(Object.assign(Object.assign({}, rest), { id: identifier, className: styles$1.input, name: (validations || name) && controllerName, disabled: disabled, readOnly: readonly, inputMode: keyboard, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus }), (description &&
|
|
170
|
-
!inline && { "aria-describedby": descriptionIdentifier }));
|
|
171
|
-
const textFieldProps = Object.assign(Object.assign({}, fieldProps), { onKeyDown: handleKeyDown });
|
|
172
|
-
return (React.createElement(FormFieldWrapper, Object.assign({}, props, { value: rest.value, error: error, identifier: identifier, descriptionIdentifier: descriptionIdentifier, clearable: clearable, onClear: handleClear }), renderField()));
|
|
173
|
-
function renderField() {
|
|
174
|
-
switch (type) {
|
|
175
|
-
case "select":
|
|
176
|
-
return (React.createElement(React.Fragment, null,
|
|
177
|
-
React.createElement("select", Object.assign({}, fieldProps), children),
|
|
178
|
-
React.createElement(FormFieldPostFix, { variation: "select" })));
|
|
179
|
-
case "textarea":
|
|
180
|
-
return (React.createElement("textarea", Object.assign({}, textFieldProps, { rows: rows, ref: inputRef })));
|
|
181
|
-
default:
|
|
182
|
-
return (React.createElement(React.Fragment, null,
|
|
183
|
-
React.createElement("input", Object.assign({}, textFieldProps, { autoComplete: setAutocomplete(autocomplete), type: type, maxLength: maxLength, max: max, min: min, ref: inputRef, onKeyUp: onKeyUp })),
|
|
184
|
-
loading && React.createElement(FormFieldPostFix, { variation: "spinner" }),
|
|
185
|
-
children));
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
function handleClear() {
|
|
189
|
-
var _a;
|
|
190
|
-
handleBlur();
|
|
191
|
-
setValue(controlledName, undefined, { shouldValidate: true });
|
|
192
|
-
onChange && onChange("");
|
|
193
|
-
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
194
|
-
}
|
|
195
|
-
function handleChange(event) {
|
|
196
|
-
let newValue;
|
|
197
|
-
newValue = event.currentTarget.value;
|
|
198
|
-
if (type === "number" && newValue.length > 0) {
|
|
199
|
-
newValue = parseFloat(newValue);
|
|
200
|
-
}
|
|
201
|
-
onChange && onChange(newValue, event);
|
|
202
|
-
onControllerChange(event);
|
|
203
|
-
}
|
|
204
|
-
function handleKeyDown(event) {
|
|
205
|
-
if (!onEnter)
|
|
206
|
-
return;
|
|
207
|
-
if (event.key !== "Enter")
|
|
208
|
-
return;
|
|
209
|
-
if (event.shiftKey || event.ctrlKey)
|
|
210
|
-
return;
|
|
211
|
-
event.preventDefault();
|
|
212
|
-
onEnter && onEnter(event);
|
|
213
|
-
}
|
|
214
|
-
function handleFocus(event) {
|
|
215
|
-
const target = event.currentTarget;
|
|
216
|
-
if (target.select) {
|
|
217
|
-
setTimeout(() => readonly && target.select());
|
|
218
|
-
}
|
|
219
|
-
onFocus && onFocus();
|
|
220
|
-
}
|
|
221
|
-
function handleBlur() {
|
|
222
|
-
onBlur && onBlur();
|
|
223
|
-
onControllerBlur();
|
|
224
|
-
}
|
|
225
|
-
} }));
|
|
226
|
-
function getErrorMessage() {
|
|
227
|
-
if (typeof message === "string") {
|
|
228
|
-
return message;
|
|
229
|
-
}
|
|
230
|
-
return "";
|
|
231
|
-
}
|
|
232
|
-
function handleValidation() {
|
|
233
|
-
onValidation && onValidation(error);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
function setAutocomplete(autocompleteSetting) {
|
|
237
|
-
if (autocompleteSetting === true) {
|
|
238
|
-
return undefined;
|
|
239
|
-
}
|
|
240
|
-
else if (autocompleteSetting === false) {
|
|
241
|
-
return "off";
|
|
242
|
-
}
|
|
243
|
-
return autocompleteSetting;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export { FormField as F };
|
package/dist/FormField.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var FormField = require('./FormField-fc30bb1a.js');
|
|
6
|
-
require('./tslib.es6-754e2961.js');
|
|
7
|
-
require('react');
|
|
8
|
-
require('react-hook-form');
|
|
9
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
10
|
-
require('classnames');
|
|
11
|
-
require('@jobber/hooks/useShowClear');
|
|
12
|
-
require('./Button-ec64869e.js');
|
|
13
|
-
require('react-router-dom');
|
|
14
|
-
require('./Icon-405a216c.js');
|
|
15
|
-
require('@jobber/design');
|
|
16
|
-
require('./Typography-fd88fcce.js');
|
|
17
|
-
require('./Text-714f7d14.js');
|
|
18
|
-
require('./InputValidation-4a61254d.js');
|
|
19
|
-
require('framer-motion');
|
|
20
|
-
require('./Spinner-3480bc34.js');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports.FormField = FormField.FormField;
|
package/dist/FormField.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { F as FormField } from './FormField-f1f405d2.js';
|
|
2
|
-
import './tslib.es6-c563c1dd.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react-hook-form';
|
|
5
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@jobber/hooks/useShowClear';
|
|
8
|
-
import './Button-30154871.js';
|
|
9
|
-
import 'react-router-dom';
|
|
10
|
-
import './Icon-22723fe6.js';
|
|
11
|
-
import '@jobber/design';
|
|
12
|
-
import './Typography-52ed1386.js';
|
|
13
|
-
import './Text-c92ddeb3.js';
|
|
14
|
-
import './InputValidation-fe42fc3f.js';
|
|
15
|
-
import 'framer-motion';
|
|
16
|
-
import './Spinner-90081e20.js';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
function FormatDate({ date: inputDate, showYear = true, }) {
|
|
4
|
-
let dateObject;
|
|
5
|
-
if (inputDate instanceof Date) {
|
|
6
|
-
dateObject = inputDate;
|
|
7
|
-
}
|
|
8
|
-
else if (typeof inputDate === "string") {
|
|
9
|
-
dateObject = new Date(inputDate);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
dateObject = new Date(inputDate.year, inputDate.month - 1, inputDate.day);
|
|
13
|
-
}
|
|
14
|
-
return React.createElement(React.Fragment, null, strFormatDate(dateObject, showYear));
|
|
15
|
-
}
|
|
16
|
-
function strFormatDate(date, showYear = true) {
|
|
17
|
-
let formatOptions = {
|
|
18
|
-
month: "short",
|
|
19
|
-
day: "numeric",
|
|
20
|
-
};
|
|
21
|
-
if (showYear) {
|
|
22
|
-
formatOptions = Object.assign(Object.assign({}, formatOptions), { year: "numeric" });
|
|
23
|
-
}
|
|
24
|
-
return date.toLocaleDateString(undefined, formatOptions);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { FormatDate as F, strFormatDate as s };
|
package/dist/FormatDate.js
DELETED
|
@@ -1,14 +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 = ".Cr7OFSgq9WA- {\n font-style: normal;\n}\n";
|
|
6
|
-
var styles = {"email":"Cr7OFSgq9WA-"};
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
function FormatEmail({ email }) {
|
|
10
|
-
const className = classnames(styles.email);
|
|
11
|
-
return React.createElement("address", { className: className }, email);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { FormatEmail as F };
|
package/dist/FormatEmail.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var FormatEmail = require('./FormatEmail-298393bb.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.FormatEmail = FormatEmail.FormatEmail;
|
package/dist/FormatEmail.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import getHumanReadableFileSize from 'filesize';
|
|
4
|
-
import { s as styleInject } from './style-inject.es-a0e1a0ba.js';
|
|
5
|
-
import { B as Button } from './Button-30154871.js';
|
|
6
|
-
import { C as ConfirmationModal } from './ConfirmationModal-64f82a31.js';
|
|
7
|
-
import { G as Glimmer } from './Glimmer-6bf75ae0.js';
|
|
8
|
-
import { I as Icon } from './Icon-22723fe6.js';
|
|
9
|
-
import { T as Typography } from './Typography-52ed1386.js';
|
|
10
|
-
import { T as Text } from './Text-c92ddeb3.js';
|
|
11
|
-
import { P as ProgressBar } from './ProgressBar-022ef3f6.js';
|
|
12
|
-
|
|
13
|
-
var css_248z$2 = ":root {\n --file-card--height: calc(var(--space-base) * 3.5);\n --file-card--background-color: var(--color-white);\n --file-card--header-background-color: var(--color-greyBlue--lighter);\n --file-card--content-background-color: var(--color-white);\n --file-card--border-color: var(--color-border);\n --file-card--accent-color: var(--color-grey);\n --file-card--base-padding: var(--space-small);\n}\n\n.cx4iQqlNNvc- {\n display: grid;\n grid-template-columns: auto -webkit-max-content;\n grid-template-columns: auto max-content;\n gap: var(--space-small);\n grid-gap: var(--space-small);\n grid-gap: var(--file-card--base-padding);\n gap: var(--file-card--base-padding);\n -ms-flex-align: center;\n align-items: center;\n padding-right: var(--space-small);\n border: var(--border-base) solid var(--color-border);\n border: var(--border-base) solid var(--file-card--border-color);\n border-radius: var(--radius-base);\n background-color: var(--color-white);\n background-color: var(--file-card--background-color);\n}\n\n.nSaog7-7Jn0-,\n.cx4iQqlNNvc- {\n position: relative;\n}\n\n._9jVt97W52JY- {\n display: grid;\n grid-template-columns: -webkit-max-content auto;\n grid-template-columns: max-content auto;\n gap: var(--space-small);\n grid-gap: var(--space-small);\n grid-gap: var(--file-card--base-padding);\n gap: var(--file-card--base-padding);\n -ms-flex-align: center;\n align-items: center;\n padding: 0;\n border: none;\n text-align: left;\n background-color: var(--color-transparent);\n}\n\n.z-kUGMs0Yfg- {\n width: 168px;\n height: 168px;\n}\n\n.x1Ql0enaIxY- {\n width: 56px;\n height: 56px;\n}\n\n.il9-MCeoBts- {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n box-sizing: border-box;\n padding: 0;\n overflow: hidden;\n background-color: var(--color-surface--background);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.cx4iQqlNNvc- ._9jVt97W52JY- {\n outline: none;\n}\n\n.nSaog7-7Jn0- ._9jVt97W52JY-:focus {\n box-shadow: var(--shadow-focus);\n outline: none;\n}\n\n.nSaog7-7Jn0- .il9-MCeoBts- {\n border: var(--border-base) solid var(--color-border);\n border-radius: var(--radius-base);\n}\n\n.cx4iQqlNNvc- ._9jVt97W52JY-:focus::after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: var(--shadow-focus);\n}\n\n.cx4iQqlNNvc- .il9-MCeoBts- {\n border-right: none;\n border-bottom-left-radius: var(--radius-base);\n border-top-left-radius: var(--radius-base);\n}\n\n.O9EG-xJYVco- {\n cursor: pointer;\n}\n\n.QmrRp5CTpGU- .il9-MCeoBts-::after,\n.N5qVYfi1Pgo- {\n content: \"\";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--color-overlay);\n opacity: 0;\n transition: all var(--timing-base);\n}\n\n.QmrRp5CTpGU-:hover .il9-MCeoBts-::after,\n.QmrRp5CTpGU-:focus .il9-MCeoBts-::after,\n.N5qVYfi1Pgo- {\n opacity: 1;\n}\n\n.N5qVYfi1Pgo- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n box-sizing: border-box;\n padding: var(--space-small);\n padding: var(--file-card--base-padding);\n}\n\n.TyXXZnJuVwo- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n}\n\n.TyXXZnJuVwo- p {\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.nSaog7-7Jn0- ._7wDO6nPXy-g- {\n position: absolute;\n top: var(--space-smaller);\n right: var(--space-smaller);\n}\n\n.sgUJuNv0rUE- ~ ._7wDO6nPXy-g- {\n visibility: hidden;\n}\n\n._7wDO6nPXy-g-:focus-within,\n._7wDO6nPXy-g-:hover,\n.sgUJuNv0rUE-:hover ~ ._7wDO6nPXy-g-,\n.sgUJuNv0rUE-:focus ~ ._7wDO6nPXy-g- {\n visibility: visible;\n}\n";
|
|
14
|
-
var styles$2 = {"expanded":"cx4iQqlNNvc-","compact":"nSaog7-7Jn0-","wrapper":"_9jVt97W52JY-","large":"z-kUGMs0Yfg-","base":"x1Ql0enaIxY-","thumbnail":"il9-MCeoBts-","clickable":"O9EG-xJYVco-","hoverable":"QmrRp5CTpGU-","progress":"N5qVYfi1Pgo-","contentBlock":"TyXXZnJuVwo-","deleteButton":"_7wDO6nPXy-g-","deleteable":"sgUJuNv0rUE-"};
|
|
15
|
-
styleInject(css_248z$2);
|
|
16
|
-
|
|
17
|
-
function FormatFileDeleteButton({ size, onDelete }) {
|
|
18
|
-
const buttonSize = size === "base" ? "small" : "base";
|
|
19
|
-
const [deleteConfirmationOpen, setDeleteConfirmationOpen] = useState(false);
|
|
20
|
-
return (React.createElement(React.Fragment, null,
|
|
21
|
-
React.createElement(Button, { onClick: () => setDeleteConfirmationOpen(true), variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: buttonSize }),
|
|
22
|
-
React.createElement(ConfirmationModal, { title: "Confirm Deletion", message: `Are you sure you want to delete this file?`, confirmLabel: "Delete", variation: "destructive", open: deleteConfirmationOpen, onConfirm: () => onDelete === null || onDelete === void 0 ? void 0 : onDelete(), onRequestClose: () => setDeleteConfirmationOpen(false) })));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var css_248z$1 = ".M9Y7sOk6lTc- {\n display: grid;\n grid-template-columns: auto;\n grid-template-rows: auto -webkit-max-content;\n grid-template-rows: auto max-content;\n width: inherit;\n height: inherit;\n -ms-flex-align: center;\n align-items: center;\n justify-items: center;\n}\n\n.E4wclxY71oM-:not(.yReSfaruAh0-) {\n -ms-flex-align: end;\n align-items: end;\n}\n\n.YXN92rsh2eU- {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.psaqxO2Lu7E- .YXN92rsh2eU- {\n padding: var(--space-smaller);\n font-size: var(--typography--fontSize-smaller);\n}\n\n.yReSfaruAh0- .YXN92rsh2eU- {\n position: absolute;\n bottom: 0;\n left: 0;\n padding: var(--space-small);\n font-size: var(--typography--fontSize-small);\n}\n";
|
|
26
|
-
var styles$1 = {"content":"M9Y7sOk6lTc-","hasName":"E4wclxY71oM-","large":"yReSfaruAh0-","fileName":"YXN92rsh2eU-","base":"psaqxO2Lu7E-"};
|
|
27
|
-
styleInject(css_248z$1);
|
|
28
|
-
|
|
29
|
-
var css_248z = "._62D0xyydQwo- {\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n -webkit-animation: _5GIEBejwNJc- 200ms ease;\n animation: _5GIEBejwNJc- 200ms ease;\n}\n\n.a5EQqLlJmCk- {\n display: none;\n}\n\n@-webkit-keyframes _5GIEBejwNJc- {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n@keyframes _5GIEBejwNJc- {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n";
|
|
30
|
-
var styles = {"image":"_62D0xyydQwo-","fadeIn":"_5GIEBejwNJc-","hidden":"a5EQqLlJmCk-"};
|
|
31
|
-
styleInject(css_248z);
|
|
32
|
-
|
|
33
|
-
function InternalThumbnailImage({ file }) {
|
|
34
|
-
const { name, src } = file;
|
|
35
|
-
const [imageSource, setImageSource] = useState();
|
|
36
|
-
const [imageLoaded, setImageLoaded] = useState(false);
|
|
37
|
-
if (!imageSource) {
|
|
38
|
-
src().then(url => setImageSource(url));
|
|
39
|
-
}
|
|
40
|
-
return (React.createElement(React.Fragment, null,
|
|
41
|
-
!imageLoaded && React.createElement(Glimmer, { size: "auto" }),
|
|
42
|
-
React.createElement("img", { src: imageSource, onLoad: handleImageLoad, alt: name, "data-testid": "internalThumbnailImage", className: classnames(styles.image, { [styles.hidden]: !imageLoaded }) })));
|
|
43
|
-
function handleImageLoad() {
|
|
44
|
-
setImageLoaded(true);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// This function comes from MDN: https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator
|
|
49
|
-
function getClientBrowser(userAgent) {
|
|
50
|
-
// The order matters here, and this may report false positives for unlisted browsers.
|
|
51
|
-
if (userAgent.includes("Firefox")) {
|
|
52
|
-
// "Mozilla/5.0 (X11; Linux i686; rv:104.0) Gecko/20100101 Firefox/104.0"
|
|
53
|
-
return "Mozilla Firefox";
|
|
54
|
-
}
|
|
55
|
-
else if (userAgent.includes("SamsungBrowser")) {
|
|
56
|
-
// "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G955F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4 Chrome/67.0.3396.87 Mobile Safari/537.36"
|
|
57
|
-
return "Samsung Internet";
|
|
58
|
-
}
|
|
59
|
-
else if (userAgent.includes("Opera") || userAgent.includes("OPR")) {
|
|
60
|
-
// "Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 OPR/90.0.4480.54"
|
|
61
|
-
return "Opera";
|
|
62
|
-
}
|
|
63
|
-
else if (userAgent.includes("Edge")) {
|
|
64
|
-
// "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"
|
|
65
|
-
return "Microsoft Edge (Legacy)";
|
|
66
|
-
}
|
|
67
|
-
else if (userAgent.includes("Edg")) {
|
|
68
|
-
// "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Edg/104.0.1293.70"
|
|
69
|
-
return "Microsoft Edge (Chromium)";
|
|
70
|
-
}
|
|
71
|
-
else if (userAgent.includes("Chrome")) {
|
|
72
|
-
// "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
|
|
73
|
-
return "Google Chrome or Chromium";
|
|
74
|
-
}
|
|
75
|
-
else if (userAgent.includes("Safari")) {
|
|
76
|
-
// "Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Mobile/15E148 Safari/604.1"
|
|
77
|
-
return "Apple Safari";
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
return "unknown";
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function isSafari(userAgent) {
|
|
84
|
-
return getClientBrowser(userAgent) === "Apple Safari";
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function InternalThumbnail({ compact = false, size, file, }) {
|
|
88
|
-
const { name, type } = file;
|
|
89
|
-
const iconName = getIconNameFromType(type);
|
|
90
|
-
const hasName = Boolean(name) && compact;
|
|
91
|
-
const nonHeicImage = !type.startsWith("image/heic");
|
|
92
|
-
const userAgent = typeof document === "undefined" ? "" : window.navigator.userAgent;
|
|
93
|
-
if (type.startsWith("image/") && (nonHeicImage || isSafari(userAgent))) {
|
|
94
|
-
return React.createElement(InternalThumbnailImage, { file: file });
|
|
95
|
-
}
|
|
96
|
-
return (React.createElement("div", { className: classnames(styles$1.content, styles$1[size], {
|
|
97
|
-
[styles$1.hasName]: hasName,
|
|
98
|
-
}) },
|
|
99
|
-
React.createElement(Icon, { name: iconName, color: "greyBlue", size: size }),
|
|
100
|
-
hasName && (React.createElement("div", { className: styles$1.fileName },
|
|
101
|
-
React.createElement(Typography, { element: "span", textColor: "text", numberOfLines: 1 }, name)))));
|
|
102
|
-
}
|
|
103
|
-
function getIconNameFromType(mimeType) {
|
|
104
|
-
if (mimeType.startsWith("image/"))
|
|
105
|
-
return "image";
|
|
106
|
-
if (mimeType.startsWith("video/"))
|
|
107
|
-
return "video";
|
|
108
|
-
switch (mimeType) {
|
|
109
|
-
case "application/pdf":
|
|
110
|
-
return "pdf";
|
|
111
|
-
case "application/vnd.ms-excel":
|
|
112
|
-
return "excel";
|
|
113
|
-
default:
|
|
114
|
-
return "file";
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function FormatFile({ file, display = "expanded", displaySize = "base", onDelete, onClick, }) {
|
|
119
|
-
const isComplete = file.progress >= 1;
|
|
120
|
-
const fileSize = getHumanReadableFileSize(file.size);
|
|
121
|
-
const wrapperClassNames = classnames(styles$2[display], {
|
|
122
|
-
[styles$2[displaySize]]: display === "compact",
|
|
123
|
-
});
|
|
124
|
-
const DetailsContainer = isComplete && onClick ? "button" : "div";
|
|
125
|
-
const detailsClassNames = classnames(styles$2.wrapper, {
|
|
126
|
-
[styles$2[displaySize]]: display === "compact",
|
|
127
|
-
[styles$2.hoverable]: isHoverable({ display, isComplete, onClick, onDelete }),
|
|
128
|
-
[styles$2.clickable]: onClick,
|
|
129
|
-
[styles$2.deleteable]: display === "compact",
|
|
130
|
-
});
|
|
131
|
-
const thumbnailContainerClassNames = classnames(styles$2.thumbnail, styles$2[displaySize]);
|
|
132
|
-
return (React.createElement("div", { className: wrapperClassNames },
|
|
133
|
-
React.createElement(DetailsContainer, { type: "button", className: detailsClassNames, onClick: isComplete ? onClick : undefined, tabIndex: 0, "aria-busy": !isComplete },
|
|
134
|
-
React.createElement("div", { className: thumbnailContainerClassNames },
|
|
135
|
-
React.createElement(InternalThumbnail, { key: file.key, compact: display === "compact", file: file, size: displaySize }),
|
|
136
|
-
!isComplete && (React.createElement("div", { className: styles$2.progress },
|
|
137
|
-
React.createElement(ProgressBar, { size: "small", currentStep: file.progress * 100, totalSteps: 100 })))),
|
|
138
|
-
display === "expanded" && (React.createElement("div", { className: styles$2.contentBlock },
|
|
139
|
-
React.createElement(Text, { size: "base" }, file.name),
|
|
140
|
-
React.createElement(Text, { size: "small" }, fileSize)))),
|
|
141
|
-
isComplete && onDelete && (React.createElement("div", { className: styles$2.deleteButton },
|
|
142
|
-
React.createElement(FormatFileDeleteButton, { size: display === "expanded" ? "large" : displaySize, onDelete: onDelete })))));
|
|
143
|
-
}
|
|
144
|
-
function isHoverable({ display, isComplete, onClick, onDelete, }) {
|
|
145
|
-
if (display === "compact") {
|
|
146
|
-
return Boolean(isComplete && (onClick || onDelete));
|
|
147
|
-
}
|
|
148
|
-
else if (display === "expanded") {
|
|
149
|
-
return Boolean(isComplete && onClick);
|
|
150
|
-
}
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export { FormatFile as F };
|
package/dist/FormatFile.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var FormatFile = require('./FormatFile-d57b8dfa.js');
|
|
6
|
-
require('react');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('filesize');
|
|
9
|
-
require('./style-inject.es-9d2f5f4e.js');
|
|
10
|
-
require('./Button-ec64869e.js');
|
|
11
|
-
require('react-router-dom');
|
|
12
|
-
require('./Icon-405a216c.js');
|
|
13
|
-
require('@jobber/design');
|
|
14
|
-
require('./Typography-fd88fcce.js');
|
|
15
|
-
require('./ConfirmationModal-09ec5d02.js');
|
|
16
|
-
require('@jobber/hooks/useOnKeyDown');
|
|
17
|
-
require('./Modal-cda55f02.js');
|
|
18
|
-
require('react-dom');
|
|
19
|
-
require('framer-motion');
|
|
20
|
-
require('@jobber/hooks/useRefocusOnActivator');
|
|
21
|
-
require('@jobber/hooks/useFocusTrap');
|
|
22
|
-
require('./Heading-a8a24775.js');
|
|
23
|
-
require('./getAtlantisConfig-0f3e8af2.js');
|
|
24
|
-
require('./ButtonDismiss-d7417429.js');
|
|
25
|
-
require('./Content-60a3452a.js');
|
|
26
|
-
require('./Markdown-36854bd5.js');
|
|
27
|
-
require('react-markdown');
|
|
28
|
-
require('./Text-714f7d14.js');
|
|
29
|
-
require('./Emphasis-84de1f3f.js');
|
|
30
|
-
require('./Glimmer-3fcdae65.js');
|
|
31
|
-
require('./tslib.es6-754e2961.js');
|
|
32
|
-
require('./ProgressBar-4ee648b7.js');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
exports.FormatFile = FormatFile.FormatFile;
|
package/dist/FormatFile.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export { F as FormatFile } from './FormatFile-648aea3e.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import 'filesize';
|
|
5
|
-
import './style-inject.es-a0e1a0ba.js';
|
|
6
|
-
import './Button-30154871.js';
|
|
7
|
-
import 'react-router-dom';
|
|
8
|
-
import './Icon-22723fe6.js';
|
|
9
|
-
import '@jobber/design';
|
|
10
|
-
import './Typography-52ed1386.js';
|
|
11
|
-
import './ConfirmationModal-64f82a31.js';
|
|
12
|
-
import '@jobber/hooks/useOnKeyDown';
|
|
13
|
-
import './Modal-eeb52d66.js';
|
|
14
|
-
import 'react-dom';
|
|
15
|
-
import 'framer-motion';
|
|
16
|
-
import '@jobber/hooks/useRefocusOnActivator';
|
|
17
|
-
import '@jobber/hooks/useFocusTrap';
|
|
18
|
-
import './Heading-dfd4f1cf.js';
|
|
19
|
-
import './getAtlantisConfig-5b50057c.js';
|
|
20
|
-
import './ButtonDismiss-a11eef74.js';
|
|
21
|
-
import './Content-c96e9299.js';
|
|
22
|
-
import './Markdown-7b84fcdb.js';
|
|
23
|
-
import 'react-markdown';
|
|
24
|
-
import './Text-c92ddeb3.js';
|
|
25
|
-
import './Emphasis-2a640962.js';
|
|
26
|
-
import './Glimmer-6bf75ae0.js';
|
|
27
|
-
import './tslib.es6-c563c1dd.js';
|
|
28
|
-
import './ProgressBar-022ef3f6.js';
|