@cerberus-design/react 0.16.0 → 0.17.0-next-e7f9956
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/_tsup-dts-rollup.d.cts +5680 -4852
- package/build/legacy/aria-helpers/nav-menu.aria.d.cts +2 -0
- package/build/legacy/aria-helpers/trap-focus.aria.d.cts +1 -0
- package/build/legacy/components/AnimatingUploadIcon.cjs +2 -2
- package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -1
- package/build/legacy/components/AnimatingUploadIcon.d.cts +2 -0
- package/build/legacy/components/CircularProgress.d.cts +2 -0
- package/build/legacy/components/Droppable.d.cts +2 -0
- package/build/legacy/components/FeatureFlag.d.cts +2 -0
- package/build/legacy/components/FileStatus.cjs +107 -142
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileStatus.d.cts +6 -0
- package/build/legacy/components/FileUploader.cjs +80 -102
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/FileUploader.d.cts +2 -0
- package/build/legacy/components/IconButton.cjs +2 -1
- package/build/legacy/components/IconButton.cjs.map +1 -1
- package/build/legacy/components/IconButton.d.cts +3 -0
- package/build/legacy/components/Menu.d.cts +7 -0
- package/build/legacy/components/Portal.d.cts +2 -0
- package/build/legacy/components/ProgressBar.cjs +3 -2
- package/build/legacy/components/ProgressBar.cjs.map +1 -1
- package/build/legacy/components/ProgressBar.d.cts +5 -0
- package/build/legacy/components/Show.d.cts +2 -0
- package/build/legacy/components/Spinner.d.cts +2 -0
- package/build/legacy/components/Tag.cjs +51 -30
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Tag.d.cts +4 -0
- package/build/legacy/components/Text.d.cts +4 -0
- package/build/legacy/components/Tooltip.d.cts +2 -0
- package/build/legacy/components/accordion/index.cjs +178 -0
- package/build/legacy/components/accordion/index.cjs.map +1 -0
- package/build/legacy/components/accordion/index.d.cts +9 -0
- package/build/legacy/components/accordion/item-group.cjs +166 -0
- package/build/legacy/components/accordion/item-group.cjs.map +1 -0
- package/build/legacy/components/accordion/item-group.d.cts +3 -0
- package/build/legacy/components/accordion/item-indicator.cjs +114 -0
- package/build/legacy/components/accordion/item-indicator.cjs.map +1 -0
- package/build/legacy/components/accordion/item-indicator.d.cts +1 -0
- package/build/legacy/components/accordion/parts.cjs +91 -0
- package/build/legacy/components/accordion/parts.cjs.map +1 -0
- package/build/legacy/components/accordion/parts.d.cts +1 -0
- package/build/legacy/components/{Accordion.cjs → accordion/primitives.cjs} +35 -32
- package/build/legacy/components/accordion/primitives.cjs.map +1 -0
- package/build/legacy/components/accordion/primitives.d.cts +5 -0
- package/build/legacy/components/admonition/admonition.cjs +238 -0
- package/build/legacy/components/admonition/admonition.cjs.map +1 -0
- package/build/legacy/components/admonition/admonition.d.cts +2 -0
- package/build/legacy/components/admonition/index.cjs +250 -0
- package/build/legacy/components/admonition/index.cjs.map +1 -0
- package/build/legacy/components/admonition/index.d.cts +8 -0
- package/build/legacy/components/admonition/match-avatar.cjs +155 -0
- package/build/legacy/components/admonition/match-avatar.cjs.map +1 -0
- package/build/legacy/components/admonition/match-avatar.d.cts +1 -0
- package/build/legacy/components/admonition/parts.cjs +88 -0
- package/build/legacy/components/admonition/parts.cjs.map +1 -0
- package/build/legacy/components/admonition/parts.d.cts +1 -0
- package/build/legacy/components/admonition/primitives.cjs +85 -0
- package/build/legacy/components/admonition/primitives.cjs.map +1 -0
- package/build/legacy/components/admonition/primitives.d.cts +5 -0
- package/build/legacy/components/avatar/avatar.cjs +120 -0
- package/build/legacy/components/avatar/avatar.cjs.map +1 -0
- package/build/legacy/components/avatar/avatar.d.cts +3 -0
- package/build/legacy/components/avatar/index.cjs +133 -0
- package/build/legacy/components/avatar/index.cjs.map +1 -0
- package/build/legacy/components/avatar/index.d.cts +8 -0
- package/build/legacy/components/avatar/parts.cjs +68 -0
- package/build/legacy/components/avatar/parts.cjs.map +1 -0
- package/build/legacy/components/avatar/parts.d.cts +1 -0
- package/build/legacy/components/avatar/primitives.cjs +63 -0
- package/build/legacy/components/avatar/primitives.cjs.map +1 -0
- package/build/legacy/components/avatar/primitives.d.cts +3 -0
- package/build/legacy/components/button/button.cjs +2 -1
- package/build/legacy/components/button/button.cjs.map +1 -1
- package/build/legacy/components/button/button.d.cts +3 -0
- package/build/legacy/components/button/index.cjs +2 -1
- package/build/legacy/components/button/index.cjs.map +1 -1
- package/build/legacy/components/button/index.d.cts +4 -0
- package/build/legacy/components/button/parts.cjs +2 -1
- package/build/legacy/components/button/parts.cjs.map +1 -1
- package/build/legacy/components/button/parts.d.cts +1 -0
- package/build/legacy/components/checkbox/checkbox-icon.d.cts +1 -0
- package/build/legacy/components/checkbox/checkbox.cjs.map +1 -1
- package/build/legacy/components/checkbox/checkbox.d.cts +2 -0
- package/build/legacy/components/checkbox/index.cjs.map +1 -1
- package/build/legacy/components/checkbox/index.d.cts +9 -0
- package/build/legacy/components/checkbox/parts.d.cts +1 -0
- package/build/legacy/components/checkbox/primitives.d.cts +6 -0
- package/build/legacy/components/combobox/combobox.cjs +224 -0
- package/build/legacy/components/combobox/combobox.cjs.map +1 -0
- package/build/legacy/components/combobox/combobox.d.cts +2 -0
- package/build/legacy/components/combobox/index.cjs +326 -0
- package/build/legacy/components/combobox/index.cjs.map +1 -0
- package/build/legacy/components/combobox/index.d.cts +24 -0
- package/build/legacy/components/combobox/item-group.cjs +178 -0
- package/build/legacy/components/combobox/item-group.cjs.map +1 -0
- package/build/legacy/components/combobox/item-group.d.cts +2 -0
- package/build/legacy/components/combobox/item.cjs +192 -0
- package/build/legacy/components/combobox/item.cjs.map +1 -0
- package/build/legacy/components/combobox/item.d.cts +1 -0
- package/build/legacy/components/combobox/parts.cjs +168 -0
- package/build/legacy/components/combobox/parts.cjs.map +1 -0
- package/build/legacy/components/combobox/parts.d.cts +1 -0
- package/build/legacy/components/combobox/primitives.cjs +182 -0
- package/build/legacy/components/combobox/primitives.cjs.map +1 -0
- package/build/legacy/components/combobox/primitives.d.cts +16 -0
- package/build/legacy/components/combobox/use-stateful-collection.cjs +72 -0
- package/build/legacy/components/combobox/use-stateful-collection.cjs.map +1 -0
- package/build/legacy/components/combobox/use-stateful-collection.d.cts +2 -0
- package/build/legacy/components/{Thead.cjs → cta-dialog/context.cjs} +10 -13
- package/build/legacy/components/cta-dialog/context.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/context.d.cts +3 -0
- package/build/legacy/components/cta-dialog/index.cjs +446 -0
- package/build/legacy/components/cta-dialog/index.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/index.d.cts +6 -0
- package/build/legacy/components/cta-dialog/provider.cjs +424 -0
- package/build/legacy/components/cta-dialog/provider.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/provider.d.cts +2 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs +100 -0
- package/build/legacy/components/cta-dialog/trigger-item.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/trigger-item.d.cts +2 -0
- package/build/legacy/components/{Td.cjs → cta-dialog/utils.cjs} +23 -24
- package/build/legacy/components/cta-dialog/utils.cjs.map +1 -0
- package/build/legacy/components/cta-dialog/utils.d.cts +4 -0
- package/build/legacy/components/date-picker/calendar.cjs +352 -0
- package/build/legacy/components/date-picker/calendar.cjs.map +1 -0
- package/build/legacy/components/date-picker/calendar.d.cts +1 -0
- package/build/legacy/components/date-picker/content.cjs +198 -0
- package/build/legacy/components/date-picker/content.cjs.map +1 -0
- package/build/legacy/components/date-picker/content.d.cts +1 -0
- package/build/legacy/components/date-picker/date-picker.cjs +201 -0
- package/build/legacy/components/date-picker/date-picker.cjs.map +1 -0
- package/build/legacy/components/date-picker/date-picker.d.cts +1 -0
- package/build/legacy/components/date-picker/day-view.cjs +314 -0
- package/build/legacy/components/date-picker/day-view.cjs.map +1 -0
- package/build/legacy/components/date-picker/day-view.d.cts +2 -0
- package/build/legacy/components/date-picker/index.cjs +481 -0
- package/build/legacy/components/date-picker/index.cjs.map +1 -0
- package/build/legacy/components/date-picker/index.d.cts +30 -0
- package/build/legacy/components/date-picker/input.cjs +247 -0
- package/build/legacy/components/date-picker/input.cjs.map +1 -0
- package/build/legacy/components/date-picker/input.d.cts +1 -0
- package/build/legacy/components/date-picker/month-view.cjs +289 -0
- package/build/legacy/components/date-picker/month-view.cjs.map +1 -0
- package/build/legacy/components/date-picker/month-view.d.cts +1 -0
- package/build/legacy/components/date-picker/parts.cjs +187 -0
- package/build/legacy/components/date-picker/parts.cjs.map +1 -0
- package/build/legacy/components/date-picker/parts.d.cts +1 -0
- package/build/legacy/components/date-picker/primitives.cjs +203 -0
- package/build/legacy/components/date-picker/primitives.cjs.map +1 -0
- package/build/legacy/components/date-picker/primitives.d.cts +24 -0
- package/build/legacy/components/date-picker/range-input.cjs +267 -0
- package/build/legacy/components/date-picker/range-input.cjs.map +1 -0
- package/build/legacy/components/date-picker/range-input.d.cts +2 -0
- package/build/legacy/components/date-picker/trigger.cjs +232 -0
- package/build/legacy/components/date-picker/trigger.cjs.map +1 -0
- package/build/legacy/components/date-picker/trigger.d.cts +1 -0
- package/build/legacy/components/date-picker/view-control-group.cjs +280 -0
- package/build/legacy/components/date-picker/view-control-group.cjs.map +1 -0
- package/build/legacy/components/date-picker/view-control-group.d.cts +1 -0
- package/build/legacy/components/date-picker/year-view.cjs +289 -0
- package/build/legacy/components/date-picker/year-view.cjs.map +1 -0
- package/build/legacy/components/date-picker/year-view.d.cts +1 -0
- package/build/legacy/components/deprecated/FieldMessage.d.cts +3 -0
- package/build/legacy/components/deprecated/FieldsetLabel.d.cts +2 -0
- package/build/legacy/components/deprecated/Label.d.cts +3 -0
- package/build/legacy/components/{Legend.cjs → deprecated/Legend.cjs} +3 -3
- package/build/legacy/components/deprecated/Legend.cjs.map +1 -0
- package/build/legacy/components/deprecated/Legend.d.cts +2 -0
- package/build/legacy/components/deprecated/Modal.d.cts +2 -0
- package/build/legacy/components/deprecated/ModalDescription.d.cts +2 -0
- package/build/legacy/components/deprecated/ModalHeader.d.cts +2 -0
- package/build/legacy/components/deprecated/ModalHeading.d.cts +2 -0
- package/build/legacy/components/deprecated/NavMenuLink.d.cts +2 -0
- package/build/legacy/components/deprecated/NavMenuList.d.cts +3 -0
- package/build/legacy/components/deprecated/NavMenuTrigger.d.cts +2 -0
- package/build/legacy/components/{Notification.cjs → deprecated/Notification.cjs} +2 -2
- package/build/legacy/components/deprecated/Notification.cjs.map +1 -0
- package/build/legacy/components/deprecated/Notification.d.cts +3 -0
- package/build/legacy/components/{NotificationDescription.cjs → deprecated/NotificationDescription.cjs} +1 -1
- package/build/legacy/components/deprecated/NotificationDescription.cjs.map +1 -0
- package/build/legacy/components/deprecated/NotificationDescription.d.cts +3 -0
- package/build/legacy/components/{NotificationHeading.cjs → deprecated/NotificationHeading.cjs} +1 -1
- package/build/legacy/components/deprecated/NotificationHeading.cjs.map +1 -0
- package/build/legacy/components/deprecated/NotificationHeading.d.cts +3 -0
- package/build/legacy/components/{Dialog.client.cjs → dialog/close-icon-trigger.cjs} +38 -29
- package/build/legacy/components/dialog/close-icon-trigger.cjs.map +1 -0
- package/build/legacy/components/dialog/close-icon-trigger.d.cts +1 -0
- package/build/legacy/components/dialog/dialog.cjs +80 -0
- package/build/legacy/components/dialog/dialog.cjs.map +1 -0
- package/build/legacy/components/dialog/dialog.d.cts +2 -0
- package/build/legacy/components/dialog/index.cjs +209 -0
- package/build/legacy/components/dialog/index.cjs.map +1 -0
- package/build/legacy/components/dialog/index.d.cts +13 -0
- package/build/legacy/components/dialog/parts.cjs +109 -0
- package/build/legacy/components/dialog/parts.cjs.map +1 -0
- package/build/legacy/components/dialog/parts.d.cts +1 -0
- package/build/legacy/components/dialog/primitives.cjs +112 -0
- package/build/legacy/components/dialog/primitives.cjs.map +1 -0
- package/build/legacy/components/dialog/primitives.d.cts +9 -0
- package/build/legacy/components/field/field.d.cts +2 -0
- package/build/legacy/components/field/index.d.cts +18 -0
- package/build/legacy/components/field/parts.d.cts +1 -0
- package/build/legacy/components/field/primitives.d.cts +11 -0
- package/build/legacy/components/field/start-indicator.d.cts +2 -0
- package/build/legacy/components/field/status-indicator.d.cts +2 -0
- package/build/legacy/components/fieldset/fieldset.d.cts +2 -0
- package/build/legacy/components/fieldset/index.d.cts +7 -0
- package/build/legacy/components/fieldset/parts.d.cts +1 -0
- package/build/legacy/components/fieldset/primitives.d.cts +4 -0
- package/build/legacy/components/for.cjs +3 -4
- package/build/legacy/components/for.cjs.map +1 -1
- package/build/legacy/components/for.d.cts +2 -0
- package/build/legacy/components/notifications/center.cjs +294 -0
- package/build/legacy/components/notifications/center.cjs.map +1 -0
- package/build/legacy/components/notifications/center.d.cts +3 -0
- package/build/legacy/components/notifications/close-trigger.cjs +104 -0
- package/build/legacy/components/notifications/close-trigger.cjs.map +1 -0
- package/build/legacy/components/notifications/close-trigger.d.cts +1 -0
- package/build/legacy/components/notifications/index.cjs +310 -0
- package/build/legacy/components/notifications/index.cjs.map +1 -0
- package/build/legacy/components/notifications/index.d.cts +12 -0
- package/build/legacy/components/notifications/match-icon.cjs +135 -0
- package/build/legacy/components/notifications/match-icon.cjs.map +1 -0
- package/build/legacy/components/notifications/match-icon.d.cts +1 -0
- package/build/legacy/components/notifications/parts.cjs +83 -0
- package/build/legacy/components/notifications/parts.cjs.map +1 -0
- package/build/legacy/components/notifications/parts.d.cts +1 -0
- package/build/legacy/components/notifications/primitives.cjs +83 -0
- package/build/legacy/components/notifications/primitives.cjs.map +1 -0
- package/build/legacy/components/notifications/primitives.d.cts +6 -0
- package/build/legacy/components/notifications/types.cjs +19 -0
- package/build/legacy/components/notifications/types.cjs.map +1 -0
- package/build/legacy/components/notifications/types.d.cts +2 -0
- package/build/legacy/components/radio/index.d.cts +11 -0
- package/build/legacy/components/radio/parts.d.cts +1 -0
- package/build/legacy/components/radio/primitives.d.cts +8 -0
- package/build/legacy/components/radio/radio.d.cts +2 -0
- package/build/legacy/components/rating/index.cjs +167 -0
- package/build/legacy/components/rating/index.cjs.map +1 -0
- package/build/legacy/components/rating/index.d.cts +12 -0
- package/build/legacy/components/rating/parts.cjs +98 -0
- package/build/legacy/components/rating/parts.cjs.map +1 -0
- package/build/legacy/components/rating/parts.d.cts +1 -0
- package/build/legacy/components/rating/primitives.cjs +97 -0
- package/build/legacy/components/rating/primitives.cjs.map +1 -0
- package/build/legacy/components/rating/primitives.d.cts +7 -0
- package/build/legacy/components/rating/rating.cjs +151 -0
- package/build/legacy/components/rating/rating.cjs.map +1 -0
- package/build/legacy/components/rating/rating.d.cts +2 -0
- package/build/legacy/components/select/index.cjs.map +1 -1
- package/build/legacy/components/select/index.d.cts +28 -0
- package/build/legacy/components/select/option-group.d.cts +2 -0
- package/build/legacy/components/select/parts.d.cts +1 -0
- package/build/legacy/components/select/primitives.d.cts +18 -0
- package/build/legacy/components/select/select.cjs.map +1 -1
- package/build/legacy/components/select/select.d.cts +7 -0
- package/build/legacy/components/switch/index.cjs.map +1 -1
- package/build/legacy/components/switch/index.d.cts +8 -0
- package/build/legacy/components/switch/parts.cjs.map +1 -1
- package/build/legacy/components/switch/parts.d.cts +1 -0
- package/build/legacy/components/switch/primitives.d.cts +5 -0
- package/build/legacy/components/switch/switch-indicator.d.cts +1 -0
- package/build/legacy/components/switch/switch.cjs.map +1 -1
- package/build/legacy/components/switch/switch.d.cts +2 -0
- package/build/legacy/components/table/index.cjs +228 -0
- package/build/legacy/components/table/index.cjs.map +1 -0
- package/build/legacy/components/table/index.d.cts +13 -0
- package/build/legacy/components/table/parts.cjs +174 -0
- package/build/legacy/components/table/parts.cjs.map +1 -0
- package/build/legacy/components/table/parts.d.cts +2 -0
- package/build/legacy/components/table/primitives.cjs +176 -0
- package/build/legacy/components/table/primitives.cjs.map +1 -0
- package/build/legacy/components/table/primitives.d.cts +10 -0
- package/build/legacy/components/table/table.cjs +192 -0
- package/build/legacy/components/table/table.cjs.map +1 -0
- package/build/legacy/components/table/table.d.cts +1 -0
- package/build/legacy/components/tabs/index.cjs +106 -0
- package/build/legacy/components/tabs/index.cjs.map +1 -0
- package/build/legacy/components/tabs/index.d.cts +8 -0
- package/build/legacy/components/tabs/parts.cjs +78 -0
- package/build/legacy/components/tabs/parts.cjs.map +1 -0
- package/build/legacy/components/tabs/parts.d.cts +2 -0
- package/build/legacy/components/tabs/primitives.cjs +75 -0
- package/build/legacy/components/tabs/primitives.cjs.map +1 -0
- package/build/legacy/components/tabs/primitives.d.cts +5 -0
- package/build/legacy/components/tabs/tabs.cjs +94 -0
- package/build/legacy/components/tabs/tabs.cjs.map +1 -0
- package/build/legacy/components/tabs/tabs.d.cts +1 -0
- package/build/legacy/components/toggle/index.d.cts +3 -0
- package/build/legacy/components/toggle/parts.d.cts +1 -0
- package/build/legacy/components/toggle/primitives.d.cts +2 -0
- package/build/legacy/config/defineIcons.cjs +2 -2
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.d.cts +1 -0
- package/build/legacy/config/icons/checkbox.icons.d.cts +4 -0
- package/build/legacy/config/index.cjs +2 -2
- package/build/legacy/config/index.cjs.map +1 -1
- package/build/legacy/config/index.d.cts +5 -0
- package/build/legacy/config/types.d.cts +3 -0
- package/build/legacy/context/cerberus.d.cts +2 -0
- package/build/legacy/context/confirm-modal.cjs +162 -151
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.d.cts +9 -0
- package/build/legacy/context/feature-flags.d.cts +4 -0
- package/build/legacy/context/field.d.cts +3 -0
- package/build/legacy/context/navMenu.d.cts +5 -0
- package/build/legacy/context/notification-center/store.d.cts +5 -0
- package/build/legacy/context/notification-center/types.d.cts +6 -0
- package/build/legacy/context/notification-center.cjs +15 -20
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/notification-center.d.cts +5 -0
- package/build/legacy/context/prompt-modal.cjs +174 -164
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.d.cts +6 -0
- package/build/legacy/context/theme.d.cts +7 -0
- package/build/legacy/hooks/useDate.d.cts +8 -0
- package/build/legacy/hooks/useModal.d.cts +2 -0
- package/build/legacy/hooks/useRootColors.d.cts +2 -0
- package/build/legacy/hooks/useTheme.d.cts +4 -0
- package/build/legacy/hooks/useToggle.d.cts +3 -0
- package/build/legacy/index.cjs +2874 -2451
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +462 -0
- package/build/legacy/types.d.cts +1 -0
- package/build/legacy/utils/index.d.cts +4 -0
- package/build/legacy/utils/localStorage.d.cts +2 -0
- package/build/modern/_tsup-dts-rollup.d.ts +5680 -4852
- package/build/modern/aria-helpers/nav-menu.aria.d.ts +2 -0
- package/build/modern/aria-helpers/trap-focus.aria.d.ts +1 -0
- package/build/modern/chunk-2FRF57EU.js +41 -0
- package/build/modern/chunk-2FRF57EU.js.map +1 -0
- package/build/modern/chunk-2LP4KQYQ.js +44 -0
- package/build/modern/chunk-2LP4KQYQ.js.map +1 -0
- package/build/modern/chunk-4GFEWP76.js +49 -0
- package/build/modern/chunk-4GFEWP76.js.map +1 -0
- package/build/modern/chunk-4HUK7YNZ.js +38 -0
- package/build/modern/chunk-4HUK7YNZ.js.map +1 -0
- package/build/modern/chunk-4HVKAHBX.js +1 -0
- package/build/modern/chunk-4IXQNNAM.js +31 -0
- package/build/modern/chunk-4IXQNNAM.js.map +1 -0
- package/build/modern/chunk-4LSTU6WU.js +8 -0
- package/build/modern/chunk-4LSTU6WU.js.map +1 -0
- package/build/modern/chunk-5DY66QZD.js +41 -0
- package/build/modern/chunk-5DY66QZD.js.map +1 -0
- package/build/modern/chunk-6HOLE2JH.js +22 -0
- package/build/modern/chunk-6HOLE2JH.js.map +1 -0
- package/build/modern/chunk-6MNFE6U6.js +45 -0
- package/build/modern/chunk-6MNFE6U6.js.map +1 -0
- package/build/modern/chunk-7JHQVQPS.js +57 -0
- package/build/modern/chunk-7JHQVQPS.js.map +1 -0
- package/build/modern/chunk-7OYOT5LK.js +41 -0
- package/build/modern/chunk-7OYOT5LK.js.map +1 -0
- package/build/modern/chunk-A464YKEL.js +143 -0
- package/build/modern/chunk-A464YKEL.js.map +1 -0
- package/build/modern/chunk-BD4UH5GS.js +42 -0
- package/build/modern/chunk-BD4UH5GS.js.map +1 -0
- package/build/modern/chunk-BJJ4XAVO.js +18 -0
- package/build/modern/chunk-BJJ4XAVO.js.map +1 -0
- package/build/modern/{chunk-245SMQ45.js → chunk-CHSC2LEM.js} +4 -4
- package/build/modern/chunk-CPNKDKC2.js +64 -0
- package/build/modern/chunk-CPNKDKC2.js.map +1 -0
- package/build/modern/chunk-D7MAAGNA.js +158 -0
- package/build/modern/chunk-D7MAAGNA.js.map +1 -0
- package/build/modern/chunk-D7UIWAFO.js +84 -0
- package/build/modern/chunk-D7UIWAFO.js.map +1 -0
- package/build/modern/chunk-DC4F5ZK5.js +7 -0
- package/build/modern/chunk-DC4F5ZK5.js.map +1 -0
- package/build/modern/{chunk-RBNOEAWJ.js → chunk-DEXJQ6UI.js} +3 -3
- package/build/modern/chunk-DEXJQ6UI.js.map +1 -0
- package/build/modern/chunk-DJOYRUNT.js +1 -0
- package/build/modern/chunk-DXOKSZVQ.js +12 -0
- package/build/modern/chunk-DXOKSZVQ.js.map +1 -0
- package/build/modern/chunk-E7FVTKUT.js +20 -0
- package/build/modern/chunk-E7FVTKUT.js.map +1 -0
- package/build/modern/chunk-EH36PXVP.js +24 -0
- package/build/modern/chunk-EH36PXVP.js.map +1 -0
- package/build/modern/{chunk-RDRD6ACD.js → chunk-EUYI7C2E.js} +2 -2
- package/build/modern/chunk-EUYI7C2E.js.map +1 -0
- package/build/modern/chunk-FCRD3ZRZ.js +46 -0
- package/build/modern/chunk-FCRD3ZRZ.js.map +1 -0
- package/build/modern/chunk-FCSO6N2Y.js +27 -0
- package/build/modern/chunk-FCSO6N2Y.js.map +1 -0
- package/build/modern/chunk-FZ53535Q.js +18 -0
- package/build/modern/chunk-FZ53535Q.js.map +1 -0
- package/build/modern/chunk-GBCJKBWH.js +27 -0
- package/build/modern/chunk-GBCJKBWH.js.map +1 -0
- package/build/modern/chunk-GBHYDL2K.js +67 -0
- package/build/modern/chunk-GBHYDL2K.js.map +1 -0
- package/build/modern/{chunk-6BN3XKQF.js → chunk-GVU6L6CZ.js} +10 -10
- package/build/modern/chunk-GVU6L6CZ.js.map +1 -0
- package/build/modern/{chunk-ZDANBCM3.js → chunk-HB6MBJSG.js} +30 -39
- package/build/modern/chunk-HB6MBJSG.js.map +1 -0
- package/build/modern/chunk-HIC7Z23X.js +37 -0
- package/build/modern/chunk-HIC7Z23X.js.map +1 -0
- package/build/modern/{chunk-KQQPZJEI.js → chunk-HUN7VQBT.js} +1 -1
- package/build/modern/chunk-HUN7VQBT.js.map +1 -0
- package/build/modern/chunk-IKDXADLX.js +1 -0
- package/build/modern/chunk-IOLYX3SY.js +1 -0
- package/build/modern/{chunk-H54FR7IP.js → chunk-IP3O6AIC.js} +11 -13
- package/build/modern/chunk-IP3O6AIC.js.map +1 -0
- package/build/modern/{chunk-2BIHLH4V.js → chunk-JAAMD5EH.js} +2 -2
- package/build/modern/{chunk-OVHCXBBI.js → chunk-JOM5AAVW.js} +2 -2
- package/build/modern/chunk-JWF7FK7T.js +21 -0
- package/build/modern/chunk-JWF7FK7T.js.map +1 -0
- package/build/modern/chunk-K2TZB3I4.js +22 -0
- package/build/modern/chunk-K2TZB3I4.js.map +1 -0
- package/build/modern/chunk-KB52N3HJ.js +27 -0
- package/build/modern/chunk-KB52N3HJ.js.map +1 -0
- package/build/modern/{chunk-WZJ5UQNM.js → chunk-KJMCUYWV.js} +4 -3
- package/build/modern/chunk-KJMCUYWV.js.map +1 -0
- package/build/modern/chunk-KZDEDAIK.js +21 -0
- package/build/modern/chunk-KZDEDAIK.js.map +1 -0
- package/build/modern/chunk-LLZE2RBB.js +33 -0
- package/build/modern/chunk-LLZE2RBB.js.map +1 -0
- package/build/modern/chunk-M6WOFFOA.js +1 -0
- package/build/modern/{chunk-5SNLQZYP.js → chunk-M7T3MBFB.js} +2 -2
- package/build/modern/chunk-MH6CIBDU.js +22 -0
- package/build/modern/chunk-MH6CIBDU.js.map +1 -0
- package/build/modern/chunk-ML2IKLMJ.js +1 -0
- package/build/modern/{chunk-CMYD5KWA.js → chunk-MPS6BAJ2.js} +12 -14
- package/build/modern/chunk-MPS6BAJ2.js.map +1 -0
- package/build/modern/chunk-MR4DX76C.js +38 -0
- package/build/modern/chunk-MR4DX76C.js.map +1 -0
- package/build/modern/chunk-MV2AU6UV.js +1 -0
- package/build/modern/chunk-N4RPMT6J.js +35 -0
- package/build/modern/chunk-N4RPMT6J.js.map +1 -0
- package/build/modern/{chunk-Y4ZEJ2EF.js → chunk-NHBL7NNP.js} +4 -4
- package/build/modern/chunk-NHBL7NNP.js.map +1 -0
- package/build/modern/chunk-NOXZZHDH.js +27 -0
- package/build/modern/chunk-NOXZZHDH.js.map +1 -0
- package/build/modern/chunk-NR5XDIJ7.js +148 -0
- package/build/modern/chunk-NR5XDIJ7.js.map +1 -0
- package/build/modern/chunk-OS73F4SR.js +25 -0
- package/build/modern/chunk-OS73F4SR.js.map +1 -0
- package/build/modern/chunk-PLHYOCY3.js +23 -0
- package/build/modern/chunk-PLHYOCY3.js.map +1 -0
- package/build/modern/{chunk-MISIUX63.js → chunk-QD4TL3L6.js} +12 -13
- package/build/modern/chunk-QD4TL3L6.js.map +1 -0
- package/build/modern/chunk-QG4NDPST.js +20 -0
- package/build/modern/chunk-QG4NDPST.js.map +1 -0
- package/build/modern/{chunk-UXY3KCC3.js → chunk-QJ3CJ4CR.js} +2 -2
- package/build/modern/chunk-QJ3CJ4CR.js.map +1 -0
- package/build/modern/chunk-QQCB6JXW.js +36 -0
- package/build/modern/chunk-QQCB6JXW.js.map +1 -0
- package/build/modern/chunk-R2V75WU6.js +1 -0
- package/build/modern/{chunk-6KZVE4HC.js → chunk-RD2YPFRA.js} +3 -2
- package/build/modern/chunk-RD2YPFRA.js.map +1 -0
- package/build/modern/chunk-RKGFPKKK.js +59 -0
- package/build/modern/chunk-RKGFPKKK.js.map +1 -0
- package/build/modern/chunk-RQCJKDXU.js +21 -0
- package/build/modern/chunk-RQCJKDXU.js.map +1 -0
- package/build/modern/{chunk-APD6IX5R.js → chunk-SRNDDY5D.js} +3 -2
- package/build/modern/chunk-SRNDDY5D.js.map +1 -0
- package/build/modern/chunk-SYPAA5YF.js +17 -0
- package/build/modern/chunk-SYPAA5YF.js.map +1 -0
- package/build/modern/chunk-TEMFCS72.js +19 -0
- package/build/modern/chunk-TEMFCS72.js.map +1 -0
- package/build/modern/chunk-TNSIYRF7.js +47 -0
- package/build/modern/chunk-TNSIYRF7.js.map +1 -0
- package/build/modern/chunk-U3ISYEUF.js +1 -0
- package/build/modern/chunk-UR2NYAQC.js +1 -0
- package/build/modern/{chunk-SLHYBPJ5.js → chunk-V6LNXFJV.js} +2 -2
- package/build/modern/chunk-V6LNXFJV.js.map +1 -0
- package/build/modern/{chunk-ZFFW5ELD.js → chunk-VOYXV3US.js} +11 -13
- package/build/modern/chunk-VOYXV3US.js.map +1 -0
- package/build/modern/{chunk-IW3LIRDG.js → chunk-VV2G62UD.js} +3 -3
- package/build/modern/{chunk-IW3LIRDG.js.map → chunk-VV2G62UD.js.map} +1 -1
- package/build/modern/chunk-W47QEZD5.js +71 -0
- package/build/modern/chunk-W47QEZD5.js.map +1 -0
- package/build/modern/{chunk-7SU6FCTJ.js → chunk-WMRSNYYG.js} +3 -12
- package/build/modern/chunk-WMRSNYYG.js.map +1 -0
- package/build/modern/chunk-WVFEJCUN.js +59 -0
- package/build/modern/chunk-WVFEJCUN.js.map +1 -0
- package/build/modern/chunk-XBDEIBW2.js +21 -0
- package/build/modern/chunk-XBDEIBW2.js.map +1 -0
- package/build/modern/chunk-XBUXVNTY.js +22 -0
- package/build/modern/chunk-XBUXVNTY.js.map +1 -0
- package/build/modern/chunk-YUNLWTUB.js +21 -0
- package/build/modern/chunk-YUNLWTUB.js.map +1 -0
- package/build/modern/{chunk-P3SF56LT.js → chunk-Z5K4J4MS.js} +4 -4
- package/build/modern/chunk-Z5K4J4MS.js.map +1 -0
- package/build/modern/chunk-ZOSGUATV.js +1 -0
- package/build/modern/components/AnimatingUploadIcon.d.ts +2 -0
- package/build/modern/components/AnimatingUploadIcon.js +1 -1
- package/build/modern/components/CircularProgress.d.ts +2 -0
- package/build/modern/components/Droppable.d.ts +2 -0
- package/build/modern/components/FeatureFlag.d.ts +2 -0
- package/build/modern/components/FileStatus.d.ts +6 -0
- package/build/modern/components/FileStatus.js +7 -5
- package/build/modern/components/FileUploader.d.ts +2 -0
- package/build/modern/components/FileUploader.js +6 -2
- package/build/modern/components/IconButton.d.ts +3 -0
- package/build/modern/components/IconButton.js +1 -1
- package/build/modern/components/Menu.d.ts +7 -0
- package/build/modern/components/Portal.d.ts +2 -0
- package/build/modern/components/ProgressBar.d.ts +5 -0
- package/build/modern/components/ProgressBar.js +1 -1
- package/build/modern/components/Show.d.ts +2 -0
- package/build/modern/components/Spinner.d.ts +2 -0
- package/build/modern/components/Tag.d.ts +4 -0
- package/build/modern/components/Tag.js +2 -1
- package/build/modern/components/Text.d.ts +4 -0
- package/build/modern/components/Tooltip.d.ts +2 -0
- package/build/modern/components/accordion/index.d.ts +9 -0
- package/build/modern/components/accordion/index.js +31 -0
- package/build/modern/components/accordion/item-group.d.ts +3 -0
- package/build/modern/components/accordion/item-group.js +16 -0
- package/build/modern/components/accordion/item-indicator.d.ts +1 -0
- package/build/modern/components/accordion/item-indicator.js +11 -0
- package/build/modern/components/accordion/parts.d.ts +1 -0
- package/build/modern/components/accordion/parts.js +8 -0
- package/build/modern/components/accordion/primitives.d.ts +5 -0
- package/build/modern/components/accordion/primitives.js +15 -0
- package/build/modern/components/admonition/admonition.d.ts +2 -0
- package/build/modern/components/admonition/admonition.js +17 -0
- package/build/modern/components/admonition/index.d.ts +8 -0
- package/build/modern/components/admonition/index.js +32 -0
- package/build/modern/components/admonition/match-avatar.d.ts +1 -0
- package/build/modern/components/admonition/match-avatar.js +15 -0
- package/build/modern/components/admonition/parts.d.ts +1 -0
- package/build/modern/components/admonition/parts.js +8 -0
- package/build/modern/components/admonition/primitives.d.ts +5 -0
- package/build/modern/components/admonition/primitives.js +15 -0
- package/build/modern/components/avatar/avatar.d.ts +3 -0
- package/build/modern/components/avatar/avatar.js +12 -0
- package/build/modern/components/avatar/index.d.ts +8 -0
- package/build/modern/components/avatar/index.js +26 -0
- package/build/modern/components/avatar/index.js.map +1 -0
- package/build/modern/components/avatar/parts.d.ts +1 -0
- package/build/modern/components/avatar/parts.js +8 -0
- package/build/modern/components/avatar/parts.js.map +1 -0
- package/build/modern/components/avatar/primitives.d.ts +3 -0
- package/build/modern/components/avatar/primitives.js +11 -0
- package/build/modern/components/avatar/primitives.js.map +1 -0
- package/build/modern/components/button/button.d.ts +3 -0
- package/build/modern/components/button/button.js +1 -1
- package/build/modern/components/button/index.d.ts +4 -0
- package/build/modern/components/button/index.js +2 -2
- package/build/modern/components/button/parts.d.ts +1 -0
- package/build/modern/components/button/parts.js +2 -2
- package/build/modern/components/checkbox/checkbox-icon.d.ts +1 -0
- package/build/modern/components/checkbox/checkbox.d.ts +2 -0
- package/build/modern/components/checkbox/checkbox.js +2 -2
- package/build/modern/components/checkbox/index.d.ts +9 -0
- package/build/modern/components/checkbox/index.js +2 -2
- package/build/modern/components/checkbox/parts.d.ts +1 -0
- package/build/modern/components/checkbox/primitives.d.ts +6 -0
- package/build/modern/components/combobox/combobox.d.ts +2 -0
- package/build/modern/components/combobox/combobox.js +13 -0
- package/build/modern/components/combobox/combobox.js.map +1 -0
- package/build/modern/components/combobox/index.d.ts +24 -0
- package/build/modern/components/combobox/index.js +60 -0
- package/build/modern/components/combobox/index.js.map +1 -0
- package/build/modern/components/combobox/item-group.d.ts +2 -0
- package/build/modern/components/combobox/item-group.js +9 -0
- package/build/modern/components/combobox/item-group.js.map +1 -0
- package/build/modern/components/combobox/item.d.ts +1 -0
- package/build/modern/components/combobox/item.js +11 -0
- package/build/modern/components/combobox/item.js.map +1 -0
- package/build/modern/components/combobox/parts.d.ts +1 -0
- package/build/modern/components/combobox/parts.js +8 -0
- package/build/modern/components/combobox/parts.js.map +1 -0
- package/build/modern/components/combobox/primitives.d.ts +16 -0
- package/build/modern/components/combobox/primitives.js +35 -0
- package/build/modern/components/combobox/primitives.js.map +1 -0
- package/build/modern/components/combobox/use-stateful-collection.d.ts +2 -0
- package/build/modern/components/combobox/use-stateful-collection.js +9 -0
- package/build/modern/components/combobox/use-stateful-collection.js.map +1 -0
- package/build/modern/components/cta-dialog/context.d.ts +3 -0
- package/build/modern/components/cta-dialog/context.js +8 -0
- package/build/modern/components/cta-dialog/context.js.map +1 -0
- package/build/modern/components/cta-dialog/index.d.ts +6 -0
- package/build/modern/components/cta-dialog/index.js +33 -0
- package/build/modern/components/cta-dialog/index.js.map +1 -0
- package/build/modern/components/cta-dialog/provider.d.ts +2 -0
- package/build/modern/components/cta-dialog/provider.js +29 -0
- package/build/modern/components/cta-dialog/provider.js.map +1 -0
- package/build/modern/components/cta-dialog/trigger-item.d.ts +2 -0
- package/build/modern/components/cta-dialog/trigger-item.js +10 -0
- package/build/modern/components/cta-dialog/trigger-item.js.map +1 -0
- package/build/modern/components/cta-dialog/utils.d.ts +4 -0
- package/build/modern/components/cta-dialog/utils.js +7 -0
- package/build/modern/components/cta-dialog/utils.js.map +1 -0
- package/build/modern/components/date-picker/calendar.d.ts +1 -0
- package/build/modern/components/date-picker/calendar.js +20 -0
- package/build/modern/components/date-picker/calendar.js.map +1 -0
- package/build/modern/components/date-picker/content.d.ts +1 -0
- package/build/modern/components/date-picker/content.js +10 -0
- package/build/modern/components/date-picker/content.js.map +1 -0
- package/build/modern/components/date-picker/date-picker.d.ts +1 -0
- package/build/modern/components/date-picker/date-picker.js +9 -0
- package/build/modern/components/date-picker/date-picker.js.map +1 -0
- package/build/modern/components/date-picker/day-view.d.ts +2 -0
- package/build/modern/components/date-picker/day-view.js +16 -0
- package/build/modern/components/date-picker/day-view.js.map +1 -0
- package/build/modern/components/date-picker/index.d.ts +30 -0
- package/build/modern/components/date-picker/index.js +86 -0
- package/build/modern/components/date-picker/index.js.map +1 -0
- package/build/modern/components/date-picker/input.d.ts +1 -0
- package/build/modern/components/date-picker/input.js +12 -0
- package/build/modern/components/date-picker/input.js.map +1 -0
- package/build/modern/components/date-picker/month-view.d.ts +1 -0
- package/build/modern/components/date-picker/month-view.js +16 -0
- package/build/modern/components/date-picker/month-view.js.map +1 -0
- package/build/modern/components/date-picker/parts.d.ts +1 -0
- package/build/modern/components/date-picker/parts.js +8 -0
- package/build/modern/components/date-picker/parts.js.map +1 -0
- package/build/modern/components/date-picker/primitives.d.ts +24 -0
- package/build/modern/components/date-picker/primitives.js +53 -0
- package/build/modern/components/date-picker/primitives.js.map +1 -0
- package/build/modern/components/date-picker/range-input.d.ts +2 -0
- package/build/modern/components/date-picker/range-input.js +13 -0
- package/build/modern/components/date-picker/range-input.js.map +1 -0
- package/build/modern/components/date-picker/trigger.d.ts +1 -0
- package/build/modern/components/date-picker/trigger.js +12 -0
- package/build/modern/components/date-picker/trigger.js.map +1 -0
- package/build/modern/components/date-picker/view-control-group.d.ts +1 -0
- package/build/modern/components/date-picker/view-control-group.js +15 -0
- package/build/modern/components/date-picker/view-control-group.js.map +1 -0
- package/build/modern/components/date-picker/year-view.d.ts +1 -0
- package/build/modern/components/date-picker/year-view.js +16 -0
- package/build/modern/components/date-picker/year-view.js.map +1 -0
- package/build/modern/components/deprecated/FieldMessage.d.ts +3 -0
- package/build/modern/components/deprecated/FieldsetLabel.d.ts +2 -0
- package/build/modern/components/deprecated/Label.d.ts +3 -0
- package/build/modern/components/deprecated/Label.js +1 -1
- package/build/modern/components/deprecated/Legend.d.ts +2 -0
- package/build/modern/components/deprecated/Legend.js +9 -0
- package/build/modern/components/deprecated/Legend.js.map +1 -0
- package/build/modern/components/deprecated/Modal.d.ts +2 -0
- package/build/modern/components/deprecated/ModalDescription.d.ts +2 -0
- package/build/modern/components/deprecated/ModalHeader.d.ts +2 -0
- package/build/modern/components/deprecated/ModalHeading.d.ts +2 -0
- package/build/modern/components/deprecated/NavMenuLink.d.ts +2 -0
- package/build/modern/components/deprecated/NavMenuList.d.ts +3 -0
- package/build/modern/components/deprecated/NavMenuTrigger.d.ts +2 -0
- package/build/modern/components/deprecated/NavMenuTrigger.js +2 -2
- package/build/modern/components/deprecated/Notification.d.ts +3 -0
- package/build/modern/components/deprecated/Notification.js +10 -0
- package/build/modern/components/deprecated/Notification.js.map +1 -0
- package/build/modern/components/deprecated/NotificationDescription.d.ts +3 -0
- package/build/modern/components/deprecated/NotificationDescription.js +7 -0
- package/build/modern/components/deprecated/NotificationDescription.js.map +1 -0
- package/build/modern/components/deprecated/NotificationHeading.d.ts +3 -0
- package/build/modern/components/deprecated/NotificationHeading.js +7 -0
- package/build/modern/components/deprecated/NotificationHeading.js.map +1 -0
- package/build/modern/components/dialog/close-icon-trigger.d.ts +1 -0
- package/build/modern/components/dialog/close-icon-trigger.js +11 -0
- package/build/modern/components/dialog/close-icon-trigger.js.map +1 -0
- package/build/modern/components/dialog/dialog.d.ts +2 -0
- package/build/modern/components/dialog/dialog.js +9 -0
- package/build/modern/components/dialog/dialog.js.map +1 -0
- package/build/modern/components/dialog/index.d.ts +13 -0
- package/build/modern/components/dialog/index.js +39 -0
- package/build/modern/components/dialog/index.js.map +1 -0
- package/build/modern/components/dialog/parts.d.ts +1 -0
- package/build/modern/components/dialog/parts.js +8 -0
- package/build/modern/components/dialog/parts.js.map +1 -0
- package/build/modern/components/dialog/primitives.d.ts +9 -0
- package/build/modern/components/{Dialog.js → dialog/primitives.js} +4 -5
- package/build/modern/components/dialog/primitives.js.map +1 -0
- package/build/modern/components/field/field.d.ts +2 -0
- package/build/modern/components/field/field.js +1 -1
- package/build/modern/components/field/index.d.ts +18 -0
- package/build/modern/components/field/index.js +1 -1
- package/build/modern/components/field/parts.d.ts +1 -0
- package/build/modern/components/field/primitives.d.ts +11 -0
- package/build/modern/components/field/start-indicator.d.ts +2 -0
- package/build/modern/components/field/status-indicator.d.ts +2 -0
- package/build/modern/components/fieldset/fieldset.d.ts +2 -0
- package/build/modern/components/fieldset/index.d.ts +7 -0
- package/build/modern/components/fieldset/parts.d.ts +1 -0
- package/build/modern/components/fieldset/primitives.d.ts +4 -0
- package/build/modern/components/for.d.ts +2 -0
- package/build/modern/components/for.js +1 -1
- package/build/modern/components/notifications/center.d.ts +3 -0
- package/build/modern/components/notifications/center.js +20 -0
- package/build/modern/components/notifications/center.js.map +1 -0
- package/build/modern/components/notifications/close-trigger.d.ts +1 -0
- package/build/modern/components/notifications/close-trigger.js +11 -0
- package/build/modern/components/notifications/close-trigger.js.map +1 -0
- package/build/modern/components/notifications/index.d.ts +12 -0
- package/build/modern/components/notifications/index.js +37 -0
- package/build/modern/components/notifications/index.js.map +1 -0
- package/build/modern/components/notifications/match-icon.d.ts +1 -0
- package/build/modern/components/notifications/match-icon.js +10 -0
- package/build/modern/components/notifications/match-icon.js.map +1 -0
- package/build/modern/components/notifications/parts.d.ts +1 -0
- package/build/modern/components/notifications/parts.js +8 -0
- package/build/modern/components/notifications/parts.js.map +1 -0
- package/build/modern/components/notifications/primitives.d.ts +6 -0
- package/build/modern/components/notifications/primitives.js +17 -0
- package/build/modern/components/notifications/primitives.js.map +1 -0
- package/build/modern/components/notifications/types.d.ts +2 -0
- package/build/modern/components/notifications/types.js +2 -0
- package/build/modern/components/notifications/types.js.map +1 -0
- package/build/modern/components/radio/index.d.ts +11 -0
- package/build/modern/components/radio/index.js +3 -3
- package/build/modern/components/radio/parts.d.ts +1 -0
- package/build/modern/components/radio/primitives.d.ts +8 -0
- package/build/modern/components/radio/radio.d.ts +2 -0
- package/build/modern/components/rating/index.d.ts +12 -0
- package/build/modern/components/rating/index.js +31 -0
- package/build/modern/components/rating/index.js.map +1 -0
- package/build/modern/components/rating/parts.d.ts +1 -0
- package/build/modern/components/rating/parts.js +8 -0
- package/build/modern/components/rating/parts.js.map +1 -0
- package/build/modern/components/rating/primitives.d.ts +7 -0
- package/build/modern/components/rating/primitives.js +19 -0
- package/build/modern/components/rating/primitives.js.map +1 -0
- package/build/modern/components/rating/rating.d.ts +2 -0
- package/build/modern/components/rating/rating.js +12 -0
- package/build/modern/components/rating/rating.js.map +1 -0
- package/build/modern/components/select/index.d.ts +28 -0
- package/build/modern/components/select/index.js +2 -2
- package/build/modern/components/select/option-group.d.ts +2 -0
- package/build/modern/components/select/parts.d.ts +1 -0
- package/build/modern/components/select/primitives.d.ts +18 -0
- package/build/modern/components/select/select.d.ts +7 -0
- package/build/modern/components/select/select.js +2 -2
- package/build/modern/components/switch/index.d.ts +8 -0
- package/build/modern/components/switch/index.js +2 -2
- package/build/modern/components/switch/parts.d.ts +1 -0
- package/build/modern/components/switch/parts.js +1 -1
- package/build/modern/components/switch/primitives.d.ts +5 -0
- package/build/modern/components/switch/switch-indicator.d.ts +1 -0
- package/build/modern/components/switch/switch.d.ts +2 -0
- package/build/modern/components/switch/switch.js +2 -2
- package/build/modern/components/table/index.d.ts +13 -0
- package/build/modern/components/table/index.js +35 -0
- package/build/modern/components/table/index.js.map +1 -0
- package/build/modern/components/table/parts.d.ts +2 -0
- package/build/modern/components/table/parts.js +8 -0
- package/build/modern/components/table/parts.js.map +1 -0
- package/build/modern/components/table/primitives.d.ts +10 -0
- package/build/modern/components/table/primitives.js +25 -0
- package/build/modern/components/table/primitives.js.map +1 -0
- package/build/modern/components/table/table.d.ts +1 -0
- package/build/modern/components/table/table.js +9 -0
- package/build/modern/components/table/table.js.map +1 -0
- package/build/modern/components/tabs/index.d.ts +8 -0
- package/build/modern/components/tabs/index.js +24 -0
- package/build/modern/components/tabs/index.js.map +1 -0
- package/build/modern/components/tabs/parts.d.ts +2 -0
- package/build/modern/components/tabs/parts.js +8 -0
- package/build/modern/components/tabs/parts.js.map +1 -0
- package/build/modern/components/tabs/primitives.d.ts +5 -0
- package/build/modern/components/tabs/primitives.js +15 -0
- package/build/modern/components/tabs/primitives.js.map +1 -0
- package/build/modern/components/tabs/tabs.d.ts +1 -0
- package/build/modern/components/tabs/tabs.js +9 -0
- package/build/modern/components/tabs/tabs.js.map +1 -0
- package/build/modern/components/toggle/index.d.ts +3 -0
- package/build/modern/components/toggle/parts.d.ts +1 -0
- package/build/modern/components/toggle/primitives.d.ts +2 -0
- package/build/modern/config/defineIcons.d.ts +1 -0
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/config/icons/checkbox.icons.d.ts +4 -0
- package/build/modern/config/index.d.ts +5 -0
- package/build/modern/config/index.js +2 -2
- package/build/modern/config/types.d.ts +3 -0
- package/build/modern/context/cerberus.d.ts +2 -0
- package/build/modern/context/confirm-modal.d.ts +9 -0
- package/build/modern/context/confirm-modal.js +14 -5
- package/build/modern/context/feature-flags.d.ts +4 -0
- package/build/modern/context/field.d.ts +3 -0
- package/build/modern/context/navMenu.d.ts +5 -0
- package/build/modern/context/notification-center/store.d.ts +5 -0
- package/build/modern/context/notification-center/types.d.ts +6 -0
- package/build/modern/context/notification-center.d.ts +5 -0
- package/build/modern/context/notification-center.js +175 -12
- package/build/modern/context/notification-center.js.map +1 -1
- package/build/modern/context/prompt-modal.d.ts +6 -0
- package/build/modern/context/prompt-modal.js +13 -6
- package/build/modern/context/theme.d.ts +7 -0
- package/build/modern/hooks/useDate.d.ts +8 -0
- package/build/modern/hooks/useModal.d.ts +2 -0
- package/build/modern/hooks/useRootColors.d.ts +2 -0
- package/build/modern/hooks/useTheme.d.ts +4 -0
- package/build/modern/hooks/useToggle.d.ts +3 -0
- package/build/modern/index.d.ts +462 -0
- package/build/modern/index.js +458 -271
- package/build/modern/index.js.map +1 -1
- package/build/modern/types.d.ts +1 -0
- package/build/modern/utils/index.d.ts +4 -0
- package/build/modern/utils/localStorage.d.ts +2 -0
- package/package.json +4 -6
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/AnimatingUploadIcon.tsx +2 -2
- package/src/components/FileStatus.tsx +2 -4
- package/src/components/FileUploader.tsx +2 -8
- package/src/components/IconButton.tsx +3 -4
- package/src/components/ProgressBar.tsx +5 -5
- package/src/components/Tag.tsx +16 -24
- package/src/components/accordion/index.ts +3 -0
- package/src/components/accordion/item-group.tsx +66 -0
- package/src/components/accordion/item-indicator.tsx +27 -0
- package/src/components/accordion/parts.ts +53 -0
- package/src/components/accordion/primitives.tsx +101 -0
- package/src/components/admonition/admonition.tsx +65 -0
- package/src/components/admonition/index.ts +3 -0
- package/src/components/admonition/match-avatar.tsx +52 -0
- package/src/components/admonition/parts.ts +53 -0
- package/src/components/admonition/primitives.tsx +73 -0
- package/src/components/avatar/avatar.tsx +55 -0
- package/src/components/avatar/index.ts +5 -0
- package/src/components/avatar/parts.ts +37 -0
- package/src/components/avatar/primitives.tsx +53 -0
- package/src/components/button/button.tsx +4 -4
- package/src/components/checkbox/checkbox.tsx +2 -2
- package/src/components/combobox/combobox.tsx +66 -0
- package/src/components/combobox/index.ts +6 -0
- package/src/components/combobox/item-group.tsx +19 -0
- package/src/components/combobox/item.tsx +30 -0
- package/src/components/combobox/parts.ts +101 -0
- package/src/components/combobox/primitives.tsx +209 -0
- package/src/components/combobox/use-stateful-collection.ts +65 -0
- package/src/components/cta-dialog/context.tsx +34 -0
- package/src/components/cta-dialog/index.ts +2 -0
- package/src/{context/cta-modal.tsx → components/cta-dialog/provider.tsx} +35 -71
- package/src/components/cta-dialog/trigger-item.tsx +53 -0
- package/src/components/cta-dialog/utils.ts +57 -0
- package/src/components/date-picker/calendar.tsx +34 -0
- package/src/components/date-picker/content.tsx +29 -0
- package/src/components/date-picker/date-picker.tsx +32 -0
- package/src/components/date-picker/day-view.tsx +82 -0
- package/src/components/date-picker/index.ts +6 -0
- package/src/components/date-picker/input.tsx +26 -0
- package/src/components/date-picker/month-view.tsx +51 -0
- package/src/components/date-picker/parts.ts +167 -0
- package/src/components/date-picker/primitives.tsx +232 -0
- package/src/components/date-picker/range-input.tsx +53 -0
- package/src/components/date-picker/trigger.tsx +28 -0
- package/src/components/date-picker/view-control-group.tsx +54 -0
- package/src/components/date-picker/year-view.tsx +49 -0
- package/src/components/{Legend.tsx → deprecated/Legend.tsx} +3 -34
- package/src/components/{Notification.tsx → deprecated/Notification.tsx} +3 -15
- package/src/components/{NotificationDescription.tsx → deprecated/NotificationDescription.tsx} +1 -4
- package/src/components/{NotificationHeading.tsx → deprecated/NotificationHeading.tsx} +1 -4
- package/src/components/{Dialog.client.tsx → dialog/close-icon-trigger.tsx} +11 -13
- package/src/components/dialog/dialog.tsx +41 -0
- package/src/components/dialog/index.ts +4 -0
- package/src/components/dialog/parts.ts +71 -0
- package/src/components/dialog/primitives.tsx +116 -0
- package/src/components/for.tsx +13 -18
- package/src/components/notifications/center.tsx +74 -0
- package/src/components/notifications/close-trigger.tsx +21 -0
- package/src/components/notifications/index.ts +4 -0
- package/src/components/notifications/match-icon.tsx +37 -0
- package/src/components/notifications/parts.ts +53 -0
- package/src/components/notifications/primitives.tsx +74 -0
- package/src/components/notifications/types.ts +32 -0
- package/src/components/rating/index.ts +8 -0
- package/src/components/rating/parts.tsx +65 -0
- package/src/components/rating/primitives.tsx +99 -0
- package/src/components/rating/rating.tsx +78 -0
- package/src/components/select/select.tsx +1 -0
- package/src/components/switch/parts.ts +3 -3
- package/src/components/table/index.ts +3 -0
- package/src/components/table/parts.ts +83 -0
- package/src/components/table/primitives.tsx +163 -0
- package/src/components/table/table.tsx +75 -0
- package/src/components/tabs/index.ts +3 -0
- package/src/components/tabs/parts.ts +53 -0
- package/src/components/tabs/primitives.tsx +70 -0
- package/src/components/tabs/tabs.tsx +48 -0
- package/src/context/confirm-modal.tsx +4 -8
- package/src/context/notification-center.tsx +9 -41
- package/src/context/prompt-modal.tsx +4 -8
- package/src/index.ts +14 -24
- package/build/legacy/components/Accordion.cjs.map +0 -1
- package/build/legacy/components/Accordion.client.cjs +0 -64
- package/build/legacy/components/Accordion.client.cjs.map +0 -1
- package/build/legacy/components/AccordionItemGroup.cjs +0 -142
- package/build/legacy/components/AccordionItemGroup.cjs.map +0 -1
- package/build/legacy/components/Admonition.cjs +0 -273
- package/build/legacy/components/Admonition.cjs.map +0 -1
- package/build/legacy/components/Admonition.client.cjs +0 -219
- package/build/legacy/components/Admonition.client.cjs.map +0 -1
- package/build/legacy/components/Avatar.cjs +0 -146
- package/build/legacy/components/Avatar.cjs.map +0 -1
- package/build/legacy/components/DatePicker.client.cjs +0 -341
- package/build/legacy/components/DatePicker.client.cjs.map +0 -1
- package/build/legacy/components/DatePicker.server.cjs +0 -111
- package/build/legacy/components/DatePicker.server.cjs.map +0 -1
- package/build/legacy/components/Dialog.cjs +0 -86
- package/build/legacy/components/Dialog.cjs.map +0 -1
- package/build/legacy/components/Dialog.client.cjs.map +0 -1
- package/build/legacy/components/Legend.cjs.map +0 -1
- package/build/legacy/components/Notification.cjs.map +0 -1
- package/build/legacy/components/NotificationDescription.cjs.map +0 -1
- package/build/legacy/components/NotificationHeading.cjs.map +0 -1
- package/build/legacy/components/Table.cjs +0 -53
- package/build/legacy/components/Table.cjs.map +0 -1
- package/build/legacy/components/Tabs.client.cjs +0 -104
- package/build/legacy/components/Tabs.client.cjs.map +0 -1
- package/build/legacy/components/Tbody.cjs +0 -48
- package/build/legacy/components/Tbody.cjs.map +0 -1
- package/build/legacy/components/Td.cjs.map +0 -1
- package/build/legacy/components/Th.cjs +0 -84
- package/build/legacy/components/Th.cjs.map +0 -1
- package/build/legacy/components/Thead.cjs.map +0 -1
- package/build/legacy/context/cta-modal.cjs +0 -374
- package/build/legacy/context/cta-modal.cjs.map +0 -1
- package/build/legacy/context/tabs.cjs +0 -107
- package/build/legacy/context/tabs.cjs.map +0 -1
- package/build/legacy/noExternals.d.cts +0 -1
- package/build/modern/chunk-2HOUQ2DX.js +0 -82
- package/build/modern/chunk-2HOUQ2DX.js.map +0 -1
- package/build/modern/chunk-3R4TIF2X.js +0 -24
- package/build/modern/chunk-3R4TIF2X.js.map +0 -1
- package/build/modern/chunk-5EWCH7AI.js +0 -82
- package/build/modern/chunk-5EWCH7AI.js.map +0 -1
- package/build/modern/chunk-6BN3XKQF.js.map +0 -1
- package/build/modern/chunk-6KZVE4HC.js.map +0 -1
- package/build/modern/chunk-7SU6FCTJ.js.map +0 -1
- package/build/modern/chunk-APD6IX5R.js.map +0 -1
- package/build/modern/chunk-AZRFYQO7.js +0 -60
- package/build/modern/chunk-AZRFYQO7.js.map +0 -1
- package/build/modern/chunk-B4CVET74.js +0 -28
- package/build/modern/chunk-B4CVET74.js.map +0 -1
- package/build/modern/chunk-CMYD5KWA.js.map +0 -1
- package/build/modern/chunk-DXBZ3HMY.js +0 -68
- package/build/modern/chunk-DXBZ3HMY.js.map +0 -1
- package/build/modern/chunk-FMRWRVUS.js +0 -180
- package/build/modern/chunk-FMRWRVUS.js.map +0 -1
- package/build/modern/chunk-H54FR7IP.js.map +0 -1
- package/build/modern/chunk-IIH363FO.js +0 -13
- package/build/modern/chunk-IIH363FO.js.map +0 -1
- package/build/modern/chunk-KQQPZJEI.js.map +0 -1
- package/build/modern/chunk-MISIUX63.js.map +0 -1
- package/build/modern/chunk-N7O6D7BW.js +0 -63
- package/build/modern/chunk-N7O6D7BW.js.map +0 -1
- package/build/modern/chunk-P3SF56LT.js.map +0 -1
- package/build/modern/chunk-RBNOEAWJ.js.map +0 -1
- package/build/modern/chunk-RDRD6ACD.js.map +0 -1
- package/build/modern/chunk-RHCTPSKT.js +0 -204
- package/build/modern/chunk-RHCTPSKT.js.map +0 -1
- package/build/modern/chunk-RZ7NG77U.js +0 -77
- package/build/modern/chunk-RZ7NG77U.js.map +0 -1
- package/build/modern/chunk-SGKHA4EB.js +0 -50
- package/build/modern/chunk-SGKHA4EB.js.map +0 -1
- package/build/modern/chunk-SLHYBPJ5.js.map +0 -1
- package/build/modern/chunk-SXLPDPOZ.js +0 -105
- package/build/modern/chunk-SXLPDPOZ.js.map +0 -1
- package/build/modern/chunk-TFL56AYR.js +0 -56
- package/build/modern/chunk-TFL56AYR.js.map +0 -1
- package/build/modern/chunk-UXY3KCC3.js.map +0 -1
- package/build/modern/chunk-WN7TJX6J.js +0 -41
- package/build/modern/chunk-WN7TJX6J.js.map +0 -1
- package/build/modern/chunk-WZJ5UQNM.js.map +0 -1
- package/build/modern/chunk-XZGXRRSQ.js +0 -31
- package/build/modern/chunk-XZGXRRSQ.js.map +0 -1
- package/build/modern/chunk-Y4ZEJ2EF.js.map +0 -1
- package/build/modern/chunk-Y6QQCRQV.js +0 -12
- package/build/modern/chunk-Y6QQCRQV.js.map +0 -1
- package/build/modern/chunk-ZDANBCM3.js.map +0 -1
- package/build/modern/chunk-ZFFW5ELD.js.map +0 -1
- package/build/modern/chunk-ZR37P4NZ.js +0 -24
- package/build/modern/chunk-ZR37P4NZ.js.map +0 -1
- package/build/modern/components/Accordion.client.js +0 -9
- package/build/modern/components/Accordion.js +0 -13
- package/build/modern/components/AccordionItemGroup.js +0 -11
- package/build/modern/components/Admonition.client.js +0 -11
- package/build/modern/components/Admonition.js +0 -15
- package/build/modern/components/Avatar.js +0 -10
- package/build/modern/components/DatePicker.client.js +0 -33
- package/build/modern/components/DatePicker.server.js +0 -21
- package/build/modern/components/Dialog.client.js +0 -10
- package/build/modern/components/Legend.js +0 -9
- package/build/modern/components/Notification.js +0 -10
- package/build/modern/components/NotificationDescription.js +0 -7
- package/build/modern/components/NotificationHeading.js +0 -7
- package/build/modern/components/Table.js +0 -9
- package/build/modern/components/Tabs.client.js +0 -18
- package/build/modern/components/Tbody.js +0 -7
- package/build/modern/components/Td.js +0 -7
- package/build/modern/components/Th.js +0 -9
- package/build/modern/components/Thead.js +0 -7
- package/build/modern/context/cta-modal.js +0 -19
- package/build/modern/context/tabs.js +0 -13
- package/build/modern/noExternals.d.ts +0 -1
- package/src/components/Accordion.client.tsx +0 -46
- package/src/components/Accordion.tsx +0 -125
- package/src/components/AccordionItemGroup.tsx +0 -79
- package/src/components/Admonition.client.tsx +0 -73
- package/src/components/Admonition.tsx +0 -117
- package/src/components/Avatar.tsx +0 -162
- package/src/components/DatePicker.client.tsx +0 -449
- package/src/components/DatePicker.server.tsx +0 -156
- package/src/components/Dialog.tsx +0 -165
- package/src/components/Table.tsx +0 -61
- package/src/components/Tabs.client.tsx +0 -113
- package/src/components/Tbody.tsx +0 -36
- package/src/components/Td.tsx +0 -34
- package/src/components/Th.tsx +0 -73
- package/src/components/Thead.tsx +0 -24
- package/src/context/tabs.tsx +0 -133
- /package/build/modern/{components/Accordion.client.js.map → chunk-4HVKAHBX.js.map} +0 -0
- /package/build/modern/{chunk-245SMQ45.js.map → chunk-CHSC2LEM.js.map} +0 -0
- /package/build/modern/{components/Accordion.js.map → chunk-DJOYRUNT.js.map} +0 -0
- /package/build/modern/{components/AccordionItemGroup.js.map → chunk-IKDXADLX.js.map} +0 -0
- /package/build/modern/{components/Admonition.client.js.map → chunk-IOLYX3SY.js.map} +0 -0
- /package/build/modern/{chunk-2BIHLH4V.js.map → chunk-JAAMD5EH.js.map} +0 -0
- /package/build/modern/{chunk-OVHCXBBI.js.map → chunk-JOM5AAVW.js.map} +0 -0
- /package/build/modern/{components/Admonition.js.map → chunk-M6WOFFOA.js.map} +0 -0
- /package/build/modern/{chunk-5SNLQZYP.js.map → chunk-M7T3MBFB.js.map} +0 -0
- /package/build/modern/{components/Avatar.js.map → chunk-ML2IKLMJ.js.map} +0 -0
- /package/build/modern/{components/DatePicker.client.js.map → chunk-MV2AU6UV.js.map} +0 -0
- /package/build/modern/{components/DatePicker.server.js.map → chunk-R2V75WU6.js.map} +0 -0
- /package/build/modern/{components/Dialog.client.js.map → chunk-U3ISYEUF.js.map} +0 -0
- /package/build/modern/{components/Dialog.js.map → chunk-UR2NYAQC.js.map} +0 -0
- /package/build/modern/{components/Legend.js.map → chunk-ZOSGUATV.js.map} +0 -0
- /package/build/modern/components/{Notification.js.map → accordion/index.js.map} +0 -0
- /package/build/modern/components/{NotificationDescription.js.map → accordion/item-group.js.map} +0 -0
- /package/build/modern/components/{NotificationHeading.js.map → accordion/item-indicator.js.map} +0 -0
- /package/build/modern/components/{Table.js.map → accordion/parts.js.map} +0 -0
- /package/build/modern/components/{Tabs.client.js.map → accordion/primitives.js.map} +0 -0
- /package/build/modern/components/{Tbody.js.map → admonition/admonition.js.map} +0 -0
- /package/build/modern/components/{Td.js.map → admonition/index.js.map} +0 -0
- /package/build/modern/components/{Th.js.map → admonition/match-avatar.js.map} +0 -0
- /package/build/modern/components/{Thead.js.map → admonition/parts.js.map} +0 -0
- /package/build/modern/{context/cta-modal.js.map → components/admonition/primitives.js.map} +0 -0
- /package/build/modern/{context/tabs.js.map → components/avatar/avatar.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/components/Avatar.tsx","../../../src/components/Show.tsx","../../../src/utils/index.ts","../../../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'\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 ariaLabel=\"\"\n gradient={modalIconPalette}\n icon={<MatchFileStatusIcon size={24} status={status} />}\n src=\"\"\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 { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLAttributes<HTMLDivElement>\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 <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 <div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </div>\n )\n}\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } 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\n extends ButtonHTMLAttributes<HTMLButtonElement> {\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 <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","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { circle } from '@cerberus/styled-system/patterns'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HtmlHTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains the Avatar component.\n * @module\n */\n\nexport type SharedAvatarProps = {\n /**\n * An optional icon to show when no src or ariaLabel is provided.\n */\n icon?: ReactNode\n /**\n * The size of the avatar.\n */\n width?: number\n /**\n * The size of the avatar.\n */\n height?: number\n}\nexport type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &\n SharedAvatarProps & {\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel: string\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as?: never\n /**\n * The source of the image.\n */\n src: string\n }\nexport type AvatarAsProps = SharedAvatarProps & {\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as: ReactNode\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel?: never\n /**\n * The source of the image.\n */\n src?: never\n}\n\nexport type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &\n AvatarVariantProps) &\n (AvatarImageProps | AvatarAsProps)\n\n/**\n * The Avatar component is used to represent a user or entity. It will show an image if src provided, otherwise it will show the ariaLabel of the ariaLabel. If the ariaLabel is empty, it will show a `defineIcons().avatar` icon.\n * @see https://cerberus.digitalu.design/react/avatar\n * @example\n * ```tsx\n * <Avatar\n * ariaLabel=\"Protector Cerberus\"\n * src=\"https://cerberus.digitalu.design/logo.svg\"\n * />\n * ```\n */\nexport function Avatar(props: AvatarProps) {\n const {\n ariaLabel,\n as,\n gradient,\n size,\n src,\n width,\n height,\n icon,\n ...nativeProps\n } = props\n const { icons } = useCerberusContext()\n const { avatar: AvatarIcon } = icons\n const initials = (ariaLabel || '')\n .split(' ')\n .map((word) => word[0])\n .join('')\n .slice(0, 2)\n\n return (\n <div\n {...nativeProps}\n className={cx(\n nativeProps.className,\n avatar({ gradient, size }),\n circle(),\n )}\n >\n <Show\n when={Boolean(src) || Boolean(as)}\n fallback={\n <Show\n when={Boolean(initials)}\n fallback={\n <Show\n when={Boolean(icon)}\n fallback={\n <AvatarIcon\n size={iconSizeMap[size as keyof typeof iconSizeMap]}\n />\n }\n >\n {icon}\n </Show>\n }\n >\n {initials}\n </Show>\n }\n >\n <Show\n when={Boolean(as)}\n fallback={\n <img\n alt={props.ariaLabel}\n className={css({\n h: 'full',\n objectFit: 'cover',\n w: 'full',\n })}\n decoding=\"async\"\n loading=\"lazy\"\n src={src}\n height={height}\n width={width}\n />\n }\n >\n {as}\n </Show>\n </Show>\n </div>\n )\n}\n\nconst iconSizeMap = {\n xs: 16,\n sm: 16,\n md: 20,\n lg: 34,\n xl: 32,\n '2xl': 32,\n '3xl': 32,\n '4xl': 32,\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","/**\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 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,IAAAC,mBAA+B;;;ACX/B,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;A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A,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_patterns","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","Field","import_jsx_runtime","processStatus","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 {\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>{fieldPro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,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"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { FileStatus_alias_1 as FileStatus } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { FileStatusKey_alias_1 as FileStatusKey } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { FileStatusActions_alias_1 as FileStatusActions } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { FileBaseStatusProps_alias_1 as FileBaseStatusProps } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { FileStatusProps_alias_1 as FileStatusProps } from '../_tsup-dts-rollup.cjs';
|
|
6
|
+
export { processStatus_alias_1 as processStatus } from '../_tsup-dts-rollup.cjs';
|
|
@@ -25,7 +25,7 @@ __export(FileUploader_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(FileUploader_exports);
|
|
27
27
|
var import_css2 = require("@cerberus/styled-system/css");
|
|
28
|
-
var
|
|
28
|
+
var import_patterns = require("@cerberus/styled-system/patterns");
|
|
29
29
|
|
|
30
30
|
// src/components/Show.tsx
|
|
31
31
|
var import_react = require("react");
|
|
@@ -53,143 +53,121 @@ function useCerberusContext() {
|
|
|
53
53
|
return context;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// src/
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
// src/utils/index.ts
|
|
57
|
+
function splitProps(props, ...keyGroups) {
|
|
58
|
+
const result = keyGroups.map(() => ({}));
|
|
59
|
+
const rest = {};
|
|
60
|
+
for (const key in props) {
|
|
61
|
+
let assigned = false;
|
|
62
|
+
for (let i = 0; i < keyGroups.length; i++) {
|
|
63
|
+
if (keyGroups[i].includes(key)) {
|
|
64
|
+
result[i][key] = props[key];
|
|
65
|
+
assigned = true;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (!assigned) {
|
|
70
|
+
rest[key] = props[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return [...result, rest];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/components/avatar/primitives.tsx
|
|
77
|
+
var import_avatar = require("@ark-ui/react/avatar");
|
|
59
78
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
79
|
+
var import_css = require("@cerberus/styled-system/css");
|
|
60
80
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
61
|
-
function
|
|
62
|
-
const {
|
|
63
|
-
|
|
64
|
-
as,
|
|
65
|
-
gradient,
|
|
66
|
-
size,
|
|
67
|
-
src,
|
|
68
|
-
width,
|
|
69
|
-
height,
|
|
70
|
-
icon,
|
|
71
|
-
...nativeProps
|
|
72
|
-
} = props;
|
|
73
|
-
const { icons } = useCerberusContext();
|
|
74
|
-
const { avatar: AvatarIcon } = icons;
|
|
75
|
-
const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
|
|
81
|
+
function AvatarRoot(props) {
|
|
82
|
+
const { gradient, shape, size, ...rootProps } = props;
|
|
83
|
+
const styles = (0, import_recipes.avatar)({ gradient, shape, size });
|
|
76
84
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
77
|
-
|
|
85
|
+
import_avatar.Avatar.Root,
|
|
78
86
|
{
|
|
79
|
-
...
|
|
80
|
-
className: (0, import_css.cx)(
|
|
81
|
-
nativeProps.className,
|
|
82
|
-
(0, import_recipes.avatar)({ gradient, size }),
|
|
83
|
-
(0, import_patterns.circle)()
|
|
84
|
-
),
|
|
85
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
86
|
-
Show,
|
|
87
|
-
{
|
|
88
|
-
when: Boolean(src) || Boolean(as),
|
|
89
|
-
fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
90
|
-
Show,
|
|
91
|
-
{
|
|
92
|
-
when: Boolean(initials),
|
|
93
|
-
fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
94
|
-
Show,
|
|
95
|
-
{
|
|
96
|
-
when: Boolean(icon),
|
|
97
|
-
fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
98
|
-
AvatarIcon,
|
|
99
|
-
{
|
|
100
|
-
size: iconSizeMap[size]
|
|
101
|
-
}
|
|
102
|
-
),
|
|
103
|
-
children: icon
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
children: initials
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
110
|
-
Show,
|
|
111
|
-
{
|
|
112
|
-
when: Boolean(as),
|
|
113
|
-
fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
|
-
"img",
|
|
115
|
-
{
|
|
116
|
-
alt: props.ariaLabel,
|
|
117
|
-
className: (0, import_css.css)({
|
|
118
|
-
h: "full",
|
|
119
|
-
objectFit: "cover",
|
|
120
|
-
w: "full"
|
|
121
|
-
}),
|
|
122
|
-
decoding: "async",
|
|
123
|
-
loading: "lazy",
|
|
124
|
-
src,
|
|
125
|
-
height,
|
|
126
|
-
width
|
|
127
|
-
}
|
|
128
|
-
),
|
|
129
|
-
children: as
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
)
|
|
87
|
+
...rootProps,
|
|
88
|
+
className: (0, import_css.cx)(styles.root, rootProps.className)
|
|
134
89
|
}
|
|
135
90
|
);
|
|
136
91
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
92
|
+
function AvatarImage(props) {
|
|
93
|
+
const styles = (0, import_recipes.avatar)();
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_avatar.Avatar.Image, { ...props, className: (0, import_css.cx)(styles.image, props.className) });
|
|
95
|
+
}
|
|
96
|
+
function AvatarFallback(props) {
|
|
97
|
+
const styles = (0, import_recipes.avatar)();
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
99
|
+
import_avatar.Avatar.Fallback,
|
|
100
|
+
{
|
|
101
|
+
...props,
|
|
102
|
+
className: (0, import_css.cx)(styles.fallback, props.className)
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/components/avatar/parts.ts
|
|
108
|
+
var AvatarParts = {
|
|
109
|
+
Root: AvatarRoot,
|
|
110
|
+
Image: AvatarImage,
|
|
111
|
+
Fallback: AvatarFallback
|
|
146
112
|
};
|
|
147
113
|
|
|
148
|
-
// src/components/
|
|
114
|
+
// src/components/avatar/avatar.tsx
|
|
149
115
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
116
|
+
function Avatar2(props) {
|
|
117
|
+
const [imgProps, { fallback, children }, rootProps] = splitProps(
|
|
118
|
+
props,
|
|
119
|
+
["alt", "src"],
|
|
120
|
+
["fallback", "children"]
|
|
121
|
+
);
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarParts.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
123
|
+
Show,
|
|
124
|
+
{
|
|
125
|
+
when: Boolean(children),
|
|
126
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarParts.Fallback, { children: fallback }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarParts.Image, { ...imgProps })
|
|
129
|
+
] }),
|
|
130
|
+
children
|
|
131
|
+
}
|
|
132
|
+
) });
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// src/components/FileUploader.tsx
|
|
136
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
150
137
|
function FileUploader(props) {
|
|
151
138
|
var _a;
|
|
152
139
|
const { icons } = useCerberusContext();
|
|
153
140
|
const styles = (0, import_recipes2.fileUploader)();
|
|
154
141
|
const { waitingFileUploader: Icon } = icons;
|
|
155
|
-
return /* @__PURE__ */ (0,
|
|
142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
156
143
|
"div",
|
|
157
144
|
{
|
|
158
145
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
159
146
|
className: (0, import_css2.cx)(
|
|
160
|
-
(0,
|
|
147
|
+
(0, import_patterns.vstack)({
|
|
161
148
|
justify: "center"
|
|
162
149
|
}),
|
|
163
150
|
styles.container
|
|
164
151
|
),
|
|
165
152
|
children: [
|
|
166
|
-
/* @__PURE__ */ (0,
|
|
167
|
-
|
|
168
|
-
{
|
|
169
|
-
gradient: "charon-light",
|
|
170
|
-
ariaLabel: "",
|
|
171
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, {}),
|
|
172
|
-
size: "md",
|
|
173
|
-
src: ""
|
|
174
|
-
}
|
|
175
|
-
) }),
|
|
176
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Avatar2, { gradient: "charon-light", fallback: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, {}) }) }),
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
177
155
|
"label",
|
|
178
156
|
{
|
|
179
157
|
className: (0, import_css2.cx)(
|
|
180
|
-
(0,
|
|
158
|
+
(0, import_patterns.vstack)({
|
|
181
159
|
justify: "center"
|
|
182
160
|
}),
|
|
183
161
|
styles.label
|
|
184
162
|
),
|
|
185
163
|
htmlFor: props.name,
|
|
186
164
|
children: [
|
|
187
|
-
/* @__PURE__ */ (0,
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
188
166
|
"Import ",
|
|
189
167
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
190
168
|
" files",
|
|
191
|
-
/* @__PURE__ */ (0,
|
|
192
|
-
/* @__PURE__ */ (0,
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
193
171
|
"input",
|
|
194
172
|
{
|
|
195
173
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FileUploader.tsx","../../../src/components/Show.tsx","../../../src/context/cerberus.tsx","../../../src/components/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'\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\n gradient=\"charon-light\"\n ariaLabel=\"\"\n icon={<Icon />}\n size=\"md\"\n src=\"\"\n />\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","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { circle } from '@cerberus/styled-system/patterns'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HtmlHTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains the Avatar component.\n * @module\n */\n\nexport type SharedAvatarProps = {\n /**\n * An optional icon to show when no src or ariaLabel is provided.\n */\n icon?: ReactNode\n /**\n * The size of the avatar.\n */\n width?: number\n /**\n * The size of the avatar.\n */\n height?: number\n}\nexport type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &\n SharedAvatarProps & {\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel: string\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as?: never\n /**\n * The source of the image.\n */\n src: string\n }\nexport type AvatarAsProps = SharedAvatarProps & {\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as: ReactNode\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel?: never\n /**\n * The source of the image.\n */\n src?: never\n}\n\nexport type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &\n AvatarVariantProps) &\n (AvatarImageProps | AvatarAsProps)\n\n/**\n * The Avatar component is used to represent a user or entity. It will show an image if src provided, otherwise it will show the ariaLabel of the ariaLabel. If the ariaLabel is empty, it will show a `defineIcons().avatar` icon.\n * @see https://cerberus.digitalu.design/react/avatar\n * @example\n * ```tsx\n * <Avatar\n * ariaLabel=\"Protector Cerberus\"\n * src=\"https://cerberus.digitalu.design/logo.svg\"\n * />\n * ```\n */\nexport function Avatar(props: AvatarProps) {\n const {\n ariaLabel,\n as,\n gradient,\n size,\n src,\n width,\n height,\n icon,\n ...nativeProps\n } = props\n const { icons } = useCerberusContext()\n const { avatar: AvatarIcon } = icons\n const initials = (ariaLabel || '')\n .split(' ')\n .map((word) => word[0])\n .join('')\n .slice(0, 2)\n\n return (\n <div\n {...nativeProps}\n className={cx(\n nativeProps.className,\n avatar({ gradient, size }),\n circle(),\n )}\n >\n <Show\n when={Boolean(src) || Boolean(as)}\n fallback={\n <Show\n when={Boolean(initials)}\n fallback={\n <Show\n when={Boolean(icon)}\n fallback={\n <AvatarIcon\n size={iconSizeMap[size as keyof typeof iconSizeMap]}\n />\n }\n >\n {icon}\n </Show>\n }\n >\n {initials}\n </Show>\n }\n >\n <Show\n when={Boolean(as)}\n fallback={\n <img\n alt={props.ariaLabel}\n className={css({\n h: 'full',\n objectFit: 'cover',\n w: 'full',\n })}\n decoding=\"async\"\n loading=\"lazy\"\n src={src}\n height={height}\n width={width}\n />\n }\n >\n {as}\n </Show>\n </Show>\n </div>\n )\n}\n\nconst iconSizeMap = {\n xs: 16,\n sm: 16,\n md: 20,\n lg: 34,\n xl: 32,\n '2xl': 32,\n '3xl': 32,\n '4xl': 32,\n}\n"],"mappings":";;;;;;;;;;;;;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,WAAW,OAAO,MACrB;AAAA,UAAC;AAAA;AAAA,YACC,UAAS;AAAA,YACT,WAAU;AAAA,YACV,MAAM,6CAAC,QAAK;AAAA,YACZ,MAAK;AAAA,YACL,KAAI;AAAA;AAAA,QACN,GACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,kBACT,yBAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,cACD,OAAO;AAAA,YACT;AAAA,YACA,SAAS,MAAM;AAAA,YAEf;AAAA,2DAAC,QAAK,MAAM,QAAQ,MAAM,OAAO,GAC/B,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_patterns","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime"]}
|
|
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,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AA,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_react","import_jsx_runtime","import_jsx_runtime","Avatar","import_jsx_runtime","Avatar"]}
|
|
@@ -23,13 +23,14 @@ __export(IconButton_exports, {
|
|
|
23
23
|
IconButton: () => IconButton
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(IconButton_exports);
|
|
26
|
+
var import_factory = require("@ark-ui/react/factory");
|
|
26
27
|
var import_css = require("@cerberus/styled-system/css");
|
|
27
28
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
28
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
30
|
function IconButton(props) {
|
|
30
31
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
31
32
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
-
|
|
33
|
+
import_factory.ark.button,
|
|
33
34
|
{
|
|
34
35
|
...nativeProps,
|
|
35
36
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/IconButton.tsx"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"sources":["../../../src/components/IconButton.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuC;AACvC,iBAAmB;AACnB,qBAGO;AAsBH;AAHG,SAAS,WAAW,OAAqC;AAC9D,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":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { MenuTrigger_alias_1 as MenuTrigger } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { MenuContent_alias_1 as MenuContent } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { MenuItem_alias_1 as MenuItem } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { MenuGroupLabel_alias_1 as MenuGroupLabel } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
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';
|
|
@@ -23,6 +23,7 @@ __export(ProgressBar_exports, {
|
|
|
23
23
|
ProgressBar: () => ProgressBar
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ProgressBar_exports);
|
|
26
|
+
var import_factory = require("@ark-ui/react/factory");
|
|
26
27
|
var import_css = require("@cerberus/styled-system/css");
|
|
27
28
|
var import_recipes = require("@cerberus/styled-system/recipes");
|
|
28
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -34,7 +35,7 @@ function ProgressBar(props) {
|
|
|
34
35
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
35
36
|
};
|
|
36
37
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
|
|
38
|
+
import_factory.ark.div,
|
|
38
39
|
{
|
|
39
40
|
...nativeProps,
|
|
40
41
|
"aria-label": label,
|
|
@@ -44,7 +45,7 @@ function ProgressBar(props) {
|
|
|
44
45
|
className: (0, import_css.cx)(nativeProps.className, styles.root),
|
|
45
46
|
role: "progressbar",
|
|
46
47
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
-
|
|
48
|
+
import_factory.ark.div,
|
|
48
49
|
{
|
|
49
50
|
...indeterminate && { "data-indeterminate": true },
|
|
50
51
|
"data-complete": nowClamped === 100,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ProgressBar.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ProgressBar.tsx"],"sourcesContent":["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"],"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":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ProgressBar_alias_1 as ProgressBar } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { ProgressBarBaseProps_alias_1 as ProgressBarBaseProps } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { NonIndeterminateProgressBarProps_alias_1 as NonIndeterminateProgressBarProps } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { IndeterminateProgressBarProps_alias_1 as IndeterminateProgressBarProps } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { ProgressBarProps_alias_1 as ProgressBarProps } from '../_tsup-dts-rollup.cjs';
|