@cerberus-design/react 0.9.2 → 0.10.0
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 +811 -126
- 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 +180 -0
- package/build/legacy/components/CircularProgress.cjs.map +1 -0
- 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 +75 -79
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +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 +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 +104 -0
- package/build/legacy/components/Spinner.cjs.map +1 -0
- 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 +2 -2
- 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 +50 -10
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +2 -2
- 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 +37 -23
- package/build/legacy/context/theme.cjs.map +1 -1
- package/build/legacy/hooks/useModal.cjs.map +1 -1
- package/build/legacy/hooks/useTheme.cjs +41 -32
- package/build/legacy/hooks/useTheme.cjs.map +1 -1
- package/build/legacy/hooks/useToggle.cjs.map +1 -1
- package/build/legacy/index.cjs +605 -316
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +811 -126
- package/build/modern/aria-helpers/tabs.aria.js +2 -2
- package/build/modern/{chunk-DGJPW76I.js → chunk-2RPWSVRX.js} +13 -13
- 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-3O6UTN3J.js +155 -0
- 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-7SYJFI5E.js +80 -0
- package/build/modern/chunk-7SYJFI5E.js.map +1 -0
- package/build/modern/{chunk-ZCIJRM2X.js → chunk-AUAPBPGW.js} +5 -5
- 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-T7TOXGZT.js → chunk-E6QFLLXH.js} +21 -21
- package/build/modern/chunk-E6QFLLXH.js.map +1 -0
- package/build/modern/chunk-EB37HRCN.js +31 -0
- package/build/modern/chunk-EB37HRCN.js.map +1 -0
- package/build/modern/chunk-EJOXOICK.js +75 -0
- 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-2FK7NR7Y.js → chunk-I35HMGJQ.js} +5 -5
- package/build/modern/chunk-I35HMGJQ.js.map +1 -0
- package/build/modern/{chunk-WWJRKSM5.js → chunk-ILZKQP6R.js} +16 -16
- package/build/modern/chunk-ILZKQP6R.js.map +1 -0
- package/build/modern/{chunk-GKUDLVOV.js → chunk-ITOIXNJS.js} +2 -2
- package/build/modern/{chunk-XOVQGPIE.js → chunk-JCGWTIR4.js} +4 -4
- 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-O6WHVUEW.js → chunk-NUGDTZCL.js} +59 -19
- package/build/modern/chunk-NUGDTZCL.js.map +1 -0
- package/build/modern/{chunk-VRPAW76S.js → chunk-O6JYYVO7.js} +5 -5
- 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-Z6IWNVPN.js → chunk-S7XGIQY6.js} +10 -4
- 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-FMFKM2AB.js → chunk-WZOYPFUU.js} +5 -5
- 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-TYTEREKZ.js → chunk-ZFK33MVD.js} +2 -2
- 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 +8 -0
- package/build/modern/components/CircularProgress.js.map +1 -0
- 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 +7 -0
- package/build/modern/components/Spinner.js.map +1 -0
- 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 -5
- package/build/modern/hooks/useModal.js +1 -1
- package/build/modern/hooks/useTheme.js +5 -1
- package/build/modern/hooks/useToggle.js +1 -1
- package/build/modern/index.js +78 -68
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -4
- 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 +170 -0
- 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 +43 -16
- package/src/components/FileUploader.tsx +11 -1
- 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 +15 -5
- 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 +82 -0
- 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 +34 -7
- 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 +19 -2
- 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 +84 -12
- package/src/context/prompt-modal.tsx +41 -3
- package/src/context/tabs.tsx +31 -4
- package/src/context/theme.tsx +47 -10
- package/src/hooks/useModal.ts +14 -0
- package/src/hooks/useTheme.ts +66 -17
- package/src/hooks/useToggle.ts +22 -0
- package/src/index.ts +2 -0
- package/build/modern/chunk-2FK7NR7Y.js.map +0 -1
- 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-C5HLLGME.js.map +0 -1
- package/build/modern/chunk-DGJPW76I.js.map +0 -1
- package/build/modern/chunk-FMFKM2AB.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-JB7IQ2BM.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-N3FUF4TB.js.map +0 -1
- package/build/modern/chunk-O6WHVUEW.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-RPZAPUCF.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-SXXWC6UD.js +0 -83
- package/build/modern/chunk-SXXWC6UD.js.map +0 -1
- package/build/modern/chunk-T7TOXGZT.js.map +0 -1
- package/build/modern/chunk-TCO46FK7.js.map +0 -1
- package/build/modern/chunk-TYTEREKZ.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-VRPAW76S.js.map +0 -1
- package/build/modern/chunk-VULPMZUW.js.map +0 -1
- package/build/modern/chunk-WWJRKSM5.js.map +0 -1
- package/build/modern/chunk-XOVQGPIE.js.map +0 -1
- package/build/modern/chunk-XREC5IJE.js.map +0 -1
- package/build/modern/chunk-Z6IWNVPN.js.map +0 -1
- package/build/modern/chunk-ZAU4JVLL.js.map +0 -1
- package/build/modern/chunk-ZCIJRM2X.js.map +0 -1
- /package/build/modern/{chunk-GKUDLVOV.js.map → chunk-ITOIXNJS.js.map} +0 -0
package/build/modern/index.js
CHANGED
|
@@ -1,164 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider,
|
|
3
|
+
useThemeContext
|
|
4
|
+
} from "./chunk-EB37HRCN.js";
|
|
5
|
+
import {
|
|
6
|
+
Toggle
|
|
7
|
+
} from "./chunk-GMG3B34U.js";
|
|
8
|
+
import {
|
|
9
|
+
ConfirmModal,
|
|
10
|
+
useConfirmModal
|
|
11
|
+
} from "./chunk-ILZKQP6R.js";
|
|
1
12
|
import {
|
|
2
13
|
NotificationCenter,
|
|
3
14
|
useNotificationCenter
|
|
4
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NUGDTZCL.js";
|
|
5
16
|
import {
|
|
6
17
|
PromptModal,
|
|
7
18
|
usePromptModal
|
|
8
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E6QFLLXH.js";
|
|
20
|
+
import {
|
|
21
|
+
TabPanel
|
|
22
|
+
} from "./chunk-HHVQ6LCA.js";
|
|
23
|
+
import {
|
|
24
|
+
Table,
|
|
25
|
+
Tr
|
|
26
|
+
} from "./chunk-B4CVET74.js";
|
|
9
27
|
import {
|
|
10
28
|
Tag
|
|
11
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-S7XGIQY6.js";
|
|
12
30
|
import {
|
|
13
31
|
Tbody
|
|
14
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PKQTTFWA.js";
|
|
15
33
|
import {
|
|
16
34
|
Td
|
|
17
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HPM2XRWT.js";
|
|
18
36
|
import {
|
|
19
37
|
Textarea
|
|
20
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JIJM6JFJ.js";
|
|
21
39
|
import {
|
|
22
40
|
Th
|
|
23
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7K6PZBHN.js";
|
|
24
42
|
import {
|
|
25
43
|
Thead
|
|
26
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-PKY46RRA.js";
|
|
27
45
|
import {
|
|
28
|
-
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
ConfirmModal,
|
|
32
|
-
useConfirmModal
|
|
33
|
-
} from "./chunk-WWJRKSM5.js";
|
|
46
|
+
Portal
|
|
47
|
+
} from "./chunk-2VX52EEJ.js";
|
|
34
48
|
import {
|
|
35
49
|
Radio
|
|
36
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-LJYCFFX7.js";
|
|
37
51
|
import {
|
|
38
52
|
Option,
|
|
39
53
|
Select
|
|
40
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-O6JYYVO7.js";
|
|
55
|
+
import {
|
|
56
|
+
Spinner
|
|
57
|
+
} from "./chunk-7SYJFI5E.js";
|
|
41
58
|
import {
|
|
42
59
|
Tab
|
|
43
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LFWAJ5DX.js";
|
|
44
61
|
import {
|
|
45
62
|
TabList
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import {
|
|
48
|
-
TabPanel
|
|
49
|
-
} from "./chunk-U72VPIZA.js";
|
|
63
|
+
} from "./chunk-EZYCKM7R.js";
|
|
50
64
|
import {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} from "./chunk-A5WYZVUR.js";
|
|
65
|
+
ModalHeader
|
|
66
|
+
} from "./chunk-WLEX22KS.js";
|
|
54
67
|
import {
|
|
55
68
|
ModalHeading
|
|
56
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-2UXE5PDG.js";
|
|
57
70
|
import {
|
|
58
71
|
NavMenuLink
|
|
59
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-KBBASJIY.js";
|
|
60
73
|
import {
|
|
61
74
|
NavMenuList,
|
|
62
75
|
getPosition
|
|
63
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-5V5MBSM3.js";
|
|
64
77
|
import {
|
|
65
78
|
NavMenuTrigger
|
|
66
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-OWKN5IV7.js";
|
|
67
80
|
import {
|
|
68
81
|
NavMenu,
|
|
69
82
|
useNavMenuContext
|
|
70
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-O75QAT4Z.js";
|
|
71
84
|
import {
|
|
72
85
|
Notification
|
|
73
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-VG46RHBJ.js";
|
|
74
87
|
import {
|
|
75
88
|
NotificationDescription
|
|
76
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-XEW6TJJ4.js";
|
|
77
90
|
import {
|
|
78
91
|
NotificationHeading
|
|
79
|
-
} from "./chunk-
|
|
80
|
-
import {
|
|
81
|
-
Portal
|
|
82
|
-
} from "./chunk-4CAT3FHV.js";
|
|
92
|
+
} from "./chunk-SXIXDXG3.js";
|
|
83
93
|
import {
|
|
84
94
|
FileStatus,
|
|
85
95
|
processStatus
|
|
86
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-2RPWSVRX.js";
|
|
87
97
|
import {
|
|
88
98
|
ProgressBar
|
|
89
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-ZFK33MVD.js";
|
|
100
|
+
import {
|
|
101
|
+
FieldMessage
|
|
102
|
+
} from "./chunk-JWIJHSI6.js";
|
|
90
103
|
import {
|
|
91
104
|
FileUploader
|
|
92
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-JCGWTIR4.js";
|
|
93
106
|
import {
|
|
94
107
|
IconButton
|
|
95
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-UBJBMOG7.js";
|
|
96
109
|
import {
|
|
97
110
|
Input
|
|
98
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-WZOYPFUU.js";
|
|
99
112
|
import {
|
|
100
113
|
Label
|
|
101
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-I35HMGJQ.js";
|
|
102
115
|
import {
|
|
103
116
|
Modal
|
|
104
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-BE4EOU2P.js";
|
|
105
118
|
import {
|
|
106
119
|
ModalDescription
|
|
107
|
-
} from "./chunk-
|
|
108
|
-
import {
|
|
109
|
-
ModalHeader
|
|
110
|
-
} from "./chunk-QU7UV5DB.js";
|
|
120
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
111
121
|
import {
|
|
112
122
|
MODE_KEY,
|
|
113
123
|
THEME_KEY,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
useThemeContext
|
|
117
|
-
} from "./chunk-SXXWC6UD.js";
|
|
124
|
+
useTheme
|
|
125
|
+
} from "./chunk-EJOXOICK.js";
|
|
118
126
|
import {
|
|
119
127
|
useToggle
|
|
120
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-REO5GUNC.js";
|
|
121
129
|
import {
|
|
122
130
|
Avatar
|
|
123
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-477G5ZEL.js";
|
|
124
132
|
import {
|
|
125
133
|
Button
|
|
126
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-EXGKZGML.js";
|
|
127
135
|
import {
|
|
128
136
|
Checkbox
|
|
129
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-AUAPBPGW.js";
|
|
138
|
+
import {
|
|
139
|
+
Field,
|
|
140
|
+
useFieldContext
|
|
141
|
+
} from "./chunk-UZDVOIW5.js";
|
|
142
|
+
import {
|
|
143
|
+
CircularProgress
|
|
144
|
+
} from "./chunk-3O6UTN3J.js";
|
|
130
145
|
import {
|
|
131
146
|
Droppable
|
|
132
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-TKI2CKHH.js";
|
|
133
148
|
import {
|
|
134
149
|
FeatureFlag
|
|
135
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-BIDE4IJG.js";
|
|
136
151
|
import {
|
|
137
152
|
FeatureFlags,
|
|
138
153
|
useFeatureFlags
|
|
139
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-CJFW36DZ.js";
|
|
140
155
|
import {
|
|
141
156
|
Show
|
|
142
|
-
} from "./chunk-
|
|
143
|
-
import {
|
|
144
|
-
FieldMessage
|
|
145
|
-
} from "./chunk-VGHVH2T3.js";
|
|
146
|
-
import {
|
|
147
|
-
Field,
|
|
148
|
-
useFieldContext
|
|
149
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
157
|
+
} from "./chunk-BUVVRQLZ.js";
|
|
150
158
|
import "./chunk-55J6XMHW.js";
|
|
151
159
|
import {
|
|
152
160
|
createNavTriggerProps
|
|
153
161
|
} from "./chunk-JF76VIL3.js";
|
|
154
162
|
import {
|
|
155
163
|
useTabsKeyboardNavigation
|
|
156
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-ITOIXNJS.js";
|
|
157
165
|
import {
|
|
158
166
|
Tabs,
|
|
159
167
|
TabsContext,
|
|
160
168
|
useTabsContext
|
|
161
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-RIFQSCHT.js";
|
|
162
170
|
import {
|
|
163
171
|
trapFocus
|
|
164
172
|
} from "./chunk-JIZQFTW6.js";
|
|
@@ -170,7 +178,7 @@ import "./chunk-BDCFYW34.js";
|
|
|
170
178
|
import "./chunk-CP7OUC2Q.js";
|
|
171
179
|
import {
|
|
172
180
|
useModal
|
|
173
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-OW62FLJ6.js";
|
|
174
182
|
|
|
175
183
|
// src/index.ts
|
|
176
184
|
export * from "@dnd-kit/core";
|
|
@@ -179,6 +187,7 @@ export {
|
|
|
179
187
|
Avatar,
|
|
180
188
|
Button,
|
|
181
189
|
Checkbox,
|
|
190
|
+
CircularProgress,
|
|
182
191
|
ConfirmModal,
|
|
183
192
|
Droppable,
|
|
184
193
|
FeatureFlag,
|
|
@@ -210,6 +219,7 @@ export {
|
|
|
210
219
|
Radio,
|
|
211
220
|
Select,
|
|
212
221
|
Show,
|
|
222
|
+
Spinner,
|
|
213
223
|
THEME_KEY,
|
|
214
224
|
Tab,
|
|
215
225
|
TabList,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Spinner'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"browserslist": "> 0.25%, not dead",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,15 +26,14 @@
|
|
|
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.
|
|
29
|
+
"@cerberus-design/styled-system": "0.10.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"build/**/*",
|
|
36
|
-
"src/**/*"
|
|
37
|
-
"index.ts"
|
|
36
|
+
"src/**/*"
|
|
38
37
|
],
|
|
39
38
|
"keywords": [
|
|
40
39
|
"panda-css",
|
|
@@ -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>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { cq } from '@cerberus/styled-system/patterns'
|
|
4
|
+
import { css } from '@cerberus/styled-system/css'
|
|
5
|
+
import type { SVGProps } from 'react'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This module contains the CircularProgress component.
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export interface CircularProgressProps extends SVGProps<SVGSVGElement> {
|
|
13
|
+
/**
|
|
14
|
+
* The current value of the CircularProgress
|
|
15
|
+
*/
|
|
16
|
+
now: number
|
|
17
|
+
/**
|
|
18
|
+
* The title of the CircularProgress for a11y
|
|
19
|
+
*/
|
|
20
|
+
title: string
|
|
21
|
+
/**
|
|
22
|
+
* What is shown below the now value (default: 'Done')
|
|
23
|
+
*/
|
|
24
|
+
label?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The CircularProgress component is used to display a loading indicator.
|
|
29
|
+
* @param props - SVG element attributes
|
|
30
|
+
* @param props.now - The current value of the CircularProgress
|
|
31
|
+
* @param props.title - The title of the CircularProgress for a11y
|
|
32
|
+
* @param props.label - What is shown below the now value (default: 'Done')
|
|
33
|
+
* @see https://cerberus.digitalu.design/react/progress-indicators
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <CircularProgress now={24} title="Course completion" label="done" />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export function CircularProgress(props: CircularProgressProps) {
|
|
40
|
+
const strokeW: number = 14
|
|
41
|
+
const radius = `calc(50% * (1 - ${strokeW}/100))`
|
|
42
|
+
const status: string = props.label ?? 'Done'
|
|
43
|
+
const now: number = props.now >= 100 ? 100 : props.now
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
aria-valuemin={0}
|
|
48
|
+
aria-valuemax={100}
|
|
49
|
+
aria-valuenow={now}
|
|
50
|
+
className={cq({
|
|
51
|
+
alignSelf: 'stretch',
|
|
52
|
+
flex: 1,
|
|
53
|
+
m: '4px',
|
|
54
|
+
position: 'relative',
|
|
55
|
+
})}
|
|
56
|
+
role="progressbar"
|
|
57
|
+
>
|
|
58
|
+
<svg
|
|
59
|
+
data-complete={now === 100}
|
|
60
|
+
className={css({
|
|
61
|
+
display: 'block',
|
|
62
|
+
rounded: 'full',
|
|
63
|
+
transition: 'all 0.5s ease',
|
|
64
|
+
})}
|
|
65
|
+
fill="none"
|
|
66
|
+
strokeLinecap="round"
|
|
67
|
+
strokeWidth={strokeW}
|
|
68
|
+
viewBox="0 0 100 100"
|
|
69
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
70
|
+
>
|
|
71
|
+
<title>{props.title}</title>
|
|
72
|
+
<desc>{`${now}% ${status}`}</desc>
|
|
73
|
+
<mask id="progMask">
|
|
74
|
+
<rect fill="white" width="100%" height="100%" />
|
|
75
|
+
<circle
|
|
76
|
+
className={css({
|
|
77
|
+
stroke: 'page.bg.100',
|
|
78
|
+
})}
|
|
79
|
+
cx="50%"
|
|
80
|
+
cy="50%"
|
|
81
|
+
r={radius}
|
|
82
|
+
pathLength="100"
|
|
83
|
+
/>
|
|
84
|
+
<circle
|
|
85
|
+
className={css({
|
|
86
|
+
transition: 'stroke-dashoffset 0.5s ease',
|
|
87
|
+
})}
|
|
88
|
+
cx="50%"
|
|
89
|
+
cy="50%"
|
|
90
|
+
r={radius}
|
|
91
|
+
pathLength="100"
|
|
92
|
+
stroke="black"
|
|
93
|
+
strokeDasharray="100"
|
|
94
|
+
strokeDashoffset={100 - now}
|
|
95
|
+
transform="rotate(-90 50 50)"
|
|
96
|
+
/>
|
|
97
|
+
</mask>
|
|
98
|
+
|
|
99
|
+
{/* <circle
|
|
100
|
+
fill="var(--cerberus-colors-page-surface-initial)"
|
|
101
|
+
cx="50%"
|
|
102
|
+
cy="50%"
|
|
103
|
+
r={`calc(50% * (1.15 - ${strokeW}/100))`}
|
|
104
|
+
pathLength="100"
|
|
105
|
+
mask="url(#progMask)"
|
|
106
|
+
/> */}
|
|
107
|
+
|
|
108
|
+
<circle
|
|
109
|
+
className={css({
|
|
110
|
+
fill: 'page.surface.initial',
|
|
111
|
+
})}
|
|
112
|
+
cx="50%"
|
|
113
|
+
cy="50%"
|
|
114
|
+
r={`calc(50% * (1 - ${strokeW}/100))`}
|
|
115
|
+
pathLength="100"
|
|
116
|
+
/>
|
|
117
|
+
<circle
|
|
118
|
+
className={css({
|
|
119
|
+
stroke: 'page.bg.100',
|
|
120
|
+
})}
|
|
121
|
+
cx="50%"
|
|
122
|
+
cy="50%"
|
|
123
|
+
r={radius}
|
|
124
|
+
pathLength="100"
|
|
125
|
+
/>
|
|
126
|
+
<circle
|
|
127
|
+
data-complete={now === 100}
|
|
128
|
+
className={css({
|
|
129
|
+
stroke: 'action.bg.initial',
|
|
130
|
+
transition: 'stroke-dashoffset 0.5s ease',
|
|
131
|
+
'&:is([data-complete=true])': {
|
|
132
|
+
stroke: 'success.bg.initial',
|
|
133
|
+
},
|
|
134
|
+
})}
|
|
135
|
+
cx="50%"
|
|
136
|
+
cy="50%"
|
|
137
|
+
r={radius}
|
|
138
|
+
pathLength="100"
|
|
139
|
+
strokeDasharray="100"
|
|
140
|
+
strokeDashoffset={100 - now}
|
|
141
|
+
transform="rotate(-90 50 50)"
|
|
142
|
+
/>
|
|
143
|
+
|
|
144
|
+
<g>
|
|
145
|
+
<text
|
|
146
|
+
className={css({
|
|
147
|
+
fill: 'page.text.initial',
|
|
148
|
+
fontFamily: 'mono',
|
|
149
|
+
textStyle: '1.25rem',
|
|
150
|
+
})}
|
|
151
|
+
x="35%"
|
|
152
|
+
y="50%"
|
|
153
|
+
>
|
|
154
|
+
{now}%
|
|
155
|
+
</text>
|
|
156
|
+
<text
|
|
157
|
+
className={css({
|
|
158
|
+
fill: 'page.text.100',
|
|
159
|
+
fontSize: '0.5rem',
|
|
160
|
+
})}
|
|
161
|
+
x="39%"
|
|
162
|
+
y="60%"
|
|
163
|
+
>
|
|
164
|
+
{status}
|
|
165
|
+
</text>
|
|
166
|
+
</g>
|
|
167
|
+
</svg>
|
|
168
|
+
</div>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
@@ -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>
|