@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,15 @@
|
|
|
1
|
+
import { createCerberusPrimitive } from "../../system/index.js";
|
|
2
|
+
import { fieldset } from "styled-system/recipes";
|
|
3
|
+
import { Fieldset } from "@ark-ui/react/fieldset";
|
|
4
|
+
//#region src/components/fieldset/primitives.tsx
|
|
5
|
+
/**
|
|
6
|
+
* This module contains all the primitives of the Fieldset component.
|
|
7
|
+
* @module 'react/fieldset'
|
|
8
|
+
*/
|
|
9
|
+
var { withSlotRecipe } = createCerberusPrimitive(fieldset);
|
|
10
|
+
var FieldsetRoot = withSlotRecipe(Fieldset.Root, "root");
|
|
11
|
+
var FieldsetLegend = withSlotRecipe(Fieldset.Legend, "legend");
|
|
12
|
+
var FieldsetHelperText = withSlotRecipe(Fieldset.HelperText, "helperText");
|
|
13
|
+
var FieldsetErrorText = withSlotRecipe(Fieldset.ErrorText, "errorText");
|
|
14
|
+
//#endregion
|
|
15
|
+
export { FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FieldsetRoot };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_cerberus = require("../../context/cerberus.cjs");
|
|
4
|
+
const require_avatar = require("../avatar/avatar.cjs");
|
|
5
|
+
const require_text = require("../text/text.cjs");
|
|
6
|
+
const require_button = require("../icon-button/button.cjs");
|
|
7
|
+
const require_primitives = require("../field/primitives.cjs");
|
|
8
|
+
const require_field = require("../field/field.cjs");
|
|
9
|
+
const require_progress_bar = require("../progress/progress-bar.cjs");
|
|
10
|
+
let styled_system_recipes = require("styled-system/recipes");
|
|
11
|
+
let react = require("react");
|
|
12
|
+
let styled_system_css = require("styled-system/css");
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
let styled_system_jsx = require("styled-system/jsx");
|
|
15
|
+
let styled_system_patterns = require("styled-system/patterns");
|
|
16
|
+
//#region src/components/file-upload/file-status.tsx
|
|
17
|
+
/**
|
|
18
|
+
* A helper object to represent the status of a file.
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { fileStatus } from '@cerberus/react'
|
|
22
|
+
* processStatus.TODO // 'todo'
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
var processStatus = /* @__PURE__ */ function(processStatus) {
|
|
26
|
+
processStatus["TODO"] = "todo";
|
|
27
|
+
processStatus["PROCESSING"] = "processing";
|
|
28
|
+
processStatus["DONE"] = "done";
|
|
29
|
+
processStatus["ERROR"] = "error";
|
|
30
|
+
return processStatus;
|
|
31
|
+
}({});
|
|
32
|
+
/**
|
|
33
|
+
* A component that displays the status of a file during file processing.
|
|
34
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function FileStatus(props) {
|
|
41
|
+
const { file, now, status, onClick, ...nativeProps } = props;
|
|
42
|
+
const actionLabel = (0, react.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
43
|
+
const palette = (0, react.useMemo)(() => getPalette(status), [status]);
|
|
44
|
+
const modalIconPalette = (0, react.useMemo)(() => getModalIconPalette(status), [status]);
|
|
45
|
+
const styles = (0, react.useMemo)(() => {
|
|
46
|
+
switch (status) {
|
|
47
|
+
case "todo": return (0, styled_system_recipes.fileStatus)({ status: "todo" });
|
|
48
|
+
case "processing": return (0, styled_system_recipes.fileStatus)({ status: "processing" });
|
|
49
|
+
case "done": return (0, styled_system_recipes.fileStatus)({ status: "done" });
|
|
50
|
+
case "error": return (0, styled_system_recipes.fileStatus)({ status: "error" });
|
|
51
|
+
default: return (0, styled_system_recipes.fileStatus)();
|
|
52
|
+
}
|
|
53
|
+
}, [status]);
|
|
54
|
+
const handleClick = (0, react.useCallback)((e) => {
|
|
55
|
+
onClick(getStatusActionLabel(status).toLocaleLowerCase(), e);
|
|
56
|
+
}, [onClick, status]);
|
|
57
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
58
|
+
...nativeProps,
|
|
59
|
+
className: (0, styled_system_css.cx)(nativeProps.className, styles.root, (0, styled_system_patterns.hstack)()),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_avatar.Avatar, {
|
|
62
|
+
gradient: modalIconPalette,
|
|
63
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchFileStatusIcon, {
|
|
64
|
+
size: 24,
|
|
65
|
+
status
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.VStack, {
|
|
69
|
+
alignItems: "flex-start",
|
|
70
|
+
gap: "0.12rem",
|
|
71
|
+
w: "full",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text.Text, {
|
|
74
|
+
as: "small",
|
|
75
|
+
color: "page.text.initial",
|
|
76
|
+
textStyle: "label-sm",
|
|
77
|
+
children: file
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_progress_bar.ProgressBar, {
|
|
80
|
+
id: props.id,
|
|
81
|
+
label: "File upload status",
|
|
82
|
+
now,
|
|
83
|
+
size: "sm"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_field.Field, {
|
|
86
|
+
label: "",
|
|
87
|
+
invalid: modalIconPalette === "hades-dark",
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_primitives.FieldHelperText, {
|
|
89
|
+
className: (0, styled_system_css.css)({ color: "page.text.100" }),
|
|
90
|
+
id: `help:${file}`,
|
|
91
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchFileStatusText, {
|
|
92
|
+
status,
|
|
93
|
+
now
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.IconButton, {
|
|
100
|
+
ariaLabel: actionLabel,
|
|
101
|
+
onClick: handleClick,
|
|
102
|
+
palette,
|
|
103
|
+
size: "sm",
|
|
104
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchStatusAction, { status })
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function MatchFileStatusIcon(props) {
|
|
110
|
+
const { icons } = require_cerberus.useCerberusContext();
|
|
111
|
+
const { waitingFileUploader: TodoIcon, fileUploader: FileUploaderIcon, invalidAlt: InvalidIcon, successNotification: DoneIcon } = icons;
|
|
112
|
+
switch (props.status) {
|
|
113
|
+
case "todo": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TodoIcon, { size: props.size });
|
|
114
|
+
case "processing": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileUploaderIcon, { size: props.size });
|
|
115
|
+
case "done": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DoneIcon, { size: props.size });
|
|
116
|
+
case "error": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InvalidIcon, { size: props.size });
|
|
117
|
+
default: throw new Error("Unknown status");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function MatchFileStatusText(props) {
|
|
121
|
+
switch (props.status) {
|
|
122
|
+
case "todo": return "Waiting to upload";
|
|
123
|
+
case "processing": return `${props.now}% Complete`;
|
|
124
|
+
case "done": return "File uploaded successfully";
|
|
125
|
+
case "error": return "There was an error uploading the file";
|
|
126
|
+
default: throw new Error("Invalid status");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function MatchStatusAction(props) {
|
|
130
|
+
const { icons } = require_cerberus.useCerberusContext();
|
|
131
|
+
const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons;
|
|
132
|
+
switch (props.status) {
|
|
133
|
+
case "todo":
|
|
134
|
+
case "processing": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon, {});
|
|
135
|
+
case "error": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RedoIcon, {});
|
|
136
|
+
case "done": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TrashIcon, {});
|
|
137
|
+
default: throw new Error("Invalid status");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function getStatusActionLabel(status) {
|
|
141
|
+
switch (status) {
|
|
142
|
+
case "todo":
|
|
143
|
+
case "processing": return "Cancel";
|
|
144
|
+
case "error": return "Retry";
|
|
145
|
+
case "done": return "Delete";
|
|
146
|
+
default: return "";
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function getPalette(status) {
|
|
150
|
+
switch (status) {
|
|
151
|
+
case "todo":
|
|
152
|
+
case "processing": return "danger";
|
|
153
|
+
case "error": return "action";
|
|
154
|
+
case "done": return "danger";
|
|
155
|
+
default: return "action";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function getModalIconPalette(status) {
|
|
159
|
+
switch (status) {
|
|
160
|
+
case "todo":
|
|
161
|
+
case "processing": return "charon-light";
|
|
162
|
+
case "error": return "hades-dark";
|
|
163
|
+
case "done": return "thanatos-dark";
|
|
164
|
+
default: return "charon-light";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
exports.FileStatus = FileStatus;
|
|
169
|
+
exports.processStatus = processStatus;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { HTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import { FileStatusVariantProps } from 'styled-system/recipes';
|
|
3
|
+
import { ProgressBarProps } from '../progress/index';
|
|
4
|
+
/**
|
|
5
|
+
* This module contains the FileStatus component.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The available values of the fileStatus helper Object.
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { fileStatus } from '@cerberus/react'
|
|
13
|
+
* processStatus.TODO // 'todo'
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type FileStatusKey = (typeof processStatus)[keyof typeof processStatus];
|
|
17
|
+
/**
|
|
18
|
+
* The actions that can be performed on a file.
|
|
19
|
+
*/
|
|
20
|
+
export type FileStatusActions = 'cancel' | 'retry' | 'delete';
|
|
21
|
+
export interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
22
|
+
/**
|
|
23
|
+
* A unique identifier for the file status. Required for accessibility.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* The name of the file.
|
|
28
|
+
*/
|
|
29
|
+
file: string;
|
|
30
|
+
/**
|
|
31
|
+
* The percentage of the file that has been processed.
|
|
32
|
+
*/
|
|
33
|
+
now: ProgressBarProps['now'];
|
|
34
|
+
/**
|
|
35
|
+
* The status of the file.
|
|
36
|
+
*/
|
|
37
|
+
status: processStatus;
|
|
38
|
+
/**
|
|
39
|
+
* The action to perform on the file when a user clicks the
|
|
40
|
+
* button located at the end of the status card.
|
|
41
|
+
* @param status - The status of the file.
|
|
42
|
+
* @param e - The event object.
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
46
|
+
* ```
|
|
47
|
+
* @default () => {}
|
|
48
|
+
*/
|
|
49
|
+
onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void;
|
|
50
|
+
}
|
|
51
|
+
export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps;
|
|
52
|
+
/**
|
|
53
|
+
* A helper object to represent the status of a file.
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* import { fileStatus } from '@cerberus/react'
|
|
57
|
+
* processStatus.TODO // 'todo'
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const enum processStatus {
|
|
61
|
+
TODO = "todo",
|
|
62
|
+
PROCESSING = "processing",
|
|
63
|
+
DONE = "done",
|
|
64
|
+
ERROR = "error"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A component that displays the status of a file during file processing.
|
|
68
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function FileStatus(props: FileStatusProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { HTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import { FileStatusVariantProps } from 'styled-system/recipes';
|
|
3
|
+
import { ProgressBarProps } from '../progress/index';
|
|
4
|
+
/**
|
|
5
|
+
* This module contains the FileStatus component.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The available values of the fileStatus helper Object.
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { fileStatus } from '@cerberus/react'
|
|
13
|
+
* processStatus.TODO // 'todo'
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type FileStatusKey = (typeof processStatus)[keyof typeof processStatus];
|
|
17
|
+
/**
|
|
18
|
+
* The actions that can be performed on a file.
|
|
19
|
+
*/
|
|
20
|
+
export type FileStatusActions = 'cancel' | 'retry' | 'delete';
|
|
21
|
+
export interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
22
|
+
/**
|
|
23
|
+
* A unique identifier for the file status. Required for accessibility.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* The name of the file.
|
|
28
|
+
*/
|
|
29
|
+
file: string;
|
|
30
|
+
/**
|
|
31
|
+
* The percentage of the file that has been processed.
|
|
32
|
+
*/
|
|
33
|
+
now: ProgressBarProps['now'];
|
|
34
|
+
/**
|
|
35
|
+
* The status of the file.
|
|
36
|
+
*/
|
|
37
|
+
status: processStatus;
|
|
38
|
+
/**
|
|
39
|
+
* The action to perform on the file when a user clicks the
|
|
40
|
+
* button located at the end of the status card.
|
|
41
|
+
* @param status - The status of the file.
|
|
42
|
+
* @param e - The event object.
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
46
|
+
* ```
|
|
47
|
+
* @default () => {}
|
|
48
|
+
*/
|
|
49
|
+
onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void;
|
|
50
|
+
}
|
|
51
|
+
export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps;
|
|
52
|
+
/**
|
|
53
|
+
* A helper object to represent the status of a file.
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* import { fileStatus } from '@cerberus/react'
|
|
57
|
+
* processStatus.TODO // 'todo'
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const enum processStatus {
|
|
61
|
+
TODO = "todo",
|
|
62
|
+
PROCESSING = "processing",
|
|
63
|
+
DONE = "done",
|
|
64
|
+
ERROR = "error"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A component that displays the status of a file during file processing.
|
|
68
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function FileStatus(props: FileStatusProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { useCerberusContext } from "../../context/cerberus.js";
|
|
4
|
+
import { Avatar } from "../avatar/avatar.js";
|
|
5
|
+
import { Text } from "../text/text.js";
|
|
6
|
+
import { IconButton } from "../icon-button/button.js";
|
|
7
|
+
import { FieldHelperText } from "../field/primitives.js";
|
|
8
|
+
import { Field } from "../field/field.js";
|
|
9
|
+
import { ProgressBar } from "../progress/progress-bar.js";
|
|
10
|
+
import { fileStatus } from "styled-system/recipes";
|
|
11
|
+
import { useCallback, useMemo } from "react";
|
|
12
|
+
import { css, cx } from "styled-system/css";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { VStack } from "styled-system/jsx";
|
|
15
|
+
import { hstack } from "styled-system/patterns";
|
|
16
|
+
//#region src/components/file-upload/file-status.tsx
|
|
17
|
+
/**
|
|
18
|
+
* A helper object to represent the status of a file.
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { fileStatus } from '@cerberus/react'
|
|
22
|
+
* processStatus.TODO // 'todo'
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
var processStatus = /* @__PURE__ */ function(processStatus) {
|
|
26
|
+
processStatus["TODO"] = "todo";
|
|
27
|
+
processStatus["PROCESSING"] = "processing";
|
|
28
|
+
processStatus["DONE"] = "done";
|
|
29
|
+
processStatus["ERROR"] = "error";
|
|
30
|
+
return processStatus;
|
|
31
|
+
}({});
|
|
32
|
+
/**
|
|
33
|
+
* A component that displays the status of a file during file processing.
|
|
34
|
+
* @see https://cerberus.digitalu.design/react/file-uploader
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function FileStatus(props) {
|
|
41
|
+
const { file, now, status, onClick, ...nativeProps } = props;
|
|
42
|
+
const actionLabel = useMemo(() => getStatusActionLabel(status), [status]);
|
|
43
|
+
const palette = useMemo(() => getPalette(status), [status]);
|
|
44
|
+
const modalIconPalette = useMemo(() => getModalIconPalette(status), [status]);
|
|
45
|
+
const styles = useMemo(() => {
|
|
46
|
+
switch (status) {
|
|
47
|
+
case "todo": return fileStatus({ status: "todo" });
|
|
48
|
+
case "processing": return fileStatus({ status: "processing" });
|
|
49
|
+
case "done": return fileStatus({ status: "done" });
|
|
50
|
+
case "error": return fileStatus({ status: "error" });
|
|
51
|
+
default: return fileStatus();
|
|
52
|
+
}
|
|
53
|
+
}, [status]);
|
|
54
|
+
const handleClick = useCallback((e) => {
|
|
55
|
+
onClick(getStatusActionLabel(status).toLocaleLowerCase(), e);
|
|
56
|
+
}, [onClick, status]);
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
...nativeProps,
|
|
59
|
+
className: cx(nativeProps.className, styles.root, hstack()),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Avatar, {
|
|
62
|
+
gradient: modalIconPalette,
|
|
63
|
+
fallback: /* @__PURE__ */ jsx(MatchFileStatusIcon, {
|
|
64
|
+
size: 24,
|
|
65
|
+
status
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsxs(VStack, {
|
|
69
|
+
alignItems: "flex-start",
|
|
70
|
+
gap: "0.12rem",
|
|
71
|
+
w: "full",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Text, {
|
|
74
|
+
as: "small",
|
|
75
|
+
color: "page.text.initial",
|
|
76
|
+
textStyle: "label-sm",
|
|
77
|
+
children: file
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(ProgressBar, {
|
|
80
|
+
id: props.id,
|
|
81
|
+
label: "File upload status",
|
|
82
|
+
now,
|
|
83
|
+
size: "sm"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx(Field, {
|
|
86
|
+
label: "",
|
|
87
|
+
invalid: modalIconPalette === "hades-dark",
|
|
88
|
+
children: /* @__PURE__ */ jsx(FieldHelperText, {
|
|
89
|
+
className: css({ color: "page.text.100" }),
|
|
90
|
+
id: `help:${file}`,
|
|
91
|
+
children: /* @__PURE__ */ jsx(MatchFileStatusText, {
|
|
92
|
+
status,
|
|
93
|
+
now
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
100
|
+
ariaLabel: actionLabel,
|
|
101
|
+
onClick: handleClick,
|
|
102
|
+
palette,
|
|
103
|
+
size: "sm",
|
|
104
|
+
children: /* @__PURE__ */ jsx(MatchStatusAction, { status })
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function MatchFileStatusIcon(props) {
|
|
110
|
+
const { icons } = useCerberusContext();
|
|
111
|
+
const { waitingFileUploader: TodoIcon, fileUploader: FileUploaderIcon, invalidAlt: InvalidIcon, successNotification: DoneIcon } = icons;
|
|
112
|
+
switch (props.status) {
|
|
113
|
+
case "todo": return /* @__PURE__ */ jsx(TodoIcon, { size: props.size });
|
|
114
|
+
case "processing": return /* @__PURE__ */ jsx(FileUploaderIcon, { size: props.size });
|
|
115
|
+
case "done": return /* @__PURE__ */ jsx(DoneIcon, { size: props.size });
|
|
116
|
+
case "error": return /* @__PURE__ */ jsx(InvalidIcon, { size: props.size });
|
|
117
|
+
default: throw new Error("Unknown status");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function MatchFileStatusText(props) {
|
|
121
|
+
switch (props.status) {
|
|
122
|
+
case "todo": return "Waiting to upload";
|
|
123
|
+
case "processing": return `${props.now}% Complete`;
|
|
124
|
+
case "done": return "File uploaded successfully";
|
|
125
|
+
case "error": return "There was an error uploading the file";
|
|
126
|
+
default: throw new Error("Invalid status");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function MatchStatusAction(props) {
|
|
130
|
+
const { icons } = useCerberusContext();
|
|
131
|
+
const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons;
|
|
132
|
+
switch (props.status) {
|
|
133
|
+
case "todo":
|
|
134
|
+
case "processing": return /* @__PURE__ */ jsx(CloseIcon, {});
|
|
135
|
+
case "error": return /* @__PURE__ */ jsx(RedoIcon, {});
|
|
136
|
+
case "done": return /* @__PURE__ */ jsx(TrashIcon, {});
|
|
137
|
+
default: throw new Error("Invalid status");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function getStatusActionLabel(status) {
|
|
141
|
+
switch (status) {
|
|
142
|
+
case "todo":
|
|
143
|
+
case "processing": return "Cancel";
|
|
144
|
+
case "error": return "Retry";
|
|
145
|
+
case "done": return "Delete";
|
|
146
|
+
default: return "";
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function getPalette(status) {
|
|
150
|
+
switch (status) {
|
|
151
|
+
case "todo":
|
|
152
|
+
case "processing": return "danger";
|
|
153
|
+
case "error": return "action";
|
|
154
|
+
case "done": return "danger";
|
|
155
|
+
default: return "action";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function getModalIconPalette(status) {
|
|
159
|
+
switch (status) {
|
|
160
|
+
case "todo":
|
|
161
|
+
case "processing": return "charon-light";
|
|
162
|
+
case "error": return "hades-dark";
|
|
163
|
+
case "done": return "thanatos-dark";
|
|
164
|
+
default: return "charon-light";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
export { FileStatus, processStatus };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_index = require("../../utils/index.cjs");
|
|
4
|
+
const require_show = require("../show/show.cjs");
|
|
5
|
+
const require_cerberus = require("../../context/cerberus.cjs");
|
|
6
|
+
const require_avatar = require("../avatar/avatar.cjs");
|
|
7
|
+
const require_parts = require("./parts.cjs");
|
|
8
|
+
const require_utils = require("./utils.cjs");
|
|
9
|
+
const require_img_preview = require("./img-preview.cjs");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
//#region src/components/file-upload/file-uploader.tsx
|
|
12
|
+
/**
|
|
13
|
+
* A component that allows the user to upload files.
|
|
14
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
15
|
+
*/
|
|
16
|
+
function FileUploader(props) {
|
|
17
|
+
const [elProps, rootProps] = require_index.splitProps(props, ["heading", "showPreview"]);
|
|
18
|
+
const { showPreview = true } = elProps;
|
|
19
|
+
const { icons } = require_cerberus.useCerberusContext();
|
|
20
|
+
const { waitingFileUploader: Icon } = icons;
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_parts.FileUploadParts.Root, {
|
|
22
|
+
...rootProps,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_parts.FileUploadParts.Dropzone, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.FileUploadParts.Icon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_avatar.Avatar, {
|
|
25
|
+
gradient: "charon-light",
|
|
26
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {})
|
|
27
|
+
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_parts.FileUploadParts.Content, { children: [
|
|
28
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_show.Show, {
|
|
29
|
+
when: elProps.heading,
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.FileUploadParts.Heading, { children: elProps.heading })
|
|
31
|
+
}),
|
|
32
|
+
"Import ",
|
|
33
|
+
require_utils.formatFileTypes(rootProps.accept),
|
|
34
|
+
" files",
|
|
35
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.FileUploadParts.Description, { children: "Drag and drop files or click to upload" })
|
|
36
|
+
] })] }),
|
|
37
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_show.Show, {
|
|
38
|
+
when: showPreview,
|
|
39
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.children }),
|
|
40
|
+
children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_img_preview.ImgPreview, {})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.FileUploadParts.HiddenInput, {})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.FileUploader = FileUploader;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FileUploadRootProps } from './primitives';
|
|
3
|
+
export interface FileUploaderProps extends FileUploadRootProps {
|
|
4
|
+
/**
|
|
5
|
+
* The optional heading to display in the FileUploader component.
|
|
6
|
+
*/
|
|
7
|
+
heading?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Show a preview of the uploaded image.
|
|
10
|
+
*/
|
|
11
|
+
showPreview?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A component that allows the user to upload files.
|
|
15
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
16
|
+
*/
|
|
17
|
+
export declare function FileUploader(props: PropsWithChildren<FileUploaderProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FileUploadRootProps } from './primitives';
|
|
3
|
+
export interface FileUploaderProps extends FileUploadRootProps {
|
|
4
|
+
/**
|
|
5
|
+
* The optional heading to display in the FileUploader component.
|
|
6
|
+
*/
|
|
7
|
+
heading?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Show a preview of the uploaded image.
|
|
10
|
+
*/
|
|
11
|
+
showPreview?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A component that allows the user to upload files.
|
|
15
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
16
|
+
*/
|
|
17
|
+
export declare function FileUploader(props: PropsWithChildren<FileUploaderProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { splitProps } from "../../utils/index.js";
|
|
4
|
+
import { Show } from "../show/show.js";
|
|
5
|
+
import { useCerberusContext } from "../../context/cerberus.js";
|
|
6
|
+
import { Avatar } from "../avatar/avatar.js";
|
|
7
|
+
import { FileUploadParts } from "./parts.js";
|
|
8
|
+
import { formatFileTypes } from "./utils.js";
|
|
9
|
+
import { ImgPreview } from "./img-preview.js";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/file-upload/file-uploader.tsx
|
|
12
|
+
/**
|
|
13
|
+
* A component that allows the user to upload files.
|
|
14
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
15
|
+
*/
|
|
16
|
+
function FileUploader(props) {
|
|
17
|
+
const [elProps, rootProps] = splitProps(props, ["heading", "showPreview"]);
|
|
18
|
+
const { showPreview = true } = elProps;
|
|
19
|
+
const { icons } = useCerberusContext();
|
|
20
|
+
const { waitingFileUploader: Icon } = icons;
|
|
21
|
+
return /* @__PURE__ */ jsxs(FileUploadParts.Root, {
|
|
22
|
+
...rootProps,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsxs(FileUploadParts.Dropzone, { children: [/* @__PURE__ */ jsx(FileUploadParts.Icon, { children: /* @__PURE__ */ jsx(Avatar, {
|
|
25
|
+
gradient: "charon-light",
|
|
26
|
+
fallback: /* @__PURE__ */ jsx(Icon, {})
|
|
27
|
+
}) }), /* @__PURE__ */ jsxs(FileUploadParts.Content, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(Show, {
|
|
29
|
+
when: elProps.heading,
|
|
30
|
+
children: /* @__PURE__ */ jsx(FileUploadParts.Heading, { children: elProps.heading })
|
|
31
|
+
}),
|
|
32
|
+
"Import ",
|
|
33
|
+
formatFileTypes(rootProps.accept),
|
|
34
|
+
" files",
|
|
35
|
+
/* @__PURE__ */ jsx(FileUploadParts.Description, { children: "Drag and drop files or click to upload" })
|
|
36
|
+
] })] }),
|
|
37
|
+
/* @__PURE__ */ jsx(Show, {
|
|
38
|
+
when: showPreview,
|
|
39
|
+
fallback: /* @__PURE__ */ jsx(Fragment, { children: props.children }),
|
|
40
|
+
children: () => /* @__PURE__ */ jsx(ImgPreview, {})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(FileUploadParts.HiddenInput, {})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { FileUploader };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/file-upload/helpers.ts
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to create error messages for file upload errors. Returns a
|
|
5
|
+
* record of FileUploadFileError codes and their corresponding error messages.
|
|
6
|
+
* @returns Record<FileUploadFileError, string>
|
|
7
|
+
*/
|
|
8
|
+
function createErrorMessages(options) {
|
|
9
|
+
return {
|
|
10
|
+
TOO_MANY_FILES: options.tooMany || "📊 Too many files selected",
|
|
11
|
+
FILE_INVALID_TYPE: options.invalidType || "🚫 Invalid file type",
|
|
12
|
+
FILE_TOO_LARGE: options.tooLarge || "📏 File too large",
|
|
13
|
+
FILE_TOO_SMALL: options.tooSmall || "📐 File too small",
|
|
14
|
+
FILE_INVALID: options.invalid || "⚠️ Invalid file",
|
|
15
|
+
FILE_EXISTS: options.exists || "🔄 File already exists"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.createErrorMessages = createErrorMessages;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FileUploadFileError } from '@ark-ui/react/file-upload';
|
|
2
|
+
type FileErrorTypes = {
|
|
3
|
+
tooMany?: string;
|
|
4
|
+
invalidType?: string;
|
|
5
|
+
tooLarge?: string;
|
|
6
|
+
tooSmall?: string;
|
|
7
|
+
invalid?: string;
|
|
8
|
+
exists?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Helper function to create error messages for file upload errors. Returns a
|
|
12
|
+
* record of FileUploadFileError codes and their corresponding error messages.
|
|
13
|
+
* @returns Record<FileUploadFileError, string>
|
|
14
|
+
*/
|
|
15
|
+
export declare function createErrorMessages(options: FileErrorTypes): Record<FileUploadFileError, string>;
|
|
16
|
+
export {};
|