@cerberus-design/react 0.9.2-next-5604236 → 0.9.2-next-74f2c67
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.cts +730 -117
- package/build/legacy/aria-helpers/tabs.aria.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Button.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/CircularProgress.cjs.map +1 -1
- package/build/legacy/components/Droppable.cjs.map +1 -1
- package/build/legacy/components/FeatureFlag.cjs.map +1 -1
- package/build/legacy/components/FieldMessage.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +70 -74
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/IconButton.cjs.map +1 -1
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Label.cjs.map +1 -1
- package/build/legacy/components/Modal.cjs.map +1 -1
- package/build/legacy/components/ModalDescription.cjs.map +1 -1
- package/build/legacy/components/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/ModalHeading.cjs.map +1 -1
- package/build/legacy/components/NavMenuLink.cjs.map +1 -1
- package/build/legacy/components/NavMenuList.cjs.map +1 -1
- package/build/legacy/components/NavMenuTrigger.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/NotificationDescription.cjs.map +1 -1
- package/build/legacy/components/NotificationHeading.cjs.map +1 -1
- package/build/legacy/components/Portal.cjs.map +1 -1
- package/build/legacy/components/ProgressBar.cjs.map +1 -1
- package/build/legacy/components/Radio.cjs.map +1 -1
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Show.cjs.map +1 -1
- package/build/legacy/components/Spinner.cjs.map +1 -1
- package/build/legacy/components/Tab.cjs.map +1 -1
- package/build/legacy/components/TabList.cjs.map +1 -1
- package/build/legacy/components/TabPanel.cjs.map +1 -1
- package/build/legacy/components/Table.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +70 -4
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Tbody.cjs.map +1 -1
- package/build/legacy/components/Td.cjs.map +1 -1
- package/build/legacy/components/Textarea.cjs.map +1 -1
- package/build/legacy/components/Th.cjs.map +1 -1
- package/build/legacy/components/Thead.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/feature-flags.cjs.map +1 -1
- package/build/legacy/context/field.cjs.map +1 -1
- package/build/legacy/context/navMenu.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/context/tabs.cjs.map +1 -1
- package/build/legacy/context/theme.cjs.map +1 -1
- package/build/legacy/hooks/useModal.cjs.map +1 -1
- package/build/legacy/hooks/useTheme.cjs.map +1 -1
- package/build/legacy/hooks/useToggle.cjs.map +1 -1
- package/build/legacy/index.cjs +5 -5
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +730 -117
- package/build/modern/aria-helpers/tabs.aria.js +2 -2
- package/build/modern/{chunk-LAOQSNMN.js → chunk-2RPWSVRX.js} +6 -6
- package/build/modern/chunk-2RPWSVRX.js.map +1 -0
- package/build/modern/{chunk-JB7IQ2BM.js → chunk-2UXE5PDG.js} +1 -1
- package/build/modern/chunk-2UXE5PDG.js.map +1 -0
- package/build/modern/{chunk-4CAT3FHV.js → chunk-2VX52EEJ.js} +1 -1
- package/build/modern/chunk-2VX52EEJ.js.map +1 -0
- package/build/modern/{chunk-A6CLBPFE.js → chunk-3O6UTN3J.js} +1 -1
- package/build/modern/chunk-3O6UTN3J.js.map +1 -0
- package/build/modern/{chunk-UN3OAW56.js → chunk-477G5ZEL.js} +2 -2
- package/build/modern/chunk-477G5ZEL.js.map +1 -0
- package/build/modern/{chunk-PMCYXRAH.js → chunk-5V5MBSM3.js} +3 -3
- package/build/modern/chunk-5V5MBSM3.js.map +1 -0
- package/build/modern/{chunk-3GXISGPS.js → chunk-7K6PZBHN.js} +2 -2
- package/build/modern/chunk-7K6PZBHN.js.map +1 -0
- package/build/modern/{chunk-IXOJLCNO.js → chunk-7SYJFI5E.js} +1 -1
- package/build/modern/chunk-7SYJFI5E.js.map +1 -0
- package/build/modern/{chunk-GABTVDSB.js → chunk-AUAPBPGW.js} +3 -3
- package/build/modern/chunk-AUAPBPGW.js.map +1 -0
- package/build/modern/{chunk-A5WYZVUR.js → chunk-B4CVET74.js} +1 -1
- package/build/modern/chunk-B4CVET74.js.map +1 -0
- package/build/modern/{chunk-2UFNQM55.js → chunk-BE4EOU2P.js} +1 -1
- package/build/modern/{chunk-2UFNQM55.js.map → chunk-BE4EOU2P.js.map} +1 -1
- package/build/modern/{chunk-VULPMZUW.js → chunk-BIDE4IJG.js} +3 -3
- package/build/modern/chunk-BIDE4IJG.js.map +1 -0
- package/build/modern/{chunk-4O4QFF4S.js → chunk-BUVVRQLZ.js} +1 -1
- package/build/modern/chunk-BUVVRQLZ.js.map +1 -0
- package/build/modern/{chunk-4M3EUP57.js → chunk-CJFW36DZ.js} +1 -1
- package/build/modern/chunk-CJFW36DZ.js.map +1 -0
- package/build/modern/{chunk-ZBEHDXFT.js → chunk-E6QFLLXH.js} +13 -13
- package/build/modern/chunk-E6QFLLXH.js.map +1 -0
- package/build/modern/{chunk-S3MTABYX.js → chunk-EB37HRCN.js} +2 -2
- package/build/modern/chunk-EB37HRCN.js.map +1 -0
- package/build/modern/{chunk-JXJ6VFZO.js → chunk-EJOXOICK.js} +1 -1
- package/build/modern/chunk-EJOXOICK.js.map +1 -0
- package/build/modern/{chunk-6F34A7NZ.js → chunk-EXGKZGML.js} +1 -1
- package/build/modern/chunk-EXGKZGML.js.map +1 -0
- package/build/modern/{chunk-ISPTI4GC.js → chunk-EZYCKM7R.js} +2 -2
- package/build/modern/chunk-EZYCKM7R.js.map +1 -0
- package/build/modern/{chunk-4YJOK7JJ.js → chunk-GMG3B34U.js} +2 -2
- package/build/modern/chunk-GMG3B34U.js.map +1 -0
- package/build/modern/{chunk-U72VPIZA.js → chunk-HHVQ6LCA.js} +3 -3
- package/build/modern/chunk-HHVQ6LCA.js.map +1 -0
- package/build/modern/{chunk-XREC5IJE.js → chunk-HPM2XRWT.js} +1 -1
- package/build/modern/chunk-HPM2XRWT.js.map +1 -0
- package/build/modern/{chunk-RQPDRHRP.js → chunk-I35HMGJQ.js} +3 -3
- package/build/modern/chunk-I35HMGJQ.js.map +1 -0
- package/build/modern/{chunk-CMKBUSGN.js → chunk-ILZKQP6R.js} +10 -10
- package/build/modern/chunk-ILZKQP6R.js.map +1 -0
- package/build/modern/{chunk-GKUDLVOV.js → chunk-ITOIXNJS.js} +2 -2
- package/build/modern/{chunk-BTEEBIVN.js → chunk-JCGWTIR4.js} +3 -3
- package/build/modern/chunk-JCGWTIR4.js.map +1 -0
- package/build/modern/{chunk-TCO46FK7.js → chunk-JIJM6JFJ.js} +2 -2
- package/build/modern/chunk-JIJM6JFJ.js.map +1 -0
- package/build/modern/{chunk-VGHVH2T3.js → chunk-JWIJHSI6.js} +5 -3
- package/build/modern/chunk-JWIJHSI6.js.map +1 -0
- package/build/modern/{chunk-6DIGPXAD.js → chunk-KBBASJIY.js} +2 -2
- package/build/modern/chunk-KBBASJIY.js.map +1 -0
- package/build/modern/{chunk-SONHHNYQ.js → chunk-LFWAJ5DX.js} +3 -3
- package/build/modern/chunk-LFWAJ5DX.js.map +1 -0
- package/build/modern/{chunk-PH64POOB.js → chunk-LJYCFFX7.js} +2 -2
- package/build/modern/chunk-LJYCFFX7.js.map +1 -0
- package/build/modern/{chunk-AEDGCR25.js → chunk-NUGDTZCL.js} +7 -7
- package/build/modern/chunk-NUGDTZCL.js.map +1 -0
- package/build/modern/{chunk-XPVDT4VF.js → chunk-O6JYYVO7.js} +3 -3
- package/build/modern/chunk-O6JYYVO7.js.map +1 -0
- package/build/modern/{chunk-KJUCHZHV.js → chunk-O75QAT4Z.js} +1 -1
- package/build/modern/chunk-O75QAT4Z.js.map +1 -0
- package/build/modern/{chunk-C5HLLGME.js → chunk-OW62FLJ6.js} +1 -1
- package/build/modern/chunk-OW62FLJ6.js.map +1 -0
- package/build/modern/{chunk-RPZAPUCF.js → chunk-OWKN5IV7.js} +3 -3
- package/build/modern/chunk-OWKN5IV7.js.map +1 -0
- package/build/modern/{chunk-PJ3744I6.js → chunk-PKQTTFWA.js} +1 -1
- package/build/modern/chunk-PKQTTFWA.js.map +1 -0
- package/build/modern/{chunk-N3FUF4TB.js → chunk-PKY46RRA.js} +1 -1
- package/build/modern/chunk-PKY46RRA.js.map +1 -0
- package/build/modern/{chunk-4M4LCQ43.js → chunk-Q7BRMIBR.js} +1 -1
- package/build/modern/{chunk-4M4LCQ43.js.map → chunk-Q7BRMIBR.js.map} +1 -1
- package/build/modern/{chunk-QEA6N6TN.js → chunk-REO5GUNC.js} +1 -1
- package/build/modern/chunk-REO5GUNC.js.map +1 -0
- package/build/modern/{chunk-KF24CS4S.js → chunk-RIFQSCHT.js} +1 -1
- package/build/modern/chunk-RIFQSCHT.js.map +1 -0
- package/build/modern/{chunk-RBZAEOKN.js → chunk-S7XGIQY6.js} +6 -3
- package/build/modern/chunk-S7XGIQY6.js.map +1 -0
- package/build/modern/{chunk-3C2DJSEE.js → chunk-SXIXDXG3.js} +1 -1
- package/build/modern/chunk-SXIXDXG3.js.map +1 -0
- package/build/modern/{chunk-7VJOPJVX.js → chunk-TKI2CKHH.js} +1 -1
- package/build/modern/chunk-TKI2CKHH.js.map +1 -0
- package/build/modern/{chunk-SLHX5K6I.js → chunk-UBJBMOG7.js} +4 -2
- package/build/modern/chunk-UBJBMOG7.js.map +1 -0
- package/build/modern/{chunk-ZAU4JVLL.js → chunk-UZDVOIW5.js} +1 -1
- package/build/modern/chunk-UZDVOIW5.js.map +1 -0
- package/build/modern/{chunk-QZ6NS6VN.js → chunk-VG46RHBJ.js} +1 -1
- package/build/modern/chunk-VG46RHBJ.js.map +1 -0
- package/build/modern/{chunk-QU7UV5DB.js → chunk-WLEX22KS.js} +1 -1
- package/build/modern/chunk-WLEX22KS.js.map +1 -0
- package/build/modern/{chunk-SSY3KX3F.js → chunk-WZOYPFUU.js} +3 -3
- package/build/modern/chunk-WZOYPFUU.js.map +1 -0
- package/build/modern/{chunk-HW76XVA3.js → chunk-XEW6TJJ4.js} +1 -1
- package/build/modern/chunk-XEW6TJJ4.js.map +1 -0
- package/build/modern/{chunk-G6O7KRQ6.js → chunk-ZFK33MVD.js} +1 -1
- package/build/modern/chunk-ZFK33MVD.js.map +1 -0
- package/build/modern/components/Avatar.js +2 -2
- package/build/modern/components/Button.js +1 -1
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/CircularProgress.js +1 -1
- package/build/modern/components/Droppable.js +1 -1
- package/build/modern/components/FeatureFlag.js +3 -3
- package/build/modern/components/FieldMessage.js +2 -2
- package/build/modern/components/FileStatus.js +7 -7
- package/build/modern/components/FileUploader.js +3 -3
- package/build/modern/components/IconButton.js +1 -1
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Label.js +3 -3
- package/build/modern/components/Modal.js +1 -1
- package/build/modern/components/ModalDescription.js +1 -1
- package/build/modern/components/ModalHeader.js +1 -1
- package/build/modern/components/ModalHeading.js +1 -1
- package/build/modern/components/NavMenuLink.js +2 -2
- package/build/modern/components/NavMenuList.js +3 -3
- package/build/modern/components/NavMenuTrigger.js +3 -3
- package/build/modern/components/Notification.js +1 -1
- package/build/modern/components/NotificationDescription.js +1 -1
- package/build/modern/components/NotificationHeading.js +1 -1
- package/build/modern/components/Portal.js +1 -1
- package/build/modern/components/ProgressBar.js +1 -1
- package/build/modern/components/Radio.js +2 -2
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Show.js +1 -1
- package/build/modern/components/Spinner.js +1 -1
- package/build/modern/components/Tab.js +3 -3
- package/build/modern/components/TabList.js +2 -2
- package/build/modern/components/TabPanel.js +3 -3
- package/build/modern/components/Table.js +1 -1
- package/build/modern/components/Tag.js +5 -2
- package/build/modern/components/Tbody.js +1 -1
- package/build/modern/components/Td.js +1 -1
- package/build/modern/components/Textarea.js +2 -2
- package/build/modern/components/Th.js +2 -2
- package/build/modern/components/Thead.js +1 -1
- package/build/modern/components/Toggle.js +2 -2
- package/build/modern/context/confirm-modal.js +10 -10
- package/build/modern/context/feature-flags.js +1 -1
- package/build/modern/context/field.js +1 -1
- package/build/modern/context/navMenu.js +1 -1
- package/build/modern/context/notification-center.js +7 -7
- package/build/modern/context/prompt-modal.js +13 -13
- package/build/modern/context/tabs.js +1 -1
- package/build/modern/context/theme.js +2 -2
- package/build/modern/hooks/useModal.js +1 -1
- package/build/modern/hooks/useTheme.js +1 -1
- package/build/modern/hooks/useToggle.js +1 -1
- package/build/modern/index.js +51 -51
- package/package.json +2 -2
- package/src/components/Avatar.tsx +28 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Checkbox.tsx +11 -1
- package/src/components/CircularProgress.tsx +1 -1
- package/src/components/Droppable.tsx +13 -0
- package/src/components/FeatureFlag.tsx +7 -0
- package/src/components/FieldMessage.tsx +13 -6
- package/src/components/FileStatus.tsx +38 -11
- package/src/components/FileUploader.tsx +10 -0
- package/src/components/IconButton.tsx +15 -5
- package/src/components/Input.tsx +21 -4
- package/src/components/Label.tsx +13 -8
- package/src/components/Modal.tsx +8 -3
- package/src/components/ModalDescription.tsx +1 -0
- package/src/components/ModalHeader.tsx +1 -0
- package/src/components/ModalHeading.tsx +1 -0
- package/src/components/NavMenuLink.tsx +22 -0
- package/src/components/NavMenuList.tsx +37 -5
- package/src/components/NavMenuTrigger.tsx +13 -0
- package/src/components/Notification.tsx +13 -6
- package/src/components/NotificationDescription.tsx +8 -6
- package/src/components/NotificationHeading.tsx +8 -6
- package/src/components/Portal.tsx +9 -2
- package/src/components/ProgressBar.tsx +14 -4
- package/src/components/Radio.tsx +29 -0
- package/src/components/Select.tsx +17 -8
- package/src/components/Show.tsx +16 -5
- package/src/components/Spinner.tsx +12 -5
- package/src/components/Tab.tsx +13 -5
- package/src/components/TabList.tsx +5 -1
- package/src/components/TabPanel.tsx +7 -2
- package/src/components/Table.tsx +6 -3
- package/src/components/Tag.tsx +28 -2
- package/src/components/Tbody.tsx +7 -1
- package/src/components/Td.tsx +2 -1
- package/src/components/Textarea.tsx +9 -4
- package/src/components/Th.tsx +13 -1
- package/src/components/Thead.tsx +2 -1
- package/src/components/Toggle.tsx +35 -0
- package/src/context/confirm-modal.tsx +17 -0
- package/src/context/feature-flags.tsx +4 -1
- package/src/context/field.tsx +26 -0
- package/src/context/navMenu.tsx +25 -0
- package/src/context/notification-center.tsx +17 -0
- package/src/context/prompt-modal.tsx +39 -1
- package/src/context/tabs.tsx +31 -4
- package/src/context/theme.tsx +29 -1
- package/src/hooks/useModal.ts +14 -0
- package/src/hooks/useTheme.ts +21 -0
- package/src/hooks/useToggle.ts +22 -0
- package/build/modern/chunk-3C2DJSEE.js.map +0 -1
- package/build/modern/chunk-3GXISGPS.js.map +0 -1
- package/build/modern/chunk-4CAT3FHV.js.map +0 -1
- package/build/modern/chunk-4M3EUP57.js.map +0 -1
- package/build/modern/chunk-4O4QFF4S.js.map +0 -1
- package/build/modern/chunk-4YJOK7JJ.js.map +0 -1
- package/build/modern/chunk-6DIGPXAD.js.map +0 -1
- package/build/modern/chunk-6F34A7NZ.js.map +0 -1
- package/build/modern/chunk-7VJOPJVX.js.map +0 -1
- package/build/modern/chunk-A5WYZVUR.js.map +0 -1
- package/build/modern/chunk-A6CLBPFE.js.map +0 -1
- package/build/modern/chunk-AEDGCR25.js.map +0 -1
- package/build/modern/chunk-BTEEBIVN.js.map +0 -1
- package/build/modern/chunk-C5HLLGME.js.map +0 -1
- package/build/modern/chunk-CMKBUSGN.js.map +0 -1
- package/build/modern/chunk-G6O7KRQ6.js.map +0 -1
- package/build/modern/chunk-GABTVDSB.js.map +0 -1
- package/build/modern/chunk-HW76XVA3.js.map +0 -1
- package/build/modern/chunk-ISPTI4GC.js.map +0 -1
- package/build/modern/chunk-IXOJLCNO.js.map +0 -1
- package/build/modern/chunk-JB7IQ2BM.js.map +0 -1
- package/build/modern/chunk-JXJ6VFZO.js.map +0 -1
- package/build/modern/chunk-KF24CS4S.js.map +0 -1
- package/build/modern/chunk-KJUCHZHV.js.map +0 -1
- package/build/modern/chunk-LAOQSNMN.js.map +0 -1
- package/build/modern/chunk-N3FUF4TB.js.map +0 -1
- package/build/modern/chunk-PH64POOB.js.map +0 -1
- package/build/modern/chunk-PJ3744I6.js.map +0 -1
- package/build/modern/chunk-PMCYXRAH.js.map +0 -1
- package/build/modern/chunk-QEA6N6TN.js.map +0 -1
- package/build/modern/chunk-QU7UV5DB.js.map +0 -1
- package/build/modern/chunk-QZ6NS6VN.js.map +0 -1
- package/build/modern/chunk-RBZAEOKN.js.map +0 -1
- package/build/modern/chunk-RPZAPUCF.js.map +0 -1
- package/build/modern/chunk-RQPDRHRP.js.map +0 -1
- package/build/modern/chunk-S3MTABYX.js.map +0 -1
- package/build/modern/chunk-SLHX5K6I.js.map +0 -1
- package/build/modern/chunk-SONHHNYQ.js.map +0 -1
- package/build/modern/chunk-SSY3KX3F.js.map +0 -1
- package/build/modern/chunk-TCO46FK7.js.map +0 -1
- package/build/modern/chunk-U72VPIZA.js.map +0 -1
- package/build/modern/chunk-UN3OAW56.js.map +0 -1
- package/build/modern/chunk-VGHVH2T3.js.map +0 -1
- package/build/modern/chunk-VULPMZUW.js.map +0 -1
- package/build/modern/chunk-XPVDT4VF.js.map +0 -1
- package/build/modern/chunk-XREC5IJE.js.map +0 -1
- package/build/modern/chunk-ZAU4JVLL.js.map +0 -1
- package/build/modern/chunk-ZBEHDXFT.js.map +0 -1
- /package/build/modern/{chunk-GKUDLVOV.js.map → chunk-ITOIXNJS.js.map} +0 -0
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PromptModal,
|
|
4
4
|
usePromptModal
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-E6QFLLXH.js";
|
|
6
|
+
import "../chunk-2VX52EEJ.js";
|
|
7
|
+
import "../chunk-WLEX22KS.js";
|
|
8
|
+
import "../chunk-2UXE5PDG.js";
|
|
9
|
+
import "../chunk-WZOYPFUU.js";
|
|
10
|
+
import "../chunk-I35HMGJQ.js";
|
|
11
|
+
import "../chunk-BE4EOU2P.js";
|
|
12
|
+
import "../chunk-Q7BRMIBR.js";
|
|
13
|
+
import "../chunk-477G5ZEL.js";
|
|
14
|
+
import "../chunk-EXGKZGML.js";
|
|
15
|
+
import "../chunk-UZDVOIW5.js";
|
|
16
|
+
import "../chunk-BUVVRQLZ.js";
|
|
17
17
|
import "../chunk-JIZQFTW6.js";
|
|
18
18
|
import "../chunk-NBG2OSYI.js";
|
|
19
19
|
import "../chunk-BDCFYW34.js";
|
|
20
20
|
import "../chunk-CP7OUC2Q.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-OW62FLJ6.js";
|
|
22
22
|
export {
|
|
23
23
|
PromptModal,
|
|
24
24
|
usePromptModal
|
package/build/modern/index.js
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ThemeProvider,
|
|
3
3
|
useThemeContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EB37HRCN.js";
|
|
5
5
|
import {
|
|
6
6
|
Toggle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GMG3B34U.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfirmModal,
|
|
10
10
|
useConfirmModal
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ILZKQP6R.js";
|
|
12
12
|
import {
|
|
13
13
|
NotificationCenter,
|
|
14
14
|
useNotificationCenter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NUGDTZCL.js";
|
|
16
16
|
import {
|
|
17
17
|
PromptModal,
|
|
18
18
|
usePromptModal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E6QFLLXH.js";
|
|
20
20
|
import {
|
|
21
21
|
TabPanel
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HHVQ6LCA.js";
|
|
23
23
|
import {
|
|
24
24
|
Table,
|
|
25
25
|
Tr
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-B4CVET74.js";
|
|
27
27
|
import {
|
|
28
28
|
Tag
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-S7XGIQY6.js";
|
|
30
30
|
import {
|
|
31
31
|
Tbody
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PKQTTFWA.js";
|
|
33
33
|
import {
|
|
34
34
|
Td
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HPM2XRWT.js";
|
|
36
36
|
import {
|
|
37
37
|
Textarea
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JIJM6JFJ.js";
|
|
39
39
|
import {
|
|
40
40
|
Th
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7K6PZBHN.js";
|
|
42
42
|
import {
|
|
43
43
|
Thead
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-PKY46RRA.js";
|
|
45
45
|
import {
|
|
46
46
|
Portal
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2VX52EEJ.js";
|
|
48
48
|
import {
|
|
49
49
|
Radio
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-LJYCFFX7.js";
|
|
51
51
|
import {
|
|
52
52
|
Option,
|
|
53
53
|
Select
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-O6JYYVO7.js";
|
|
55
55
|
import {
|
|
56
56
|
Spinner
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-7SYJFI5E.js";
|
|
58
58
|
import {
|
|
59
59
|
Tab
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LFWAJ5DX.js";
|
|
61
61
|
import {
|
|
62
62
|
TabList
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-EZYCKM7R.js";
|
|
64
64
|
import {
|
|
65
65
|
ModalHeader
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-WLEX22KS.js";
|
|
67
67
|
import {
|
|
68
68
|
ModalHeading
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-2UXE5PDG.js";
|
|
70
70
|
import {
|
|
71
71
|
NavMenuLink
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-KBBASJIY.js";
|
|
73
73
|
import {
|
|
74
74
|
NavMenuList,
|
|
75
75
|
getPosition
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-5V5MBSM3.js";
|
|
77
77
|
import {
|
|
78
78
|
NavMenuTrigger
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-OWKN5IV7.js";
|
|
80
80
|
import {
|
|
81
81
|
NavMenu,
|
|
82
82
|
useNavMenuContext
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-O75QAT4Z.js";
|
|
84
84
|
import {
|
|
85
85
|
Notification
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-VG46RHBJ.js";
|
|
87
87
|
import {
|
|
88
88
|
NotificationDescription
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-XEW6TJJ4.js";
|
|
90
90
|
import {
|
|
91
91
|
NotificationHeading
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-SXIXDXG3.js";
|
|
93
93
|
import {
|
|
94
94
|
FileStatus,
|
|
95
95
|
processStatus
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-2RPWSVRX.js";
|
|
97
97
|
import {
|
|
98
98
|
ProgressBar
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-ZFK33MVD.js";
|
|
100
100
|
import {
|
|
101
101
|
FieldMessage
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-JWIJHSI6.js";
|
|
103
103
|
import {
|
|
104
104
|
FileUploader
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-JCGWTIR4.js";
|
|
106
106
|
import {
|
|
107
107
|
IconButton
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-UBJBMOG7.js";
|
|
109
109
|
import {
|
|
110
110
|
Input
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-WZOYPFUU.js";
|
|
112
112
|
import {
|
|
113
113
|
Label
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-I35HMGJQ.js";
|
|
115
115
|
import {
|
|
116
116
|
Modal
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-BE4EOU2P.js";
|
|
118
118
|
import {
|
|
119
119
|
ModalDescription
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
121
121
|
import {
|
|
122
122
|
MODE_KEY,
|
|
123
123
|
THEME_KEY,
|
|
124
124
|
useTheme
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-EJOXOICK.js";
|
|
126
126
|
import {
|
|
127
127
|
useToggle
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-REO5GUNC.js";
|
|
129
129
|
import {
|
|
130
130
|
Avatar
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-477G5ZEL.js";
|
|
132
132
|
import {
|
|
133
133
|
Button
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-EXGKZGML.js";
|
|
135
135
|
import {
|
|
136
136
|
Checkbox
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-AUAPBPGW.js";
|
|
138
138
|
import {
|
|
139
139
|
Field,
|
|
140
140
|
useFieldContext
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-UZDVOIW5.js";
|
|
142
142
|
import {
|
|
143
143
|
CircularProgress
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-3O6UTN3J.js";
|
|
145
145
|
import {
|
|
146
146
|
Droppable
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-TKI2CKHH.js";
|
|
148
148
|
import {
|
|
149
149
|
FeatureFlag
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-BIDE4IJG.js";
|
|
151
151
|
import {
|
|
152
152
|
FeatureFlags,
|
|
153
153
|
useFeatureFlags
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-CJFW36DZ.js";
|
|
155
155
|
import {
|
|
156
156
|
Show
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-BUVVRQLZ.js";
|
|
158
158
|
import "./chunk-55J6XMHW.js";
|
|
159
159
|
import {
|
|
160
160
|
createNavTriggerProps
|
|
161
161
|
} from "./chunk-JF76VIL3.js";
|
|
162
162
|
import {
|
|
163
163
|
useTabsKeyboardNavigation
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-ITOIXNJS.js";
|
|
165
165
|
import {
|
|
166
166
|
Tabs,
|
|
167
167
|
TabsContext,
|
|
168
168
|
useTabsContext
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-RIFQSCHT.js";
|
|
170
170
|
import {
|
|
171
171
|
trapFocus
|
|
172
172
|
} from "./chunk-JIZQFTW6.js";
|
|
@@ -178,7 +178,7 @@ import "./chunk-BDCFYW34.js";
|
|
|
178
178
|
import "./chunk-CP7OUC2Q.js";
|
|
179
179
|
import {
|
|
180
180
|
useModal
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-OW62FLJ6.js";
|
|
182
182
|
|
|
183
183
|
// src/index.ts
|
|
184
184
|
export * from "@dnd-kit/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "0.9.2-next-
|
|
3
|
+
"version": "0.9.2-next-74f2c67",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"browserslist": "> 0.25%, not dead",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-dom": "^18",
|
|
27
27
|
"tsup": "^8.1.0",
|
|
28
28
|
"@cerberus-design/configs": "0.0.0",
|
|
29
|
-
"@cerberus-design/styled-system": "0.9.2-next-
|
|
29
|
+
"@cerberus-design/styled-system": "0.9.2-next-74f2c67"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -14,19 +14,46 @@ import { Show } from './Show'
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
export type SharedAvatarProps = {
|
|
17
|
+
/**
|
|
18
|
+
* An optional icon to show when no src or ariaLabel is provided.
|
|
19
|
+
*/
|
|
17
20
|
icon?: ReactNode
|
|
21
|
+
/**
|
|
22
|
+
* The size of the avatar.
|
|
23
|
+
*/
|
|
18
24
|
width?: number
|
|
25
|
+
/**
|
|
26
|
+
* The size of the avatar.
|
|
27
|
+
*/
|
|
19
28
|
height?: number
|
|
20
29
|
}
|
|
21
30
|
export type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &
|
|
22
31
|
SharedAvatarProps & {
|
|
32
|
+
/**
|
|
33
|
+
* The aria-label for the avatar needed for accessibility.
|
|
34
|
+
*/
|
|
23
35
|
ariaLabel: string
|
|
36
|
+
/**
|
|
37
|
+
* An optional element to replace the image. Recommended for Next.js Image component.
|
|
38
|
+
*/
|
|
24
39
|
as?: never
|
|
40
|
+
/**
|
|
41
|
+
* The source of the image.
|
|
42
|
+
*/
|
|
25
43
|
src: string
|
|
26
44
|
}
|
|
27
45
|
export type AvatarAsProps = SharedAvatarProps & {
|
|
46
|
+
/**
|
|
47
|
+
* An optional element to replace the image. Recommended for Next.js Image component.
|
|
48
|
+
*/
|
|
28
49
|
as: ReactNode
|
|
50
|
+
/**
|
|
51
|
+
* The aria-label for the avatar needed for accessibility.
|
|
52
|
+
*/
|
|
29
53
|
ariaLabel?: never
|
|
54
|
+
/**
|
|
55
|
+
* The source of the image.
|
|
56
|
+
*/
|
|
30
57
|
src?: never
|
|
31
58
|
}
|
|
32
59
|
|
|
@@ -36,7 +63,7 @@ export type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &
|
|
|
36
63
|
|
|
37
64
|
/**
|
|
38
65
|
* The Avatar component is used to represent a user or entity. It will show an image if src provided, otherwise it will show the ariaLabel of the ariaLabel. If the ariaLabel is empty, it will show a `defineIcons().avatar` icon.
|
|
39
|
-
* @
|
|
66
|
+
* @see https://cerberus.digitalu.design/react/avatar
|
|
40
67
|
* @example
|
|
41
68
|
* ```tsx
|
|
42
69
|
* <Avatar
|
|
@@ -15,7 +15,7 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* A component that allows the user to perform actions
|
|
18
|
-
* @
|
|
18
|
+
* @see https://cerberus.digitalu.design/react/button
|
|
19
19
|
*/
|
|
20
20
|
export function Button(props: ButtonProps): JSX.Element {
|
|
21
21
|
const { palette, usage, shape, ...nativeProps } = props
|
|
@@ -18,8 +18,18 @@ import { $cerberusIcons } from '../config/defineIcons'
|
|
|
18
18
|
|
|
19
19
|
export type CheckboxProps = CheckboxVariantProps &
|
|
20
20
|
Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {
|
|
21
|
+
/**
|
|
22
|
+
* The id of the FieldMessage element describing the Checkbox.
|
|
23
|
+
*/
|
|
21
24
|
describedBy?: string
|
|
25
|
+
/**
|
|
26
|
+
* The unique identifier for the checkbox. Required for accessibility.
|
|
27
|
+
*/
|
|
22
28
|
id: string
|
|
29
|
+
/**
|
|
30
|
+
* Used to display a mixed checked state.
|
|
31
|
+
* @description [ARIA Mixed State](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/)
|
|
32
|
+
*/
|
|
23
33
|
mixed?: boolean
|
|
24
34
|
}
|
|
25
35
|
|
|
@@ -27,7 +37,7 @@ export type CheckboxProps = CheckboxVariantProps &
|
|
|
27
37
|
* Checkbox component
|
|
28
38
|
* @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)
|
|
29
39
|
* @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)
|
|
30
|
-
* @
|
|
40
|
+
* @see https://cerberus.digitalu.design/react/checkbox
|
|
31
41
|
* @example
|
|
32
42
|
* ```tsx
|
|
33
43
|
* <Field>
|
|
@@ -30,7 +30,7 @@ export interface CircularProgressProps extends SVGProps<SVGSVGElement> {
|
|
|
30
30
|
* @param props.now - The current value of the CircularProgress
|
|
31
31
|
* @param props.title - The title of the CircularProgress for a11y
|
|
32
32
|
* @param props.label - What is shown below the now value (default: 'Done')
|
|
33
|
-
* @
|
|
33
|
+
* @see https://cerberus.digitalu.design/react/progress-indicators
|
|
34
34
|
* @example
|
|
35
35
|
* ```tsx
|
|
36
36
|
* <CircularProgress now={24} title="Course completion" label="done" />
|
|
@@ -6,9 +6,22 @@ import { useId, type HtmlHTMLAttributes, type PropsWithChildren } from 'react'
|
|
|
6
6
|
export interface DroppableProps
|
|
7
7
|
extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'id'>,
|
|
8
8
|
UseDroppableArguments {
|
|
9
|
+
/**
|
|
10
|
+
* If the item has been dropped.
|
|
11
|
+
*/
|
|
9
12
|
dropped?: boolean
|
|
10
13
|
}
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* A Cerberus component is used to define a drop target for draggable elements.
|
|
17
|
+
* @see https://dndkit.com/
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Droppable id="dropzone">
|
|
21
|
+
* <Draggable id="draggable">Drag me</Draggable>
|
|
22
|
+
* </Droppable>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
12
25
|
export function Droppable(props: PropsWithChildren<DroppableProps>) {
|
|
13
26
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } =
|
|
14
27
|
props
|
|
@@ -5,9 +5,16 @@ import { useFeatureFlags } from '../context/feature-flags'
|
|
|
5
5
|
import { Show } from './Show'
|
|
6
6
|
|
|
7
7
|
export interface FeatureFlagProps {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the feature flag to check.
|
|
10
|
+
*/
|
|
8
11
|
flag: string
|
|
9
12
|
}
|
|
10
13
|
|
|
14
|
+
/**
|
|
15
|
+
* A component that allows you to show or hide content based on a feature flag.
|
|
16
|
+
* @see https://cerberus.digitalu.design/react/feature-flags
|
|
17
|
+
*/
|
|
11
18
|
export function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>) {
|
|
12
19
|
const showContent = useFeatureFlags(props.flag)
|
|
13
20
|
return <Show when={showContent}>{props.children}</Show>
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import type { HTMLAttributes } from 'react'
|
|
4
|
-
import { cx
|
|
5
|
-
import {
|
|
4
|
+
import { cx } from '@cerberus/styled-system/css'
|
|
5
|
+
import {
|
|
6
|
+
fieldMessage,
|
|
7
|
+
type FieldMessageVariantProps,
|
|
8
|
+
} from '@cerberus/styled-system/recipes'
|
|
6
9
|
import { useFieldContext } from '../context/field'
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* This module contains the FieldMessage component.
|
|
10
13
|
* @module
|
|
11
14
|
*/
|
|
12
|
-
|
|
13
|
-
export type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>
|
|
14
15
|
export interface FieldMessageBaseProps
|
|
15
16
|
extends HTMLAttributes<HTMLParagraphElement> {
|
|
17
|
+
/**
|
|
18
|
+
* The id of the FieldMessage element describing the field. Required for accessibility. It is considered best practice to use the `help` or `error` prefix to help screen readers identify the type of message.
|
|
19
|
+
*
|
|
20
|
+
* @example For help messages: `help:field_id`
|
|
21
|
+
* @example For error messages: `error:field_id`
|
|
22
|
+
*/
|
|
16
23
|
id: string
|
|
17
24
|
}
|
|
18
|
-
export type FieldMessageProps = FieldMessageBaseProps &
|
|
25
|
+
export type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProps
|
|
19
26
|
|
|
20
27
|
/**
|
|
21
28
|
* A component that provides feedback about the field.
|
|
22
|
-
* @
|
|
29
|
+
* @see https://cerberus.digitalu.design/react/field-message
|
|
23
30
|
* @example
|
|
24
31
|
* ```tsx
|
|
25
32
|
* <Field>
|
|
@@ -6,8 +6,6 @@ import {
|
|
|
6
6
|
type HTMLAttributes,
|
|
7
7
|
type MouseEvent,
|
|
8
8
|
} from 'react'
|
|
9
|
-
import { ProgressBar } from './ProgressBar'
|
|
10
|
-
import { IconButton } from './IconButton'
|
|
11
9
|
import {
|
|
12
10
|
fileStatus,
|
|
13
11
|
type FileStatusVariantProps,
|
|
@@ -15,8 +13,10 @@ import {
|
|
|
15
13
|
import { css, cx } from '@cerberus/styled-system/css'
|
|
16
14
|
import { hstack, vstack } from '@cerberus/styled-system/patterns'
|
|
17
15
|
import { $cerberusIcons } from '../config/defineIcons'
|
|
18
|
-
import { FieldMessage } from './FieldMessage'
|
|
19
16
|
import { Field } from '../context/field'
|
|
17
|
+
import { FieldMessage } from './FieldMessage'
|
|
18
|
+
import { ProgressBar, type ProgressBarProps } from './ProgressBar'
|
|
19
|
+
import { IconButton } from './IconButton'
|
|
20
20
|
import { Avatar } from './Avatar'
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -24,13 +24,45 @@ import { Avatar } from './Avatar'
|
|
|
24
24
|
* @module
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* The available values of the fileStatus helper Object.
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* import { fileStatus } from '@cerberus/react'
|
|
32
|
+
* processStatus.TODO // 'todo'
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
27
35
|
export type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The actions that can be performed on a file.
|
|
39
|
+
*/
|
|
28
40
|
export type FileStatusActions = 'cancel' | 'retry' | 'delete'
|
|
29
41
|
export interface FileBaseStatusProps
|
|
30
42
|
extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
43
|
+
/**
|
|
44
|
+
* The name of the file.
|
|
45
|
+
*/
|
|
31
46
|
file: string
|
|
32
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The percentage of the file that has been processed.
|
|
49
|
+
*/
|
|
50
|
+
now: ProgressBarProps['now']
|
|
51
|
+
/**
|
|
52
|
+
* The status of the file.
|
|
53
|
+
*/
|
|
33
54
|
status: processStatus
|
|
55
|
+
/**
|
|
56
|
+
* The action to perform on the file when a user clicks the
|
|
57
|
+
* button located at the end of the status card.
|
|
58
|
+
* @param status - The status of the file.
|
|
59
|
+
* @param e - The event object.
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
63
|
+
* ```
|
|
64
|
+
* @default () => {}
|
|
65
|
+
*/
|
|
34
66
|
onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
|
|
35
67
|
}
|
|
36
68
|
export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps
|
|
@@ -51,13 +83,8 @@ export const enum processStatus {
|
|
|
51
83
|
}
|
|
52
84
|
|
|
53
85
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @
|
|
56
|
-
* file: string,
|
|
57
|
-
* now: number,
|
|
58
|
-
* status: keyof typeof fileStatus,
|
|
59
|
-
* action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
|
|
60
|
-
* }.
|
|
86
|
+
* A component that displays the status of a file during file processing.
|
|
87
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
61
88
|
* @example
|
|
62
89
|
* ```tsx
|
|
63
90
|
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
@@ -10,10 +10,20 @@ import { Avatar } from './Avatar'
|
|
|
10
10
|
|
|
11
11
|
export interface FileUploaderProps
|
|
12
12
|
extends InputHTMLAttributes<HTMLInputElement> {
|
|
13
|
+
/**
|
|
14
|
+
* The optional heading to display in the FileUploader component.
|
|
15
|
+
*/
|
|
13
16
|
heading?: string
|
|
17
|
+
/**
|
|
18
|
+
* The name of the file input element.
|
|
19
|
+
*/
|
|
14
20
|
name: string
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
/**
|
|
24
|
+
* A component that allows the user to upload files.
|
|
25
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
26
|
+
*/
|
|
17
27
|
export function FileUploader(props: FileUploaderProps) {
|
|
18
28
|
const styles = fileUploader()
|
|
19
29
|
const Icon = $cerberusIcons.fileUploader
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes } from 'react'
|
|
2
|
-
import { cx
|
|
3
|
-
import {
|
|
2
|
+
import { cx } from '@cerberus/styled-system/css'
|
|
3
|
+
import {
|
|
4
|
+
iconButton,
|
|
5
|
+
type IconButtonVariantProps,
|
|
6
|
+
} from '@cerberus/styled-system/recipes'
|
|
4
7
|
import type { Positions } from '../types'
|
|
5
8
|
|
|
6
9
|
/**
|
|
@@ -10,15 +13,22 @@ import type { Positions } from '../types'
|
|
|
10
13
|
|
|
11
14
|
export interface IconButtonRawProps
|
|
12
15
|
extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
+
/**
|
|
17
|
+
* The aria-label attribute for the icon button.
|
|
18
|
+
*/
|
|
13
19
|
ariaLabel: string
|
|
20
|
+
/**
|
|
21
|
+
* The position of the tooltip relative to the icon button.
|
|
22
|
+
* @example 'top' | 'right' | 'bottom' | 'left'
|
|
23
|
+
* @default 'top'
|
|
24
|
+
*/
|
|
14
25
|
tooltipPosition?: Positions
|
|
15
26
|
}
|
|
16
|
-
export type
|
|
17
|
-
export type IconButtonProps = IconButtonRawProps & IconButtonRecipeProps
|
|
27
|
+
export type IconButtonProps = IconButtonRawProps & IconButtonVariantProps
|
|
18
28
|
|
|
19
29
|
/**
|
|
20
30
|
* A component that allows the user to perform actions using an icon
|
|
21
|
-
* @
|
|
31
|
+
* @see https://cerberus.digitalu.design/react/icon-button
|
|
22
32
|
*/
|
|
23
33
|
export function IconButton(props: IconButtonProps): JSX.Element {
|
|
24
34
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props
|