@cerberus-design/react 0.17.2 → 0.18.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/README.md +1 -1
- package/build/legacy/_tsup-dts-rollup.d.cts +21878 -1965
- package/build/legacy/aria-helpers/nav-menu.aria.cjs.map +1 -1
- package/build/legacy/aria-helpers/trap-focus.aria.cjs.map +1 -1
- package/build/legacy/components/CircularProgress.cjs +24 -22
- package/build/legacy/components/CircularProgress.cjs.map +1 -1
- package/build/legacy/components/FeatureFlag.cjs +10 -8
- package/build/legacy/components/FeatureFlag.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +67 -65
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +34 -32
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/IconButton.cjs +2 -2
- package/build/legacy/components/IconButton.cjs.map +1 -1
- package/build/legacy/components/Menu.cjs +8 -4
- package/build/legacy/components/Menu.cjs.map +1 -1
- package/build/legacy/components/Menu.d.cts +2 -2
- package/build/legacy/components/Portal.cjs +4 -1
- package/build/legacy/components/Portal.cjs.map +1 -1
- package/build/legacy/components/Portal.d.cts +1 -1
- package/build/legacy/components/ProgressBar.cjs +2 -2
- package/build/legacy/components/ProgressBar.cjs.map +1 -1
- package/build/legacy/components/Show.cjs +8 -7
- package/build/legacy/components/Show.cjs.map +1 -1
- package/build/legacy/components/Spinner.cjs +2 -1
- package/build/legacy/components/Spinner.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +18 -16
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Text.cjs +1 -1
- package/build/legacy/components/Text.cjs.map +1 -1
- package/build/legacy/components/Tooltip.cjs +2 -2
- package/build/legacy/components/Tooltip.cjs.map +1 -1
- package/build/legacy/components/accordion/index.cjs +25 -21
- package/build/legacy/components/accordion/index.cjs.map +1 -1
- package/build/legacy/components/accordion/index.d.cts +1 -1
- package/build/legacy/components/accordion/item-group.cjs +31 -27
- package/build/legacy/components/accordion/item-group.cjs.map +1 -1
- package/build/legacy/components/accordion/item-group.d.cts +1 -1
- package/build/legacy/components/accordion/item-indicator.cjs +2 -2
- package/build/legacy/components/accordion/item-indicator.cjs.map +1 -1
- package/build/legacy/components/accordion/parts.cjs +2 -2
- package/build/legacy/components/accordion/parts.cjs.map +1 -1
- package/build/legacy/components/accordion/primitives.cjs +2 -2
- package/build/legacy/components/accordion/primitives.cjs.map +1 -1
- package/build/legacy/components/admonition/admonition.cjs +44 -42
- package/build/legacy/components/admonition/admonition.cjs.map +1 -1
- package/build/legacy/components/admonition/index.cjs +44 -42
- package/build/legacy/components/admonition/index.cjs.map +1 -1
- package/build/legacy/components/admonition/match-avatar.cjs +29 -27
- package/build/legacy/components/admonition/match-avatar.cjs.map +1 -1
- package/build/legacy/components/admonition/parts.cjs +2 -2
- package/build/legacy/components/admonition/parts.cjs.map +1 -1
- package/build/legacy/components/admonition/primitives.cjs +2 -2
- package/build/legacy/components/admonition/primitives.cjs.map +1 -1
- package/build/legacy/components/avatar/avatar.cjs +20 -18
- package/build/legacy/components/avatar/avatar.cjs.map +1 -1
- package/build/legacy/components/avatar/index.cjs +16 -14
- package/build/legacy/components/avatar/index.cjs.map +1 -1
- package/build/legacy/components/avatar/parts.cjs +2 -2
- package/build/legacy/components/avatar/parts.cjs.map +1 -1
- package/build/legacy/components/avatar/primitives.cjs +2 -2
- package/build/legacy/components/avatar/primitives.cjs.map +1 -1
- package/build/legacy/components/button/button.cjs +28 -25
- package/build/legacy/components/button/button.cjs.map +1 -1
- package/build/legacy/components/button/index.cjs +28 -25
- package/build/legacy/components/button/index.cjs.map +1 -1
- package/build/legacy/components/button/parts.cjs +28 -25
- package/build/legacy/components/button/parts.cjs.map +1 -1
- package/build/legacy/components/checkbox/checkbox-icon.cjs +12 -10
- package/build/legacy/components/checkbox/checkbox-icon.cjs.map +1 -1
- package/build/legacy/components/checkbox/checkbox.cjs +46 -44
- package/build/legacy/components/checkbox/checkbox.cjs.map +1 -1
- package/build/legacy/components/checkbox/index.cjs +46 -44
- package/build/legacy/components/checkbox/index.cjs.map +1 -1
- package/build/legacy/components/checkbox/parts.cjs +2 -2
- package/build/legacy/components/checkbox/parts.cjs.map +1 -1
- package/build/legacy/components/checkbox/primitives.cjs +2 -2
- package/build/legacy/components/checkbox/primitives.cjs.map +1 -1
- package/build/legacy/components/combobox/combobox.cjs +38 -33
- package/build/legacy/components/combobox/combobox.cjs.map +1 -1
- package/build/legacy/components/combobox/index.cjs +38 -33
- package/build/legacy/components/combobox/index.cjs.map +1 -1
- package/build/legacy/components/combobox/item-group.cjs +2 -2
- package/build/legacy/components/combobox/item-group.cjs.map +1 -1
- package/build/legacy/components/combobox/item.cjs +2 -2
- package/build/legacy/components/combobox/item.cjs.map +1 -1
- package/build/legacy/components/combobox/parts.cjs +2 -2
- package/build/legacy/components/combobox/parts.cjs.map +1 -1
- package/build/legacy/components/combobox/primitives.cjs +2 -2
- package/build/legacy/components/combobox/primitives.cjs.map +1 -1
- package/build/legacy/components/combobox/use-stateful-collection.cjs +2 -2
- package/build/legacy/components/combobox/use-stateful-collection.cjs.map +1 -1
- package/build/legacy/components/cta-dialog/index.cjs +90 -84
- package/build/legacy/components/cta-dialog/index.cjs.map +1 -1
- package/build/legacy/components/cta-dialog/provider.cjs +90 -84
- package/build/legacy/components/cta-dialog/provider.cjs.map +1 -1
- package/build/legacy/components/cta-dialog/trigger-item.cjs +5 -5
- package/build/legacy/components/cta-dialog/trigger-item.cjs.map +1 -1
- package/build/legacy/components/date-picker/calendar.cjs +95 -66
- package/build/legacy/components/date-picker/calendar.cjs.map +1 -1
- package/build/legacy/components/date-picker/content.cjs +59 -30
- package/build/legacy/components/date-picker/content.cjs.map +1 -1
- package/build/legacy/components/date-picker/date-picker.cjs +41 -15
- package/build/legacy/components/date-picker/date-picker.cjs.map +1 -1
- package/build/legacy/components/date-picker/day-view.cjs +47 -21
- package/build/legacy/components/date-picker/day-view.cjs.map +1 -1
- package/build/legacy/components/date-picker/index.cjs +80 -51
- package/build/legacy/components/date-picker/index.cjs.map +1 -1
- package/build/legacy/components/date-picker/input.cjs +43 -17
- package/build/legacy/components/date-picker/input.cjs.map +1 -1
- package/build/legacy/components/date-picker/month-view.cjs +47 -21
- package/build/legacy/components/date-picker/month-view.cjs.map +1 -1
- package/build/legacy/components/date-picker/parts.cjs +41 -15
- package/build/legacy/components/date-picker/parts.cjs.map +1 -1
- package/build/legacy/components/date-picker/primitives.cjs +41 -15
- package/build/legacy/components/date-picker/primitives.cjs.map +1 -1
- package/build/legacy/components/date-picker/range-input.cjs +43 -17
- package/build/legacy/components/date-picker/range-input.cjs.map +1 -1
- package/build/legacy/components/date-picker/trigger.cjs +43 -17
- package/build/legacy/components/date-picker/trigger.cjs.map +1 -1
- package/build/legacy/components/date-picker/view-control-group.cjs +47 -21
- package/build/legacy/components/date-picker/view-control-group.cjs.map +1 -1
- package/build/legacy/components/date-picker/year-view.cjs +47 -21
- package/build/legacy/components/date-picker/year-view.cjs.map +1 -1
- package/build/legacy/components/deprecated/FieldMessage.cjs +2 -2
- package/build/legacy/components/deprecated/FieldMessage.cjs.map +1 -1
- package/build/legacy/components/deprecated/FieldsetLabel.cjs +2 -2
- package/build/legacy/components/deprecated/FieldsetLabel.cjs.map +1 -1
- package/build/legacy/components/deprecated/Label.cjs +4 -4
- package/build/legacy/components/deprecated/Label.cjs.map +1 -1
- package/build/legacy/components/deprecated/Legend.cjs +14 -12
- package/build/legacy/components/deprecated/Legend.cjs.map +1 -1
- package/build/legacy/components/deprecated/Modal.cjs +4 -13
- package/build/legacy/components/deprecated/Modal.cjs.map +1 -1
- package/build/legacy/components/deprecated/Modal.d.cts +2 -2
- package/build/legacy/components/deprecated/ModalDescription.cjs +2 -2
- package/build/legacy/components/deprecated/ModalDescription.cjs.map +1 -1
- package/build/legacy/components/deprecated/ModalDescription.d.cts +2 -2
- package/build/legacy/components/deprecated/ModalHeader.cjs +2 -2
- package/build/legacy/components/deprecated/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/deprecated/ModalHeader.d.cts +2 -2
- package/build/legacy/components/deprecated/ModalHeading.cjs +2 -2
- package/build/legacy/components/deprecated/ModalHeading.cjs.map +1 -1
- package/build/legacy/components/deprecated/ModalHeading.d.cts +2 -2
- package/build/legacy/components/deprecated/NavMenuLink.cjs +14 -12
- package/build/legacy/components/deprecated/NavMenuLink.cjs.map +1 -1
- package/build/legacy/components/deprecated/NavMenuList.cjs +15 -13
- package/build/legacy/components/deprecated/NavMenuList.cjs.map +1 -1
- package/build/legacy/components/deprecated/NavMenuTrigger.cjs +17 -15
- package/build/legacy/components/deprecated/NavMenuTrigger.cjs.map +1 -1
- package/build/legacy/components/deprecated/Notification.cjs +3 -3
- package/build/legacy/components/deprecated/Notification.cjs.map +1 -1
- package/build/legacy/components/deprecated/NotificationDescription.cjs +2 -2
- package/build/legacy/components/deprecated/NotificationDescription.cjs.map +1 -1
- package/build/legacy/components/deprecated/NotificationHeading.cjs +2 -2
- package/build/legacy/components/deprecated/NotificationHeading.cjs.map +1 -1
- package/build/legacy/components/dialog/close-icon-trigger.cjs +6 -6
- package/build/legacy/components/dialog/close-icon-trigger.cjs.map +1 -1
- package/build/legacy/components/dialog/dialog.cjs +14 -11
- package/build/legacy/components/dialog/dialog.cjs.map +1 -1
- package/build/legacy/components/dialog/index.cjs +14 -11
- package/build/legacy/components/dialog/index.cjs.map +1 -1
- package/build/legacy/components/dialog/parts.cjs +2 -2
- package/build/legacy/components/dialog/parts.cjs.map +1 -1
- package/build/legacy/components/dialog/primitives.cjs +2 -2
- package/build/legacy/components/dialog/primitives.cjs.map +1 -1
- package/build/legacy/components/field/field.cjs +18 -16
- package/build/legacy/components/field/field.cjs.map +1 -1
- package/build/legacy/components/field/index.cjs +22 -20
- package/build/legacy/components/field/index.cjs.map +1 -1
- package/build/legacy/components/field/parts.cjs +6 -6
- package/build/legacy/components/field/parts.cjs.map +1 -1
- package/build/legacy/components/field/primitives.cjs +6 -6
- package/build/legacy/components/field/primitives.cjs.map +1 -1
- package/build/legacy/components/field/start-indicator.cjs +2 -2
- package/build/legacy/components/field/start-indicator.cjs.map +1 -1
- package/build/legacy/components/field/status-indicator.cjs +2 -2
- package/build/legacy/components/field/status-indicator.cjs.map +1 -1
- package/build/legacy/components/fieldset/fieldset.cjs +2 -2
- package/build/legacy/components/fieldset/fieldset.cjs.map +1 -1
- package/build/legacy/components/fieldset/index.cjs +2 -2
- package/build/legacy/components/fieldset/index.cjs.map +1 -1
- package/build/legacy/components/fieldset/parts.cjs +2 -2
- package/build/legacy/components/fieldset/parts.cjs.map +1 -1
- package/build/legacy/components/fieldset/primitives.cjs +2 -2
- package/build/legacy/components/fieldset/primitives.cjs.map +1 -1
- package/build/legacy/components/for.cjs +2 -1
- package/build/legacy/components/for.cjs.map +1 -1
- package/build/legacy/components/notifications/center.cjs +54 -51
- package/build/legacy/components/notifications/center.cjs.map +1 -1
- package/build/legacy/components/notifications/close-trigger.cjs +2 -2
- package/build/legacy/components/notifications/close-trigger.cjs.map +1 -1
- package/build/legacy/components/notifications/index.cjs +51 -46
- package/build/legacy/components/notifications/index.cjs.map +1 -1
- package/build/legacy/components/notifications/index.d.cts +1 -1
- package/build/legacy/components/notifications/match-icon.cjs +3 -2
- package/build/legacy/components/notifications/match-icon.cjs.map +1 -1
- package/build/legacy/components/notifications/parts.cjs +2 -2
- package/build/legacy/components/notifications/parts.cjs.map +1 -1
- package/build/legacy/components/notifications/primitives.cjs +5 -3
- package/build/legacy/components/notifications/primitives.cjs.map +1 -1
- package/build/legacy/components/notifications/primitives.d.cts +1 -1
- package/build/legacy/components/radio/index.cjs +2 -2
- package/build/legacy/components/radio/index.cjs.map +1 -1
- package/build/legacy/components/radio/parts.cjs +2 -2
- package/build/legacy/components/radio/parts.cjs.map +1 -1
- package/build/legacy/components/radio/primitives.cjs +2 -2
- package/build/legacy/components/radio/primitives.cjs.map +1 -1
- package/build/legacy/components/radio/radio.cjs +2 -2
- package/build/legacy/components/radio/radio.cjs.map +1 -1
- package/build/legacy/components/rating/index.cjs +15 -13
- package/build/legacy/components/rating/index.cjs.map +1 -1
- package/build/legacy/components/rating/parts.cjs +2 -2
- package/build/legacy/components/rating/parts.cjs.map +1 -1
- package/build/legacy/components/rating/primitives.cjs +2 -2
- package/build/legacy/components/rating/primitives.cjs.map +1 -1
- package/build/legacy/components/rating/rating.cjs +23 -21
- package/build/legacy/components/rating/rating.cjs.map +1 -1
- package/build/legacy/components/select/index.cjs +30 -25
- package/build/legacy/components/select/index.cjs.map +1 -1
- package/build/legacy/components/select/option-group.cjs +2 -2
- package/build/legacy/components/select/option-group.cjs.map +1 -1
- package/build/legacy/components/select/parts.cjs +2 -2
- package/build/legacy/components/select/parts.cjs.map +1 -1
- package/build/legacy/components/select/primitives.cjs +2 -2
- package/build/legacy/components/select/primitives.cjs.map +1 -1
- package/build/legacy/components/select/select.cjs +43 -38
- package/build/legacy/components/select/select.cjs.map +1 -1
- package/build/legacy/components/switch/index.cjs +13 -11
- package/build/legacy/components/switch/index.cjs.map +1 -1
- package/build/legacy/components/switch/parts.cjs +10 -8
- package/build/legacy/components/switch/parts.cjs.map +1 -1
- package/build/legacy/components/switch/primitives.cjs +10 -8
- package/build/legacy/components/switch/primitives.cjs.map +1 -1
- package/build/legacy/components/switch/switch.cjs +13 -11
- package/build/legacy/components/switch/switch.cjs.map +1 -1
- package/build/legacy/components/table/index.cjs +13 -11
- package/build/legacy/components/table/index.cjs.map +1 -1
- package/build/legacy/components/table/parts.cjs +2 -2
- package/build/legacy/components/table/parts.cjs.map +1 -1
- package/build/legacy/components/table/primitives.cjs +2 -2
- package/build/legacy/components/table/primitives.cjs.map +1 -1
- package/build/legacy/components/table/table.cjs +13 -11
- package/build/legacy/components/table/table.cjs.map +1 -1
- package/build/legacy/components/tabs/index.cjs +2 -2
- package/build/legacy/components/tabs/index.cjs.map +1 -1
- package/build/legacy/components/tabs/parts.cjs +2 -2
- package/build/legacy/components/tabs/parts.cjs.map +1 -1
- package/build/legacy/components/tabs/primitives.cjs +2 -2
- package/build/legacy/components/tabs/primitives.cjs.map +1 -1
- package/build/legacy/components/tabs/tabs.cjs +2 -2
- package/build/legacy/components/tabs/tabs.cjs.map +1 -1
- package/build/legacy/components/toggle/index.cjs +7 -2
- package/build/legacy/components/toggle/index.cjs.map +1 -1
- package/build/legacy/components/toggle/parts.cjs +7 -2
- package/build/legacy/components/toggle/parts.cjs.map +1 -1
- package/build/legacy/components/toggle/primitives.cjs +7 -2
- package/build/legacy/components/toggle/primitives.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +2 -4
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/config/icons/checkbox.icons.cjs +2 -4
- package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -1
- package/build/legacy/config/icons/checkbox.icons.d.cts +0 -2
- package/build/legacy/config/index.cjs +2 -4
- package/build/legacy/config/index.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +78 -77
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/field.cjs +2 -2
- package/build/legacy/context/field.cjs.map +1 -1
- package/build/legacy/context/navMenu.cjs +1 -1
- package/build/legacy/context/navMenu.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +102 -97
- package/build/legacy/context/prompt-modal.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/useModal.d.cts +2 -2
- package/build/legacy/index.cjs +1451 -1500
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +20 -30
- package/build/modern/_tsup-dts-rollup.d.ts +21878 -1965
- package/build/modern/aria-helpers/nav-menu.aria.js +1 -1
- package/build/modern/aria-helpers/trap-focus.aria.js +1 -1
- package/build/modern/{chunk-R4KLHRCL.js → chunk-25P3FUUT.js} +3 -3
- package/build/modern/{chunk-FZ53535Q.js → chunk-2CZWHED6.js} +2 -2
- package/build/modern/{chunk-JAAMD5EH.js → chunk-2IYWFZTK.js} +2 -2
- package/build/modern/{chunk-LZWNHXRP.js → chunk-3DZW23OX.js} +7 -5
- package/build/modern/chunk-3DZW23OX.js.map +1 -0
- package/build/modern/{chunk-7OYOT5LK.js → chunk-3IT3V3YA.js} +6 -6
- package/build/modern/chunk-3IT3V3YA.js.map +1 -0
- package/build/modern/{chunk-KWZ3CEG6.js → chunk-52ZQ26IV.js} +2 -2
- package/build/modern/chunk-53YVHIGJ.js +11 -0
- package/build/modern/chunk-53YVHIGJ.js.map +1 -0
- package/build/modern/{chunk-XBUXVNTY.js → chunk-5FC7HIAR.js} +2 -2
- package/build/modern/{chunk-TEMFCS72.js → chunk-5HEU3SYR.js} +2 -2
- package/build/modern/{chunk-QCBLRACK.js → chunk-5MUUKSLF.js} +3 -5
- package/build/modern/chunk-5MUUKSLF.js.map +1 -0
- package/build/modern/{chunk-245SMQ45.js → chunk-6DU5QBPR.js} +6 -6
- package/build/modern/chunk-6DU5QBPR.js.map +1 -0
- package/build/modern/{chunk-AIJ75ENY.js → chunk-6KX5P5OU.js} +5 -5
- package/build/modern/chunk-6KX5P5OU.js.map +1 -0
- package/build/modern/{chunk-DEXJQ6UI.js → chunk-6MMH3Y2U.js} +5 -5
- package/build/modern/chunk-6MMH3Y2U.js.map +1 -0
- package/build/modern/{chunk-4IXQNNAM.js → chunk-6UVR3VGK.js} +2 -2
- package/build/modern/{chunk-VHCJ25QC.js → chunk-75DUDVPA.js} +4 -4
- package/build/modern/chunk-75DUDVPA.js.map +1 -0
- package/build/modern/{chunk-JWF7FK7T.js → chunk-7I7LA2EE.js} +2 -2
- package/build/modern/chunk-7I7LA2EE.js.map +1 -0
- package/build/modern/{chunk-6TIMBGFL.js → chunk-ADZRQNW3.js} +3 -3
- package/build/modern/{chunk-7SYJFI5E.js → chunk-AUI74W7J.js} +3 -2
- package/build/modern/chunk-AUI74W7J.js.map +1 -0
- package/build/modern/{chunk-CPNKDKC2.js → chunk-BMPMMTX3.js} +3 -5
- package/build/modern/chunk-BMPMMTX3.js.map +1 -0
- package/build/modern/{chunk-6HOLE2JH.js → chunk-CEJIKL6N.js} +2 -2
- package/build/modern/{chunk-N4RPMT6J.js → chunk-CF4TCMJI.js} +4 -4
- package/build/modern/chunk-CF4TCMJI.js.map +1 -0
- package/build/modern/{chunk-NR5XDIJ7.js → chunk-D4BVNWAY.js} +3 -5
- package/build/modern/chunk-D4BVNWAY.js.map +1 -0
- package/build/modern/{chunk-QDXU6G3X.js → chunk-D6PFYSIP.js} +3 -3
- package/build/modern/{chunk-JLUIGY2U.js → chunk-D7QIPJQC.js} +9 -9
- package/build/modern/chunk-D7QIPJQC.js.map +1 -0
- package/build/modern/{chunk-CYSLIGNU.js → chunk-DHKSNGQX.js} +11 -11
- package/build/modern/chunk-DHKSNGQX.js.map +1 -0
- package/build/modern/{chunk-Z52R6ABJ.js → chunk-EMDNETC7.js} +3 -3
- package/build/modern/chunk-EMDNETC7.js.map +1 -0
- package/build/modern/{chunk-BPRF34DU.js → chunk-ENJUQNVT.js} +3 -5
- package/build/modern/chunk-ENJUQNVT.js.map +1 -0
- package/build/modern/{chunk-YOTXFCCC.js → chunk-F2MWSSK2.js} +3 -3
- package/build/modern/chunk-F2MWSSK2.js.map +1 -0
- package/build/modern/{chunk-XVOEBY5S.js → chunk-F3XFJHGR.js} +7 -7
- package/build/modern/chunk-F3XFJHGR.js.map +1 -0
- package/build/modern/{chunk-EH36PXVP.js → chunk-FAQ3F72W.js} +2 -2
- package/build/modern/{chunk-JIZQFTW6.js → chunk-FHNT274F.js} +1 -1
- package/build/modern/chunk-FHNT274F.js.map +1 -0
- package/build/modern/{chunk-JF76VIL3.js → chunk-FUTYPCHZ.js} +1 -1
- package/build/modern/chunk-FUTYPCHZ.js.map +1 -0
- package/build/modern/{chunk-6WS765J3.js → chunk-FXWN3SPS.js} +2 -2
- package/build/modern/chunk-FXWN3SPS.js.map +1 -0
- package/build/modern/{chunk-RD2YPFRA.js → chunk-GB7W3YNU.js} +6 -8
- package/build/modern/chunk-GB7W3YNU.js.map +1 -0
- package/build/modern/{chunk-R7IDIIST.js → chunk-GBCF6DOS.js} +4 -4
- package/build/modern/chunk-GBCF6DOS.js.map +1 -0
- package/build/modern/{chunk-2CVGNLIM.js → chunk-GC6JUHVS.js} +2 -2
- package/build/modern/{chunk-IASVL7CW.js → chunk-GUAF4FXQ.js} +2 -2
- package/build/modern/{chunk-OS73F4SR.js → chunk-GYUCW2QK.js} +2 -2
- package/build/modern/{chunk-NMDAHO2K.js → chunk-H2HP63H4.js} +8 -8
- package/build/modern/chunk-H2HP63H4.js.map +1 -0
- package/build/modern/{chunk-STLN7BMJ.js → chunk-H2VYN32T.js} +2 -2
- package/build/modern/chunk-H2VYN32T.js.map +1 -0
- package/build/modern/{chunk-BIDE4IJG.js → chunk-H4SH6ORP.js} +2 -2
- package/build/modern/{chunk-5RTNSVYU.js → chunk-HJ7MAPDD.js} +3 -5
- package/build/modern/chunk-HJ7MAPDD.js.map +1 -0
- package/build/modern/{chunk-HUN7VQBT.js → chunk-I4EGYD24.js} +2 -2
- package/build/modern/chunk-I5RGBB57.js +13 -0
- package/build/modern/{chunk-DXOKSZVQ.js.map → chunk-I5RGBB57.js.map} +1 -1
- package/build/modern/{chunk-DRDNNRU3.js → chunk-IIH4VDQA.js} +3 -3
- package/build/modern/chunk-IIH4VDQA.js.map +1 -0
- package/build/modern/{chunk-W47QEZD5.js → chunk-IL677ECW.js} +3 -3
- package/build/modern/chunk-IL677ECW.js.map +1 -0
- package/build/modern/{chunk-32M5JS5F.js → chunk-ILROS7ST.js} +6 -6
- package/build/modern/{chunk-OSAYA6GH.js → chunk-INVZVMY4.js} +7 -7
- package/build/modern/chunk-INVZVMY4.js.map +1 -0
- package/build/modern/{chunk-SYPAA5YF.js → chunk-IUF74GEL.js} +2 -2
- package/build/modern/{chunk-WVFEJCUN.js → chunk-J76SGDYP.js} +2 -2
- package/build/modern/{chunk-UCL7P2OG.js → chunk-JFSCSAHD.js} +9 -9
- package/build/modern/chunk-JFSCSAHD.js.map +1 -0
- package/build/modern/{chunk-RQCJKDXU.js → chunk-JQYW4IOC.js} +2 -2
- package/build/modern/{chunk-JQJTQVPI.js → chunk-KEGLWDD6.js} +3 -3
- package/build/modern/{chunk-EB37HRCN.js → chunk-KOLNLCMZ.js} +1 -1
- package/build/modern/{chunk-EB37HRCN.js.map → chunk-KOLNLCMZ.js.map} +1 -1
- package/build/modern/{chunk-Z3FDG263.js → chunk-KV4NRGKW.js} +3 -5
- package/build/modern/chunk-KV4NRGKW.js.map +1 -0
- package/build/modern/{chunk-LPALHB6R.js → chunk-L2EGF5AV.js} +3 -3
- package/build/modern/chunk-L2EGF5AV.js.map +1 -0
- package/build/modern/{chunk-4GFEWP76.js → chunk-L5FYGWAZ.js} +3 -3
- package/build/modern/chunk-L5FYGWAZ.js.map +1 -0
- package/build/modern/{chunk-RU5LOXWI.js → chunk-L64HQGLQ.js} +2 -2
- package/build/modern/chunk-L64HQGLQ.js.map +1 -0
- package/build/modern/{chunk-6WEW5OGL.js → chunk-LEBDLXJE.js} +10 -10
- package/build/modern/chunk-LEBDLXJE.js.map +1 -0
- package/build/modern/{chunk-A464YKEL.js → chunk-MDXJ6MGF.js} +3 -3
- package/build/modern/chunk-MDXJ6MGF.js.map +1 -0
- package/build/modern/{chunk-KZDEDAIK.js → chunk-MTD4JSHT.js} +2 -2
- package/build/modern/{chunk-FUL2VRDU.js → chunk-MZXSSTS7.js} +2 -2
- package/build/modern/{chunk-ILSKGNUA.js → chunk-N6XHXPBI.js} +7 -7
- package/build/modern/{chunk-LLZE2RBB.js → chunk-NJ37QRAI.js} +2 -2
- package/build/modern/chunk-NJ37QRAI.js.map +1 -0
- package/build/modern/{chunk-LVHQGXJK.js → chunk-NP73HOHI.js} +3 -3
- package/build/modern/{chunk-7TQRTBUP.js → chunk-NQ22M7U7.js} +2 -2
- package/build/modern/{chunk-V243YFI3.js → chunk-NYEUNVKR.js} +5 -5
- package/build/modern/{chunk-63F5MURH.js → chunk-NYRNXRTZ.js} +3 -3
- package/build/modern/chunk-NYRNXRTZ.js.map +1 -0
- package/build/modern/{chunk-MR4DX76C.js → chunk-NYVKL2IS.js} +2 -2
- package/build/modern/{chunk-E3PAEB7Y.js → chunk-OCZCCOWW.js} +3 -5
- package/build/modern/chunk-OCZCCOWW.js.map +1 -0
- package/build/modern/{chunk-5DY66QZD.js → chunk-ONHP3RYL.js} +4 -4
- package/build/modern/chunk-ONHP3RYL.js.map +1 -0
- package/build/modern/{chunk-RKGFPKKK.js → chunk-OY33UHBG.js} +3 -5
- package/build/modern/chunk-OY33UHBG.js.map +1 -0
- package/build/modern/{chunk-LMBMMBKU.js → chunk-OY7BOKWW.js} +5 -5
- package/build/modern/chunk-OY7BOKWW.js.map +1 -0
- package/build/modern/{chunk-MZMZAX4E.js → chunk-P7DWMM56.js} +18 -18
- package/build/modern/chunk-P7DWMM56.js.map +1 -0
- package/build/modern/{chunk-4HUK7YNZ.js → chunk-PHPXOX2Y.js} +7 -5
- package/build/modern/chunk-PHPXOX2Y.js.map +1 -0
- package/build/modern/{chunk-6QHOKCV3.js → chunk-Q3LUIS3M.js} +4 -4
- package/build/modern/chunk-Q3LUIS3M.js.map +1 -0
- package/build/modern/{chunk-KJMCUYWV.js → chunk-Q737W5KJ.js} +3 -3
- package/build/modern/chunk-Q737W5KJ.js.map +1 -0
- package/build/modern/{chunk-QQCB6JXW.js → chunk-QCZ5VNGU.js} +4 -4
- package/build/modern/chunk-QCZ5VNGU.js.map +1 -0
- package/build/modern/{chunk-TNSIYRF7.js → chunk-QD3WAARV.js} +4 -4
- package/build/modern/chunk-QD3WAARV.js.map +1 -0
- package/build/modern/{chunk-XBDEIBW2.js → chunk-QNZIH2KG.js} +2 -2
- package/build/modern/chunk-RP6DNLP3.js +17 -0
- package/build/modern/chunk-RP6DNLP3.js.map +1 -0
- package/build/modern/{chunk-M7T3MBFB.js → chunk-RT7OJ4X5.js} +2 -2
- package/build/modern/{chunk-D7MAAGNA.js → chunk-RW3YEBDW.js} +42 -16
- package/build/modern/chunk-RW3YEBDW.js.map +1 -0
- package/build/modern/{chunk-BJJ4XAVO.js → chunk-RYRB5GPN.js} +3 -3
- package/build/modern/{chunk-7HKULJ4G.js → chunk-SDV6XUM6.js} +14 -11
- package/build/modern/chunk-SDV6XUM6.js.map +1 -0
- package/build/modern/{chunk-D7UIWAFO.js → chunk-SSR3CWJZ.js} +3 -5
- package/build/modern/chunk-SSR3CWJZ.js.map +1 -0
- package/build/modern/{chunk-IPC7LQ4Q.js → chunk-STCGFGTK.js} +8 -8
- package/build/modern/chunk-STCGFGTK.js.map +1 -0
- package/build/modern/{chunk-7JHQVQPS.js → chunk-SZOV7M64.js} +6 -4
- package/build/modern/chunk-SZOV7M64.js.map +1 -0
- package/build/modern/{chunk-L7N24B6B.js → chunk-T2NB3RBO.js} +3 -3
- package/build/modern/chunk-T2NB3RBO.js.map +1 -0
- package/build/modern/{chunk-DYQBRCZC.js → chunk-TGY3RICC.js} +14 -16
- package/build/modern/chunk-TGY3RICC.js.map +1 -0
- package/build/modern/{chunk-2FRF57EU.js → chunk-UGFSACHC.js} +3 -5
- package/build/modern/chunk-UGFSACHC.js.map +1 -0
- package/build/modern/{chunk-SRNDDY5D.js → chunk-UH6XSYYD.js} +3 -5
- package/build/modern/chunk-UH6XSYYD.js.map +1 -0
- package/build/modern/{chunk-AO3GB72J.js → chunk-UJTE43LT.js} +2 -2
- package/build/modern/chunk-UJTE43LT.js.map +1 -0
- package/build/modern/{chunk-3XE3QXUI.js → chunk-URJ6JHLG.js} +15 -15
- package/build/modern/chunk-URJ6JHLG.js.map +1 -0
- package/build/modern/{chunk-FCSO6N2Y.js → chunk-V6EAWUCQ.js} +2 -2
- package/build/modern/{chunk-HIC7Z23X.js → chunk-V6ZOASMM.js} +2 -2
- package/build/modern/chunk-VEAC4I3F.js +17 -0
- package/build/modern/chunk-VEAC4I3F.js.map +1 -0
- package/build/modern/{chunk-CNA2VKAH.js → chunk-VIKVLJGG.js} +3 -3
- package/build/modern/chunk-VIKVLJGG.js.map +1 -0
- package/build/modern/{chunk-YUNLWTUB.js → chunk-W337WQTU.js} +2 -2
- package/build/modern/{chunk-VNPLKMEM.js → chunk-WEL43I6Y.js} +7 -7
- package/build/modern/chunk-WEL43I6Y.js.map +1 -0
- package/build/modern/{chunk-XTNGF4D6.js → chunk-YOYCS3MD.js} +2 -2
- package/build/modern/{chunk-RUR5MV54.js → chunk-YUVPXW6D.js} +12 -6
- package/build/modern/chunk-YUVPXW6D.js.map +1 -0
- package/build/modern/{chunk-MH6CIBDU.js → chunk-Z2KBUTCO.js} +3 -3
- package/build/modern/chunk-Z2KBUTCO.js.map +1 -0
- package/build/modern/{chunk-URO5I5AQ.js → chunk-ZL7AX5EM.js} +5 -5
- package/build/modern/components/CircularProgress.js +2 -2
- package/build/modern/components/FeatureFlag.js +2 -2
- package/build/modern/components/FileStatus.js +12 -12
- package/build/modern/components/FileUploader.js +5 -5
- package/build/modern/components/IconButton.js +1 -1
- package/build/modern/components/Menu.d.ts +2 -2
- package/build/modern/components/Menu.js +1 -1
- package/build/modern/components/Portal.d.ts +1 -1
- package/build/modern/components/Portal.js +1 -1
- package/build/modern/components/ProgressBar.js +1 -1
- package/build/modern/components/Show.js +1 -2
- package/build/modern/components/Spinner.js +1 -1
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Text.js +1 -1
- package/build/modern/components/Tooltip.js +1 -1
- package/build/modern/components/accordion/index.d.ts +1 -1
- package/build/modern/components/accordion/index.js +5 -5
- package/build/modern/components/accordion/item-group.d.ts +1 -1
- package/build/modern/components/accordion/item-group.js +5 -5
- package/build/modern/components/accordion/item-indicator.js +3 -3
- package/build/modern/components/accordion/parts.js +2 -2
- package/build/modern/components/accordion/primitives.js +1 -1
- package/build/modern/components/admonition/admonition.js +8 -8
- package/build/modern/components/admonition/index.js +8 -8
- package/build/modern/components/admonition/match-avatar.js +5 -5
- package/build/modern/components/admonition/parts.js +2 -2
- package/build/modern/components/admonition/primitives.js +1 -1
- package/build/modern/components/avatar/avatar.js +4 -4
- package/build/modern/components/avatar/index.js +4 -4
- package/build/modern/components/avatar/parts.js +2 -2
- package/build/modern/components/avatar/primitives.js +1 -1
- package/build/modern/components/button/button.js +3 -3
- package/build/modern/components/button/index.js +4 -4
- package/build/modern/components/button/parts.js +4 -4
- package/build/modern/components/checkbox/checkbox-icon.js +4 -4
- package/build/modern/components/checkbox/checkbox.js +6 -6
- package/build/modern/components/checkbox/index.js +6 -6
- package/build/modern/components/checkbox/parts.js +2 -2
- package/build/modern/components/checkbox/primitives.js +1 -1
- package/build/modern/components/combobox/combobox.js +5 -5
- package/build/modern/components/combobox/index.js +13 -13
- package/build/modern/components/combobox/item-group.js +3 -3
- package/build/modern/components/combobox/item.js +3 -3
- package/build/modern/components/combobox/parts.js +2 -2
- package/build/modern/components/combobox/primitives.js +1 -1
- package/build/modern/components/combobox/use-stateful-collection.js +2 -2
- package/build/modern/components/cta-dialog/index.js +16 -16
- package/build/modern/components/cta-dialog/provider.js +15 -15
- package/build/modern/components/cta-dialog/trigger-item.js +4 -4
- package/build/modern/components/date-picker/calendar.js +13 -13
- package/build/modern/components/date-picker/content.js +4 -4
- package/build/modern/components/date-picker/date-picker.js +3 -3
- package/build/modern/components/date-picker/day-view.js +8 -8
- package/build/modern/components/date-picker/index.js +19 -19
- package/build/modern/components/date-picker/input.js +5 -5
- package/build/modern/components/date-picker/month-view.js +8 -8
- package/build/modern/components/date-picker/parts.js +2 -2
- package/build/modern/components/date-picker/primitives.js +1 -1
- package/build/modern/components/date-picker/range-input.js +5 -5
- package/build/modern/components/date-picker/trigger.js +4 -4
- package/build/modern/components/date-picker/view-control-group.js +7 -7
- package/build/modern/components/date-picker/year-view.js +8 -8
- package/build/modern/components/deprecated/FieldMessage.js +1 -1
- package/build/modern/components/deprecated/FieldsetLabel.js +1 -1
- package/build/modern/components/deprecated/Label.js +7 -7
- package/build/modern/components/deprecated/Legend.js +2 -2
- package/build/modern/components/deprecated/Modal.d.ts +2 -2
- package/build/modern/components/deprecated/Modal.js +7 -3
- package/build/modern/components/deprecated/Modal.js.map +1 -1
- package/build/modern/components/deprecated/ModalDescription.d.ts +2 -2
- package/build/modern/components/deprecated/ModalDescription.js +7 -3
- package/build/modern/components/deprecated/ModalDescription.js.map +1 -1
- package/build/modern/components/deprecated/ModalHeader.d.ts +2 -2
- package/build/modern/components/deprecated/ModalHeader.js +20 -3
- package/build/modern/components/deprecated/ModalHeader.js.map +1 -1
- package/build/modern/components/deprecated/ModalHeading.d.ts +2 -2
- package/build/modern/components/deprecated/ModalHeading.js +7 -3
- package/build/modern/components/deprecated/ModalHeading.js.map +1 -1
- package/build/modern/components/deprecated/NavMenuLink.js +2 -2
- package/build/modern/components/deprecated/NavMenuList.js +3 -3
- package/build/modern/components/deprecated/NavMenuTrigger.js +4 -4
- package/build/modern/components/deprecated/Notification.js +72 -4
- package/build/modern/components/deprecated/Notification.js.map +1 -1
- package/build/modern/components/deprecated/NotificationDescription.js +16 -2
- package/build/modern/components/deprecated/NotificationDescription.js.map +1 -1
- package/build/modern/components/deprecated/NotificationHeading.js +10 -2
- package/build/modern/components/deprecated/NotificationHeading.js.map +1 -1
- package/build/modern/components/dialog/close-icon-trigger.js +3 -3
- package/build/modern/components/dialog/dialog.js +3 -3
- package/build/modern/components/dialog/index.js +6 -6
- package/build/modern/components/dialog/parts.js +2 -2
- package/build/modern/components/dialog/primitives.js +1 -1
- package/build/modern/components/field/field.js +5 -5
- package/build/modern/components/field/index.js +10 -10
- package/build/modern/components/field/parts.js +4 -4
- package/build/modern/components/field/primitives.js +3 -3
- package/build/modern/components/field/start-indicator.js +1 -1
- package/build/modern/components/field/status-indicator.js +1 -1
- package/build/modern/components/fieldset/fieldset.js +3 -3
- package/build/modern/components/fieldset/index.js +3 -3
- package/build/modern/components/fieldset/parts.js +2 -2
- package/build/modern/components/fieldset/primitives.js +1 -1
- package/build/modern/components/for.js +1 -1
- package/build/modern/components/notifications/center.js +8 -8
- package/build/modern/components/notifications/close-trigger.js +3 -3
- package/build/modern/components/notifications/index.d.ts +1 -1
- package/build/modern/components/notifications/index.js +8 -8
- package/build/modern/components/notifications/match-icon.js +2 -2
- package/build/modern/components/notifications/parts.js +2 -2
- package/build/modern/components/notifications/primitives.d.ts +1 -1
- package/build/modern/components/notifications/primitives.js +1 -1
- package/build/modern/components/radio/index.js +3 -3
- package/build/modern/components/radio/parts.js +2 -2
- package/build/modern/components/radio/primitives.js +1 -1
- package/build/modern/components/radio/radio.js +2 -2
- package/build/modern/components/rating/index.js +4 -4
- package/build/modern/components/rating/parts.js +2 -2
- package/build/modern/components/rating/primitives.js +1 -1
- package/build/modern/components/rating/rating.js +4 -4
- package/build/modern/components/select/index.js +9 -9
- package/build/modern/components/select/option-group.js +2 -2
- package/build/modern/components/select/parts.js +2 -2
- package/build/modern/components/select/primitives.js +1 -1
- package/build/modern/components/select/select.js +5 -5
- package/build/modern/components/switch/index.js +4 -4
- package/build/modern/components/switch/parts.js +2 -2
- package/build/modern/components/switch/primitives.js +1 -1
- package/build/modern/components/switch/switch.js +3 -3
- package/build/modern/components/table/index.js +6 -6
- package/build/modern/components/table/parts.js +2 -2
- package/build/modern/components/table/primitives.js +1 -1
- package/build/modern/components/table/table.js +3 -3
- package/build/modern/components/tabs/index.js +3 -3
- package/build/modern/components/tabs/parts.js +2 -2
- package/build/modern/components/tabs/primitives.js +1 -1
- package/build/modern/components/tabs/tabs.js +3 -3
- package/build/modern/components/toggle/index.js +2 -2
- package/build/modern/components/toggle/parts.js +2 -2
- package/build/modern/components/toggle/primitives.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/config/icons/checkbox.icons.d.ts +0 -2
- package/build/modern/config/icons/checkbox.icons.js +1 -1
- package/build/modern/config/index.js +3 -3
- package/build/modern/context/confirm-modal.js +13 -13
- package/build/modern/context/field.js +3 -3
- package/build/modern/context/field.js.map +1 -1
- package/build/modern/context/navMenu.js +1 -1
- package/build/modern/context/prompt-modal.js +20 -20
- package/build/modern/context/theme.js +1 -1
- package/build/modern/hooks/useModal.d.ts +2 -2
- package/build/modern/hooks/useModal.js +23 -3
- package/build/modern/hooks/useModal.js.map +1 -1
- package/build/modern/index.d.ts +20 -30
- package/build/modern/index.js +256 -276
- package/build/modern/index.js.map +1 -1
- package/package.json +14 -12
- package/src/.DS_Store +0 -0
- package/src/aria-helpers/nav-menu.aria.ts +3 -0
- package/src/aria-helpers/trap-focus.aria.ts +4 -1
- package/src/components/.DS_Store +0 -0
- package/src/components/CircularProgress.tsx +2 -2
- package/src/components/FileStatus.tsx +3 -6
- package/src/components/FileUploader.tsx +4 -4
- package/src/components/IconButton.tsx +3 -6
- package/src/components/Menu.tsx +13 -92
- package/src/components/Portal.tsx +6 -6
- package/src/components/ProgressBar.tsx +2 -2
- package/src/components/Show.tsx +13 -11
- package/src/components/Spinner.tsx +3 -4
- package/src/components/Tag.tsx +2 -2
- package/src/components/Text.tsx +3 -6
- package/src/components/Tooltip.tsx +2 -2
- package/src/components/accordion/item-group.tsx +8 -4
- package/src/components/accordion/item-indicator.tsx +1 -1
- package/src/components/accordion/primitives.tsx +2 -5
- package/src/components/admonition/admonition.tsx +3 -3
- package/src/components/admonition/match-avatar.tsx +1 -1
- package/src/components/admonition/primitives.tsx +2 -5
- package/src/components/avatar/avatar.tsx +2 -2
- package/src/components/avatar/primitives.tsx +2 -5
- package/src/components/button/button.tsx +3 -6
- package/src/components/checkbox/checkbox.tsx +1 -1
- package/src/components/checkbox/primitives.tsx +2 -5
- package/src/components/combobox/combobox.tsx +2 -2
- package/src/components/combobox/primitives.tsx +2 -5
- package/src/components/cta-dialog/provider.tsx +2 -2
- package/src/components/cta-dialog/trigger-item.tsx +2 -2
- package/src/components/date-picker/primitives.tsx +63 -15
- package/src/components/date-picker/view-control-group.tsx +1 -1
- package/src/components/deprecated/FieldMessage.tsx +2 -2
- package/src/components/deprecated/FieldsetLabel.tsx +2 -2
- package/src/components/deprecated/Label.tsx +2 -2
- package/src/components/deprecated/Legend.tsx +3 -3
- package/src/components/deprecated/Modal.tsx +8 -14
- package/src/components/deprecated/ModalDescription.tsx +2 -2
- package/src/components/deprecated/ModalHeader.tsx +2 -2
- package/src/components/deprecated/ModalHeading.tsx +2 -2
- package/src/components/deprecated/NavMenuLink.tsx +2 -2
- package/src/components/deprecated/NavMenuList.tsx +3 -3
- package/src/components/deprecated/NavMenuTrigger.tsx +3 -3
- package/src/components/deprecated/Notification.tsx +4 -4
- package/src/components/deprecated/NotificationDescription.tsx +2 -2
- package/src/components/deprecated/NotificationHeading.tsx +2 -2
- package/src/components/dialog/close-icon-trigger.tsx +2 -2
- package/src/components/dialog/dialog.tsx +1 -1
- package/src/components/dialog/primitives.tsx +2 -5
- package/src/components/field/field.tsx +4 -4
- package/src/components/field/primitives.tsx +2 -2
- package/src/components/field/start-indicator.tsx +2 -2
- package/src/components/field/status-indicator.tsx +2 -2
- package/src/components/fieldset/fieldset.tsx +1 -1
- package/src/components/fieldset/primitives.tsx +2 -5
- package/src/components/for.tsx +1 -1
- package/src/components/notifications/center.tsx +8 -4
- package/src/components/notifications/match-icon.tsx +1 -1
- package/src/components/notifications/primitives.tsx +6 -3
- package/src/components/radio/primitives.tsx +2 -5
- package/src/components/radio/radio.tsx +1 -1
- package/src/components/rating/primitives.tsx +2 -2
- package/src/components/rating/rating.tsx +2 -2
- package/src/components/select/primitives.tsx +2 -5
- package/src/components/select/select.tsx +2 -2
- package/src/components/switch/primitives.tsx +7 -4
- package/src/components/switch/switch.tsx +1 -1
- package/src/components/table/primitives.tsx +2 -2
- package/src/components/table/table.tsx +2 -2
- package/src/components/tabs/primitives.tsx +2 -2
- package/src/components/toggle/primitives.tsx +11 -3
- package/src/config/icons/checkbox.icons.tsx +2 -10
- package/src/context/confirm-modal.tsx +3 -3
- package/src/context/field.tsx +2 -4
- package/src/context/navMenu.tsx +8 -8
- package/src/context/prompt-modal.tsx +5 -5
- package/src/context/theme.tsx +1 -3
- package/src/hooks/useModal.ts +1 -1
- package/src/index.ts +2 -7
- package/build/legacy/context/notification-center/store.cjs +0 -66
- package/build/legacy/context/notification-center/store.cjs.map +0 -1
- package/build/legacy/context/notification-center/store.d.cts +0 -5
- package/build/legacy/context/notification-center/types.cjs +0 -19
- package/build/legacy/context/notification-center/types.cjs.map +0 -1
- package/build/legacy/context/notification-center/types.d.cts +0 -6
- package/build/legacy/context/notification-center.cjs +0 -381
- package/build/legacy/context/notification-center.cjs.map +0 -1
- package/build/legacy/context/notification-center.d.cts +0 -5
- package/build/modern/chunk-245SMQ45.js.map +0 -1
- package/build/modern/chunk-2FRF57EU.js.map +0 -1
- package/build/modern/chunk-3XE3QXUI.js.map +0 -1
- package/build/modern/chunk-4GFEWP76.js.map +0 -1
- package/build/modern/chunk-4HUK7YNZ.js.map +0 -1
- package/build/modern/chunk-5DY66QZD.js.map +0 -1
- package/build/modern/chunk-5RTNSVYU.js.map +0 -1
- package/build/modern/chunk-63F5MURH.js.map +0 -1
- package/build/modern/chunk-6QHOKCV3.js.map +0 -1
- package/build/modern/chunk-6WEW5OGL.js.map +0 -1
- package/build/modern/chunk-6WS765J3.js.map +0 -1
- package/build/modern/chunk-7HKULJ4G.js.map +0 -1
- package/build/modern/chunk-7JHQVQPS.js.map +0 -1
- package/build/modern/chunk-7OYOT5LK.js.map +0 -1
- package/build/modern/chunk-7SYJFI5E.js.map +0 -1
- package/build/modern/chunk-A464YKEL.js.map +0 -1
- package/build/modern/chunk-AIJ75ENY.js.map +0 -1
- package/build/modern/chunk-AO3GB72J.js.map +0 -1
- package/build/modern/chunk-AUALRL3U.js +0 -25
- package/build/modern/chunk-AUALRL3U.js.map +0 -1
- package/build/modern/chunk-BPRF34DU.js.map +0 -1
- package/build/modern/chunk-BUVVRQLZ.js +0 -15
- package/build/modern/chunk-BUVVRQLZ.js.map +0 -1
- package/build/modern/chunk-CIMY2U22.js +0 -10
- package/build/modern/chunk-CIMY2U22.js.map +0 -1
- package/build/modern/chunk-CNA2VKAH.js.map +0 -1
- package/build/modern/chunk-CPNKDKC2.js.map +0 -1
- package/build/modern/chunk-CYSLIGNU.js.map +0 -1
- package/build/modern/chunk-D7MAAGNA.js.map +0 -1
- package/build/modern/chunk-D7UIWAFO.js.map +0 -1
- package/build/modern/chunk-DEXJQ6UI.js.map +0 -1
- package/build/modern/chunk-DRDNNRU3.js.map +0 -1
- package/build/modern/chunk-DXOKSZVQ.js +0 -12
- package/build/modern/chunk-DYQBRCZC.js.map +0 -1
- package/build/modern/chunk-E3PAEB7Y.js.map +0 -1
- package/build/modern/chunk-IHQSE4LR.js +0 -78
- package/build/modern/chunk-IHQSE4LR.js.map +0 -1
- package/build/modern/chunk-IPC7LQ4Q.js.map +0 -1
- package/build/modern/chunk-IQJDVFPP.js +0 -10
- package/build/modern/chunk-IQJDVFPP.js.map +0 -1
- package/build/modern/chunk-JF76VIL3.js.map +0 -1
- package/build/modern/chunk-JIZQFTW6.js.map +0 -1
- package/build/modern/chunk-JLUIGY2U.js.map +0 -1
- package/build/modern/chunk-JWF7FK7T.js.map +0 -1
- package/build/modern/chunk-KGQG5JGW.js +0 -27
- package/build/modern/chunk-KGQG5JGW.js.map +0 -1
- package/build/modern/chunk-KJMCUYWV.js.map +0 -1
- package/build/modern/chunk-L7N24B6B.js.map +0 -1
- package/build/modern/chunk-LLZE2RBB.js.map +0 -1
- package/build/modern/chunk-LMBMMBKU.js.map +0 -1
- package/build/modern/chunk-LPALHB6R.js.map +0 -1
- package/build/modern/chunk-LZWNHXRP.js.map +0 -1
- package/build/modern/chunk-MH6CIBDU.js.map +0 -1
- package/build/modern/chunk-MZMZAX4E.js.map +0 -1
- package/build/modern/chunk-N4RPMT6J.js.map +0 -1
- package/build/modern/chunk-NMDAHO2K.js.map +0 -1
- package/build/modern/chunk-NR5XDIJ7.js.map +0 -1
- package/build/modern/chunk-OSAYA6GH.js.map +0 -1
- package/build/modern/chunk-Q3I4H6EC.js +0 -21
- package/build/modern/chunk-Q3I4H6EC.js.map +0 -1
- package/build/modern/chunk-QCBLRACK.js.map +0 -1
- package/build/modern/chunk-QJ3CJ4CR.js +0 -22
- package/build/modern/chunk-QJ3CJ4CR.js.map +0 -1
- package/build/modern/chunk-QQCB6JXW.js.map +0 -1
- package/build/modern/chunk-R7IDIIST.js.map +0 -1
- package/build/modern/chunk-RD2YPFRA.js.map +0 -1
- package/build/modern/chunk-RKGFPKKK.js.map +0 -1
- package/build/modern/chunk-RU5LOXWI.js.map +0 -1
- package/build/modern/chunk-RUR5MV54.js.map +0 -1
- package/build/modern/chunk-SRNDDY5D.js.map +0 -1
- package/build/modern/chunk-STLN7BMJ.js.map +0 -1
- package/build/modern/chunk-SWX5JWZR.js +0 -12
- package/build/modern/chunk-SWX5JWZR.js.map +0 -1
- package/build/modern/chunk-TNSIYRF7.js.map +0 -1
- package/build/modern/chunk-UCL7P2OG.js.map +0 -1
- package/build/modern/chunk-V3M3ZOQI.js +0 -38
- package/build/modern/chunk-V3M3ZOQI.js.map +0 -1
- package/build/modern/chunk-V6LNXFJV.js +0 -16
- package/build/modern/chunk-V6LNXFJV.js.map +0 -1
- package/build/modern/chunk-VHCJ25QC.js.map +0 -1
- package/build/modern/chunk-VNPLKMEM.js.map +0 -1
- package/build/modern/chunk-W47QEZD5.js.map +0 -1
- package/build/modern/chunk-WECB67DC.js +0 -12
- package/build/modern/chunk-WECB67DC.js.map +0 -1
- package/build/modern/chunk-XVOEBY5S.js.map +0 -1
- package/build/modern/chunk-YOTXFCCC.js.map +0 -1
- package/build/modern/chunk-Z3FDG263.js.map +0 -1
- package/build/modern/chunk-Z52R6ABJ.js.map +0 -1
- package/build/modern/context/notification-center/store.d.ts +0 -5
- package/build/modern/context/notification-center/store.js +0 -15
- package/build/modern/context/notification-center/store.js.map +0 -1
- package/build/modern/context/notification-center/types.d.ts +0 -6
- package/build/modern/context/notification-center/types.js +0 -1
- package/build/modern/context/notification-center/types.js.map +0 -1
- package/build/modern/context/notification-center.d.ts +0 -5
- package/build/modern/context/notification-center.js +0 -183
- package/build/modern/context/notification-center.js.map +0 -1
- package/src/context/notification-center/store.ts +0 -88
- package/src/context/notification-center/types.ts +0 -28
- package/src/context/notification-center.tsx +0 -257
- /package/build/modern/{chunk-R4KLHRCL.js.map → chunk-25P3FUUT.js.map} +0 -0
- /package/build/modern/{chunk-FZ53535Q.js.map → chunk-2CZWHED6.js.map} +0 -0
- /package/build/modern/{chunk-JAAMD5EH.js.map → chunk-2IYWFZTK.js.map} +0 -0
- /package/build/modern/{chunk-KWZ3CEG6.js.map → chunk-52ZQ26IV.js.map} +0 -0
- /package/build/modern/{chunk-XBUXVNTY.js.map → chunk-5FC7HIAR.js.map} +0 -0
- /package/build/modern/{chunk-TEMFCS72.js.map → chunk-5HEU3SYR.js.map} +0 -0
- /package/build/modern/{chunk-4IXQNNAM.js.map → chunk-6UVR3VGK.js.map} +0 -0
- /package/build/modern/{chunk-6TIMBGFL.js.map → chunk-ADZRQNW3.js.map} +0 -0
- /package/build/modern/{chunk-6HOLE2JH.js.map → chunk-CEJIKL6N.js.map} +0 -0
- /package/build/modern/{chunk-QDXU6G3X.js.map → chunk-D6PFYSIP.js.map} +0 -0
- /package/build/modern/{chunk-EH36PXVP.js.map → chunk-FAQ3F72W.js.map} +0 -0
- /package/build/modern/{chunk-2CVGNLIM.js.map → chunk-GC6JUHVS.js.map} +0 -0
- /package/build/modern/{chunk-IASVL7CW.js.map → chunk-GUAF4FXQ.js.map} +0 -0
- /package/build/modern/{chunk-OS73F4SR.js.map → chunk-GYUCW2QK.js.map} +0 -0
- /package/build/modern/{chunk-BIDE4IJG.js.map → chunk-H4SH6ORP.js.map} +0 -0
- /package/build/modern/{chunk-HUN7VQBT.js.map → chunk-I4EGYD24.js.map} +0 -0
- /package/build/modern/{chunk-32M5JS5F.js.map → chunk-ILROS7ST.js.map} +0 -0
- /package/build/modern/{chunk-SYPAA5YF.js.map → chunk-IUF74GEL.js.map} +0 -0
- /package/build/modern/{chunk-WVFEJCUN.js.map → chunk-J76SGDYP.js.map} +0 -0
- /package/build/modern/{chunk-RQCJKDXU.js.map → chunk-JQYW4IOC.js.map} +0 -0
- /package/build/modern/{chunk-JQJTQVPI.js.map → chunk-KEGLWDD6.js.map} +0 -0
- /package/build/modern/{chunk-KZDEDAIK.js.map → chunk-MTD4JSHT.js.map} +0 -0
- /package/build/modern/{chunk-FUL2VRDU.js.map → chunk-MZXSSTS7.js.map} +0 -0
- /package/build/modern/{chunk-ILSKGNUA.js.map → chunk-N6XHXPBI.js.map} +0 -0
- /package/build/modern/{chunk-LVHQGXJK.js.map → chunk-NP73HOHI.js.map} +0 -0
- /package/build/modern/{chunk-7TQRTBUP.js.map → chunk-NQ22M7U7.js.map} +0 -0
- /package/build/modern/{chunk-V243YFI3.js.map → chunk-NYEUNVKR.js.map} +0 -0
- /package/build/modern/{chunk-MR4DX76C.js.map → chunk-NYVKL2IS.js.map} +0 -0
- /package/build/modern/{chunk-XBDEIBW2.js.map → chunk-QNZIH2KG.js.map} +0 -0
- /package/build/modern/{chunk-M7T3MBFB.js.map → chunk-RT7OJ4X5.js.map} +0 -0
- /package/build/modern/{chunk-BJJ4XAVO.js.map → chunk-RYRB5GPN.js.map} +0 -0
- /package/build/modern/{chunk-FCSO6N2Y.js.map → chunk-V6EAWUCQ.js.map} +0 -0
- /package/build/modern/{chunk-HIC7Z23X.js.map → chunk-V6ZOASMM.js.map} +0 -0
- /package/build/modern/{chunk-YUNLWTUB.js.map → chunk-W337WQTU.js.map} +0 -0
- /package/build/modern/{chunk-XTNGF4D6.js.map → chunk-YOYCS3MD.js.map} +0 -0
- /package/build/modern/{chunk-URO5I5AQ.js.map → chunk-ZL7AX5EM.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FileStatus.tsx","../../../src/context/cerberus.tsx","../../../src/components/ProgressBar.tsx","../../../src/components/IconButton.tsx","../../../src/utils/index.ts","../../../src/components/Show.tsx","../../../src/components/avatar/primitives.tsx","../../../src/components/avatar/parts.ts","../../../src/components/avatar/avatar.tsx","../../../src/components/field/primitives.tsx","../../../src/components/field/field.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { useCerberusContext } from '../context/cerberus'\nimport { ProgressBar, type ProgressBarProps } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport { Avatar } from './avatar/avatar'\nimport { Field, FieldHelperText } from './field/index'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n gradient={modalIconPalette}\n fallback={<MatchFileStatusIcon size={24} status={status} />}\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field label=\"\" invalid={modalIconPalette === 'hades-dark'}>\n <FieldHelperText\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldHelperText>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = icons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-light'\n default:\n return 'charon-light'\n }\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLArkProps<'div'>\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, label, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <ark.div\n {...nativeProps}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"progressbar\"\n >\n <ark.div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </ark.div>\n )\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n type IconButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","import {\n Avatar,\n type AvatarFallbackProps,\n type AvatarImageProps,\n type AvatarRootProps,\n} from '@ark-ui/react/avatar'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides the primitive components for the Avatar component.\n * @module 'avatar/primitives'\n */\n\n/**\n * The root component of the Avatar.\n */\nexport function AvatarRoot(props: AvatarRootProps & AvatarVariantProps) {\n const { gradient, shape, size, ...rootProps } = props\n const styles = avatar({ gradient, shape, size })\n return (\n <Avatar.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The image component of the Avatar.\n */\nexport function AvatarImage(props: AvatarImageProps) {\n const styles = avatar()\n return (\n <Avatar.Image {...props} className={cx(styles.image, props.className)} />\n )\n}\n\n/**\n * The fallback component of the Avatar.\n */\nexport function AvatarFallback(props: AvatarFallbackProps) {\n const styles = avatar()\n return (\n <Avatar.Fallback\n {...props}\n className={cx(styles.fallback, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport { AvatarFallback, AvatarImage, AvatarRoot } from './primitives'\n\n/**\n * This module contains the parts of the Avatar component.\n * @module 'avatar/parts'\n */\n\ninterface AvatarPartsValue {\n /**\n * The context provider of the Avatar.\n */\n Root: ElementType\n /**\n * The image of the Avatar.\n */\n Image: ElementType\n /**\n * The fallback content to display when the image fails to load.\n */\n Fallback: ElementType\n}\n\n/**\n * An Object containing the parts of the Accordion component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the AvatarParts object and\n * the entire family of components vs. only what you use.\n */\nexport const AvatarParts: AvatarPartsValue = {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n}\n","import type { AvatarRootProps } from '@ark-ui/react/avatar'\nimport type { AvatarVariantProps } from '@cerberus/styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils'\nimport { Show } from '../Show'\nimport { AvatarParts } from './parts'\n\n/**\n * This module provides an abstraction of the Avatar primitives.\n * @module 'avatar'\n */\n\nexport interface AvatarWithoutImage\n extends AvatarRootProps,\n AvatarVariantProps {\n alt?: never\n src?: never\n fallback?: ReactNode\n}\n\nexport interface AvatarWithImage extends AvatarRootProps, AvatarVariantProps {\n alt: string\n src: string\n fallback?: ReactNode\n}\n\n/**\n * Avatar component is an abstraction of the primitives that displays a\n * avatar or it's fallback when the image fails to load.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference)\n */\nexport function Avatar(props: AvatarWithoutImage | AvatarWithImage) {\n const [imgProps, { fallback, children }, rootProps] = splitProps(\n props,\n ['alt', 'src'],\n ['fallback', 'children'],\n )\n\n return (\n <AvatarParts.Root {...rootProps}>\n <Show\n when={Boolean(children)}\n fallback={\n <>\n <AvatarParts.Fallback>{fallback}</AvatarParts.Fallback>\n <AvatarParts.Image {...imgProps} />\n </>\n }\n >\n {children}\n </Show>\n </AvatarParts.Root>\n )\n}\n","import {\n Field,\n type FieldHelperTextProps,\n type FieldInputProps as ArkFieldInputProps,\n type FieldLabelProps,\n type FieldRootProps as ArkFieldRootProps,\n type FieldTextareaProps,\n} from '@ark-ui/react/field'\nimport type { ReactNode } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field, type FieldVariantProps } from '@cerberus/styled-system/recipes'\nimport { FieldStatusIndicator } from './status-indicator'\nimport { FieldStartIndicator } from './start-indicator'\n\n/**\n * This module contains all the primitives of the Field component.\n * @module 'field'\n */\n\nexport type FieldRootProps = ArkFieldRootProps & FieldVariantProps\n\n/**\n * The context & container for the Field components.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot required ids={{ input: 'exampleId' }}>\n * <FieldLabel>Label</FieldLabel>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldRoot(props: FieldRootProps) {\n const { size, ...fieldProps } = props\n const styles = field({ size })\n return (\n <Field.Root\n {...fieldProps}\n className={cx(styles.root, fieldProps.className)}\n />\n )\n}\n\n/**\n * The label for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldLabel>Label</FieldLabel>\n * </FieldRoot>\n * ```\n */\nexport function FieldLabel(props: FieldLabelProps) {\n const { children, ...nativeProps } = props\n const styles = field()\n return (\n <Field.Label {...nativeProps} className={cx(styles.label, props.className)}>\n {children}\n <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n </Field.Label>\n )\n}\n\n/**\n * The required indicator for the Field component.\n */\nexport function FieldRequiredIndicator() {\n return <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n}\n\nexport interface FieldInputProps\n extends Omit<ArkFieldInputProps, 'size'>,\n FieldVariantProps {\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\n\n/**\n * The input for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldInput(props: FieldInputProps) {\n const { size, startIcon, endIcon, ...fieldProps } = props\n const styles = field({ size })\n const hasStartIcon = Boolean(startIcon)\n\n return (\n <div className={styles.inputRoot}>\n <FieldStartIndicator>{startIcon}</FieldStartIndicator>\n <Field.Input\n {...fieldProps}\n {...(hasStartIcon && { 'data-has': 'start-indicator' })}\n className={cx(styles.input, fieldProps.className)}\n />\n <FieldStatusIndicator fallback={endIcon} />\n </div>\n )\n}\n\n/**\n * The helper text for the Field component that is shown when the field is\n * valid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldHelperText>Helper text</FieldHelperText>\n * </FieldRoot>\n * ```\n */\nexport function FieldHelperText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.HelperText\n {...props}\n className={cx(styles.helperText, props.className)}\n />\n )\n}\n\n/**\n * The error text for the Field component that is shown when the field is\n * invalid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldErrorText>Error text</FieldErrorText>\n * </FieldRoot>\n * ```\n */\nexport function FieldErrorText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n\n/**\n * The textarea for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldTextarea />\n * </FieldRoot>\n * ```\n */\nexport function FieldTextarea(props: FieldTextareaProps) {\n const styles = field()\n return (\n <Field.Textarea\n {...props}\n className={cx(styles.textarea, props.className)}\n />\n )\n}\n\n/**\n * A named export for the FieldInput component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Input } from '@cerberus/react'\n *\n * <Field\n * ids={{\n * control: 'email',\n * }}\n * label=\"Enter your email\"\n * helperText=\"We'll never share your email with anyone else.\"\n * errorText=\"Email is required.\"\n * required\n * >\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nexport const Input = FieldInput\nexport const Textarea = FieldTextarea\n","import { type FieldRootProps } from '@ark-ui/react/field'\nimport { splitProps } from '../../utils/index'\nimport {\n FieldErrorText,\n FieldHelperText,\n FieldLabel,\n FieldRoot,\n} from './primitives'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { Show } from '../Show'\n\nexport interface FieldProps extends FieldRootProps {\n /**\n * The label of the field.\n */\n label?: string\n /**\n * The helper text of the field.\n */\n helperText?: string\n /**\n * A helper text positioned at the end of the field. Good for Textarea fields.\n */\n secondaryHelperText?: string\n /**\n * The error text of the field. Shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * The Field component is the context provider for all FieldParts and displays\n * the label, helperText, and ErrorText.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <Field\n * ids={{\n * control: 'firstName',\n * }}\n * label=\"Label\"\n * helperText=\"This is what people will see on your profile.\"\n * errorText=\"A first name is required to create an account.\"\n * required\n * >\n * <Input name=\"firstName\" type=\"text\" />\n * </Field>\n * ```\n */\nexport function Field(props: FieldProps) {\n const [statusProps, fieldProps, rootProps] = splitProps(\n props,\n ['disabled', 'required', 'readOnly', 'invalid'],\n ['label', 'helperText', 'secondaryHelperText', 'errorText', 'children'],\n )\n\n return (\n <FieldRoot {...statusProps} {...rootProps}>\n <Show when={Boolean(fieldProps.label)}>\n <FieldLabel>{fieldProps.label}</FieldLabel>\n </Show>\n\n {fieldProps.children}\n\n <Show when={Boolean(fieldProps.helperText && !statusProps.invalid)}>\n <HStack justifyContent=\"space-between\" w=\"full\">\n <FieldHelperText>{fieldProps.helperText}</FieldHelperText>\n <Show when={Boolean(fieldProps.secondaryHelperText)}>\n <FieldHelperText>{fieldProps.secondaryHelperText}</FieldHelperText>\n </Show>\n </HStack>\n </Show>\n\n <FieldErrorText>{fieldProps.errorText}</FieldErrorText>\n </FieldRoot>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAKO;AACP,IAAAC,kBAGO;AACP,IAAAC,cAAwB;AACxB,sBAA+B;;;ACX/B,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAGO;AA0ED,IAAAC,sBAAA;AAlBC,SAAS,YAAY,OAAyB;AACnD,QAAM,EAAE,eAAe,MAAM,OAAO,KAAK,OAAO,GAAG,YAAY,IAAI;AACnE,QAAM,aAAS,4BAAY,EAAE,MAAM,MAAM,CAAC;AAC1C,QAAM,aAAa,KAAK,IAAI,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H,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,YAAM,IAAI,MAAM,gBAAgB;AAAA,EACpC;AACF;AAEA,SAAS,kBAAkB,OAA0B;AACnD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,OAAO,WAAW,MAAM,UAAU,QAAQ,UAAU,IAAI;AAChE,UAAQ,MAAM,QAAQ;AAAA,IACpB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,6CAAC,aAAU;AAAA,IACpB,KAAK;AACH,aAAO,6CAAC,YAAS;AAAA,IACnB,KAAK;AACH,aAAO,6CAAC,aAAU;AAAA,IACpB;AACE,YAAM,IAAI,MAAM,gBAAgB;AAAA,EACpC;AACF;AAEA,SAAS,qBAAqB,QAAuB;AACnD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,WAAW,QAAuB;AACzC,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,oBAAoB,QAAuB;AAClD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":["import_react","import_recipes","import_css","import_jsx_runtime","import_factory","import_css","import_recipes","import_jsx_runtime","import_react","import_recipes","import_css","import_jsx_runtime","import_jsx_runtime","Avatar","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","Field","import_jsx_runtime","processStatus","Avatar","Field"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/FileStatus.tsx","../../../src/context/cerberus.tsx","../../../src/components/ProgressBar.tsx","../../../src/components/IconButton.tsx","../../../src/utils/index.ts","../../../src/components/Show.tsx","../../../src/components/avatar/primitives.tsx","../../../src/components/avatar/parts.ts","../../../src/components/avatar/avatar.tsx","../../../src/components/field/primitives.tsx","../../../src/components/field/field.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport { fileStatus, type FileStatusVariantProps } from 'styled-system/recipes'\nimport { css, cx } from 'styled-system/css'\nimport { hstack, vstack } from 'styled-system/patterns'\nimport { useCerberusContext } from '../context/cerberus'\nimport { ProgressBar, type ProgressBarProps } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport { Avatar } from './avatar/avatar'\nimport { Field, FieldHelperText } from './field/index'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n gradient={modalIconPalette}\n fallback={<MatchFileStatusIcon size={24} status={status} />}\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field label=\"\" invalid={modalIconPalette === 'hades-dark'}>\n <FieldHelperText\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldHelperText>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = icons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-light'\n default:\n return 'charon-light'\n }\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from 'styled-system/recipes'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLArkProps<'div'>\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, label, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <ark.div\n {...nativeProps}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"progressbar\"\n >\n <ark.div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </ark.div>\n )\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import { type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps<T> {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: T | boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show<T>(props: PropsWithChildren<ShowProps<T>>) {\n const { when, children, fallback } = props\n\n if (when) {\n return <>{children}</>\n }\n\n if (fallback) {\n return <>{fallback}</>\n }\n\n return null\n}\n","import {\n Avatar,\n type AvatarFallbackProps,\n type AvatarImageProps,\n type AvatarRootProps,\n} from '@ark-ui/react/avatar'\nimport { avatar, type AvatarVariantProps } from 'styled-system/recipes'\nimport { cx } from 'styled-system/css'\n\n/**\n * This module provides the primitive components for the Avatar component.\n * @module 'avatar/primitives'\n */\n\n/**\n * The root component of the Avatar.\n */\nexport function AvatarRoot(props: AvatarRootProps & AvatarVariantProps) {\n const { gradient, shape, size, ...rootProps } = props\n const styles = avatar({ gradient, shape, size })\n return (\n <Avatar.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The image component of the Avatar.\n */\nexport function AvatarImage(props: AvatarImageProps) {\n const styles = avatar()\n return (\n <Avatar.Image {...props} className={cx(styles.image, props.className)} />\n )\n}\n\n/**\n * The fallback component of the Avatar.\n */\nexport function AvatarFallback(props: AvatarFallbackProps) {\n const styles = avatar()\n return (\n <Avatar.Fallback\n {...props}\n className={cx(styles.fallback, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport { AvatarFallback, AvatarImage, AvatarRoot } from './primitives'\n\n/**\n * This module contains the parts of the Avatar component.\n * @module 'avatar/parts'\n */\n\ninterface AvatarPartsValue {\n /**\n * The context provider of the Avatar.\n */\n Root: ElementType\n /**\n * The image of the Avatar.\n */\n Image: ElementType\n /**\n * The fallback content to display when the image fails to load.\n */\n Fallback: ElementType\n}\n\n/**\n * An Object containing the parts of the Accordion component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the AvatarParts object and\n * the entire family of components vs. only what you use.\n */\nexport const AvatarParts: AvatarPartsValue = {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n}\n","import type { AvatarRootProps } from '@ark-ui/react/avatar'\nimport type { AvatarVariantProps } from 'styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils'\nimport { Show } from '../Show'\nimport { AvatarParts } from './parts'\n\n/**\n * This module provides an abstraction of the Avatar primitives.\n * @module 'avatar'\n */\n\nexport interface AvatarWithoutImage\n extends AvatarRootProps,\n AvatarVariantProps {\n alt?: never\n src?: never\n fallback?: ReactNode\n}\n\nexport interface AvatarWithImage extends AvatarRootProps, AvatarVariantProps {\n alt: string\n src: string\n fallback?: ReactNode\n}\n\n/**\n * Avatar component is an abstraction of the primitives that displays a\n * avatar or it's fallback when the image fails to load.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference)\n */\nexport function Avatar(props: AvatarWithoutImage | AvatarWithImage) {\n const [imgProps, { fallback, children }, rootProps] = splitProps(\n props,\n ['alt', 'src'],\n ['fallback', 'children'],\n )\n\n return (\n <AvatarParts.Root {...rootProps}>\n <Show\n when={children}\n fallback={\n <>\n <AvatarParts.Fallback>{fallback}</AvatarParts.Fallback>\n <AvatarParts.Image {...imgProps} />\n </>\n }\n >\n {children}\n </Show>\n </AvatarParts.Root>\n )\n}\n","import {\n Field,\n type FieldHelperTextProps,\n type FieldInputProps as ArkFieldInputProps,\n type FieldLabelProps,\n type FieldRootProps as ArkFieldRootProps,\n type FieldTextareaProps,\n} from '@ark-ui/react/field'\nimport type { ReactNode } from 'react'\nimport { cx } from 'styled-system/css'\nimport { field, type FieldVariantProps } from 'styled-system/recipes'\nimport { FieldStatusIndicator } from './status-indicator'\nimport { FieldStartIndicator } from './start-indicator'\n\n/**\n * This module contains all the primitives of the Field component.\n * @module 'field'\n */\n\nexport type FieldRootProps = ArkFieldRootProps & FieldVariantProps\n\n/**\n * The context & container for the Field components.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot required ids={{ input: 'exampleId' }}>\n * <FieldLabel>Label</FieldLabel>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldRoot(props: FieldRootProps) {\n const { size, ...fieldProps } = props\n const styles = field({ size })\n return (\n <Field.Root\n {...fieldProps}\n className={cx(styles.root, fieldProps.className)}\n />\n )\n}\n\n/**\n * The label for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldLabel>Label</FieldLabel>\n * </FieldRoot>\n * ```\n */\nexport function FieldLabel(props: FieldLabelProps) {\n const { children, ...nativeProps } = props\n const styles = field()\n return (\n <Field.Label {...nativeProps} className={cx(styles.label, props.className)}>\n {children}\n <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n </Field.Label>\n )\n}\n\n/**\n * The required indicator for the Field component.\n */\nexport function FieldRequiredIndicator() {\n return <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n}\n\nexport interface FieldInputProps\n extends Omit<ArkFieldInputProps, 'size'>,\n FieldVariantProps {\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\n\n/**\n * The input for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldInput(props: FieldInputProps) {\n const { size, startIcon, endIcon, ...fieldProps } = props\n const styles = field({ size })\n const hasStartIcon = Boolean(startIcon)\n\n return (\n <div className={styles.inputRoot}>\n <FieldStartIndicator>{startIcon}</FieldStartIndicator>\n <Field.Input\n {...fieldProps}\n {...(hasStartIcon && { 'data-has': 'start-indicator' })}\n className={cx(styles.input, fieldProps.className)}\n />\n <FieldStatusIndicator fallback={endIcon} />\n </div>\n )\n}\n\n/**\n * The helper text for the Field component that is shown when the field is\n * valid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldHelperText>Helper text</FieldHelperText>\n * </FieldRoot>\n * ```\n */\nexport function FieldHelperText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.HelperText\n {...props}\n className={cx(styles.helperText, props.className)}\n />\n )\n}\n\n/**\n * The error text for the Field component that is shown when the field is\n * invalid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldErrorText>Error text</FieldErrorText>\n * </FieldRoot>\n * ```\n */\nexport function FieldErrorText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n\n/**\n * The textarea for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldTextarea />\n * </FieldRoot>\n * ```\n */\nexport function FieldTextarea(props: FieldTextareaProps) {\n const styles = field()\n return (\n <Field.Textarea\n {...props}\n className={cx(styles.textarea, props.className)}\n />\n )\n}\n\n/**\n * A named export for the FieldInput component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Input } from '@cerberus/react'\n *\n * <Field\n * ids={{\n * control: 'email',\n * }}\n * label=\"Enter your email\"\n * helperText=\"We'll never share your email with anyone else.\"\n * errorText=\"Email is required.\"\n * required\n * >\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nexport const Input = FieldInput\nexport const Textarea = FieldTextarea\n","import { type FieldRootProps } from '@ark-ui/react/field'\nimport { splitProps } from '../../utils/index'\nimport {\n FieldErrorText,\n FieldHelperText,\n FieldLabel,\n FieldRoot,\n} from './primitives'\nimport { HStack } from 'styled-system/jsx'\nimport { Show } from '../Show'\n\nexport interface FieldProps extends FieldRootProps {\n /**\n * The label of the field.\n */\n label?: string\n /**\n * The helper text of the field.\n */\n helperText?: string\n /**\n * A helper text positioned at the end of the field. Good for Textarea fields.\n */\n secondaryHelperText?: string\n /**\n * The error text of the field. Shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * The Field component is the context provider for all FieldParts and displays\n * the label, helperText, and ErrorText.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <Field\n * ids={{\n * control: 'firstName',\n * }}\n * label=\"Label\"\n * helperText=\"This is what people will see on your profile.\"\n * errorText=\"A first name is required to create an account.\"\n * required\n * >\n * <Input name=\"firstName\" type=\"text\" />\n * </Field>\n * ```\n */\nexport function Field(props: FieldProps) {\n const [statusProps, fieldProps, rootProps] = splitProps(\n props,\n ['disabled', 'required', 'readOnly', 'invalid'],\n ['label', 'helperText', 'secondaryHelperText', 'errorText', 'children'],\n )\n\n return (\n <FieldRoot {...statusProps} {...rootProps}>\n <Show when={fieldProps.label}>\n <FieldLabel>{fieldProps.label}</FieldLabel>\n </Show>\n\n {fieldProps.children}\n\n <Show when={fieldProps.helperText && !statusProps.invalid}>\n <HStack justifyContent=\"space-between\" w=\"full\">\n <FieldHelperText>{fieldProps.helperText}</FieldHelperText>\n <Show when={fieldProps.secondaryHelperText}>\n <FieldHelperText>{fieldProps.secondaryHelperText}</FieldHelperText>\n </Show>\n </HStack>\n </Show>\n\n <FieldErrorText>{fieldProps.errorText}</FieldErrorText>\n </FieldRoot>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,gBAKO;AACP,IAAAC,kBAAwD;AACxD,IAAAC,cAAwB;AACxB,sBAA+B;;;ACR/B,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAGO;AA0ED,IAAAC,sBAAA;AAlBC,SAAS,YAAY,OAAyB;AACnD,QAAM,EAAE,eAAe,MAAM,OAAO,KAAK,OAAO,GAAG,YAAY,IAAI;AACnE,QAAM,aAAS,4BAAY,EAAE,MAAM,MAAM,CAAC;AAC1C,QAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,CAAC;AACtD,QAAM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AM,EAAE,OAAO,WAAW,MAAM,UAAU,QAAQ,UAAU,IAAI;AAChE,UAAQ,MAAM,QAAQ;AAAA,IACpB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,6CAAC,aAAU;AAAA,IACpB,KAAK;AACH,aAAO,6CAAC,YAAS;AAAA,IACnB,KAAK;AACH,aAAO,6CAAC,aAAU;AAAA,IACpB;AACE,YAAM,IAAI,MAAM,gBAAgB;AAAA,EACpC;AACF;AAEA,SAAS,qBAAqB,QAAuB;AACnD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,WAAW,QAAuB;AACzC,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,oBAAoB,QAAuB;AAClD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":["import_react","import_recipes","import_css","import_jsx_runtime","import_factory","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_jsx_runtime","Avatar","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","Field","import_jsx_runtime","processStatus","Avatar","Field"]}
|
|
@@ -24,29 +24,31 @@ __export(FileUploader_exports, {
|
|
|
24
24
|
FileUploader: () => FileUploader
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(FileUploader_exports);
|
|
27
|
-
var import_css2 = require("
|
|
28
|
-
var import_patterns = require("
|
|
27
|
+
var import_css2 = require("styled-system/css");
|
|
28
|
+
var import_patterns = require("styled-system/patterns");
|
|
29
29
|
|
|
30
30
|
// src/components/Show.tsx
|
|
31
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
function Show(props) {
|
|
33
33
|
const { when, children, fallback } = props;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
if (when) {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
36
|
+
}
|
|
37
|
+
if (fallback) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: fallback });
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
// src/components/FileUploader.tsx
|
|
42
|
-
var import_recipes2 = require("
|
|
44
|
+
var import_recipes2 = require("styled-system/recipes");
|
|
43
45
|
|
|
44
46
|
// src/context/cerberus.tsx
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var CerberusContext = (0,
|
|
47
|
+
var import_react = require("react");
|
|
48
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
49
|
+
var CerberusContext = (0, import_react.createContext)(null);
|
|
48
50
|
function useCerberusContext() {
|
|
49
|
-
const context = (0,
|
|
51
|
+
const context = (0, import_react.useContext)(CerberusContext);
|
|
50
52
|
if (!context) {
|
|
51
53
|
throw new Error("useCerberus must be used within a CerberusProvider");
|
|
52
54
|
}
|
|
@@ -75,13 +77,13 @@ function splitProps(props, ...keyGroups) {
|
|
|
75
77
|
|
|
76
78
|
// src/components/avatar/primitives.tsx
|
|
77
79
|
var import_avatar = require("@ark-ui/react/avatar");
|
|
78
|
-
var import_recipes = require("
|
|
79
|
-
var import_css = require("
|
|
80
|
-
var
|
|
80
|
+
var import_recipes = require("styled-system/recipes");
|
|
81
|
+
var import_css = require("styled-system/css");
|
|
82
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
81
83
|
function AvatarRoot(props) {
|
|
82
84
|
const { gradient, shape, size, ...rootProps } = props;
|
|
83
85
|
const styles = (0, import_recipes.avatar)({ gradient, shape, size });
|
|
84
|
-
return /* @__PURE__ */ (0,
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
85
87
|
import_avatar.Avatar.Root,
|
|
86
88
|
{
|
|
87
89
|
...rootProps,
|
|
@@ -91,11 +93,11 @@ function AvatarRoot(props) {
|
|
|
91
93
|
}
|
|
92
94
|
function AvatarImage(props) {
|
|
93
95
|
const styles = (0, import_recipes.avatar)();
|
|
94
|
-
return /* @__PURE__ */ (0,
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_avatar.Avatar.Image, { ...props, className: (0, import_css.cx)(styles.image, props.className) });
|
|
95
97
|
}
|
|
96
98
|
function AvatarFallback(props) {
|
|
97
99
|
const styles = (0, import_recipes.avatar)();
|
|
98
|
-
return /* @__PURE__ */ (0,
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
99
101
|
import_avatar.Avatar.Fallback,
|
|
100
102
|
{
|
|
101
103
|
...props,
|
|
@@ -112,20 +114,20 @@ var AvatarParts = {
|
|
|
112
114
|
};
|
|
113
115
|
|
|
114
116
|
// src/components/avatar/avatar.tsx
|
|
115
|
-
var
|
|
117
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
116
118
|
function Avatar2(props) {
|
|
117
119
|
const [imgProps, { fallback, children }, rootProps] = splitProps(
|
|
118
120
|
props,
|
|
119
121
|
["alt", "src"],
|
|
120
122
|
["fallback", "children"]
|
|
121
123
|
);
|
|
122
|
-
return /* @__PURE__ */ (0,
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AvatarParts.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
123
125
|
Show,
|
|
124
126
|
{
|
|
125
|
-
when:
|
|
126
|
-
fallback: /* @__PURE__ */ (0,
|
|
127
|
-
/* @__PURE__ */ (0,
|
|
128
|
-
/* @__PURE__ */ (0,
|
|
127
|
+
when: children,
|
|
128
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AvatarParts.Fallback, { children: fallback }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AvatarParts.Image, { ...imgProps })
|
|
129
131
|
] }),
|
|
130
132
|
children
|
|
131
133
|
}
|
|
@@ -133,13 +135,13 @@ function Avatar2(props) {
|
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
// src/components/FileUploader.tsx
|
|
136
|
-
var
|
|
138
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
137
139
|
function FileUploader(props) {
|
|
138
140
|
var _a;
|
|
139
141
|
const { icons } = useCerberusContext();
|
|
140
142
|
const styles = (0, import_recipes2.fileUploader)();
|
|
141
143
|
const { waitingFileUploader: Icon } = icons;
|
|
142
|
-
return /* @__PURE__ */ (0,
|
|
144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
143
145
|
"div",
|
|
144
146
|
{
|
|
145
147
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
@@ -150,8 +152,8 @@ function FileUploader(props) {
|
|
|
150
152
|
styles.container
|
|
151
153
|
),
|
|
152
154
|
children: [
|
|
153
|
-
/* @__PURE__ */ (0,
|
|
154
|
-
/* @__PURE__ */ (0,
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Avatar2, { gradient: "charon-light", fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, {}) }) }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
155
157
|
"label",
|
|
156
158
|
{
|
|
157
159
|
className: (0, import_css2.cx)(
|
|
@@ -162,12 +164,12 @@ function FileUploader(props) {
|
|
|
162
164
|
),
|
|
163
165
|
htmlFor: props.name,
|
|
164
166
|
children: [
|
|
165
|
-
/* @__PURE__ */ (0,
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Show, { when: props.heading, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
166
168
|
"Import ",
|
|
167
169
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
168
170
|
" files",
|
|
169
|
-
/* @__PURE__ */ (0,
|
|
170
|
-
/* @__PURE__ */ (0,
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
171
173
|
"input",
|
|
172
174
|
{
|
|
173
175
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FileUploader.tsx","../../../src/components/Show.tsx","../../../src/context/cerberus.tsx","../../../src/utils/index.ts","../../../src/components/avatar/primitives.tsx","../../../src/components/avatar/parts.ts","../../../src/components/avatar/avatar.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Avatar } from './avatar/avatar'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n /**\n * The optional heading to display in the FileUploader component.\n */\n heading?: string\n /**\n * The name of the file input element.\n */\n name: string\n /**\n * Disable the FileUploader component. Good for single-use file uploads.\n */\n disabled?: boolean\n}\n\n/**\n * A component that allows the user to upload files.\n * @see https://cerberus.digitalu.design/react/file-uploader\n */\nexport function FileUploader(props: FileUploaderProps) {\n const { icons } = useCerberusContext()\n const styles = fileUploader()\n const { waitingFileUploader: Icon } = icons\n\n return (\n <div\n {...(props.disabled ? { 'aria-disabled': true } : {})}\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <div className={styles.icon}>\n <Avatar gradient=\"charon-light\" fallback={<Icon />} />\n </div>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import {\n Avatar,\n type AvatarFallbackProps,\n type AvatarImageProps,\n type AvatarRootProps,\n} from '@ark-ui/react/avatar'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides the primitive components for the Avatar component.\n * @module 'avatar/primitives'\n */\n\n/**\n * The root component of the Avatar.\n */\nexport function AvatarRoot(props: AvatarRootProps & AvatarVariantProps) {\n const { gradient, shape, size, ...rootProps } = props\n const styles = avatar({ gradient, shape, size })\n return (\n <Avatar.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The image component of the Avatar.\n */\nexport function AvatarImage(props: AvatarImageProps) {\n const styles = avatar()\n return (\n <Avatar.Image {...props} className={cx(styles.image, props.className)} />\n )\n}\n\n/**\n * The fallback component of the Avatar.\n */\nexport function AvatarFallback(props: AvatarFallbackProps) {\n const styles = avatar()\n return (\n <Avatar.Fallback\n {...props}\n className={cx(styles.fallback, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport { AvatarFallback, AvatarImage, AvatarRoot } from './primitives'\n\n/**\n * This module contains the parts of the Avatar component.\n * @module 'avatar/parts'\n */\n\ninterface AvatarPartsValue {\n /**\n * The context provider of the Avatar.\n */\n Root: ElementType\n /**\n * The image of the Avatar.\n */\n Image: ElementType\n /**\n * The fallback content to display when the image fails to load.\n */\n Fallback: ElementType\n}\n\n/**\n * An Object containing the parts of the Accordion component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the AvatarParts object and\n * the entire family of components vs. only what you use.\n */\nexport const AvatarParts: AvatarPartsValue = {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n}\n","import type { AvatarRootProps } from '@ark-ui/react/avatar'\nimport type { AvatarVariantProps } from '@cerberus/styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils'\nimport { Show } from '../Show'\nimport { AvatarParts } from './parts'\n\n/**\n * This module provides an abstraction of the Avatar primitives.\n * @module 'avatar'\n */\n\nexport interface AvatarWithoutImage\n extends AvatarRootProps,\n AvatarVariantProps {\n alt?: never\n src?: never\n fallback?: ReactNode\n}\n\nexport interface AvatarWithImage extends AvatarRootProps, AvatarVariantProps {\n alt: string\n src: string\n fallback?: ReactNode\n}\n\n/**\n * Avatar component is an abstraction of the primitives that displays a\n * avatar or it's fallback when the image fails to load.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference)\n */\nexport function Avatar(props: AvatarWithoutImage | AvatarWithImage) {\n const [imgProps, { fallback, children }, rootProps] = splitProps(\n props,\n ['alt', 'src'],\n ['fallback', 'children'],\n )\n\n return (\n <AvatarParts.Root {...rootProps}>\n <Show\n when={Boolean(children)}\n fallback={\n <>\n <AvatarParts.Fallback>{fallback}</AvatarParts.Fallback>\n <AvatarParts.Image {...imgProps} />\n </>\n }\n >\n {children}\n </Show>\n </AvatarParts.Root>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,cAAmB;AACnB,sBAAuB;;;ACDvB,mBAAgE;AA4BzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,sBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,sBAAQ,MAAM;AACnB,QAAI,UAAW,QAAO;AACtB,WAAO,YAAY;AAAA,EACrB,GAAG,CAAC,WAAW,UAAU,QAAQ,CAAC;AACpC;;;ADhCA,IAAAC,kBAA6B;;;AEJ7B,IAAAC,gBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,6BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,0BAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;ACjBO,SAAS,WACd,UACG,WAC0B;AAC7B,QAAM,SAAS,UAAU,IAAI,OAAO,CAAC,EAA+B;AACpE,QAAM,OAAO,CAAC;AAEd,aAAW,OAAO,OAAO;AACvB,QAAI,WAAW;AACf,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ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AA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","Avatar","import_jsx_runtime","Avatar"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/FileUploader.tsx","../../../src/components/Show.tsx","../../../src/context/cerberus.tsx","../../../src/utils/index.ts","../../../src/components/avatar/primitives.tsx","../../../src/components/avatar/parts.ts","../../../src/components/avatar/avatar.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from 'styled-system/css'\nimport { vstack } from 'styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader } from 'styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Avatar } from './avatar/avatar'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n /**\n * The optional heading to display in the FileUploader component.\n */\n heading?: string\n /**\n * The name of the file input element.\n */\n name: string\n /**\n * Disable the FileUploader component. Good for single-use file uploads.\n */\n disabled?: boolean\n}\n\n/**\n * A component that allows the user to upload files.\n * @see https://cerberus.digitalu.design/react/file-uploader\n */\nexport function FileUploader(props: FileUploaderProps) {\n const { icons } = useCerberusContext()\n const styles = fileUploader()\n const { waitingFileUploader: Icon } = icons\n\n return (\n <div\n {...(props.disabled ? { 'aria-disabled': true } : {})}\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <div className={styles.icon}>\n <Avatar gradient=\"charon-light\" fallback={<Icon />} />\n </div>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={props.heading}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n","import { type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps<T> {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: T | boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show<T>(props: PropsWithChildren<ShowProps<T>>) {\n const { when, children, fallback } = props\n\n if (when) {\n return <>{children}</>\n }\n\n if (fallback) {\n return <>{fallback}</>\n }\n\n return null\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import {\n Avatar,\n type AvatarFallbackProps,\n type AvatarImageProps,\n type AvatarRootProps,\n} from '@ark-ui/react/avatar'\nimport { avatar, type AvatarVariantProps } from 'styled-system/recipes'\nimport { cx } from 'styled-system/css'\n\n/**\n * This module provides the primitive components for the Avatar component.\n * @module 'avatar/primitives'\n */\n\n/**\n * The root component of the Avatar.\n */\nexport function AvatarRoot(props: AvatarRootProps & AvatarVariantProps) {\n const { gradient, shape, size, ...rootProps } = props\n const styles = avatar({ gradient, shape, size })\n return (\n <Avatar.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The image component of the Avatar.\n */\nexport function AvatarImage(props: AvatarImageProps) {\n const styles = avatar()\n return (\n <Avatar.Image {...props} className={cx(styles.image, props.className)} />\n )\n}\n\n/**\n * The fallback component of the Avatar.\n */\nexport function AvatarFallback(props: AvatarFallbackProps) {\n const styles = avatar()\n return (\n <Avatar.Fallback\n {...props}\n className={cx(styles.fallback, props.className)}\n />\n )\n}\n","import type { ElementType } from 'react'\nimport { AvatarFallback, AvatarImage, AvatarRoot } from './primitives'\n\n/**\n * This module contains the parts of the Avatar component.\n * @module 'avatar/parts'\n */\n\ninterface AvatarPartsValue {\n /**\n * The context provider of the Avatar.\n */\n Root: ElementType\n /**\n * The image of the Avatar.\n */\n Image: ElementType\n /**\n * The fallback content to display when the image fails to load.\n */\n Fallback: ElementType\n}\n\n/**\n * An Object containing the parts of the Accordion component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the AvatarParts object and\n * the entire family of components vs. only what you use.\n */\nexport const AvatarParts: AvatarPartsValue = {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n}\n","import type { AvatarRootProps } from '@ark-ui/react/avatar'\nimport type { AvatarVariantProps } from 'styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils'\nimport { Show } from '../Show'\nimport { AvatarParts } from './parts'\n\n/**\n * This module provides an abstraction of the Avatar primitives.\n * @module 'avatar'\n */\n\nexport interface AvatarWithoutImage\n extends AvatarRootProps,\n AvatarVariantProps {\n alt?: never\n src?: never\n fallback?: ReactNode\n}\n\nexport interface AvatarWithImage extends AvatarRootProps, AvatarVariantProps {\n alt: string\n src: string\n fallback?: ReactNode\n}\n\n/**\n * Avatar component is an abstraction of the primitives that displays a\n * avatar or it's fallback when the image fails to load.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference)\n */\nexport function Avatar(props: AvatarWithoutImage | AvatarWithImage) {\n const [imgProps, { fallback, children }, rootProps] = splitProps(\n props,\n ['alt', 'src'],\n ['fallback', 'children'],\n )\n\n return (\n <AvatarParts.Root {...rootProps}>\n <Show\n when={children}\n fallback={\n <>\n <AvatarParts.Fallback>{fallback}</AvatarParts.Fallback>\n <AvatarParts.Image {...imgProps} />\n </>\n }\n >\n {children}\n </Show>\n </AvatarParts.Root>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,cAAmB;AACnB,sBAAuB;;;AC6BZ;AAJJ,SAAS,KAAQ,OAAwC;AAC9D,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AAEr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AK,GAAI,GACtD;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,kBACT,wBAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,cACD,OAAO;AAAA,YACT;AAAA,YACA,SAAS,MAAM;AAAA,YAEf;AAAA,2DAAC,QAAK,MAAM,MAAM,SAChB,uDAAC,OAAE,WAAW,OAAO,SAAU,gBAAM,SAAQ,GAC/C;AAAA,cAAO;AAAA,eACC,WAAM,WAAN,mBAAc,QAAQ,KAAK;AAAA,cAAM;AAAA,cACzC,6CAAC,OAAE,WAAW,OAAO,aAAa,mCAAqB;AAAA,cACvD;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACJ,eAAW,gBAAG,MAAM,WAAW,OAAO,KAAK;AAAA,kBAC3C,MAAK;AAAA;AAAA,cACP;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Avatar","import_jsx_runtime","Avatar"]}
|
|
@@ -24,8 +24,8 @@ __export(IconButton_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(IconButton_exports);
|
|
26
26
|
var import_factory = require("@ark-ui/react/factory");
|
|
27
|
-
var import_css = require("
|
|
28
|
-
var import_recipes = require("
|
|
27
|
+
var import_css = require("styled-system/css");
|
|
28
|
+
var import_recipes = require("styled-system/recipes");
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
30
|
function IconButton(props) {
|
|
31
31
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/IconButton.tsx"],"sourcesContent":["import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from '
|
|
1
|
+
{"version":3,"sources":["../../../src/components/IconButton.tsx"],"sourcesContent":["import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuC;AACvC,iBAAmB;AACnB,qBAAwD;AAsBpD;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,eAAW;AAAA,QACT,YAAY;AAAA,YACZ,2BAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -30,11 +30,13 @@ __export(Menu_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(Menu_exports);
|
|
32
32
|
var import_react = require("@ark-ui/react");
|
|
33
|
-
var import_recipes = require("
|
|
34
|
-
var import_css = require("
|
|
33
|
+
var import_recipes = require("styled-system/recipes");
|
|
34
|
+
var import_css = require("styled-system/css");
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var menuStyles = (0, import_recipes.menu)();
|
|
37
|
-
|
|
37
|
+
function Menu(props) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Menu.Root, { ...props });
|
|
39
|
+
}
|
|
38
40
|
function MenuTrigger(props) {
|
|
39
41
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Menu.Trigger, { ...props, asChild: true });
|
|
40
42
|
}
|
|
@@ -50,7 +52,9 @@ function MenuContent(props) {
|
|
|
50
52
|
function MenuItem(props) {
|
|
51
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Menu.Item, { ...props, className: (0, import_css.cx)(props.className, menuStyles.item) });
|
|
52
54
|
}
|
|
53
|
-
|
|
55
|
+
function MenuItemGroup(props) {
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Menu.ItemGroup, { ...props });
|
|
57
|
+
}
|
|
54
58
|
function MenuGroupLabel(props) {
|
|
55
59
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
60
|
import_react.Menu.ItemGroupLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Menu.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Menu.tsx"],"sourcesContent":["import {\n Menu as ArkMenu,\n type MenuItemGroupProps,\n type MenuRootProps,\n} from '@ark-ui/react'\nimport { menu } from 'styled-system/recipes'\nimport { cx } from 'styled-system/css'\n\n/**\n * This module contains the Menu component family.\n * @module Menu\n */\n\nconst menuStyles = menu()\n\n/**\n * The root Menu component which controls the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>Trigger</MenuTrigger>\n * </Menu>\n */\nexport function Menu(props: MenuRootProps) {\n return <ArkMenu.Root {...props} />\n}\n\n/**\n * The MenuTrigger component opens/closes the Menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * </Menu>\n */\nexport function MenuTrigger(props: ArkMenu.TriggerProps) {\n return <ArkMenu.Trigger {...props} asChild />\n}\n\n/**\n * The MenuContent component is the container for the menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuContent(props: ArkMenu.ContentProps) {\n return (\n <ArkMenu.Positioner>\n <ArkMenu.Content\n {...props}\n className={cx(props.className, menuStyles.content)}\n />\n </ArkMenu.Positioner>\n )\n}\n\n/**\n * The MenuItem component is a single item in the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuItem(props: ArkMenu.ItemProps) {\n return (\n <ArkMenu.Item {...props} className={cx(props.className, menuStyles.item)} />\n )\n}\n\n/**\n * The MenuItemGroup component is a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuItemGroup(props: MenuItemGroupProps) {\n return <ArkMenu.ItemGroup {...props} />\n}\n\n/**\n * The MenuItemGroupLabel component is the label for a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItemGroupLabel>Group Label</MenuItemGroupLabel>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuGroupLabel(props: ArkMenu.ItemGroupLabelProps) {\n return (\n <ArkMenu.ItemGroupLabel\n {...props}\n className={cx(props.className, menuStyles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * The MenuSeparator component is a visual divider between menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuGroupLabel>Group Label</MenuGroupLabel>\n * <MenuSeparator />\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuSeparator(props: ArkMenu.SeparatorProps) {\n return (\n <ArkMenu.Separator\n {...props}\n className={cx(props.className, menuStyles.separator)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAIO;AACP,qBAAqB;AACrB,iBAAmB;AAmBV;AAZT,IAAM,iBAAa,qBAAK;AAWjB,SAAS,KAAK,OAAsB;AACzC,SAAO,4CAAC,aAAAA,KAAQ,MAAR,EAAc,GAAG,OAAO;AAClC;AAaO,SAAS,YAAY,OAA6B;AACvD,SAAO,4CAAC,aAAAA,KAAQ,SAAR,EAAiB,GAAG,OAAO,SAAO,MAAC;AAC7C;AAiBO,SAAS,YAAY,OAA6B;AACvD,SACE,4CAAC,aAAAA,KAAQ,YAAR,EACC;AAAA,IAAC,aAAAA,KAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,WAAW,OAAO;AAAA;AAAA,EACnD,GACF;AAEJ;AAiBO,SAAS,SAAS,OAA0B;AACjD,SACE,4CAAC,aAAAA,KAAQ,MAAR,EAAc,GAAG,OAAO,eAAW,eAAG,MAAM,WAAW,WAAW,IAAI,GAAG;AAE9E;AAmBO,SAAS,cAAc,OAA2B;AACvD,SAAO,4CAAC,aAAAA,KAAQ,WAAR,EAAmB,GAAG,OAAO;AACvC;AAoBO,SAAS,eAAe,OAAoC;AACjE,SACE;AAAA,IAAC,aAAAA,KAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,WAAW,cAAc;AAAA;AAAA,EAC1D;AAEJ;AAqBO,SAAS,cAAc,OAA+B;AAC3D,SACE;AAAA,IAAC,aAAAA,KAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA,EACrD;AAEJ;","names":["ArkMenu"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export { Menu_alias_1 as Menu } from '../_tsup-dts-rollup.cjs';
|
|
1
2
|
export { MenuTrigger_alias_1 as MenuTrigger } from '../_tsup-dts-rollup.cjs';
|
|
2
3
|
export { MenuContent_alias_1 as MenuContent } from '../_tsup-dts-rollup.cjs';
|
|
3
4
|
export { MenuItem_alias_1 as MenuItem } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { MenuItemGroup_alias_1 as MenuItemGroup } from '../_tsup-dts-rollup.cjs';
|
|
4
6
|
export { MenuGroupLabel_alias_1 as MenuGroupLabel } from '../_tsup-dts-rollup.cjs';
|
|
5
7
|
export { MenuSeparator_alias_1 as MenuSeparator } from '../_tsup-dts-rollup.cjs';
|
|
6
|
-
export { Menu_alias_1 as Menu } from '../_tsup-dts-rollup.cjs';
|
|
7
|
-
export { MenuItemGroup_alias_1 as MenuItemGroup } from '../_tsup-dts-rollup.cjs';
|
|
@@ -24,7 +24,10 @@ __export(Portal_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Portal_exports);
|
|
26
26
|
var import_react = require("@ark-ui/react");
|
|
27
|
-
var
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
function Portal(props) {
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Portal, { ...props });
|
|
30
|
+
}
|
|
28
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29
32
|
0 && (module.exports = {
|
|
30
33
|
Portal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal.tsx"],"sourcesContent":["import { Portal as ArkPortal, type PortalProps } from '@ark-ui/react'\nimport type { PropsWithChildren } from 'react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type { PortalProps }\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport function Portal(props: PropsWithChildren<PortalProps>) {\n return <ArkPortal {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsD;AA6B7C;AADF,SAAS,OAAO,OAAuC;AAC5D,SAAO,4CAAC,aAAAA,QAAA,EAAW,GAAG,OAAO;AAC/B;","names":["ArkPortal"]}
|
|
@@ -24,8 +24,8 @@ __export(ProgressBar_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ProgressBar_exports);
|
|
26
26
|
var import_factory = require("@ark-ui/react/factory");
|
|
27
|
-
var import_css = require("
|
|
28
|
-
var import_recipes = require("
|
|
27
|
+
var import_css = require("styled-system/css");
|
|
28
|
+
var import_recipes = require("styled-system/recipes");
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
30
|
function ProgressBar(props) {
|
|
31
31
|
const { indeterminate, size, usage, now, label, ...nativeProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ProgressBar.tsx"],"sourcesContent":["import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from '
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ProgressBar.tsx"],"sourcesContent":["import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from 'styled-system/recipes'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLArkProps<'div'>\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, label, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <ark.div\n {...nativeProps}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"progressbar\"\n >\n <ark.div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </ark.div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuC;AACvC,iBAAmB;AACnB,qBAGO;AA0ED;AAlBC,SAAS,YAAY,OAAyB;AACnD,QAAM,EAAE,eAAe,MAAM,OAAO,KAAK,OAAO,GAAG,YAAY,IAAI;AACnE,QAAM,aAAS,4BAAY,EAAE,MAAM,MAAM,CAAC;AAC1C,QAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,CAAC;AACtD,QAAM,QAAQ;AAAA,IACZ,OAAO,gBAAgB,QAAQ,GAAG,UAAU;AAAA,EAC9C;AAEA,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY;AAAA,MACZ,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe,gBAAgB,IAAI;AAAA,MACnC,eAAW,eAAG,YAAY,WAAW,OAAO,IAAI;AAAA,MAChD,MAAK;AAAA,MAEL;AAAA,QAAC,mBAAI;AAAA,QAAJ;AAAA,UACE,GAAI,iBAAiB,EAAE,sBAAsB,KAAK;AAAA,UACnD,iBAAe,eAAe;AAAA,UAC9B,WAAW,OAAO;AAAA,UAClB,OAAO;AAAA;AAAA,MACT;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use client";
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,14 +23,16 @@ __export(Show_exports, {
|
|
|
24
23
|
Show: () => Show
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(Show_exports);
|
|
27
|
-
var
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
27
|
function Show(props) {
|
|
29
28
|
const { when, children, fallback } = props;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
if (when) {
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
31
|
+
}
|
|
32
|
+
if (fallback) {
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: fallback });
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
35
36
|
}
|
|
36
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
38
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Show.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Show.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps<T> {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: T | boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show<T>(props: PropsWithChildren<ShowProps<T>>) {\n const { when, children, fallback } = props\n\n if (when) {\n return <>{children}</>\n }\n\n if (fallback) {\n return <>{fallback}</>\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCW;AAJJ,SAAS,KAAQ,OAAwC;AAC9D,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AAErC,MAAI,MAAM;AACR,WAAO,2EAAG,UAAS;AAAA,EACrB;AAEA,MAAI,UAAU;AACZ,WAAO,2EAAG,oBAAS;AAAA,EACrB;AAEA,SAAO;AACT;","names":[]}
|