@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,624 @@
|
|
|
1
|
+
export function isObject(v) {
|
|
2
|
+
return typeof v === "object" && v != null && !Array.isArray(v)
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
const HAS_OWN = Object.prototype.hasOwnProperty
|
|
6
|
+
|
|
7
|
+
export function isBaseCondition(v) {
|
|
8
|
+
return v === "base"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function filterBaseConditions(c) {
|
|
12
|
+
const out = []
|
|
13
|
+
for (let i = 0; i < c.length; i++) {
|
|
14
|
+
if (!isBaseCondition(c[i])) out.push(c[i])
|
|
15
|
+
}
|
|
16
|
+
return out
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function toHash(v) {
|
|
20
|
+
let h = 5381
|
|
21
|
+
for (let i = v.length; i; ) h = (h * 33) ^ v.charCodeAt(--i)
|
|
22
|
+
let x = h >>> 0, out = ''
|
|
23
|
+
for (; x > 52; x = (x / 52) | 0) {
|
|
24
|
+
const c = x % 52
|
|
25
|
+
out = String.fromCharCode(c + (c > 25 ? 39 : 97)) + out
|
|
26
|
+
}
|
|
27
|
+
const c = x % 52
|
|
28
|
+
return String.fromCharCode(c + (c > 25 ? 39 : 97)) + out
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function stableStringify(value) {
|
|
32
|
+
if (value === null) return 'null'
|
|
33
|
+
const t = typeof value
|
|
34
|
+
if (t === 'boolean') return value ? 'true' : 'false'
|
|
35
|
+
if (t === 'number') return Number.isFinite(value) ? String(value) : 'null'
|
|
36
|
+
if (t === 'string') return JSON.stringify(value)
|
|
37
|
+
if (Array.isArray(value)) {
|
|
38
|
+
let out = '['
|
|
39
|
+
for (let i = 0; i < value.length; i++) {
|
|
40
|
+
if (i) out += ','
|
|
41
|
+
out += stableStringify(value[i])
|
|
42
|
+
}
|
|
43
|
+
return out + ']'
|
|
44
|
+
}
|
|
45
|
+
if (t === 'object') {
|
|
46
|
+
const keys = Object.keys(value).sort()
|
|
47
|
+
let out = '{'
|
|
48
|
+
for (let i = 0; i < keys.length; i++) {
|
|
49
|
+
if (i) out += ','
|
|
50
|
+
const key = keys[i]
|
|
51
|
+
out += JSON.stringify(key) + ':' + stableStringify(value[key])
|
|
52
|
+
}
|
|
53
|
+
return out + '}'
|
|
54
|
+
}
|
|
55
|
+
return 'null'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const CSS_VAR_CHAR_REGEX = /[a-z0-9_-]/
|
|
59
|
+
|
|
60
|
+
export function toCssVar(path) {
|
|
61
|
+
let out = ""
|
|
62
|
+
for (const ch of path.replaceAll(".", "-")) {
|
|
63
|
+
if (ch >= "A" && ch <= "Z") out += "-" + ch.toLowerCase()
|
|
64
|
+
else if (CSS_VAR_CHAR_REGEX.test(ch) || ch >= "\u0081") out += ch
|
|
65
|
+
else out += "\\" + ch
|
|
66
|
+
}
|
|
67
|
+
return "var(--cerberus-" + out + ")"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function colorMix(tokens, path, resolveVar) {
|
|
71
|
+
const colorPrefix = "colors."
|
|
72
|
+
if (!path.startsWith(colorPrefix)) return
|
|
73
|
+
|
|
74
|
+
const index = path.indexOf("/", colorPrefix.length)
|
|
75
|
+
if (index === -1 || index === path.length - 1) return
|
|
76
|
+
|
|
77
|
+
const colorPath = path.slice(0, index)
|
|
78
|
+
if (tokens[colorPath] === undefined) return
|
|
79
|
+
|
|
80
|
+
const rawOpacity = path.slice(index + 1)
|
|
81
|
+
const opacity = tokens["opacity." + rawOpacity]
|
|
82
|
+
const percent = opacity === undefined ? Number(rawOpacity) : Number(opacity) * 100
|
|
83
|
+
if (Number.isNaN(percent)) return
|
|
84
|
+
|
|
85
|
+
return "color-mix(in oklab, " + (resolveVar || toCssVar)(colorPath) + " " + percent + "%, transparent)"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function compact(v) {
|
|
89
|
+
const out = {}
|
|
90
|
+
if (!v) return out
|
|
91
|
+
for (const k in v) {
|
|
92
|
+
if (v[k] !== void 0) out[k] = v[k]
|
|
93
|
+
}
|
|
94
|
+
return out
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function withDefaults(defaults, props) {
|
|
98
|
+
return { ...defaults, ...compact(props) }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function toVariantMap(variants) {
|
|
102
|
+
const map = {}
|
|
103
|
+
for (const key in variants) map[key] = Object.keys(variants[key])
|
|
104
|
+
return map
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function compoundVariantMatches(compound, variants) {
|
|
108
|
+
for (const key in compound) {
|
|
109
|
+
if (key === "css" || key === "className" || key === "classNames") continue
|
|
110
|
+
const expected = compound[key]
|
|
111
|
+
const actual = variants[key]
|
|
112
|
+
if (Array.isArray(expected) ? !expected.includes(actual) : actual !== expected) return false
|
|
113
|
+
}
|
|
114
|
+
return true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function getCompoundVariantClassNames(compoundVariants, variants, formatClassName) {
|
|
118
|
+
const classes = []
|
|
119
|
+
for (const compound of compoundVariants) {
|
|
120
|
+
if (!compoundVariantMatches(compound, variants)) continue
|
|
121
|
+
if (compound.className) classes.push(formatClassName ? formatClassName(compound.className) : compound.className)
|
|
122
|
+
}
|
|
123
|
+
return classes.join(" ")
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function getCompoundVariantCss(compoundVariants, variants) {
|
|
127
|
+
let result = {}
|
|
128
|
+
for (const variant of compoundVariants) {
|
|
129
|
+
if (!compoundVariantMatches(variant, variants)) continue
|
|
130
|
+
result = mergeProps(result, variant.css)
|
|
131
|
+
}
|
|
132
|
+
return result
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function getSlotCompoundVariant(compoundVariants, slot) {
|
|
136
|
+
const result = []
|
|
137
|
+
for (const variant of compoundVariants) {
|
|
138
|
+
const css = variant.css?.[slot]
|
|
139
|
+
const className = variant.classNames?.[slot] ?? variant.className
|
|
140
|
+
if (!css && !className) continue
|
|
141
|
+
const next = css ? { css } : {}
|
|
142
|
+
for (const key in variant) {
|
|
143
|
+
if (key === "css" || key === "className" || key === "classNames") continue
|
|
144
|
+
next[key] = variant[key]
|
|
145
|
+
}
|
|
146
|
+
if (className) next.className = className
|
|
147
|
+
result.push(next)
|
|
148
|
+
}
|
|
149
|
+
return result
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function getSlotRecipes(recipe) {
|
|
153
|
+
const result = {}
|
|
154
|
+
const slots = recipe.slots ?? []
|
|
155
|
+
for (const slot of slots) {
|
|
156
|
+
result[slot] = {
|
|
157
|
+
className: recipe.className ? recipe.className + "__" + slot : slot,
|
|
158
|
+
base: recipe.base?.[slot] ?? {},
|
|
159
|
+
variants: {},
|
|
160
|
+
defaultVariants: recipe.defaultVariants ?? {},
|
|
161
|
+
compoundVariants: getSlotCompoundVariant(recipe.compoundVariants ?? [], slot),
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const variants = recipe.variants ?? {}
|
|
165
|
+
for (const variantsKey in variants) {
|
|
166
|
+
const variantGroup = variants[variantsKey]
|
|
167
|
+
for (const slot of slots) {
|
|
168
|
+
const group = result[slot].variants[variantsKey] = {}
|
|
169
|
+
for (const variantKey in variantGroup) {
|
|
170
|
+
group[variantKey] = variantGroup[variantKey][slot] ?? {}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return result
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function toResponsiveObject(values, breakpoints) {
|
|
178
|
+
const out = {}
|
|
179
|
+
for (let i = 0; i < values.length; i++) {
|
|
180
|
+
if (values[i] != null) out[breakpoints[i]] = values[i]
|
|
181
|
+
}
|
|
182
|
+
return out
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function walkObject(target, fn, options) {
|
|
186
|
+
options ||= {}
|
|
187
|
+
const { stop, getKey } = options
|
|
188
|
+
const inner = (value, path = []) => {
|
|
189
|
+
if (!value || typeof value !== "object") return fn(value, path)
|
|
190
|
+
if (stop?.(value, path)) return fn(value, path)
|
|
191
|
+
const out = Array.isArray(value) ? [] : {}
|
|
192
|
+
for (const prop in value) {
|
|
193
|
+
if (!HAS_OWN.call(value, prop) || prop === "__proto__") continue
|
|
194
|
+
const key = getKey?.(prop, value[prop]) ?? prop
|
|
195
|
+
path.push(key)
|
|
196
|
+
const next = inner(value[prop], path)
|
|
197
|
+
path.pop()
|
|
198
|
+
if (next != null) out[key] = next
|
|
199
|
+
}
|
|
200
|
+
return out
|
|
201
|
+
}
|
|
202
|
+
return inner(target)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function mapObject(obj, fn) {
|
|
206
|
+
return Array.isArray(obj) ? obj.map(fn) : isObject(obj) ? walkObject(obj, fn) : fn(obj)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function normalizeStyleObject(styles, context, shorthand) {
|
|
210
|
+
const { utility, conditions } = context
|
|
211
|
+
const { hasShorthand, resolveShorthand } = utility
|
|
212
|
+
shorthand = shorthand !== false
|
|
213
|
+
return walkObject(styles, (value) => {
|
|
214
|
+
if (Array.isArray(value)) return toResponsiveObject(value, conditions.breakpoints.keys)
|
|
215
|
+
return value
|
|
216
|
+
}, {
|
|
217
|
+
stop: Array.isArray,
|
|
218
|
+
getKey: shorthand ? (prop) => hasShorthand ? resolveShorthand(prop) : prop : void 0
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function flatHashOrNull(args) {
|
|
223
|
+
let h = 5381
|
|
224
|
+
for (let a = 0; a < args.length; a++) {
|
|
225
|
+
const obj = args[a]
|
|
226
|
+
if (obj === null || typeof obj !== "object") { h = (h * 33) ^ 1; continue }
|
|
227
|
+
for (const k in obj) {
|
|
228
|
+
const v = obj[k]
|
|
229
|
+
const tv = typeof v
|
|
230
|
+
if (v !== null && tv === "object") return null
|
|
231
|
+
for (let i = 0; i < k.length; i++) h = (h * 33) ^ k.charCodeAt(i)
|
|
232
|
+
if (tv === "string") { for (let i = 0; i < v.length; i++) h = (h * 33) ^ v.charCodeAt(i) }
|
|
233
|
+
else if (tv === "number") h = (h * 33) ^ (v | 0)
|
|
234
|
+
else if (tv === "boolean") h = (h * 33) ^ (v ? 991 : 997)
|
|
235
|
+
else h = (h * 33) ^ 2
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return h >>> 0
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function flatArgsEqual(a, b) {
|
|
242
|
+
if (a.length !== b.length) return false
|
|
243
|
+
for (let i = 0; i < a.length; i++) {
|
|
244
|
+
const oa = a[i]
|
|
245
|
+
const ob = b[i]
|
|
246
|
+
if (oa === ob) continue
|
|
247
|
+
if (oa === null || ob === null || typeof oa !== "object" || typeof ob !== "object") return false
|
|
248
|
+
let n = 0
|
|
249
|
+
for (const k in oa) {
|
|
250
|
+
if (oa[k] !== ob[k]) return false
|
|
251
|
+
n++
|
|
252
|
+
}
|
|
253
|
+
if (n !== Object.keys(ob).length) return false
|
|
254
|
+
}
|
|
255
|
+
return true
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function memo(fn) {
|
|
259
|
+
const cache = new Map()
|
|
260
|
+
const stringCache = new Map()
|
|
261
|
+
const seen = new WeakSet()
|
|
262
|
+
const newNode = () => ({ objects: new WeakMap(), prims: new Map(), out: void 0, has: false })
|
|
263
|
+
const root = newNode()
|
|
264
|
+
let lastHash
|
|
265
|
+
let lastKey
|
|
266
|
+
let lastValue
|
|
267
|
+
let hasLast = false
|
|
268
|
+
let misses = 0
|
|
269
|
+
|
|
270
|
+
const step = (node, v) => {
|
|
271
|
+
if (v !== null && typeof v === "object") {
|
|
272
|
+
let next = node.objects.get(v)
|
|
273
|
+
if (next === void 0) { next = newNode(); node.objects.set(v, next) }
|
|
274
|
+
return next
|
|
275
|
+
}
|
|
276
|
+
let next = node.prims.get(v)
|
|
277
|
+
if (next === void 0) {
|
|
278
|
+
if (node.prims.size > 64) node.prims.clear()
|
|
279
|
+
next = newNode()
|
|
280
|
+
node.prims.set(v, next)
|
|
281
|
+
}
|
|
282
|
+
return next
|
|
283
|
+
}
|
|
284
|
+
const walk = (node, v) => {
|
|
285
|
+
if (Array.isArray(v)) {
|
|
286
|
+
node = step(node, "\u0000[")
|
|
287
|
+
for (let i = 0; i < v.length; i++) node = walk(node, v[i])
|
|
288
|
+
return step(node, "\u0000]")
|
|
289
|
+
}
|
|
290
|
+
return step(node, v)
|
|
291
|
+
}
|
|
292
|
+
const readWalk = (node, v) => {
|
|
293
|
+
if (node === void 0) return void 0
|
|
294
|
+
if (Array.isArray(v)) {
|
|
295
|
+
node = node.prims.get("\u0000[")
|
|
296
|
+
for (let i = 0; i < v.length && node !== void 0; i++) node = readWalk(node, v[i])
|
|
297
|
+
return node === void 0 ? void 0 : node.prims.get("\u0000]")
|
|
298
|
+
}
|
|
299
|
+
return v !== null && typeof v === "object" ? node.objects.get(v) : node.prims.get(v)
|
|
300
|
+
}
|
|
301
|
+
const markSeen = (v) => {
|
|
302
|
+
if (Array.isArray(v)) {
|
|
303
|
+
let all = true
|
|
304
|
+
for (let i = 0; i < v.length; i++) if (!markSeen(v[i])) all = false
|
|
305
|
+
return all
|
|
306
|
+
}
|
|
307
|
+
if (v === null || typeof v !== "object") return true
|
|
308
|
+
if (seen.has(v)) return true
|
|
309
|
+
seen.add(v)
|
|
310
|
+
return false
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return ((...args) => {
|
|
314
|
+
let composed = false
|
|
315
|
+
for (let i = 0; i < args.length; i++) if (Array.isArray(args[i])) { composed = true; break }
|
|
316
|
+
|
|
317
|
+
if (composed) {
|
|
318
|
+
let node = root
|
|
319
|
+
for (let i = 0; i < args.length && node !== void 0; i++) node = readWalk(node, args[i])
|
|
320
|
+
if (node !== void 0 && node.has) return node.out
|
|
321
|
+
|
|
322
|
+
const composedKey = JSON.stringify(args)
|
|
323
|
+
let composedOut =
|
|
324
|
+
hasLast && lastHash === void 0 && composedKey === lastKey ? lastValue : stringCache.get(composedKey)
|
|
325
|
+
if (composedOut === void 0) {
|
|
326
|
+
composedOut = fn(...args)
|
|
327
|
+
stringCache.set(composedKey, composedOut)
|
|
328
|
+
if (stringCache.size > 500) stringCache.delete(stringCache.keys().next().value)
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
let reused = false
|
|
332
|
+
if ((++misses & 3) === 0) {
|
|
333
|
+
reused = true
|
|
334
|
+
for (let i = 0; i < args.length; i++) if (!markSeen(args[i])) reused = false
|
|
335
|
+
}
|
|
336
|
+
if (reused) {
|
|
337
|
+
let insert = root
|
|
338
|
+
for (let i = 0; i < args.length; i++) insert = walk(insert, args[i])
|
|
339
|
+
insert.out = composedOut
|
|
340
|
+
insert.has = true
|
|
341
|
+
}
|
|
342
|
+
lastHash = void 0
|
|
343
|
+
lastKey = composedKey
|
|
344
|
+
lastValue = composedOut
|
|
345
|
+
hasLast = true
|
|
346
|
+
return composedOut
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const hash = flatHashOrNull(args)
|
|
350
|
+
if (hash !== null) {
|
|
351
|
+
if (hasLast && lastHash === hash && flatArgsEqual(args, lastKey)) return lastValue
|
|
352
|
+
let bucket = cache.get(hash)
|
|
353
|
+
if (bucket) {
|
|
354
|
+
for (let i = 0; i < bucket.length; i++) {
|
|
355
|
+
if (flatArgsEqual(args, bucket[i].args)) {
|
|
356
|
+
lastHash = hash
|
|
357
|
+
lastKey = args
|
|
358
|
+
lastValue = bucket[i].out
|
|
359
|
+
hasLast = true
|
|
360
|
+
return bucket[i].out
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
const out = fn(...args)
|
|
365
|
+
if (!bucket) {
|
|
366
|
+
bucket = []
|
|
367
|
+
cache.set(hash, bucket)
|
|
368
|
+
}
|
|
369
|
+
bucket.push({ args, out })
|
|
370
|
+
if (bucket.length > 8) bucket.shift()
|
|
371
|
+
if (cache.size > 500) cache.delete(cache.keys().next().value)
|
|
372
|
+
lastHash = hash
|
|
373
|
+
lastKey = args
|
|
374
|
+
lastValue = out
|
|
375
|
+
hasLast = true
|
|
376
|
+
return out
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const key = JSON.stringify(args)
|
|
380
|
+
if (hasLast && lastHash === void 0 && key === lastKey) return lastValue
|
|
381
|
+
const cached = stringCache.get(key)
|
|
382
|
+
if (cached !== void 0) {
|
|
383
|
+
lastHash = void 0
|
|
384
|
+
lastKey = key
|
|
385
|
+
lastValue = cached
|
|
386
|
+
hasLast = true
|
|
387
|
+
return cached
|
|
388
|
+
}
|
|
389
|
+
const out = fn(...args)
|
|
390
|
+
stringCache.set(key, out)
|
|
391
|
+
if (stringCache.size > 500) stringCache.delete(stringCache.keys().next().value)
|
|
392
|
+
lastHash = void 0
|
|
393
|
+
lastKey = key
|
|
394
|
+
lastValue = out
|
|
395
|
+
hasLast = true
|
|
396
|
+
return out
|
|
397
|
+
})
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export function weakMemo(fn) {
|
|
401
|
+
const cache = new WeakMap()
|
|
402
|
+
return ((arg) => {
|
|
403
|
+
if (!arg || typeof arg !== "object") return fn(arg)
|
|
404
|
+
if (cache.has(arg)) return cache.get(arg)
|
|
405
|
+
const out = fn(arg)
|
|
406
|
+
cache.set(arg, out)
|
|
407
|
+
return out
|
|
408
|
+
})
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export function mergeProps(...src) {
|
|
412
|
+
const out = {}
|
|
413
|
+
for (const obj of src) {
|
|
414
|
+
if (!obj) continue
|
|
415
|
+
for (const k in obj) {
|
|
416
|
+
if (!HAS_OWN.call(obj, k) || k === "__proto__" || k === "constructor" || k === "prototype") continue
|
|
417
|
+
const prev = out[k]
|
|
418
|
+
const next = obj[k]
|
|
419
|
+
out[k] = isObject(prev) && isObject(next) ? mergeProps(prev, next) : next
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return out
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
const WHITESPACE_REGEX = /[\n\s]+/g
|
|
426
|
+
const sanitizeStyleValue = (value) => typeof value === "string" ? value.replace(WHITESPACE_REGEX, " ") : value
|
|
427
|
+
|
|
428
|
+
export function resolveStyleArgs(styles, context) {
|
|
429
|
+
const out = []
|
|
430
|
+
const visit = (items) => {
|
|
431
|
+
for (let i = 0; i < items.length; i++) {
|
|
432
|
+
const style = items[i]
|
|
433
|
+
if (Array.isArray(style)) {
|
|
434
|
+
visit(style)
|
|
435
|
+
continue
|
|
436
|
+
}
|
|
437
|
+
if (!isObject(style)) continue
|
|
438
|
+
for (const key in style) {
|
|
439
|
+
if (style[key] !== void 0) {
|
|
440
|
+
out.push(style)
|
|
441
|
+
break
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
visit(styles)
|
|
447
|
+
if (out.length < 2) return out
|
|
448
|
+
for (let i = 0; i < out.length; i++) out[i] = normalizeStyleObject(out[i], context)
|
|
449
|
+
return out
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export function createSerializeCss(context) {
|
|
453
|
+
const u = context.utility
|
|
454
|
+
const c = context.conditions
|
|
455
|
+
const hash = context.hash
|
|
456
|
+
const fmt = (s) => u.prefix ? u.prefix + "-" + s : s
|
|
457
|
+
const toClass = (paths, name) => {
|
|
458
|
+
const parts = c.finalize(paths)
|
|
459
|
+
parts.push(hash ? name : fmt(name))
|
|
460
|
+
return hash ? fmt(u.toHash(parts, toHash)) : parts.join(":")
|
|
461
|
+
}
|
|
462
|
+
return weakMemo(memo(function serializeCss({ base, ...styles } = {}) {
|
|
463
|
+
const obj = normalizeStyleObject(base ? Object.assign(styles, base) : styles, context)
|
|
464
|
+
const set = new Set()
|
|
465
|
+
walkObject(obj, (value, paths) => {
|
|
466
|
+
if (value == null) return
|
|
467
|
+
const important = isImportant(value)
|
|
468
|
+
const [prop, ...all] = c.shift(paths)
|
|
469
|
+
const cond = filterBaseConditions(all)
|
|
470
|
+
const res = u.transform(prop, withoutSpace(withoutImportant(sanitizeStyleValue(value))))
|
|
471
|
+
let name = toClass(cond, res.className)
|
|
472
|
+
if (important) name += "!"
|
|
473
|
+
set.add(name)
|
|
474
|
+
})
|
|
475
|
+
let out = ""
|
|
476
|
+
for (const name of set) out += out ? " " + name : name
|
|
477
|
+
return out
|
|
478
|
+
}))
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export function createMergeCss(context) {
|
|
482
|
+
return function mergeCss() {
|
|
483
|
+
return mergeProps(...resolveStyleArgs(arguments, context))
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export function createSerializeCssArgs(serializeCss, mergeCss) {
|
|
488
|
+
return memo(function serializeCssArgs(...styles) {
|
|
489
|
+
return serializeCss(mergeCss(...styles))
|
|
490
|
+
})
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export function createAssignCss(context) {
|
|
494
|
+
return function assignCss() {
|
|
495
|
+
const out = {}
|
|
496
|
+
const resolved = resolveStyleArgs(arguments, context)
|
|
497
|
+
for (let i = 0; i < resolved.length; i++) Object.assign(out, resolved[i])
|
|
498
|
+
return out
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const HYPHENATE_PROPERTY_REGEX = /[A-Z]/g
|
|
503
|
+
const MS_PROPERTY_REGEX = /^ms-/
|
|
504
|
+
|
|
505
|
+
export function hypenateProperty(property) {
|
|
506
|
+
return property.startsWith("--") ? property : property.replace(HYPHENATE_PROPERTY_REGEX, "-$&").replace(MS_PROPERTY_REGEX, "-ms-").toLowerCase()
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
const splitPropsKeyMapCache = new WeakMap()
|
|
510
|
+
|
|
511
|
+
function getSplitPropsKeyMap(keys) {
|
|
512
|
+
let keyMap = splitPropsKeyMapCache.get(keys)
|
|
513
|
+
if (keyMap) return keyMap
|
|
514
|
+
keyMap = Object.create(null)
|
|
515
|
+
for (let i = 0; i < keys.length; i++) keyMap[keys[i]] = true
|
|
516
|
+
splitPropsKeyMapCache.set(keys, keyMap)
|
|
517
|
+
return keyMap
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function copySplitProp(source, target, key) {
|
|
521
|
+
const desc = Object.getOwnPropertyDescriptor(source, key)
|
|
522
|
+
if (desc?.get || desc?.set) {
|
|
523
|
+
Object.defineProperty(target, key, desc)
|
|
524
|
+
return
|
|
525
|
+
}
|
|
526
|
+
target[key] = source[key]
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export function splitProps(props, ...keys) {
|
|
530
|
+
const propKeys = Object.keys(props)
|
|
531
|
+
const keyCount = keys.length
|
|
532
|
+
|
|
533
|
+
if (keyCount === 1) {
|
|
534
|
+
const matcher = keys[0]
|
|
535
|
+
const picked = {}
|
|
536
|
+
const rest = {}
|
|
537
|
+
|
|
538
|
+
if (Array.isArray(matcher)) {
|
|
539
|
+
const keyMap = getSplitPropsKeyMap(matcher)
|
|
540
|
+
for (let i = 0; i < propKeys.length; i++) {
|
|
541
|
+
const key = propKeys[i]
|
|
542
|
+
if (keyMap[key] === true) {
|
|
543
|
+
copySplitProp(props, picked, key)
|
|
544
|
+
} else {
|
|
545
|
+
copySplitProp(props, rest, key)
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return [picked, rest]
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
for (let i = 0; i < propKeys.length; i++) {
|
|
552
|
+
const key = propKeys[i]
|
|
553
|
+
if (matcher(key)) {
|
|
554
|
+
copySplitProp(props, picked, key)
|
|
555
|
+
} else {
|
|
556
|
+
copySplitProp(props, rest, key)
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return [picked, rest]
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
const matchers = new Array(keyCount)
|
|
563
|
+
for (let i = 0; i < keyCount; i++) {
|
|
564
|
+
const matcher = keys[i]
|
|
565
|
+
matchers[i] = Array.isArray(matcher) ? getSplitPropsKeyMap(matcher) : matcher
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const out = new Array(keyCount + 1)
|
|
569
|
+
for (let i = 0; i <= keyCount; i++) out[i] = {}
|
|
570
|
+
const rest = out[keyCount]
|
|
571
|
+
|
|
572
|
+
for (let i = 0; i < propKeys.length; i++) {
|
|
573
|
+
const key = propKeys[i]
|
|
574
|
+
let matched = false
|
|
575
|
+
for (let j = 0; j < keyCount; j++) {
|
|
576
|
+
const matcher = matchers[j]
|
|
577
|
+
if (typeof matcher === "function" ? matcher(key) : matcher[key] === true) {
|
|
578
|
+
copySplitProp(props, out[j], key)
|
|
579
|
+
matched = true
|
|
580
|
+
break
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (!matched) copySplitProp(props, rest, key)
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return out
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const htmlProps = ['htmlSize', 'htmlTranslate', 'htmlWidth', 'htmlHeight']
|
|
590
|
+
|
|
591
|
+
function convertHTMLProp(key) {
|
|
592
|
+
return htmlProps.includes(key) ? key.replace('html', '').toLowerCase() : key
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// `Object.assign` keeps `.keys` inside a pure expression, so an unused helper tree-shakes away.
|
|
596
|
+
export const normalizeHTMLProps = /* @__PURE__ */ Object.assign(
|
|
597
|
+
function normalizeHTMLProps(props) {
|
|
598
|
+
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convertHTMLProp(key), value]))
|
|
599
|
+
},
|
|
600
|
+
{ keys: htmlProps },
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
export function uniq(...items) {
|
|
604
|
+
const set = new Set()
|
|
605
|
+
for (const values of items) {
|
|
606
|
+
if (!values) continue
|
|
607
|
+
for (let i = 0; i < values.length; i++) set.add(values[i])
|
|
608
|
+
}
|
|
609
|
+
return Array.from(set)
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export function withoutSpace(str) {
|
|
613
|
+
return (typeof str === "string" && str.indexOf(" ") >= 0 ? str.replaceAll(" ", "_") : str)
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
const IMPORTANT_REGEX = /\s*!(important)?\s*$/i
|
|
617
|
+
|
|
618
|
+
export function isImportant(value) {
|
|
619
|
+
return typeof value === "string" ? IMPORTANT_REGEX.test(value) : false
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export function withoutImportant(value) {
|
|
623
|
+
return (typeof value === "string" ? value.replace(IMPORTANT_REGEX, "").trim() : value)
|
|
624
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { AnimateInProperties } from '../patterns/animate-in';
|
|
3
|
+
import type { HTMLCerberusProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface AnimateInProps extends AnimateInProperties, DistributiveOmit<HTMLCerberusProps<'div'>, keyof AnimateInProperties | 'overflow'> {}
|
|
7
|
+
export declare const AnimateIn: FunctionComponent<AnimateInProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { animateIn } from '../patterns/animate-in';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { cerberus } from './factory';
|
|
5
|
+
|
|
6
|
+
export const AnimateIn = /* @__PURE__ */ forwardRef(function AnimateIn(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, animateIn.propKeys)
|
|
8
|
+
const styleProps = animateIn.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(cerberus["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { AspectRatioProperties } from '../patterns/aspect-ratio';
|
|
3
|
+
import type { HTMLCerberusProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface AspectRatioProps extends AspectRatioProperties, DistributiveOmit<HTMLCerberusProps<'div'>, keyof AspectRatioProperties | 'aspectRatio'> {}
|
|
7
|
+
export declare const AspectRatio: FunctionComponent<AspectRatioProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { aspectRatio } from '../patterns/aspect-ratio';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { cerberus } from './factory';
|
|
5
|
+
|
|
6
|
+
export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, aspectRatio.propKeys)
|
|
8
|
+
const styleProps = aspectRatio.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(cerberus["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { BleedProperties } from '../patterns/bleed';
|
|
3
|
+
import type { HTMLCerberusProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface BleedProps extends BleedProperties, DistributiveOmit<HTMLCerberusProps<'div'>, keyof BleedProperties> {}
|
|
7
|
+
export declare const Bleed: FunctionComponent<BleedProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { bleed } from '../patterns/bleed';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { cerberus } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, bleed.propKeys)
|
|
8
|
+
const styleProps = bleed.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(cerberus["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { BoxProperties } from '../patterns/box';
|
|
3
|
+
import type { HTMLCerberusProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface BoxProps extends BoxProperties, DistributiveOmit<HTMLCerberusProps<'div'>, keyof BoxProperties> {}
|
|
7
|
+
export declare const Box: FunctionComponent<BoxProps>;
|