@jobber/components 4.91.2-retheme-fe.1 → 4.91.2-retheme-fe.3
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/dist/AnimatedPresence/{index.js → index.cjs} +1 -3
- package/dist/AnimatedPresence/index.mjs +4 -0
- package/dist/AnimatedPresence-Dg0rSWmK.js +98 -0
- package/dist/{AnimatedPresence-20a02aaa.js → AnimatedPresence-kepj98O9.js} +3 -7
- package/dist/AnimatedSwitcher/index.cjs +11 -0
- package/dist/AnimatedSwitcher/index.mjs +5 -0
- package/dist/AnimatedSwitcher-B5GlT1r8.js +90 -0
- package/dist/{AnimatedSwitcher-3d45ec5d.js → AnimatedSwitcher-DkWeBaXx.js} +4 -8
- package/dist/AtlantisContext/{index.js → index.cjs} +1 -3
- package/dist/AtlantisContext/index.mjs +2 -0
- package/dist/AtlantisContext-BB6fVGP7.js +18 -0
- package/dist/Autocomplete/index.cjs +32 -0
- package/dist/Autocomplete/index.mjs +26 -0
- package/dist/Autocomplete-4jTEXjzp.js +192 -0
- package/dist/Autocomplete-B892iXrS.js +190 -0
- package/dist/Avatar/index.cjs +12 -0
- package/dist/Avatar/index.mjs +6 -0
- package/dist/Avatar-BcTE1VAK.js +69 -0
- package/dist/Avatar-D99qNu2q.js +67 -0
- package/dist/Banner/components/BannerIcon/index.cjs +11 -0
- package/dist/Banner/components/BannerIcon/index.mjs +5 -0
- package/dist/Banner/index.cjs +22 -0
- package/dist/Banner/index.mjs +16 -0
- package/dist/Banner-DXiLDPyP.js +66 -0
- package/dist/Banner-aDyK7ryS.js +68 -0
- package/dist/BannerIcon-CR5zIp9W.js +17 -0
- package/dist/BannerIcon-DaWJs7AC.js +14 -0
- package/dist/Body-CsnvKsQJ.js +45 -0
- package/dist/Body-Di3_1N_g.js +54 -0
- package/dist/Button/index.cjs +13 -0
- package/dist/Button/index.mjs +7 -0
- package/dist/Button-CrxxoYQF.js +49 -0
- package/dist/Button-DzwBVzGv.js +47 -0
- package/dist/ButtonDismiss/index.cjs +14 -0
- package/dist/ButtonDismiss/index.mjs +8 -0
- package/dist/ButtonDismiss-D77VYrSx.js +8 -0
- package/dist/ButtonDismiss-mNxpZX9b.js +10 -0
- package/dist/Card/index.cjs +20 -0
- package/dist/Card/index.mjs +14 -0
- package/dist/Card-BIuX0d8F.js +83 -0
- package/dist/Card-D3BWz4zt.js +81 -0
- package/dist/Checkbox/index.cjs +15 -0
- package/dist/Checkbox/index.mjs +9 -0
- package/dist/Checkbox-BeOyeqVV.js +53 -0
- package/dist/Checkbox-CgTUkcUJ.js +55 -0
- package/dist/Chip/hooks/index.cjs +8 -0
- package/dist/Chip/hooks/index.mjs +2 -0
- package/dist/Chip/index.cjs +26 -0
- package/dist/Chip/index.mjs +18 -0
- package/dist/Chip-BO6LPeGJ.js +67 -0
- package/dist/Chip-rCOZOjwt.js +70 -0
- package/dist/ChipDismissible-7huIAOo1.js +19 -0
- package/dist/ChipDismissible-CGJCNiKU.js +22 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +23 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +13 -0
- package/dist/Chips/InternalChipDismissible/index.cjs +35 -0
- package/dist/Chips/InternalChipDismissible/index.mjs +29 -0
- package/dist/Chips/index.cjs +48 -0
- package/dist/Chips/index.mjs +44 -0
- package/dist/Chips-BKPjQDju.js +93 -0
- package/dist/Chips-nzWX1NfH.js +91 -0
- package/dist/Combobox/components/ComboboxAction/index.cjs +12 -0
- package/dist/Combobox/components/ComboboxAction/index.mjs +6 -0
- package/dist/Combobox/components/ComboboxActivator/index.cjs +27 -0
- package/dist/Combobox/components/ComboboxActivator/index.mjs +21 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/index.cjs +14 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/index.mjs +8 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.cjs +24 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.mjs +18 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.cjs +10 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.mjs +4 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.cjs +9 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.mjs +3 -0
- package/dist/Combobox/components/ComboboxContent/index.cjs +34 -0
- package/dist/Combobox/components/ComboboxContent/index.mjs +28 -0
- package/dist/Combobox/components/ComboboxOption/index.cjs +14 -0
- package/dist/Combobox/components/ComboboxOption/index.mjs +8 -0
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +25 -0
- package/dist/Combobox/components/ComboboxTrigger/index.mjs +19 -0
- package/dist/Combobox/index.cjs +53 -0
- package/dist/Combobox/index.mjs +46 -0
- package/dist/Combobox-CPFiAWN6.js +117 -0
- package/dist/Combobox-ChHMTRwV.js +119 -0
- package/dist/ComboboxAction-C8vgEtWx.js +22 -0
- package/dist/ComboboxAction-CMtTeU6U.js +24 -0
- package/dist/ComboboxActivator-D9nXKLfL.js +26 -0
- package/dist/ComboboxActivator-DR2zBEhW.js +28 -0
- package/dist/ComboboxContent-hlcIQRLz.js +143 -0
- package/dist/ComboboxContent-oQDp-dEd.js +145 -0
- package/dist/ComboboxContentHeader-BpyDfau9.js +29 -0
- package/dist/ComboboxContentHeader-CJHYc30F.js +27 -0
- package/dist/ComboboxContentList-B46nuf36.js +75 -0
- package/dist/ComboboxContentList-DdhL57Bj.js +77 -0
- package/dist/ComboboxContentSearch-BgkQYIHq.js +34 -0
- package/dist/ComboboxContentSearch-CG16cjfz.js +32 -0
- package/dist/ComboboxLoadMore-9FgWV4Uv.js +16 -0
- package/dist/ComboboxLoadMore-lwIHDJ3e.js +14 -0
- package/dist/ComboboxOption-BPLxC2h4.js +20 -0
- package/dist/ComboboxOption-CJpTBVXu.js +22 -0
- package/dist/ComboboxProvider-BzFHJNMs.js +10 -0
- package/dist/ComboboxProvider-fgameO9B.js +13 -0
- package/dist/ComboboxTrigger-0H4T-Fa6.js +24 -0
- package/dist/ComboboxTrigger-Bro30eER.js +22 -0
- package/dist/ConfirmationModal/index.cjs +29 -0
- package/dist/ConfirmationModal/index.mjs +23 -0
- package/dist/{ConfirmationModal-6d376450.js → ConfirmationModal-D_79ZcA-.js} +8 -12
- package/dist/ConfirmationModal-iPrJJhaV.js +94 -0
- package/dist/Content/index.cjs +9 -0
- package/dist/Content/index.mjs +3 -0
- package/dist/Content-DbO2GY5M.js +13 -0
- package/dist/Content-DzVNJZsM.js +15 -0
- package/dist/Countdown/index.cjs +11 -0
- package/dist/Countdown/index.mjs +5 -0
- package/dist/Countdown-7LRQSe5O.js +659 -0
- package/dist/Countdown-okI-Yhdd.js +657 -0
- package/dist/DataDump/index.cjs +23 -0
- package/dist/DataDump/index.mjs +17 -0
- package/dist/DataDump-DUj1DcI5.js +17 -0
- package/dist/DataDump-JGAum9NC.js +15 -0
- package/dist/DataList/components/DataListAction/index.cjs +13 -0
- package/dist/DataList/components/DataListAction/index.mjs +7 -0
- package/dist/DataList/components/DataListActions/index.cjs +42 -0
- package/dist/DataList/components/DataListActions/index.mjs +36 -0
- package/dist/DataList/components/DataListActionsMenu/index.cjs +17 -0
- package/dist/DataList/components/DataListActionsMenu/index.mjs +11 -0
- package/dist/DataList/components/DataListBulkActions/index.cjs +45 -0
- package/dist/DataList/components/DataListBulkActions/index.mjs +38 -0
- package/dist/DataList/components/DataListEmptyState/index.cjs +20 -0
- package/dist/DataList/components/DataListEmptyState/index.mjs +13 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +54 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +48 -0
- package/dist/DataList/components/DataListFilters/index.cjs +67 -0
- package/dist/DataList/components/DataListFilters/index.mjs +60 -0
- package/dist/DataList/components/DataListHeader/index.cjs +52 -0
- package/dist/DataList/components/DataListHeader/index.mjs +46 -0
- package/dist/DataList/components/DataListHeaderTile/components/index.cjs +12 -0
- package/dist/DataList/components/DataListHeaderTile/components/index.mjs +6 -0
- package/dist/DataList/components/DataListHeaderTile/index.cjs +20 -0
- package/dist/DataList/components/DataListHeaderTile/index.mjs +14 -0
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/index.cjs +14 -0
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/index.mjs +8 -0
- package/dist/DataList/components/DataListItem/index.cjs +51 -0
- package/dist/DataList/components/DataListItem/index.mjs +45 -0
- package/dist/DataList/components/DataListItemActions/index.cjs +44 -0
- package/dist/DataList/components/DataListItemActions/index.mjs +37 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +25 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +19 -0
- package/dist/DataList/components/DataListItems/index.cjs +52 -0
- package/dist/DataList/components/DataListItems/index.mjs +46 -0
- package/dist/DataList/components/DataListLayout/index.cjs +55 -0
- package/dist/DataList/components/DataListLayout/index.mjs +49 -0
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/index.cjs +9 -0
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/index.mjs +2 -0
- package/dist/DataList/components/DataListLayoutActions/index.cjs +33 -0
- package/dist/DataList/components/DataListLayoutActions/index.mjs +27 -0
- package/dist/DataList/components/DataListLoadMore/index.cjs +21 -0
- package/dist/DataList/components/DataListLoadMore/index.mjs +14 -0
- package/dist/DataList/components/DataListLoadingState/index.cjs +21 -0
- package/dist/DataList/components/DataListLoadingState/index.mjs +13 -0
- package/dist/DataList/components/DataListOverflowFade/index.cjs +11 -0
- package/dist/DataList/components/DataListOverflowFade/index.mjs +4 -0
- package/dist/DataList/components/DataListSearch/index.cjs +33 -0
- package/dist/DataList/components/DataListSearch/index.mjs +25 -0
- package/dist/DataList/components/DataListStatusBar/index.cjs +30 -0
- package/dist/DataList/components/DataListStatusBar/index.mjs +23 -0
- package/dist/DataList/components/DataListStickyHeader/index.cjs +11 -0
- package/dist/DataList/components/DataListStickyHeader/index.mjs +5 -0
- package/dist/DataList/components/DataListTags/index.cjs +12 -0
- package/dist/DataList/components/DataListTags/index.mjs +6 -0
- package/dist/DataList/components/DataListTotalCount/index.cjs +15 -0
- package/dist/DataList/components/DataListTotalCount/index.mjs +8 -0
- package/dist/DataList/context/DataListContext/index.cjs +12 -0
- package/dist/DataList/context/DataListContext/index.mjs +4 -0
- package/dist/DataList/context/DataListLayoutContext/index.cjs +12 -0
- package/dist/DataList/context/DataListLayoutContext/index.mjs +4 -0
- package/dist/DataList/index.cjs +97 -0
- package/dist/DataList/index.mjs +91 -0
- package/dist/DataList-B0YrIckS.js +141 -0
- package/dist/DataList-Dcbo0O6p.js +5 -0
- package/dist/DataList-DfyJDhUn.js +3 -0
- package/dist/DataList-I9cVfKBx.js +139 -0
- package/dist/DataList.const-B-WAZqZm.js +25 -0
- package/dist/DataList.const-DZ5upBs4.js +38 -0
- package/dist/DataList.utils-DKYlINpl.js +168 -0
- package/dist/DataList.utils-DmychB4b.js +161 -0
- package/dist/DataListAction-BTge_0LD.js +37 -0
- package/dist/DataListAction-HGpY_hOu.js +39 -0
- package/dist/DataListActions-CmIwf73f.js +43 -0
- package/dist/DataListActions-D94XxpZM.js +45 -0
- package/dist/DataListActionsMenu-BDlbxRpS.js +57 -0
- package/dist/DataListActionsMenu-DJ0jKNQ9.js +55 -0
- package/dist/DataListBulkActions-CqyhvwO3.js +29 -0
- package/dist/DataListBulkActions-DMU9T6TS.js +26 -0
- package/dist/DataListContext-B9QPGTE9.js +25 -0
- package/dist/DataListContext-CtxUHHfs.js +29 -0
- package/dist/DataListEmptyState-B-6AynZz.js +53 -0
- package/dist/DataListEmptyState-DSrTemd1.js +50 -0
- package/dist/DataListFilters-CVRcWy-9.js +43 -0
- package/dist/DataListFilters-LGIT4RTw.js +46 -0
- package/dist/DataListHeader-CKNSWwQo.js +95 -0
- package/dist/DataListHeader-CfZmYQG2.js +93 -0
- package/dist/DataListHeaderTile-BYDWDG_0.js +81 -0
- package/dist/DataListHeaderTile-I90vRaws.js +79 -0
- package/dist/DataListItem-BuwfdyIq.js +112 -0
- package/dist/DataListItem-EDyh_yml.js +114 -0
- package/dist/DataListItemActions-BcrNy34u.js +29 -0
- package/dist/DataListItemActions-E6TYqr0T.js +32 -0
- package/dist/DataListItemActionsOverflow-BFOFHLmm.js +35 -0
- package/dist/DataListItemActionsOverflow-OJZ4_d_f.js +33 -0
- package/dist/DataListItemClickable-DLS2uEpq.js +45 -0
- package/dist/DataListItemClickable-RGUCPgM5.js +47 -0
- package/dist/DataListItems-BjQ_XDeZ.js +19 -0
- package/dist/DataListItems-CN_kub24.js +21 -0
- package/dist/DataListLayout-BmLJ-mi_.js +19 -0
- package/dist/DataListLayout-kbVmXDsv.js +21 -0
- package/dist/DataListLayoutActions-D7dfXhpA.js +38 -0
- package/dist/DataListLayoutActions-DsqeiOLl.js +36 -0
- package/dist/DataListLayoutContext-CmT-yv31.js +14 -0
- package/dist/DataListLayoutContext-DbIuv3_7.js +8 -0
- package/dist/DataListLayoutContext-Dsm5THEw.js +11 -0
- package/dist/DataListLayoutContext-cLuet6uT.js +18 -0
- package/dist/DataListLoadMore-BXjOjGwa.js +34 -0
- package/dist/DataListLoadMore-C6Of-7M0.js +31 -0
- package/dist/DataListLoadingState-7erg1duA.js +26 -0
- package/dist/DataListLoadingState-Da7RpOd1.js +22 -0
- package/dist/DataListOverflowFade-B2Iz6CsX.js +25 -0
- package/dist/DataListOverflowFade-CzFRYirg.js +22 -0
- package/dist/DataListSearch-DVyuwX2c.js +59 -0
- package/dist/DataListSearch-Dh9PxyQp.js +63 -0
- package/dist/DataListSort-CgGWlSZ0.js +94 -0
- package/dist/DataListSort-Dql37zcM.js +92 -0
- package/dist/DataListSortingOptions-DW9pkdUG.js +37 -0
- package/dist/DataListSortingOptions-Eoovb0ni.js +35 -0
- package/dist/DataListStatusBar-B_NhZoAv.js +22 -0
- package/dist/DataListStatusBar-CoHWwL7-.js +25 -0
- package/dist/DataListStickyHeader-Ba82f3Im.js +25 -0
- package/dist/DataListStickyHeader-DBCXs6Rc.js +23 -0
- package/dist/DataListTags-DH4nIE2K.js +62 -0
- package/dist/DataListTags-scOaXzcs.js +64 -0
- package/dist/DataListTotalCount-DjKf6gMo.js +27 -0
- package/dist/DataListTotalCount-m2VGpCak.js +24 -0
- package/dist/DataTable/index.cjs +36 -0
- package/dist/DataTable/index.mjs +25 -0
- package/dist/DataTable/test-utilities/index.cjs +246 -0
- package/dist/DataTable/test-utilities/index.mjs +238 -0
- package/dist/DataTable-NxjqVEtH.js +238 -0
- package/dist/DataTable-x5RQEyBP.js +236 -0
- package/dist/DatePicker/index.cjs +26 -0
- package/dist/DatePicker/index.mjs +20 -0
- package/dist/DatePicker-BVcHoA7-.js +8554 -0
- package/dist/DatePicker-C8v-Zj4s.js +8551 -0
- package/dist/DayOfMonthSelect--FHzXJDW.js +137 -0
- package/dist/DayOfMonthSelect-C-fPPm2a.js +130 -0
- package/dist/DescriptionList/index.cjs +10 -0
- package/dist/DescriptionList/index.mjs +4 -0
- package/dist/DescriptionList-Cju_ltAl.js +14 -0
- package/dist/DescriptionList-DyycFYga.js +12 -0
- package/dist/Disclosure/index.cjs +17 -0
- package/dist/Disclosure/index.mjs +11 -0
- package/dist/Disclosure-BuGyUy0l.js +33 -0
- package/dist/Disclosure-CMxuffso.js +35 -0
- package/dist/Divider/index.cjs +9 -0
- package/dist/Divider/index.mjs +3 -0
- package/dist/Divider-CCH0JB2B.js +17 -0
- package/dist/Divider-L89PyUsw.js +19 -0
- package/dist/Drawer/index.cjs +17 -0
- package/dist/Drawer/index.mjs +10 -0
- package/dist/DrawerGrid-Bp4NRp42.js +31 -0
- package/dist/DrawerGrid-CZEJyoma.js +28 -0
- package/dist/Emphasis/index.cjs +10 -0
- package/dist/Emphasis/index.mjs +4 -0
- package/dist/Emphasis-BOCpUymX.js +15 -0
- package/dist/Emphasis-DyEYCEeY.js +13 -0
- package/dist/FeatureSwitch/index.cjs +24 -0
- package/dist/FeatureSwitch/index.mjs +18 -0
- package/dist/FeatureSwitch-Be-BLvA7.js +54 -0
- package/dist/FeatureSwitch-vqe0AQ2W.js +52 -0
- package/dist/Flex/index.cjs +9 -0
- package/dist/Flex/index.mjs +3 -0
- package/dist/Flex-DnI4PG_x.js +28 -0
- package/dist/Flex-DqHnYqYa.js +30 -0
- package/dist/Form/index.cjs +10 -0
- package/dist/Form/index.mjs +4 -0
- package/dist/{Form/index.js → Form-Clk5qGl3.js} +3 -9
- package/dist/Form-DVrhZAfE.js +48 -0
- package/dist/FormField/index.cjs +20 -0
- package/dist/FormField/index.mjs +14 -0
- package/dist/FormField-CDoeGp9o.js +261 -0
- package/dist/FormField-Dc7XoE3A.js +263 -0
- package/dist/FormatDate/{index.js → index.cjs} +1 -3
- package/dist/FormatDate/index.mjs +2 -0
- package/dist/FormatDate-B-4ItFF2.js +27 -0
- package/dist/{FormatDate-70ea5b43.js → FormatDate-BSQ5SYSD.js} +1 -5
- package/dist/FormatEmail/index.cjs +9 -0
- package/dist/FormatEmail/index.mjs +3 -0
- package/dist/FormatEmail-BoR_OfTf.js +11 -0
- package/dist/FormatEmail-CoezKTev.js +13 -0
- package/dist/FormatFile/index.cjs +34 -0
- package/dist/FormatFile/index.mjs +28 -0
- package/dist/FormatFile-RCY2HTZX.js +149 -0
- package/dist/FormatFile-YktXX0mA.js +147 -0
- package/dist/FormatRelativeDateTime/index.cjs +8 -0
- package/dist/FormatRelativeDateTime/index.mjs +2 -0
- package/dist/FormatRelativeDateTime-BU_6qDFz.js +64 -0
- package/dist/{FormatRelativeDateTime/index.js → FormatRelativeDateTime-CU2SvOF9.js} +5 -11
- package/dist/FormatTime/index.cjs +8 -0
- package/dist/FormatTime/index.mjs +2 -0
- package/dist/{FormatTime/index.js → FormatTime-BUB6E47S.js} +1 -7
- package/dist/FormatTime-DM6K5QTY.js +29 -0
- package/dist/Gallery/index.cjs +41 -0
- package/dist/Gallery/index.mjs +35 -0
- package/dist/Gallery-CHSQtOX4.js +65 -0
- package/dist/Gallery-Dr48QgPl.js +63 -0
- package/dist/Glimmer/index.cjs +12 -0
- package/dist/Glimmer/index.mjs +5 -0
- package/dist/Glimmer-BG7eX9ml.js +63 -0
- package/dist/Glimmer-C-o8hGKO.js +60 -0
- package/dist/Grid/InternalGridCell/index.cjs +9 -0
- package/dist/Grid/InternalGridCell/index.mjs +2 -0
- package/dist/Grid/index.cjs +14 -0
- package/dist/Grid/index.mjs +7 -0
- package/dist/Grid-D1qStNFU.js +32 -0
- package/dist/Grid-DtxggU52.js +29 -0
- package/dist/Heading/index.cjs +10 -0
- package/dist/Heading/index.mjs +4 -0
- package/dist/Heading-CLboCN8l.js +47 -0
- package/dist/{Heading-a0e38319.js → Heading-D39OfHbk.js} +5 -11
- package/dist/Icon/index.cjs +9 -0
- package/dist/Icon/index.mjs +3 -0
- package/dist/Icon-5T1h0cSC.js +36 -0
- package/dist/Icon-zn-zanGs.js +34 -0
- package/dist/InlineLabel/index.cjs +10 -0
- package/dist/InlineLabel/index.mjs +4 -0
- package/dist/InlineLabel-BSjKYUfv.js +20 -0
- package/dist/InlineLabel-Bw_i26zR.js +18 -0
- package/dist/InputAvatar/index.cjs +26 -0
- package/dist/InputAvatar/index.mjs +20 -0
- package/dist/InputAvatar-BW3GFAXi.js +49 -0
- package/dist/InputAvatar-D_ghJoiU.js +47 -0
- package/dist/InputDate/index.cjs +34 -0
- package/dist/InputDate/index.mjs +28 -0
- package/dist/{InputDate/index.js → InputDate-EhlH_aDw.js} +6 -31
- package/dist/InputDate-zAEoCRbO.js +48 -0
- package/dist/InputEmail/index.cjs +22 -0
- package/dist/InputEmail/index.mjs +15 -0
- package/dist/InputEmail-DMIv0W-U.js +20 -0
- package/dist/InputEmail-Dvxsqv1m.js +23 -0
- package/dist/InputFile/index.cjs +23 -0
- package/dist/InputFile/index.mjs +16 -0
- package/dist/InputFile-2ME4Lx_J.js +1608 -0
- package/dist/InputFile-ApUNeer4.js +1611 -0
- package/dist/InputGroup/index.cjs +9 -0
- package/dist/InputGroup/index.mjs +3 -0
- package/dist/InputGroup-CuMESZ3e.js +23 -0
- package/dist/InputGroup-SgH2Znm3.js +25 -0
- package/dist/InputNumber/index.cjs +21 -0
- package/dist/InputNumber/index.mjs +15 -0
- package/dist/InputNumber-CiVi1adj.js +56 -0
- package/dist/{InputNumber-17d2a045.js → InputNumber-DDZLNzAN.js} +2 -6
- package/dist/InputPassword/index.cjs +21 -0
- package/dist/InputPassword/index.mjs +15 -0
- package/dist/InputPassword-BX5iEGUi.js +19 -0
- package/dist/InputPassword-DSFVkKrW.js +21 -0
- package/dist/InputPhoneNumber/index.cjs +21 -0
- package/dist/InputPhoneNumber/index.mjs +15 -0
- package/dist/InputPhoneNumber-BtGDXTrX.js +94 -0
- package/dist/{InputPhoneNumber/index.js → InputPhoneNumber-D9f6nzaN.js} +7 -27
- package/dist/InputText/index.cjs +22 -0
- package/dist/InputText/index.mjs +16 -0
- package/dist/InputText-DAp8GDBJ.js +96 -0
- package/dist/{InputText-0ce98f14.js → InputText-DJvMLtTA.js} +4 -8
- package/dist/InputTime/index.cjs +26 -0
- package/dist/InputTime/index.mjs +20 -0
- package/dist/{InputTime/index.js → InputTime-BK32ZRmi.js} +5 -25
- package/dist/InputTime-Cwh6bsgB.js +190 -0
- package/dist/InputValidation/index.cjs +14 -0
- package/dist/InputValidation/index.mjs +8 -0
- package/dist/InputValidation-B0ocr1XO.js +20 -0
- package/dist/InputValidation-BxaW-DOL.js +22 -0
- package/dist/InternalChipDismissible-AydwPO6F.js +157 -0
- package/dist/InternalChipDismissible-BNj2lRac.js +152 -0
- package/dist/InternalGridCell-Dx7Dz3Xq.js +34 -0
- package/dist/InternalGridCell-puBI2ZeJ.js +37 -0
- package/dist/LightBox/index.cjs +26 -0
- package/dist/LightBox/index.mjs +20 -0
- package/dist/LightBox-BRZpFYeQ.js +110 -0
- package/dist/LightBox-CPK9oJpX.js +112 -0
- package/dist/Link/index.cjs +8 -0
- package/dist/Link/index.mjs +2 -0
- package/dist/Link-BMm-4O29.js +9 -0
- package/dist/Link-CacM5qqe.js +7 -0
- package/dist/List/index.cjs +27 -0
- package/dist/List/index.mjs +20 -0
- package/dist/List-D-5zOLA5.js +189 -0
- package/dist/List-tRcUMZA6.js +186 -0
- package/dist/Markdown/index.cjs +17 -0
- package/dist/Markdown/index.mjs +11 -0
- package/dist/Markdown-CRV63Nlg.js +19011 -0
- package/dist/Markdown-CjYVzppS.js +19013 -0
- package/dist/Menu/index.cjs +18 -0
- package/dist/Menu/index.mjs +12 -0
- package/dist/Menu-PQAVNqJX.js +128 -0
- package/dist/Menu-wYw5h0bM.js +130 -0
- package/dist/Modal/index.cjs +21 -0
- package/dist/Modal/index.mjs +15 -0
- package/dist/Modal-3fXNhDjb.js +63 -0
- package/dist/Modal-DpZxsqaF.js +61 -0
- package/dist/MultiSelect/index.cjs +16 -0
- package/dist/MultiSelect/index.mjs +10 -0
- package/dist/MultiSelect-BKA4GqeW.js +164 -0
- package/dist/MultiSelect-Bz5m3p2S.js +166 -0
- package/dist/Option-BWUCNzu-.js +15 -0
- package/dist/Option-CiWcXqo-.js +12 -0
- package/dist/Page/index.cjs +31 -0
- package/dist/Page/index.mjs +25 -0
- package/dist/Page-B4qMqVDr.js +56 -0
- package/dist/Page-D4-zBR88.js +58 -0
- package/dist/Popover/index.cjs +17 -0
- package/dist/Popover/index.mjs +11 -0
- package/dist/Popover-CNkUbTvG.js +50 -0
- package/dist/Popover-CxiiucKv.js +48 -0
- package/dist/ProgressBar/index.cjs +9 -0
- package/dist/ProgressBar/index.mjs +3 -0
- package/dist/ProgressBar-BRI8oId0.js +31 -0
- package/dist/ProgressBar-D4cWYAjk.js +33 -0
- package/dist/RadioGroup/index.cjs +12 -0
- package/dist/RadioGroup/index.mjs +5 -0
- package/dist/RadioGroup-BGqrJ6K9.js +39 -0
- package/dist/RadioGroup-Dx1Glowr.js +36 -0
- package/dist/RecurringSelect/components/index.cjs +15 -0
- package/dist/RecurringSelect/components/index.mjs +6 -0
- package/dist/RecurringSelect/index.cjs +35 -0
- package/dist/RecurringSelect/index.mjs +21 -0
- package/dist/RecurringSelect-D8bZAHBs.js +69 -0
- package/dist/RecurringSelect-D9qSmSek.js +71 -0
- package/dist/Select/index.cjs +22 -0
- package/dist/Select/index.mjs +15 -0
- package/dist/Spinner/index.cjs +9 -0
- package/dist/Spinner/index.mjs +3 -0
- package/dist/Spinner-CRjrJ0LO.js +14 -0
- package/dist/Spinner-DBuwcAqL.js +16 -0
- package/dist/StatusIndicator/index.cjs +8 -0
- package/dist/StatusIndicator/index.mjs +2 -0
- package/dist/StatusIndicator-DGvPdP50.js +9 -0
- package/dist/StatusIndicator-egqvK_8I.js +11 -0
- package/dist/StatusLabel/index.cjs +11 -0
- package/dist/StatusLabel/index.mjs +5 -0
- package/dist/StatusLabel-ClNWJSbx.js +16 -0
- package/dist/StatusLabel-gScnhH3r.js +18 -0
- package/dist/Switch/index.cjs +10 -0
- package/dist/Switch/index.mjs +4 -0
- package/dist/Switch-B6FDMgFW.js +48 -0
- package/dist/Switch-B8HlM_QY.js +46 -0
- package/dist/Table/index.cjs +17 -0
- package/dist/Table/index.mjs +4 -0
- package/dist/Tabs/index.cjs +11 -0
- package/dist/Tabs/index.mjs +4 -0
- package/dist/Tabs-BWBhsLmc.js +70 -0
- package/dist/Tabs-CqLdEcw_.js +67 -0
- package/dist/Text/index.cjs +10 -0
- package/dist/Text/index.mjs +4 -0
- package/dist/{Text-f6404c6c.js → Text-C0pm--c0.js} +2 -6
- package/dist/Text-CyaxiLeN.js +25 -0
- package/dist/Toast/index.cjs +16 -0
- package/dist/Toast/index.mjs +10 -0
- package/dist/Tooltip/Tooltip.d.ts +7 -1
- package/dist/Tooltip/Tooltip.types.d.ts +1 -0
- package/dist/Tooltip/index.cjs +14 -0
- package/dist/Tooltip/index.mjs +8 -0
- package/dist/Tooltip/useTooltipPositioning.d.ts +7 -2
- package/dist/Tooltip-Cz3YrniM.js +107 -0
- package/dist/Tooltip-DwJncSM8.js +109 -0
- package/dist/Typography/css/TextColors.css.d.ts +1 -0
- package/dist/Typography/index.cjs +9 -0
- package/dist/Typography/index.mjs +3 -0
- package/dist/Typography-BCKgZ_gv.js +38 -0
- package/dist/Typography-C0YR4XBl.js +36 -0
- package/dist/_baseAssignValue-BUu9BC9H.js +31 -0
- package/dist/_baseAssignValue-DF3A_efn.js +29 -0
- package/dist/_baseEach-CRlnkM7o.js +1069 -0
- package/dist/_baseEach-DVwKXi81.js +1073 -0
- package/dist/_commonjsHelpers-DAuvc7SO.js +36 -0
- package/dist/_commonjsHelpers-jBnpF2iq.js +32 -0
- package/dist/_defineProperty-B3SNVTd_.js +1326 -0
- package/dist/_defineProperty-JMBF-bcO.js +1306 -0
- package/dist/_getTag-5wQIlCbe.js +718 -0
- package/dist/_getTag-BBZ5PchE.js +733 -0
- package/dist/_polyfill-node.process-DT4I8V6P.js +258 -0
- package/dist/_polyfill-node.process-SftmnXC5.js +255 -0
- package/dist/_setToString-D6dO6z5c.js +234 -0
- package/dist/_setToString-Dgouhodc.js +230 -0
- package/dist/debounce-BIIhPHgB.js +332 -0
- package/dist/debounce-D4EqvIGN.js +329 -0
- package/dist/helpers-BQt4cjaM.js +15 -0
- package/dist/helpers-DMMJ1q7H.js +17 -0
- package/dist/index-Bd55olyf.js +1186 -0
- package/dist/index-CkGfA4vx.js +1189 -0
- package/dist/index.cjs +274 -0
- package/dist/index.d.mts +74 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.mjs +161 -0
- package/dist/isObjectLike-BlLIuFVH.js +197 -0
- package/dist/isObjectLike-CAV2cIfa.js +190 -0
- package/dist/isSymbol-BxsxMlnF.js +35 -0
- package/dist/isSymbol-C2J0yjld.js +33 -0
- package/dist/noop-C9vKAtvJ.js +24 -0
- package/dist/noop-D4cCHWII.js +26 -0
- package/dist/showToast-DEz-eIM4.js +96 -0
- package/dist/showToast-d0XdpaJD.js +98 -0
- package/dist/styles.css +8401 -0
- package/dist/tslib.es6-6dmIhJTi.js +102 -0
- package/dist/tslib.es6-sBHgrKO6.js +97 -0
- package/dist/useActiveLayout-EZ1eunvS.js +16 -0
- package/dist/useActiveLayout-VN6ZOkxZ.js +14 -0
- package/dist/useAssert-BHj1OQqJ.js +27 -0
- package/dist/useAssert-knwpkZW0.js +27 -0
- package/dist/useBatchSelect-BTQ9PbXi.js +36 -0
- package/dist/useBatchSelect-C9775spd.js +38 -0
- package/dist/useChildComponent-BLLL1r7O.js +17 -0
- package/dist/useChildComponent-D9yXvtJR.js +15 -0
- package/dist/useFocusTrap-B8ok2cIh.js +74 -0
- package/dist/useFocusTrap-BBkfWfEx.js +74 -0
- package/dist/useInView-Bj_Jl5Bw.js +25 -0
- package/dist/useInView-fsT3lwCU.js +25 -0
- package/dist/useIsMounted-CYEXH1zH.js +47 -0
- package/dist/useIsMounted-Dcw7g7-d.js +47 -0
- package/dist/useOnKeyDown-DN2YGzzl.js +40 -0
- package/dist/useOnKeyDown-DrmWnz2G.js +40 -0
- package/dist/useRefocusOnActivator-DA8gO9ka.js +32 -0
- package/dist/useRefocusOnActivator-y6qNNjZw.js +32 -0
- package/dist/useResizeObserver-8FUujV3_.js +1192 -0
- package/dist/useResizeObserver-CatrBt7i.js +1189 -0
- package/dist/useResponsiveSizing--fEPoUpK.js +51 -0
- package/dist/useResponsiveSizing-Dh343Vot.js +49 -0
- package/dist/useSafeLayoutEffect-BQD8SqX2.js +12 -0
- package/dist/useSafeLayoutEffect-DOMGt2wv.js +14 -0
- package/dist/useScrollToActive-Cgc9Gsx0.js +597 -0
- package/dist/useScrollToActive-gryn6oCp.js +591 -0
- package/package.json +411 -11
- package/{rollup.config.js → rollup.config.mjs} +49 -17
- package/dist/AnimatedSwitcher/index.js +0 -13
- package/dist/Autocomplete/index.js +0 -214
- package/dist/Avatar/index.js +0 -15
- package/dist/Avatar-a5a90da9.js +0 -78
- package/dist/Banner/index.js +0 -111
- package/dist/Button/index.js +0 -16
- package/dist/Button-dd7ed8c3.js +0 -57
- package/dist/ButtonDismiss/index.js +0 -17
- package/dist/ButtonDismiss-4a7b9762.js +0 -14
- package/dist/Card/index.js +0 -24
- package/dist/Card-0d37c3cc.js +0 -93
- package/dist/Checkbox/index.js +0 -18
- package/dist/Checkbox-d769e1d4.js +0 -63
- package/dist/Chip/index.js +0 -42
- package/dist/Chip-5c2af757.js +0 -89
- package/dist/Chips/index.js +0 -525
- package/dist/Combobox/index.js +0 -41
- package/dist/Combobox-7320bde1.js +0 -481
- package/dist/ConfirmationModal/index.js +0 -32
- package/dist/Content/index.js +0 -12
- package/dist/Content-e3f7b6fc.js +0 -24
- package/dist/Countdown/index.js +0 -72
- package/dist/DataDump/index.js +0 -37
- package/dist/DataList/index.js +0 -1346
- package/dist/DataTable/index.js +0 -301
- package/dist/DatePicker/index.js +0 -21
- package/dist/DatePicker-62d46877.js +0 -144
- package/dist/DescriptionList/index.js +0 -24
- package/dist/Disclosure/index.js +0 -46
- package/dist/Divider/index.js +0 -29
- package/dist/Drawer/index.js +0 -50
- package/dist/Emphasis/index.js +0 -13
- package/dist/Emphasis-c01b5d06.js +0 -19
- package/dist/FeatureSwitch/index.js +0 -71
- package/dist/Flex/index.js +0 -12
- package/dist/Flex-d490c4db.js +0 -38
- package/dist/FormField/index.js +0 -24
- package/dist/FormField-223ccc74.js +0 -253
- package/dist/FormatEmail/index.js +0 -23
- package/dist/FormatFile/index.js +0 -37
- package/dist/FormatFile-e6f1b4e0.js +0 -162
- package/dist/Gallery/index.js +0 -101
- package/dist/Glimmer/index.js +0 -15
- package/dist/Glimmer-156bb2d1.js +0 -77
- package/dist/Grid/index.js +0 -76
- package/dist/Heading/index.js +0 -15
- package/dist/Icon/index.js +0 -11
- package/dist/Icon-405a216c.js +0 -40
- package/dist/InlineLabel/index.js +0 -13
- package/dist/InlineLabel-0d6c7ade.js +0 -28
- package/dist/InputAvatar/index.js +0 -70
- package/dist/InputEmail/index.js +0 -43
- package/dist/InputFile/index.js +0 -25
- package/dist/InputFile-daaa5a05.js +0 -190
- package/dist/InputGroup/index.js +0 -12
- package/dist/InputGroup-8d4fd4eb.js +0 -33
- package/dist/InputNumber/index.js +0 -25
- package/dist/InputPassword/index.js +0 -41
- package/dist/InputText/index.js +0 -26
- package/dist/InputValidation/index.js +0 -17
- package/dist/InputValidation-01b22c68.js +0 -29
- package/dist/LightBox/index.js +0 -25
- package/dist/LightBox-370d7aa6.js +0 -121
- package/dist/Link/index.js +0 -15
- package/dist/List/index.js +0 -94
- package/dist/Markdown/index.js +0 -20
- package/dist/Markdown-6d53b503.js +0 -62
- package/dist/Menu/index.js +0 -21
- package/dist/Menu-98d76ebe.js +0 -139
- package/dist/Modal/index.js +0 -26
- package/dist/Modal-2ae9fe22.js +0 -74
- package/dist/MultiSelect/index.js +0 -182
- package/dist/Option-6c06237b.js +0 -19
- package/dist/Page/index.js +0 -78
- package/dist/Popover/index.js +0 -65
- package/dist/ProgressBar/index.js +0 -12
- package/dist/ProgressBar-e4bb029e.js +0 -43
- package/dist/RadioGroup/index.js +0 -15
- package/dist/RadioGroup-77aff819.js +0 -46
- package/dist/RecurringSelect/index.js +0 -227
- package/dist/Select/index.js +0 -26
- package/dist/Spinner/index.js +0 -12
- package/dist/Spinner-e15a3ae0.js +0 -24
- package/dist/StatusIndicator/index.js +0 -11
- package/dist/StatusIndicator-dd1f0fd5.js +0 -18
- package/dist/StatusLabel/index.js +0 -28
- package/dist/Switch/index.js +0 -13
- package/dist/Switch-37dc9331.js +0 -56
- package/dist/Table/index.js +0 -66
- package/dist/Tabs/index.js +0 -80
- package/dist/Text/index.js +0 -13
- package/dist/Toast/index.js +0 -111
- package/dist/Tooltip/index.js +0 -17
- package/dist/Tooltip-f353204e.js +0 -114
- package/dist/Typography/index.js +0 -12
- package/dist/Typography-224ae794.js +0 -62
- package/dist/style-inject.es-9d2f5f4e.js +0 -30
- package/dist/tslib.es6-754e2961.js +0 -46
- package/dist/useAtlantisConfig-ed0bee66.js +0 -16
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/dist/{AtlantisContext-64608897.js → AtlantisContext-k356LtVM.js} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-6dmIhJTi.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var reactHookForm = require('react-hook-form');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var Button = require('./Button-CrxxoYQF.js');
|
|
8
|
+
var Icon = require('./Icon-5T1h0cSC.js');
|
|
9
|
+
var Text = require('./Text-C0pm--c0.js');
|
|
10
|
+
var InputValidation = require('./InputValidation-BxaW-DOL.js');
|
|
11
|
+
var Spinner = require('./Spinner-DBuwcAqL.js');
|
|
12
|
+
|
|
13
|
+
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-"};
|
|
14
|
+
|
|
15
|
+
var useShowClear$1 = {};
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(useShowClear$1, "__esModule", { value: true });
|
|
18
|
+
var useShowClear_2 = useShowClear$1.useShowClear = void 0;
|
|
19
|
+
function useShowClear({ clearable, multiline, focused, hasValue, disabled = false, }) {
|
|
20
|
+
if (multiline && clearable !== "never") {
|
|
21
|
+
throw new Error("Multiline inputs can not be clearable");
|
|
22
|
+
}
|
|
23
|
+
// Do not show if there is no value
|
|
24
|
+
if (!hasValue || clearable === "never" || disabled) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
switch (clearable) {
|
|
28
|
+
case "while-editing":
|
|
29
|
+
return focused;
|
|
30
|
+
case "always":
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
useShowClear_2 = useShowClear$1.useShowClear = useShowClear;
|
|
35
|
+
|
|
36
|
+
function AffixLabel({ label, variation = "prefix", labelRef, }) {
|
|
37
|
+
const affixLabelClass = classnames(styles$1.affixLabel, {
|
|
38
|
+
[styles$1.suffix]: variation === "suffix",
|
|
39
|
+
});
|
|
40
|
+
return (React.createElement("div", { ref: labelRef, className: affixLabelClass }, label));
|
|
41
|
+
}
|
|
42
|
+
function AffixIcon({ icon, onClick, ariaLabel, variation = "prefix", size, }) {
|
|
43
|
+
const affixIconClass = classnames(styles$1.affixIcon, {
|
|
44
|
+
[styles$1.suffix]: variation === "suffix",
|
|
45
|
+
[styles$1.hasAction]: onClick,
|
|
46
|
+
});
|
|
47
|
+
const iconSize = size === "small" ? "small" : "base";
|
|
48
|
+
if (!icon)
|
|
49
|
+
return React.createElement(React.Fragment, null);
|
|
50
|
+
return (React.createElement("div", { className: affixIconClass }, onClick ? (React.createElement(Button.Button
|
|
51
|
+
/**
|
|
52
|
+
* We can cast the ariaLabel here as a `Suffix`
|
|
53
|
+
* requires an ariaLabel if there is an action
|
|
54
|
+
*/
|
|
55
|
+
, {
|
|
56
|
+
/**
|
|
57
|
+
* We can cast the ariaLabel here as a `Suffix`
|
|
58
|
+
* requires an ariaLabel if there is an action
|
|
59
|
+
*/
|
|
60
|
+
ariaLabel: ariaLabel, icon: icon, onClick: onClick, variation: "subtle", type: "tertiary", size: iconSize })) : (React.createElement(Icon.Icon, { name: icon, size: iconSize, color: "greyBlue" }))));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function FormFieldDescription({ id, description, }) {
|
|
64
|
+
return (React.createElement("div", { id: id, className: styles$1.description },
|
|
65
|
+
React.createElement(Text.Text, { size: "small", variation: "subdued" }, description)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var styles = {"clearContainer":"_07kZJ5ltI5E-","clearInput":"t1fFX8kDJh8-"};
|
|
69
|
+
|
|
70
|
+
function ClearAction({ onClick }) {
|
|
71
|
+
return (React.createElement("div", { className: styles.clearContainer },
|
|
72
|
+
React.createElement("button", { className: styles.clearInput, onClick: onClick, type: "button", "aria-label": "Clear input" },
|
|
73
|
+
React.createElement(Icon.Icon, { name: "remove", size: "small" }))));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function FormFieldWrapper({ align, description, descriptionIdentifier, placeholder, value, children, invalid, error, size, prefix, suffix, max, maxLength, type, disabled, inline, identifier, clearable, onClear, }) {
|
|
77
|
+
const wrapperClasses = classnames(styles$1.wrapper, size && styles$1[size], align && styles$1[align], {
|
|
78
|
+
[styles$1.miniLabel]: (placeholder && value !== "") ||
|
|
79
|
+
(placeholder && type === "select") ||
|
|
80
|
+
// Naively assume that if the the type is tel, it is the InputPhoneNumber
|
|
81
|
+
(placeholder && type === "tel"),
|
|
82
|
+
[styles$1.textarea]: type === "textarea",
|
|
83
|
+
[styles$1.select]: type === "select",
|
|
84
|
+
[styles$1.invalid]: invalid !== null && invalid !== void 0 ? invalid : error,
|
|
85
|
+
[styles$1.disabled]: disabled,
|
|
86
|
+
[styles$1.maxLength]: maxLength,
|
|
87
|
+
[styles$1.timeInputLabel]: placeholder && type === "time" && placeholder && value === "",
|
|
88
|
+
});
|
|
89
|
+
const containerClasses = classnames(styles$1.container, {
|
|
90
|
+
[styles$1.inline]: inline,
|
|
91
|
+
});
|
|
92
|
+
const wrapperInlineStyle = {
|
|
93
|
+
["--formField-maxLength"]: maxLength || max,
|
|
94
|
+
};
|
|
95
|
+
const prefixRef = React.useRef();
|
|
96
|
+
const suffixRef = React.useRef();
|
|
97
|
+
const [labelStyle, setLabelStyle] = React.useState({
|
|
98
|
+
paddingLeft: undefined,
|
|
99
|
+
paddingRight: undefined,
|
|
100
|
+
});
|
|
101
|
+
React.useEffect(() => {
|
|
102
|
+
setLabelStyle(getAffixPaddding);
|
|
103
|
+
}, [value]);
|
|
104
|
+
const [focused, setFocused] = React.useState(false);
|
|
105
|
+
const showClear = useShowClear_2({
|
|
106
|
+
clearable,
|
|
107
|
+
multiline: type === "textarea",
|
|
108
|
+
focused,
|
|
109
|
+
hasValue: Boolean(value),
|
|
110
|
+
disabled,
|
|
111
|
+
});
|
|
112
|
+
return (React.createElement("div", { className: containerClasses, onFocus: () => setFocused(true), onBlur: () => setFocused(false) },
|
|
113
|
+
React.createElement("div", { className: wrapperClasses, style: wrapperInlineStyle, "data-testid": "Form-Field-Wrapper" },
|
|
114
|
+
(prefix === null || prefix === void 0 ? void 0 : prefix.icon) && React.createElement(AffixIcon, Object.assign({}, prefix, { size: size })),
|
|
115
|
+
React.createElement("div", { className: styles$1.inputWrapper },
|
|
116
|
+
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)
|
|
117
|
+
? labelStyle
|
|
118
|
+
: undefined }, placeholder)),
|
|
119
|
+
(prefix === null || prefix === void 0 ? void 0 : prefix.label) && React.createElement(AffixLabel, Object.assign({}, prefix, { labelRef: prefixRef })),
|
|
120
|
+
React.createElement("div", { className: styles$1.childrenWrapper }, children),
|
|
121
|
+
(suffix === null || suffix === void 0 ? void 0 : suffix.label) && (React.createElement(AffixLabel, Object.assign({}, suffix, { labelRef: suffixRef, variation: "suffix" })))),
|
|
122
|
+
showClear && React.createElement(ClearAction, { onClick: onClear }),
|
|
123
|
+
(suffix === null || suffix === void 0 ? void 0 : suffix.icon) && (React.createElement(AffixIcon, Object.assign({}, suffix, { variation: "suffix", size: size })))),
|
|
124
|
+
description && !inline && (React.createElement(FormFieldDescription, { id: descriptionIdentifier, description: description })),
|
|
125
|
+
error && !inline && React.createElement(InputValidation.InputValidation, { message: error })));
|
|
126
|
+
function getAffixPaddding() {
|
|
127
|
+
const hasValue = value !== "";
|
|
128
|
+
const newPadding = {
|
|
129
|
+
paddingLeft: undefined,
|
|
130
|
+
paddingRight: undefined,
|
|
131
|
+
};
|
|
132
|
+
// Naively assume that if the the type is tel, it is the InputPhoneNumber
|
|
133
|
+
if (type === "tel")
|
|
134
|
+
return newPadding;
|
|
135
|
+
if ((prefixRef === null || prefixRef === void 0 ? void 0 : prefixRef.current) && !hasValue) {
|
|
136
|
+
const { offsetWidth } = prefixRef.current;
|
|
137
|
+
newPadding.paddingLeft = offset(offsetWidth);
|
|
138
|
+
}
|
|
139
|
+
if ((suffixRef === null || suffixRef === void 0 ? void 0 : suffixRef.current) && !hasValue) {
|
|
140
|
+
const { offsetWidth } = suffixRef.current;
|
|
141
|
+
newPadding.paddingRight = offset(offsetWidth);
|
|
142
|
+
}
|
|
143
|
+
function offset(width) {
|
|
144
|
+
return `calc(${width}px + var(--space-smallest)`;
|
|
145
|
+
}
|
|
146
|
+
return newPadding;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function FormFieldPostFix({ variation }) {
|
|
151
|
+
return (React.createElement("span", { className: styles$1.postfix }, variation === "select" ? (React.createElement(Icon.Icon, { name: "arrowDown" })) : (React.createElement(Spinner.Spinner, { size: "small" }))));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Added 13th statement to accommodate getErrorMessage function
|
|
155
|
+
/*eslint max-statements: ["error", 13]*/
|
|
156
|
+
function FormField(props) {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
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;
|
|
159
|
+
const { control, formState: { errors }, setValue, watch, } = reactHookForm.useFormContext() != undefined
|
|
160
|
+
? reactHookForm.useFormContext()
|
|
161
|
+
: // If there isn't a Form Context being provided, get a form for this field.
|
|
162
|
+
reactHookForm.useForm({ mode: "onTouched" });
|
|
163
|
+
const [identifier] = React.useState(React.useId());
|
|
164
|
+
const [descriptionIdentifier] = React.useState(`descriptionUUID--${React.useId()}`);
|
|
165
|
+
/**
|
|
166
|
+
* Generate a name if one is not supplied, this is the name
|
|
167
|
+
* that will be used for react-hook-form and not neccessarily
|
|
168
|
+
* attached to the DOM
|
|
169
|
+
*/
|
|
170
|
+
const [controlledName] = React.useState(name ? name : `generatedName--${identifier}`);
|
|
171
|
+
React.useEffect(() => {
|
|
172
|
+
if (value != undefined) {
|
|
173
|
+
setValue(controlledName, value);
|
|
174
|
+
}
|
|
175
|
+
}, [value, watch(controlledName)]);
|
|
176
|
+
React.useImperativeHandle(actionsRef, () => ({
|
|
177
|
+
setValue: newValue => {
|
|
178
|
+
setValue(controlledName, newValue, { shouldValidate: true });
|
|
179
|
+
},
|
|
180
|
+
}));
|
|
181
|
+
const message = (_a = errors[controlledName]) === null || _a === void 0 ? void 0 : _a.message;
|
|
182
|
+
const error = getErrorMessage();
|
|
183
|
+
React.useEffect(() => handleValidation(), [error]);
|
|
184
|
+
return (React.createElement(reactHookForm.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) => {
|
|
185
|
+
var _b = _a.field, { onChange: onControllerChange, onBlur: onControllerBlur, name: controllerName } = _b, rest = tslib_es6.__rest(_b, ["onChange", "onBlur", "name"]);
|
|
186
|
+
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 &&
|
|
187
|
+
!inline && { "aria-describedby": descriptionIdentifier }));
|
|
188
|
+
const textFieldProps = Object.assign(Object.assign({}, fieldProps), { onKeyDown: handleKeyDown });
|
|
189
|
+
return (React.createElement(FormFieldWrapper, Object.assign({}, props, { value: rest.value, error: error, identifier: identifier, descriptionIdentifier: descriptionIdentifier, clearable: clearable, onClear: handleClear }), renderField()));
|
|
190
|
+
function renderField() {
|
|
191
|
+
switch (type) {
|
|
192
|
+
case "select":
|
|
193
|
+
return (React.createElement(React.Fragment, null,
|
|
194
|
+
React.createElement("select", Object.assign({}, fieldProps), children),
|
|
195
|
+
React.createElement(FormFieldPostFix, { variation: "select" })));
|
|
196
|
+
case "textarea":
|
|
197
|
+
return (React.createElement("textarea", Object.assign({}, textFieldProps, { rows: rows, ref: inputRef })));
|
|
198
|
+
default:
|
|
199
|
+
return (React.createElement(React.Fragment, null,
|
|
200
|
+
React.createElement("input", Object.assign({}, textFieldProps, { autoComplete: setAutocomplete(autocomplete), type: type, maxLength: maxLength, max: max, min: min, ref: inputRef, onKeyUp: onKeyUp })),
|
|
201
|
+
loading && React.createElement(FormFieldPostFix, { variation: "spinner" }),
|
|
202
|
+
children));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function handleClear() {
|
|
206
|
+
var _a;
|
|
207
|
+
handleBlur();
|
|
208
|
+
setValue(controlledName, undefined, { shouldValidate: true });
|
|
209
|
+
onChange && onChange("");
|
|
210
|
+
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
211
|
+
}
|
|
212
|
+
function handleChange(event) {
|
|
213
|
+
let newValue;
|
|
214
|
+
newValue = event.currentTarget.value;
|
|
215
|
+
if (type === "number" && newValue.length > 0) {
|
|
216
|
+
newValue = parseFloat(newValue);
|
|
217
|
+
}
|
|
218
|
+
onChange && onChange(newValue, event);
|
|
219
|
+
onControllerChange(event);
|
|
220
|
+
}
|
|
221
|
+
function handleKeyDown(event) {
|
|
222
|
+
if (!onEnter)
|
|
223
|
+
return;
|
|
224
|
+
if (event.key !== "Enter")
|
|
225
|
+
return;
|
|
226
|
+
if (event.shiftKey || event.ctrlKey)
|
|
227
|
+
return;
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
onEnter && onEnter(event);
|
|
230
|
+
}
|
|
231
|
+
function handleFocus(event) {
|
|
232
|
+
const target = event.currentTarget;
|
|
233
|
+
if (target.select) {
|
|
234
|
+
setTimeout(() => readonly && target.select());
|
|
235
|
+
}
|
|
236
|
+
onFocus && onFocus();
|
|
237
|
+
}
|
|
238
|
+
function handleBlur() {
|
|
239
|
+
onBlur && onBlur();
|
|
240
|
+
onControllerBlur();
|
|
241
|
+
}
|
|
242
|
+
} }));
|
|
243
|
+
function getErrorMessage() {
|
|
244
|
+
if (typeof message === "string") {
|
|
245
|
+
return message;
|
|
246
|
+
}
|
|
247
|
+
return "";
|
|
248
|
+
}
|
|
249
|
+
function handleValidation() {
|
|
250
|
+
onValidation && onValidation(error);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function setAutocomplete(autocompleteSetting) {
|
|
254
|
+
if (autocompleteSetting === true) {
|
|
255
|
+
return undefined;
|
|
256
|
+
}
|
|
257
|
+
else if (autocompleteSetting === false) {
|
|
258
|
+
return "off";
|
|
259
|
+
}
|
|
260
|
+
return autocompleteSetting;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
exports.FormField = FormField;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 };
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
|
|
5
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
-
|
|
7
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
-
|
|
9
5
|
function FormatDate({ date: inputDate, showYear = true, }) {
|
|
10
6
|
let dateObject;
|
|
11
7
|
if (inputDate instanceof Date) {
|
|
@@ -17,7 +13,7 @@ function FormatDate({ date: inputDate, showYear = true, }) {
|
|
|
17
13
|
else {
|
|
18
14
|
dateObject = new Date(inputDate.year, inputDate.month - 1, inputDate.day);
|
|
19
15
|
}
|
|
20
|
-
return
|
|
16
|
+
return React.createElement(React.Fragment, null, strFormatDate(dateObject, showYear));
|
|
21
17
|
}
|
|
22
18
|
function strFormatDate(date, showYear = true) {
|
|
23
19
|
let formatOptions = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
|
|
4
|
+
var styles = {"email":"Cr7OFSgq9WA-"};
|
|
5
|
+
|
|
6
|
+
function FormatEmail({ email }) {
|
|
7
|
+
const className = classnames(styles.email);
|
|
8
|
+
return React.createElement("address", { className: className }, email);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { FormatEmail as F };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
|
|
6
|
+
var styles = {"email":"Cr7OFSgq9WA-"};
|
|
7
|
+
|
|
8
|
+
function FormatEmail({ email }) {
|
|
9
|
+
const className = classnames(styles.email);
|
|
10
|
+
return React.createElement("address", { className: className }, email);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.FormatEmail = FormatEmail;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var FormatFile = require('../FormatFile-RCY2HTZX.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('classnames');
|
|
6
|
+
require('filesize');
|
|
7
|
+
require('../Button-CrxxoYQF.js');
|
|
8
|
+
require('react-router-dom');
|
|
9
|
+
require('../Icon-5T1h0cSC.js');
|
|
10
|
+
require('@jobber/design');
|
|
11
|
+
require('../Typography-BCKgZ_gv.js');
|
|
12
|
+
require('../ConfirmationModal-D_79ZcA-.js');
|
|
13
|
+
require('../useOnKeyDown-DN2YGzzl.js');
|
|
14
|
+
require('../Modal-3fXNhDjb.js');
|
|
15
|
+
require('react-dom');
|
|
16
|
+
require('framer-motion');
|
|
17
|
+
require('../useRefocusOnActivator-y6qNNjZw.js');
|
|
18
|
+
require('../useFocusTrap-BBkfWfEx.js');
|
|
19
|
+
require('../Heading-D39OfHbk.js');
|
|
20
|
+
require('../ButtonDismiss-mNxpZX9b.js');
|
|
21
|
+
require('../Content-DzVNJZsM.js');
|
|
22
|
+
require('../Markdown-CjYVzppS.js');
|
|
23
|
+
require('../Text-C0pm--c0.js');
|
|
24
|
+
require('../Emphasis-BOCpUymX.js');
|
|
25
|
+
require('../index-CkGfA4vx.js');
|
|
26
|
+
require('../_commonjsHelpers-DAuvc7SO.js');
|
|
27
|
+
require('../_polyfill-node.process-DT4I8V6P.js');
|
|
28
|
+
require('../Glimmer-BG7eX9ml.js');
|
|
29
|
+
require('../tslib.es6-6dmIhJTi.js');
|
|
30
|
+
require('../ProgressBar-D4cWYAjk.js');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.FormatFile = FormatFile.FormatFile;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { F as FormatFile } from '../FormatFile-YktXX0mA.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import 'filesize';
|
|
5
|
+
import '../Button-DzwBVzGv.js';
|
|
6
|
+
import 'react-router-dom';
|
|
7
|
+
import '../Icon-zn-zanGs.js';
|
|
8
|
+
import '@jobber/design';
|
|
9
|
+
import '../Typography-C0YR4XBl.js';
|
|
10
|
+
import '../ConfirmationModal-iPrJJhaV.js';
|
|
11
|
+
import '../useOnKeyDown-DrmWnz2G.js';
|
|
12
|
+
import '../Modal-DpZxsqaF.js';
|
|
13
|
+
import 'react-dom';
|
|
14
|
+
import 'framer-motion';
|
|
15
|
+
import '../useRefocusOnActivator-DA8gO9ka.js';
|
|
16
|
+
import '../useFocusTrap-B8ok2cIh.js';
|
|
17
|
+
import '../Heading-CLboCN8l.js';
|
|
18
|
+
import '../ButtonDismiss-D77VYrSx.js';
|
|
19
|
+
import '../Content-DbO2GY5M.js';
|
|
20
|
+
import '../Markdown-CRV63Nlg.js';
|
|
21
|
+
import '../Text-CyaxiLeN.js';
|
|
22
|
+
import '../Emphasis-DyEYCEeY.js';
|
|
23
|
+
import '../index-Bd55olyf.js';
|
|
24
|
+
import '../_commonjsHelpers-jBnpF2iq.js';
|
|
25
|
+
import '../_polyfill-node.process-SftmnXC5.js';
|
|
26
|
+
import '../Glimmer-C-o8hGKO.js';
|
|
27
|
+
import '../tslib.es6-sBHgrKO6.js';
|
|
28
|
+
import '../ProgressBar-BRI8oId0.js';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var getHumanReadableFileSize = require('filesize');
|
|
6
|
+
var Button = require('./Button-CrxxoYQF.js');
|
|
7
|
+
var ConfirmationModal = require('./ConfirmationModal-D_79ZcA-.js');
|
|
8
|
+
var Glimmer = require('./Glimmer-BG7eX9ml.js');
|
|
9
|
+
var Icon = require('./Icon-5T1h0cSC.js');
|
|
10
|
+
var Typography = require('./Typography-BCKgZ_gv.js');
|
|
11
|
+
var Text = require('./Text-C0pm--c0.js');
|
|
12
|
+
var ProgressBar = require('./ProgressBar-D4cWYAjk.js');
|
|
13
|
+
|
|
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
|
+
|
|
16
|
+
function FormatFileDeleteButton({ size, onDelete }) {
|
|
17
|
+
const buttonSize = size === "base" ? "small" : "base";
|
|
18
|
+
const [deleteConfirmationOpen, setDeleteConfirmationOpen] = React.useState(false);
|
|
19
|
+
return (React.createElement(React.Fragment, null,
|
|
20
|
+
React.createElement(Button.Button, { onClick: () => setDeleteConfirmationOpen(true), variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: buttonSize }),
|
|
21
|
+
React.createElement(ConfirmationModal.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) })));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var styles$1 = {"content":"M9Y7sOk6lTc-","hasName":"E4wclxY71oM-","large":"yReSfaruAh0-","fileName":"YXN92rsh2eU-","base":"psaqxO2Lu7E-"};
|
|
25
|
+
|
|
26
|
+
var styles = {"image":"_62D0xyydQwo-","fadeIn":"_5GIEBejwNJc-","hidden":"a5EQqLlJmCk-"};
|
|
27
|
+
|
|
28
|
+
function InternalThumbnailImage({ file }) {
|
|
29
|
+
const { name, src } = file;
|
|
30
|
+
const [imageSource, setImageSource] = React.useState();
|
|
31
|
+
const [imageLoaded, setImageLoaded] = React.useState(false);
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
src().then(url => setImageSource(url));
|
|
34
|
+
}, []);
|
|
35
|
+
return (React.createElement(React.Fragment, null,
|
|
36
|
+
!imageLoaded && React.createElement(Glimmer.Glimmer, { size: "auto" }),
|
|
37
|
+
React.createElement("img", { src: imageSource, onLoad: handleImageLoad, alt: name, "data-testid": "internalThumbnailImage", className: classnames(styles.image, { [styles.hidden]: !imageLoaded }) })));
|
|
38
|
+
function handleImageLoad() {
|
|
39
|
+
setImageLoaded(true);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// This function comes from MDN: https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator
|
|
44
|
+
function getClientBrowser(userAgent) {
|
|
45
|
+
// The order matters here, and this may report false positives for unlisted browsers.
|
|
46
|
+
if (userAgent.includes("Firefox")) {
|
|
47
|
+
// "Mozilla/5.0 (X11; Linux i686; rv:104.0) Gecko/20100101 Firefox/104.0"
|
|
48
|
+
return "Mozilla Firefox";
|
|
49
|
+
}
|
|
50
|
+
else if (userAgent.includes("SamsungBrowser")) {
|
|
51
|
+
// "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"
|
|
52
|
+
return "Samsung Internet";
|
|
53
|
+
}
|
|
54
|
+
else if (userAgent.includes("Opera") || userAgent.includes("OPR")) {
|
|
55
|
+
// "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"
|
|
56
|
+
return "Opera";
|
|
57
|
+
}
|
|
58
|
+
else if (userAgent.includes("Edge")) {
|
|
59
|
+
// "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"
|
|
60
|
+
return "Microsoft Edge (Legacy)";
|
|
61
|
+
}
|
|
62
|
+
else if (userAgent.includes("Edg")) {
|
|
63
|
+
// "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"
|
|
64
|
+
return "Microsoft Edge (Chromium)";
|
|
65
|
+
}
|
|
66
|
+
else if (userAgent.includes("Chrome")) {
|
|
67
|
+
// "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
|
|
68
|
+
return "Google Chrome or Chromium";
|
|
69
|
+
}
|
|
70
|
+
else if (userAgent.includes("Safari")) {
|
|
71
|
+
// "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"
|
|
72
|
+
return "Apple Safari";
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return "unknown";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function isSafari(userAgent) {
|
|
79
|
+
return getClientBrowser(userAgent) === "Apple Safari";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function InternalThumbnail({ compact = false, size, file, }) {
|
|
83
|
+
const { name, type } = file;
|
|
84
|
+
const iconName = getIconNameFromType(type);
|
|
85
|
+
const hasName = Boolean(name) && compact;
|
|
86
|
+
const nonHeicImage = !type.startsWith("image/heic");
|
|
87
|
+
const userAgent = typeof document === "undefined" ? "" : window.navigator.userAgent;
|
|
88
|
+
if (type.startsWith("image/") && (nonHeicImage || isSafari(userAgent))) {
|
|
89
|
+
return React.createElement(InternalThumbnailImage, { file: file });
|
|
90
|
+
}
|
|
91
|
+
return (React.createElement("div", { className: classnames(styles$1.content, styles$1[size], {
|
|
92
|
+
[styles$1.hasName]: hasName,
|
|
93
|
+
}) },
|
|
94
|
+
React.createElement(Icon.Icon, { name: iconName, color: "greyBlue", size: size }),
|
|
95
|
+
hasName && (React.createElement("div", { className: styles$1.fileName },
|
|
96
|
+
React.createElement(Typography.Typography, { element: "span", textColor: "text", numberOfLines: 1 }, name)))));
|
|
97
|
+
}
|
|
98
|
+
function getIconNameFromType(mimeType) {
|
|
99
|
+
if (mimeType.startsWith("image/"))
|
|
100
|
+
return "image";
|
|
101
|
+
if (mimeType.startsWith("video/"))
|
|
102
|
+
return "video";
|
|
103
|
+
switch (mimeType) {
|
|
104
|
+
case "application/pdf":
|
|
105
|
+
return "pdf";
|
|
106
|
+
case "application/vnd.ms-excel":
|
|
107
|
+
return "excel";
|
|
108
|
+
default:
|
|
109
|
+
return "file";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function FormatFile({ file, display = "expanded", displaySize = "base", onDelete, onClick, }) {
|
|
114
|
+
const isComplete = file.progress >= 1;
|
|
115
|
+
const fileSize = getHumanReadableFileSize(file.size);
|
|
116
|
+
const wrapperClassNames = classnames(styles$2[display], {
|
|
117
|
+
[styles$2[displaySize]]: display === "compact",
|
|
118
|
+
});
|
|
119
|
+
const DetailsContainer = isComplete && onClick ? "button" : "div";
|
|
120
|
+
const detailsClassNames = classnames(styles$2.wrapper, {
|
|
121
|
+
[styles$2[displaySize]]: display === "compact",
|
|
122
|
+
[styles$2.hoverable]: isHoverable({ display, isComplete, onClick, onDelete }),
|
|
123
|
+
[styles$2.clickable]: onClick,
|
|
124
|
+
[styles$2.deleteable]: display === "compact",
|
|
125
|
+
});
|
|
126
|
+
const thumbnailContainerClassNames = classnames(styles$2.thumbnail, styles$2[displaySize]);
|
|
127
|
+
return (React.createElement("div", { className: wrapperClassNames },
|
|
128
|
+
React.createElement(DetailsContainer, { type: "button", className: detailsClassNames, onClick: isComplete ? onClick : undefined, tabIndex: 0, "aria-busy": !isComplete },
|
|
129
|
+
React.createElement("div", { className: thumbnailContainerClassNames },
|
|
130
|
+
React.createElement(InternalThumbnail, { key: file.key, compact: display === "compact", file: file, size: displaySize }),
|
|
131
|
+
!isComplete && (React.createElement("div", { className: styles$2.progress },
|
|
132
|
+
React.createElement(ProgressBar.ProgressBar, { size: "small", currentStep: file.progress * 100, totalSteps: 100 })))),
|
|
133
|
+
display === "expanded" && (React.createElement("div", { className: styles$2.contentBlock },
|
|
134
|
+
React.createElement(Text.Text, { size: "base" }, file.name),
|
|
135
|
+
React.createElement(Text.Text, { size: "small" }, fileSize)))),
|
|
136
|
+
isComplete && onDelete && (React.createElement("div", { className: styles$2.deleteButton },
|
|
137
|
+
React.createElement(FormatFileDeleteButton, { size: display === "expanded" ? "large" : displaySize, onDelete: onDelete })))));
|
|
138
|
+
}
|
|
139
|
+
function isHoverable({ display, isComplete, onClick, onDelete, }) {
|
|
140
|
+
if (display === "compact") {
|
|
141
|
+
return Boolean(isComplete && (onClick || onDelete));
|
|
142
|
+
}
|
|
143
|
+
else if (display === "expanded") {
|
|
144
|
+
return Boolean(isComplete && onClick);
|
|
145
|
+
}
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
exports.FormatFile = FormatFile;
|