@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,24 +0,0 @@
|
|
|
1
|
-
// src/components/Td.tsx
|
|
2
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
3
|
-
import { td } from "@cerberus/styled-system/recipes";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function Td(props) {
|
|
6
|
-
const { size, ...nativeProps } = props;
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
"td",
|
|
9
|
-
{
|
|
10
|
-
...nativeProps,
|
|
11
|
-
className: cx(
|
|
12
|
-
nativeProps.className,
|
|
13
|
-
td({
|
|
14
|
-
size
|
|
15
|
-
})
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
Td
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=chunk-3R4TIF2X.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Td.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { td, type TdVariantProps } from '@cerberus/styled-system/recipes'\n\n/**\n * Th component for the Td component\n * @module\n */\n\nexport type TdBaseProps = JSX.IntrinsicElements['td']\nexport type TdProps = TdBaseProps & TdVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Td>Data cell</Td>\n * ```\n */\nexport function Td(props: TdProps) {\n const { size, ...nativeProps } = props\n return (\n <td\n {...nativeProps}\n className={cx(\n nativeProps.className,\n td({\n size,\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,UAA+B;AAsBpC;AAHG,SAAS,GAAG,OAAgB;AACjC,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,GAAG;AAAA,UACD;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// src/components/DatePicker.server.tsx
|
|
2
|
-
import {
|
|
3
|
-
DatePicker as ArkDP
|
|
4
|
-
} from "@ark-ui/react";
|
|
5
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
6
|
-
import { datePicker, label } from "@cerberus/styled-system/recipes";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var datePickerStyles = datePicker();
|
|
9
|
-
function DatePickerLabel(props) {
|
|
10
|
-
const { className, ...arkProps } = props;
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
ArkDP.Label,
|
|
13
|
-
{
|
|
14
|
-
...arkProps,
|
|
15
|
-
className: cx(
|
|
16
|
-
className,
|
|
17
|
-
label({
|
|
18
|
-
size: "sm"
|
|
19
|
-
})
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
function DatePickerViewControl(props) {
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
-
ArkDP.Control,
|
|
27
|
-
{
|
|
28
|
-
...props,
|
|
29
|
-
className: cx(props.className, datePickerStyles.viewControl)
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function DatePickerTable(props) {
|
|
34
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
-
ArkDP.Table,
|
|
36
|
-
{
|
|
37
|
-
...props,
|
|
38
|
-
className: cx(props.className, datePickerStyles.table)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
function DatePickerTableHeader(props) {
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
ArkDP.TableHeader,
|
|
45
|
-
{
|
|
46
|
-
...props,
|
|
47
|
-
className: cx(props.className, datePickerStyles.tableHeader)
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
function DatePickerTableCell(props) {
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
ArkDP.TableCell,
|
|
54
|
-
{
|
|
55
|
-
...props,
|
|
56
|
-
className: cx(props.className, datePickerStyles.tableCell)
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
function DatePickerTableCellTrigger(props) {
|
|
61
|
-
return /* @__PURE__ */ jsx(
|
|
62
|
-
ArkDP.TableCellTrigger,
|
|
63
|
-
{
|
|
64
|
-
...props,
|
|
65
|
-
className: cx(props.className, datePickerStyles.tableCellTrigger)
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
var DatePickerView = ArkDP.View;
|
|
70
|
-
var DatePickerContext = ArkDP.Context;
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
DatePickerLabel,
|
|
74
|
-
DatePickerViewControl,
|
|
75
|
-
DatePickerTable,
|
|
76
|
-
DatePickerTableHeader,
|
|
77
|
-
DatePickerTableCell,
|
|
78
|
-
DatePickerTableCellTrigger,
|
|
79
|
-
DatePickerView,
|
|
80
|
-
DatePickerContext
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=chunk-5EWCH7AI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/DatePicker.server.tsx"],"sourcesContent":["import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { datePicker, label } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n"],"mappings":";AAAA;AAAA,EACE,cAAc;AAAA,OAOT;AACP,SAAS,UAAU;AACnB,SAAS,YAAY,aAAa;AAuB9B;AAfJ,IAAM,mBAAmB,WAAW;AAY7B,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,EAAE,WAAW,GAAG,SAAS,IAAI;AACnC,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAeO,SAAS,sBAAsB,OAAmC;AACvE,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,WAAW;AAAA;AAAA,EAC7D;AAEJ;AAUO,SAAS,gBAAgB,OAA6B;AAC3D,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,KAAK;AAAA;AAAA,EACvD;AAEJ;AAUO,SAAS,sBAAsB,OAAmC;AACvE,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,WAAW;AAAA;AAAA,EAC7D;AAEJ;AAUO,SAAS,oBAAoB,OAAiC;AACnE,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,SAAS;AAAA;AAAA,EAC3D;AAEJ;AAUO,SAAS,2BACd,OACA;AACA,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,gBAAgB;AAAA;AAAA,EAClE;AAEJ;AAUO,IAAM,iBAAiB,MAAM;AAU7B,IAAM,oBAAoB,MAAM;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Dialog.client.tsx"],"sourcesContent":["'use client'\n\nimport {\n Dialog as ArkDialog,\n type DialogCloseTriggerProps,\n} from '@ark-ui/react'\nimport { dialog } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { IconButton } from './IconButton'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains client-side components for the Dialog family.\n * @module @cerberus-design/react/dialog\n */\n\nexport function DialogCloseIconTrigger(props: DialogCloseTriggerProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon } = icons\n\n const styles = dialog()\n\n return (\n <ArkDialog.CloseTrigger\n {...props}\n className={cx(props.className, styles.closeTrigger)}\n asChild\n >\n <IconButton\n ariaLabel=\"Close dialog\"\n palette=\"action\"\n size=\"lg\"\n usage=\"ghost\"\n >\n <CloseIcon />\n </IconButton>\n </ArkDialog.CloseTrigger>\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EACE,UAAU;AAAA,OAEL;AACP,SAAS,cAAc;AACvB,SAAS,UAAU;AA2BX;AAlBD,SAAS,uBAAuB,OAAgC;AACrE,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,QAAM,SAAS,OAAO;AAEtB,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,OAAO,YAAY;AAAA,MAClD,SAAO;AAAA,MAEP;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,8BAAC,aAAU;AAAA;AAAA,MACb;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/button/button.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ButtonHTMLAttributes,\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { Box } from '@cerberus/styled-system/jsx'\nimport { Show } from '../Show'\nimport { Spinner } from '../Spinner'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\ninterface ButtonContextValue {\n pending: boolean\n}\n\nconst ButtonContext = createContext<ButtonContextValue>({\n pending: false,\n})\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps & {\n pending?: boolean\n }\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, size, pending = false, ...nativeProps } = props\n const value = useMemo(() => ({ pending }), [pending])\n\n return (\n <ButtonContext.Provider value={value}>\n <button\n {...nativeProps}\n disabled={pending || nativeProps.disabled}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n size,\n }),\n )}\n />\n </ButtonContext.Provider>\n )\n}\n\n/**\n * An icon to display in a button that utilizes the pending state to display\n * a loading spinner.\n */\nexport function ButtonIcon(props: PropsWithChildren<object>) {\n const { pending } = useContext(ButtonContext)\n return (\n <Show when={pending} fallback={<>{props.children}</>}>\n <Box w=\"4\">\n <Spinner />\n </Box>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AACP,SAAS,WAAW;AAgCd,SAwB6B,UAxB7B;AAnBN,IAAM,gBAAgB,cAAkC;AAAA,EACtD,SAAS;AACX,CAAC;AAWM,SAAS,OAAO,OAAiC;AACtD,QAAM,EAAE,SAAS,OAAO,OAAO,MAAM,UAAU,OAAO,GAAG,YAAY,IAAI;AACzE,QAAM,QAAQ,QAAQ,OAAO,EAAE,QAAQ,IAAI,CAAC,OAAO,CAAC;AAEpD,SACE,oBAAC,cAAc,UAAd,EAAuB,OACtB;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,WAAW,YAAY;AAAA,MACjC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;AAMO,SAAS,WAAW,OAAkC;AAC3D,QAAM,EAAE,QAAQ,IAAI,WAAW,aAAa;AAC5C,SACE,oBAAC,QAAK,MAAM,SAAS,UAAU,gCAAG,gBAAM,UAAS,GAC/C,8BAAC,OAAI,GAAE,KACL,8BAAC,WAAQ,GACX,GACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/FileUploader.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"],"mappings":";;;;;;;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,cAAc;AAGvB,SAAS,oBAAoB;AA2Cb,cAMV,YANU;AAnBT,SAAS,aAAa,OAA0B;AACrD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,SAAS,aAAa;AAC5B,QAAM,EAAE,qBAAqB,KAAK,IAAI;AAEtC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAI,MAAM,WAAW,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAAA,MACnD,WAAW;AAAA,QACT,OAAO;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,QACD,OAAO;AAAA,MACT;AAAA,MAEA;AAAA,4BAAC,SAAI,WAAW,OAAO,MACrB;AAAA,UAAC;AAAA;AAAA,YACC,UAAS;AAAA,YACT,WAAU;AAAA,YACV,MAAM,oBAAC,QAAK;AAAA,YACZ,MAAK;AAAA,YACL,KAAI;AAAA;AAAA,QACN,GACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,OAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,cACD,OAAO;AAAA,YACT;AAAA,YACA,SAAS,MAAM;AAAA,YAEf;AAAA,kCAAC,QAAK,MAAM,QAAQ,MAAM,OAAO,GAC/B,8BAAC,OAAE,WAAW,OAAO,SAAU,gBAAM,SAAQ,GAC/C;AAAA,cAAO;AAAA,cACC,MAAM,QAAQ,QAAQ,KAAK,IAAI;AAAA,cAAE;AAAA,cACzC,oBAAC,OAAE,WAAW,OAAO,aAAa,mCAAqB;AAAA,cACvD;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACJ,WAAW,GAAG,MAAM,WAAW,OAAO,KAAK;AAAA,kBAC3C,MAAK;AAAA;AAAA,cACP;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/IconButton.tsx"],"sourcesContent":["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"],"mappings":";AACA,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AAuBH;AAHG,SAAS,WAAW,OAAqC;AAC9D,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// src/components/Accordion.tsx
|
|
2
|
-
import { Accordion as ArkAccordion } from "@ark-ui/react";
|
|
3
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
4
|
-
import {
|
|
5
|
-
accordion
|
|
6
|
-
} from "@cerberus/styled-system/recipes";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
function Accordion(props) {
|
|
9
|
-
const { size, className, ...rootProps } = props;
|
|
10
|
-
const styles = accordion({ size });
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
ArkAccordion.Root,
|
|
13
|
-
{
|
|
14
|
-
collapsible: true,
|
|
15
|
-
className: cx(className, styles.root),
|
|
16
|
-
...rootProps
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function AccordionItem(props) {
|
|
21
|
-
const { size, ...itemProps } = props;
|
|
22
|
-
const styles = accordion({ size });
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
ArkAccordion.Item,
|
|
25
|
-
{
|
|
26
|
-
...itemProps,
|
|
27
|
-
className: cx(itemProps.className, styles.item)
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function AccordionItemTrigger(props) {
|
|
32
|
-
const { size, ...triggerProps } = props;
|
|
33
|
-
const styles = accordion({ size });
|
|
34
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
-
ArkAccordion.ItemTrigger,
|
|
36
|
-
{
|
|
37
|
-
...triggerProps,
|
|
38
|
-
className: cx(triggerProps.className, styles.itemTrigger)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
function AccordionItemContent(props) {
|
|
43
|
-
const { size, ...contentProps } = props;
|
|
44
|
-
const styles = accordion({ size });
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
ArkAccordion.ItemContent,
|
|
47
|
-
{
|
|
48
|
-
...contentProps,
|
|
49
|
-
className: cx(contentProps.className, styles.itemContent)
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
Accordion,
|
|
56
|
-
AccordionItem,
|
|
57
|
-
AccordionItemTrigger,
|
|
58
|
-
AccordionItemContent
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=chunk-AZRFYQO7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,aAAa,oBAAoB;AAC1C,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AAqBH;AALG,SAAS,UAAU,OAAuB;AAC/C,QAAM,EAAE,MAAM,WAAW,GAAG,UAAU,IAAI;AAC1C,QAAM,SAAS,UAAU,EAAE,KAAK,CAAC;AAEjC,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACC,aAAW;AAAA,MACX,WAAW,GAAG,WAAW,OAAO,IAAI;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAqBO,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,SAAS,UAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,UAAU,WAAW,OAAO,IAAI;AAAA;AAAA,EAChD;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,SAAS,UAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,SAAS,UAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;","names":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/components/Table.tsx
|
|
2
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
3
|
-
import { table } from "@cerberus/styled-system/recipes";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
function Table(props) {
|
|
6
|
-
const { caption, children, ...nativeProps } = props;
|
|
7
|
-
const styles = table();
|
|
8
|
-
return /* @__PURE__ */ jsx("div", { className: styles.container, children: /* @__PURE__ */ jsxs(
|
|
9
|
-
"table",
|
|
10
|
-
{
|
|
11
|
-
...nativeProps,
|
|
12
|
-
className: cx(nativeProps.className, styles.table),
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsx("caption", { className: styles.caption, children: caption }),
|
|
15
|
-
children
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
) });
|
|
19
|
-
}
|
|
20
|
-
function Tr(props) {
|
|
21
|
-
return /* @__PURE__ */ jsx("tr", { ...props });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
Table,
|
|
26
|
-
Tr
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=chunk-B4CVET74.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Table.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { table } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren, TableHTMLAttributes } from 'react'\n\n/**\n * This module contains the table component.\n * @module\n */\n\nexport interface TableProps extends TableHTMLAttributes<HTMLTableElement> {\n /**\n * An easy to understand description of the table. Required for accessibility.\n */\n caption: string\n}\n\n/**\n * An accessible table component.\n * @definition [ARIA Table pattern](https://www.w3.org/WAI/ARIA/apg/patterns/table/)\n * @see https://cerberus.digitalu.design/react/table.\n * @example\n * ```tsx\n * <Table caption=\"Basic Table\">\n * {children}\n * </Table>\n * ```\n */\nexport function Table(props: PropsWithChildren<TableProps>) {\n const { caption, children, ...nativeProps } = props\n const styles = table()\n\n return (\n <div className={styles.container}>\n <table\n {...nativeProps}\n className={cx(nativeProps.className, styles.table)}\n >\n <caption className={styles.caption}>{caption}</caption>\n {children}\n </table>\n </div>\n )\n}\n\n// We only provide this for consistency with the rest of the components\n\nexport type TrProps = TableHTMLAttributes<HTMLTableRowElement>\n\n/**\n * The Tr component is used to render a table row.\n * @definition [Table docs](https://cerberus.digitalu.design/react/table)\n * @example\n * ```tsx\n * <Tr>\n * {children}\n * </Tr>\n * ```\n */\nexport function Tr(props: PropsWithChildren<TrProps>) {\n return <tr {...props} />\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AAgChB,SAIE,KAJF;AANC,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,SAAS,UAAU,GAAG,YAAY,IAAI;AAC9C,QAAM,SAAS,MAAM;AAErB,SACE,oBAAC,SAAI,WAAW,OAAO,WACrB;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,YAAY,WAAW,OAAO,KAAK;AAAA,MAEjD;AAAA,4BAAC,aAAQ,WAAW,OAAO,SAAU,mBAAQ;AAAA,QAC5C;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;AAgBO,SAAS,GAAG,OAAmC;AACpD,SAAO,oBAAC,QAAI,GAAG,OAAO;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/prompt-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type MouseEvent,\n type PropsWithChildren,\n} from 'react'\nimport { DialogCloseTrigger } from '@ark-ui/react'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { FieldLabel, FieldRoot, Input } from '../components/field/index'\nimport { Button } from '../components/button/button'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { Text } from '../components/Text'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\n\n/**\n * This module provides a context and hook for the prompt modal.\n * @module PromptModal\n */\n\nexport interface ShowPromptModalOptions {\n /**\n * The kind of prompt modal to show.\n * @default 'non-destructive'\n */\n kind?: 'destructive' | 'non-destructive'\n /**\n * The heading of the prompt modal.\n */\n heading: string\n /**\n * The description of the prompt modal.\n */\n description?: string\n /**\n * The key to confirm the action.\n */\n key: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\nexport type PromptShowResult =\n | ((value: string | PromiseLike<string>) => void)\n | null\n\nexport interface PromptModalValue {\n /**\n * The method to trigger the prompt modal.\n * @returns the value of the key if the action is confirmed.\n * @example\n * ```tsx\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n */\n show: (options: ShowPromptModalOptions) => Promise<string>\n}\n\nconst PromptModalContext = createContext<PromptModalValue | null>(null)\n\nexport type PromptModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a prompt modal to the app.\n * @see https://cerberus.digitalu.design/react/prompt-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <PromptModal>\n * <SomeFeatureSection />\n * </PromptModal>\n *\n * // Use the hook to show the prompt modal.\n * const prompt = usePromptModal()\n *\n * const handleClick = useCallback(async () => {\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n * // do something with accepted\n * }, [prompt])\n * ```\n */\nexport function PromptModal(\n props: PropsWithChildren<PromptModalProviderProps>,\n) {\n const resolveRef = useRef<PromptShowResult>(null)\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowPromptModalOptions | null>(null)\n const [inputValue, setInputValue] = useState<string>('')\n\n const { icons } = useCerberusContext()\n const { promptModal: PromptIcon } = icons\n\n const isValid = useMemo(\n () => inputValue === content?.key,\n [inputValue, content],\n )\n\n const palette = useMemo(\n () => (content?.kind === 'destructive' ? 'danger' : 'action'),\n [content],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.currentTarget.value)\n },\n [content],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(inputValue)\n }\n setOpen(false)\n },\n [inputValue, setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowPromptModalOptions) => {\n return new Promise<string>((resolve) => {\n setContent({ ...options, kind: options.kind || 'non-destructive' })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <PromptModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <VStack\n alignItems=\"flex-start\"\n marginBlockStart=\"md\"\n marginBlockEnd=\"lg\"\n w=\"full\"\n >\n <FieldRoot\n ids={{\n control: 'confirm',\n }}\n invalid={!isValid}\n >\n <FieldLabel\n className={hstack({\n gap: 'xs',\n justify: 'flex-start !important',\n marginBlockEnd: 'xs',\n textStyle: 'label-md',\n })}\n >\n Type\n <Text as=\"strong\" textTransform=\"uppercase\">\n {content?.key}\n </Text>\n to confirm\n </FieldLabel>\n <Input name=\"confirm\" onChange={handleChange} type=\"text\" />\n </FieldRoot>\n </VStack>\n\n <HStack gap=\"md\" justify=\"stretch\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n disabled={!isValid}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </PromptModalContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the PromptModal provider.\n */\nexport function usePromptModal(): PromptModalValue {\n const context = useContext(PromptModalContext)\n if (context === null) {\n throw new Error('usePromptModal must be used within a PromptModal Provider')\n }\n return context\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MatchAvatar
|
|
3
|
-
} from "./chunk-2HOUQ2DX.js";
|
|
4
|
-
import {
|
|
5
|
-
Show
|
|
6
|
-
} from "./chunk-BUVVRQLZ.js";
|
|
7
|
-
|
|
8
|
-
// src/components/Admonition.tsx
|
|
9
|
-
import {
|
|
10
|
-
admonition
|
|
11
|
-
} from "@cerberus/styled-system/recipes";
|
|
12
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
13
|
-
import { hstack } from "@cerberus/styled-system/patterns";
|
|
14
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
function Admonition(props) {
|
|
16
|
-
const { children, palette = "page", usage, icon, ...nativeProps } = props;
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
"aside",
|
|
19
|
-
{
|
|
20
|
-
...nativeProps,
|
|
21
|
-
className: cx(
|
|
22
|
-
nativeProps.className,
|
|
23
|
-
hstack({
|
|
24
|
-
gap: "md",
|
|
25
|
-
w: "full"
|
|
26
|
-
}),
|
|
27
|
-
admonition({ palette, usage }).root
|
|
28
|
-
),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ jsx(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ jsx(MatchAvatar, { palette }), children: icon }),
|
|
31
|
-
/* @__PURE__ */ jsx("div", { children })
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function AdmonitionHeading(props) {
|
|
37
|
-
const { palette, usage, ...nativeProps } = props;
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
-
"p",
|
|
40
|
-
{
|
|
41
|
-
...nativeProps,
|
|
42
|
-
className: cx(
|
|
43
|
-
nativeProps.className,
|
|
44
|
-
admonition({ palette, usage }).heading
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
function AdmonitionDescription(props) {
|
|
50
|
-
const { palette, usage, ...nativeProps } = props;
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
"p",
|
|
53
|
-
{
|
|
54
|
-
...nativeProps,
|
|
55
|
-
className: cx(
|
|
56
|
-
nativeProps.className,
|
|
57
|
-
admonition({ palette, usage }).description
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export {
|
|
64
|
-
Admonition,
|
|
65
|
-
AdmonitionHeading,
|
|
66
|
-
AdmonitionDescription
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=chunk-DXBZ3HMY.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Admonition.tsx"],"sourcesContent":["import {\n admonition,\n type AdmonitionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\nimport { MatchAvatar } from './Admonition.client'\n\n/**\n * This module provides a set of components for creating admonitions.\n * @module Admonition\n */\n\nexport type AdmonitionProps = HTMLAttributes<HTMLDivElement> &\n AdmonitionVariantProps & {\n /**\n * One off replacement for the icon.\n */\n icon?: ReactNode\n }\n\n/**\n * The `Admonition` component is used to create an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function Admonition(props: AdmonitionProps) {\n const { children, palette = 'page', usage, icon, ...nativeProps } = props\n return (\n <aside\n {...nativeProps}\n className={cx(\n nativeProps.className,\n hstack({\n gap: 'md',\n w: 'full',\n }),\n admonition({ palette, usage }).root,\n )}\n >\n <Show when={Boolean(icon)} fallback={<MatchAvatar palette={palette} />}>\n {icon}\n </Show>\n <div>{children}</div>\n </aside>\n )\n}\n\nexport type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionHeading` component is used to create a heading within an\n * admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionHeading(props: AdmonitionHeadingProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).heading,\n )}\n />\n )\n}\n\nexport type AdmonitionDescriptionProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionDescription` component is used to create a description within\n * an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionDescription(props: AdmonitionDescriptionProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).description,\n )}\n />\n )\n}\n"],"mappings":";;;;;;;;AAAA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,UAAU;AACnB,SAAS,cAAc;AAkCnB,SAWuC,KAXvC;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,UAAU,UAAU,QAAQ,OAAO,MAAM,GAAG,YAAY,IAAI;AACpE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL,KAAK;AAAA,UACL,GAAG;AAAA,QACL,CAAC;AAAA,QACD,WAAW,EAAE,SAAS,MAAM,CAAC,EAAE;AAAA,MACjC;AAAA,MAEA;AAAA,4BAAC,QAAK,MAAM,QAAQ,IAAI,GAAG,UAAU,oBAAC,eAAY,SAAkB,GACjE,gBACH;AAAA,QACA,oBAAC,SAAK,UAAS;AAAA;AAAA;AAAA,EACjB;AAEJ;AAmBO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,EAAE,SAAS,OAAO,GAAG,YAAY,IAAI;AAC3C,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,WAAW,EAAE,SAAS,MAAM,CAAC,EAAE;AAAA,MACjC;AAAA;AAAA,EACF;AAEJ;AAmBO,SAAS,sBAAsB,OAAmC;AACvE,QAAM,EAAE,SAAS,OAAO,GAAG,YAAY,IAAI;AAC3C,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,WAAW,EAAE,SAAS,MAAM,CAAC,EAAE;AAAA,MACjC;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Notification
|
|
3
|
-
} from "./chunk-RDRD6ACD.js";
|
|
4
|
-
import {
|
|
5
|
-
NotificationDescription
|
|
6
|
-
} from "./chunk-UXY3KCC3.js";
|
|
7
|
-
import {
|
|
8
|
-
NotificationHeading
|
|
9
|
-
} from "./chunk-SLHYBPJ5.js";
|
|
10
|
-
import {
|
|
11
|
-
Portal
|
|
12
|
-
} from "./chunk-IQJDVFPP.js";
|
|
13
|
-
import {
|
|
14
|
-
addNotification,
|
|
15
|
-
clearNotificationState,
|
|
16
|
-
notificationCenterReducer,
|
|
17
|
-
removeNotification,
|
|
18
|
-
updateNotificationState
|
|
19
|
-
} from "./chunk-V3M3ZOQI.js";
|
|
20
|
-
import {
|
|
21
|
-
Button
|
|
22
|
-
} from "./chunk-6KZVE4HC.js";
|
|
23
|
-
import {
|
|
24
|
-
Show
|
|
25
|
-
} from "./chunk-BUVVRQLZ.js";
|
|
26
|
-
|
|
27
|
-
// src/context/notification-center.tsx
|
|
28
|
-
import {
|
|
29
|
-
createContext,
|
|
30
|
-
useCallback,
|
|
31
|
-
useContext,
|
|
32
|
-
useMemo,
|
|
33
|
-
useReducer
|
|
34
|
-
} from "react";
|
|
35
|
-
import { animateIn, vstack } from "@cerberus/styled-system/patterns";
|
|
36
|
-
import { notification } from "@cerberus/styled-system/recipes";
|
|
37
|
-
import { cx } from "@cerberus/styled-system/css";
|
|
38
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
-
var NotificationsContext = createContext(null);
|
|
40
|
-
function NotificationCenter(props) {
|
|
41
|
-
const [state, dispatch] = useReducer(notificationCenterReducer, []);
|
|
42
|
-
const styles = notification();
|
|
43
|
-
const timeout = useMemo(
|
|
44
|
-
() => props.duration || 6e3,
|
|
45
|
-
[props.duration]
|
|
46
|
-
);
|
|
47
|
-
const closeNotification = useCallback(
|
|
48
|
-
(id) => {
|
|
49
|
-
updateNotificationState(dispatch, {
|
|
50
|
-
id,
|
|
51
|
-
state: "closed"
|
|
52
|
-
});
|
|
53
|
-
window.setTimeout(() => {
|
|
54
|
-
removeNotification(dispatch, id);
|
|
55
|
-
}, 150);
|
|
56
|
-
},
|
|
57
|
-
[dispatch]
|
|
58
|
-
);
|
|
59
|
-
const handleNotify = useCallback(
|
|
60
|
-
(options) => {
|
|
61
|
-
const id = `${options.palette}:${state.length + 1}`;
|
|
62
|
-
addNotification(dispatch, {
|
|
63
|
-
...options,
|
|
64
|
-
id,
|
|
65
|
-
state: "open"
|
|
66
|
-
});
|
|
67
|
-
window.setTimeout(() => {
|
|
68
|
-
closeNotification(id);
|
|
69
|
-
}, timeout);
|
|
70
|
-
},
|
|
71
|
-
[dispatch, state, timeout, closeNotification]
|
|
72
|
-
);
|
|
73
|
-
const handleClose = useCallback(
|
|
74
|
-
(e) => {
|
|
75
|
-
const target = e.currentTarget;
|
|
76
|
-
closeNotification(target.value);
|
|
77
|
-
},
|
|
78
|
-
[closeNotification]
|
|
79
|
-
);
|
|
80
|
-
const handleCloseAll = useCallback(() => {
|
|
81
|
-
state.forEach((item) => {
|
|
82
|
-
if (item.onClose) item.onClose();
|
|
83
|
-
});
|
|
84
|
-
clearNotificationState(dispatch);
|
|
85
|
-
}, [state, dispatch]);
|
|
86
|
-
const value = useMemo(
|
|
87
|
-
() => ({
|
|
88
|
-
notify: handleNotify
|
|
89
|
-
}),
|
|
90
|
-
[handleNotify]
|
|
91
|
-
);
|
|
92
|
-
return /* @__PURE__ */ jsxs(NotificationsContext.Provider, { value, children: [
|
|
93
|
-
props.children,
|
|
94
|
-
/* @__PURE__ */ jsx(Show, { when: state.length > 0, children: /* @__PURE__ */ jsx(Portal, { container: props.container, children: /* @__PURE__ */ jsxs("div", { className: styles.center, children: [
|
|
95
|
-
/* @__PURE__ */ jsx(Show, { when: state.length >= 4, children: /* @__PURE__ */ jsx(
|
|
96
|
-
Button,
|
|
97
|
-
{
|
|
98
|
-
className: cx(styles.closeAll, animateIn()),
|
|
99
|
-
onClick: handleCloseAll,
|
|
100
|
-
palette: "action",
|
|
101
|
-
shape: "rounded",
|
|
102
|
-
size: "sm",
|
|
103
|
-
usage: "ghost",
|
|
104
|
-
children: "Close all"
|
|
105
|
-
}
|
|
106
|
-
) }),
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
108
|
-
"div",
|
|
109
|
-
{
|
|
110
|
-
className: vstack({
|
|
111
|
-
alignItems: "flex-end",
|
|
112
|
-
gap: "4"
|
|
113
|
-
}),
|
|
114
|
-
style: {
|
|
115
|
-
alignItems: "flex-end"
|
|
116
|
-
},
|
|
117
|
-
children: state.map((option) => /* @__PURE__ */ jsx(
|
|
118
|
-
MatchNotification,
|
|
119
|
-
{
|
|
120
|
-
...option,
|
|
121
|
-
onClose: handleClose,
|
|
122
|
-
open: option.state
|
|
123
|
-
},
|
|
124
|
-
option.id
|
|
125
|
-
))
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
] }) }) })
|
|
129
|
-
] });
|
|
130
|
-
}
|
|
131
|
-
function MatchNotification(props) {
|
|
132
|
-
const { palette, id, onClose, heading, description, open } = props;
|
|
133
|
-
const sharedProps = useMemo(
|
|
134
|
-
() => ({
|
|
135
|
-
id,
|
|
136
|
-
open: true,
|
|
137
|
-
onClose,
|
|
138
|
-
"data-state": open
|
|
139
|
-
}),
|
|
140
|
-
[id, open, onClose]
|
|
141
|
-
);
|
|
142
|
-
switch (palette) {
|
|
143
|
-
case "success":
|
|
144
|
-
return /* @__PURE__ */ jsxs(Notification, { ...sharedProps, palette: "success", children: [
|
|
145
|
-
/* @__PURE__ */ jsx(NotificationHeading, { palette: "success", children: heading }),
|
|
146
|
-
/* @__PURE__ */ jsx(NotificationDescription, { palette: "success", children: description })
|
|
147
|
-
] });
|
|
148
|
-
case "warning":
|
|
149
|
-
return /* @__PURE__ */ jsxs(Notification, { ...sharedProps, palette: "warning", children: [
|
|
150
|
-
/* @__PURE__ */ jsx(NotificationHeading, { palette: "warning", children: heading }),
|
|
151
|
-
/* @__PURE__ */ jsx(NotificationDescription, { palette: "warning", children: description })
|
|
152
|
-
] });
|
|
153
|
-
case "danger":
|
|
154
|
-
return /* @__PURE__ */ jsxs(Notification, { ...sharedProps, palette: "danger", children: [
|
|
155
|
-
/* @__PURE__ */ jsx(NotificationHeading, { palette: "danger", children: heading }),
|
|
156
|
-
/* @__PURE__ */ jsx(NotificationDescription, { palette: "danger", children: description })
|
|
157
|
-
] });
|
|
158
|
-
case "info":
|
|
159
|
-
default:
|
|
160
|
-
return /* @__PURE__ */ jsxs(Notification, { ...sharedProps, palette: "info", children: [
|
|
161
|
-
/* @__PURE__ */ jsx(NotificationHeading, { palette: "info", children: heading }),
|
|
162
|
-
/* @__PURE__ */ jsx(NotificationDescription, { palette: "info", children: description })
|
|
163
|
-
] });
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function useNotificationCenter() {
|
|
167
|
-
const context = useContext(NotificationsContext);
|
|
168
|
-
if (!context) {
|
|
169
|
-
throw new Error(
|
|
170
|
-
"useNotificationCenter must be used within a NotificationsProvider"
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
return context;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export {
|
|
177
|
-
NotificationCenter,
|
|
178
|
-
useNotificationCenter
|
|
179
|
-
};
|
|
180
|
-
//# sourceMappingURL=chunk-FMRWRVUS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/notification-center.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useReducer,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Show } from '../components/Show'\nimport { NotificationHeading } from '../components/NotificationHeading'\nimport { NotificationDescription } from '../components/NotificationDescription'\nimport { Notification } from '../components/Notification'\nimport { animateIn, vstack } from '@cerberus/styled-system/patterns'\nimport { Portal, type PortalProps } from '../components/Portal'\nimport { notification } from '@cerberus/styled-system/recipes'\nimport { Button } from '../components/button/button'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n addNotification,\n clearNotificationState,\n notificationCenterReducer,\n removeNotification,\n updateNotificationState,\n} from './notification-center/store'\n\n/**\n * This module provides a context and hook for notifications.\n * @module\n */\n\nexport interface NotifyOptions {\n /**\n * The palette of the notification.\n * @default 'info'\n */\n palette: 'info' | 'success' | 'warning' | 'danger'\n /**\n * The heading of the notification.\n */\n heading: string\n /**\n * The unique id of the notification.\n */\n id?: string\n /**\n * The description of the notification.\n */\n description?: ReactNode\n /**\n * The action to take when the notification is closed\n */\n onClose?: () => void\n}\n\nexport interface NotificationsValue {\n notify: (options: NotifyOptions) => void\n}\n\nconst NotificationsContext = createContext<NotificationsValue | null>(null)\n\nexport type NotificationsProviderProps = PortalProps & {\n /**\n * The duration in milliseconds to show the notification.\n * @default 6000\n */\n duration?: number\n}\n\n/**\n * Provides a notification center to the app.\n * @see https://cerberus.digitalu.design/react/notification\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <Notifications>\n * <SomeFeatureSection />\n * </Notifications>\n *\n * // Use the hook to show a notification.\n * const notify = useNotifications()\n *\n * const handleClick = useCallback(() => {\n * notify({\n * palette: 'info',\n * heading: 'New feature!',\n * description: 'We have added a new feature to the app.',\n * })\n * }, [notify])\n * ```\n */\nexport function NotificationCenter(\n props: PropsWithChildren<NotificationsProviderProps>,\n) {\n const [state, dispatch] = useReducer(notificationCenterReducer, [])\n const styles = notification()\n\n const timeout = useMemo<number>(\n () => props.duration || 6000,\n [props.duration],\n )\n\n const closeNotification = useCallback(\n (id: string) => {\n updateNotificationState(dispatch, {\n id,\n state: 'closed',\n })\n window.setTimeout(() => {\n removeNotification(dispatch, id)\n }, 150)\n },\n [dispatch],\n )\n\n const handleNotify = useCallback(\n (options: NotifyOptions) => {\n const id = `${options.palette}:${state.length + 1}`\n addNotification(dispatch, {\n ...options,\n id,\n state: 'open',\n })\n\n window.setTimeout(() => {\n closeNotification(id)\n }, timeout)\n },\n [dispatch, state, timeout, closeNotification],\n )\n\n const handleClose = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n closeNotification(target.value)\n },\n [closeNotification],\n )\n\n const handleCloseAll = useCallback(() => {\n state.forEach((item) => {\n if (item.onClose) item.onClose()\n })\n // we don't want to animate out for this one\n clearNotificationState(dispatch)\n }, [state, dispatch])\n\n const value = useMemo(\n () => ({\n notify: handleNotify,\n }),\n [handleNotify],\n )\n\n // For some reason, the vstack pattern alignItems is not registering here.\n // So we are forcing it with the style prop.\n\n return (\n <NotificationsContext.Provider value={value}>\n {props.children}\n\n <Show when={state.length > 0}>\n <Portal container={props.container}>\n <div className={styles.center}>\n <Show when={state.length >= 4}>\n <Button\n className={cx(styles.closeAll, animateIn())}\n onClick={handleCloseAll}\n palette=\"action\"\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n Close all\n </Button>\n </Show>\n\n <div\n className={vstack({\n alignItems: 'flex-end',\n gap: '4',\n })}\n style={{\n alignItems: 'flex-end',\n }}\n >\n {state.map((option) => (\n <MatchNotification\n key={option.id}\n {...option}\n onClose={handleClose}\n open={option.state}\n />\n ))}\n </div>\n </div>\n </Portal>\n </Show>\n </NotificationsContext.Provider>\n )\n}\n\ninterface MatchNotificationProps extends Omit<NotifyOptions, 'onClose'> {\n open: 'open' | 'closed'\n onClose: (e: MouseEvent<HTMLButtonElement>) => void\n key: string | undefined\n}\n\nfunction MatchNotification(props: MatchNotificationProps) {\n const { palette, id, onClose, heading, description, open } = props\n const sharedProps = useMemo(\n () => ({\n id: id!,\n open: true,\n onClose,\n 'data-state': open,\n }),\n [id, open, onClose],\n )\n\n switch (palette) {\n case 'success':\n return (\n <Notification {...sharedProps} palette=\"success\">\n <NotificationHeading palette=\"success\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"success\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'warning':\n return (\n <Notification {...sharedProps} palette=\"warning\">\n <NotificationHeading palette=\"warning\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"warning\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'danger':\n return (\n <Notification {...sharedProps} palette=\"danger\">\n <NotificationHeading palette=\"danger\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"danger\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'info':\n default:\n return (\n <Notification {...sharedProps} palette=\"info\">\n <NotificationHeading palette=\"info\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"info\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n }\n}\n\n/**\n * The hook to use the NotificationCenter.\n * @returns The notify method to trigger a notification.\n * @example\n * ```tsx\n * const {notify} = useNotificationCenter()\n * notify({\n * palette: 'info',\n * heading: 'New feature',\n * description: 'We have added a new feature to the app.',\n * })\n * ```\n */\nexport function useNotificationCenter(): NotificationsValue {\n const context = useContext(NotificationsContext)\n if (!context) {\n throw new Error(\n 'useNotificationCenter must be used within a NotificationsProvider',\n )\n }\n return context\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/confirm-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Button } from '../components/button/button'\nimport { css } from '@cerberus/styled-system/css'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogCloseTrigger,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\n\n/**\n * This module provides a context and hook for the confirm modal.\n * @module\n */\n\nexport interface BaseConfirmOptions {\n /**\n * The heading of the confirm modal.\n */\n heading: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\n\nexport interface DestructiveConfirmOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n */\n kind?: 'destructive'\n /**\n * The description of the confirm modal. Can only be a string for destructive confirm modals.\n */\n description?: string\n}\n\nexport interface NonDestructiveConfirmModalOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n * @default 'non-destructive'\n */\n kind?: 'non-destructive'\n /**\n * The description of the confirm modal. Can be a ReactNode for non-destructive kind if you need to display text links.\n * @example\n * ```tsx\n * description: <>Use a Fragment because we put the content within a Paragraph tag.</>\n */\n description?: ReactNode\n}\n\nexport type ShowConfirmModalOptions =\n | NonDestructiveConfirmModalOptions\n | DestructiveConfirmOptions\n\nexport type ShowResult =\n | ((value: boolean | PromiseLike<boolean>) => void)\n | null\n\nexport interface ConfirmModalValue {\n show: (options: ShowConfirmModalOptions) => Promise<boolean>\n}\n\nconst ConfirmModalContext = createContext<ConfirmModalValue | null>(null)\n\nexport type ConfirmModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a confirm modal to the app.\n * @see https://cerberus.digitalu.design/react/confirm-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <ConfirmModal>\n * <SomeFeatureSection />\n * </ConfirmModal>\n *\n * // Use the hook to show the confirm modal.\n * const confirm = useConfirmModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await confirm.show({\n * heading: 'Add new payment method?',\n * description:\n * 'This will add a new payment method to your account to be billed for future purchases.',\n * actionText: 'Yes, add payment method',\n * cancelText: 'No, cancel',\n * })\n * setConsent(userConsent)\n * }, [confirm])\n * ```\n */\nexport function ConfirmModal(\n props: PropsWithChildren<ConfirmModalProviderProps>,\n) {\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowConfirmModalOptions | null>(null)\n const resolveRef = useRef<ShowResult>(null)\n const kind = content?.kind ?? 'non-destructive'\n\n const { icons } = useCerberusContext()\n const { confirmModal: ConfirmIcon } = icons\n\n const palette = useMemo(\n () => (kind === 'destructive' ? 'danger' : 'action'),\n [kind],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(true)\n }\n resolveRef.current?.(false)\n setOpen(false)\n },\n [setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowConfirmModalOptions) => {\n return new Promise<boolean>((resolve) => {\n setContent({ ...options })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen, setContent],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <ConfirmModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <HStack gap=\"4\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </ConfirmModalContext.Provider>\n )\n}\n\nexport function useConfirmModal(): ConfirmModalValue {\n const context = useContext(ConfirmModalContext)\n if (context === null) {\n throw new Error(\n 'useConfirmModal must be used within a ConfirmModal Provider',\n )\n }\n return context\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/components/for.tsx
|
|
2
|
-
function For(props) {
|
|
3
|
-
const mappableChildren = props.children;
|
|
4
|
-
if (props.each?.length === 0) {
|
|
5
|
-
return props.fallback || null;
|
|
6
|
-
}
|
|
7
|
-
return props.each?.map(mappableChildren);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
For
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=chunk-IIH363FO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/for.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface ForProps<T> {\n /**\n * The array to iterate over\n */\n each: T[]\n /**\n * The fallback content to render when the array is empty\n */\n fallback?: ReactNode\n /**\n * The render function to render each item in the array\n */\n children: (item: Exclude<T, undefined>, index: number) => ReactNode\n}\n\n/**\n * The For component is used to iterate over an array and render a list of\n * components or display a fallback when the array is empty.\n * Inspired by the `<For>` component from SolidJS.\n *\n * @example\n * ```tsx\n * <For each={['a', 'b', 'c']}>\n * {(item, index) => <div key={index}>{item}</div>}\n * </For>\n * ```\n */\nexport function For<\n T extends string | number | Record<string, unknown> | object | undefined,\n>(props: ForProps<T>) {\n const mappableChildren = props.children as unknown as (\n item: T,\n index: number,\n ) => ReactNode\n\n if (props.each?.length === 0) {\n return props.fallback || null\n }\n\n return props.each?.map(mappableChildren) as ReactNode\n}\n"],"mappings":";AA6BO,SAAS,IAEd,OAAoB;AACpB,QAAM,mBAAmB,MAAM;AAK/B,MAAI,MAAM,MAAM,WAAW,GAAG;AAC5B,WAAO,MAAM,YAAY;AAAA,EAC3B;AAEA,SAAO,MAAM,MAAM,IAAI,gBAAgB;AACzC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/switch/parts.ts"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n SwitchControl,\n SwitchLabel,\n SwitchRoot,\n SwitchThumb,\n SwitchHiddenInput,\n} from './primitives'\n\n/**\n * This module contains the parts of the Radio parts.\n * @module 'radio/parts'\n */\n\ninterface SwitchPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Label: ElementType\n /**\n * The visual input of the switch.\n */\n Control: ElementType\n /**\n * The thumb item of the switch.\n */\n Thumb: ElementType\n /**\n * The native input for the switch.\n */\n HiddenInput: ElementType\n}\n\n/**\n * An Object containing the parts of the Radio component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the SwitchParts object and\n * the entire family of components vs. only what you use.\n */\nexport const SwitchParts: SwitchPartsValue = {\n Root: SwitchRoot,\n Label: SwitchLabel,\n Control: SwitchControl,\n Thumb: SwitchThumb,\n HiddenInput: SwitchHiddenInput,\n}\n"],"mappings":";;;;;;;;;AA8CO,IAAM,cAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AACf;","names":[]}
|