@cerberus-design/react 0.0.0-next-bd980a6d9bd07d60e8d7200bd4d56624754e936c
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/LICENSE +201 -0
- package/README.md +68 -0
- package/dist/components/AnimatingUploadIcon.cjs +71 -0
- package/dist/components/AnimatingUploadIcon.d.cts +8 -0
- package/dist/components/AnimatingUploadIcon.d.ts +8 -0
- package/dist/components/AnimatingUploadIcon.js +71 -0
- package/dist/components/accordion/index.cjs +12 -0
- package/dist/components/accordion/index.d.cts +3 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/components/accordion/item-group.cjs +52 -0
- package/dist/components/accordion/item-group.d.cts +28 -0
- package/dist/components/accordion/item-group.d.ts +28 -0
- package/dist/components/accordion/item-group.js +51 -0
- package/dist/components/accordion/item-indicator.cjs +22 -0
- package/dist/components/accordion/item-indicator.d.cts +7 -0
- package/dist/components/accordion/item-indicator.d.ts +7 -0
- package/dist/components/accordion/item-indicator.js +22 -0
- package/dist/components/accordion/parts.cjs +20 -0
- package/dist/components/accordion/parts.d.cts +38 -0
- package/dist/components/accordion/parts.d.ts +38 -0
- package/dist/components/accordion/parts.js +20 -0
- package/dist/components/accordion/primitives.cjs +58 -0
- package/dist/components/accordion/primitives.d.cts +47 -0
- package/dist/components/accordion/primitives.d.ts +47 -0
- package/dist/components/accordion/primitives.js +54 -0
- package/dist/components/admonition/admonition.cjs +38 -0
- package/dist/components/admonition/admonition.d.cts +28 -0
- package/dist/components/admonition/admonition.d.ts +28 -0
- package/dist/components/admonition/admonition.js +38 -0
- package/dist/components/admonition/index.cjs +11 -0
- package/dist/components/admonition/index.d.cts +3 -0
- package/dist/components/admonition/index.d.ts +3 -0
- package/dist/components/admonition/index.js +4 -0
- package/dist/components/admonition/match-avatar.cjs +41 -0
- package/dist/components/admonition/match-avatar.d.cts +4 -0
- package/dist/components/admonition/match-avatar.d.ts +4 -0
- package/dist/components/admonition/match-avatar.js +41 -0
- package/dist/components/admonition/parts.cjs +20 -0
- package/dist/components/admonition/parts.d.cts +38 -0
- package/dist/components/admonition/parts.d.ts +38 -0
- package/dist/components/admonition/parts.js +20 -0
- package/dist/components/admonition/primitives.cjs +49 -0
- package/dist/components/admonition/primitives.d.cts +29 -0
- package/dist/components/admonition/primitives.d.ts +29 -0
- package/dist/components/admonition/primitives.js +45 -0
- package/dist/components/avatar/avatar.cjs +27 -0
- package/dist/components/avatar/avatar.d.cts +24 -0
- package/dist/components/avatar/avatar.d.ts +24 -0
- package/dist/components/avatar/avatar.js +27 -0
- package/dist/components/avatar/index.cjs +16 -0
- package/dist/components/avatar/index.d.cts +4 -0
- package/dist/components/avatar/index.d.ts +4 -0
- package/dist/components/avatar/index.js +5 -0
- package/dist/components/avatar/parts.cjs +18 -0
- package/dist/components/avatar/parts.d.cts +30 -0
- package/dist/components/avatar/parts.d.ts +30 -0
- package/dist/components/avatar/parts.js +18 -0
- package/dist/components/avatar/primitives.cjs +25 -0
- package/dist/components/avatar/primitives.d.cts +19 -0
- package/dist/components/avatar/primitives.d.ts +19 -0
- package/dist/components/avatar/primitives.js +23 -0
- package/dist/components/button/button.cjs +58 -0
- package/dist/components/button/button.d.cts +21 -0
- package/dist/components/button/button.d.ts +21 -0
- package/dist/components/button/button.js +57 -0
- package/dist/components/button/index.cjs +8 -0
- package/dist/components/button/index.d.cts +3 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/button/parts.cjs +17 -0
- package/dist/components/button/parts.d.cts +26 -0
- package/dist/components/button/parts.d.ts +26 -0
- package/dist/components/button/parts.js +17 -0
- package/dist/components/button/primitives.cjs +21 -0
- package/dist/components/button/primitives.d.cts +14 -0
- package/dist/components/button/primitives.d.ts +14 -0
- package/dist/components/button/primitives.js +21 -0
- package/dist/components/carousel/carousel.cjs +38 -0
- package/dist/components/carousel/carousel.d.cts +33 -0
- package/dist/components/carousel/carousel.d.ts +33 -0
- package/dist/components/carousel/carousel.js +38 -0
- package/dist/components/carousel/index.cjs +14 -0
- package/dist/components/carousel/index.d.cts +3 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +4 -0
- package/dist/components/carousel/parts.cjs +23 -0
- package/dist/components/carousel/parts.d.cts +50 -0
- package/dist/components/carousel/parts.d.ts +50 -0
- package/dist/components/carousel/parts.js +23 -0
- package/dist/components/carousel/primitives.cjs +26 -0
- package/dist/components/carousel/primitives.d.cts +20 -0
- package/dist/components/carousel/primitives.d.ts +20 -0
- package/dist/components/carousel/primitives.js +19 -0
- package/dist/components/checkbox/checkbox-icon.cjs +33 -0
- package/dist/components/checkbox/checkbox-icon.d.cts +21 -0
- package/dist/components/checkbox/checkbox-icon.d.ts +21 -0
- package/dist/components/checkbox/checkbox-icon.js +33 -0
- package/dist/components/checkbox/checkbox.cjs +38 -0
- package/dist/components/checkbox/checkbox.d.cts +14 -0
- package/dist/components/checkbox/checkbox.d.ts +14 -0
- package/dist/components/checkbox/checkbox.js +38 -0
- package/dist/components/checkbox/index.cjs +12 -0
- package/dist/components/checkbox/index.d.cts +3 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/checkbox/parts.cjs +21 -0
- package/dist/components/checkbox/parts.d.cts +42 -0
- package/dist/components/checkbox/parts.d.ts +42 -0
- package/dist/components/checkbox/parts.js +21 -0
- package/dist/components/checkbox/primitives.cjs +54 -0
- package/dist/components/checkbox/primitives.d.cts +48 -0
- package/dist/components/checkbox/primitives.d.ts +48 -0
- package/dist/components/checkbox/primitives.js +49 -0
- package/dist/components/circular-progress/circular-progress.cjs +16 -0
- package/dist/components/circular-progress/circular-progress.d.cts +19 -0
- package/dist/components/circular-progress/circular-progress.d.ts +19 -0
- package/dist/components/circular-progress/circular-progress.js +16 -0
- package/dist/components/circular-progress/index.cjs +11 -0
- package/dist/components/circular-progress/index.d.cts +2 -0
- package/dist/components/circular-progress/index.d.ts +2 -0
- package/dist/components/circular-progress/index.js +3 -0
- package/dist/components/circular-progress/primitives.cjs +24 -0
- package/dist/components/circular-progress/primitives.d.cts +19 -0
- package/dist/components/circular-progress/primitives.d.ts +19 -0
- package/dist/components/circular-progress/primitives.js +18 -0
- package/dist/components/clipboard/copy-indicator.cjs +20 -0
- package/dist/components/clipboard/copy-indicator.d.cts +6 -0
- package/dist/components/clipboard/copy-indicator.d.ts +6 -0
- package/dist/components/clipboard/copy-indicator.js +20 -0
- package/dist/components/clipboard/copy-text.cjs +17 -0
- package/dist/components/clipboard/copy-text.d.cts +6 -0
- package/dist/components/clipboard/copy-text.d.ts +6 -0
- package/dist/components/clipboard/copy-text.js +17 -0
- package/dist/components/clipboard/index.cjs +11 -0
- package/dist/components/clipboard/index.d.cts +2 -0
- package/dist/components/clipboard/index.d.ts +2 -0
- package/dist/components/clipboard/index.js +3 -0
- package/dist/components/clipboard/parts.cjs +26 -0
- package/dist/components/clipboard/parts.d.cts +53 -0
- package/dist/components/clipboard/parts.d.ts +53 -0
- package/dist/components/clipboard/parts.js +26 -0
- package/dist/components/clipboard/primitives.cjs +23 -0
- package/dist/components/clipboard/primitives.d.cts +17 -0
- package/dist/components/clipboard/primitives.d.ts +17 -0
- package/dist/components/clipboard/primitives.js +17 -0
- package/dist/components/clipboard/trigger.cjs +19 -0
- package/dist/components/clipboard/trigger.d.cts +5 -0
- package/dist/components/clipboard/trigger.d.ts +5 -0
- package/dist/components/clipboard/trigger.js +19 -0
- package/dist/components/collapsible/index.cjs +9 -0
- package/dist/components/collapsible/index.d.cts +2 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/collapsible/index.js +3 -0
- package/dist/components/collapsible/parts.cjs +20 -0
- package/dist/components/collapsible/parts.d.cts +38 -0
- package/dist/components/collapsible/parts.d.ts +38 -0
- package/dist/components/collapsible/parts.js +20 -0
- package/dist/components/collapsible/primitives.cjs +20 -0
- package/dist/components/collapsible/primitives.d.cts +14 -0
- package/dist/components/collapsible/primitives.d.ts +14 -0
- package/dist/components/collapsible/primitives.js +16 -0
- package/dist/components/combobox/combobox.cjs +42 -0
- package/dist/components/combobox/combobox.d.cts +14 -0
- package/dist/components/combobox/combobox.d.ts +14 -0
- package/dist/components/combobox/combobox.js +42 -0
- package/dist/components/combobox/index.cjs +28 -0
- package/dist/components/combobox/index.d.cts +6 -0
- package/dist/components/combobox/index.d.ts +6 -0
- package/dist/components/combobox/index.js +7 -0
- package/dist/components/combobox/item-group.cjs +13 -0
- package/dist/components/combobox/item-group.d.cts +8 -0
- package/dist/components/combobox/item-group.d.ts +8 -0
- package/dist/components/combobox/item-group.js +13 -0
- package/dist/components/combobox/item.cjs +25 -0
- package/dist/components/combobox/item.d.cts +11 -0
- package/dist/components/combobox/item.d.ts +11 -0
- package/dist/components/combobox/item.js +25 -0
- package/dist/components/combobox/parts.cjs +29 -0
- package/dist/components/combobox/parts.d.cts +74 -0
- package/dist/components/combobox/parts.d.ts +74 -0
- package/dist/components/combobox/parts.js +29 -0
- package/dist/components/combobox/primitives.cjs +86 -0
- package/dist/components/combobox/primitives.d.cts +82 -0
- package/dist/components/combobox/primitives.d.ts +82 -0
- package/dist/components/combobox/primitives.js +71 -0
- package/dist/components/combobox/use-stateful-collection.cjs +32 -0
- package/dist/components/combobox/use-stateful-collection.d.cts +28 -0
- package/dist/components/combobox/use-stateful-collection.d.ts +28 -0
- package/dist/components/combobox/use-stateful-collection.js +32 -0
- package/dist/components/cta-dialog/context.cjs +6 -0
- package/dist/components/cta-dialog/context.d.cts +32 -0
- package/dist/components/cta-dialog/context.d.ts +32 -0
- package/dist/components/cta-dialog/context.js +7 -0
- package/dist/components/cta-dialog/index.cjs +6 -0
- package/dist/components/cta-dialog/index.d.cts +2 -0
- package/dist/components/cta-dialog/index.d.ts +2 -0
- package/dist/components/cta-dialog/index.js +3 -0
- package/dist/components/cta-dialog/provider.cjs +147 -0
- package/dist/components/cta-dialog/provider.d.cts +41 -0
- package/dist/components/cta-dialog/provider.d.ts +41 -0
- package/dist/components/cta-dialog/provider.js +146 -0
- package/dist/components/cta-dialog/trigger-item.cjs +31 -0
- package/dist/components/cta-dialog/trigger-item.d.cts +14 -0
- package/dist/components/cta-dialog/trigger-item.d.ts +14 -0
- package/dist/components/cta-dialog/trigger-item.js +31 -0
- package/dist/components/cta-dialog/utils.cjs +18 -0
- package/dist/components/cta-dialog/utils.d.cts +30 -0
- package/dist/components/cta-dialog/utils.d.ts +30 -0
- package/dist/components/cta-dialog/utils.js +18 -0
- package/dist/components/date-picker/calendar.cjs +36 -0
- package/dist/components/date-picker/calendar.d.cts +27 -0
- package/dist/components/date-picker/calendar.d.ts +27 -0
- package/dist/components/date-picker/calendar.js +36 -0
- package/dist/components/date-picker/content.cjs +19 -0
- package/dist/components/date-picker/content.d.cts +12 -0
- package/dist/components/date-picker/content.d.ts +12 -0
- package/dist/components/date-picker/content.js +19 -0
- package/dist/components/date-picker/date-picker.cjs +17 -0
- package/dist/components/date-picker/date-picker.d.cts +7 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +17 -0
- package/dist/components/date-picker/day-view.cjs +39 -0
- package/dist/components/date-picker/day-view.d.cts +13 -0
- package/dist/components/date-picker/day-view.d.ts +13 -0
- package/dist/components/date-picker/day-view.js +39 -0
- package/dist/components/date-picker/index.cjs +68 -0
- package/dist/components/date-picker/index.d.cts +8 -0
- package/dist/components/date-picker/index.d.ts +8 -0
- package/dist/components/date-picker/index.js +9 -0
- package/dist/components/date-picker/input.cjs +23 -0
- package/dist/components/date-picker/input.d.cts +11 -0
- package/dist/components/date-picker/input.d.ts +11 -0
- package/dist/components/date-picker/input.js +23 -0
- package/dist/components/date-picker/month-view.cjs +31 -0
- package/dist/components/date-picker/month-view.d.cts +12 -0
- package/dist/components/date-picker/month-view.d.ts +12 -0
- package/dist/components/date-picker/month-view.js +31 -0
- package/dist/components/date-picker/parts.cjs +39 -0
- package/dist/components/date-picker/parts.d.cts +114 -0
- package/dist/components/date-picker/parts.d.ts +114 -0
- package/dist/components/date-picker/parts.js +39 -0
- package/dist/components/date-picker/primitives.cjs +58 -0
- package/dist/components/date-picker/primitives.d.cts +136 -0
- package/dist/components/date-picker/primitives.d.ts +136 -0
- package/dist/components/date-picker/primitives.js +35 -0
- package/dist/components/date-picker/range-input.cjs +35 -0
- package/dist/components/date-picker/range-input.d.cts +12 -0
- package/dist/components/date-picker/range-input.d.ts +12 -0
- package/dist/components/date-picker/range-input.js +35 -0
- package/dist/components/date-picker/trigger.cjs +31 -0
- package/dist/components/date-picker/trigger.d.cts +10 -0
- package/dist/components/date-picker/trigger.d.ts +10 -0
- package/dist/components/date-picker/trigger.js +31 -0
- package/dist/components/date-picker/view-control-group.cjs +59 -0
- package/dist/components/date-picker/view-control-group.d.cts +12 -0
- package/dist/components/date-picker/view-control-group.d.ts +12 -0
- package/dist/components/date-picker/view-control-group.js +59 -0
- package/dist/components/date-picker/year-view.cjs +28 -0
- package/dist/components/date-picker/year-view.d.cts +12 -0
- package/dist/components/date-picker/year-view.d.ts +12 -0
- package/dist/components/date-picker/year-view.js +28 -0
- package/dist/components/dialog/close-icon-trigger.cjs +32 -0
- package/dist/components/dialog/close-icon-trigger.d.cts +6 -0
- package/dist/components/dialog/close-icon-trigger.d.ts +6 -0
- package/dist/components/dialog/close-icon-trigger.js +32 -0
- package/dist/components/dialog/dialog.cjs +26 -0
- package/dist/components/dialog/dialog.d.cts +24 -0
- package/dist/components/dialog/dialog.d.ts +24 -0
- package/dist/components/dialog/dialog.js +26 -0
- package/dist/components/dialog/index.cjs +18 -0
- package/dist/components/dialog/index.d.cts +7 -0
- package/dist/components/dialog/index.d.ts +7 -0
- package/dist/components/dialog/index.js +5 -0
- package/dist/components/dialog/parts.cjs +23 -0
- package/dist/components/dialog/parts.d.cts +50 -0
- package/dist/components/dialog/parts.d.ts +50 -0
- package/dist/components/dialog/parts.js +23 -0
- package/dist/components/dialog/primitives.cjs +33 -0
- package/dist/components/dialog/primitives.d.cts +51 -0
- package/dist/components/dialog/primitives.d.ts +51 -0
- package/dist/components/dialog/primitives.js +24 -0
- package/dist/components/feature-flag/feature-flag.cjs +17 -0
- package/dist/components/feature-flag/feature-flag.d.cts +12 -0
- package/dist/components/feature-flag/feature-flag.d.ts +12 -0
- package/dist/components/feature-flag/feature-flag.js +17 -0
- package/dist/components/feature-flag/index.cjs +3 -0
- package/dist/components/feature-flag/index.d.cts +1 -0
- package/dist/components/feature-flag/index.d.ts +1 -0
- package/dist/components/feature-flag/index.js +2 -0
- package/dist/components/field/error-text.cjs +22 -0
- package/dist/components/field/error-text.d.cts +14 -0
- package/dist/components/field/error-text.d.ts +14 -0
- package/dist/components/field/error-text.js +22 -0
- package/dist/components/field/field.cjs +72 -0
- package/dist/components/field/field.d.cts +45 -0
- package/dist/components/field/field.d.ts +45 -0
- package/dist/components/field/field.js +72 -0
- package/dist/components/field/helper-text.cjs +18 -0
- package/dist/components/field/helper-text.d.cts +11 -0
- package/dist/components/field/helper-text.d.ts +11 -0
- package/dist/components/field/helper-text.js +18 -0
- package/dist/components/field/index.cjs +20 -0
- package/dist/components/field/index.d.cts +6 -0
- package/dist/components/field/index.d.ts +6 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/input.cjs +21 -0
- package/dist/components/field/input.d.cts +18 -0
- package/dist/components/field/input.d.ts +18 -0
- package/dist/components/field/input.js +21 -0
- package/dist/components/field/parts.cjs +26 -0
- package/dist/components/field/parts.d.cts +54 -0
- package/dist/components/field/parts.d.ts +54 -0
- package/dist/components/field/parts.js +26 -0
- package/dist/components/field/primitives.cjs +81 -0
- package/dist/components/field/primitives.d.cts +73 -0
- package/dist/components/field/primitives.d.ts +73 -0
- package/dist/components/field/primitives.js +72 -0
- package/dist/components/field/start-indicator.cjs +20 -0
- package/dist/components/field/start-indicator.d.cts +7 -0
- package/dist/components/field/start-indicator.d.ts +7 -0
- package/dist/components/field/start-indicator.js +20 -0
- package/dist/components/field/status-indicator.cjs +41 -0
- package/dist/components/field/status-indicator.d.cts +18 -0
- package/dist/components/field/status-indicator.d.ts +18 -0
- package/dist/components/field/status-indicator.js +41 -0
- package/dist/components/fieldset/fieldset.cjs +35 -0
- package/dist/components/fieldset/fieldset.d.cts +26 -0
- package/dist/components/fieldset/fieldset.d.ts +26 -0
- package/dist/components/fieldset/fieldset.js +35 -0
- package/dist/components/fieldset/index.cjs +10 -0
- package/dist/components/fieldset/index.d.cts +3 -0
- package/dist/components/fieldset/index.d.ts +3 -0
- package/dist/components/fieldset/index.js +4 -0
- package/dist/components/fieldset/parts.cjs +19 -0
- package/dist/components/fieldset/parts.d.cts +34 -0
- package/dist/components/fieldset/parts.d.ts +34 -0
- package/dist/components/fieldset/parts.js +19 -0
- package/dist/components/fieldset/primitives.cjs +18 -0
- package/dist/components/fieldset/primitives.d.cts +12 -0
- package/dist/components/fieldset/primitives.d.ts +12 -0
- package/dist/components/fieldset/primitives.js +15 -0
- package/dist/components/file-upload/file-status.cjs +169 -0
- package/dist/components/file-upload/file-status.d.cts +74 -0
- package/dist/components/file-upload/file-status.d.ts +74 -0
- package/dist/components/file-upload/file-status.js +168 -0
- package/dist/components/file-upload/file-uploader.cjs +47 -0
- package/dist/components/file-upload/file-uploader.d.cts +17 -0
- package/dist/components/file-upload/file-uploader.d.ts +17 -0
- package/dist/components/file-upload/file-uploader.js +47 -0
- package/dist/components/file-upload/helpers.cjs +19 -0
- package/dist/components/file-upload/helpers.d.cts +16 -0
- package/dist/components/file-upload/helpers.d.ts +16 -0
- package/dist/components/file-upload/helpers.js +19 -0
- package/dist/components/file-upload/img-preview.cjs +37 -0
- package/dist/components/file-upload/img-preview.d.cts +2 -0
- package/dist/components/file-upload/img-preview.d.ts +2 -0
- package/dist/components/file-upload/img-preview.js +37 -0
- package/dist/components/file-upload/index.cjs +31 -0
- package/dist/components/file-upload/index.d.cts +6 -0
- package/dist/components/file-upload/index.d.ts +6 -0
- package/dist/components/file-upload/index.js +7 -0
- package/dist/components/file-upload/parts.cjs +33 -0
- package/dist/components/file-upload/parts.d.cts +90 -0
- package/dist/components/file-upload/parts.d.ts +90 -0
- package/dist/components/file-upload/parts.js +33 -0
- package/dist/components/file-upload/primitives.cjs +42 -0
- package/dist/components/file-upload/primitives.d.cts +41 -0
- package/dist/components/file-upload/primitives.d.ts +41 -0
- package/dist/components/file-upload/primitives.js +25 -0
- package/dist/components/file-upload/utils.cjs +18 -0
- package/dist/components/file-upload/utils.d.cts +7 -0
- package/dist/components/file-upload/utils.d.ts +7 -0
- package/dist/components/file-upload/utils.js +18 -0
- package/dist/components/for/for.cjs +20 -0
- package/dist/components/for/for.d.cts +28 -0
- package/dist/components/for/for.d.ts +28 -0
- package/dist/components/for/for.js +20 -0
- package/dist/components/for/index.cjs +3 -0
- package/dist/components/for/index.d.cts +1 -0
- package/dist/components/for/index.d.ts +1 -0
- package/dist/components/for/index.js +2 -0
- package/dist/components/group/index.cjs +3 -0
- package/dist/components/group/index.d.cts +1 -0
- package/dist/components/group/index.d.ts +1 -0
- package/dist/components/group/index.js +2 -0
- package/dist/components/group/primitives.cjs +7 -0
- package/dist/components/group/primitives.d.cts +6 -0
- package/dist/components/group/primitives.d.ts +6 -0
- package/dist/components/group/primitives.js +7 -0
- package/dist/components/icon-button/button.cjs +16 -0
- package/dist/components/icon-button/button.d.cts +27 -0
- package/dist/components/icon-button/button.d.ts +27 -0
- package/dist/components/icon-button/button.js +16 -0
- package/dist/components/icon-button/index.d.cts +2 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/primitives.cjs +14 -0
- package/dist/components/icon-button/primitives.d.cts +6 -0
- package/dist/components/icon-button/primitives.d.ts +6 -0
- package/dist/components/icon-button/primitives.js +14 -0
- package/dist/components/marquee/Marquee.1.d.cts +1 -0
- package/dist/components/marquee/Marquee.1.d.ts +1 -0
- package/dist/components/marquee/index.cjs +10 -0
- package/dist/components/marquee/index.d.cts +2 -0
- package/dist/components/marquee/index.d.ts +2 -0
- package/dist/components/marquee/index.js +3 -0
- package/dist/components/marquee/marquee.cjs +46 -0
- package/dist/components/marquee/marquee.d.cts +23 -0
- package/dist/components/marquee/marquee.d.ts +23 -0
- package/dist/components/marquee/marquee.js +46 -0
- package/dist/components/marquee/primitives.cjs +18 -0
- package/dist/components/marquee/primitives.d.cts +16 -0
- package/dist/components/marquee/primitives.d.ts +16 -0
- package/dist/components/marquee/primitives.js +13 -0
- package/dist/components/marquee/utils.cjs +33 -0
- package/dist/components/marquee/utils.d.cts +4 -0
- package/dist/components/marquee/utils.d.ts +4 -0
- package/dist/components/marquee/utils.js +31 -0
- package/dist/components/menu/index.cjs +20 -0
- package/dist/components/menu/index.d.cts +2 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +3 -0
- package/dist/components/menu/menu.cjs +134 -0
- package/dist/components/menu/menu.d.cts +120 -0
- package/dist/components/menu/menu.d.ts +120 -0
- package/dist/components/menu/menu.js +128 -0
- package/dist/components/menu/primitives.cjs +30 -0
- package/dist/components/menu/primitives.d.cts +24 -0
- package/dist/components/menu/primitives.d.ts +24 -0
- package/dist/components/menu/primitives.js +21 -0
- package/dist/components/notifications/center.cjs +58 -0
- package/dist/components/notifications/center.d.cts +13 -0
- package/dist/components/notifications/center.d.ts +13 -0
- package/dist/components/notifications/center.js +58 -0
- package/dist/components/notifications/close-trigger.cjs +20 -0
- package/dist/components/notifications/close-trigger.d.cts +6 -0
- package/dist/components/notifications/close-trigger.d.ts +6 -0
- package/dist/components/notifications/close-trigger.js +20 -0
- package/dist/components/notifications/index.cjs +14 -0
- package/dist/components/notifications/index.d.cts +5 -0
- package/dist/components/notifications/index.d.ts +5 -0
- package/dist/components/notifications/index.js +5 -0
- package/dist/components/notifications/match-icon.cjs +30 -0
- package/dist/components/notifications/match-icon.d.cts +8 -0
- package/dist/components/notifications/match-icon.d.ts +8 -0
- package/dist/components/notifications/match-icon.js +30 -0
- package/dist/components/notifications/parts.cjs +20 -0
- package/dist/components/notifications/parts.d.cts +38 -0
- package/dist/components/notifications/parts.d.ts +38 -0
- package/dist/components/notifications/parts.js +20 -0
- package/dist/components/notifications/primitives.cjs +22 -0
- package/dist/components/notifications/primitives.d.cts +16 -0
- package/dist/components/notifications/primitives.d.ts +16 -0
- package/dist/components/notifications/primitives.js +17 -0
- package/dist/components/notifications/toaster.cjs +10 -0
- package/dist/components/notifications/toaster.d.cts +2 -0
- package/dist/components/notifications/toaster.d.ts +2 -0
- package/dist/components/notifications/toaster.js +11 -0
- package/dist/components/notifications/types.d.cts +5 -0
- package/dist/components/notifications/types.d.ts +5 -0
- package/dist/components/number-input/decrement-trigger.cjs +16 -0
- package/dist/components/number-input/decrement-trigger.d.cts +2 -0
- package/dist/components/number-input/decrement-trigger.d.ts +2 -0
- package/dist/components/number-input/decrement-trigger.js +16 -0
- package/dist/components/number-input/increment-trigger.cjs +16 -0
- package/dist/components/number-input/increment-trigger.d.cts +2 -0
- package/dist/components/number-input/increment-trigger.d.ts +2 -0
- package/dist/components/number-input/increment-trigger.js +16 -0
- package/dist/components/number-input/index.cjs +13 -0
- package/dist/components/number-input/index.d.cts +3 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/index.js +4 -0
- package/dist/components/number-input/input.cjs +26 -0
- package/dist/components/number-input/input.d.cts +13 -0
- package/dist/components/number-input/input.d.ts +13 -0
- package/dist/components/number-input/input.js +26 -0
- package/dist/components/number-input/parts.cjs +22 -0
- package/dist/components/number-input/parts.d.cts +46 -0
- package/dist/components/number-input/parts.d.ts +46 -0
- package/dist/components/number-input/parts.js +22 -0
- package/dist/components/number-input/primitives.cjs +24 -0
- package/dist/components/number-input/primitives.d.cts +18 -0
- package/dist/components/number-input/primitives.d.ts +18 -0
- package/dist/components/number-input/primitives.js +18 -0
- package/dist/components/pagination/compact.cjs +28 -0
- package/dist/components/pagination/compact.d.cts +7 -0
- package/dist/components/pagination/compact.d.ts +7 -0
- package/dist/components/pagination/compact.js +28 -0
- package/dist/components/pagination/index.cjs +20 -0
- package/dist/components/pagination/index.d.cts +6 -0
- package/dist/components/pagination/index.d.ts +6 -0
- package/dist/components/pagination/index.js +7 -0
- package/dist/components/pagination/item-list.cjs +28 -0
- package/dist/components/pagination/item-list.d.cts +7 -0
- package/dist/components/pagination/item-list.d.ts +7 -0
- package/dist/components/pagination/item-list.js +28 -0
- package/dist/components/pagination/item.cjs +13 -0
- package/dist/components/pagination/item.d.cts +2 -0
- package/dist/components/pagination/item.d.ts +2 -0
- package/dist/components/pagination/item.js +13 -0
- package/dist/components/pagination/pagination.cjs +31 -0
- package/dist/components/pagination/pagination.d.cts +21 -0
- package/dist/components/pagination/pagination.d.ts +21 -0
- package/dist/components/pagination/pagination.js +31 -0
- package/dist/components/pagination/parts.cjs +22 -0
- package/dist/components/pagination/parts.d.cts +46 -0
- package/dist/components/pagination/parts.d.ts +46 -0
- package/dist/components/pagination/parts.js +22 -0
- package/dist/components/pagination/primitives.cjs +19 -0
- package/dist/components/pagination/primitives.d.cts +20 -0
- package/dist/components/pagination/primitives.d.ts +20 -0
- package/dist/components/pagination/primitives.js +13 -0
- package/dist/components/pagination/triggers.cjs +46 -0
- package/dist/components/pagination/triggers.d.cts +7 -0
- package/dist/components/pagination/triggers.d.ts +7 -0
- package/dist/components/pagination/triggers.js +45 -0
- package/dist/components/pin-input/index.cjs +11 -0
- package/dist/components/pin-input/index.d.cts +3 -0
- package/dist/components/pin-input/index.d.ts +3 -0
- package/dist/components/pin-input/index.js +4 -0
- package/dist/components/pin-input/input.cjs +22 -0
- package/dist/components/pin-input/input.d.cts +6 -0
- package/dist/components/pin-input/input.d.ts +6 -0
- package/dist/components/pin-input/input.js +22 -0
- package/dist/components/pin-input/parts.cjs +20 -0
- package/dist/components/pin-input/parts.d.cts +38 -0
- package/dist/components/pin-input/parts.d.ts +38 -0
- package/dist/components/pin-input/parts.js +20 -0
- package/dist/components/pin-input/primitives.cjs +20 -0
- package/dist/components/pin-input/primitives.d.cts +14 -0
- package/dist/components/pin-input/primitives.d.ts +14 -0
- package/dist/components/pin-input/primitives.js +16 -0
- package/dist/components/popover/index.cjs +19 -0
- package/dist/components/popover/index.d.cts +3 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.js +4 -0
- package/dist/components/popover/parts.cjs +23 -0
- package/dist/components/popover/parts.d.cts +65 -0
- package/dist/components/popover/parts.d.ts +65 -0
- package/dist/components/popover/parts.js +23 -0
- package/dist/components/popover/placement-container.cjs +12 -0
- package/dist/components/popover/placement-container.d.cts +7 -0
- package/dist/components/popover/placement-container.d.ts +7 -0
- package/dist/components/popover/placement-container.js +12 -0
- package/dist/components/popover/popover.cjs +46 -0
- package/dist/components/popover/popover.d.cts +15 -0
- package/dist/components/popover/popover.d.ts +15 -0
- package/dist/components/popover/popover.js +46 -0
- package/dist/components/popover/primitives.cjs +38 -0
- package/dist/components/popover/primitives.d.cts +30 -0
- package/dist/components/popover/primitives.d.ts +30 -0
- package/dist/components/popover/primitives.js +26 -0
- package/dist/components/portal/index.cjs +3 -0
- package/dist/components/portal/index.d.cts +1 -0
- package/dist/components/portal/index.d.ts +1 -0
- package/dist/components/portal/index.js +2 -0
- package/dist/components/portal/portal.cjs +23 -0
- package/dist/components/portal/portal.d.cts +26 -0
- package/dist/components/portal/portal.d.ts +26 -0
- package/dist/components/portal/portal.js +24 -0
- package/dist/components/progress/index.cjs +6 -0
- package/dist/components/progress/index.d.cts +2 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.js +3 -0
- package/dist/components/progress/primitives.cjs +17 -0
- package/dist/components/progress/primitives.d.cts +8 -0
- package/dist/components/progress/primitives.d.ts +8 -0
- package/dist/components/progress/primitives.js +16 -0
- package/dist/components/progress/progress-bar.cjs +29 -0
- package/dist/components/progress/progress-bar.d.cts +51 -0
- package/dist/components/progress/progress-bar.d.ts +51 -0
- package/dist/components/progress/progress-bar.js +29 -0
- package/dist/components/radio/index.cjs +14 -0
- package/dist/components/radio/index.d.cts +3 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/index.js +4 -0
- package/dist/components/radio/parts.cjs +22 -0
- package/dist/components/radio/parts.d.cts +46 -0
- package/dist/components/radio/parts.d.ts +46 -0
- package/dist/components/radio/parts.js +22 -0
- package/dist/components/radio/primitives.cjs +42 -0
- package/dist/components/radio/primitives.d.cts +35 -0
- package/dist/components/radio/primitives.d.ts +35 -0
- package/dist/components/radio/primitives.js +35 -0
- package/dist/components/radio/radio.cjs +28 -0
- package/dist/components/radio/radio.d.cts +17 -0
- package/dist/components/radio/radio.d.ts +17 -0
- package/dist/components/radio/radio.js +28 -0
- package/dist/components/rating/index.cjs +13 -0
- package/dist/components/rating/index.d.cts +4 -0
- package/dist/components/rating/index.d.ts +4 -0
- package/dist/components/rating/index.js +4 -0
- package/dist/components/rating/parts.cjs +22 -0
- package/dist/components/rating/parts.d.cts +46 -0
- package/dist/components/rating/parts.d.ts +46 -0
- package/dist/components/rating/parts.js +22 -0
- package/dist/components/rating/primitives.cjs +24 -0
- package/dist/components/rating/primitives.d.cts +18 -0
- package/dist/components/rating/primitives.d.ts +18 -0
- package/dist/components/rating/primitives.js +18 -0
- package/dist/components/rating/rating.cjs +42 -0
- package/dist/components/rating/rating.d.cts +34 -0
- package/dist/components/rating/rating.d.ts +34 -0
- package/dist/components/rating/rating.js +42 -0
- package/dist/components/select/index.cjs +27 -0
- package/dist/components/select/index.d.cts +5 -0
- package/dist/components/select/index.d.ts +5 -0
- package/dist/components/select/index.js +6 -0
- package/dist/components/select/option-group.cjs +34 -0
- package/dist/components/select/option-group.d.cts +31 -0
- package/dist/components/select/option-group.d.ts +31 -0
- package/dist/components/select/option-group.js +33 -0
- package/dist/components/select/option.cjs +27 -0
- package/dist/components/select/option.d.cts +22 -0
- package/dist/components/select/option.d.ts +22 -0
- package/dist/components/select/option.js +27 -0
- package/dist/components/select/parts.cjs +30 -0
- package/dist/components/select/parts.d.cts +78 -0
- package/dist/components/select/parts.d.ts +78 -0
- package/dist/components/select/parts.js +30 -0
- package/dist/components/select/primitives.cjs +52 -0
- package/dist/components/select/primitives.d.cts +45 -0
- package/dist/components/select/primitives.d.ts +45 -0
- package/dist/components/select/primitives.js +37 -0
- package/dist/components/select/select.cjs +61 -0
- package/dist/components/select/select.d.cts +63 -0
- package/dist/components/select/select.d.ts +63 -0
- package/dist/components/select/select.js +61 -0
- package/dist/components/show/index.cjs +3 -0
- package/dist/components/show/index.d.cts +1 -0
- package/dist/components/show/index.d.ts +1 -0
- package/dist/components/show/index.js +2 -0
- package/dist/components/show/show.cjs +23 -0
- package/dist/components/show/show.d.cts +32 -0
- package/dist/components/show/show.d.ts +32 -0
- package/dist/components/show/show.js +23 -0
- package/dist/components/spinner/index.cjs +3 -0
- package/dist/components/spinner/index.d.cts +1 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/spinner.cjs +65 -0
- package/dist/components/spinner/spinner.d.cts +25 -0
- package/dist/components/spinner/spinner.d.ts +25 -0
- package/dist/components/spinner/spinner.js +65 -0
- package/dist/components/split-button/button.cjs +41 -0
- package/dist/components/split-button/button.d.cts +18 -0
- package/dist/components/split-button/button.d.ts +18 -0
- package/dist/components/split-button/button.js +41 -0
- package/dist/components/split-button/index.d.cts +1 -0
- package/dist/components/split-button/index.d.ts +1 -0
- package/dist/components/switch/index.cjs +11 -0
- package/dist/components/switch/index.d.cts +3 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/parts.cjs +20 -0
- package/dist/components/switch/parts.d.cts +38 -0
- package/dist/components/switch/parts.d.ts +38 -0
- package/dist/components/switch/parts.js +20 -0
- package/dist/components/switch/primitives.cjs +20 -0
- package/dist/components/switch/primitives.d.cts +14 -0
- package/dist/components/switch/primitives.d.ts +14 -0
- package/dist/components/switch/primitives.js +16 -0
- package/dist/components/switch/switch-indicator.cjs +12 -0
- package/dist/components/switch/switch-indicator.d.cts +1 -0
- package/dist/components/switch/switch-indicator.d.ts +1 -0
- package/dist/components/switch/switch-indicator.js +12 -0
- package/dist/components/switch/switch.cjs +23 -0
- package/dist/components/switch/switch.d.cts +8 -0
- package/dist/components/switch/switch.d.ts +8 -0
- package/dist/components/switch/switch.js +23 -0
- package/dist/components/table/index.cjs +16 -0
- package/dist/components/table/index.d.cts +3 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.js +4 -0
- package/dist/components/table/parts.cjs +25 -0
- package/dist/components/table/parts.d.cts +57 -0
- package/dist/components/table/parts.d.ts +57 -0
- package/dist/components/table/parts.js +25 -0
- package/dist/components/table/primitives.cjs +59 -0
- package/dist/components/table/primitives.d.cts +24 -0
- package/dist/components/table/primitives.d.ts +24 -0
- package/dist/components/table/primitives.js +50 -0
- package/dist/components/table/table.cjs +46 -0
- package/dist/components/table/table.d.cts +24 -0
- package/dist/components/table/table.d.ts +24 -0
- package/dist/components/table/table.js +46 -0
- package/dist/components/tabs/index.cjs +11 -0
- package/dist/components/tabs/index.d.cts +3 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/tabs/parts.cjs +20 -0
- package/dist/components/tabs/parts.d.cts +37 -0
- package/dist/components/tabs/parts.d.ts +37 -0
- package/dist/components/tabs/parts.js +20 -0
- package/dist/components/tabs/primitives.cjs +20 -0
- package/dist/components/tabs/primitives.d.cts +14 -0
- package/dist/components/tabs/primitives.d.ts +14 -0
- package/dist/components/tabs/primitives.js +16 -0
- package/dist/components/tabs/tabs.cjs +29 -0
- package/dist/components/tabs/tabs.d.cts +26 -0
- package/dist/components/tabs/tabs.d.ts +26 -0
- package/dist/components/tabs/tabs.js +29 -0
- package/dist/components/tag/closable.cjs +30 -0
- package/dist/components/tag/closable.d.cts +9 -0
- package/dist/components/tag/closable.d.ts +9 -0
- package/dist/components/tag/closable.js +30 -0
- package/dist/components/tag/index.cjs +5 -0
- package/dist/components/tag/index.d.cts +2 -0
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/index.js +3 -0
- package/dist/components/tag/primitives.cjs +10 -0
- package/dist/components/tag/primitives.d.cts +5 -0
- package/dist/components/tag/primitives.d.ts +5 -0
- package/dist/components/tag/primitives.js +10 -0
- package/dist/components/tag/tag.cjs +34 -0
- package/dist/components/tag/tag.d.cts +13 -0
- package/dist/components/tag/tag.d.ts +13 -0
- package/dist/components/tag/tag.js +34 -0
- package/dist/components/text/index.cjs +3 -0
- package/dist/components/text/index.d.cts +1 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +2 -0
- package/dist/components/text/text.cjs +38 -0
- package/dist/components/text/text.d.cts +26 -0
- package/dist/components/text/text.d.ts +26 -0
- package/dist/components/text/text.js +38 -0
- package/dist/components/theme/index.cjs +3 -0
- package/dist/components/theme/index.d.cts +1 -0
- package/dist/components/theme/index.d.ts +1 -0
- package/dist/components/theme/index.js +2 -0
- package/dist/components/theme/theme.cjs +16 -0
- package/dist/components/theme/theme.d.cts +16 -0
- package/dist/components/theme/theme.d.ts +16 -0
- package/dist/components/theme/theme.js +16 -0
- package/dist/components/toggle/index.cjs +6 -0
- package/dist/components/toggle/index.d.cts +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +3 -0
- package/dist/components/toggle/parts.cjs +17 -0
- package/dist/components/toggle/parts.d.cts +26 -0
- package/dist/components/toggle/parts.d.ts +26 -0
- package/dist/components/toggle/parts.js +17 -0
- package/dist/components/toggle/primitives.cjs +13 -0
- package/dist/components/toggle/primitives.d.cts +7 -0
- package/dist/components/toggle/primitives.d.ts +7 -0
- package/dist/components/toggle/primitives.js +12 -0
- package/dist/components/tooltip/index.cjs +12 -0
- package/dist/components/tooltip/index.d.cts +3 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.js +4 -0
- package/dist/components/tooltip/parts.cjs +21 -0
- package/dist/components/tooltip/parts.d.cts +42 -0
- package/dist/components/tooltip/parts.d.ts +42 -0
- package/dist/components/tooltip/parts.js +21 -0
- package/dist/components/tooltip/primitives.cjs +22 -0
- package/dist/components/tooltip/primitives.d.cts +15 -0
- package/dist/components/tooltip/primitives.d.ts +15 -0
- package/dist/components/tooltip/primitives.js +17 -0
- package/dist/components/tooltip/renderer.cjs +11 -0
- package/dist/components/tooltip/renderer.d.cts +6 -0
- package/dist/components/tooltip/renderer.d.ts +6 -0
- package/dist/components/tooltip/renderer.js +11 -0
- package/dist/components/tooltip/tooltip.cjs +31 -0
- package/dist/components/tooltip/tooltip.d.cts +26 -0
- package/dist/components/tooltip/tooltip.d.ts +26 -0
- package/dist/components/tooltip/tooltip.js +31 -0
- package/dist/config/defineIcons.cjs +23 -0
- package/dist/config/defineIcons.d.cts +15 -0
- package/dist/config/defineIcons.d.ts +15 -0
- package/dist/config/defineIcons.js +23 -0
- package/dist/config/icons/checkbox.icons.cjs +97 -0
- package/dist/config/icons/checkbox.icons.d.cts +20 -0
- package/dist/config/icons/checkbox.icons.d.ts +20 -0
- package/dist/config/icons/checkbox.icons.js +94 -0
- package/dist/config/icons/default.cjs +56 -0
- package/dist/config/icons/default.d.cts +5 -0
- package/dist/config/icons/default.d.ts +5 -0
- package/dist/config/icons/default.js +56 -0
- package/dist/config/icons/pinned.icons.cjs +28 -0
- package/dist/config/icons/pinned.icons.d.cts +5 -0
- package/dist/config/icons/pinned.icons.d.ts +5 -0
- package/dist/config/icons/pinned.icons.js +25 -0
- package/dist/config/icons/sort.icons.cjs +20 -0
- package/dist/config/icons/sort.icons.d.cts +3 -0
- package/dist/config/icons/sort.icons.d.ts +3 -0
- package/dist/config/icons/sort.icons.js +19 -0
- package/dist/config/index.cjs +37 -0
- package/dist/config/index.d.cts +24 -0
- package/dist/config/index.d.ts +24 -0
- package/dist/config/index.js +35 -0
- package/dist/config/types.d.cts +56 -0
- package/dist/config/types.d.ts +56 -0
- package/dist/context/cerberus.cjs +33 -0
- package/dist/context/cerberus.d.cts +17 -0
- package/dist/context/cerberus.d.ts +17 -0
- package/dist/context/cerberus.js +32 -0
- package/dist/context/confirm-modal.cjs +149 -0
- package/dist/context/confirm-modal.d.cts +82 -0
- package/dist/context/confirm-modal.d.ts +82 -0
- package/dist/context/confirm-modal.js +148 -0
- package/dist/context/feature-flags.cjs +45 -0
- package/dist/context/feature-flags.d.cts +38 -0
- package/dist/context/feature-flags.d.ts +38 -0
- package/dist/context/feature-flags.js +44 -0
- package/dist/context/field.d.cts +34 -0
- package/dist/context/field.d.ts +34 -0
- package/dist/context/navMenu.cjs +43 -0
- package/dist/context/navMenu.d.cts +34 -0
- package/dist/context/navMenu.d.ts +34 -0
- package/dist/context/navMenu.js +42 -0
- package/dist/context/prompt-modal.cjs +206 -0
- package/dist/context/prompt-modal.d.cts +85 -0
- package/dist/context/prompt-modal.d.ts +85 -0
- package/dist/context/prompt-modal.js +205 -0
- package/dist/context/theme.cjs +40 -0
- package/dist/context/theme.d.cts +53 -0
- package/dist/context/theme.d.ts +53 -0
- package/dist/context/theme.js +39 -0
- package/dist/hooks/useModal.d.cts +36 -0
- package/dist/hooks/useModal.d.ts +36 -0
- package/dist/hooks/useRootColors.cjs +44 -0
- package/dist/hooks/useRootColors.d.cts +22 -0
- package/dist/hooks/useRootColors.d.ts +22 -0
- package/dist/hooks/useRootColors.js +44 -0
- package/dist/hooks/useTheme.cjs +64 -0
- package/dist/hooks/useTheme.d.cts +29 -0
- package/dist/hooks/useTheme.d.ts +29 -0
- package/dist/hooks/useTheme.js +62 -0
- package/dist/index.cjs +1220 -0
- package/dist/index.client.d.cts +2 -0
- package/dist/index.client.d.ts +2 -0
- package/dist/index.client.js +5 -0
- package/dist/index.d.cts +60 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +136 -0
- package/dist/panda.buildinfo.json +376 -0
- package/dist/system/factory.cjs +20 -0
- package/dist/system/factory.d.cts +7 -0
- package/dist/system/factory.d.ts +7 -0
- package/dist/system/factory.js +20 -0
- package/dist/system/index.cjs +44 -0
- package/dist/system/index.d.cts +38 -0
- package/dist/system/index.d.ts +38 -0
- package/dist/system/index.js +42 -0
- package/dist/system/primitive-factory.cjs +107 -0
- package/dist/system/primitive-factory.d.cts +48 -0
- package/dist/system/primitive-factory.d.ts +48 -0
- package/dist/system/primitive-factory.js +107 -0
- package/dist/system/types.d.cts +38 -0
- package/dist/system/types.d.ts +38 -0
- package/dist/types.d.cts +12 -0
- package/dist/types.d.ts +12 -0
- package/dist/utils/index.cjs +46 -0
- package/dist/utils/index.d.cts +25 -0
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/index.js +42 -0
- package/dist/utils/localStorage.cjs +26 -0
- package/dist/utils/localStorage.d.cts +13 -0
- package/dist/utils/localStorage.d.ts +13 -0
- package/dist/utils/localStorage.js +25 -0
- package/package.json +97 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CerberusPrimitive } from './primitive-factory';
|
|
2
|
+
import { CerberusFactory, CerberusPrimitiveRecipe } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This module contains the user interface for creating Cerberus primitives.
|
|
5
|
+
* @module @cerberus/core/system/create-cerb-primitive
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A factory function that creates a Cerberus primitive instance with the given
|
|
9
|
+
* recipe.
|
|
10
|
+
* @param recipe
|
|
11
|
+
* @returns An object with three methods: `withNoRecipe`, `withRecipe`, and `withSlotRecipe` that
|
|
12
|
+
* apply the recipes and special Cerberus helpers like `css`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const { withRecipe } = createCerberusPrimitive(myCustomRecipe);
|
|
17
|
+
* export const Button = withRecipe(MyCustomButton)
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function createCerberusPrimitive<T extends CerberusPrimitiveRecipe>(recipe?: T): CerberusPrimitive;
|
|
21
|
+
/**
|
|
22
|
+
* A utility function to access Cerberus components by their name.
|
|
23
|
+
* @param component - The name of the Cerberus component to access.
|
|
24
|
+
* @returns The Cerberus component corresponding to the provided name.
|
|
25
|
+
* @throws An error if the component name is not valid.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { cerberus } from '@cerberus/react'
|
|
30
|
+
* const Button = cerberus('button')
|
|
31
|
+
*
|
|
32
|
+
* <Button css={{ color: 'blue' }} asChild>
|
|
33
|
+
* <Link href="/some-page">Click me</Link>
|
|
34
|
+
* </Button>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const cerberus: CerberusFactory;
|
|
38
|
+
export * from './types';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CerberusPrimitive } from "./primitive-factory.js";
|
|
2
|
+
import { cerberusFactoryProxy } from "./factory.js";
|
|
3
|
+
//#region src/system/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* This module contains the user interface for creating Cerberus primitives.
|
|
6
|
+
* @module @cerberus/core/system/create-cerb-primitive
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A factory function that creates a Cerberus primitive instance with the given
|
|
10
|
+
* recipe.
|
|
11
|
+
* @param recipe
|
|
12
|
+
* @returns An object with three methods: `withNoRecipe`, `withRecipe`, and `withSlotRecipe` that
|
|
13
|
+
* apply the recipes and special Cerberus helpers like `css`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const { withRecipe } = createCerberusPrimitive(myCustomRecipe);
|
|
18
|
+
* export const Button = withRecipe(MyCustomButton)
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function createCerberusPrimitive(recipe) {
|
|
22
|
+
return new CerberusPrimitive(recipe);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A utility function to access Cerberus components by their name.
|
|
26
|
+
* @param component - The name of the Cerberus component to access.
|
|
27
|
+
* @returns The Cerberus component corresponding to the provided name.
|
|
28
|
+
* @throws An error if the component name is not valid.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { cerberus } from '@cerberus/react'
|
|
33
|
+
* const Button = cerberus('button')
|
|
34
|
+
*
|
|
35
|
+
* <Button css={{ color: 'blue' }} asChild>
|
|
36
|
+
* <Link href="/some-page">Click me</Link>
|
|
37
|
+
* </Button>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
var cerberus = cerberusFactoryProxy;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { cerberus, createCerberusPrimitive };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
let _ark_ui_react_factory = require("@ark-ui/react/factory");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let styled_system_css = require("styled-system/css");
|
|
4
|
+
let styled_system_jsx_factory = require("styled-system/jsx/factory");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/system/primitive-factory.tsx
|
|
7
|
+
/**
|
|
8
|
+
* This module contains a factory for creating Cerberus primitives.
|
|
9
|
+
* @module @cerberus/core/system/factory
|
|
10
|
+
*/
|
|
11
|
+
var CerberusPrimitive = class {
|
|
12
|
+
recipe;
|
|
13
|
+
constructor(recipe) {
|
|
14
|
+
this.recipe = recipe ?? null;
|
|
15
|
+
}
|
|
16
|
+
setupStyledComponent(component) {
|
|
17
|
+
const arkComponent = _ark_ui_react_factory.ark[component];
|
|
18
|
+
if (typeof component !== "string") return (0, styled_system_jsx_factory.cerberus)(component);
|
|
19
|
+
if (arkComponent) return (0, styled_system_jsx_factory.cerberus)(arkComponent);
|
|
20
|
+
throw new Error(`Unknown component: ${component}`);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a Cerberus component with bare features and no recipe.
|
|
24
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
25
|
+
* Can be a string or a component reference.
|
|
26
|
+
* @returns A new React component that applies Cerberus features to the
|
|
27
|
+
* original component.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const { withNoRecipe } = createCerberusPrimitive(buttonRecipe)
|
|
32
|
+
* const Button = withNoRecipe('button')
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
withNoRecipe = (Component, options) => {
|
|
36
|
+
const { defaultProps } = options || {};
|
|
37
|
+
const El = this.setupStyledComponent(Component);
|
|
38
|
+
const CerbComponent = (0, react.forwardRef)((props, ref) => {
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(El, {
|
|
40
|
+
...defaultProps,
|
|
41
|
+
...props,
|
|
42
|
+
ref
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
CerbComponent.displayName = `Cerberus.${typeof El === "string" ? El : El.displayName || El.name}`;
|
|
46
|
+
return CerbComponent;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Creates a Cerberus component with the given recipe.
|
|
50
|
+
* @param Component - The React component to enhance with the recipe.
|
|
51
|
+
* @param options - Options for the recipe.
|
|
52
|
+
* @returns A new React component that applies the recipe to the original
|
|
53
|
+
* component.
|
|
54
|
+
*/
|
|
55
|
+
withRecipe = (Component, options) => {
|
|
56
|
+
const { defaultProps } = options || {};
|
|
57
|
+
const El = this.setupStyledComponent(Component);
|
|
58
|
+
const recipe = this.recipe;
|
|
59
|
+
const CerbComponent = (0, react.forwardRef)((internalProps, ref) => {
|
|
60
|
+
const { css: customCss, ...restOfInternalProps } = internalProps;
|
|
61
|
+
const [variantOptions, nativeProps] = recipe.splitVariantProps(restOfInternalProps);
|
|
62
|
+
const recipeStyles = recipe(variantOptions);
|
|
63
|
+
const className = typeof nativeProps.className === "string" ? nativeProps.className : void 0;
|
|
64
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(El, {
|
|
65
|
+
...defaultProps,
|
|
66
|
+
...nativeProps,
|
|
67
|
+
ref,
|
|
68
|
+
className: (0, styled_system_css.cx)(className, recipeStyles, (0, styled_system_css.css)(customCss))
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
CerbComponent.displayName = typeof El === "string" ? El : El.displayName || El.name;
|
|
72
|
+
return CerbComponent;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Creates a Cerberus component with a slot recipe applied.
|
|
76
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
77
|
+
* @param recipe - The slot recipe to apply to the component.
|
|
78
|
+
* @returns A new React component that applies Cerberus features and the
|
|
79
|
+
* specified slot recipe to the original component.
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const { withSlotRecipe } = createCerberusPrimitive(field)
|
|
83
|
+
* const Field = withSlotRecipe(RawField, field)
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
withSlotRecipe = (Component, slot, options) => {
|
|
87
|
+
const { defaultProps } = options || {};
|
|
88
|
+
const El = this.setupStyledComponent(Component);
|
|
89
|
+
const recipe = this.recipe;
|
|
90
|
+
const CerbComponent = (0, react.forwardRef)((internalProps, ref) => {
|
|
91
|
+
const { css: customCss, ...restOfInternalProps } = internalProps;
|
|
92
|
+
const [variantOptions, nativeProps] = recipe.splitVariantProps(restOfInternalProps);
|
|
93
|
+
const slotStyles = recipe(variantOptions)[slot];
|
|
94
|
+
const className = typeof nativeProps.className === "string" ? nativeProps.className : void 0;
|
|
95
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(El, {
|
|
96
|
+
...defaultProps,
|
|
97
|
+
...nativeProps,
|
|
98
|
+
ref,
|
|
99
|
+
className: (0, styled_system_css.cx)(className, slotStyles, (0, styled_system_css.css)(customCss))
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
CerbComponent.displayName = typeof El === "string" ? El : El.displayName || El.name;
|
|
103
|
+
return CerbComponent;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
exports.CerberusPrimitive = CerberusPrimitive;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ElementType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
2
|
+
import { RecipeVariantRecord } from 'styled-system/types';
|
|
3
|
+
import { ExtractProps } from '../types';
|
|
4
|
+
import { CerberusPrimitiveEl, CerberusPrimitiveProps, CerberusPrimitiveRecipe, WithRecipeOptions } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* This module contains a factory for creating Cerberus primitives.
|
|
7
|
+
* @module @cerberus/core/system/factory
|
|
8
|
+
*/
|
|
9
|
+
export declare class CerberusPrimitive {
|
|
10
|
+
recipe: CerberusPrimitiveRecipe | null;
|
|
11
|
+
constructor(recipe?: CerberusPrimitiveRecipe);
|
|
12
|
+
private setupStyledComponent;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a Cerberus component with bare features and no recipe.
|
|
15
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
16
|
+
* Can be a string or a component reference.
|
|
17
|
+
* @returns A new React component that applies Cerberus features to the
|
|
18
|
+
* original component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const { withNoRecipe } = createCerberusPrimitive(buttonRecipe)
|
|
23
|
+
* const Button = withNoRecipe('button')
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
withNoRecipe: <T extends ElementType>(Component: T | CerberusPrimitiveEl<T>, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a Cerberus component with the given recipe.
|
|
29
|
+
* @param Component - The React component to enhance with the recipe.
|
|
30
|
+
* @param options - Options for the recipe.
|
|
31
|
+
* @returns A new React component that applies the recipe to the original
|
|
32
|
+
* component.
|
|
33
|
+
*/
|
|
34
|
+
withRecipe: <T extends ElementType>(Component: T, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a Cerberus component with a slot recipe applied.
|
|
37
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
38
|
+
* @param recipe - The slot recipe to apply to the component.
|
|
39
|
+
* @returns A new React component that applies Cerberus features and the
|
|
40
|
+
* specified slot recipe to the original component.
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const { withSlotRecipe } = createCerberusPrimitive(field)
|
|
44
|
+
* const Field = withSlotRecipe(RawField, field)
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
withSlotRecipe: <T extends ElementType>(Component: T, slot: keyof RecipeVariantRecord, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ElementType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
2
|
+
import { RecipeVariantRecord } from 'styled-system/types';
|
|
3
|
+
import { ExtractProps } from '../types';
|
|
4
|
+
import { CerberusPrimitiveEl, CerberusPrimitiveProps, CerberusPrimitiveRecipe, WithRecipeOptions } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* This module contains a factory for creating Cerberus primitives.
|
|
7
|
+
* @module @cerberus/core/system/factory
|
|
8
|
+
*/
|
|
9
|
+
export declare class CerberusPrimitive {
|
|
10
|
+
recipe: CerberusPrimitiveRecipe | null;
|
|
11
|
+
constructor(recipe?: CerberusPrimitiveRecipe);
|
|
12
|
+
private setupStyledComponent;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a Cerberus component with bare features and no recipe.
|
|
15
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
16
|
+
* Can be a string or a component reference.
|
|
17
|
+
* @returns A new React component that applies Cerberus features to the
|
|
18
|
+
* original component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const { withNoRecipe } = createCerberusPrimitive(buttonRecipe)
|
|
23
|
+
* const Button = withNoRecipe('button')
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
withNoRecipe: <T extends ElementType>(Component: T | CerberusPrimitiveEl<T>, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a Cerberus component with the given recipe.
|
|
29
|
+
* @param Component - The React component to enhance with the recipe.
|
|
30
|
+
* @param options - Options for the recipe.
|
|
31
|
+
* @returns A new React component that applies the recipe to the original
|
|
32
|
+
* component.
|
|
33
|
+
*/
|
|
34
|
+
withRecipe: <T extends ElementType>(Component: T, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a Cerberus component with a slot recipe applied.
|
|
37
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
38
|
+
* @param recipe - The slot recipe to apply to the component.
|
|
39
|
+
* @returns A new React component that applies Cerberus features and the
|
|
40
|
+
* specified slot recipe to the original component.
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const { withSlotRecipe } = createCerberusPrimitive(field)
|
|
44
|
+
* const Field = withSlotRecipe(RawField, field)
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
withSlotRecipe: <T extends ElementType>(Component: T, slot: keyof RecipeVariantRecord, options?: WithRecipeOptions) => ForwardRefExoticComponent< PropsWithoutRef<CerberusPrimitiveProps<ExtractProps<T>>> & RefAttributes<HTMLElement>>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ark } from "@ark-ui/react/factory";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { css, cx } from "styled-system/css";
|
|
4
|
+
import { cerberus } from "styled-system/jsx/factory";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/system/primitive-factory.tsx
|
|
7
|
+
/**
|
|
8
|
+
* This module contains a factory for creating Cerberus primitives.
|
|
9
|
+
* @module @cerberus/core/system/factory
|
|
10
|
+
*/
|
|
11
|
+
var CerberusPrimitive = class {
|
|
12
|
+
recipe;
|
|
13
|
+
constructor(recipe) {
|
|
14
|
+
this.recipe = recipe ?? null;
|
|
15
|
+
}
|
|
16
|
+
setupStyledComponent(component) {
|
|
17
|
+
const arkComponent = ark[component];
|
|
18
|
+
if (typeof component !== "string") return cerberus(component);
|
|
19
|
+
if (arkComponent) return cerberus(arkComponent);
|
|
20
|
+
throw new Error(`Unknown component: ${component}`);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a Cerberus component with bare features and no recipe.
|
|
24
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
25
|
+
* Can be a string or a component reference.
|
|
26
|
+
* @returns A new React component that applies Cerberus features to the
|
|
27
|
+
* original component.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const { withNoRecipe } = createCerberusPrimitive(buttonRecipe)
|
|
32
|
+
* const Button = withNoRecipe('button')
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
withNoRecipe = (Component, options) => {
|
|
36
|
+
const { defaultProps } = options || {};
|
|
37
|
+
const El = this.setupStyledComponent(Component);
|
|
38
|
+
const CerbComponent = forwardRef((props, ref) => {
|
|
39
|
+
return /* @__PURE__ */ jsx(El, {
|
|
40
|
+
...defaultProps,
|
|
41
|
+
...props,
|
|
42
|
+
ref
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
CerbComponent.displayName = `Cerberus.${typeof El === "string" ? El : El.displayName || El.name}`;
|
|
46
|
+
return CerbComponent;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Creates a Cerberus component with the given recipe.
|
|
50
|
+
* @param Component - The React component to enhance with the recipe.
|
|
51
|
+
* @param options - Options for the recipe.
|
|
52
|
+
* @returns A new React component that applies the recipe to the original
|
|
53
|
+
* component.
|
|
54
|
+
*/
|
|
55
|
+
withRecipe = (Component, options) => {
|
|
56
|
+
const { defaultProps } = options || {};
|
|
57
|
+
const El = this.setupStyledComponent(Component);
|
|
58
|
+
const recipe = this.recipe;
|
|
59
|
+
const CerbComponent = forwardRef((internalProps, ref) => {
|
|
60
|
+
const { css: customCss, ...restOfInternalProps } = internalProps;
|
|
61
|
+
const [variantOptions, nativeProps] = recipe.splitVariantProps(restOfInternalProps);
|
|
62
|
+
const recipeStyles = recipe(variantOptions);
|
|
63
|
+
const className = typeof nativeProps.className === "string" ? nativeProps.className : void 0;
|
|
64
|
+
return /* @__PURE__ */ jsx(El, {
|
|
65
|
+
...defaultProps,
|
|
66
|
+
...nativeProps,
|
|
67
|
+
ref,
|
|
68
|
+
className: cx(className, recipeStyles, css(customCss))
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
CerbComponent.displayName = typeof El === "string" ? El : El.displayName || El.name;
|
|
72
|
+
return CerbComponent;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Creates a Cerberus component with a slot recipe applied.
|
|
76
|
+
* @param Component - The React component to enhance with Cerberus features.
|
|
77
|
+
* @param recipe - The slot recipe to apply to the component.
|
|
78
|
+
* @returns A new React component that applies Cerberus features and the
|
|
79
|
+
* specified slot recipe to the original component.
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const { withSlotRecipe } = createCerberusPrimitive(field)
|
|
83
|
+
* const Field = withSlotRecipe(RawField, field)
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
withSlotRecipe = (Component, slot, options) => {
|
|
87
|
+
const { defaultProps } = options || {};
|
|
88
|
+
const El = this.setupStyledComponent(Component);
|
|
89
|
+
const recipe = this.recipe;
|
|
90
|
+
const CerbComponent = forwardRef((internalProps, ref) => {
|
|
91
|
+
const { css: customCss, ...restOfInternalProps } = internalProps;
|
|
92
|
+
const [variantOptions, nativeProps] = recipe.splitVariantProps(restOfInternalProps);
|
|
93
|
+
const slotStyles = recipe(variantOptions)[slot];
|
|
94
|
+
const className = typeof nativeProps.className === "string" ? nativeProps.className : void 0;
|
|
95
|
+
return /* @__PURE__ */ jsx(El, {
|
|
96
|
+
...defaultProps,
|
|
97
|
+
...nativeProps,
|
|
98
|
+
ref,
|
|
99
|
+
className: cx(className, slotStyles, css(customCss))
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
CerbComponent.displayName = typeof El === "string" ? El : El.displayName || El.name;
|
|
103
|
+
return CerbComponent;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { CerberusPrimitive };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { CSSProperties, ElementType, PropsWithChildren } from 'react';
|
|
3
|
+
import { AsProps, Assign, ComponentProps, Dict, JsxHTMLProps, JsxStyleProps, RecipeVariantFn, RecipeVariantRecord, SlotRecipeVariantFn, SlotRecipeVariantRecord, UnstyledProps } from 'styled-system/types';
|
|
4
|
+
type RecipeBase = {
|
|
5
|
+
splitVariantProps: (props: Record<string, unknown>) => [Record<string, unknown>, Record<string, unknown>];
|
|
6
|
+
};
|
|
7
|
+
export type CerberusRecipe = RecipeVariantFn<RecipeVariantRecord> & RecipeBase;
|
|
8
|
+
export type CerberusSlotRecipe<T extends string> = SlotRecipeVariantFn<string, SlotRecipeVariantRecord<T>> & RecipeBase;
|
|
9
|
+
export type CerberusPrimitiveRecipe = CerberusRecipe | CerberusSlotRecipe<string>;
|
|
10
|
+
export type WithRecipeOptions = {
|
|
11
|
+
defaultProps?: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
export interface BaseCerberusProps extends ArkFactoryProps, JsxStyleProps, Dict, UnstyledProps, AsProps {
|
|
14
|
+
/**
|
|
15
|
+
* The CSS styles applied to the component. Supports CSS Properties
|
|
16
|
+
* declarations and style objects.
|
|
17
|
+
*/
|
|
18
|
+
style?: CSSProperties | Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export type CerberusProps<T extends ElementType, P extends Dict = {}> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps & ArkFactoryProps, Assign<JsxStyleProps, P>>;
|
|
21
|
+
export type CerberusPrimitiveProps<T> = PropsWithChildren<BaseCerberusProps> & T;
|
|
22
|
+
export type CerberusPrimitiveEl<T extends ElementType = ElementType> = ElementType<CerberusProps<T>>;
|
|
23
|
+
export interface ArkFactoryProps {
|
|
24
|
+
/**
|
|
25
|
+
* If true, the component will render as a child as the provided element
|
|
26
|
+
* passing all the given props to the child.
|
|
27
|
+
*/
|
|
28
|
+
asChild?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type ArkPropsWithRef<T extends keyof typeof ark> = {
|
|
31
|
+
[K in keyof (typeof ark)[T]]: K extends 'asChild' ? never : (typeof ark)[T][K];
|
|
32
|
+
} & ArkFactoryProps;
|
|
33
|
+
export type CerberusFactoryFn = <T extends Record<string, unknown>>(component: keyof typeof ark, defaultProps?: T) => CerberusPrimitiveEl;
|
|
34
|
+
export type CerberusFactoryObject = {
|
|
35
|
+
[K in keyof typeof ark]: CerberusPrimitiveEl;
|
|
36
|
+
};
|
|
37
|
+
export type CerberusFactory = CerberusFactoryFn & CerberusFactoryObject;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { CSSProperties, ElementType, PropsWithChildren } from 'react';
|
|
3
|
+
import { AsProps, Assign, ComponentProps, Dict, JsxHTMLProps, JsxStyleProps, RecipeVariantFn, RecipeVariantRecord, SlotRecipeVariantFn, SlotRecipeVariantRecord, UnstyledProps } from 'styled-system/types';
|
|
4
|
+
type RecipeBase = {
|
|
5
|
+
splitVariantProps: (props: Record<string, unknown>) => [Record<string, unknown>, Record<string, unknown>];
|
|
6
|
+
};
|
|
7
|
+
export type CerberusRecipe = RecipeVariantFn<RecipeVariantRecord> & RecipeBase;
|
|
8
|
+
export type CerberusSlotRecipe<T extends string> = SlotRecipeVariantFn<string, SlotRecipeVariantRecord<T>> & RecipeBase;
|
|
9
|
+
export type CerberusPrimitiveRecipe = CerberusRecipe | CerberusSlotRecipe<string>;
|
|
10
|
+
export type WithRecipeOptions = {
|
|
11
|
+
defaultProps?: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
export interface BaseCerberusProps extends ArkFactoryProps, JsxStyleProps, Dict, UnstyledProps, AsProps {
|
|
14
|
+
/**
|
|
15
|
+
* The CSS styles applied to the component. Supports CSS Properties
|
|
16
|
+
* declarations and style objects.
|
|
17
|
+
*/
|
|
18
|
+
style?: CSSProperties | Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export type CerberusProps<T extends ElementType, P extends Dict = {}> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps & ArkFactoryProps, Assign<JsxStyleProps, P>>;
|
|
21
|
+
export type CerberusPrimitiveProps<T> = PropsWithChildren<BaseCerberusProps> & T;
|
|
22
|
+
export type CerberusPrimitiveEl<T extends ElementType = ElementType> = ElementType<CerberusProps<T>>;
|
|
23
|
+
export interface ArkFactoryProps {
|
|
24
|
+
/**
|
|
25
|
+
* If true, the component will render as a child as the provided element
|
|
26
|
+
* passing all the given props to the child.
|
|
27
|
+
*/
|
|
28
|
+
asChild?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type ArkPropsWithRef<T extends keyof typeof ark> = {
|
|
31
|
+
[K in keyof (typeof ark)[T]]: K extends 'asChild' ? never : (typeof ark)[T][K];
|
|
32
|
+
} & ArkFactoryProps;
|
|
33
|
+
export type CerberusFactoryFn = <T extends Record<string, unknown>>(component: keyof typeof ark, defaultProps?: T) => CerberusPrimitiveEl;
|
|
34
|
+
export type CerberusFactoryObject = {
|
|
35
|
+
[K in keyof typeof ark]: CerberusPrimitiveEl;
|
|
36
|
+
};
|
|
37
|
+
export type CerberusFactory = CerberusFactoryFn & CerberusFactoryObject;
|
|
38
|
+
export {};
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, ElementType, JSX } from 'react';
|
|
2
|
+
export type Positions = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
/**
|
|
4
|
+
* Utility type to enforce never on all properties of a given type.
|
|
5
|
+
*/
|
|
6
|
+
export type EnforceNoProperties<T> = {
|
|
7
|
+
[K in keyof T]: never;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Utility type to extract props for string elements or custom components
|
|
11
|
+
*/
|
|
12
|
+
export type ExtractProps<T> = T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : T extends ComponentType<infer P> ? P : T extends ElementType<infer P> ? P : Record<string, unknown>;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, ElementType, JSX } from 'react';
|
|
2
|
+
export type Positions = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
/**
|
|
4
|
+
* Utility type to enforce never on all properties of a given type.
|
|
5
|
+
*/
|
|
6
|
+
export type EnforceNoProperties<T> = {
|
|
7
|
+
[K in keyof T]: never;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Utility type to extract props for string elements or custom components
|
|
11
|
+
*/
|
|
12
|
+
export type ExtractProps<T> = T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : T extends ComponentType<infer P> ? P : T extends ElementType<infer P> ? P : Record<string, unknown>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_localStorage = require("./localStorage.cjs");
|
|
3
|
+
//#region src/utils/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* This module contains utility functions that are used across your app.
|
|
6
|
+
* @module Utils
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Formats the count of notifications to be displayed in the notification badge.
|
|
10
|
+
* @param count - The number of notifications.
|
|
11
|
+
* @returns The formatted count of notifications.
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const count = formatNotifyCount(100)
|
|
15
|
+
* console.log(count) // '99+'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
function formatNotifyCount(count) {
|
|
19
|
+
if (count > 99) return "99+";
|
|
20
|
+
return count.toString();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Splits the properties of an object into multiple groups based on lists of keys.
|
|
24
|
+
* @param props - The object to split.
|
|
25
|
+
* @param keyGroups - The lists of keys to include in each group.
|
|
26
|
+
* @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.
|
|
27
|
+
*/
|
|
28
|
+
function splitProps(props, ...keyGroups) {
|
|
29
|
+
const result = keyGroups.map(() => ({}));
|
|
30
|
+
const rest = {};
|
|
31
|
+
for (const key in props) {
|
|
32
|
+
let assigned = false;
|
|
33
|
+
for (let i = 0; i < keyGroups.length; i++) if (keyGroups[i].includes(key)) {
|
|
34
|
+
result[i][key] = props[key];
|
|
35
|
+
assigned = true;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (!assigned) rest[key] = props[key];
|
|
39
|
+
}
|
|
40
|
+
return [...result, rest];
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.formatNotifyCount = formatNotifyCount;
|
|
44
|
+
exports.getLocalStorage = require_localStorage.getLocalStorage;
|
|
45
|
+
exports.setLocalStorage = require_localStorage.setLocalStorage;
|
|
46
|
+
exports.splitProps = splitProps;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module contains utility functions that are used across your app.
|
|
3
|
+
* @module Utils
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Formats the count of notifications to be displayed in the notification badge.
|
|
7
|
+
* @param count - The number of notifications.
|
|
8
|
+
* @returns The formatted count of notifications.
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const count = formatNotifyCount(100)
|
|
12
|
+
* console.log(count) // '99+'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatNotifyCount(count: number): string;
|
|
16
|
+
/**
|
|
17
|
+
* Splits the properties of an object into multiple groups based on lists of keys.
|
|
18
|
+
* @param props - The object to split.
|
|
19
|
+
* @param keyGroups - The lists of keys to include in each group.
|
|
20
|
+
* @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.
|
|
21
|
+
*/
|
|
22
|
+
export declare function splitProps<T extends object>(props: T, ...keyGroups: (keyof T)[][]): {
|
|
23
|
+
[K in keyof T]?: T[K];
|
|
24
|
+
}[];
|
|
25
|
+
export * from './localStorage';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module contains utility functions that are used across your app.
|
|
3
|
+
* @module Utils
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Formats the count of notifications to be displayed in the notification badge.
|
|
7
|
+
* @param count - The number of notifications.
|
|
8
|
+
* @returns The formatted count of notifications.
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const count = formatNotifyCount(100)
|
|
12
|
+
* console.log(count) // '99+'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatNotifyCount(count: number): string;
|
|
16
|
+
/**
|
|
17
|
+
* Splits the properties of an object into multiple groups based on lists of keys.
|
|
18
|
+
* @param props - The object to split.
|
|
19
|
+
* @param keyGroups - The lists of keys to include in each group.
|
|
20
|
+
* @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.
|
|
21
|
+
*/
|
|
22
|
+
export declare function splitProps<T extends object>(props: T, ...keyGroups: (keyof T)[][]): {
|
|
23
|
+
[K in keyof T]?: T[K];
|
|
24
|
+
}[];
|
|
25
|
+
export * from './localStorage';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getLocalStorage, setLocalStorage } from "./localStorage.js";
|
|
2
|
+
//#region src/utils/index.ts
|
|
3
|
+
/**
|
|
4
|
+
* This module contains utility functions that are used across your app.
|
|
5
|
+
* @module Utils
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Formats the count of notifications to be displayed in the notification badge.
|
|
9
|
+
* @param count - The number of notifications.
|
|
10
|
+
* @returns The formatted count of notifications.
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const count = formatNotifyCount(100)
|
|
14
|
+
* console.log(count) // '99+'
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
function formatNotifyCount(count) {
|
|
18
|
+
if (count > 99) return "99+";
|
|
19
|
+
return count.toString();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Splits the properties of an object into multiple groups based on lists of keys.
|
|
23
|
+
* @param props - The object to split.
|
|
24
|
+
* @param keyGroups - The lists of keys to include in each group.
|
|
25
|
+
* @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.
|
|
26
|
+
*/
|
|
27
|
+
function splitProps(props, ...keyGroups) {
|
|
28
|
+
const result = keyGroups.map(() => ({}));
|
|
29
|
+
const rest = {};
|
|
30
|
+
for (const key in props) {
|
|
31
|
+
let assigned = false;
|
|
32
|
+
for (let i = 0; i < keyGroups.length; i++) if (keyGroups[i].includes(key)) {
|
|
33
|
+
result[i][key] = props[key];
|
|
34
|
+
assigned = true;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
if (!assigned) rest[key] = props[key];
|
|
38
|
+
}
|
|
39
|
+
return [...result, rest];
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { formatNotifyCount, getLocalStorage, setLocalStorage, splitProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
//#region src/utils/localStorage.ts
|
|
4
|
+
/**
|
|
5
|
+
* A utility function to get a value from local storage.
|
|
6
|
+
* @param key The key to get from local storage.
|
|
7
|
+
* @param defaultValue The fallback value if the key is not found.
|
|
8
|
+
* @returns key or defaultValue
|
|
9
|
+
*/
|
|
10
|
+
function getLocalStorage(key, defaultValue) {
|
|
11
|
+
const value = window.localStorage.getItem(key);
|
|
12
|
+
if (value) return value;
|
|
13
|
+
return defaultValue;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A utility function to set a value in local storage.
|
|
17
|
+
* @param key The key to set in local storage.
|
|
18
|
+
* @param value The value to set in local storage.
|
|
19
|
+
*/
|
|
20
|
+
function setLocalStorage(key, value) {
|
|
21
|
+
const stringValue = typeof value === "string" ? value : JSON.stringify(value);
|
|
22
|
+
window.localStorage.setItem(key, stringValue);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.getLocalStorage = getLocalStorage;
|
|
26
|
+
exports.setLocalStorage = setLocalStorage;
|