@cerberus-design/react 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/{_tsup-dts-rollup.d.ts → _tsup-dts-rollup.d.cts} +207 -5
- package/build/legacy/aria-helpers/nav-menu.aria.cjs +36 -0
- package/build/legacy/aria-helpers/nav-menu.aria.cjs.map +1 -0
- package/build/legacy/aria-helpers/tabs.aria.cjs +100 -0
- package/build/legacy/aria-helpers/tabs.aria.cjs.map +1 -0
- package/build/legacy/aria-helpers/trap-focus.aria.cjs +54 -0
- package/build/legacy/aria-helpers/trap-focus.aria.cjs.map +1 -0
- package/build/legacy/components/Button.cjs +50 -0
- package/build/legacy/components/Button.cjs.map +1 -0
- package/build/legacy/components/Checkbox.cjs +157 -0
- package/build/legacy/components/Checkbox.cjs.map +1 -0
- package/build/legacy/components/Droppable.cjs +54 -0
- package/build/legacy/components/Droppable.cjs.map +1 -0
- package/build/legacy/components/FeatureFlag.cjs +63 -0
- package/build/legacy/components/FeatureFlag.cjs.map +1 -0
- package/build/legacy/components/FieldMessage.cjs +59 -0
- package/build/legacy/components/FieldMessage.cjs.map +1 -0
- package/build/legacy/components/FileStatus.cjs +390 -0
- package/build/legacy/components/FileStatus.cjs.map +1 -0
- package/build/legacy/components/FileUploader.cjs +159 -0
- package/build/legacy/components/FileUploader.cjs.map +1 -0
- package/build/legacy/components/IconButton.cjs +53 -0
- package/build/legacy/components/IconButton.cjs.map +1 -0
- package/build/legacy/components/Input.cjs +145 -0
- package/build/legacy/components/Input.cjs.map +1 -0
- package/build/legacy/components/Label.cjs +93 -0
- package/build/legacy/components/Label.cjs.map +1 -0
- package/build/legacy/components/Modal.cjs +45 -0
- package/build/legacy/components/Modal.cjs.map +1 -0
- package/build/legacy/components/ModalDescription.cjs +36 -0
- package/build/legacy/components/ModalDescription.cjs.map +1 -0
- package/build/legacy/components/ModalHeader.cjs +49 -0
- package/build/legacy/components/ModalHeader.cjs.map +1 -0
- package/build/legacy/components/ModalHeading.cjs +36 -0
- package/build/legacy/components/ModalHeading.cjs.map +1 -0
- package/build/legacy/components/ModalIcon.cjs +51 -0
- package/build/legacy/components/ModalIcon.cjs.map +1 -0
- package/build/legacy/components/NavMenuLink.cjs +81 -0
- package/build/legacy/components/NavMenuLink.cjs.map +1 -0
- package/build/legacy/components/NavMenuList.cjs +131 -0
- package/build/legacy/components/NavMenuList.cjs.map +1 -0
- package/build/legacy/components/NavMenuTrigger.cjs +128 -0
- package/build/legacy/components/NavMenuTrigger.cjs.map +1 -0
- package/build/legacy/components/Notification.cjs +181 -0
- package/build/legacy/components/Notification.cjs.map +1 -0
- package/build/legacy/components/NotificationDescription.cjs +44 -0
- package/build/legacy/components/NotificationDescription.cjs.map +1 -0
- package/build/legacy/components/NotificationHeading.cjs +38 -0
- package/build/legacy/components/NotificationHeading.cjs.map +1 -0
- package/build/legacy/components/Portal.cjs +35 -0
- package/build/legacy/components/Portal.cjs.map +1 -0
- package/build/legacy/components/ProgressBar.cjs +61 -0
- package/build/legacy/components/ProgressBar.cjs.map +1 -0
- package/build/legacy/components/Radio.cjs +68 -0
- package/build/legacy/components/Radio.cjs.map +1 -0
- package/build/legacy/components/Select.cjs +170 -0
- package/build/legacy/components/Select.cjs.map +1 -0
- package/build/legacy/components/Show.cjs +40 -0
- package/build/legacy/components/Show.cjs.map +1 -0
- package/build/legacy/components/Tab.cjs +135 -0
- package/build/legacy/components/Tab.cjs.map +1 -0
- package/build/legacy/components/TabList.cjs +68 -0
- package/build/legacy/components/TabList.cjs.map +1 -0
- package/build/legacy/components/TabPanel.cjs +76 -0
- package/build/legacy/components/TabPanel.cjs.map +1 -0
- package/build/legacy/components/Table.cjs +53 -0
- package/build/legacy/components/Table.cjs.map +1 -0
- package/build/legacy/components/Tag.cjs +91 -0
- package/build/legacy/components/Tag.cjs.map +1 -0
- package/build/legacy/components/Tbody.cjs +48 -0
- package/build/legacy/components/Tbody.cjs.map +1 -0
- package/build/legacy/components/Td.cjs +48 -0
- package/build/legacy/components/Td.cjs.map +1 -0
- package/build/legacy/components/Textarea.cjs +71 -0
- package/build/legacy/components/Textarea.cjs.map +1 -0
- package/build/legacy/components/Th.cjs +80 -0
- package/build/legacy/components/Th.cjs.map +1 -0
- package/build/legacy/components/Thead.cjs +36 -0
- package/build/legacy/components/Thead.cjs.map +1 -0
- package/build/legacy/components/Toggle.cjs +151 -0
- package/build/legacy/components/Toggle.cjs.map +1 -0
- package/build/legacy/config/cerbIcons.cjs +88 -0
- package/build/legacy/config/cerbIcons.cjs.map +1 -0
- package/build/legacy/config/defineIcons.cjs +110 -0
- package/build/legacy/config/defineIcons.cjs.map +1 -0
- package/build/legacy/config/icons/checkbox.icons.cjs +67 -0
- package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -0
- package/build/legacy/context/confirm-modal.cjs +371 -0
- package/build/legacy/context/confirm-modal.cjs.map +1 -0
- package/build/legacy/context/feature-flags.cjs +48 -0
- package/build/legacy/context/feature-flags.cjs.map +1 -0
- package/build/legacy/context/field.cjs +55 -0
- package/build/legacy/context/field.cjs.map +1 -0
- package/build/legacy/context/navMenu.cjs +70 -0
- package/build/legacy/context/navMenu.cjs.map +1 -0
- package/build/legacy/context/notification-center.cjs +347 -0
- package/build/legacy/context/notification-center.cjs.map +1 -0
- package/build/legacy/context/prompt-modal.cjs +508 -0
- package/build/legacy/context/prompt-modal.cjs.map +1 -0
- package/build/legacy/context/tabs.cjs +78 -0
- package/build/legacy/context/tabs.cjs.map +1 -0
- package/build/legacy/context/theme.cjs +104 -0
- package/build/legacy/context/theme.cjs.map +1 -0
- package/build/legacy/hooks/useModal.cjs +50 -0
- package/build/legacy/hooks/useModal.cjs.map +1 -0
- package/build/legacy/hooks/useTheme.cjs +87 -0
- package/build/legacy/hooks/useTheme.cjs.map +1 -0
- package/build/legacy/hooks/useToggle.cjs +47 -0
- package/build/legacy/hooks/useToggle.cjs.map +1 -0
- package/build/legacy/index.cjs +2165 -0
- package/build/legacy/index.cjs.map +1 -0
- package/build/legacy/types.cjs +19 -0
- package/build/legacy/types.cjs.map +1 -0
- package/build/modern/_tsup-dts-rollup.d.ts +207 -5
- package/build/{legacy/chunk-JJGZRBIR.js → modern/chunk-2FK7NR7Y.js} +8 -7
- package/build/{legacy/chunk-JJGZRBIR.js.map → modern/chunk-2FK7NR7Y.js.map} +1 -1
- package/build/modern/chunk-4FD33RTW.js +56 -0
- package/build/modern/chunk-4FD33RTW.js.map +1 -0
- package/build/modern/{chunk-XB4ZRAH4.js → chunk-53QBTZZF.js} +5 -5
- package/build/modern/{chunk-BEYPMC73.js → chunk-5WVXIAG2.js} +2 -2
- package/build/modern/chunk-7NX4RGDB.js +218 -0
- package/build/modern/chunk-7NX4RGDB.js.map +1 -0
- package/build/modern/chunk-CP7OUC2Q.js +42 -0
- package/build/modern/chunk-CP7OUC2Q.js.map +1 -0
- package/build/modern/{chunk-4N2L357B.js → chunk-EJIMJWPB.js} +2 -2
- package/build/{legacy/chunk-GVNPFXKL.js → modern/chunk-GUECLKHY.js} +18 -1
- package/build/modern/chunk-GUECLKHY.js.map +1 -0
- package/build/modern/{chunk-Y5IY7O23.js → chunk-GZY6CH7D.js} +5 -5
- package/build/{legacy/chunk-IL5ELPTT.js → modern/chunk-ID3XWGLY.js} +2 -2
- package/build/modern/chunk-RHG26FYL.js +68 -0
- package/build/modern/chunk-RHG26FYL.js.map +1 -0
- package/build/modern/{chunk-LTDNZRUY.js → chunk-S6CMAXQF.js} +10 -10
- package/build/modern/{chunk-IOG6XIR5.js → chunk-TF3HRELU.js} +3 -3
- package/build/modern/{chunk-IOG6XIR5.js.map → chunk-TF3HRELU.js.map} +1 -1
- package/build/modern/chunk-TYTEREKZ.js +39 -0
- package/build/modern/chunk-TYTEREKZ.js.map +1 -0
- package/build/{legacy/chunk-JJP2TFTU.js → modern/chunk-VCR5C6Q3.js} +1 -1
- package/build/modern/chunk-VCR5C6Q3.js.map +1 -0
- package/build/modern/{chunk-QO2UXGW4.js → chunk-VPWBSZAR.js} +2 -2
- package/build/modern/components/Checkbox.js +13 -0
- package/build/modern/components/FileStatus.js +17 -0
- package/build/modern/components/FileUploader.js +4 -3
- package/build/modern/components/Input.js +5 -4
- package/build/modern/components/Label.js +2 -2
- package/build/modern/components/ModalIcon.js +1 -1
- package/build/modern/components/Notification.js +4 -3
- package/build/modern/components/ProgressBar.js +7 -0
- package/build/modern/components/Select.js +15 -0
- package/build/modern/components/Toggle.js +4 -3
- package/build/modern/config/cerbIcons.js +2 -1
- package/build/modern/config/defineIcons.js +3 -2
- package/build/modern/config/icons/checkbox.icons.js +9 -0
- package/build/modern/context/confirm-modal.js +5 -4
- package/build/modern/context/notification-center.js +5 -4
- package/build/modern/context/prompt-modal.js +8 -7
- package/build/modern/index.js +59 -38
- package/build/modern/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Checkbox.tsx +76 -0
- package/src/components/FileStatus.tsx +246 -0
- package/src/components/FileUploader.tsx +1 -1
- package/src/components/Label.tsx +3 -2
- package/src/components/ModalIcon.tsx +2 -2
- package/src/components/ProgressBar.tsx +61 -0
- package/src/components/Select.tsx +96 -0
- package/src/config/cerbIcons.ts +20 -0
- package/src/config/icons/checkbox.icons.tsx +49 -0
- package/src/index.ts +4 -0
- package/build/legacy/aria-helpers/nav-menu.aria.js +0 -7
- package/build/legacy/aria-helpers/tabs.aria.js +0 -9
- package/build/legacy/aria-helpers/trap-focus.aria.js +0 -7
- package/build/legacy/chunk-2UFNQM55.js +0 -21
- package/build/legacy/chunk-2UFNQM55.js.map +0 -1
- package/build/legacy/chunk-2VPKILZ6.js +0 -122
- package/build/legacy/chunk-2VPKILZ6.js.map +0 -1
- package/build/legacy/chunk-3C2DJSEE.js +0 -16
- package/build/legacy/chunk-3C2DJSEE.js.map +0 -1
- package/build/legacy/chunk-3GXISGPS.js +0 -47
- package/build/legacy/chunk-3GXISGPS.js.map +0 -1
- package/build/legacy/chunk-4CAT3FHV.js +0 -11
- package/build/legacy/chunk-4CAT3FHV.js.map +0 -1
- package/build/legacy/chunk-4M3EUP57.js +0 -22
- package/build/legacy/chunk-4M3EUP57.js.map +0 -1
- package/build/legacy/chunk-4M4LCQ43.js +0 -12
- package/build/legacy/chunk-4M4LCQ43.js.map +0 -1
- package/build/legacy/chunk-4O4QFF4S.js +0 -15
- package/build/legacy/chunk-4O4QFF4S.js.map +0 -1
- package/build/legacy/chunk-55J6XMHW.js +0 -1
- package/build/legacy/chunk-6DIGPXAD.js +0 -48
- package/build/legacy/chunk-6DIGPXAD.js.map +0 -1
- package/build/legacy/chunk-6F34A7NZ.js +0 -28
- package/build/legacy/chunk-6F34A7NZ.js.map +0 -1
- package/build/legacy/chunk-7VJOPJVX.js +0 -29
- package/build/legacy/chunk-7VJOPJVX.js.map +0 -1
- package/build/legacy/chunk-A5WYZVUR.js +0 -28
- package/build/legacy/chunk-A5WYZVUR.js.map +0 -1
- package/build/legacy/chunk-AAKIOHAX.js +0 -155
- package/build/legacy/chunk-AAKIOHAX.js.map +0 -1
- package/build/legacy/chunk-BEYPMC73.js +0 -27
- package/build/legacy/chunk-EVEEQRH6.js +0 -58
- package/build/legacy/chunk-EVEEQRH6.js.map +0 -1
- package/build/legacy/chunk-GKUDLVOV.js +0 -64
- package/build/legacy/chunk-GKUDLVOV.js.map +0 -1
- package/build/legacy/chunk-GVNPFXKL.js.map +0 -1
- package/build/legacy/chunk-HW76XVA3.js +0 -22
- package/build/legacy/chunk-HW76XVA3.js.map +0 -1
- package/build/legacy/chunk-ISPTI4GC.js +0 -32
- package/build/legacy/chunk-ISPTI4GC.js.map +0 -1
- package/build/legacy/chunk-JB7IQ2BM.js +0 -12
- package/build/legacy/chunk-JB7IQ2BM.js.map +0 -1
- package/build/legacy/chunk-JF76VIL3.js +0 -12
- package/build/legacy/chunk-JF76VIL3.js.map +0 -1
- package/build/legacy/chunk-JJP2TFTU.js.map +0 -1
- package/build/legacy/chunk-KESKDLX6.js +0 -30
- package/build/legacy/chunk-KESKDLX6.js.map +0 -1
- package/build/legacy/chunk-KF24CS4S.js +0 -58
- package/build/legacy/chunk-KF24CS4S.js.map +0 -1
- package/build/legacy/chunk-KJUCHZHV.js +0 -51
- package/build/legacy/chunk-KJUCHZHV.js.map +0 -1
- package/build/legacy/chunk-L46XIE3D.js +0 -208
- package/build/legacy/chunk-L46XIE3D.js.map +0 -1
- package/build/legacy/chunk-LF2QFS5S.js +0 -76
- package/build/legacy/chunk-N3FUF4TB.js +0 -12
- package/build/legacy/chunk-N3FUF4TB.js.map +0 -1
- package/build/legacy/chunk-NE5NHILF.js +0 -47
- package/build/legacy/chunk-NE5NHILF.js.map +0 -1
- package/build/legacy/chunk-PH64POOB.js +0 -33
- package/build/legacy/chunk-PH64POOB.js.map +0 -1
- package/build/legacy/chunk-PJ3744I6.js +0 -24
- package/build/legacy/chunk-PJ3744I6.js.map +0 -1
- package/build/legacy/chunk-PMCYXRAH.js +0 -86
- package/build/legacy/chunk-PMCYXRAH.js.map +0 -1
- package/build/legacy/chunk-QU7UV5DB.js +0 -25
- package/build/legacy/chunk-QU7UV5DB.js.map +0 -1
- package/build/legacy/chunk-RPZAPUCF.js +0 -81
- package/build/legacy/chunk-RPZAPUCF.js.map +0 -1
- package/build/legacy/chunk-SCQVXJBT.js +0 -22
- package/build/legacy/chunk-SCQVXJBT.js.map +0 -1
- package/build/legacy/chunk-SLHX5K6I.js +0 -29
- package/build/legacy/chunk-SLHX5K6I.js.map +0 -1
- package/build/legacy/chunk-SMCEFK6Q.js +0 -63
- package/build/legacy/chunk-SMCEFK6Q.js.map +0 -1
- package/build/legacy/chunk-SXXWC6UD.js +0 -83
- package/build/legacy/chunk-SXXWC6UD.js.map +0 -1
- package/build/legacy/chunk-TCO46FK7.js +0 -36
- package/build/legacy/chunk-TCO46FK7.js.map +0 -1
- package/build/legacy/chunk-TZNYJ3G7.js +0 -25
- package/build/legacy/chunk-TZNYJ3G7.js.map +0 -1
- package/build/legacy/chunk-U72VPIZA.js +0 -32
- package/build/legacy/chunk-U72VPIZA.js.map +0 -1
- package/build/legacy/chunk-VGHVH2T3.js +0 -24
- package/build/legacy/chunk-VGHVH2T3.js.map +0 -1
- package/build/legacy/chunk-VULPMZUW.js +0 -18
- package/build/legacy/chunk-VULPMZUW.js.map +0 -1
- package/build/legacy/chunk-XB4ZRAH4.js +0 -42
- package/build/legacy/chunk-XREC5IJE.js +0 -24
- package/build/legacy/chunk-XREC5IJE.js.map +0 -1
- package/build/legacy/chunk-ZAU4JVLL.js +0 -33
- package/build/legacy/chunk-ZAU4JVLL.js.map +0 -1
- package/build/legacy/components/Button.js +0 -7
- package/build/legacy/components/Droppable.js +0 -8
- package/build/legacy/components/Droppable.js.map +0 -1
- package/build/legacy/components/FeatureFlag.js +0 -10
- package/build/legacy/components/FeatureFlag.js.map +0 -1
- package/build/legacy/components/FieldMessage.js +0 -9
- package/build/legacy/components/FieldMessage.js.map +0 -1
- package/build/legacy/components/FileUploader.js +0 -11
- package/build/legacy/components/FileUploader.js.map +0 -1
- package/build/legacy/components/IconButton.js +0 -7
- package/build/legacy/components/IconButton.js.map +0 -1
- package/build/legacy/components/Input.js +0 -12
- package/build/legacy/components/Input.js.map +0 -1
- package/build/legacy/components/Label.js +0 -10
- package/build/legacy/components/Label.js.map +0 -1
- package/build/legacy/components/Modal.js +0 -7
- package/build/legacy/components/Modal.js.map +0 -1
- package/build/legacy/components/ModalDescription.js +0 -7
- package/build/legacy/components/ModalDescription.js.map +0 -1
- package/build/legacy/components/ModalHeader.js +0 -7
- package/build/legacy/components/ModalHeader.js.map +0 -1
- package/build/legacy/components/ModalHeading.js +0 -7
- package/build/legacy/components/ModalHeading.js.map +0 -1
- package/build/legacy/components/ModalIcon.js +0 -7
- package/build/legacy/components/ModalIcon.js.map +0 -1
- package/build/legacy/components/NavMenuLink.js +0 -8
- package/build/legacy/components/NavMenuLink.js.map +0 -1
- package/build/legacy/components/NavMenuList.js +0 -12
- package/build/legacy/components/NavMenuList.js.map +0 -1
- package/build/legacy/components/NavMenuTrigger.js +0 -11
- package/build/legacy/components/NavMenuTrigger.js.map +0 -1
- package/build/legacy/components/Notification.js +0 -11
- package/build/legacy/components/Notification.js.map +0 -1
- package/build/legacy/components/NotificationDescription.js +0 -7
- package/build/legacy/components/NotificationDescription.js.map +0 -1
- package/build/legacy/components/NotificationHeading.js +0 -7
- package/build/legacy/components/NotificationHeading.js.map +0 -1
- package/build/legacy/components/Portal.js +0 -7
- package/build/legacy/components/Portal.js.map +0 -1
- package/build/legacy/components/Radio.js +0 -9
- package/build/legacy/components/Radio.js.map +0 -1
- package/build/legacy/components/Show.js +0 -8
- package/build/legacy/components/Show.js.map +0 -1
- package/build/legacy/components/Tab.js +0 -10
- package/build/legacy/components/Tab.js.map +0 -1
- package/build/legacy/components/TabList.js +0 -9
- package/build/legacy/components/TabList.js.map +0 -1
- package/build/legacy/components/TabPanel.js +0 -10
- package/build/legacy/components/TabPanel.js.map +0 -1
- package/build/legacy/components/Table.js +0 -9
- package/build/legacy/components/Table.js.map +0 -1
- package/build/legacy/components/Tag.js +0 -8
- package/build/legacy/components/Tag.js.map +0 -1
- package/build/legacy/components/Tbody.js +0 -7
- package/build/legacy/components/Tbody.js.map +0 -1
- package/build/legacy/components/Td.js +0 -7
- package/build/legacy/components/Td.js.map +0 -1
- package/build/legacy/components/Textarea.js +0 -9
- package/build/legacy/components/Textarea.js.map +0 -1
- package/build/legacy/components/Th.js +0 -8
- package/build/legacy/components/Th.js.map +0 -1
- package/build/legacy/components/Thead.js +0 -7
- package/build/legacy/components/Thead.js.map +0 -1
- package/build/legacy/components/Toggle.js +0 -11
- package/build/legacy/components/Toggle.js.map +0 -1
- package/build/legacy/config/cerbIcons.js +0 -7
- package/build/legacy/config/cerbIcons.js.map +0 -1
- package/build/legacy/config/defineIcons.js +0 -10
- package/build/legacy/config/defineIcons.js.map +0 -1
- package/build/legacy/context/confirm-modal.js +0 -22
- package/build/legacy/context/confirm-modal.js.map +0 -1
- package/build/legacy/context/feature-flags.js +0 -10
- package/build/legacy/context/feature-flags.js.map +0 -1
- package/build/legacy/context/field.js +0 -10
- package/build/legacy/context/field.js.map +0 -1
- package/build/legacy/context/navMenu.js +0 -10
- package/build/legacy/context/navMenu.js.map +0 -1
- package/build/legacy/context/notification-center.js +0 -19
- package/build/legacy/context/notification-center.js.map +0 -1
- package/build/legacy/context/prompt-modal.js +0 -25
- package/build/legacy/context/prompt-modal.js.map +0 -1
- package/build/legacy/context/tabs.js +0 -12
- package/build/legacy/context/tabs.js.map +0 -1
- package/build/legacy/context/theme.js +0 -14
- package/build/legacy/context/theme.js.map +0 -1
- package/build/legacy/hooks/useModal.js +0 -8
- package/build/legacy/hooks/useModal.js.map +0 -1
- package/build/legacy/hooks/useTheme.js +0 -8
- package/build/legacy/hooks/useTheme.js.map +0 -1
- package/build/legacy/hooks/useToggle.js +0 -8
- package/build/legacy/hooks/useToggle.js.map +0 -1
- package/build/legacy/index.js +0 -226
- package/build/legacy/index.js.map +0 -1
- package/build/legacy/types.js +0 -2
- package/build/legacy/types.js.map +0 -1
- package/build/modern/chunk-4N2L357B.js.map +0 -1
- package/build/modern/chunk-BEYPMC73.js.map +0 -1
- package/build/modern/chunk-GVNPFXKL.js +0 -26
- package/build/modern/chunk-GVNPFXKL.js.map +0 -1
- package/build/modern/chunk-IL5ELPTT.js +0 -58
- package/build/modern/chunk-IL5ELPTT.js.map +0 -1
- package/build/modern/chunk-JJGZRBIR.js +0 -49
- package/build/modern/chunk-JJGZRBIR.js.map +0 -1
- package/build/modern/chunk-JJP2TFTU.js +0 -29
- package/build/modern/chunk-JJP2TFTU.js.map +0 -1
- package/build/modern/chunk-XB4ZRAH4.js.map +0 -1
- /package/build/legacy/{noExternals.d.ts → noExternals.d.cts} +0 -0
- /package/build/{legacy/chunk-XB4ZRAH4.js.map → modern/chunk-53QBTZZF.js.map} +0 -0
- /package/build/{legacy/chunk-BEYPMC73.js.map → modern/chunk-5WVXIAG2.js.map} +0 -0
- /package/build/{legacy/chunk-LF2QFS5S.js.map → modern/chunk-EJIMJWPB.js.map} +0 -0
- /package/build/modern/{chunk-Y5IY7O23.js.map → chunk-GZY6CH7D.js.map} +0 -0
- /package/build/{legacy/chunk-IL5ELPTT.js.map → modern/chunk-ID3XWGLY.js.map} +0 -0
- /package/build/modern/{chunk-LTDNZRUY.js.map → chunk-S6CMAXQF.js.map} +0 -0
- /package/build/modern/{chunk-QO2UXGW4.js.map → chunk-VPWBSZAR.js.map} +0 -0
- /package/build/{legacy/aria-helpers/nav-menu.aria.js.map → modern/components/Checkbox.js.map} +0 -0
- /package/build/{legacy/aria-helpers/tabs.aria.js.map → modern/components/FileStatus.js.map} +0 -0
- /package/build/{legacy/aria-helpers/trap-focus.aria.js.map → modern/components/ProgressBar.js.map} +0 -0
- /package/build/{legacy/chunk-55J6XMHW.js.map → modern/components/Select.js.map} +0 -0
- /package/build/{legacy/components/Button.js.map → modern/config/icons/checkbox.icons.js.map} +0 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/FileStatus.tsx
|
|
22
|
+
var FileStatus_exports = {};
|
|
23
|
+
__export(FileStatus_exports, {
|
|
24
|
+
FileStatus: () => FileStatus,
|
|
25
|
+
processStatus: () => processStatus
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(FileStatus_exports);
|
|
28
|
+
var import_react2 = require("react");
|
|
29
|
+
|
|
30
|
+
// src/components/ProgressBar.tsx
|
|
31
|
+
var import_css = require("@cerberus/styled-system/css");
|
|
32
|
+
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
function ProgressBar(props) {
|
|
35
|
+
const { indeterminate, size, usage, now, ...nativeProps } = props;
|
|
36
|
+
const styles = (0, import_recipes.progressBar)({ size, usage });
|
|
37
|
+
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
38
|
+
const width = {
|
|
39
|
+
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
...nativeProps,
|
|
45
|
+
"aria-valuemin": 0,
|
|
46
|
+
"aria-valuemax": 100,
|
|
47
|
+
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
48
|
+
className: (0, import_css.cx)(nativeProps.className, styles.root),
|
|
49
|
+
role: "meter",
|
|
50
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
...indeterminate && { "data-indeterminate": true },
|
|
54
|
+
"data-complete": nowClamped === 100,
|
|
55
|
+
className: styles.bar,
|
|
56
|
+
style: width
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// src/components/IconButton.tsx
|
|
64
|
+
var import_css2 = require("@cerberus/styled-system/css");
|
|
65
|
+
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
66
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
67
|
+
function IconButton(props) {
|
|
68
|
+
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
...nativeProps,
|
|
73
|
+
"data-tooltip": true,
|
|
74
|
+
"data-position": props.tooltipPosition ?? "top",
|
|
75
|
+
"aria-label": ariaLabel ?? "Icon Button",
|
|
76
|
+
className: (0, import_css2.cx)(
|
|
77
|
+
nativeProps.className,
|
|
78
|
+
(0, import_recipes2.iconButton)({
|
|
79
|
+
palette,
|
|
80
|
+
usage,
|
|
81
|
+
size
|
|
82
|
+
})
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// src/components/FileStatus.tsx
|
|
89
|
+
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
90
|
+
var import_css4 = require("@cerberus/styled-system/css");
|
|
91
|
+
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
92
|
+
|
|
93
|
+
// src/config/cerbIcons.ts
|
|
94
|
+
var import_icons = require("@cerberus/icons");
|
|
95
|
+
|
|
96
|
+
// src/config/icons/checkbox.icons.tsx
|
|
97
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
98
|
+
function CheckmarkIcon(props) {
|
|
99
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
100
|
+
"svg",
|
|
101
|
+
{
|
|
102
|
+
"aria-hidden": "true",
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
fill: "none",
|
|
105
|
+
role: "img",
|
|
106
|
+
viewBox: "0 0 24 24",
|
|
107
|
+
...props,
|
|
108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
109
|
+
"path",
|
|
110
|
+
{
|
|
111
|
+
fill: "currentColor",
|
|
112
|
+
d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
function IndeterminateIcon(props) {
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
120
|
+
"svg",
|
|
121
|
+
{
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
124
|
+
role: "img",
|
|
125
|
+
fill: "none",
|
|
126
|
+
viewBox: "0 0 24 24",
|
|
127
|
+
...props,
|
|
128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// src/config/cerbIcons.ts
|
|
134
|
+
var defaultIcons = {
|
|
135
|
+
checkbox: CheckmarkIcon,
|
|
136
|
+
close: import_icons.CloseFilled,
|
|
137
|
+
confirmModal: import_icons.Information,
|
|
138
|
+
delete: import_icons.TrashCan,
|
|
139
|
+
promptModal: import_icons.Information,
|
|
140
|
+
fileUploader: import_icons.CloudUpload,
|
|
141
|
+
indeterminate: IndeterminateIcon,
|
|
142
|
+
infoNotification: import_icons.InformationFilled,
|
|
143
|
+
successNotification: import_icons.CheckmarkFilled,
|
|
144
|
+
warningNotification: import_icons.WarningFilled,
|
|
145
|
+
dangerNotification: import_icons.ErrorFilled,
|
|
146
|
+
invalid: import_icons.WarningFilled,
|
|
147
|
+
invalidAlt: import_icons.Warning,
|
|
148
|
+
redo: import_icons.Restart,
|
|
149
|
+
selectArrow: import_icons.ChevronDown,
|
|
150
|
+
toggleChecked: import_icons.Checkmark
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// src/config/defineIcons.ts
|
|
154
|
+
var $cerberusIcons = defaultIcons;
|
|
155
|
+
|
|
156
|
+
// src/components/FieldMessage.tsx
|
|
157
|
+
var import_css3 = require("@cerberus/styled-system/css");
|
|
158
|
+
var import_recipes3 = require("@cerberus/styled-system/recipes");
|
|
159
|
+
|
|
160
|
+
// src/context/field.tsx
|
|
161
|
+
var import_react = require("react");
|
|
162
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
163
|
+
var FieldContext = (0, import_react.createContext)(null);
|
|
164
|
+
function Field(props) {
|
|
165
|
+
const value = (0, import_react.useMemo)(
|
|
166
|
+
() => ({
|
|
167
|
+
disabled: props.disabled,
|
|
168
|
+
readOnly: props.readOnly,
|
|
169
|
+
required: props.required,
|
|
170
|
+
invalid: props.invalid
|
|
171
|
+
}),
|
|
172
|
+
[props.disabled, props.readOnly, props.required, props.invalid]
|
|
173
|
+
);
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldContext.Provider, { value, children: props.children });
|
|
175
|
+
}
|
|
176
|
+
function useFieldContext() {
|
|
177
|
+
const context = (0, import_react.useContext)(FieldContext);
|
|
178
|
+
if (!context) {
|
|
179
|
+
throw new Error("useFieldContext must be used within a Field Provider.");
|
|
180
|
+
}
|
|
181
|
+
return context;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/components/FieldMessage.tsx
|
|
185
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
186
|
+
function FieldMessage(props) {
|
|
187
|
+
const { invalid } = useFieldContext();
|
|
188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
189
|
+
"small",
|
|
190
|
+
{
|
|
191
|
+
...props,
|
|
192
|
+
...invalid && { "aria-invalid": true },
|
|
193
|
+
className: (0, import_css3.cx)(props.className, (0, import_recipes3.fieldMessage)())
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// src/components/FileStatus.tsx
|
|
199
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
200
|
+
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
201
|
+
processStatus2["TODO"] = "todo";
|
|
202
|
+
processStatus2["PROCESSING"] = "processing";
|
|
203
|
+
processStatus2["DONE"] = "done";
|
|
204
|
+
processStatus2["ERROR"] = "error";
|
|
205
|
+
return processStatus2;
|
|
206
|
+
})(processStatus || {});
|
|
207
|
+
function FileStatus(props) {
|
|
208
|
+
const { file, now, status, onClick, ...nativeProps } = props;
|
|
209
|
+
const actionLabel = (0, import_react2.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
210
|
+
const palette = (0, import_react2.useMemo)(() => getPalette(status), [status]);
|
|
211
|
+
const modalIconPalette = (0, import_react2.useMemo)(() => getModalIconPalette(status), [status]);
|
|
212
|
+
const styles = (0, import_react2.useMemo)(() => {
|
|
213
|
+
switch (status) {
|
|
214
|
+
case "todo" /* TODO */:
|
|
215
|
+
return (0, import_recipes4.fileStatus)({ status: "todo" });
|
|
216
|
+
case "processing" /* PROCESSING */:
|
|
217
|
+
return (0, import_recipes4.fileStatus)({ status: "processing" });
|
|
218
|
+
case "done" /* DONE */:
|
|
219
|
+
return (0, import_recipes4.fileStatus)({ status: "done" });
|
|
220
|
+
case "error" /* ERROR */:
|
|
221
|
+
return (0, import_recipes4.fileStatus)({ status: "error" });
|
|
222
|
+
default:
|
|
223
|
+
return (0, import_recipes4.fileStatus)();
|
|
224
|
+
}
|
|
225
|
+
}, [status]);
|
|
226
|
+
const handleClick = (0, import_react2.useCallback)(
|
|
227
|
+
(e) => {
|
|
228
|
+
const actionStatus = getStatusActionLabel(
|
|
229
|
+
status
|
|
230
|
+
).toLocaleLowerCase();
|
|
231
|
+
onClick(actionStatus, e);
|
|
232
|
+
},
|
|
233
|
+
[onClick]
|
|
234
|
+
);
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
...nativeProps,
|
|
239
|
+
className: (0, import_css4.cx)(nativeProps.className, styles.root, (0, import_patterns.hstack)()),
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
className: (0, import_css4.cx)(
|
|
245
|
+
styles.icon,
|
|
246
|
+
(0, import_patterns.circle)({
|
|
247
|
+
size: "2rem"
|
|
248
|
+
})
|
|
249
|
+
),
|
|
250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MatchFileStatusIcon, { status })
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: (0, import_patterns.vstack)({
|
|
257
|
+
alignItems: "flex-start",
|
|
258
|
+
gap: "0.12rem",
|
|
259
|
+
w: "full"
|
|
260
|
+
}),
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
263
|
+
"small",
|
|
264
|
+
{
|
|
265
|
+
className: (0, import_css4.css)({
|
|
266
|
+
color: "page.text.initial",
|
|
267
|
+
textStyle: "label-sm"
|
|
268
|
+
}),
|
|
269
|
+
children: file
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressBar, { now, size: "sm" }),
|
|
273
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Field, { invalid: modalIconPalette === "danger", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
274
|
+
FieldMessage,
|
|
275
|
+
{
|
|
276
|
+
className: (0, import_css4.css)({
|
|
277
|
+
color: "page.text.100"
|
|
278
|
+
}),
|
|
279
|
+
id: `help:${file}`,
|
|
280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MatchFileStatusText, { status, now })
|
|
281
|
+
}
|
|
282
|
+
) })
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
287
|
+
IconButton,
|
|
288
|
+
{
|
|
289
|
+
ariaLabel: actionLabel,
|
|
290
|
+
onClick: handleClick,
|
|
291
|
+
palette,
|
|
292
|
+
size: "sm",
|
|
293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MatchStatusAction, { status })
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
function MatchFileStatusIcon(props) {
|
|
301
|
+
const {
|
|
302
|
+
fileUploader: FileUploaderIcon,
|
|
303
|
+
invalidAlt: InvalidIcon,
|
|
304
|
+
successNotification: DoneIcon
|
|
305
|
+
} = $cerberusIcons;
|
|
306
|
+
switch (props.status) {
|
|
307
|
+
case "todo" /* TODO */:
|
|
308
|
+
case "processing" /* PROCESSING */:
|
|
309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileUploaderIcon, {});
|
|
310
|
+
case "done" /* DONE */:
|
|
311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DoneIcon, {});
|
|
312
|
+
case "error" /* ERROR */:
|
|
313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InvalidIcon, {});
|
|
314
|
+
default:
|
|
315
|
+
throw new Error("Unknown status");
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function MatchFileStatusText(props) {
|
|
319
|
+
switch (props.status) {
|
|
320
|
+
case "todo" /* TODO */:
|
|
321
|
+
return "Waiting to upload";
|
|
322
|
+
case "processing" /* PROCESSING */:
|
|
323
|
+
return `${props.now}% Complete`;
|
|
324
|
+
case "done" /* DONE */:
|
|
325
|
+
return "File uploaded successfully";
|
|
326
|
+
case "error" /* ERROR */:
|
|
327
|
+
return "There was an error uploading the file";
|
|
328
|
+
default:
|
|
329
|
+
throw new Error("Invalid status");
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function MatchStatusAction(props) {
|
|
333
|
+
const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons;
|
|
334
|
+
switch (props.status) {
|
|
335
|
+
case "todo" /* TODO */:
|
|
336
|
+
case "processing" /* PROCESSING */:
|
|
337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CloseIcon, {});
|
|
338
|
+
case "error" /* ERROR */:
|
|
339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RedoIcon, {});
|
|
340
|
+
case "done" /* DONE */:
|
|
341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrashIcon, {});
|
|
342
|
+
default:
|
|
343
|
+
throw new Error("Invalid status");
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function getStatusActionLabel(status) {
|
|
347
|
+
switch (status) {
|
|
348
|
+
case "todo" /* TODO */:
|
|
349
|
+
case "processing" /* PROCESSING */:
|
|
350
|
+
return "Cancel";
|
|
351
|
+
case "error" /* ERROR */:
|
|
352
|
+
return "Retry";
|
|
353
|
+
case "done" /* DONE */:
|
|
354
|
+
return "Delete";
|
|
355
|
+
default:
|
|
356
|
+
return "";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function getPalette(status) {
|
|
360
|
+
switch (status) {
|
|
361
|
+
case "todo" /* TODO */:
|
|
362
|
+
case "processing" /* PROCESSING */:
|
|
363
|
+
return "danger";
|
|
364
|
+
case "error" /* ERROR */:
|
|
365
|
+
return "action";
|
|
366
|
+
case "done" /* DONE */:
|
|
367
|
+
return "danger";
|
|
368
|
+
default:
|
|
369
|
+
return "action";
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function getModalIconPalette(status) {
|
|
373
|
+
switch (status) {
|
|
374
|
+
case "todo" /* TODO */:
|
|
375
|
+
case "processing" /* PROCESSING */:
|
|
376
|
+
return "action";
|
|
377
|
+
case "error" /* ERROR */:
|
|
378
|
+
return "danger";
|
|
379
|
+
case "done" /* DONE */:
|
|
380
|
+
return "success";
|
|
381
|
+
default:
|
|
382
|
+
return "action";
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
386
|
+
0 && (module.exports = {
|
|
387
|
+
FileStatus,
|
|
388
|
+
processStatus
|
|
389
|
+
});
|
|
390
|
+
//# sourceMappingURL=FileStatus.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/FileStatus.tsx","../../../src/components/ProgressBar.tsx","../../../src/components/IconButton.tsx","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/config/defineIcons.ts","../../../src/components/FieldMessage.tsx","../../../src/context/field.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport { ProgressBar } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { circle, hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { FieldMessage } from './FieldMessage'\nimport { Field } from '../context/field'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n file: string\n now: number\n status: processStatus\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * This component displays the status of a file.\n * @param props - {\n * file: string,\n * now: number,\n * status: keyof typeof fileStatus,\n * action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n * }.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <div\n className={cx(\n styles.icon,\n circle({\n size: '2rem',\n }),\n )}\n >\n <MatchFileStatusIcon status={status} />\n </div>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar now={now} size=\"sm\" />\n <Field invalid={modalIconPalette === 'danger'}>\n <FieldMessage\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldMessage>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const {\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = $cerberusIcons\n\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <FileUploaderIcon />\n case processStatus.DONE:\n return <DoneIcon />\n case processStatus.ERROR:\n return <InvalidIcon />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'action'\n case processStatus.ERROR:\n return 'danger'\n case processStatus.DONE:\n return 'success'\n default:\n return 'action'\n }\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport interface ProgressBarBaseProps extends HTMLAttributes<HTMLDivElement> {}\nexport type NonIndeterminateProgressBarProps = {\n indeterminate?: never\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n indeterminate: true\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @param props - HTML div element attributes\n * @param props.now - The current value of the progress bar\n * @param props.indeterminate - Whether the progress bar is indeterminate\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <div\n {...nativeProps}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"meter\"\n >\n <div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </div>\n )\n}\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { iconButton } from '@cerberus/styled-system/recipes'\nimport type { Positions } from '../types'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n ariaLabel: string\n tooltipPosition?: Positions\n}\nexport type IconButtonRecipeProps = RecipeVariantProps<typeof iconButton>\nexport type IconButtonProps = IconButtonRawProps & IconButtonRecipeProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @description https://github.com/omnifed/cerberus/blob/main/packages/react/src/components/IconButton.tsx\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n data-tooltip\n data-position={props.tooltipPosition ?? 'top'}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloseFilled,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n Restart,\n TrashCan,\n Warning,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n checkbox: CheckmarkIcon,\n close: CloseFilled,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n fileUploader: CloudUpload,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\ninterface CheckboxIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\ninterface IndeterminateIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","import { defaultIcons, type DefinedIcons } from './cerbIcons'\n\nfunction _validateIconsProperties(icons: DefinedIcons) {\n if (!icons.invalid) {\n throw new Error(\n 'The an invalid property must be defined in your custom icons library.',\n )\n }\n}\n\nexport function defineIcons(icons: DefinedIcons): Required<DefinedIcons> {\n _validateIconsProperties(icons)\n $cerberusIcons = {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons>\n return $cerberusIcons\n}\n\n// Default icons\n\nexport let $cerberusIcons = defaultIcons as Required<DefinedIcons>\n","'use client'\n\nimport type { HTMLAttributes } from 'react'\nimport { cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { fieldMessage } from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the FieldMessage component.\n * @module\n */\n\nexport type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>\nexport interface FieldMessageBaseProps\n extends HTMLAttributes<HTMLParagraphElement> {\n id: string\n}\nexport type FieldMessageProps = FieldMessageBaseProps & FieldMessageRecipe\n\n/**\n * A component that provides feedback about the field.\n * @description [FieldMessage Docs](https://cerberus.digitalu.design/react/field-message)\n * @example\n * ```tsx\n * <Field>\n * <Label htmlFor=\"first_name\">First Name</Label>\n * <Input aria-describedBy=\"help:first_name\" id=\"first_name\" type=\"text\" />\n * <FieldMessage id=\"help:first_name\">\n * This will only be used in your account information.\n * </FieldMessage>\n * </Field>\n * ```\n */\nexport function FieldMessage(props: FieldMessageProps) {\n const { invalid } = useFieldContext()\n return (\n <small\n {...props}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, fieldMessage())}\n />\n )\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\nexport interface FieldContextValue {\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\nexport function Field(\n props: PropsWithChildren<FieldContextValue>,\n): JSX.Element {\n const value = useMemo(\n () => ({\n disabled: props.disabled,\n readOnly: props.readOnly,\n required: props.required,\n invalid: props.invalid,\n }),\n [props.disabled, props.readOnly, props.required, props.invalid],\n )\n\n return (\n <FieldContext.Provider value={value}>\n {props.children}\n </FieldContext.Provider>\n )\n}\n\nexport function useFieldContext(): FieldContextValue {\n const context = useContext(FieldContext)\n if (!context) {\n throw new Error('useFieldContext must be used within a Field Provider.')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAKO;;;ACPP,iBAAmB;AACnB,qBAGO;AAgDD;AAjBC,SAAS,YAAY,OAAyB;AACnD,QAAM,EAAE,eAAe,MAAM,OAAO,KAAK,GAAG,YAAY,IAAI;AAC5D,QAAM,aAAS,4BAAY,EAAE,MAAM,MAAM,CAAC;AAC1C,QAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,CAAC;AACtD,QA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_react","import_css","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","processStatus"]}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/FileUploader.tsx
|
|
22
|
+
var FileUploader_exports = {};
|
|
23
|
+
__export(FileUploader_exports, {
|
|
24
|
+
FileUploader: () => FileUploader
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(FileUploader_exports);
|
|
27
|
+
var import_css = require("@cerberus/styled-system/css");
|
|
28
|
+
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
29
|
+
|
|
30
|
+
// src/components/Show.tsx
|
|
31
|
+
var import_react = require("react");
|
|
32
|
+
function Show(props) {
|
|
33
|
+
const { when, children, fallback } = props;
|
|
34
|
+
const condition = (0, import_react.useMemo)(() => when ?? false, [when]);
|
|
35
|
+
return (0, import_react.useMemo)(() => {
|
|
36
|
+
if (condition) return children;
|
|
37
|
+
return fallback ?? null;
|
|
38
|
+
}, [condition, children, fallback]);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/components/FileUploader.tsx
|
|
42
|
+
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
43
|
+
|
|
44
|
+
// src/config/cerbIcons.ts
|
|
45
|
+
var import_icons = require("@cerberus/icons");
|
|
46
|
+
|
|
47
|
+
// src/config/icons/checkbox.icons.tsx
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
+
function CheckmarkIcon(props) {
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
"svg",
|
|
52
|
+
{
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
55
|
+
fill: "none",
|
|
56
|
+
role: "img",
|
|
57
|
+
viewBox: "0 0 24 24",
|
|
58
|
+
...props,
|
|
59
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
fill: "currentColor",
|
|
63
|
+
d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function IndeterminateIcon(props) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
"svg",
|
|
72
|
+
{
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75
|
+
role: "img",
|
|
76
|
+
fill: "none",
|
|
77
|
+
viewBox: "0 0 24 24",
|
|
78
|
+
...props,
|
|
79
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/config/cerbIcons.ts
|
|
85
|
+
var defaultIcons = {
|
|
86
|
+
checkbox: CheckmarkIcon,
|
|
87
|
+
close: import_icons.CloseFilled,
|
|
88
|
+
confirmModal: import_icons.Information,
|
|
89
|
+
delete: import_icons.TrashCan,
|
|
90
|
+
promptModal: import_icons.Information,
|
|
91
|
+
fileUploader: import_icons.CloudUpload,
|
|
92
|
+
indeterminate: IndeterminateIcon,
|
|
93
|
+
infoNotification: import_icons.InformationFilled,
|
|
94
|
+
successNotification: import_icons.CheckmarkFilled,
|
|
95
|
+
warningNotification: import_icons.WarningFilled,
|
|
96
|
+
dangerNotification: import_icons.ErrorFilled,
|
|
97
|
+
invalid: import_icons.WarningFilled,
|
|
98
|
+
invalidAlt: import_icons.Warning,
|
|
99
|
+
redo: import_icons.Restart,
|
|
100
|
+
selectArrow: import_icons.ChevronDown,
|
|
101
|
+
toggleChecked: import_icons.Checkmark
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// src/config/defineIcons.ts
|
|
105
|
+
var $cerberusIcons = defaultIcons;
|
|
106
|
+
|
|
107
|
+
// src/components/FileUploader.tsx
|
|
108
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
109
|
+
function FileUploader(props) {
|
|
110
|
+
var _a;
|
|
111
|
+
const styles = (0, import_recipes.fileUploader)();
|
|
112
|
+
const Icon = $cerberusIcons.fileUploader;
|
|
113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
className: (0, import_css.cx)(
|
|
117
|
+
(0, import_patterns.vstack)({
|
|
118
|
+
justify: "center"
|
|
119
|
+
}),
|
|
120
|
+
styles.container
|
|
121
|
+
),
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: (0, import_css.cx)(styles.icon, (0, import_recipes.modalIcon)(), (0, import_patterns.circle)()), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, {}) }),
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
125
|
+
"label",
|
|
126
|
+
{
|
|
127
|
+
className: (0, import_css.cx)(
|
|
128
|
+
(0, import_patterns.vstack)({
|
|
129
|
+
justify: "center"
|
|
130
|
+
}),
|
|
131
|
+
styles.label
|
|
132
|
+
),
|
|
133
|
+
htmlFor: props.name,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
136
|
+
"Import ",
|
|
137
|
+
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
138
|
+
" files",
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
141
|
+
"input",
|
|
142
|
+
{
|
|
143
|
+
...props,
|
|
144
|
+
className: (0, import_css.cx)(props.className, styles.input),
|
|
145
|
+
type: "file"
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
156
|
+
0 && (module.exports = {
|
|
157
|
+
FileUploader
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=FileUploader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/FileUploader.tsx","../../../src/components/Show.tsx","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/config/defineIcons.ts"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { circle, vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader, modalIcon } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n heading?: string\n name: string\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const styles = fileUploader()\n const Icon = $cerberusIcons.fileUploader\n\n return (\n <div\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <span className={cx(styles.icon, modalIcon(), circle())}>\n <Icon />\n </span>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\nexport interface ShowProps {\n when: boolean | null | undefined\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render its children or an optional fallback component\n * based on the SolidJS component.\n * @definition [Show docs](https://cerberus.digitalu.design/react/show)\n * @example\n * ```tsx\n * <Show when={condition}>\n * <div>Content</div>\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloseFilled,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n Restart,\n TrashCan,\n Warning,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n checkbox: CheckmarkIcon,\n close: CloseFilled,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n fileUploader: CloudUpload,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\ninterface CheckboxIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\ninterface IndeterminateIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","import { defaultIcons, type DefinedIcons } from './cerbIcons'\n\nfunction _validateIconsProperties(icons: DefinedIcons) {\n if (!icons.invalid) {\n throw new Error(\n 'The an invalid property must be defined in your custom icons library.',\n )\n }\n}\n\nexport function defineIcons(icons: DefinedIcons): Required<DefinedIcons> {\n _validateIconsProperties(icons)\n $cerberusIcons = {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons>\n return $cerberusIcons\n}\n\n// Default icons\n\nexport let $cerberusIcons = defaultIcons as Required<DefinedIcons>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,sBAA+B;;;ACD/B,mBAAgE;AAiBzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,sBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,sBAAQ,MAAM;AACnB,QAAI,UAAW,QAAO;AACtB,WAAO,YAAY;AAAA,EACrB,GAAG,CAAC,WAAW,UAAU,QAAQ,CAAC;AACpC;;;ADrBA,qBAAwC;;;AENxC,mBAcO;;;ACQD;AAVC,SAAS,cAAc,OAA0B;AACtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAOO,SAAS,kBAAkB,OAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,sDAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD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F;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/IconButton.tsx
|
|
21
|
+
var IconButton_exports = {};
|
|
22
|
+
__export(IconButton_exports, {
|
|
23
|
+
IconButton: () => IconButton
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(IconButton_exports);
|
|
26
|
+
var import_css = require("@cerberus/styled-system/css");
|
|
27
|
+
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function IconButton(props) {
|
|
30
|
+
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
...nativeProps,
|
|
35
|
+
"data-tooltip": true,
|
|
36
|
+
"data-position": props.tooltipPosition ?? "top",
|
|
37
|
+
"aria-label": ariaLabel ?? "Icon Button",
|
|
38
|
+
className: (0, import_css.cx)(
|
|
39
|
+
nativeProps.className,
|
|
40
|
+
(0, import_recipes.iconButton)({
|
|
41
|
+
palette,
|
|
42
|
+
usage,
|
|
43
|
+
size
|
|
44
|
+
})
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
IconButton
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=IconButton.cjs.map
|