@cerberus-design/react 1.9.0 → 2.0.0-next.1793635870652.2aab4d5
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/dist/components/AnimatingUploadIcon.cjs +1 -2
- package/dist/components/AnimatingUploadIcon.js +1 -2
- package/dist/components/accordion/item-group.cjs +1 -2
- package/dist/components/accordion/item-group.d.cts +1 -1
- package/dist/components/accordion/item-group.d.ts +1 -1
- package/dist/components/accordion/item-group.js +1 -2
- package/dist/components/accordion/item-indicator.cjs +1 -2
- package/dist/components/accordion/item-indicator.d.cts +1 -1
- package/dist/components/accordion/item-indicator.d.ts +1 -1
- package/dist/components/accordion/item-indicator.js +1 -2
- package/dist/components/accordion/parts.cjs +1 -2
- package/dist/components/accordion/parts.js +1 -2
- package/dist/components/accordion/primitives.cjs +1 -2
- package/dist/components/accordion/primitives.d.cts +1 -1
- package/dist/components/accordion/primitives.d.ts +1 -1
- package/dist/components/accordion/primitives.js +1 -2
- package/dist/components/admonition/admonition.cjs +1 -2
- package/dist/components/admonition/admonition.js +1 -2
- package/dist/components/admonition/match-avatar.cjs +1 -2
- package/dist/components/admonition/match-avatar.d.cts +1 -1
- package/dist/components/admonition/match-avatar.d.ts +1 -1
- package/dist/components/admonition/match-avatar.js +1 -2
- package/dist/components/admonition/parts.cjs +1 -2
- package/dist/components/admonition/parts.js +1 -2
- package/dist/components/admonition/primitives.cjs +1 -2
- package/dist/components/admonition/primitives.d.cts +1 -1
- package/dist/components/admonition/primitives.d.ts +1 -1
- package/dist/components/admonition/primitives.js +1 -2
- package/dist/components/avatar/avatar.cjs +1 -2
- package/dist/components/avatar/avatar.js +1 -2
- package/dist/components/avatar/parts.cjs +1 -2
- package/dist/components/avatar/parts.js +1 -2
- package/dist/components/avatar/primitives.cjs +1 -2
- package/dist/components/avatar/primitives.d.cts +1 -1
- package/dist/components/avatar/primitives.d.ts +1 -1
- package/dist/components/avatar/primitives.js +1 -2
- package/dist/components/button/button.cjs +1 -2
- package/dist/components/button/button.js +3 -4
- package/dist/components/button/parts.cjs +1 -2
- package/dist/components/button/parts.js +1 -2
- package/dist/components/button/primitives.cjs +1 -2
- package/dist/components/button/primitives.d.cts +1 -1
- package/dist/components/button/primitives.d.ts +1 -1
- package/dist/components/button/primitives.js +1 -2
- package/dist/components/carousel/carousel.cjs +1 -2
- package/dist/components/carousel/carousel.js +1 -2
- package/dist/components/carousel/parts.cjs +1 -2
- package/dist/components/carousel/parts.js +1 -2
- package/dist/components/carousel/primitives.cjs +1 -2
- package/dist/components/carousel/primitives.d.cts +1 -1
- package/dist/components/carousel/primitives.d.ts +1 -1
- package/dist/components/carousel/primitives.js +1 -2
- package/dist/components/checkbox/checkbox-icon.cjs +1 -2
- package/dist/components/checkbox/checkbox-icon.js +1 -2
- package/dist/components/checkbox/checkbox.cjs +1 -2
- package/dist/components/checkbox/checkbox.d.cts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +1 -2
- package/dist/components/checkbox/parts.cjs +1 -2
- package/dist/components/checkbox/parts.js +1 -2
- package/dist/components/checkbox/primitives.cjs +1 -2
- package/dist/components/checkbox/primitives.d.cts +1 -1
- package/dist/components/checkbox/primitives.d.ts +1 -1
- package/dist/components/checkbox/primitives.js +1 -2
- package/dist/components/circular-progress/circular-progress.cjs +1 -2
- package/dist/components/circular-progress/circular-progress.js +1 -2
- package/dist/components/circular-progress/primitives.cjs +1 -2
- package/dist/components/circular-progress/primitives.d.cts +1 -1
- package/dist/components/circular-progress/primitives.d.ts +1 -1
- package/dist/components/circular-progress/primitives.js +1 -2
- package/dist/components/clipboard/copy-indicator.cjs +1 -2
- package/dist/components/clipboard/copy-indicator.js +1 -2
- package/dist/components/clipboard/copy-text.cjs +1 -2
- package/dist/components/clipboard/copy-text.js +1 -2
- package/dist/components/clipboard/parts.cjs +1 -2
- package/dist/components/clipboard/parts.js +1 -2
- package/dist/components/clipboard/primitives.cjs +1 -2
- package/dist/components/clipboard/primitives.js +1 -2
- package/dist/components/clipboard/trigger.cjs +1 -2
- package/dist/components/clipboard/trigger.js +1 -2
- package/dist/components/collapsible/parts.cjs +1 -2
- package/dist/components/collapsible/parts.js +1 -2
- package/dist/components/collapsible/primitives.cjs +1 -2
- package/dist/components/collapsible/primitives.d.cts +1 -1
- package/dist/components/collapsible/primitives.d.ts +1 -1
- package/dist/components/collapsible/primitives.js +1 -2
- package/dist/components/combobox/combobox.cjs +1 -2
- package/dist/components/combobox/combobox.d.cts +1 -1
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/combobox/combobox.js +1 -2
- package/dist/components/combobox/item-group.cjs +1 -2
- package/dist/components/combobox/item-group.js +1 -2
- package/dist/components/combobox/item.cjs +1 -2
- package/dist/components/combobox/item.js +1 -2
- package/dist/components/combobox/parts.cjs +1 -2
- package/dist/components/combobox/parts.js +1 -2
- package/dist/components/combobox/primitives.cjs +1 -2
- package/dist/components/combobox/primitives.d.cts +1 -1
- package/dist/components/combobox/primitives.d.ts +1 -1
- package/dist/components/combobox/primitives.js +1 -2
- package/dist/components/combobox/use-stateful-collection.cjs +1 -2
- package/dist/components/combobox/use-stateful-collection.js +1 -2
- package/dist/components/cta-dialog/context.cjs +1 -2
- package/dist/components/cta-dialog/context.js +1 -2
- package/dist/components/cta-dialog/provider.cjs +1 -2
- package/dist/components/cta-dialog/provider.js +1 -2
- package/dist/components/cta-dialog/trigger-item.cjs +1 -2
- package/dist/components/cta-dialog/trigger-item.js +1 -2
- package/dist/components/cta-dialog/utils.cjs +1 -2
- package/dist/components/cta-dialog/utils.js +1 -2
- package/dist/components/date-picker/calendar.cjs +1 -2
- package/dist/components/date-picker/calendar.js +1 -2
- package/dist/components/date-picker/content.cjs +1 -2
- package/dist/components/date-picker/content.js +1 -2
- package/dist/components/date-picker/date-picker.cjs +1 -2
- package/dist/components/date-picker/date-picker.js +1 -2
- package/dist/components/date-picker/day-view.cjs +1 -2
- package/dist/components/date-picker/day-view.js +1 -2
- package/dist/components/date-picker/input.cjs +1 -2
- package/dist/components/date-picker/input.js +1 -2
- package/dist/components/date-picker/month-view.cjs +1 -2
- package/dist/components/date-picker/month-view.js +1 -2
- package/dist/components/date-picker/parts.cjs +1 -2
- package/dist/components/date-picker/parts.js +1 -2
- package/dist/components/date-picker/primitives.cjs +1 -2
- package/dist/components/date-picker/primitives.js +1 -2
- package/dist/components/date-picker/range-input.cjs +1 -2
- package/dist/components/date-picker/range-input.js +1 -2
- package/dist/components/date-picker/trigger.cjs +1 -2
- package/dist/components/date-picker/trigger.js +1 -2
- package/dist/components/date-picker/view-control-group.cjs +1 -2
- package/dist/components/date-picker/view-control-group.js +1 -2
- package/dist/components/date-picker/year-view.cjs +1 -2
- package/dist/components/date-picker/year-view.js +1 -2
- package/dist/components/dialog/close-icon-trigger.cjs +1 -2
- package/dist/components/dialog/close-icon-trigger.js +1 -2
- package/dist/components/dialog/dialog.cjs +1 -2
- package/dist/components/dialog/dialog.js +1 -2
- package/dist/components/dialog/parts.cjs +1 -2
- package/dist/components/dialog/parts.js +1 -2
- package/dist/components/dialog/primitives.cjs +1 -2
- package/dist/components/dialog/primitives.d.cts +1 -1
- package/dist/components/dialog/primitives.d.ts +1 -1
- package/dist/components/dialog/primitives.js +1 -2
- package/dist/components/feature-flag/feature-flag.cjs +1 -2
- package/dist/components/feature-flag/feature-flag.js +1 -2
- package/dist/components/field/error-text.cjs +1 -2
- package/dist/components/field/error-text.js +1 -2
- package/dist/components/field/field.cjs +1 -2
- package/dist/components/field/field.js +1 -2
- package/dist/components/field/helper-text.cjs +1 -2
- package/dist/components/field/helper-text.js +1 -2
- package/dist/components/field/input.cjs +1 -2
- package/dist/components/field/input.d.cts +1 -1
- package/dist/components/field/input.d.ts +1 -1
- package/dist/components/field/input.js +1 -2
- package/dist/components/field/parts.cjs +1 -2
- package/dist/components/field/parts.js +1 -2
- package/dist/components/field/primitives.cjs +1 -2
- package/dist/components/field/primitives.d.cts +1 -1
- package/dist/components/field/primitives.d.ts +1 -1
- package/dist/components/field/primitives.js +1 -2
- package/dist/components/field/start-indicator.cjs +1 -2
- package/dist/components/field/start-indicator.js +1 -2
- package/dist/components/field/status-indicator.cjs +1 -2
- package/dist/components/field/status-indicator.js +1 -2
- package/dist/components/fieldset/fieldset.cjs +1 -2
- package/dist/components/fieldset/fieldset.js +1 -2
- package/dist/components/fieldset/parts.cjs +1 -2
- package/dist/components/fieldset/parts.js +1 -2
- package/dist/components/fieldset/primitives.cjs +1 -2
- package/dist/components/fieldset/primitives.d.cts +1 -1
- package/dist/components/fieldset/primitives.d.ts +1 -1
- package/dist/components/fieldset/primitives.js +1 -2
- package/dist/components/file-upload/file-status.cjs +1 -2
- package/dist/components/file-upload/file-status.d.cts +1 -1
- package/dist/components/file-upload/file-status.d.ts +1 -1
- package/dist/components/file-upload/file-status.js +1 -2
- package/dist/components/file-upload/file-uploader.cjs +1 -2
- package/dist/components/file-upload/file-uploader.js +1 -2
- package/dist/components/file-upload/helpers.cjs +1 -2
- package/dist/components/file-upload/helpers.js +1 -2
- package/dist/components/file-upload/img-preview.cjs +1 -2
- package/dist/components/file-upload/img-preview.js +1 -2
- package/dist/components/file-upload/parts.cjs +1 -2
- package/dist/components/file-upload/parts.js +1 -2
- package/dist/components/file-upload/primitives.cjs +1 -2
- package/dist/components/file-upload/primitives.d.cts +1 -1
- package/dist/components/file-upload/primitives.d.ts +1 -1
- package/dist/components/file-upload/primitives.js +1 -2
- package/dist/components/file-upload/utils.cjs +1 -2
- package/dist/components/file-upload/utils.js +1 -2
- package/dist/components/for/for.cjs +1 -2
- package/dist/components/for/for.js +1 -2
- package/dist/components/group/primitives.cjs +3 -5
- package/dist/components/group/primitives.d.cts +6 -6
- package/dist/components/group/primitives.d.ts +6 -6
- package/dist/components/group/primitives.js +4 -5
- package/dist/components/icon-button/button.cjs +1 -2
- package/dist/components/icon-button/button.js +1 -2
- package/dist/components/icon-button/primitives.cjs +1 -2
- package/dist/components/icon-button/primitives.d.cts +1 -1
- package/dist/components/icon-button/primitives.d.ts +1 -1
- package/dist/components/icon-button/primitives.js +1 -2
- package/dist/components/marquee/marquee.cjs +1 -2
- package/dist/components/marquee/marquee.js +1 -2
- package/dist/components/marquee/primitives.cjs +1 -2
- package/dist/components/marquee/primitives.d.cts +1 -1
- package/dist/components/marquee/primitives.d.ts +1 -1
- package/dist/components/marquee/primitives.js +1 -2
- package/dist/components/marquee/utils.cjs +1 -2
- package/dist/components/marquee/utils.js +1 -2
- package/dist/components/menu/menu.cjs +1 -2
- package/dist/components/menu/menu.js +1 -2
- package/dist/components/menu/primitives.cjs +1 -2
- package/dist/components/menu/primitives.js +1 -2
- package/dist/components/notifications/center.cjs +1 -2
- package/dist/components/notifications/center.js +1 -2
- package/dist/components/notifications/close-trigger.cjs +1 -2
- package/dist/components/notifications/close-trigger.js +1 -2
- package/dist/components/notifications/match-icon.cjs +1 -2
- package/dist/components/notifications/match-icon.js +1 -2
- package/dist/components/notifications/parts.cjs +1 -2
- package/dist/components/notifications/parts.js +1 -2
- package/dist/components/notifications/primitives.cjs +1 -2
- package/dist/components/notifications/primitives.d.cts +1 -1
- package/dist/components/notifications/primitives.d.ts +1 -1
- package/dist/components/notifications/primitives.js +1 -2
- package/dist/components/notifications/toaster.cjs +1 -2
- package/dist/components/notifications/toaster.js +1 -2
- package/dist/components/number-input/decrement-trigger.cjs +1 -2
- package/dist/components/number-input/decrement-trigger.js +1 -2
- package/dist/components/number-input/increment-trigger.cjs +1 -2
- package/dist/components/number-input/increment-trigger.js +1 -2
- package/dist/components/number-input/input.cjs +1 -2
- package/dist/components/number-input/input.js +1 -2
- package/dist/components/number-input/parts.cjs +1 -2
- package/dist/components/number-input/parts.js +1 -2
- package/dist/components/number-input/primitives.cjs +1 -2
- package/dist/components/number-input/primitives.d.cts +1 -1
- package/dist/components/number-input/primitives.d.ts +1 -1
- package/dist/components/number-input/primitives.js +1 -2
- package/dist/components/pagination/compact.cjs +1 -2
- package/dist/components/pagination/compact.js +1 -2
- package/dist/components/pagination/item-list.cjs +1 -2
- package/dist/components/pagination/item-list.js +1 -2
- package/dist/components/pagination/item.cjs +1 -2
- package/dist/components/pagination/item.js +1 -2
- package/dist/components/pagination/pagination.cjs +1 -2
- package/dist/components/pagination/pagination.js +1 -2
- package/dist/components/pagination/parts.cjs +1 -2
- package/dist/components/pagination/parts.js +1 -2
- package/dist/components/pagination/primitives.cjs +1 -2
- package/dist/components/pagination/primitives.js +1 -2
- package/dist/components/pagination/triggers.cjs +1 -2
- package/dist/components/pagination/triggers.js +1 -2
- package/dist/components/pin-input/input.cjs +1 -2
- package/dist/components/pin-input/input.js +1 -2
- package/dist/components/pin-input/parts.cjs +1 -2
- package/dist/components/pin-input/parts.js +1 -2
- package/dist/components/pin-input/primitives.cjs +1 -2
- package/dist/components/pin-input/primitives.d.cts +1 -1
- package/dist/components/pin-input/primitives.d.ts +1 -1
- package/dist/components/pin-input/primitives.js +1 -2
- package/dist/components/popover/parts.cjs +1 -2
- package/dist/components/popover/parts.js +1 -2
- package/dist/components/popover/placement-container.cjs +1 -2
- package/dist/components/popover/placement-container.js +1 -2
- package/dist/components/popover/popover.cjs +1 -2
- package/dist/components/popover/popover.js +1 -2
- package/dist/components/popover/primitives.cjs +1 -2
- package/dist/components/popover/primitives.d.cts +1 -1
- package/dist/components/popover/primitives.d.ts +1 -1
- package/dist/components/popover/primitives.js +1 -2
- package/dist/components/portal/portal.cjs +1 -2
- package/dist/components/portal/portal.js +1 -2
- package/dist/components/progress/primitives.cjs +1 -2
- package/dist/components/progress/primitives.d.cts +1 -1
- package/dist/components/progress/primitives.d.ts +1 -1
- package/dist/components/progress/primitives.js +1 -2
- package/dist/components/progress/progress-bar.cjs +1 -2
- package/dist/components/progress/progress-bar.js +1 -2
- package/dist/components/radio/parts.cjs +1 -2
- package/dist/components/radio/parts.js +1 -2
- package/dist/components/radio/primitives.cjs +1 -2
- package/dist/components/radio/primitives.d.cts +1 -1
- package/dist/components/radio/primitives.d.ts +1 -1
- package/dist/components/radio/primitives.js +1 -2
- package/dist/components/radio/radio.cjs +1 -2
- package/dist/components/radio/radio.d.cts +1 -1
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +1 -2
- package/dist/components/rating/parts.cjs +1 -2
- package/dist/components/rating/parts.js +1 -2
- package/dist/components/rating/primitives.cjs +1 -2
- package/dist/components/rating/primitives.d.cts +1 -1
- package/dist/components/rating/primitives.d.ts +1 -1
- package/dist/components/rating/primitives.js +1 -2
- package/dist/components/rating/rating.cjs +1 -2
- package/dist/components/rating/rating.js +1 -2
- package/dist/components/select/option-group.cjs +1 -2
- package/dist/components/select/option-group.js +1 -2
- package/dist/components/select/option.cjs +1 -2
- package/dist/components/select/option.js +1 -2
- package/dist/components/select/parts.cjs +1 -2
- package/dist/components/select/parts.js +1 -2
- package/dist/components/select/primitives.cjs +1 -2
- package/dist/components/select/primitives.d.cts +1 -1
- package/dist/components/select/primitives.d.ts +1 -1
- package/dist/components/select/primitives.js +1 -2
- package/dist/components/select/select.cjs +1 -2
- package/dist/components/select/select.js +1 -2
- package/dist/components/show/show.cjs +1 -2
- package/dist/components/show/show.js +1 -2
- package/dist/components/slider/marks.cjs +1 -2
- package/dist/components/slider/marks.js +1 -2
- package/dist/components/slider/primitives.cjs +1 -2
- package/dist/components/slider/primitives.d.cts +1 -1
- package/dist/components/slider/primitives.d.ts +1 -1
- package/dist/components/slider/primitives.js +1 -2
- package/dist/components/slider/slider.cjs +1 -2
- package/dist/components/slider/slider.js +1 -2
- package/dist/components/slider/thumbs.cjs +1 -2
- package/dist/components/slider/thumbs.js +1 -2
- package/dist/components/spinner/spinner.cjs +1 -2
- package/dist/components/spinner/spinner.js +1 -2
- package/dist/components/split-button/button.cjs +1 -2
- package/dist/components/split-button/button.js +1 -2
- package/dist/components/switch/parts.cjs +1 -2
- package/dist/components/switch/parts.js +1 -2
- package/dist/components/switch/primitives.cjs +1 -2
- package/dist/components/switch/primitives.d.cts +1 -1
- package/dist/components/switch/primitives.d.ts +1 -1
- package/dist/components/switch/primitives.js +1 -2
- package/dist/components/switch/switch-indicator.cjs +1 -2
- package/dist/components/switch/switch-indicator.js +1 -2
- package/dist/components/switch/switch.cjs +1 -2
- package/dist/components/switch/switch.js +1 -2
- package/dist/components/table/parts.cjs +1 -2
- package/dist/components/table/parts.js +1 -2
- package/dist/components/table/primitives.cjs +1 -2
- package/dist/components/table/primitives.d.cts +1 -1
- package/dist/components/table/primitives.d.ts +1 -1
- package/dist/components/table/primitives.js +1 -2
- package/dist/components/table/table.cjs +1 -2
- package/dist/components/table/table.js +1 -2
- package/dist/components/tabs/parts.cjs +1 -2
- package/dist/components/tabs/parts.js +1 -2
- package/dist/components/tabs/primitives.cjs +1 -2
- package/dist/components/tabs/primitives.d.cts +1 -1
- package/dist/components/tabs/primitives.d.ts +1 -1
- package/dist/components/tabs/primitives.js +1 -2
- package/dist/components/tabs/tabs.cjs +1 -2
- package/dist/components/tabs/tabs.js +1 -2
- package/dist/components/tag/closable.cjs +18 -10
- package/dist/components/tag/closable.d.cts +1 -8
- package/dist/components/tag/closable.d.ts +1 -8
- package/dist/components/tag/closable.js +19 -11
- package/dist/components/tag/index.cjs +4 -1
- package/dist/components/tag/index.js +2 -2
- package/dist/components/tag/primitives.cjs +12 -7
- package/dist/components/tag/primitives.d.cts +25 -5
- package/dist/components/tag/primitives.d.ts +25 -5
- package/dist/components/tag/primitives.js +10 -8
- package/dist/components/tag/tag.cjs +16 -19
- package/dist/components/tag/tag.d.cts +3 -5
- package/dist/components/tag/tag.d.ts +3 -5
- package/dist/components/tag/tag.js +17 -20
- package/dist/components/text/text.cjs +1 -2
- package/dist/components/text/text.js +1 -2
- package/dist/components/theme/theme.cjs +3 -3
- package/dist/components/theme/theme.d.cts +2 -3
- package/dist/components/theme/theme.d.ts +2 -3
- package/dist/components/theme/theme.js +3 -3
- package/dist/components/toggle/parts.cjs +1 -2
- package/dist/components/toggle/parts.js +1 -2
- package/dist/components/toggle/primitives.cjs +1 -2
- package/dist/components/toggle/primitives.js +1 -2
- package/dist/components/tooltip/parts.cjs +1 -2
- package/dist/components/tooltip/parts.js +1 -2
- package/dist/components/tooltip/primitives.cjs +1 -2
- package/dist/components/tooltip/primitives.js +1 -2
- package/dist/components/tooltip/renderer.cjs +1 -2
- package/dist/components/tooltip/renderer.js +1 -2
- package/dist/components/tooltip/tooltip.cjs +1 -2
- package/dist/components/tooltip/tooltip.js +1 -2
- package/dist/config/defineIcons.cjs +1 -2
- package/dist/config/defineIcons.js +1 -2
- package/dist/config/icons/checkbox.icons.cjs +1 -2
- package/dist/config/icons/checkbox.icons.js +1 -2
- package/dist/config/icons/default.cjs +1 -2
- package/dist/config/icons/default.js +1 -2
- package/dist/config/icons/pinned.icons.cjs +1 -2
- package/dist/config/icons/pinned.icons.js +1 -2
- package/dist/config/icons/sort.icons.cjs +1 -2
- package/dist/config/icons/sort.icons.js +1 -2
- package/dist/config/index.cjs +1 -2
- package/dist/config/index.js +1 -2
- package/dist/context/cerberus.cjs +1 -2
- package/dist/context/cerberus.js +1 -2
- package/dist/context/confirm-modal.cjs +1 -2
- package/dist/context/confirm-modal.js +1 -2
- package/dist/context/feature-flags.cjs +1 -2
- package/dist/context/feature-flags.js +1 -2
- package/dist/context/navMenu.cjs +1 -2
- package/dist/context/navMenu.js +1 -2
- package/dist/context/prompt-modal.cjs +1 -2
- package/dist/context/prompt-modal.js +1 -2
- package/dist/context/theme.cjs +1 -2
- package/dist/context/theme.js +1 -2
- package/dist/hooks/useRootColors.cjs +1 -2
- package/dist/hooks/useRootColors.js +1 -2
- package/dist/hooks/useTheme.cjs +1 -5
- package/dist/hooks/useTheme.js +1 -5
- package/dist/index.cjs +4 -1
- package/dist/index.js +2 -2
- package/dist/panda/buildinfo.json +13983 -0
- package/dist/panda/lib.json +241 -0
- package/dist/panda/preset.mjs +42757 -0
- package/dist/system/factory.cjs +1 -2
- package/dist/system/factory.d.cts +1 -1
- package/dist/system/factory.d.ts +1 -1
- package/dist/system/factory.js +1 -2
- package/dist/system/index.cjs +1 -2
- package/dist/system/index.js +1 -2
- package/dist/system/primitive-factory.cjs +1 -2
- package/dist/system/primitive-factory.d.cts +1 -1
- package/dist/system/primitive-factory.d.ts +1 -1
- package/dist/system/primitive-factory.js +1 -2
- package/dist/system/types.d.cts +3 -2
- package/dist/system/types.d.ts +3 -2
- package/dist/utils/index.cjs +1 -2
- package/dist/utils/index.js +1 -2
- package/dist/utils/localStorage.cjs +1 -2
- package/dist/utils/localStorage.js +1 -2
- package/package.json +90 -38
- package/src/components/AnimatingUploadIcon.tsx +83 -0
- package/src/components/accordion/index.ts +3 -0
- package/src/components/accordion/item-group.tsx +70 -0
- package/src/components/accordion/item-indicator.tsx +27 -0
- package/src/components/accordion/parts.ts +53 -0
- package/src/components/accordion/primitives.tsx +86 -0
- package/src/components/admonition/admonition.tsx +62 -0
- package/src/components/admonition/index.ts +3 -0
- package/src/components/admonition/match-avatar.tsx +54 -0
- package/src/components/admonition/parts.ts +53 -0
- package/src/components/admonition/primitives.tsx +64 -0
- package/src/components/avatar/avatar.tsx +51 -0
- package/src/components/avatar/index.ts +5 -0
- package/src/components/avatar/parts.ts +37 -0
- package/src/components/avatar/primitives.tsx +38 -0
- package/src/components/button/button.tsx +82 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/button/parts.ts +32 -0
- package/src/components/button/primitives.tsx +39 -0
- package/src/components/carousel/carousel.tsx +55 -0
- package/src/components/carousel/index.ts +3 -0
- package/src/components/carousel/parts.ts +71 -0
- package/src/components/carousel/primitives.ts +58 -0
- package/src/components/checkbox/checkbox-icon.tsx +39 -0
- package/src/components/checkbox/checkbox.tsx +42 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/checkbox/parts.ts +59 -0
- package/src/components/checkbox/primitives.tsx +77 -0
- package/src/components/circular-progress/circular-progress.tsx +49 -0
- package/src/components/circular-progress/index.ts +2 -0
- package/src/components/circular-progress/primitives.ts +71 -0
- package/src/components/clipboard/copy-indicator.tsx +22 -0
- package/src/components/clipboard/copy-text.tsx +13 -0
- package/src/components/clipboard/index.ts +2 -0
- package/src/components/clipboard/parts.ts +74 -0
- package/src/components/clipboard/primitives.ts +56 -0
- package/src/components/clipboard/trigger.tsx +14 -0
- package/src/components/collapsible/index.ts +2 -0
- package/src/components/collapsible/parts.ts +53 -0
- package/src/components/collapsible/primitives.tsx +48 -0
- package/src/components/combobox/combobox.tsx +63 -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 +107 -0
- package/src/components/combobox/primitives.tsx +140 -0
- package/src/components/combobox/use-stateful-collection.ts +67 -0
- package/src/components/cta-dialog/context.tsx +38 -0
- package/src/components/cta-dialog/index.ts +2 -0
- package/src/components/cta-dialog/provider.tsx +182 -0
- package/src/components/cta-dialog/trigger-item.tsx +54 -0
- package/src/components/cta-dialog/utils.ts +57 -0
- package/src/components/date-picker/calendar.tsx +47 -0
- package/src/components/date-picker/content.tsx +21 -0
- package/src/components/date-picker/date-picker.tsx +20 -0
- package/src/components/date-picker/day-view.tsx +77 -0
- package/src/components/date-picker/index.ts +16 -0
- package/src/components/date-picker/input.tsx +26 -0
- package/src/components/date-picker/month-view.tsx +49 -0
- package/src/components/date-picker/parts.ts +167 -0
- package/src/components/date-picker/primitives.tsx +235 -0
- package/src/components/date-picker/range-input.tsx +38 -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 +47 -0
- package/src/components/dialog/close-icon-trigger.tsx +36 -0
- package/src/components/dialog/dialog.tsx +42 -0
- package/src/components/dialog/index.ts +8 -0
- package/src/components/dialog/parts.ts +71 -0
- package/src/components/dialog/primitives.tsx +84 -0
- package/src/components/feature-flag/feature-flag.tsx +21 -0
- package/src/components/feature-flag/index.ts +1 -0
- package/src/components/field/error-text.tsx +19 -0
- package/src/components/field/field.tsx +85 -0
- package/src/components/field/helper-text.tsx +20 -0
- package/src/components/field/index.ts +7 -0
- package/src/components/field/input.tsx +47 -0
- package/src/components/field/parts.ts +77 -0
- package/src/components/field/primitives.tsx +135 -0
- package/src/components/field/start-indicator.tsx +23 -0
- package/src/components/field/status-indicator.tsx +58 -0
- package/src/components/fieldset/fieldset.tsx +54 -0
- package/src/components/fieldset/index.ts +3 -0
- package/src/components/fieldset/parts.ts +47 -0
- package/src/components/fieldset/primitives.tsx +48 -0
- package/src/components/file-upload/file-status.tsx +271 -0
- package/src/components/file-upload/file-uploader.tsx +60 -0
- package/src/components/file-upload/helpers.ts +28 -0
- package/src/components/file-upload/img-preview.tsx +41 -0
- package/src/components/file-upload/index.ts +6 -0
- package/src/components/file-upload/parts.tsx +132 -0
- package/src/components/file-upload/primitives.ts +161 -0
- package/src/components/file-upload/utils.ts +20 -0
- package/src/components/for/for.tsx +38 -0
- package/src/components/for/index.ts +1 -0
- package/src/components/group/index.ts +1 -0
- package/src/components/group/primitives.ts +7 -0
- package/src/components/icon-button/button.tsx +36 -0
- package/src/components/icon-button/index.tsx +2 -0
- package/src/components/icon-button/primitives.ts +17 -0
- package/src/components/marquee/Marquee.1.tsx +0 -0
- package/src/components/marquee/index.ts +2 -0
- package/src/components/marquee/marquee.tsx +55 -0
- package/src/components/marquee/primitives.ts +25 -0
- package/src/components/marquee/utils.ts +51 -0
- package/src/components/menu/index.ts +2 -0
- package/src/components/menu/menu.tsx +144 -0
- package/src/components/menu/primitives.ts +84 -0
- package/src/components/notifications/center.tsx +71 -0
- package/src/components/notifications/close-trigger.tsx +21 -0
- package/src/components/notifications/index.ts +5 -0
- package/src/components/notifications/match-icon.tsx +32 -0
- package/src/components/notifications/parts.ts +53 -0
- package/src/components/notifications/primitives.tsx +66 -0
- package/src/components/notifications/toaster.ts +9 -0
- package/src/components/notifications/types.ts +7 -0
- package/src/components/number-input/decrement-trigger.tsx +16 -0
- package/src/components/number-input/increment-trigger.tsx +16 -0
- package/src/components/number-input/index.ts +3 -0
- package/src/components/number-input/input.tsx +33 -0
- package/src/components/number-input/parts.ts +65 -0
- package/src/components/number-input/primitives.tsx +74 -0
- package/src/components/pagination/compact.tsx +25 -0
- package/src/components/pagination/index.ts +6 -0
- package/src/components/pagination/item-list.tsx +34 -0
- package/src/components/pagination/item.tsx +6 -0
- package/src/components/pagination/pagination.tsx +49 -0
- package/src/components/pagination/parts.ts +65 -0
- package/src/components/pagination/primitives.ts +46 -0
- package/src/components/pagination/triggers.tsx +47 -0
- package/src/components/pin-input/index.ts +3 -0
- package/src/components/pin-input/input.tsx +22 -0
- package/src/components/pin-input/parts.ts +53 -0
- package/src/components/pin-input/primitives.tsx +46 -0
- package/src/components/popover/index.ts +3 -0
- package/src/components/popover/parts.ts +96 -0
- package/src/components/popover/placement-container.tsx +22 -0
- package/src/components/popover/popover.tsx +54 -0
- package/src/components/popover/primitives.ts +83 -0
- package/src/components/portal/index.ts +1 -0
- package/src/components/portal/portal.tsx +28 -0
- package/src/components/progress/index.ts +2 -0
- package/src/components/progress/primitives.ts +25 -0
- package/src/components/progress/progress-bar.tsx +80 -0
- package/src/components/radio/index.ts +3 -0
- package/src/components/radio/parts.ts +65 -0
- package/src/components/radio/primitives.tsx +92 -0
- package/src/components/radio/radio.tsx +35 -0
- package/src/components/rating/index.ts +8 -0
- package/src/components/rating/parts.tsx +65 -0
- package/src/components/rating/primitives.tsx +64 -0
- package/src/components/rating/rating.tsx +75 -0
- package/src/components/select/index.ts +5 -0
- package/src/components/select/option-group.tsx +32 -0
- package/src/components/select/option.tsx +42 -0
- package/src/components/select/parts.ts +113 -0
- package/src/components/select/primitives.tsx +147 -0
- package/src/components/select/select.tsx +110 -0
- package/src/components/show/index.ts +1 -0
- package/src/components/show/show.tsx +48 -0
- package/src/components/slider/index.ts +2 -0
- package/src/components/slider/marks.tsx +42 -0
- package/src/components/slider/primitives.ts +87 -0
- package/src/components/slider/slider.tsx +86 -0
- package/src/components/slider/thumbs.tsx +31 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/spinner.tsx +81 -0
- package/src/components/split-button/button.tsx +71 -0
- package/src/components/split-button/index.tsx +1 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/parts.ts +53 -0
- package/src/components/switch/primitives.tsx +51 -0
- package/src/components/switch/switch-indicator.tsx +9 -0
- package/src/components/switch/switch.tsx +27 -0
- package/src/components/table/index.ts +3 -0
- package/src/components/table/parts.ts +83 -0
- package/src/components/table/primitives.tsx +108 -0
- package/src/components/table/table.tsx +73 -0
- package/src/components/tabs/index.ts +3 -0
- package/src/components/tabs/parts.ts +53 -0
- package/src/components/tabs/primitives.tsx +47 -0
- package/src/components/tabs/tabs.tsx +48 -0
- package/src/components/tag/closable.tsx +37 -0
- package/src/components/tag/index.ts +2 -0
- package/src/components/tag/primitives.ts +38 -0
- package/src/components/tag/tag.tsx +37 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.tsx +55 -0
- package/src/components/theme/index.ts +1 -0
- package/src/components/theme/theme.tsx +34 -0
- package/src/components/toggle/index.ts +2 -0
- package/src/components/toggle/parts.ts +32 -0
- package/src/components/toggle/primitives.tsx +27 -0
- package/src/components/tooltip/index.ts +3 -0
- package/src/components/tooltip/parts.ts +59 -0
- package/src/components/tooltip/primitives.ts +56 -0
- package/src/components/tooltip/renderer.tsx +16 -0
- package/src/components/tooltip/tooltip.tsx +53 -0
- package/src/config/defineIcons.ts +24 -0
- package/src/config/icons/checkbox.icons.tsx +98 -0
- package/src/config/icons/default.ts +92 -0
- package/src/config/icons/pinned.icons.tsx +31 -0
- package/src/config/icons/sort.icons.tsx +19 -0
- package/src/config/index.ts +41 -0
- package/src/config/types.ts +65 -0
- package/src/context/cerberus.tsx +53 -0
- package/src/context/confirm-modal.tsx +276 -0
- package/src/context/feature-flags.tsx +63 -0
- package/src/context/field.tsx +70 -0
- package/src/context/navMenu.tsx +89 -0
- package/src/context/prompt-modal.tsx +287 -0
- package/src/context/theme.tsx +77 -0
- package/src/hooks/useModal.ts +63 -0
- package/src/hooks/useRootColors.ts +72 -0
- package/src/hooks/useTheme.ts +96 -0
- package/src/index.client.ts +133 -0
- package/src/index.ts +79 -0
- package/src/system/factory.ts +32 -0
- package/src/system/index.ts +47 -0
- package/src/system/primitive-factory.tsx +182 -0
- package/src/system/types.ts +92 -0
- package/src/types.ts +23 -0
- package/src/utils/index.ts +51 -0
- package/src/utils/localStorage.ts +28 -0
- package/styled-system/css/conditions.d.ts +7 -0
- package/styled-system/css/conditions.js +32 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.js +63 -0
- package/styled-system/css/cva.d.ts +5 -0
- package/styled-system/css/cva.js +51 -0
- package/styled-system/css/cx.d.ts +6 -0
- package/styled-system/css/cx.js +16 -0
- package/styled-system/css/first-that-works.d.ts +22 -0
- package/styled-system/css/first-that-works.js +1 -0
- package/styled-system/css/index.d.ts +8 -0
- package/styled-system/css/index.js +8 -0
- package/styled-system/css/keyframes.d.ts +5 -0
- package/styled-system/css/keyframes.js +8 -0
- package/styled-system/css/position-try.d.ts +5 -0
- package/styled-system/css/position-try.js +11 -0
- package/styled-system/css/sva.d.ts +3 -0
- package/styled-system/css/sva.js +49 -0
- package/styled-system/css/view-transition.d.ts +7 -0
- package/styled-system/css/view-transition.js +18 -0
- package/styled-system/helpers.d.ts +67 -0
- package/styled-system/helpers.js +624 -0
- package/styled-system/jsx/animate-in.d.ts +7 -0
- package/styled-system/jsx/animate-in.js +11 -0
- package/styled-system/jsx/aspect-ratio.d.ts +7 -0
- package/styled-system/jsx/aspect-ratio.js +11 -0
- package/styled-system/jsx/bleed.d.ts +7 -0
- package/styled-system/jsx/bleed.js +11 -0
- package/styled-system/jsx/box.d.ts +7 -0
- package/styled-system/jsx/box.js +11 -0
- package/styled-system/jsx/center.d.ts +7 -0
- package/styled-system/jsx/center.js +11 -0
- package/styled-system/jsx/circle.d.ts +7 -0
- package/styled-system/jsx/circle.js +11 -0
- package/styled-system/jsx/container.d.ts +7 -0
- package/styled-system/jsx/container.js +11 -0
- package/styled-system/jsx/cq.d.ts +7 -0
- package/styled-system/jsx/cq.js +11 -0
- package/styled-system/jsx/create-recipe-context.d.ts +31 -0
- package/styled-system/jsx/create-recipe-context.js +38 -0
- package/styled-system/jsx/create-slot-recipe-context.d.ts +49 -0
- package/styled-system/jsx/create-slot-recipe-context.js +124 -0
- package/styled-system/jsx/divider.d.ts +7 -0
- package/styled-system/jsx/divider.js +11 -0
- package/styled-system/jsx/emphasized-fade-in.d.ts +7 -0
- package/styled-system/jsx/emphasized-fade-in.js +11 -0
- package/styled-system/jsx/emphasized-fade-out.d.ts +7 -0
- package/styled-system/jsx/emphasized-fade-out.js +11 -0
- package/styled-system/jsx/emphasized-slide-in.d.ts +7 -0
- package/styled-system/jsx/emphasized-slide-in.js +11 -0
- package/styled-system/jsx/emphasized-slide-out.d.ts +7 -0
- package/styled-system/jsx/emphasized-slide-out.js +11 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.js +91 -0
- package/styled-system/jsx/flex.d.ts +7 -0
- package/styled-system/jsx/flex.js +11 -0
- package/styled-system/jsx/float.d.ts +7 -0
- package/styled-system/jsx/float.js +11 -0
- package/styled-system/jsx/grid-item.d.ts +7 -0
- package/styled-system/jsx/grid-item.js +11 -0
- package/styled-system/jsx/grid.d.ts +7 -0
- package/styled-system/jsx/grid.js +11 -0
- package/styled-system/jsx/helper.d.ts +34 -0
- package/styled-system/jsx/helper.js +92 -0
- package/styled-system/jsx/hstack.d.ts +7 -0
- package/styled-system/jsx/hstack.js +11 -0
- package/styled-system/jsx/index.d.ts +35 -0
- package/styled-system/jsx/index.js +34 -0
- package/styled-system/jsx/is-valid-prop.d.ts +6 -0
- package/styled-system/jsx/is-valid-prop.js +12 -0
- package/styled-system/jsx/link-overlay.d.ts +7 -0
- package/styled-system/jsx/link-overlay.js +11 -0
- package/styled-system/jsx/scale-fade-in.d.ts +7 -0
- package/styled-system/jsx/scale-fade-in.js +11 -0
- package/styled-system/jsx/scale-fade-out.d.ts +7 -0
- package/styled-system/jsx/scale-fade-out.js +11 -0
- package/styled-system/jsx/scrollable.d.ts +7 -0
- package/styled-system/jsx/scrollable.js +11 -0
- package/styled-system/jsx/slide-fade-in.d.ts +7 -0
- package/styled-system/jsx/slide-fade-in.js +11 -0
- package/styled-system/jsx/slide-fade-out.d.ts +7 -0
- package/styled-system/jsx/slide-fade-out.js +11 -0
- package/styled-system/jsx/spacer.d.ts +7 -0
- package/styled-system/jsx/spacer.js +11 -0
- package/styled-system/jsx/square.d.ts +7 -0
- package/styled-system/jsx/square.js +11 -0
- package/styled-system/jsx/stack.d.ts +7 -0
- package/styled-system/jsx/stack.js +11 -0
- package/styled-system/jsx/visually-hidden.d.ts +7 -0
- package/styled-system/jsx/visually-hidden.js +11 -0
- package/styled-system/jsx/vstack.d.ts +7 -0
- package/styled-system/jsx/vstack.js +11 -0
- package/styled-system/jsx/wrap.d.ts +7 -0
- package/styled-system/jsx/wrap.js +11 -0
- package/styled-system/patterns/animate-in.d.ts +19 -0
- package/styled-system/patterns/animate-in.js +26 -0
- package/styled-system/patterns/aspect-ratio.d.ts +19 -0
- package/styled-system/patterns/aspect-ratio.js +37 -0
- package/styled-system/patterns/bleed.d.ts +20 -0
- package/styled-system/patterns/bleed.js +30 -0
- package/styled-system/patterns/box.d.ts +17 -0
- package/styled-system/patterns/box.js +16 -0
- package/styled-system/patterns/center.d.ts +19 -0
- package/styled-system/patterns/center.js +22 -0
- package/styled-system/patterns/circle.d.ts +19 -0
- package/styled-system/patterns/circle.js +26 -0
- package/styled-system/patterns/container.d.ts +17 -0
- package/styled-system/patterns/container.js +26 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.js +24 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.js +31 -0
- package/styled-system/patterns/emphasized-fade-in.d.ts +17 -0
- package/styled-system/patterns/emphasized-fade-in.js +23 -0
- package/styled-system/patterns/emphasized-fade-out.d.ts +17 -0
- package/styled-system/patterns/emphasized-fade-out.js +23 -0
- package/styled-system/patterns/emphasized-slide-in.d.ts +17 -0
- package/styled-system/patterns/emphasized-slide-in.js +23 -0
- package/styled-system/patterns/emphasized-slide-out.d.ts +17 -0
- package/styled-system/patterns/emphasized-slide-out.js +23 -0
- package/styled-system/patterns/flex.d.ts +25 -0
- package/styled-system/patterns/flex.js +27 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.js +84 -0
- package/styled-system/patterns/grid-item.d.ts +24 -0
- package/styled-system/patterns/grid-item.js +26 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.js +30 -0
- package/styled-system/patterns/hstack.d.ts +20 -0
- package/styled-system/patterns/hstack.js +27 -0
- package/styled-system/patterns/index.d.ts +30 -0
- package/styled-system/patterns/index.js +30 -0
- package/styled-system/patterns/link-overlay.d.ts +17 -0
- package/styled-system/patterns/link-overlay.js +25 -0
- package/styled-system/patterns/runtime.js +25 -0
- package/styled-system/patterns/scale-fade-in.d.ts +17 -0
- package/styled-system/patterns/scale-fade-in.js +23 -0
- package/styled-system/patterns/scale-fade-out.d.ts +17 -0
- package/styled-system/patterns/scale-fade-out.js +23 -0
- package/styled-system/patterns/scrollable.d.ts +20 -0
- package/styled-system/patterns/scrollable.js +38 -0
- package/styled-system/patterns/slide-fade-in.d.ts +17 -0
- package/styled-system/patterns/slide-fade-in.js +23 -0
- package/styled-system/patterns/slide-fade-out.d.ts +17 -0
- package/styled-system/patterns/slide-fade-out.js +23 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.js +26 -0
- package/styled-system/patterns/square.d.ts +19 -0
- package/styled-system/patterns/square.js +25 -0
- package/styled-system/patterns/stack.d.ts +22 -0
- package/styled-system/patterns/stack.js +30 -0
- package/styled-system/patterns/visually-hidden.d.ts +17 -0
- package/styled-system/patterns/visually-hidden.js +19 -0
- package/styled-system/patterns/vstack.d.ts +20 -0
- package/styled-system/patterns/vstack.js +27 -0
- package/styled-system/patterns/wrap.d.ts +23 -0
- package/styled-system/patterns/wrap.js +26 -0
- package/styled-system/recipes/accordion.d.ts +18 -0
- package/styled-system/recipes/accordion.js +5 -0
- package/styled-system/recipes/admonition.d.ts +18 -0
- package/styled-system/recipes/admonition.js +5 -0
- package/styled-system/recipes/avatar.d.ts +20 -0
- package/styled-system/recipes/avatar.js +5 -0
- package/styled-system/recipes/button-group.d.ts +16 -0
- package/styled-system/recipes/button-group.js +5 -0
- package/styled-system/recipes/button.d.ts +18 -0
- package/styled-system/recipes/button.js +5 -0
- package/styled-system/recipes/carousel.d.ts +16 -0
- package/styled-system/recipes/carousel.js +5 -0
- package/styled-system/recipes/checkbox.d.ts +18 -0
- package/styled-system/recipes/checkbox.js +5 -0
- package/styled-system/recipes/circular-progress.d.ts +19 -0
- package/styled-system/recipes/circular-progress.js +5 -0
- package/styled-system/recipes/closable-tag.d.ts +17 -0
- package/styled-system/recipes/closable-tag.js +5 -0
- package/styled-system/recipes/collapsible.d.ts +18 -0
- package/styled-system/recipes/collapsible.js +5 -0
- package/styled-system/recipes/combobox.d.ts +18 -0
- package/styled-system/recipes/combobox.js +5 -0
- package/styled-system/recipes/date-picker.d.ts +16 -0
- package/styled-system/recipes/date-picker.js +5 -0
- package/styled-system/recipes/dialog.d.ts +18 -0
- package/styled-system/recipes/dialog.js +5 -0
- package/styled-system/recipes/field-message.d.ts +14 -0
- package/styled-system/recipes/field-message.js +5 -0
- package/styled-system/recipes/field.d.ts +18 -0
- package/styled-system/recipes/field.js +5 -0
- package/styled-system/recipes/fieldset.d.ts +18 -0
- package/styled-system/recipes/fieldset.js +5 -0
- package/styled-system/recipes/file-status.d.ts +18 -0
- package/styled-system/recipes/file-status.js +5 -0
- package/styled-system/recipes/file-uploader.d.ts +16 -0
- package/styled-system/recipes/file-uploader.js +5 -0
- package/styled-system/recipes/gradient-tag.d.ts +17 -0
- package/styled-system/recipes/gradient-tag.js +5 -0
- package/styled-system/recipes/group.d.ts +16 -0
- package/styled-system/recipes/group.js +5 -0
- package/styled-system/recipes/icon-button.d.ts +18 -0
- package/styled-system/recipes/icon-button.js +5 -0
- package/styled-system/recipes/index.d.ts +46 -0
- package/styled-system/recipes/index.js +46 -0
- package/styled-system/recipes/input.d.ts +18 -0
- package/styled-system/recipes/input.js +5 -0
- package/styled-system/recipes/label.d.ts +17 -0
- package/styled-system/recipes/label.js +5 -0
- package/styled-system/recipes/marquee.d.ts +16 -0
- package/styled-system/recipes/marquee.js +5 -0
- package/styled-system/recipes/menu.d.ts +16 -0
- package/styled-system/recipes/menu.js +5 -0
- package/styled-system/recipes/modal.d.ts +16 -0
- package/styled-system/recipes/modal.js +5 -0
- package/styled-system/recipes/notification.d.ts +18 -0
- package/styled-system/recipes/notification.js +5 -0
- package/styled-system/recipes/number-input.d.ts +18 -0
- package/styled-system/recipes/number-input.js +5 -0
- package/styled-system/recipes/pin-input.d.ts +18 -0
- package/styled-system/recipes/pin-input.js +5 -0
- package/styled-system/recipes/popover.d.ts +18 -0
- package/styled-system/recipes/popover.js +5 -0
- package/styled-system/recipes/progress-bar.d.ts +19 -0
- package/styled-system/recipes/progress-bar.js +5 -0
- package/styled-system/recipes/radio-group.d.ts +19 -0
- package/styled-system/recipes/radio-group.js +5 -0
- package/styled-system/recipes/rating-group.d.ts +20 -0
- package/styled-system/recipes/rating-group.js +5 -0
- package/styled-system/recipes/runtime.js +133 -0
- package/styled-system/recipes/select.d.ts +18 -0
- package/styled-system/recipes/select.js +5 -0
- package/styled-system/recipes/slider.d.ts +21 -0
- package/styled-system/recipes/slider.js +5 -0
- package/styled-system/recipes/switch-recipe.d.ts +18 -0
- package/styled-system/recipes/switch-recipe.js +5 -0
- package/styled-system/recipes/table.d.ts +19 -0
- package/styled-system/recipes/table.js +5 -0
- package/styled-system/recipes/tabs.d.ts +19 -0
- package/styled-system/recipes/tabs.js +5 -0
- package/styled-system/recipes/tag.d.ts +18 -0
- package/styled-system/recipes/tag.js +5 -0
- package/styled-system/recipes/tbody.d.ts +16 -0
- package/styled-system/recipes/tbody.js +5 -0
- package/styled-system/recipes/td.d.ts +16 -0
- package/styled-system/recipes/td.js +5 -0
- package/styled-system/recipes/th.d.ts +16 -0
- package/styled-system/recipes/th.js +5 -0
- package/styled-system/recipes/thead.d.ts +14 -0
- package/styled-system/recipes/thead.js +5 -0
- package/styled-system/recipes/toast.d.ts +16 -0
- package/styled-system/recipes/toast.js +5 -0
- package/styled-system/recipes/toggle.d.ts +18 -0
- package/styled-system/recipes/toggle.js +5 -0
- package/styled-system/recipes/tooltip.d.ts +16 -0
- package/styled-system/recipes/tooltip.js +5 -0
- package/styled-system/themes/index.d.ts +20 -0
- package/styled-system/themes/index.js +24 -0
- package/styled-system/themes/theme-cerberus.json +5 -0
- package/styled-system/tokens/index.d.ts +8 -0
- package/styled-system/tokens/index.js +18 -0
- package/styled-system/types/index.d.ts +6 -0
- package/styled-system/types/jsx.d.ts +78 -0
- package/styled-system/types/pattern.d.ts +26 -0
- package/styled-system/types/recipe.d.ts +89 -0
- package/styled-system/types/register.d.ts +40 -0
- package/styled-system/types/system.d.ts +1935 -0
- package/styled-system/types/tokens.d.ts +72 -0
- package/dist/panda.buildinfo.json +0 -401
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ElementType } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
ClipboardRoot,
|
|
4
|
+
ClipboardLabel,
|
|
5
|
+
ClipboardControl,
|
|
6
|
+
ClipboardContext,
|
|
7
|
+
ClipboardInput,
|
|
8
|
+
} from './primitives'
|
|
9
|
+
import { CopyText } from './copy-text'
|
|
10
|
+
import { CopyIndicator } from './copy-indicator'
|
|
11
|
+
import { TriggerWithTooltip } from './trigger'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This module contains the parts of the Clipboard component.
|
|
15
|
+
* @module 'clipboard/parts'
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
interface ClipboardPartsValue {
|
|
19
|
+
/**
|
|
20
|
+
* The root context provider of the clipboard.
|
|
21
|
+
*/
|
|
22
|
+
Root: ElementType
|
|
23
|
+
/**
|
|
24
|
+
* The label of the clipboard.
|
|
25
|
+
*/
|
|
26
|
+
Label: ElementType
|
|
27
|
+
/**
|
|
28
|
+
* The control of the clipboard.
|
|
29
|
+
*/
|
|
30
|
+
Control: ElementType
|
|
31
|
+
/**
|
|
32
|
+
* The input of the clipboard.
|
|
33
|
+
*/
|
|
34
|
+
Input: ElementType
|
|
35
|
+
/**
|
|
36
|
+
* The raw context of the clipboard. Useful for obtaining the context state
|
|
37
|
+
* within the hierarchy of the clipboard component.
|
|
38
|
+
*/
|
|
39
|
+
Context: ElementType
|
|
40
|
+
/**
|
|
41
|
+
* The trigger of the clipboard.
|
|
42
|
+
*/
|
|
43
|
+
Trigger: ElementType
|
|
44
|
+
/**
|
|
45
|
+
* A simple abstraction around the `Clipboard.Indicator` component that
|
|
46
|
+
* provides default "Copy" and "Copied" icons.
|
|
47
|
+
*/
|
|
48
|
+
Indicator: ElementType
|
|
49
|
+
/**
|
|
50
|
+
* A simple abstraction around the `Clipboard.Indicator` component that
|
|
51
|
+
* provides default "Copy" and "Copied" text.
|
|
52
|
+
*/
|
|
53
|
+
CopyText: ElementType
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An Object containing the parts of the Clipboard component. For users that
|
|
58
|
+
* prefer Object component syntax.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
*
|
|
62
|
+
* When using object component syntax, you import the Clipboard parts object and
|
|
63
|
+
* the entire family of components versus only what you use.
|
|
64
|
+
*/
|
|
65
|
+
export const Clipboard: ClipboardPartsValue = {
|
|
66
|
+
Root: ClipboardRoot,
|
|
67
|
+
Label: ClipboardLabel,
|
|
68
|
+
Control: ClipboardControl,
|
|
69
|
+
Context: ClipboardContext,
|
|
70
|
+
Input: ClipboardInput,
|
|
71
|
+
Trigger: TriggerWithTooltip,
|
|
72
|
+
Indicator: CopyIndicator,
|
|
73
|
+
CopyText: CopyText,
|
|
74
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Clipboard,
|
|
3
|
+
type ClipboardContextProps as ArkContextProps,
|
|
4
|
+
type ClipboardRootProps as ArkRootProps,
|
|
5
|
+
type ClipboardLabelProps as ArkLabelProps,
|
|
6
|
+
type ClipboardControlProps as ArkControlProps,
|
|
7
|
+
type ClipboardInputProps as ArkInputProps,
|
|
8
|
+
type ClipboardTriggerProps as ArkTriggerProps,
|
|
9
|
+
type ClipboardIndicatorProps as ArkIndicatorProps,
|
|
10
|
+
} from '@ark-ui/react/clipboard'
|
|
11
|
+
import {
|
|
12
|
+
createCerberusPrimitive,
|
|
13
|
+
type CerberusPrimitiveProps,
|
|
14
|
+
} from '../../system/index'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This module contains the Clipboard component primitives.
|
|
18
|
+
* @module @cerberus-design/react/components/clipboard/primitives
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { withNoRecipe } = createCerberusPrimitive()
|
|
22
|
+
|
|
23
|
+
// Context
|
|
24
|
+
|
|
25
|
+
export type ClipboardContextProps = ArkContextProps
|
|
26
|
+
export const ClipboardContext = Clipboard.Context
|
|
27
|
+
|
|
28
|
+
// Root
|
|
29
|
+
|
|
30
|
+
export type ClipboardRootProps = CerberusPrimitiveProps<ArkRootProps>
|
|
31
|
+
export const ClipboardRoot = withNoRecipe(Clipboard.Root)
|
|
32
|
+
|
|
33
|
+
// Label
|
|
34
|
+
|
|
35
|
+
export type ClipboardLabelProps = CerberusPrimitiveProps<ArkLabelProps>
|
|
36
|
+
export const ClipboardLabel = withNoRecipe(Clipboard.Label)
|
|
37
|
+
|
|
38
|
+
// Control
|
|
39
|
+
|
|
40
|
+
export type ClipboardControlProps = CerberusPrimitiveProps<ArkControlProps>
|
|
41
|
+
export const ClipboardControl = withNoRecipe(Clipboard.Control)
|
|
42
|
+
|
|
43
|
+
// Input
|
|
44
|
+
|
|
45
|
+
export type ClipboardInputProps = CerberusPrimitiveProps<ArkInputProps>
|
|
46
|
+
export const ClipboardInput = withNoRecipe(Clipboard.Input)
|
|
47
|
+
|
|
48
|
+
// Trigger
|
|
49
|
+
|
|
50
|
+
export type ClipboardTriggerProps = CerberusPrimitiveProps<ArkTriggerProps>
|
|
51
|
+
export const ClipboardTrigger = withNoRecipe(Clipboard.Trigger)
|
|
52
|
+
|
|
53
|
+
// Indicator
|
|
54
|
+
|
|
55
|
+
export type ClipboardIndicatorProps = CerberusPrimitiveProps<ArkIndicatorProps>
|
|
56
|
+
export const ClipboardIndicator = withNoRecipe(Clipboard.Indicator)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tooltip } from '../tooltip/index'
|
|
2
|
+
import { ClipboardTrigger, type ClipboardTriggerProps } from './primitives'
|
|
3
|
+
import { CopyText } from './copy-text'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A Clipboard trigger wrapped with a Tooltip that displays the copy status.
|
|
7
|
+
*/
|
|
8
|
+
export function TriggerWithTooltip(props: ClipboardTriggerProps) {
|
|
9
|
+
return (
|
|
10
|
+
<Tooltip closeOnClick={false} content={<CopyText />} asChild>
|
|
11
|
+
<ClipboardTrigger {...props} />
|
|
12
|
+
</Tooltip>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ElementType } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
CollapsibleRootProvider,
|
|
4
|
+
CollapsibleRoot,
|
|
5
|
+
CollapsibleTrigger,
|
|
6
|
+
CollapsibleIndicator,
|
|
7
|
+
CollapsibleContent,
|
|
8
|
+
} from './primitives'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This module contains the parts of the Collapsible component.
|
|
12
|
+
* @module 'collapsible/parts'
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
interface CollapsiblePartsValue {
|
|
16
|
+
/**
|
|
17
|
+
* The low-level context provider for advanced scenarios
|
|
18
|
+
*/
|
|
19
|
+
RootProvider: ElementType
|
|
20
|
+
/**
|
|
21
|
+
* The context provider of the collapsible.
|
|
22
|
+
*/
|
|
23
|
+
Root: ElementType
|
|
24
|
+
/**
|
|
25
|
+
* The button that toggles the collapsible.
|
|
26
|
+
*/
|
|
27
|
+
Trigger: ElementType
|
|
28
|
+
/**
|
|
29
|
+
* The indicator that shows the state of the collapsible.
|
|
30
|
+
*/
|
|
31
|
+
Indicator: ElementType
|
|
32
|
+
/**
|
|
33
|
+
* The content of the collapsible.
|
|
34
|
+
*/
|
|
35
|
+
Content: ElementType
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An Object containing the parts of the Collapsible component. For users that
|
|
40
|
+
* prefer Object component syntax.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
*
|
|
44
|
+
* When using object component syntax, you import the CollapsibleParts object and
|
|
45
|
+
* the entire family of components vs. only what you use.
|
|
46
|
+
*/
|
|
47
|
+
export const Collapsible: CollapsiblePartsValue = {
|
|
48
|
+
RootProvider: CollapsibleRootProvider,
|
|
49
|
+
Root: CollapsibleRoot,
|
|
50
|
+
Trigger: CollapsibleTrigger,
|
|
51
|
+
Indicator: CollapsibleIndicator,
|
|
52
|
+
Content: CollapsibleContent,
|
|
53
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Collapsible,
|
|
3
|
+
type CollapsibleRootProviderProps as ArkCollapsibleProviderProps,
|
|
4
|
+
type CollapsibleRootProps as ArkCollapsibleRootProps,
|
|
5
|
+
type CollapsibleTriggerProps as ArkCollapsibleTriggerProps,
|
|
6
|
+
type CollapsibleIndicatorProps as ArkCollapsibleIndicatorProps,
|
|
7
|
+
type CollapsibleContentProps as ArkCollapsibleContentProps,
|
|
8
|
+
} from '@ark-ui/react/collapsible'
|
|
9
|
+
import { collapsible, type CollapsibleVariantProps } from 'styled-system/recipes'
|
|
10
|
+
import {
|
|
11
|
+
createCerberusPrimitive,
|
|
12
|
+
type CerberusPrimitiveProps,
|
|
13
|
+
} from '../../system/index'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This module contains all the primitives of the Collapsible component.
|
|
17
|
+
* @module 'collapsible'
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const { withSlotRecipe, withNoRecipe } = createCerberusPrimitive(collapsible)
|
|
21
|
+
|
|
22
|
+
// Provider
|
|
23
|
+
|
|
24
|
+
export type CollapsibleProviderProps = ArkCollapsibleProviderProps
|
|
25
|
+
export const CollapsibleRootProvider = withNoRecipe(Collapsible.RootProvider)
|
|
26
|
+
|
|
27
|
+
// Root
|
|
28
|
+
|
|
29
|
+
export type CollapsibleRootProps = CerberusPrimitiveProps<ArkCollapsibleRootProps>
|
|
30
|
+
export const CollapsibleRoot = withNoRecipe(Collapsible.Root)
|
|
31
|
+
|
|
32
|
+
// Trigger
|
|
33
|
+
|
|
34
|
+
export type CollapsibleTriggerProps = CerberusPrimitiveProps<ArkCollapsibleTriggerProps>
|
|
35
|
+
export const CollapsibleTrigger = withNoRecipe(Collapsible.Trigger)
|
|
36
|
+
|
|
37
|
+
// Indicator
|
|
38
|
+
|
|
39
|
+
export type CollapsibleIndicatorProps =
|
|
40
|
+
CerberusPrimitiveProps<ArkCollapsibleIndicatorProps>
|
|
41
|
+
export const CollapsibleIndicator = withNoRecipe(Collapsible.Indicator)
|
|
42
|
+
|
|
43
|
+
// Content
|
|
44
|
+
|
|
45
|
+
export type CollapsibleContentProps = CerberusPrimitiveProps<
|
|
46
|
+
ArkCollapsibleContentProps & CollapsibleVariantProps
|
|
47
|
+
>
|
|
48
|
+
export const CollapsibleContent = withSlotRecipe(Collapsible.Content, 'content')
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { ComboboxRootProps } from '@ark-ui/react/combobox'
|
|
4
|
+
import type { ComboboxVariantProps } from 'styled-system/recipes'
|
|
5
|
+
import { useCerberusContext } from '../../context/cerberus'
|
|
6
|
+
import { splitProps } from '../../utils/index'
|
|
7
|
+
import { type FieldInputElProps } from '../field/index'
|
|
8
|
+
import { Show } from '../show/index'
|
|
9
|
+
import { ComboboxParts } from './parts'
|
|
10
|
+
import { ComboboxStartIcon } from './primitives'
|
|
11
|
+
|
|
12
|
+
export interface ComboboxProps<T> extends ComboboxRootProps<T>, ComboboxVariantProps {
|
|
13
|
+
/**
|
|
14
|
+
* The label that appears above the combobox input.
|
|
15
|
+
*/
|
|
16
|
+
label?: string
|
|
17
|
+
/**
|
|
18
|
+
* The icon that appears at the start of the combobox input.
|
|
19
|
+
*/
|
|
20
|
+
startIcon?: FieldInputElProps['startIcon']
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function Combobox<T>(props: ComboboxProps<T>) {
|
|
24
|
+
const [{ startIcon, label, ...elProps }, rootProps] = splitProps(props, [
|
|
25
|
+
'label',
|
|
26
|
+
'children',
|
|
27
|
+
'startIcon',
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
const { icons } = useCerberusContext()
|
|
31
|
+
const { selectArrow: SelectArrow, close: CloseIcon } = icons
|
|
32
|
+
|
|
33
|
+
const hasStartIcon = Boolean(startIcon)
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<ComboboxParts.Root {...rootProps}>
|
|
37
|
+
<Show when={label}>
|
|
38
|
+
<ComboboxParts.Label>{label}</ComboboxParts.Label>
|
|
39
|
+
</Show>
|
|
40
|
+
|
|
41
|
+
<ComboboxParts.Control>
|
|
42
|
+
<Show when={hasStartIcon}>
|
|
43
|
+
<ComboboxStartIcon>{startIcon}</ComboboxStartIcon>
|
|
44
|
+
</Show>
|
|
45
|
+
|
|
46
|
+
<ComboboxParts.Input {...(hasStartIcon && { 'data-has': 'start-indicator' })} />
|
|
47
|
+
|
|
48
|
+
<ComboboxParts.ClearTrigger>
|
|
49
|
+
<CloseIcon />
|
|
50
|
+
</ComboboxParts.ClearTrigger>
|
|
51
|
+
<ComboboxParts.Trigger>
|
|
52
|
+
<SelectArrow />
|
|
53
|
+
</ComboboxParts.Trigger>
|
|
54
|
+
</ComboboxParts.Control>
|
|
55
|
+
|
|
56
|
+
<ComboboxParts.Positioner>
|
|
57
|
+
<ComboboxParts.Content size={rootProps.size}>
|
|
58
|
+
{elProps.children}
|
|
59
|
+
</ComboboxParts.Content>
|
|
60
|
+
</ComboboxParts.Positioner>
|
|
61
|
+
</ComboboxParts.Root>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComboboxItemGroupProps } from '@ark-ui/react/combobox'
|
|
2
|
+
import { ComboboxParts } from './parts'
|
|
3
|
+
|
|
4
|
+
export interface ComboItemGroupProps extends ComboboxItemGroupProps {
|
|
5
|
+
/**
|
|
6
|
+
* The label that appears for the combobox item group.
|
|
7
|
+
*/
|
|
8
|
+
label?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ComboItemGroup(props: ComboItemGroupProps) {
|
|
12
|
+
const { label, children, ...groupProps } = props
|
|
13
|
+
return (
|
|
14
|
+
<ComboboxParts.ItemGroup {...groupProps}>
|
|
15
|
+
<ComboboxParts.ItemGroupLabel>{label}</ComboboxParts.ItemGroupLabel>
|
|
16
|
+
{children}
|
|
17
|
+
</ComboboxParts.ItemGroup>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import type { ComboboxItemProps } from '@ark-ui/react'
|
|
4
|
+
import { useCerberusContext } from '../../context/cerberus'
|
|
5
|
+
import { ComboboxParts } from './parts'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This module contains the ComboboxItemWithIndicator component.
|
|
9
|
+
* @module 'combobox/item'
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* An abstraction of the ComboboxItem component that includes an indicator.
|
|
14
|
+
* @description [Combobox Docs](https://cerberus.digitalu.design/react/combobox)
|
|
15
|
+
* @description [Ark Docs](https://ark-ui.com/react/docs/components/combobox)
|
|
16
|
+
*/
|
|
17
|
+
export function ComboItemWithIndicator(props: ComboboxItemProps) {
|
|
18
|
+
const { icons } = useCerberusContext()
|
|
19
|
+
const { selectChecked: CheckedIcon } = icons
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<ComboboxParts.Item {...props}>
|
|
23
|
+
<ComboboxParts.ItemIndicator>
|
|
24
|
+
<CheckedIcon />
|
|
25
|
+
</ComboboxParts.ItemIndicator>
|
|
26
|
+
|
|
27
|
+
{props.children}
|
|
28
|
+
</ComboboxParts.Item>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { ElementType } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
ComboboxClearTrigger,
|
|
4
|
+
ComboboxContent,
|
|
5
|
+
ComboboxContext,
|
|
6
|
+
ComboboxControl,
|
|
7
|
+
ComboboxInput,
|
|
8
|
+
ComboboxItem,
|
|
9
|
+
ComboboxItemGroup,
|
|
10
|
+
ComboboxItemGroupLabel,
|
|
11
|
+
ComboboxItemIndicator,
|
|
12
|
+
ComboboxItemText,
|
|
13
|
+
ComboboxLabel,
|
|
14
|
+
ComboboxPositioner,
|
|
15
|
+
ComboboxRoot,
|
|
16
|
+
ComboboxTrigger,
|
|
17
|
+
} from './primitives'
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This module contains the parts of the Combobox parts.
|
|
21
|
+
* @module 'combobox/parts'
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
interface ComboboxPartsValue {
|
|
25
|
+
/**
|
|
26
|
+
* A uitility component to pass the context without a hook.
|
|
27
|
+
*/
|
|
28
|
+
Context: ElementType
|
|
29
|
+
/**
|
|
30
|
+
* The context provider for the Select component.
|
|
31
|
+
*/
|
|
32
|
+
Root: ElementType
|
|
33
|
+
/**
|
|
34
|
+
* The label that appears above the select input.
|
|
35
|
+
*/
|
|
36
|
+
Label: ElementType
|
|
37
|
+
/**
|
|
38
|
+
* The control that wraps the select trigger.
|
|
39
|
+
*/
|
|
40
|
+
Control: ElementType
|
|
41
|
+
/**
|
|
42
|
+
* The filterable input of the combobox.
|
|
43
|
+
*/
|
|
44
|
+
Input: ElementType
|
|
45
|
+
/**
|
|
46
|
+
* The trigger that opens the dropdown.
|
|
47
|
+
*/
|
|
48
|
+
Trigger: ElementType
|
|
49
|
+
/**
|
|
50
|
+
* The trigger to clear the select input.
|
|
51
|
+
*/
|
|
52
|
+
ClearTrigger: ElementType
|
|
53
|
+
/**
|
|
54
|
+
* The positioner that wraps the content.
|
|
55
|
+
*/
|
|
56
|
+
Positioner: ElementType
|
|
57
|
+
/**
|
|
58
|
+
* The content of the select component.
|
|
59
|
+
*/
|
|
60
|
+
Content: ElementType
|
|
61
|
+
/**
|
|
62
|
+
* A group of items in the select component.
|
|
63
|
+
*/
|
|
64
|
+
ItemGroup: ElementType
|
|
65
|
+
/**
|
|
66
|
+
* The label for a group of items in the select component.
|
|
67
|
+
*/
|
|
68
|
+
ItemGroupLabel: ElementType
|
|
69
|
+
/**
|
|
70
|
+
* An individual item in the select component.
|
|
71
|
+
*/
|
|
72
|
+
Item: ElementType
|
|
73
|
+
/**
|
|
74
|
+
* The text that labels a single radio of the field.
|
|
75
|
+
*/
|
|
76
|
+
ItemText: ElementType
|
|
77
|
+
/**
|
|
78
|
+
* The indicator that appears when the item has been selected.
|
|
79
|
+
*/
|
|
80
|
+
ItemIndicator: ElementType
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* An Object containing the parts of the Radio component. For users that
|
|
85
|
+
* prefer Object component syntax.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
*
|
|
89
|
+
* When using object component syntax, you import the ComboboxParts object and
|
|
90
|
+
* the entire family of components vs. only what you use.
|
|
91
|
+
*/
|
|
92
|
+
export const ComboboxParts: ComboboxPartsValue = {
|
|
93
|
+
Context: ComboboxContext,
|
|
94
|
+
Root: ComboboxRoot,
|
|
95
|
+
Label: ComboboxLabel,
|
|
96
|
+
Control: ComboboxControl,
|
|
97
|
+
Input: ComboboxInput,
|
|
98
|
+
Trigger: ComboboxTrigger,
|
|
99
|
+
ClearTrigger: ComboboxClearTrigger,
|
|
100
|
+
Positioner: ComboboxPositioner,
|
|
101
|
+
Content: ComboboxContent,
|
|
102
|
+
ItemGroup: ComboboxItemGroup,
|
|
103
|
+
ItemGroupLabel: ComboboxItemGroupLabel,
|
|
104
|
+
Item: ComboboxItem,
|
|
105
|
+
ItemText: ComboboxItemText,
|
|
106
|
+
ItemIndicator: ComboboxItemIndicator,
|
|
107
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Combobox,
|
|
3
|
+
type ComboboxContextProps as ArkComboboxContextProps,
|
|
4
|
+
type ComboboxClearTriggerProps as ArkComboboxClearTriggerProps,
|
|
5
|
+
type ComboboxContentProps as ArkComboboxContentProps,
|
|
6
|
+
type ComboboxControlProps as ArkComboboxControlProps,
|
|
7
|
+
type ComboboxInputProps as ArkComboboxInputProps,
|
|
8
|
+
type ComboboxItemGroupLabelProps as ArkComboboxItemGroupLabelProps,
|
|
9
|
+
type ComboboxItemGroupProps as ArkComboboxItemGroupProps,
|
|
10
|
+
type ComboboxItemIndicatorProps as ArkComboboxItemIndicatorProps,
|
|
11
|
+
type ComboboxItemProps as ArkComboboxItemProps,
|
|
12
|
+
type ComboboxItemTextProps as ArkComboboxItemTextProps,
|
|
13
|
+
type ComboboxLabelProps as ArkComboboxLabelProps,
|
|
14
|
+
type ComboboxPositionerProps as ArkComboboxPositionerProps,
|
|
15
|
+
type ComboboxRootProps as ArkComboboxRootProps,
|
|
16
|
+
type ComboboxTriggerProps as ArkComboboxTriggerProps,
|
|
17
|
+
} from '@ark-ui/react/combobox'
|
|
18
|
+
import { ark, type HTMLArkProps } from '@ark-ui/react/factory'
|
|
19
|
+
import type { SelectCollectionItem } from '../select/select'
|
|
20
|
+
import { combobox, type ComboboxVariantProps } from 'styled-system/recipes'
|
|
21
|
+
import {
|
|
22
|
+
createCerberusPrimitive,
|
|
23
|
+
type CerberusPrimitiveProps,
|
|
24
|
+
} from '../../system/index'
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This module contains the primitives of the Combobox.
|
|
28
|
+
* @module 'combobox/primitives'
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const { withSlotRecipe } = createCerberusPrimitive(combobox)
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The ComboboxRoot component is the context provider for the Combobox
|
|
35
|
+
* component.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
export const ComboboxContext = Combobox.Context
|
|
39
|
+
export type ComboboxContextProps<T> = ArkComboboxContextProps<T>
|
|
40
|
+
|
|
41
|
+
export const ComboboxRoot = withSlotRecipe(Combobox.Root, 'root')
|
|
42
|
+
export type ComboboxRootProps = CerberusPrimitiveProps<
|
|
43
|
+
ArkComboboxRootProps<SelectCollectionItem> & ComboboxVariantProps
|
|
44
|
+
>
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The label that appears above the combobox input.
|
|
48
|
+
*/
|
|
49
|
+
export const ComboboxLabel = withSlotRecipe(Combobox.Label, 'label')
|
|
50
|
+
export type ComboboxLabelProps = CerberusPrimitiveProps<ArkComboboxLabelProps>
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The control that wraps the combobox input.
|
|
54
|
+
*/
|
|
55
|
+
export const ComboboxControl = withSlotRecipe(Combobox.Control, 'control')
|
|
56
|
+
export type ComboboxControlProps = CerberusPrimitiveProps<ArkComboboxControlProps>
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The input of the combobox.
|
|
60
|
+
*/
|
|
61
|
+
export const ComboboxInput = withSlotRecipe(Combobox.Input, 'input')
|
|
62
|
+
export type ComboboxInputProps = CerberusPrimitiveProps<ArkComboboxInputProps>
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The trigger that opens the dropdown.
|
|
66
|
+
*/
|
|
67
|
+
export const ComboboxTrigger = withSlotRecipe(Combobox.Trigger, 'trigger')
|
|
68
|
+
export type ComboboxTriggerProps = CerberusPrimitiveProps<ArkComboboxTriggerProps>
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The trigger to clear the combobox input.
|
|
72
|
+
*/
|
|
73
|
+
export const ComboboxClearTrigger = withSlotRecipe(
|
|
74
|
+
Combobox.ClearTrigger,
|
|
75
|
+
'clearTrigger',
|
|
76
|
+
)
|
|
77
|
+
export type ComboboxClearTriggerProps =
|
|
78
|
+
CerberusPrimitiveProps<ArkComboboxClearTriggerProps>
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The positioner that wraps the content.
|
|
82
|
+
*/
|
|
83
|
+
export const ComboboxPositioner = withSlotRecipe(Combobox.Positioner, 'positioner')
|
|
84
|
+
export type ComboboxPositionerProps = CerberusPrimitiveProps<ArkComboboxPositionerProps>
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The content of the combobox component.
|
|
88
|
+
*/
|
|
89
|
+
export const ComboboxContent = withSlotRecipe(Combobox.Content, 'content')
|
|
90
|
+
export type ComboboxContentProps = CerberusPrimitiveProps<
|
|
91
|
+
ArkComboboxContentProps & ComboboxVariantProps
|
|
92
|
+
>
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* A group of items in the combobox component.
|
|
96
|
+
*/
|
|
97
|
+
export const ComboboxItemGroup = withSlotRecipe(Combobox.ItemGroup, 'itemGroup')
|
|
98
|
+
export type ComboboxItemGroupProps = CerberusPrimitiveProps<ArkComboboxItemGroupProps>
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The label for a group of items in the combobox component.
|
|
102
|
+
*/
|
|
103
|
+
export const ComboboxItemGroupLabel = withSlotRecipe(
|
|
104
|
+
Combobox.ItemGroupLabel,
|
|
105
|
+
'itemGroupLabel',
|
|
106
|
+
)
|
|
107
|
+
export type ComboboxItemGroupLabelProps =
|
|
108
|
+
CerberusPrimitiveProps<ArkComboboxItemGroupLabelProps>
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* An individual item in the combobox component.
|
|
112
|
+
*/
|
|
113
|
+
export const ComboboxItem = withSlotRecipe(Combobox.Item, 'item')
|
|
114
|
+
export type ComboboxItemProps = CerberusPrimitiveProps<ArkComboboxItemProps>
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The text that labels a single item of the combobox.
|
|
118
|
+
*/
|
|
119
|
+
export const ComboboxItemText = withSlotRecipe(Combobox.ItemText, 'itemText')
|
|
120
|
+
export type ComboboxItemTextProps = CerberusPrimitiveProps<ArkComboboxItemTextProps>
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The indicator that appears when the item has been selected.
|
|
124
|
+
*/
|
|
125
|
+
export const ComboboxItemIndicator = withSlotRecipe(
|
|
126
|
+
Combobox.ItemIndicator,
|
|
127
|
+
'itemIndicator',
|
|
128
|
+
)
|
|
129
|
+
export type ComboboxItemIndicatorProps =
|
|
130
|
+
CerberusPrimitiveProps<ArkComboboxItemIndicatorProps>
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The icon that appears at the start of the combobox input.
|
|
134
|
+
*/
|
|
135
|
+
export const ComboboxStartIcon = withSlotRecipe(ark.span, 'startIcon')
|
|
136
|
+
export type ComboboxStartIconProps = CerberusPrimitiveProps<HTMLArkProps<'span'>>
|
|
137
|
+
|
|
138
|
+
// We are only doing this to make the API consistent
|
|
139
|
+
export const ComboItemText = ComboboxItemText
|
|
140
|
+
export type ComboboxInputValueChangeDetails = Combobox.InputValueChangeDetails
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react'
|
|
4
|
+
import type { ComboboxInputValueChangeDetails } from '@ark-ui/react/combobox'
|
|
5
|
+
import type { SelectCollectionItem } from '../select/select'
|
|
6
|
+
import { createSelectCollection } from '../select/primitives'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This module contains a custom hook that provides a stateful collection for
|
|
10
|
+
* the Combobox component.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface StatefulCollectionReturn {
|
|
14
|
+
/**
|
|
15
|
+
* The collection of items.
|
|
16
|
+
*/
|
|
17
|
+
collection: ReturnType<typeof createSelectCollection>
|
|
18
|
+
/**
|
|
19
|
+
* The filter value split into an array of characters.
|
|
20
|
+
*/
|
|
21
|
+
filterChars: string[]
|
|
22
|
+
/**
|
|
23
|
+
* The function to handle input changes.
|
|
24
|
+
*/
|
|
25
|
+
handleInputChange: (details: ComboboxInputValueChangeDetails) => void
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This hook provides a stateful collection for the Combobox component.
|
|
30
|
+
* It returns a collection of items and a function to handle input changes.
|
|
31
|
+
* @param initialItems - The initial collection of items.
|
|
32
|
+
* @return An object containing the collection and a function to handle input changes.
|
|
33
|
+
*/
|
|
34
|
+
export function useStatefulCollection(
|
|
35
|
+
initialItems: SelectCollectionItem[] = [],
|
|
36
|
+
): StatefulCollectionReturn {
|
|
37
|
+
const [items, setItems] = useState(initialItems)
|
|
38
|
+
const [filterValue, setFilterValue] = useState<string[]>([])
|
|
39
|
+
|
|
40
|
+
const collection = useMemo(() => createSelectCollection(items), [items])
|
|
41
|
+
|
|
42
|
+
const handleInputChange = useCallback(
|
|
43
|
+
(details: ComboboxInputValueChangeDetails) => {
|
|
44
|
+
if (details.inputValue === '') {
|
|
45
|
+
return setItems(initialItems)
|
|
46
|
+
}
|
|
47
|
+
setItems((prev) =>
|
|
48
|
+
prev.filter(
|
|
49
|
+
(item) =>
|
|
50
|
+
item.value.toLowerCase().includes(details.inputValue.toLowerCase()) ||
|
|
51
|
+
item.label.toLowerCase().includes(details.inputValue.toLowerCase()),
|
|
52
|
+
),
|
|
53
|
+
)
|
|
54
|
+
setFilterValue(details.inputValue.split(''))
|
|
55
|
+
},
|
|
56
|
+
[initialItems],
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
return useMemo(
|
|
60
|
+
() => ({
|
|
61
|
+
collection,
|
|
62
|
+
filterChars: filterValue,
|
|
63
|
+
handleInputChange,
|
|
64
|
+
}),
|
|
65
|
+
[collection, filterValue, handleInputChange],
|
|
66
|
+
)
|
|
67
|
+
}
|