@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
|
@@ -11,6 +11,7 @@ import { ButtonVariantProps } from '@cerberus/styled-system/recipes';
|
|
|
11
11
|
import { CancelDrop } from '@dnd-kit/core';
|
|
12
12
|
import { CarbonIconType } from '@cerberus/icons';
|
|
13
13
|
import { ChangeEvent } from 'react';
|
|
14
|
+
import { CheckboxVariantProps } from '@cerberus/styled-system/recipes';
|
|
14
15
|
import { ClientRect as ClientRect_2 } from '@dnd-kit/core';
|
|
15
16
|
import { closestCenter } from '@dnd-kit/core';
|
|
16
17
|
import { closestCorners } from '@dnd-kit/core';
|
|
@@ -53,6 +54,7 @@ import { DroppableContainers } from '@dnd-kit/core';
|
|
|
53
54
|
import { DroppableMeasuring } from '@dnd-kit/core';
|
|
54
55
|
import { ElementType } from 'react';
|
|
55
56
|
import { fieldMessage } from '@cerberus/styled-system/recipes';
|
|
57
|
+
import { FileStatusVariantProps } from '@cerberus/styled-system/recipes';
|
|
56
58
|
import { ForwardRefExoticComponent } from 'react';
|
|
57
59
|
import { getClientRect } from '@dnd-kit/core';
|
|
58
60
|
import { getFirstCollision } from '@dnd-kit/core';
|
|
@@ -82,6 +84,7 @@ import { MouseSensor } from '@dnd-kit/core';
|
|
|
82
84
|
import { MouseSensorOptions } from '@dnd-kit/core';
|
|
83
85
|
import { MutableRefObject } from 'react';
|
|
84
86
|
import { NotificationVariantProps } from '@cerberus/styled-system/recipes';
|
|
87
|
+
import type { OptionHTMLAttributes } from 'react';
|
|
85
88
|
import { Over } from '@dnd-kit/core';
|
|
86
89
|
import { PointerActivationConstraint } from '@dnd-kit/core';
|
|
87
90
|
import { PointerEventHandlers } from '@dnd-kit/core';
|
|
@@ -90,6 +93,7 @@ import { PointerSensorOptions } from '@dnd-kit/core';
|
|
|
90
93
|
import { PointerSensorProps } from '@dnd-kit/core';
|
|
91
94
|
import { pointerWithin } from '@dnd-kit/core';
|
|
92
95
|
import type { Pretty } from '@cerberus/styled-system/types';
|
|
96
|
+
import { ProgressBarVariantProps } from '@cerberus/styled-system/recipes';
|
|
93
97
|
import { PropsWithChildren } from 'react';
|
|
94
98
|
import { radio } from '@cerberus/styled-system/recipes';
|
|
95
99
|
import { ReactNode } from 'react';
|
|
@@ -100,6 +104,8 @@ import { rectIntersection } from '@dnd-kit/core';
|
|
|
100
104
|
import { RefAttributes } from 'react';
|
|
101
105
|
import { RefObject } from 'react';
|
|
102
106
|
import { ScreenReaderInstructions } from '@dnd-kit/core';
|
|
107
|
+
import type { SelectHTMLAttributes } from 'react';
|
|
108
|
+
import { SelectVariantProps } from '@cerberus/styled-system/recipes';
|
|
103
109
|
import { Sensor } from '@dnd-kit/core';
|
|
104
110
|
import { SensorContext } from '@dnd-kit/core';
|
|
105
111
|
import { SensorDescriptor } from '@dnd-kit/core';
|
|
@@ -109,6 +115,7 @@ import { SensorOptions } from '@dnd-kit/core';
|
|
|
109
115
|
import { SensorProps } from '@dnd-kit/core';
|
|
110
116
|
import { SensorResponse } from '@dnd-kit/core';
|
|
111
117
|
import { Sensors } from '@dnd-kit/core';
|
|
118
|
+
import type { SVGProps } from 'react';
|
|
112
119
|
import type { TableHTMLAttributes } from 'react';
|
|
113
120
|
import { TabsVariantProps } from '@cerberus/styled-system/recipes';
|
|
114
121
|
import { tag } from '@cerberus/styled-system/recipes';
|
|
@@ -178,6 +185,46 @@ export { ButtonProps as ButtonProps_alias_1 }
|
|
|
178
185
|
|
|
179
186
|
export { CancelDrop }
|
|
180
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Checkbox component
|
|
190
|
+
* @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)
|
|
191
|
+
* @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)
|
|
192
|
+
* @definition [Checkbox docs](https://cerberus.digitalu.design/react/checkbox)
|
|
193
|
+
* @example
|
|
194
|
+
* ```tsx
|
|
195
|
+
* <Field>
|
|
196
|
+
* <Checkbox id="legal" checked={checked.legal} onChange={handleChange} />
|
|
197
|
+
* </Field>
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
declare function Checkbox(props: CheckboxProps): JSX_2.Element;
|
|
201
|
+
export { Checkbox }
|
|
202
|
+
export { Checkbox as Checkbox_alias_1 }
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* This module contains substitute icons for the Checkbox component.
|
|
206
|
+
* @module
|
|
207
|
+
*/
|
|
208
|
+
declare interface CheckboxIconProps extends SVGProps<SVGSVGElement> {
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* This module contains the Checkbox component.
|
|
213
|
+
* @module
|
|
214
|
+
*/
|
|
215
|
+
declare type CheckboxProps = CheckboxVariantProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {
|
|
216
|
+
describedBy?: string;
|
|
217
|
+
id: string;
|
|
218
|
+
mixed?: boolean;
|
|
219
|
+
};
|
|
220
|
+
export { CheckboxProps }
|
|
221
|
+
export { CheckboxProps as CheckboxProps_alias_1 }
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Checkmark icon for Checkbox component
|
|
225
|
+
*/
|
|
226
|
+
export declare function CheckmarkIcon(props: CheckboxIconProps): JSX_2.Element;
|
|
227
|
+
|
|
181
228
|
declare type ClickableTagProps = HTMLAttributes<HTMLSpanElement> & {
|
|
182
229
|
gradient?: never;
|
|
183
230
|
palette?: never;
|
|
@@ -272,14 +319,21 @@ export { DefaultThemes }
|
|
|
272
319
|
export { DefaultThemes as DefaultThemes_alias_1 }
|
|
273
320
|
|
|
274
321
|
export declare interface DefinedIcons {
|
|
322
|
+
checkbox?: IconType;
|
|
323
|
+
close?: IconType;
|
|
275
324
|
confirmModal?: IconType;
|
|
325
|
+
delete?: IconType;
|
|
276
326
|
promptModal?: IconType;
|
|
277
327
|
fileUploader?: IconType;
|
|
328
|
+
indeterminate?: IconType;
|
|
278
329
|
infoNotification?: IconType;
|
|
279
330
|
successNotification?: IconType;
|
|
280
331
|
warningNotification?: IconType;
|
|
281
332
|
dangerNotification?: IconType;
|
|
282
333
|
invalid: IconType;
|
|
334
|
+
invalidAlt?: IconType;
|
|
335
|
+
redo?: IconType;
|
|
336
|
+
selectArrow?: IconType;
|
|
283
337
|
toggleChecked?: IconType;
|
|
284
338
|
}
|
|
285
339
|
|
|
@@ -448,6 +502,48 @@ declare type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>;
|
|
|
448
502
|
export { FieldMessageRecipe }
|
|
449
503
|
export { FieldMessageRecipe as FieldMessageRecipe_alias_1 }
|
|
450
504
|
|
|
505
|
+
declare interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
506
|
+
file: string;
|
|
507
|
+
now: number;
|
|
508
|
+
status: processStatus;
|
|
509
|
+
onClick: (status: FileStatusActions, e: MouseEvent_2<HTMLButtonElement>) => void;
|
|
510
|
+
}
|
|
511
|
+
export { FileBaseStatusProps }
|
|
512
|
+
export { FileBaseStatusProps as FileBaseStatusProps_alias_1 }
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* This component displays the status of a file.
|
|
516
|
+
* @param props - {
|
|
517
|
+
* file: string,
|
|
518
|
+
* now: number,
|
|
519
|
+
* status: keyof typeof fileStatus,
|
|
520
|
+
* action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
|
|
521
|
+
* }.
|
|
522
|
+
* @example
|
|
523
|
+
* ```tsx
|
|
524
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
declare function FileStatus(props: FileStatusProps): JSX_2.Element;
|
|
528
|
+
export { FileStatus }
|
|
529
|
+
export { FileStatus as FileStatus_alias_1 }
|
|
530
|
+
|
|
531
|
+
declare type FileStatusActions = 'cancel' | 'retry' | 'delete';
|
|
532
|
+
export { FileStatusActions }
|
|
533
|
+
export { FileStatusActions as FileStatusActions_alias_1 }
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* This module contains the FileStatus component.
|
|
537
|
+
* @module
|
|
538
|
+
*/
|
|
539
|
+
declare type FileStatusKey = (typeof processStatus)[keyof typeof processStatus];
|
|
540
|
+
export { FileStatusKey }
|
|
541
|
+
export { FileStatusKey as FileStatusKey_alias_1 }
|
|
542
|
+
|
|
543
|
+
declare type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps;
|
|
544
|
+
export { FileStatusProps }
|
|
545
|
+
export { FileStatusProps as FileStatusProps_alias_1 }
|
|
546
|
+
|
|
451
547
|
declare function FileUploader(props: FileUploaderProps): JSX_2.Element;
|
|
452
548
|
export { FileUploader }
|
|
453
549
|
export { FileUploader as FileUploader_alias_1 }
|
|
@@ -505,6 +601,21 @@ export { IconButtonRecipeProps as IconButtonRecipeProps_alias_1 }
|
|
|
505
601
|
|
|
506
602
|
export declare type IconType = CarbonIconType | ElementType;
|
|
507
603
|
|
|
604
|
+
/**
|
|
605
|
+
* Indeterminate icon for Checkbox component
|
|
606
|
+
*/
|
|
607
|
+
export declare function IndeterminateIcon(props: IndeterminateIconProps): JSX_2.Element;
|
|
608
|
+
|
|
609
|
+
declare interface IndeterminateIconProps extends SVGProps<SVGSVGElement> {
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
declare type IndeterminateProgressBarProps = {
|
|
613
|
+
indeterminate: true;
|
|
614
|
+
now?: never;
|
|
615
|
+
};
|
|
616
|
+
export { IndeterminateProgressBarProps }
|
|
617
|
+
export { IndeterminateProgressBarProps as IndeterminateProgressBarProps_alias_1 }
|
|
618
|
+
|
|
508
619
|
declare function Input(props: InputProps): JSX_2.Element;
|
|
509
620
|
export { Input }
|
|
510
621
|
export { Input as Input_alias_1 }
|
|
@@ -664,11 +775,7 @@ declare function ModalIcon(props: PropsWithChildren<ModalIconProps>): JSX_2.Elem
|
|
|
664
775
|
export { ModalIcon }
|
|
665
776
|
export { ModalIcon as ModalIcon_alias_1 }
|
|
666
777
|
|
|
667
|
-
declare type
|
|
668
|
-
export { ModalIconBaseProps }
|
|
669
|
-
export { ModalIconBaseProps as ModalIconBaseProps_alias_1 }
|
|
670
|
-
|
|
671
|
-
declare type ModalIconProps = ModalIconBaseProps & ModalIconVariantProps;
|
|
778
|
+
declare type ModalIconProps = HTMLAttributes<HTMLDivElement> & ModalIconVariantProps;
|
|
672
779
|
export { ModalIconProps }
|
|
673
780
|
export { ModalIconProps as ModalIconProps_alias_1 }
|
|
674
781
|
|
|
@@ -781,6 +888,13 @@ declare type NavTriggerRef = RefObject<HTMLButtonElement>;
|
|
|
781
888
|
export { NavTriggerRef }
|
|
782
889
|
export { NavTriggerRef as NavTriggerRef_alias_1 }
|
|
783
890
|
|
|
891
|
+
declare type NonIndeterminateProgressBarProps = {
|
|
892
|
+
indeterminate?: never;
|
|
893
|
+
now: number;
|
|
894
|
+
};
|
|
895
|
+
export { NonIndeterminateProgressBarProps }
|
|
896
|
+
export { NonIndeterminateProgressBarProps as NonIndeterminateProgressBarProps_alias_1 }
|
|
897
|
+
|
|
784
898
|
/**
|
|
785
899
|
* The info notification component.
|
|
786
900
|
* @param props - The component props.
|
|
@@ -884,6 +998,22 @@ declare interface NotifyOptions {
|
|
|
884
998
|
export { NotifyOptions }
|
|
885
999
|
export { NotifyOptions as NotifyOptions_alias_1 }
|
|
886
1000
|
|
|
1001
|
+
/**
|
|
1002
|
+
* Option component
|
|
1003
|
+
* props: OptionHTMLAttributes<HTMLOptionElement>
|
|
1004
|
+
* @example
|
|
1005
|
+
* ```tsx
|
|
1006
|
+
* <Option value="one">Option 1</Option>
|
|
1007
|
+
* ```
|
|
1008
|
+
*/
|
|
1009
|
+
declare function Option_2(props: OptionProps): JSX_2.Element;
|
|
1010
|
+
export { Option_2 as Option }
|
|
1011
|
+
export { Option_2 as Option_alias_1 }
|
|
1012
|
+
|
|
1013
|
+
declare type OptionProps = OptionHTMLAttributes<HTMLOptionElement>;
|
|
1014
|
+
export { OptionProps }
|
|
1015
|
+
export { OptionProps as OptionProps_alias_1 }
|
|
1016
|
+
|
|
887
1017
|
export { Over }
|
|
888
1018
|
|
|
889
1019
|
export { PointerActivationConstraint }
|
|
@@ -922,6 +1052,50 @@ declare type Positions = 'top' | 'right' | 'bottom' | 'left';
|
|
|
922
1052
|
export { Positions }
|
|
923
1053
|
export { Positions as Positions_alias_1 }
|
|
924
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* A helper object to represent the status of a file.
|
|
1057
|
+
* @example
|
|
1058
|
+
* ```tsx
|
|
1059
|
+
* import { fileStatus } from '@cerberus/react'
|
|
1060
|
+
* processStatus.TODO // 'todo'
|
|
1061
|
+
* ```
|
|
1062
|
+
*/
|
|
1063
|
+
declare const enum processStatus {
|
|
1064
|
+
TODO = "todo",
|
|
1065
|
+
PROCESSING = "processing",
|
|
1066
|
+
DONE = "done",
|
|
1067
|
+
ERROR = "error"
|
|
1068
|
+
}
|
|
1069
|
+
export { processStatus }
|
|
1070
|
+
export { processStatus as processStatus_alias_1 }
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* The ProgressBar component is used to display the progress of a task.
|
|
1074
|
+
* @param props - HTML div element attributes
|
|
1075
|
+
* @param props.now - The current value of the progress bar
|
|
1076
|
+
* @param props.indeterminate - Whether the progress bar is indeterminate
|
|
1077
|
+
* @example
|
|
1078
|
+
* ```tsx
|
|
1079
|
+
* <ProgressBar value={75} />
|
|
1080
|
+
* ```
|
|
1081
|
+
*/
|
|
1082
|
+
declare function ProgressBar(props: ProgressBarProps): JSX_2.Element;
|
|
1083
|
+
export { ProgressBar }
|
|
1084
|
+
export { ProgressBar as ProgressBar_alias_1 }
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* This module contains the ProgressBar component.
|
|
1088
|
+
* @module
|
|
1089
|
+
*/
|
|
1090
|
+
declare interface ProgressBarBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
1091
|
+
}
|
|
1092
|
+
export { ProgressBarBaseProps }
|
|
1093
|
+
export { ProgressBarBaseProps as ProgressBarBaseProps_alias_1 }
|
|
1094
|
+
|
|
1095
|
+
declare type ProgressBarProps = ProgressBarBaseProps & ProgressBarVariantProps & (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps);
|
|
1096
|
+
export { ProgressBarProps }
|
|
1097
|
+
export { ProgressBarProps as ProgressBarProps_alias_1 }
|
|
1098
|
+
|
|
925
1099
|
/**
|
|
926
1100
|
* Provides a prompt modal to the app.
|
|
927
1101
|
* @example
|
|
@@ -989,6 +1163,34 @@ export { rectIntersection }
|
|
|
989
1163
|
|
|
990
1164
|
export { ScreenReaderInstructions }
|
|
991
1165
|
|
|
1166
|
+
/**
|
|
1167
|
+
* Select component
|
|
1168
|
+
* props: SelectHTMLAttributes<HTMLSelectElement> & SelectVariantProps & { describedBy?: string }
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```tsx
|
|
1171
|
+
* <Select describedby="help:fruit" id="fruit">
|
|
1172
|
+
* <Option value="">Choose option</Option>
|
|
1173
|
+
* <Option value="one">Option 1</Option>
|
|
1174
|
+
* <Option value="two">Option 2</Option>
|
|
1175
|
+
* <Option value="three">Option 3</Option>
|
|
1176
|
+
* </Select>
|
|
1177
|
+
* ```
|
|
1178
|
+
*/
|
|
1179
|
+
declare function Select(props: SelectProps): JSX_2.Element;
|
|
1180
|
+
export { Select }
|
|
1181
|
+
export { Select as Select_alias_1 }
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* This module contains the select components.
|
|
1185
|
+
* @module
|
|
1186
|
+
*/
|
|
1187
|
+
declare type SelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> & SelectVariantProps & {
|
|
1188
|
+
id: string;
|
|
1189
|
+
describedBy?: string;
|
|
1190
|
+
};
|
|
1191
|
+
export { SelectProps }
|
|
1192
|
+
export { SelectProps as SelectProps_alias_1 }
|
|
1193
|
+
|
|
992
1194
|
export { Sensor }
|
|
993
1195
|
|
|
994
1196
|
export { SensorContext }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Label.tsx
|
|
9
9
|
import { label } from "@cerberus/styled-system/recipes";
|
|
@@ -18,12 +18,13 @@ function Label(props) {
|
|
|
18
18
|
"label",
|
|
19
19
|
{
|
|
20
20
|
...nativeProps,
|
|
21
|
-
"data-disabled":
|
|
21
|
+
...disabled && { "data-disabled": true },
|
|
22
22
|
className: cx(
|
|
23
23
|
nativeProps.className,
|
|
24
24
|
label({ size, usage }),
|
|
25
25
|
hstack({
|
|
26
|
-
justify: "space-between"
|
|
26
|
+
justify: "space-between",
|
|
27
|
+
w: "full"
|
|
27
28
|
})
|
|
28
29
|
),
|
|
29
30
|
children: [
|
|
@@ -32,7 +33,7 @@ function Label(props) {
|
|
|
32
33
|
"span",
|
|
33
34
|
{
|
|
34
35
|
className: css({
|
|
35
|
-
color: "
|
|
36
|
+
color: "inherit",
|
|
36
37
|
fontSize: "inherit"
|
|
37
38
|
}),
|
|
38
39
|
children: "(required)"
|
|
@@ -46,4 +47,4 @@ function Label(props) {
|
|
|
46
47
|
export {
|
|
47
48
|
Label
|
|
48
49
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-2FK7NR7Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Label.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label } from '@cerberus/styled-system/recipes'\nimport { css, cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\n\nexport type LabelRecipeProps = RecipeVariantProps<typeof label>\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n htmlFor: string\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelRecipeProps\n\n/**\n * A screen ready friendly label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @definition [Label docs](https://cerberus.digitalu.design/react/label)\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"test\">Test Label</Label>\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n data-disabled
|
|
1
|
+
{"version":3,"sources":["../../src/components/Label.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label } from '@cerberus/styled-system/recipes'\nimport { css, cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\n\nexport type LabelRecipeProps = RecipeVariantProps<typeof label>\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n htmlFor: string\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelRecipeProps\n\n/**\n * A screen ready friendly label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @definition [Label docs](https://cerberus.digitalu.design/react/label)\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"test\">Test Label</Label>\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n {...(disabled && { 'data-disabled': true })}\n className={cx(\n nativeProps.className,\n label({ size, usage }),\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n )}\n >\n {props.children}\n <Show when={required}>\n <span\n className={css({\n color: 'inherit',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </label>\n )\n}\n"],"mappings":";;;;;;;;AAGA,SAAS,aAAa;AACtB,SAAS,KAAK,UAAmC;AACjD,SAAS,cAAc;AAiCnB,SAcI,KAdJ;AANG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,QAAQ,MAAM,GAAG,YAAY,IAAI;AACzC,QAAM,EAAE,UAAU,SAAS,IAAI,gBAAgB;AAC/C,QAAM,QAAQ,SAAS,WAAW;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,iBAAiB,KAAK;AAAA,MACzC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM,EAAE,MAAM,MAAM,CAAC;AAAA,QACrB,OAAO;AAAA,UACL,SAAS;AAAA,UACT,GAAG;AAAA,QACL,CAAC;AAAA,MACH;AAAA,MAEC;AAAA,cAAM;AAAA,QACP,oBAAC,QAAK,MAAM,UACV;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,OAAO;AAAA,cACP,UAAU;AAAA,YACZ,CAAC;AAAA,YACF;AAAA;AAAA,QAED,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Show
|
|
3
|
+
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
|
+
import {
|
|
8
|
+
$cerberusIcons
|
|
9
|
+
} from "./chunk-5WVXIAG2.js";
|
|
10
|
+
|
|
11
|
+
// src/components/Checkbox.tsx
|
|
12
|
+
import {
|
|
13
|
+
checkbox
|
|
14
|
+
} from "@cerberus/styled-system/recipes";
|
|
15
|
+
import { vstack } from "@cerberus/styled-system/patterns";
|
|
16
|
+
import { cx } from "@cerberus/styled-system/css";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
function Checkbox(props) {
|
|
19
|
+
const { describedBy, size, checked, mixed, ...nativeProps } = props;
|
|
20
|
+
const { invalid, ...fieldStates } = useFieldContext();
|
|
21
|
+
const styles = checkbox({ size });
|
|
22
|
+
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = $cerberusIcons;
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: cx(
|
|
27
|
+
styles.root,
|
|
28
|
+
vstack({
|
|
29
|
+
gap: "0",
|
|
30
|
+
justify: "center"
|
|
31
|
+
})
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"input",
|
|
36
|
+
{
|
|
37
|
+
...nativeProps,
|
|
38
|
+
...fieldStates,
|
|
39
|
+
...describedBy && { "aria-describedby": describedBy },
|
|
40
|
+
...invalid && { "aria-invalid": true },
|
|
41
|
+
...mixed && { "aria-checked": "mixed" },
|
|
42
|
+
className: cx("peer", nativeProps.className, styles.input),
|
|
43
|
+
type: "checkbox"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx(Show, { when: checked && !mixed, children: /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
|
|
47
|
+
/* @__PURE__ */ jsx(Show, { when: mixed, children: /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(IndeterminateIcon, {}) }) })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
Checkbox
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=chunk-4FD33RTW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '../context/field'\nimport { $cerberusIcons } from '../config/defineIcons'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n describedBy?: string\n id: string\n mixed?: boolean\n }\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @definition [Checkbox docs](https://cerberus.digitalu.design/react/checkbox)\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { describedBy, size, checked, mixed, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const styles = checkbox({ size })\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } =\n $cerberusIcons\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAEA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,cAAc;AACvB,SAAS,UAAU;AAsCf,SASE,KATF;AARG,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG,YAAY,IAAI;AAC9D,QAAM,EAAE,SAAS,GAAG,YAAY,IAAI,gBAAgB;AACpD,QAAM,SAAS,SAAS,EAAE,KAAK,CAAC;AAChC,QAAM,EAAE,UAAU,WAAW,eAAe,kBAAkB,IAC5D;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,UACL,KAAK;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,MACH;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACH,GAAG;AAAA,YACH,GAAI,eAAe,EAAE,oBAAoB,YAAY;AAAA,YACrD,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,YACtC,GAAI,SAAS,EAAE,gBAAgB,QAAQ;AAAA,YACxC,WAAW,GAAG,QAAQ,YAAY,WAAW,OAAO,KAAK;AAAA,YACzD,MAAK;AAAA;AAAA,QACP;AAAA,QACA,oBAAC,QAAK,MAAM,WAAW,CAAC,OACtB,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,aAAU,GACb,GACF;AAAA,QACA,oBAAC,QAAK,MAAM,OACV,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,qBAAkB,GACrB,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WVXIAG2.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Input.tsx
|
|
12
12
|
import { input } from "@cerberus/styled-system/recipes";
|
|
@@ -39,4 +39,4 @@ function Input(props) {
|
|
|
39
39
|
export {
|
|
40
40
|
Input
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-53QBTZZF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultIcons
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GUECLKHY.js";
|
|
4
4
|
|
|
5
5
|
// src/config/defineIcons.ts
|
|
6
6
|
function _validateIconsProperties(icons) {
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
defineIcons,
|
|
25
25
|
$cerberusIcons
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-5WVXIAG2.js.map
|