@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,139 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-sBHgrKO6.js';
|
|
2
|
+
import React, { useState, useMemo, useRef } from 'react';
|
|
3
|
+
import { s as styles } from './DataList-DfyJDhUn.js';
|
|
4
|
+
import { a as DataListTotalCount } from './DataListTotalCount-m2VGpCak.js';
|
|
5
|
+
import { a as DataListLoadingState } from './DataListLoadingState-Da7RpOd1.js';
|
|
6
|
+
import { D as DataListLayout } from './DataListLayout-BmLJ-mi_.js';
|
|
7
|
+
import { D as DataListHeader } from './DataListHeader-CfZmYQG2.js';
|
|
8
|
+
import { I as InternalDataListFilters, D as DataListFilters } from './DataListFilters-CVRcWy-9.js';
|
|
9
|
+
import { D as DataListStickyHeader } from './DataListStickyHeader-DBCXs6Rc.js';
|
|
10
|
+
import { I as InternalDataListSearch, a as DataListSearch } from './DataListSearch-DVyuwX2c.js';
|
|
11
|
+
import { I as InternalDataListEmptyState, D as DataListEmptyState } from './DataListEmptyState-DSrTemd1.js';
|
|
12
|
+
import { D as DataListLoadMore } from './DataListLoadMore-C6Of-7M0.js';
|
|
13
|
+
import { D as DataListItemActions } from './DataListItemActions-BcrNy34u.js';
|
|
14
|
+
import { D as DataListAction } from './DataListAction-BTge_0LD.js';
|
|
15
|
+
import { D as DataListLayoutActions } from './DataListLayoutActions-DsqeiOLl.js';
|
|
16
|
+
import { D as DataListContext, u as useDataListContext } from './DataListContext-B9QPGTE9.js';
|
|
17
|
+
import { s as sortBreakpoints, g as getCompoundComponent, a as getCompoundComponents } from './DataList.utils-DmychB4b.js';
|
|
18
|
+
import { D as DATA_LIST_FILTERING_SPINNER_TEST_ID } from './DataList.const-B-WAZqZm.js';
|
|
19
|
+
import { D as DataListBulkActions } from './DataListBulkActions-DMU9T6TS.js';
|
|
20
|
+
import { I as InternalDataListStatusBar, D as DataListStatusBar } from './DataListStatusBar-B_NhZoAv.js';
|
|
21
|
+
import { H as Heading } from './Heading-CLboCN8l.js';
|
|
22
|
+
import { S as Spinner } from './Spinner-CRjrJ0LO.js';
|
|
23
|
+
|
|
24
|
+
function DataList(_a) {
|
|
25
|
+
var { selected = [], sorting } = _a, props = __rest(_a, ["selected", "sorting"]);
|
|
26
|
+
const [layouts, setLayouts] = useState({});
|
|
27
|
+
const layoutBreakpoints = useMemo(() => sortBreakpoints(Object.keys(layouts)), [layouts]);
|
|
28
|
+
const searchComponent = getCompoundComponent(props.children, DataListSearch);
|
|
29
|
+
const filterComponent = getCompoundComponent(props.children, DataListFilters);
|
|
30
|
+
const layoutComponents = getCompoundComponents(props.children, DataListLayout);
|
|
31
|
+
const emptyStateComponents = getCompoundComponents(props.children, DataListEmptyState);
|
|
32
|
+
const itemActionComponent = getCompoundComponent(props.children, DataListItemActions);
|
|
33
|
+
const bulkActionsComponent = getCompoundComponent(props.children, DataListBulkActions);
|
|
34
|
+
const headerCount = Object.keys(props.headers).length;
|
|
35
|
+
const shouldRenderStickyHeader = !!filterComponent || !!searchComponent || headerCount > 0;
|
|
36
|
+
return (React.createElement(DataListContext.Provider, { value: Object.assign(Object.assign({ searchComponent,
|
|
37
|
+
filterComponent,
|
|
38
|
+
layoutComponents,
|
|
39
|
+
emptyStateComponents,
|
|
40
|
+
itemActionComponent,
|
|
41
|
+
bulkActionsComponent,
|
|
42
|
+
layoutBreakpoints,
|
|
43
|
+
layouts,
|
|
44
|
+
registerLayout }, props), { selected,
|
|
45
|
+
// T !== DataListObject
|
|
46
|
+
sorting: sorting }) },
|
|
47
|
+
React.createElement(InternalDataList, { shouldRenderStickyHeader: shouldRenderStickyHeader })));
|
|
48
|
+
function registerLayout(size, children) {
|
|
49
|
+
setLayouts(prev => (Object.assign(Object.assign({}, prev), { [size]: children })));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function InternalDataList({ shouldRenderStickyHeader, }) {
|
|
53
|
+
const { data, title, totalCount, loadingState = "none", layoutComponents, } = useDataListContext();
|
|
54
|
+
const backToTopRef = useRef(null);
|
|
55
|
+
const initialLoading = loadingState === "initial";
|
|
56
|
+
const showEmptyState = !initialLoading && data.length === 0;
|
|
57
|
+
const shouldRenderLoadMoreTrigger = !initialLoading && !showEmptyState;
|
|
58
|
+
return (React.createElement("div", { className: styles.wrapper },
|
|
59
|
+
React.createElement("div", { className: styles.titleContainer },
|
|
60
|
+
title && React.createElement(Heading, { level: 3 }, title),
|
|
61
|
+
React.createElement(DataListTotalCount, { totalCount: totalCount, loading: initialLoading })),
|
|
62
|
+
React.createElement("div", { ref: backToTopRef }),
|
|
63
|
+
shouldRenderStickyHeader && (React.createElement(DataListStickyHeader, null,
|
|
64
|
+
React.createElement("div", { className: styles.headerFilters },
|
|
65
|
+
React.createElement(InternalDataListFilters, null),
|
|
66
|
+
React.createElement(InternalDataListSearch, null)),
|
|
67
|
+
React.createElement(InternalDataListStatusBar, null),
|
|
68
|
+
React.createElement(DataListHeader, null))),
|
|
69
|
+
initialLoading && React.createElement(DataListLoadingState, null),
|
|
70
|
+
showEmptyState && React.createElement(InternalDataListEmptyState, null),
|
|
71
|
+
layoutComponents,
|
|
72
|
+
loadingState === "filtering" && (React.createElement("div", { "data-testid": DATA_LIST_FILTERING_SPINNER_TEST_ID, className: styles.filtering },
|
|
73
|
+
React.createElement("div", { className: styles.filteringSpinner },
|
|
74
|
+
React.createElement(Spinner, { size: "small" })))),
|
|
75
|
+
shouldRenderLoadMoreTrigger && (React.createElement(DataListLoadMore, { onBackToTop: handleBackToTop }))));
|
|
76
|
+
function handleBackToTop() {
|
|
77
|
+
var _a;
|
|
78
|
+
// For testing purposes since jest doesn't know scrollIntoView.
|
|
79
|
+
// This prevents consumer's tests from needing to mock scrollIntoView.
|
|
80
|
+
if (!window.HTMLElement.prototype.scrollIntoView)
|
|
81
|
+
return;
|
|
82
|
+
(_a = backToTopRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
83
|
+
behavior: "smooth",
|
|
84
|
+
block: "nearest",
|
|
85
|
+
inline: "start",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Sets the layout that the DataList item and header will use.
|
|
91
|
+
*/
|
|
92
|
+
DataList.Layout = DataListLayout;
|
|
93
|
+
/**
|
|
94
|
+
* By using this component, we can render the actions anywhere in the layout
|
|
95
|
+
* instead of being added automatically on hover.
|
|
96
|
+
*/
|
|
97
|
+
DataList.LayoutActions = DataListLayoutActions;
|
|
98
|
+
/**
|
|
99
|
+
* When the DataList is either empty and/or filtered, this component will be
|
|
100
|
+
* rendered.
|
|
101
|
+
*/
|
|
102
|
+
DataList.EmptyState = DataListEmptyState;
|
|
103
|
+
/**
|
|
104
|
+
* Adds the filter components of your choosing to the DataList.
|
|
105
|
+
*/
|
|
106
|
+
DataList.Filters = DataListFilters;
|
|
107
|
+
/**
|
|
108
|
+
* Enables the search functionality of the DataList.
|
|
109
|
+
*
|
|
110
|
+
* Since the debounce is implemented within the component, it can only be an
|
|
111
|
+
* uncontrolled component. Thus the lack of a `value` prop.
|
|
112
|
+
*/
|
|
113
|
+
DataList.Search = DataListSearch;
|
|
114
|
+
/**
|
|
115
|
+
* Defines the group actions you could do on a single DataList item.
|
|
116
|
+
*/
|
|
117
|
+
DataList.ItemActions = DataListItemActions;
|
|
118
|
+
/**
|
|
119
|
+
* Defines the action in a DataList. This should be used inside the
|
|
120
|
+
* DataListItemActions component.
|
|
121
|
+
*/
|
|
122
|
+
DataList.ItemAction = DataListAction;
|
|
123
|
+
/**
|
|
124
|
+
* Defines the group actions you could do on multiple DataList items.
|
|
125
|
+
*/
|
|
126
|
+
DataList.BatchActions = DataListBulkActions;
|
|
127
|
+
/**
|
|
128
|
+
* Defines the batch action in a DataList. This should be used inside the
|
|
129
|
+
* DataListBatchActions component.
|
|
130
|
+
*/
|
|
131
|
+
DataList.BatchAction = function DataListBatchAction(props) {
|
|
132
|
+
return React.createElement(DataListAction, Object.assign({}, props));
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Defines a status bar that is rendered between the filters and the header.
|
|
136
|
+
*/
|
|
137
|
+
DataList.StatusBar = DataListStatusBar;
|
|
138
|
+
|
|
139
|
+
export { DataList as D };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { tokens } from '@jobber/design';
|
|
2
|
+
|
|
3
|
+
const EMPTY_RESULTS_MESSAGE = "List is looking empty";
|
|
4
|
+
const EMPTY_FILTER_RESULTS_MESSAGE = "No results for selected filters";
|
|
5
|
+
const EMPTY_STATE_ACTION_BUTTON_ONLY_ERROR = "DataListEmptyState action prop must be a Button component";
|
|
6
|
+
/**
|
|
7
|
+
* Breakpoints that we support
|
|
8
|
+
*/
|
|
9
|
+
const BREAKPOINTS = ["xs", "sm", "md", "lg", "xl"];
|
|
10
|
+
const BREAKPOINT_SIZES = {
|
|
11
|
+
xs: 0,
|
|
12
|
+
sm: 490,
|
|
13
|
+
md: 768,
|
|
14
|
+
lg: 1080,
|
|
15
|
+
xl: 1440,
|
|
16
|
+
};
|
|
17
|
+
const SEARCH_DEBOUNCE_DELAY = tokens["timing-slowest"];
|
|
18
|
+
const DATA_LIST_FILTERING_SPINNER_TEST_ID = "ATL-DataList-filteringSpinner";
|
|
19
|
+
const DATA_LIST_LOADING_MORE_SPINNER_TEST_ID = "ATL-DataList-loadingMoreSpinner";
|
|
20
|
+
const DATA_LOAD_MORE_TEST_ID = "ATL-DataList-LoadMore-trigger";
|
|
21
|
+
const DATA_LIST_STICKY_HEADER_TEST_ID = "ATL-DataList-stickyHeader";
|
|
22
|
+
const TRANSITION_DURATION_IN_SECONDS = tokens["timing-base"] / 1000;
|
|
23
|
+
const TRANSITION_DELAY_IN_SECONDS = tokens["timing-quick"] / 1000;
|
|
24
|
+
|
|
25
|
+
export { BREAKPOINTS as B, DATA_LIST_FILTERING_SPINNER_TEST_ID as D, EMPTY_FILTER_RESULTS_MESSAGE as E, SEARCH_DEBOUNCE_DELAY as S, TRANSITION_DURATION_IN_SECONDS as T, DATA_LIST_STICKY_HEADER_TEST_ID as a, EMPTY_RESULTS_MESSAGE as b, EMPTY_STATE_ACTION_BUTTON_ONLY_ERROR as c, TRANSITION_DELAY_IN_SECONDS as d, BREAKPOINT_SIZES as e, DATA_LOAD_MORE_TEST_ID as f, DATA_LIST_LOADING_MORE_SPINNER_TEST_ID as g };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var design = require('@jobber/design');
|
|
4
|
+
|
|
5
|
+
const EMPTY_RESULTS_MESSAGE = "List is looking empty";
|
|
6
|
+
const EMPTY_FILTER_RESULTS_MESSAGE = "No results for selected filters";
|
|
7
|
+
const EMPTY_STATE_ACTION_BUTTON_ONLY_ERROR = "DataListEmptyState action prop must be a Button component";
|
|
8
|
+
/**
|
|
9
|
+
* Breakpoints that we support
|
|
10
|
+
*/
|
|
11
|
+
const BREAKPOINTS = ["xs", "sm", "md", "lg", "xl"];
|
|
12
|
+
const BREAKPOINT_SIZES = {
|
|
13
|
+
xs: 0,
|
|
14
|
+
sm: 490,
|
|
15
|
+
md: 768,
|
|
16
|
+
lg: 1080,
|
|
17
|
+
xl: 1440,
|
|
18
|
+
};
|
|
19
|
+
const SEARCH_DEBOUNCE_DELAY = design.tokens["timing-slowest"];
|
|
20
|
+
const DATA_LIST_FILTERING_SPINNER_TEST_ID = "ATL-DataList-filteringSpinner";
|
|
21
|
+
const DATA_LIST_LOADING_MORE_SPINNER_TEST_ID = "ATL-DataList-loadingMoreSpinner";
|
|
22
|
+
const DATA_LOAD_MORE_TEST_ID = "ATL-DataList-LoadMore-trigger";
|
|
23
|
+
const DATA_LIST_STICKY_HEADER_TEST_ID = "ATL-DataList-stickyHeader";
|
|
24
|
+
const TRANSITION_DURATION_IN_SECONDS = design.tokens["timing-base"] / 1000;
|
|
25
|
+
const TRANSITION_DELAY_IN_SECONDS = design.tokens["timing-quick"] / 1000;
|
|
26
|
+
|
|
27
|
+
exports.BREAKPOINTS = BREAKPOINTS;
|
|
28
|
+
exports.BREAKPOINT_SIZES = BREAKPOINT_SIZES;
|
|
29
|
+
exports.DATA_LIST_FILTERING_SPINNER_TEST_ID = DATA_LIST_FILTERING_SPINNER_TEST_ID;
|
|
30
|
+
exports.DATA_LIST_LOADING_MORE_SPINNER_TEST_ID = DATA_LIST_LOADING_MORE_SPINNER_TEST_ID;
|
|
31
|
+
exports.DATA_LIST_STICKY_HEADER_TEST_ID = DATA_LIST_STICKY_HEADER_TEST_ID;
|
|
32
|
+
exports.DATA_LOAD_MORE_TEST_ID = DATA_LOAD_MORE_TEST_ID;
|
|
33
|
+
exports.EMPTY_FILTER_RESULTS_MESSAGE = EMPTY_FILTER_RESULTS_MESSAGE;
|
|
34
|
+
exports.EMPTY_RESULTS_MESSAGE = EMPTY_RESULTS_MESSAGE;
|
|
35
|
+
exports.EMPTY_STATE_ACTION_BUTTON_ONLY_ERROR = EMPTY_STATE_ACTION_BUTTON_ONLY_ERROR;
|
|
36
|
+
exports.SEARCH_DEBOUNCE_DELAY = SEARCH_DEBOUNCE_DELAY;
|
|
37
|
+
exports.TRANSITION_DELAY_IN_SECONDS = TRANSITION_DELAY_IN_SECONDS;
|
|
38
|
+
exports.TRANSITION_DURATION_IN_SECONDS = TRANSITION_DURATION_IN_SECONDS;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var _commonjsHelpers = require('./_commonjsHelpers-DAuvc7SO.js');
|
|
5
|
+
var _getTag = require('./_getTag-BBZ5PchE.js');
|
|
6
|
+
var DataList_const = require('./DataList.const-DZ5upBs4.js');
|
|
7
|
+
var DataListTags = require('./DataListTags-scOaXzcs.js');
|
|
8
|
+
var DataListHeaderTile = require('./DataListHeaderTile-BYDWDG_0.js');
|
|
9
|
+
var FormatDate = require('./FormatDate-BSQ5SYSD.js');
|
|
10
|
+
var Text = require('./Text-C0pm--c0.js');
|
|
11
|
+
var Heading = require('./Heading-D39OfHbk.js');
|
|
12
|
+
|
|
13
|
+
var baseKeys = _getTag._baseKeys,
|
|
14
|
+
getTag = _getTag._getTag,
|
|
15
|
+
isArguments = _getTag.isArguments_1,
|
|
16
|
+
isArray = _getTag.isArray_1,
|
|
17
|
+
isArrayLike = _getTag.isArrayLike_1,
|
|
18
|
+
isBuffer = _getTag.isBufferExports,
|
|
19
|
+
isPrototype = _getTag._isPrototype,
|
|
20
|
+
isTypedArray = _getTag.isTypedArray_1;
|
|
21
|
+
|
|
22
|
+
/** `Object#toString` result references. */
|
|
23
|
+
var mapTag = '[object Map]',
|
|
24
|
+
setTag = '[object Set]';
|
|
25
|
+
|
|
26
|
+
/** Used for built-in method references. */
|
|
27
|
+
var objectProto = Object.prototype;
|
|
28
|
+
|
|
29
|
+
/** Used to check objects for own properties. */
|
|
30
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
34
|
+
*
|
|
35
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
36
|
+
* properties.
|
|
37
|
+
*
|
|
38
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
39
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
40
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
41
|
+
*
|
|
42
|
+
* @static
|
|
43
|
+
* @memberOf _
|
|
44
|
+
* @since 0.1.0
|
|
45
|
+
* @category Lang
|
|
46
|
+
* @param {*} value The value to check.
|
|
47
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
48
|
+
* @example
|
|
49
|
+
*
|
|
50
|
+
* _.isEmpty(null);
|
|
51
|
+
* // => true
|
|
52
|
+
*
|
|
53
|
+
* _.isEmpty(true);
|
|
54
|
+
* // => true
|
|
55
|
+
*
|
|
56
|
+
* _.isEmpty(1);
|
|
57
|
+
* // => true
|
|
58
|
+
*
|
|
59
|
+
* _.isEmpty([1, 2, 3]);
|
|
60
|
+
* // => false
|
|
61
|
+
*
|
|
62
|
+
* _.isEmpty({ 'a': 1 });
|
|
63
|
+
* // => false
|
|
64
|
+
*/
|
|
65
|
+
function isEmpty(value) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (isArrayLike(value) &&
|
|
70
|
+
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
71
|
+
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
72
|
+
return !value.length;
|
|
73
|
+
}
|
|
74
|
+
var tag = getTag(value);
|
|
75
|
+
if (tag == mapTag || tag == setTag) {
|
|
76
|
+
return !value.size;
|
|
77
|
+
}
|
|
78
|
+
if (isPrototype(value)) {
|
|
79
|
+
return !baseKeys(value).length;
|
|
80
|
+
}
|
|
81
|
+
for (var key in value) {
|
|
82
|
+
if (hasOwnProperty.call(value, key)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
var isEmpty_1 = isEmpty;
|
|
90
|
+
|
|
91
|
+
var isEmpty$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(isEmpty_1);
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Return the child component that matches the `type` provided
|
|
95
|
+
*/
|
|
96
|
+
function getCompoundComponent(children, type) {
|
|
97
|
+
const childrenArray = React.Children.toArray(children);
|
|
98
|
+
const element = childrenArray.find(child => React.isValidElement(child) && child.type === type);
|
|
99
|
+
// Comply with the return type without casting it
|
|
100
|
+
return React.isValidElement(element) ? element : undefined;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Return all instances child component that matches the `type` provided
|
|
104
|
+
*/
|
|
105
|
+
function getCompoundComponents(children, type) {
|
|
106
|
+
const childrenArray = React.Children.toArray(children);
|
|
107
|
+
const elements = childrenArray.filter((child) => React.isValidElement(child) && child.type === type);
|
|
108
|
+
return elements;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Generate the default element the DataList would use on the data provided.
|
|
112
|
+
*/
|
|
113
|
+
function generateListItemElement(item) {
|
|
114
|
+
return Object.keys(item).reduce((acc, key) => {
|
|
115
|
+
const currentItem = item[key];
|
|
116
|
+
if (!currentItem) {
|
|
117
|
+
return acc;
|
|
118
|
+
}
|
|
119
|
+
if (key === "tags" && Array.isArray(currentItem)) {
|
|
120
|
+
acc[key] = React.createElement(DataListTags.DataListTags, { items: currentItem });
|
|
121
|
+
}
|
|
122
|
+
else if (key === "label" && typeof currentItem === "string") {
|
|
123
|
+
acc[key] = React.createElement(Heading.Heading, { level: 5 }, currentItem);
|
|
124
|
+
}
|
|
125
|
+
else if (React.isValidElement(currentItem)) {
|
|
126
|
+
acc[key] = currentItem;
|
|
127
|
+
}
|
|
128
|
+
else if (currentItem instanceof Date) {
|
|
129
|
+
acc[key] = (React.createElement(Text.Text, null,
|
|
130
|
+
React.createElement(FormatDate.FormatDate, { date: currentItem })));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
acc[key] = React.createElement(Text.Text, null, currentItem);
|
|
134
|
+
}
|
|
135
|
+
return acc;
|
|
136
|
+
}, {});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Generate the header elements with the default styling
|
|
140
|
+
*/
|
|
141
|
+
function generateHeaderElements(headers) {
|
|
142
|
+
const headerElements = Object.keys(headers).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: React.createElement(DataListHeaderTile.DataListHeaderTile, { headers: headers, headerKey: key, visible: true }) })), {});
|
|
143
|
+
return isEmpty$1(headerElements) ? undefined : headerElements;
|
|
144
|
+
}
|
|
145
|
+
function sortBreakpoints(sizeProp) {
|
|
146
|
+
return sizeProp.sort((a, b) => DataList_const.BREAKPOINTS.indexOf(a) - DataList_const.BREAKPOINTS.indexOf(b));
|
|
147
|
+
}
|
|
148
|
+
function getExposedActions(childrenArray, childCount = 2) {
|
|
149
|
+
const firstNChildren = childrenArray.slice(0, childCount);
|
|
150
|
+
return firstNChildren.reduce((result, child, i) => {
|
|
151
|
+
const hasIcon = Boolean(child.props.icon);
|
|
152
|
+
if (!hasIcon)
|
|
153
|
+
return result; // If the child does not have an icon, continue.
|
|
154
|
+
const isLastChildAdded = result.length === i;
|
|
155
|
+
// If it's the first child or if the previous child was added, then add this child.
|
|
156
|
+
if (i === 0 || (i < childCount && isLastChildAdded)) {
|
|
157
|
+
return [...result, child];
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
}, []);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
exports.generateHeaderElements = generateHeaderElements;
|
|
164
|
+
exports.generateListItemElement = generateListItemElement;
|
|
165
|
+
exports.getCompoundComponent = getCompoundComponent;
|
|
166
|
+
exports.getCompoundComponents = getCompoundComponents;
|
|
167
|
+
exports.getExposedActions = getExposedActions;
|
|
168
|
+
exports.sortBreakpoints = sortBreakpoints;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import React, { Children, isValidElement } from 'react';
|
|
2
|
+
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-jBnpF2iq.js';
|
|
3
|
+
import { _ as _baseKeys, a as _getTag, i as isArguments_1, b as isArray_1, c as isArrayLike_1, d as isBufferExports, e as _isPrototype, f as isTypedArray_1 } from './_getTag-5wQIlCbe.js';
|
|
4
|
+
import { B as BREAKPOINTS } from './DataList.const-B-WAZqZm.js';
|
|
5
|
+
import { D as DataListTags } from './DataListTags-DH4nIE2K.js';
|
|
6
|
+
import { D as DataListHeaderTile } from './DataListHeaderTile-I90vRaws.js';
|
|
7
|
+
import { F as FormatDate } from './FormatDate-B-4ItFF2.js';
|
|
8
|
+
import { T as Text } from './Text-CyaxiLeN.js';
|
|
9
|
+
import { H as Heading } from './Heading-CLboCN8l.js';
|
|
10
|
+
|
|
11
|
+
var baseKeys = _baseKeys,
|
|
12
|
+
getTag = _getTag,
|
|
13
|
+
isArguments = isArguments_1,
|
|
14
|
+
isArray = isArray_1,
|
|
15
|
+
isArrayLike = isArrayLike_1,
|
|
16
|
+
isBuffer = isBufferExports,
|
|
17
|
+
isPrototype = _isPrototype,
|
|
18
|
+
isTypedArray = isTypedArray_1;
|
|
19
|
+
|
|
20
|
+
/** `Object#toString` result references. */
|
|
21
|
+
var mapTag = '[object Map]',
|
|
22
|
+
setTag = '[object Set]';
|
|
23
|
+
|
|
24
|
+
/** Used for built-in method references. */
|
|
25
|
+
var objectProto = Object.prototype;
|
|
26
|
+
|
|
27
|
+
/** Used to check objects for own properties. */
|
|
28
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
32
|
+
*
|
|
33
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
34
|
+
* properties.
|
|
35
|
+
*
|
|
36
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
37
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
38
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
39
|
+
*
|
|
40
|
+
* @static
|
|
41
|
+
* @memberOf _
|
|
42
|
+
* @since 0.1.0
|
|
43
|
+
* @category Lang
|
|
44
|
+
* @param {*} value The value to check.
|
|
45
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
46
|
+
* @example
|
|
47
|
+
*
|
|
48
|
+
* _.isEmpty(null);
|
|
49
|
+
* // => true
|
|
50
|
+
*
|
|
51
|
+
* _.isEmpty(true);
|
|
52
|
+
* // => true
|
|
53
|
+
*
|
|
54
|
+
* _.isEmpty(1);
|
|
55
|
+
* // => true
|
|
56
|
+
*
|
|
57
|
+
* _.isEmpty([1, 2, 3]);
|
|
58
|
+
* // => false
|
|
59
|
+
*
|
|
60
|
+
* _.isEmpty({ 'a': 1 });
|
|
61
|
+
* // => false
|
|
62
|
+
*/
|
|
63
|
+
function isEmpty(value) {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
if (isArrayLike(value) &&
|
|
68
|
+
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
69
|
+
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
70
|
+
return !value.length;
|
|
71
|
+
}
|
|
72
|
+
var tag = getTag(value);
|
|
73
|
+
if (tag == mapTag || tag == setTag) {
|
|
74
|
+
return !value.size;
|
|
75
|
+
}
|
|
76
|
+
if (isPrototype(value)) {
|
|
77
|
+
return !baseKeys(value).length;
|
|
78
|
+
}
|
|
79
|
+
for (var key in value) {
|
|
80
|
+
if (hasOwnProperty.call(value, key)) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var isEmpty_1 = isEmpty;
|
|
88
|
+
|
|
89
|
+
var isEmpty$1 = /*@__PURE__*/getDefaultExportFromCjs(isEmpty_1);
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Return the child component that matches the `type` provided
|
|
93
|
+
*/
|
|
94
|
+
function getCompoundComponent(children, type) {
|
|
95
|
+
const childrenArray = Children.toArray(children);
|
|
96
|
+
const element = childrenArray.find(child => isValidElement(child) && child.type === type);
|
|
97
|
+
// Comply with the return type without casting it
|
|
98
|
+
return isValidElement(element) ? element : undefined;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Return all instances child component that matches the `type` provided
|
|
102
|
+
*/
|
|
103
|
+
function getCompoundComponents(children, type) {
|
|
104
|
+
const childrenArray = Children.toArray(children);
|
|
105
|
+
const elements = childrenArray.filter((child) => isValidElement(child) && child.type === type);
|
|
106
|
+
return elements;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Generate the default element the DataList would use on the data provided.
|
|
110
|
+
*/
|
|
111
|
+
function generateListItemElement(item) {
|
|
112
|
+
return Object.keys(item).reduce((acc, key) => {
|
|
113
|
+
const currentItem = item[key];
|
|
114
|
+
if (!currentItem) {
|
|
115
|
+
return acc;
|
|
116
|
+
}
|
|
117
|
+
if (key === "tags" && Array.isArray(currentItem)) {
|
|
118
|
+
acc[key] = React.createElement(DataListTags, { items: currentItem });
|
|
119
|
+
}
|
|
120
|
+
else if (key === "label" && typeof currentItem === "string") {
|
|
121
|
+
acc[key] = React.createElement(Heading, { level: 5 }, currentItem);
|
|
122
|
+
}
|
|
123
|
+
else if (isValidElement(currentItem)) {
|
|
124
|
+
acc[key] = currentItem;
|
|
125
|
+
}
|
|
126
|
+
else if (currentItem instanceof Date) {
|
|
127
|
+
acc[key] = (React.createElement(Text, null,
|
|
128
|
+
React.createElement(FormatDate, { date: currentItem })));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
acc[key] = React.createElement(Text, null, currentItem);
|
|
132
|
+
}
|
|
133
|
+
return acc;
|
|
134
|
+
}, {});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Generate the header elements with the default styling
|
|
138
|
+
*/
|
|
139
|
+
function generateHeaderElements(headers) {
|
|
140
|
+
const headerElements = Object.keys(headers).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: React.createElement(DataListHeaderTile, { headers: headers, headerKey: key, visible: true }) })), {});
|
|
141
|
+
return isEmpty$1(headerElements) ? undefined : headerElements;
|
|
142
|
+
}
|
|
143
|
+
function sortBreakpoints(sizeProp) {
|
|
144
|
+
return sizeProp.sort((a, b) => BREAKPOINTS.indexOf(a) - BREAKPOINTS.indexOf(b));
|
|
145
|
+
}
|
|
146
|
+
function getExposedActions(childrenArray, childCount = 2) {
|
|
147
|
+
const firstNChildren = childrenArray.slice(0, childCount);
|
|
148
|
+
return firstNChildren.reduce((result, child, i) => {
|
|
149
|
+
const hasIcon = Boolean(child.props.icon);
|
|
150
|
+
if (!hasIcon)
|
|
151
|
+
return result; // If the child does not have an icon, continue.
|
|
152
|
+
const isLastChildAdded = result.length === i;
|
|
153
|
+
// If it's the first child or if the previous child was added, then add this child.
|
|
154
|
+
if (i === 0 || (i < childCount && isLastChildAdded)) {
|
|
155
|
+
return [...result, child];
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
}, []);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export { getCompoundComponents as a, getExposedActions as b, generateHeaderElements as c, generateListItemElement as d, getCompoundComponent as g, sortBreakpoints as s };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { T as Typography } from './Typography-C0YR4XBl.js';
|
|
3
|
+
import { I as Icon } from './Icon-zn-zanGs.js';
|
|
4
|
+
import { u as useDataListLayoutActionsContext } from './DataListLayoutContext-DbIuv3_7.js';
|
|
5
|
+
|
|
6
|
+
var styles = {"action":"iyg43v-S9yU-","label":"AUJNqz93ZDA-"};
|
|
7
|
+
|
|
8
|
+
function DataListAction({ label, icon, destructive, visible = () => true, onClick, }) {
|
|
9
|
+
const { activeItem } = useDataListLayoutActionsContext();
|
|
10
|
+
// Don't render if the item is not visible
|
|
11
|
+
if (activeItem && !visible(activeItem)) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const color = destructive ? "critical" : "heading";
|
|
15
|
+
function getActionLabel() {
|
|
16
|
+
if (typeof label === "string") {
|
|
17
|
+
return label;
|
|
18
|
+
}
|
|
19
|
+
if (activeItem) {
|
|
20
|
+
return label(activeItem);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return (React.createElement("button", { type: "button", className: styles.action, onClick: handleClick },
|
|
24
|
+
React.createElement(Typography, { textColor: color },
|
|
25
|
+
React.createElement("span", { className: styles.label }, getActionLabel())),
|
|
26
|
+
icon && React.createElement(Icon, { name: icon, color: color })));
|
|
27
|
+
function handleClick() {
|
|
28
|
+
if (activeItem) {
|
|
29
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(activeItem);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { DataListAction as D };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Typography = require('./Typography-BCKgZ_gv.js');
|
|
5
|
+
var Icon = require('./Icon-5T1h0cSC.js');
|
|
6
|
+
var DataListLayoutContext = require('./DataListLayoutContext-Dsm5THEw.js');
|
|
7
|
+
|
|
8
|
+
var styles = {"action":"iyg43v-S9yU-","label":"AUJNqz93ZDA-"};
|
|
9
|
+
|
|
10
|
+
function DataListAction({ label, icon, destructive, visible = () => true, onClick, }) {
|
|
11
|
+
const { activeItem } = DataListLayoutContext.useDataListLayoutActionsContext();
|
|
12
|
+
// Don't render if the item is not visible
|
|
13
|
+
if (activeItem && !visible(activeItem)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const color = destructive ? "critical" : "heading";
|
|
17
|
+
function getActionLabel() {
|
|
18
|
+
if (typeof label === "string") {
|
|
19
|
+
return label;
|
|
20
|
+
}
|
|
21
|
+
if (activeItem) {
|
|
22
|
+
return label(activeItem);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (React.createElement("button", { type: "button", className: styles.action, onClick: handleClick },
|
|
26
|
+
React.createElement(Typography.Typography, { textColor: color },
|
|
27
|
+
React.createElement("span", { className: styles.label }, getActionLabel())),
|
|
28
|
+
icon && React.createElement(Icon.Icon, { name: icon, color: color })));
|
|
29
|
+
function handleClick() {
|
|
30
|
+
if (activeItem) {
|
|
31
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(activeItem);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.DataListAction = DataListAction;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { Children, isValidElement } from 'react';
|
|
2
|
+
import { T as Tooltip } from './Tooltip-Cz3YrniM.js';
|
|
3
|
+
import { B as Button } from './Button-DzwBVzGv.js';
|
|
4
|
+
import { D as DataListOverflowFade } from './DataListOverflowFade-CzFRYirg.js';
|
|
5
|
+
import { b as getExposedActions } from './DataList.utils-DmychB4b.js';
|
|
6
|
+
import { u as useDataListLayoutActionsContext } from './DataListLayoutContext-DbIuv3_7.js';
|
|
7
|
+
import { D as DataListItemActionsOverflow } from './DataListItemActionsOverflow-OJZ4_d_f.js';
|
|
8
|
+
|
|
9
|
+
function DataListActions({ children, itemsToExpose = 2, }) {
|
|
10
|
+
const { activeItem } = useDataListLayoutActionsContext();
|
|
11
|
+
const childrenArray = Children.toArray(children).filter(isValidElement);
|
|
12
|
+
const exposedActions = getExposedActions(childrenArray, itemsToExpose);
|
|
13
|
+
childrenArray.splice(0, exposedActions.length);
|
|
14
|
+
return (React.createElement(DataListOverflowFade, null,
|
|
15
|
+
exposedActions.map(({ props }) => {
|
|
16
|
+
if (props.visible && !props.visible(activeItem))
|
|
17
|
+
return null;
|
|
18
|
+
if (!props.icon)
|
|
19
|
+
return null;
|
|
20
|
+
function getActionLabel() {
|
|
21
|
+
if (typeof props.label === "string") {
|
|
22
|
+
return props.label;
|
|
23
|
+
}
|
|
24
|
+
if (activeItem) {
|
|
25
|
+
return props.label(activeItem);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const actionLabel = getActionLabel();
|
|
29
|
+
return (React.createElement(Tooltip, { key: actionLabel, message: actionLabel },
|
|
30
|
+
React.createElement(Button, { icon: props.icon, ariaLabel: actionLabel, onClick: () => {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
if (activeItem) {
|
|
33
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, activeItem);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
(_b = props.onClick) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
37
|
+
}
|
|
38
|
+
}, type: "secondary", variation: "subtle" })));
|
|
39
|
+
}),
|
|
40
|
+
React.createElement(DataListItemActionsOverflow, { actions: childrenArray })));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { DataListActions as D };
|