tembro 3.1.1 → 3.1.5
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/CHANGELOG.md +23 -1
- package/dist/components/actions/index.d.ts +0 -1
- package/dist/components/actions/public.d.ts +0 -1
- package/dist/components/charts/index.d.ts +1 -3
- package/dist/components/charts/progress-circle.cjs +1 -0
- package/dist/components/charts/progress-circle.d.ts +4 -0
- package/dist/components/charts/progress-circle.js +1 -0
- package/dist/components/data-table/public.d.ts +0 -5
- package/dist/components/display/index.d.ts +4 -10
- package/dist/components/display/qr-code.cjs +1 -0
- package/dist/components/display/qr-code.d.ts +18 -0
- package/dist/components/display/qr-code.js +1 -0
- package/dist/components/display/virtual-list.d.ts +2 -1
- package/dist/components/inputs/color-picker.cjs +1 -0
- package/dist/components/inputs/color-picker.d.ts +20 -0
- package/dist/components/inputs/color-picker.js +1 -0
- package/dist/components/inputs/index.d.ts +2 -0
- package/dist/components/inputs/public.d.ts +2 -0
- package/dist/components/inputs/signature-pad.cjs +1 -0
- package/dist/components/inputs/signature-pad.d.ts +36 -0
- package/dist/components/inputs/signature-pad.js +1 -0
- package/dist/components/layout/app-sidebar.d.ts +9 -2
- package/dist/components/layout/controllable-details.cjs +1 -0
- package/dist/components/layout/controllable-details.d.ts +9 -0
- package/dist/components/layout/controllable-details.js +1 -0
- package/dist/components/layout/index.d.ts +0 -4
- package/dist/components/layout/public.d.ts +0 -4
- package/dist/components/layout/sidebar-nav.d.ts +6 -1
- package/dist/components/modern/image-cropper.cjs +1 -0
- package/dist/components/modern/image-cropper.d.ts +39 -0
- package/dist/components/modern/image-cropper.js +1 -0
- package/dist/components/modern/index.d.ts +2 -3
- package/dist/components/modern/rich-text-editor.d.ts +17 -3
- package/dist/components/navigation/index.d.ts +0 -5
- package/dist/components/overlay/confirm-dialog.d.ts +17 -5
- package/dist/components/overlay/index.d.ts +0 -3
- package/dist/components/patterns/bulk-action-bar.cjs +1 -0
- package/dist/components/patterns/bulk-action-bar.d.ts +10 -0
- package/dist/components/patterns/bulk-action-bar.js +1 -0
- package/dist/components/patterns/data-view.cjs +1 -0
- package/dist/components/patterns/data-view.d.ts +17 -0
- package/dist/components/patterns/data-view.js +1 -0
- package/dist/components/patterns/detail-layout.cjs +1 -0
- package/dist/components/patterns/detail-layout.d.ts +16 -0
- package/dist/components/patterns/detail-layout.js +1 -0
- package/dist/components/patterns/empty-state.cjs +1 -0
- package/dist/components/patterns/empty-state.d.ts +22 -0
- package/dist/components/patterns/empty-state.js +1 -0
- package/dist/components/patterns/index.d.ts +7 -0
- package/dist/components/patterns/page-toolbar.cjs +1 -0
- package/dist/components/patterns/page-toolbar.d.ts +11 -0
- package/dist/components/patterns/page-toolbar.js +1 -0
- package/dist/components/patterns/public.d.ts +7 -0
- package/dist/components/patterns/settings-page.cjs +1 -0
- package/dist/components/patterns/settings-page.d.ts +21 -0
- package/dist/components/patterns/settings-page.js +1 -0
- package/dist/components/theme-provider.d.ts +4 -1
- package/dist/components/ui/accordion/index.d.ts +8 -12
- package/dist/components/ui/checkbox/index.d.ts +8 -2
- package/dist/components/ui/input/decorator.d.ts +1 -1
- package/dist/components/upload/index.d.ts +0 -2
- package/dist/index.d.ts +2 -2
- package/dist/showcase/package-meta.d.ts +3 -3
- package/dist/showcase/premium/color-picker/index.cjs +1 -0
- package/dist/showcase/premium/color-picker/index.d.ts +2 -0
- package/dist/showcase/premium/color-picker/index.js +1 -0
- package/dist/showcase/premium/color-picker/mock.cjs +1 -0
- package/dist/showcase/premium/color-picker/mock.d.ts +2 -0
- package/dist/showcase/premium/color-picker/mock.js +1 -0
- package/dist/showcase/premium/color-picker/showcase.cjs +1 -0
- package/dist/showcase/premium/color-picker/showcase.d.ts +2 -0
- package/dist/showcase/premium/color-picker/showcase.js +1 -0
- package/dist/showcase/premium/image-cropper/index.cjs +1 -0
- package/dist/showcase/premium/image-cropper/index.d.ts +2 -0
- package/dist/showcase/premium/image-cropper/index.js +1 -0
- package/dist/showcase/premium/image-cropper/mock.cjs +1 -0
- package/dist/showcase/premium/image-cropper/mock.d.ts +2 -0
- package/dist/showcase/premium/image-cropper/mock.js +1 -0
- package/dist/showcase/premium/image-cropper/showcase.cjs +1 -0
- package/dist/showcase/premium/image-cropper/showcase.d.ts +2 -0
- package/dist/showcase/premium/image-cropper/showcase.js +1 -0
- package/dist/showcase/premium/qr-code/index.cjs +1 -0
- package/dist/showcase/premium/qr-code/index.d.ts +2 -0
- package/dist/showcase/premium/qr-code/index.js +1 -0
- package/dist/showcase/premium/qr-code/mock.cjs +1 -0
- package/dist/showcase/premium/qr-code/mock.d.ts +2 -0
- package/dist/showcase/premium/qr-code/mock.js +1 -0
- package/dist/showcase/premium/qr-code/showcase.cjs +1 -0
- package/dist/showcase/premium/qr-code/showcase.d.ts +2 -0
- package/dist/showcase/premium/qr-code/showcase.js +1 -0
- package/dist/showcase/premium/rich-text-editor/index.cjs +1 -0
- package/dist/showcase/premium/rich-text-editor/index.d.ts +2 -0
- package/dist/showcase/premium/rich-text-editor/index.js +1 -0
- package/dist/showcase/premium/rich-text-editor/mock.cjs +1 -0
- package/dist/showcase/premium/rich-text-editor/mock.d.ts +2 -0
- package/dist/showcase/premium/rich-text-editor/mock.js +1 -0
- package/dist/showcase/premium/rich-text-editor/showcase.cjs +1 -0
- package/dist/showcase/premium/rich-text-editor/showcase.d.ts +2 -0
- package/dist/showcase/premium/rich-text-editor/showcase.js +1 -0
- package/dist/showcase/premium/signature-pad/index.cjs +1 -0
- package/dist/showcase/premium/signature-pad/index.d.ts +2 -0
- package/dist/showcase/premium/signature-pad/index.js +1 -0
- package/dist/showcase/premium/signature-pad/mock.cjs +1 -0
- package/dist/showcase/premium/signature-pad/mock.d.ts +2 -0
- package/dist/showcase/premium/signature-pad/mock.js +1 -0
- package/dist/showcase/premium/signature-pad/showcase.cjs +1 -0
- package/dist/showcase/premium/signature-pad/showcase.d.ts +2 -0
- package/dist/showcase/premium/signature-pad/showcase.js +1 -0
- package/dist/showcase/premium/statistic/showcase.d.ts +2 -1
- package/dist/showcase/preview-compositions.cjs +1 -0
- package/dist/showcase/preview-compositions.d.ts +30 -0
- package/dist/showcase/preview-compositions.js +1 -0
- package/dist/src/components/actions/index.cjs +1 -1
- package/dist/src/components/actions/index.js +2 -3
- package/dist/src/components/actions/public.cjs +1 -1
- package/dist/src/components/actions/public.js +2 -3
- package/dist/src/components/charts/index.cjs +1 -1
- package/dist/src/components/charts/index.js +2 -4
- package/dist/src/components/charts/progress-circle.cjs +1 -0
- package/dist/src/components/charts/progress-circle.js +5 -0
- package/dist/src/components/data-table/demo.cjs +1 -1
- package/dist/src/components/data-table/demo.js +5 -25
- package/dist/src/components/data-table/index.cjs +1 -1
- package/dist/src/components/data-table/index.js +5 -5
- package/dist/src/components/data-table/public.cjs +1 -1
- package/dist/src/components/data-table/public.js +2 -7
- package/dist/src/components/display/demo.cjs +1 -1
- package/dist/src/components/display/demo.js +1 -6
- package/dist/src/components/display/index.cjs +1 -1
- package/dist/src/components/display/index.js +19 -25
- package/dist/src/components/display/info-card.cjs +1 -1
- package/dist/src/components/display/info-card.js +30 -19
- package/dist/src/components/display/qr-code.cjs +1 -0
- package/dist/src/components/display/qr-code.js +74 -0
- package/dist/src/components/display/statistic.cjs +1 -1
- package/dist/src/components/display/statistic.js +24 -3
- package/dist/src/components/display/tag.cjs +1 -1
- package/dist/src/components/display/tag.js +13 -8
- package/dist/src/components/display/typography.cjs +1 -1
- package/dist/src/components/display/typography.js +36 -28
- package/dist/src/components/feedback/page-state.cjs +1 -1
- package/dist/src/components/feedback/page-state.js +9 -0
- package/dist/src/components/form/form-field-shell.cjs +1 -1
- package/dist/src/components/form/form-field-shell.js +9 -10
- package/dist/src/components/inputs/async-select.cjs +1 -1
- package/dist/src/components/inputs/async-select.js +36 -30
- package/dist/src/components/inputs/color-picker.cjs +1 -0
- package/dist/src/components/inputs/color-picker.js +124 -0
- package/dist/src/components/inputs/demo.cjs +1 -1
- package/dist/src/components/inputs/demo.js +0 -8
- package/dist/src/components/inputs/index.cjs +1 -1
- package/dist/src/components/inputs/index.js +3 -1
- package/dist/src/components/inputs/public.cjs +1 -1
- package/dist/src/components/inputs/public.js +3 -1
- package/dist/src/components/inputs/signature-pad.cjs +1 -0
- package/dist/src/components/inputs/signature-pad.js +118 -0
- package/dist/src/components/layout/app-sidebar.cjs +1 -1
- package/dist/src/components/layout/app-sidebar.js +211 -189
- package/dist/src/components/layout/controllable-details.cjs +1 -0
- package/dist/src/components/layout/controllable-details.js +18 -0
- package/dist/src/components/layout/demo.cjs +1 -1
- package/dist/src/components/layout/demo.js +1 -5
- package/dist/src/components/layout/index.cjs +1 -1
- package/dist/src/components/layout/index.js +3 -7
- package/dist/src/components/layout/public.cjs +1 -1
- package/dist/src/components/layout/public.js +2 -6
- package/dist/src/components/layout/sidebar-nav.cjs +1 -1
- package/dist/src/components/layout/sidebar-nav.js +105 -84
- package/dist/src/components/modern/image-cropper.cjs +1 -0
- package/dist/src/components/modern/image-cropper.js +143 -0
- package/dist/src/components/modern/index.cjs +1 -1
- package/dist/src/components/modern/index.js +6 -7
- package/dist/src/components/modern/rich-text-editor.cjs +1 -1
- package/dist/src/components/modern/rich-text-editor.js +164 -17
- package/dist/src/components/navigation/demo.cjs +1 -1
- package/dist/src/components/navigation/demo.js +1 -6
- package/dist/src/components/navigation/index.cjs +1 -1
- package/dist/src/components/navigation/index.js +2 -7
- package/dist/src/components/overlay/confirm-dialog.cjs +1 -1
- package/dist/src/components/overlay/confirm-dialog.js +54 -33
- package/dist/src/components/overlay/index.cjs +1 -1
- package/dist/src/components/overlay/index.js +3 -6
- package/dist/src/components/patterns/bulk-action-bar.cjs +1 -0
- package/dist/src/components/patterns/bulk-action-bar.js +34 -0
- package/dist/src/components/patterns/data-view.cjs +1 -0
- package/dist/src/components/patterns/data-view.js +47 -0
- package/dist/src/components/patterns/detail-layout.cjs +1 -0
- package/dist/src/components/patterns/detail-layout.js +65 -0
- package/dist/src/components/patterns/empty-state.cjs +1 -0
- package/dist/src/components/patterns/empty-state.js +62 -0
- package/dist/src/components/patterns/index.cjs +1 -1
- package/dist/src/components/patterns/index.js +10 -3
- package/dist/src/components/patterns/page-toolbar.cjs +1 -0
- package/dist/src/components/patterns/page-toolbar.js +41 -0
- package/dist/src/components/patterns/public.cjs +1 -1
- package/dist/src/components/patterns/public.js +10 -3
- package/dist/src/components/patterns/resource-detail-page.cjs +1 -1
- package/dist/src/components/patterns/resource-detail-page.js +8 -8
- package/dist/src/components/patterns/resource-page.cjs +1 -1
- package/dist/src/components/patterns/resource-page.js +1 -1
- package/dist/src/components/patterns/settings-page.cjs +1 -0
- package/dist/src/components/patterns/settings-page.js +64 -0
- package/dist/src/components/theme-provider.cjs +1 -1
- package/dist/src/components/theme-provider.js +33 -21
- package/dist/src/components/ui/accordion/index.cjs +1 -1
- package/dist/src/components/ui/accordion/index.js +3 -27
- package/dist/src/components/ui/badge/index.cjs +1 -1
- package/dist/src/components/ui/badge/index.js +19 -24
- package/dist/src/components/ui/button/index.cjs +1 -1
- package/dist/src/components/ui/button/index.js +20 -21
- package/dist/src/components/ui/card/index.cjs +1 -1
- package/dist/src/components/ui/card/index.js +21 -20
- package/dist/src/components/ui/checkbox/index.cjs +1 -1
- package/dist/src/components/ui/checkbox/index.js +31 -20
- package/dist/src/components/ui/dialog/index.cjs +1 -1
- package/dist/src/components/ui/dialog/index.js +11 -11
- package/dist/src/components/ui/dropdown-menu/index.cjs +1 -1
- package/dist/src/components/ui/dropdown-menu/index.js +21 -23
- package/dist/src/components/ui/input/group.cjs +1 -1
- package/dist/src/components/ui/input/group.js +2 -1
- package/dist/src/components/ui/input/index.cjs +1 -1
- package/dist/src/components/ui/input/index.js +9 -5
- package/dist/src/components/ui/input/password.cjs +1 -1
- package/dist/src/components/ui/input/password.js +2 -3
- package/dist/src/components/ui/popover/index.cjs +1 -1
- package/dist/src/components/ui/popover/index.js +10 -10
- package/dist/src/components/ui/select/index.cjs +1 -1
- package/dist/src/components/ui/select/index.js +12 -12
- package/dist/src/components/ui/tabs/index.cjs +1 -1
- package/dist/src/components/ui/tabs/index.js +6 -6
- package/dist/src/components/upload/demo.cjs +1 -1
- package/dist/src/components/upload/demo.js +1 -5
- package/dist/src/components/upload/file-upload.cjs +1 -1
- package/dist/src/components/upload/file-upload.js +18 -0
- package/dist/src/components/upload/index.cjs +1 -1
- package/dist/src/components/upload/index.js +1 -2
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.js +109 -127
- package/dist/src/public-component-surface.cjs +1 -1
- package/dist/src/public-component-surface.js +74 -4
- package/dist/src/showcase/demo-snippets/actions/index.cjs +6 -6
- package/dist/src/showcase/demo-snippets/actions/index.js +1 -1
- package/dist/src/showcase/fallback.cjs +3 -3
- package/dist/src/showcase/fallback.js +179 -336
- package/dist/src/showcase/package-meta.cjs +1 -1
- package/dist/src/showcase/package-meta.js +1 -1
- package/dist/src/showcase/premium/app-sidebar/mock.cjs +25 -6
- package/dist/src/showcase/premium/app-sidebar/mock.js +7 -5
- package/dist/src/showcase/premium/app-sidebar/showcase.cjs +1 -1
- package/dist/src/showcase/premium/app-sidebar/showcase.js +147 -63
- package/dist/src/showcase/premium/{command-bar → color-picker}/index.cjs +1 -1
- package/dist/src/showcase/premium/color-picker/index.js +3 -0
- package/dist/src/showcase/premium/color-picker/mock.cjs +11 -0
- package/dist/src/showcase/premium/color-picker/mock.js +15 -0
- package/dist/src/showcase/premium/color-picker/showcase.cjs +1 -0
- package/dist/src/showcase/premium/color-picker/showcase.js +21 -0
- package/dist/src/showcase/premium/data-table/showcase.cjs +1 -1
- package/dist/src/showcase/premium/data-table/showcase.js +6 -6
- package/dist/src/showcase/premium/file-upload/mock.cjs +6 -1
- package/dist/src/showcase/premium/file-upload/mock.js +3 -2
- package/dist/src/showcase/premium/file-upload/showcase.cjs +1 -1
- package/dist/src/showcase/premium/file-upload/showcase.js +89 -36
- package/dist/src/showcase/premium/{copy-field → image-cropper}/index.cjs +1 -1
- package/dist/src/showcase/premium/image-cropper/index.js +3 -0
- package/dist/src/showcase/premium/image-cropper/mock.cjs +5 -0
- package/dist/src/showcase/premium/image-cropper/mock.js +15 -0
- package/dist/src/showcase/premium/image-cropper/showcase.cjs +1 -0
- package/dist/src/showcase/premium/image-cropper/showcase.js +21 -0
- package/dist/src/showcase/premium/index.cjs +1 -1
- package/dist/src/showcase/premium/index.js +352 -498
- package/dist/src/showcase/premium/input/mock.cjs +17 -36
- package/dist/src/showcase/premium/input/mock.js +3 -2
- package/dist/src/showcase/premium/input/showcase.cjs +1 -1
- package/dist/src/showcase/premium/input/showcase.js +326 -175
- package/dist/src/showcase/premium/page-state/mock.cjs +11 -8
- package/dist/src/showcase/premium/page-state/mock.js +5 -5
- package/dist/src/showcase/premium/page-state/showcase.cjs +1 -1
- package/dist/src/showcase/premium/page-state/showcase.js +59 -31
- package/dist/src/showcase/premium/{accordion → qr-code}/index.cjs +1 -1
- package/dist/src/showcase/premium/qr-code/index.js +3 -0
- package/dist/src/showcase/premium/qr-code/mock.cjs +5 -0
- package/dist/src/showcase/premium/qr-code/mock.js +15 -0
- package/dist/src/showcase/premium/qr-code/showcase.cjs +1 -0
- package/dist/src/showcase/premium/qr-code/showcase.js +22 -0
- package/dist/src/showcase/premium/rich-text-editor/index.cjs +1 -0
- package/dist/src/showcase/premium/rich-text-editor/index.js +3 -0
- package/dist/src/showcase/premium/rich-text-editor/mock.cjs +5 -0
- package/dist/src/showcase/premium/rich-text-editor/mock.js +15 -0
- package/dist/src/showcase/premium/rich-text-editor/showcase.cjs +1 -0
- package/dist/src/showcase/premium/rich-text-editor/showcase.js +20 -0
- package/dist/src/showcase/premium/{descriptions → signature-pad}/index.cjs +1 -1
- package/dist/src/showcase/premium/signature-pad/index.js +3 -0
- package/dist/src/showcase/premium/signature-pad/mock.cjs +10 -0
- package/dist/src/showcase/premium/signature-pad/mock.js +15 -0
- package/dist/src/showcase/premium/signature-pad/showcase.cjs +1 -0
- package/dist/src/showcase/premium/signature-pad/showcase.js +24 -0
- package/dist/src/showcase/premium/statistic/mock.cjs +2 -2
- package/dist/src/showcase/premium/statistic/mock.js +1 -1
- package/dist/src/showcase/premium/statistic/showcase.cjs +1 -1
- package/dist/src/showcase/premium/statistic/showcase.js +72 -50
- package/dist/src/showcase/premium/tag/showcase.cjs +1 -1
- package/dist/src/showcase/premium/tag/showcase.js +82 -13
- package/dist/src/showcase/preview-catalog.cjs +1 -2
- package/dist/src/showcase/preview-catalog.js +2 -2
- package/dist/src/showcase/preview-compositions.cjs +1 -0
- package/dist/src/showcase/preview-compositions.js +50 -0
- package/dist/src/showcase/registry-quality.cjs +1 -1
- package/dist/src/showcase/registry-quality.js +4 -19
- package/dist/src/showcase/registry-specific.cjs +1 -1
- package/dist/src/showcase/registry-specific.js +272 -430
- package/dist/src/showcase/render-registry-preview.cjs +1 -1
- package/dist/src/showcase/render-registry-preview.js +233 -338
- package/dist/src/showcase/site-data.cjs +1 -1
- package/dist/src/showcase/site-data.js +365 -1422
- package/dist/src/showcase/tembro-registry.json.cjs +1 -1
- package/dist/src/showcase/tembro-registry.json.js +76 -57
- package/package.json +16 -7
- package/packages/cli/dist/index.cjs +931 -123
- package/packages/cli/vendor/src/components/actions/index.ts +0 -1
- package/packages/cli/vendor/src/components/actions/public.ts +0 -1
- package/packages/cli/vendor/src/components/charts/index.ts +2 -4
- package/packages/cli/vendor/src/components/charts/progress-circle.tsx +7 -0
- package/packages/cli/vendor/src/components/data-table/demo.tsx +0 -25
- package/packages/cli/vendor/src/components/data-table/public.ts +0 -5
- package/packages/cli/vendor/src/components/display/demo.tsx +0 -5
- package/packages/cli/vendor/src/components/display/index.ts +12 -18
- package/packages/cli/vendor/src/components/display/info-card.tsx +35 -27
- package/packages/cli/vendor/src/components/display/qr-code.tsx +101 -0
- package/packages/cli/vendor/src/components/display/statistic.tsx +14 -12
- package/packages/cli/vendor/src/components/display/tag.tsx +18 -11
- package/packages/cli/vendor/src/components/display/typography.tsx +12 -14
- package/packages/cli/vendor/src/components/display/virtual-list.tsx +18 -16
- package/packages/cli/vendor/src/components/feedback/page-state.tsx +9 -5
- package/packages/cli/vendor/src/components/form/form-field-shell.tsx +9 -12
- package/packages/cli/vendor/src/components/inputs/async-select.tsx +47 -73
- package/packages/cli/vendor/src/components/inputs/color-picker.tsx +154 -0
- package/packages/cli/vendor/src/components/inputs/demo.tsx +0 -8
- package/packages/cli/vendor/src/components/inputs/index.ts +2 -0
- package/packages/cli/vendor/src/components/inputs/public.ts +2 -0
- package/packages/cli/vendor/src/components/inputs/signature-pad.tsx +192 -0
- package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +168 -112
- package/packages/cli/vendor/src/components/layout/controllable-details.tsx +37 -0
- package/packages/cli/vendor/src/components/layout/demo.tsx +0 -2
- package/packages/cli/vendor/src/components/layout/index.ts +0 -4
- package/packages/cli/vendor/src/components/layout/public.ts +0 -4
- package/packages/cli/vendor/src/components/layout/sidebar-nav.tsx +45 -5
- package/packages/cli/vendor/src/components/modern/image-cropper.tsx +226 -0
- package/packages/cli/vendor/src/components/modern/index.ts +2 -3
- package/packages/cli/vendor/src/components/modern/rich-text-editor.tsx +170 -29
- package/packages/cli/vendor/src/components/navigation/demo.tsx +0 -3
- package/packages/cli/vendor/src/components/navigation/index.ts +0 -5
- package/packages/cli/vendor/src/components/overlay/confirm-dialog.tsx +84 -30
- package/packages/cli/vendor/src/components/overlay/index.ts +0 -3
- package/packages/cli/vendor/src/components/patterns/bulk-action-bar.tsx +53 -0
- package/packages/cli/vendor/src/components/patterns/data-view.tsx +64 -0
- package/packages/cli/vendor/src/components/patterns/detail-layout.tsx +75 -0
- package/packages/cli/vendor/src/components/patterns/empty-state.tsx +99 -0
- package/packages/cli/vendor/src/components/patterns/index.ts +7 -0
- package/packages/cli/vendor/src/components/patterns/page-toolbar.tsx +61 -0
- package/packages/cli/vendor/src/components/patterns/public.ts +7 -0
- package/packages/cli/vendor/src/components/patterns/resource-detail-page.tsx +59 -55
- package/packages/cli/vendor/src/components/patterns/resource-page.tsx +5 -5
- package/packages/cli/vendor/src/components/patterns/settings-page.tsx +84 -0
- package/packages/cli/vendor/src/components/theme-provider.tsx +36 -9
- package/packages/cli/vendor/src/components/ui/accordion/index.tsx +10 -28
- package/packages/cli/vendor/src/components/ui/badge/index.tsx +20 -29
- package/packages/cli/vendor/src/components/ui/button/index.tsx +19 -23
- package/packages/cli/vendor/src/components/ui/card/index.tsx +16 -21
- package/packages/cli/vendor/src/components/ui/checkbox/index.tsx +50 -28
- package/packages/cli/vendor/src/components/ui/command/index.tsx +1 -1
- package/packages/cli/vendor/src/components/ui/dialog/index.tsx +7 -13
- package/packages/cli/vendor/src/components/ui/dropdown-menu/index.tsx +14 -26
- package/packages/cli/vendor/src/components/ui/input/decorator.tsx +1 -1
- package/packages/cli/vendor/src/components/ui/input/group.tsx +2 -1
- package/packages/cli/vendor/src/components/ui/input/index.tsx +15 -19
- package/packages/cli/vendor/src/components/ui/input/money.tsx +1 -1
- package/packages/cli/vendor/src/components/ui/input/password.tsx +8 -8
- package/packages/cli/vendor/src/components/ui/input/quantity.tsx +1 -1
- package/packages/cli/vendor/src/components/ui/popover/index.tsx +5 -5
- package/packages/cli/vendor/src/components/ui/select/index.tsx +9 -13
- package/packages/cli/vendor/src/components/ui/tabs/index.tsx +3 -12
- package/packages/cli/vendor/src/components/upload/demo.tsx +0 -1
- package/packages/cli/vendor/src/components/upload/file-upload.tsx +16 -14
- package/packages/cli/vendor/src/components/upload/index.ts +0 -2
- package/packages/cli/vendor/src/index.ts +10 -10
- package/packages/cli/vendor/src/public-component-surface.ts +27 -13
- package/packages/cli/vendor/src/showcase/demo-snippets/actions/index.ts +6 -6
- package/packages/cli/vendor/src/showcase/fallback.tsx +20 -137
- package/packages/cli/vendor/src/showcase/package-meta.ts +2 -2
- package/packages/cli/vendor/src/showcase/premium/app-sidebar/mock.ts +29 -9
- package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +60 -17
- package/packages/cli/vendor/src/showcase/premium/carousel/showcase.tsx +2 -1
- package/packages/cli/vendor/src/showcase/premium/color-picker/index.ts +2 -0
- package/packages/cli/vendor/src/showcase/premium/color-picker/mock.ts +21 -0
- package/packages/cli/vendor/src/showcase/premium/color-picker/showcase.tsx +14 -0
- package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +2 -2
- package/packages/cli/vendor/src/showcase/premium/file-upload/mock.ts +7 -1
- package/packages/cli/vendor/src/showcase/premium/file-upload/showcase.tsx +33 -2
- package/packages/cli/vendor/src/showcase/premium/image-cropper/index.ts +2 -0
- package/packages/cli/vendor/src/showcase/premium/image-cropper/mock.ts +15 -0
- package/packages/cli/vendor/src/showcase/premium/image-cropper/showcase.tsx +14 -0
- package/packages/cli/vendor/src/showcase/premium/index.ts +28 -76
- package/packages/cli/vendor/src/showcase/premium/input/mock.ts +3 -2
- package/packages/cli/vendor/src/showcase/premium/input/showcase.tsx +67 -0
- package/packages/cli/vendor/src/showcase/premium/page-state/mock.ts +11 -8
- package/packages/cli/vendor/src/showcase/premium/page-state/showcase.tsx +24 -3
- package/packages/cli/vendor/src/showcase/premium/qr-code/index.ts +2 -0
- package/packages/cli/vendor/src/showcase/premium/qr-code/mock.ts +15 -0
- package/packages/cli/vendor/src/showcase/premium/qr-code/showcase.tsx +12 -0
- package/packages/cli/vendor/src/showcase/premium/rich-text-editor/index.ts +2 -0
- package/packages/cli/vendor/src/showcase/premium/rich-text-editor/mock.ts +15 -0
- package/packages/cli/vendor/src/showcase/premium/rich-text-editor/showcase.tsx +12 -0
- package/packages/cli/vendor/src/showcase/premium/signature-pad/index.ts +2 -0
- package/packages/cli/vendor/src/showcase/premium/signature-pad/mock.ts +20 -0
- package/packages/cli/vendor/src/showcase/premium/signature-pad/showcase.tsx +14 -0
- package/packages/cli/vendor/src/showcase/premium/statistic/mock.ts +2 -2
- package/packages/cli/vendor/src/showcase/premium/statistic/showcase.tsx +22 -7
- package/packages/cli/vendor/src/showcase/premium/tag/showcase.tsx +41 -10
- package/packages/cli/vendor/src/showcase/premium/typography/showcase.tsx +1 -1
- package/packages/cli/vendor/src/showcase/preview-catalog.tsx +2 -2
- package/packages/cli/vendor/src/showcase/preview-compositions.tsx +37 -0
- package/packages/cli/vendor/src/showcase/registry-quality.ts +8 -25
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +31 -132
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +37 -117
- package/packages/cli/vendor/src/showcase/site-data.tsx +70 -489
- package/packages/cli/vendor/src/showcase/tembro-registry.json +373 -347
- package/packages/cli/vendor/templates/styles/globals.css +793 -12
- package/registry.json +82 -39
- package/dist/components/actions/copy-field.cjs +0 -1
- package/dist/components/actions/copy-field.d.ts +0 -11
- package/dist/components/actions/copy-field.js +0 -1
- package/dist/components/charts/horizontal-bar-chart.cjs +0 -1
- package/dist/components/charts/horizontal-bar-chart.d.ts +0 -17
- package/dist/components/charts/horizontal-bar-chart.js +0 -1
- package/dist/components/charts/kpi.cjs +0 -1
- package/dist/components/charts/kpi.d.ts +0 -18
- package/dist/components/charts/kpi.js +0 -1
- package/dist/components/display/comparison-card.cjs +0 -1
- package/dist/components/display/comparison-card.d.ts +0 -15
- package/dist/components/display/comparison-card.js +0 -1
- package/dist/components/display/data-list.cjs +0 -1
- package/dist/components/display/data-list.d.ts +0 -25
- package/dist/components/display/data-list.js +0 -1
- package/dist/components/display/delta-badge.cjs +0 -1
- package/dist/components/display/delta-badge.d.ts +0 -10
- package/dist/components/display/delta-badge.js +0 -1
- package/dist/components/display/descriptions.cjs +0 -1
- package/dist/components/display/descriptions.d.ts +0 -19
- package/dist/components/display/descriptions.js +0 -1
- package/dist/components/display/metric-grid.cjs +0 -1
- package/dist/components/display/metric-grid.d.ts +0 -23
- package/dist/components/display/metric-grid.js +0 -1
- package/dist/components/display/progress-circle.cjs +0 -1
- package/dist/components/display/progress-circle.d.ts +0 -8
- package/dist/components/display/progress-circle.js +0 -1
- package/dist/components/display/property-grid.cjs +0 -1
- package/dist/components/display/property-grid.d.ts +0 -15
- package/dist/components/display/property-grid.js +0 -1
- package/dist/components/display/result.cjs +0 -1
- package/dist/components/display/result.d.ts +0 -18
- package/dist/components/display/result.js +0 -1
- package/dist/components/display/trend-card.cjs +0 -1
- package/dist/components/display/trend-card.d.ts +0 -13
- package/dist/components/display/trend-card.js +0 -1
- package/dist/components/display/user-card.cjs +0 -1
- package/dist/components/display/user-card.d.ts +0 -12
- package/dist/components/display/user-card.js +0 -1
- package/dist/components/layout/stat-card.cjs +0 -1
- package/dist/components/layout/stat-card.d.ts +0 -32
- package/dist/components/layout/stat-card.js +0 -1
- package/dist/components/modern/tour.cjs +0 -1
- package/dist/components/modern/tour.d.ts +0 -14
- package/dist/components/modern/tour.js +0 -1
- package/dist/components/navigation/anchor-nav.cjs +0 -1
- package/dist/components/navigation/anchor-nav.d.ts +0 -15
- package/dist/components/navigation/anchor-nav.js +0 -1
- package/dist/components/navigation/command-bar.cjs +0 -1
- package/dist/components/navigation/command-bar.d.ts +0 -10
- package/dist/components/navigation/command-bar.js +0 -1
- package/dist/components/navigation/nav-tabs.cjs +0 -1
- package/dist/components/navigation/nav-tabs.d.ts +0 -17
- package/dist/components/navigation/nav-tabs.js +0 -1
- package/dist/components/navigation/page-tabs.cjs +0 -1
- package/dist/components/navigation/page-tabs.d.ts +0 -18
- package/dist/components/navigation/page-tabs.js +0 -1
- package/dist/components/navigation/stepper-tabs.cjs +0 -1
- package/dist/components/navigation/stepper-tabs.d.ts +0 -19
- package/dist/components/navigation/stepper-tabs.js +0 -1
- package/dist/components/overlay/dialog-actions.cjs +0 -1
- package/dist/components/overlay/dialog-actions.d.ts +0 -14
- package/dist/components/overlay/dialog-actions.js +0 -1
- package/dist/components/overlay/modal-shell.cjs +0 -1
- package/dist/components/overlay/modal-shell.d.ts +0 -20
- package/dist/components/overlay/modal-shell.js +0 -1
- package/dist/components/overlay/sheet-shell.cjs +0 -1
- package/dist/components/overlay/sheet-shell.d.ts +0 -34
- package/dist/components/overlay/sheet-shell.js +0 -1
- package/dist/components/ui/hover-card.cjs +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -17
- package/dist/components/ui/hover-card.js +0 -1
- package/dist/components/ui/input-group/index.cjs +0 -1
- package/dist/components/ui/input-group/index.d.ts +0 -1
- package/dist/components/ui/input-group/index.js +0 -1
- package/dist/components/ui/input-primitive/index.cjs +0 -1
- package/dist/components/ui/input-primitive/index.d.ts +0 -2
- package/dist/components/ui/input-primitive/index.js +0 -1
- package/dist/components/upload/file-dropzone.cjs +0 -1
- package/dist/components/upload/file-dropzone.d.ts +0 -10
- package/dist/components/upload/file-dropzone.js +0 -1
- package/dist/showcase/premium/accordion/index.cjs +0 -1
- package/dist/showcase/premium/accordion/index.d.ts +0 -2
- package/dist/showcase/premium/accordion/index.js +0 -1
- package/dist/showcase/premium/accordion/mock.cjs +0 -1
- package/dist/showcase/premium/accordion/mock.d.ts +0 -2
- package/dist/showcase/premium/accordion/mock.js +0 -1
- package/dist/showcase/premium/accordion/showcase.cjs +0 -1
- package/dist/showcase/premium/accordion/showcase.d.ts +0 -2
- package/dist/showcase/premium/accordion/showcase.js +0 -1
- package/dist/showcase/premium/app-shell/index.cjs +0 -1
- package/dist/showcase/premium/app-shell/index.d.ts +0 -2
- package/dist/showcase/premium/app-shell/index.js +0 -1
- package/dist/showcase/premium/app-shell/mock.cjs +0 -1
- package/dist/showcase/premium/app-shell/mock.d.ts +0 -2
- package/dist/showcase/premium/app-shell/mock.js +0 -1
- package/dist/showcase/premium/app-shell/showcase.cjs +0 -1
- package/dist/showcase/premium/app-shell/showcase.d.ts +0 -3
- package/dist/showcase/premium/app-shell/showcase.js +0 -1
- package/dist/showcase/premium/clearable-input/index.cjs +0 -1
- package/dist/showcase/premium/clearable-input/index.d.ts +0 -2
- package/dist/showcase/premium/clearable-input/index.js +0 -1
- package/dist/showcase/premium/clearable-input/mock.cjs +0 -1
- package/dist/showcase/premium/clearable-input/mock.d.ts +0 -2
- package/dist/showcase/premium/clearable-input/mock.js +0 -1
- package/dist/showcase/premium/clearable-input/showcase.cjs +0 -1
- package/dist/showcase/premium/clearable-input/showcase.d.ts +0 -3
- package/dist/showcase/premium/clearable-input/showcase.js +0 -1
- package/dist/showcase/premium/combobox/index.cjs +0 -1
- package/dist/showcase/premium/combobox/index.d.ts +0 -2
- package/dist/showcase/premium/combobox/index.js +0 -1
- package/dist/showcase/premium/combobox/mock.cjs +0 -1
- package/dist/showcase/premium/combobox/mock.d.ts +0 -2
- package/dist/showcase/premium/combobox/mock.js +0 -1
- package/dist/showcase/premium/combobox/showcase.cjs +0 -1
- package/dist/showcase/premium/combobox/showcase.d.ts +0 -3
- package/dist/showcase/premium/combobox/showcase.js +0 -1
- package/dist/showcase/premium/command-bar/index.cjs +0 -1
- package/dist/showcase/premium/command-bar/index.d.ts +0 -2
- package/dist/showcase/premium/command-bar/index.js +0 -1
- package/dist/showcase/premium/command-bar/mock.cjs +0 -1
- package/dist/showcase/premium/command-bar/mock.d.ts +0 -2
- package/dist/showcase/premium/command-bar/mock.js +0 -1
- package/dist/showcase/premium/command-bar/showcase.cjs +0 -1
- package/dist/showcase/premium/command-bar/showcase.d.ts +0 -2
- package/dist/showcase/premium/command-bar/showcase.js +0 -1
- package/dist/showcase/premium/copy-field/index.cjs +0 -1
- package/dist/showcase/premium/copy-field/index.d.ts +0 -2
- package/dist/showcase/premium/copy-field/index.js +0 -1
- package/dist/showcase/premium/copy-field/mock.cjs +0 -1
- package/dist/showcase/premium/copy-field/mock.d.ts +0 -2
- package/dist/showcase/premium/copy-field/mock.js +0 -1
- package/dist/showcase/premium/copy-field/showcase.cjs +0 -1
- package/dist/showcase/premium/copy-field/showcase.d.ts +0 -2
- package/dist/showcase/premium/copy-field/showcase.js +0 -1
- package/dist/showcase/premium/data-table-parts/data.cjs +0 -1
- package/dist/showcase/premium/data-table-parts/data.d.ts +0 -27
- package/dist/showcase/premium/data-table-parts/data.js +0 -1
- package/dist/showcase/premium/data-table-parts/index.cjs +0 -1
- package/dist/showcase/premium/data-table-parts/index.d.ts +0 -2
- package/dist/showcase/premium/data-table-parts/index.js +0 -1
- package/dist/showcase/premium/data-table-parts/mock.cjs +0 -1
- package/dist/showcase/premium/data-table-parts/mock.d.ts +0 -7
- package/dist/showcase/premium/data-table-parts/mock.js +0 -1
- package/dist/showcase/premium/data-table-parts/showcase.cjs +0 -1
- package/dist/showcase/premium/data-table-parts/showcase.d.ts +0 -6
- package/dist/showcase/premium/data-table-parts/showcase.js +0 -1
- package/dist/showcase/premium/date-input/index.cjs +0 -1
- package/dist/showcase/premium/date-input/index.d.ts +0 -2
- package/dist/showcase/premium/date-input/index.js +0 -1
- package/dist/showcase/premium/date-input/mock.cjs +0 -1
- package/dist/showcase/premium/date-input/mock.d.ts +0 -2
- package/dist/showcase/premium/date-input/mock.js +0 -1
- package/dist/showcase/premium/date-input/showcase.cjs +0 -1
- package/dist/showcase/premium/date-input/showcase.d.ts +0 -2
- package/dist/showcase/premium/date-input/showcase.js +0 -1
- package/dist/showcase/premium/date-range-input/index.cjs +0 -1
- package/dist/showcase/premium/date-range-input/index.d.ts +0 -2
- package/dist/showcase/premium/date-range-input/index.js +0 -1
- package/dist/showcase/premium/date-range-input/mock.cjs +0 -1
- package/dist/showcase/premium/date-range-input/mock.d.ts +0 -2
- package/dist/showcase/premium/date-range-input/mock.js +0 -1
- package/dist/showcase/premium/date-range-input/showcase.cjs +0 -1
- package/dist/showcase/premium/date-range-input/showcase.d.ts +0 -2
- package/dist/showcase/premium/date-range-input/showcase.js +0 -1
- package/dist/showcase/premium/descriptions/index.cjs +0 -1
- package/dist/showcase/premium/descriptions/index.d.ts +0 -2
- package/dist/showcase/premium/descriptions/index.js +0 -1
- package/dist/showcase/premium/descriptions/mock.cjs +0 -1
- package/dist/showcase/premium/descriptions/mock.d.ts +0 -2
- package/dist/showcase/premium/descriptions/mock.js +0 -1
- package/dist/showcase/premium/descriptions/showcase.cjs +0 -1
- package/dist/showcase/premium/descriptions/showcase.d.ts +0 -2
- package/dist/showcase/premium/descriptions/showcase.js +0 -1
- package/dist/showcase/premium/hover-card/index.cjs +0 -1
- package/dist/showcase/premium/hover-card/index.d.ts +0 -2
- package/dist/showcase/premium/hover-card/index.js +0 -1
- package/dist/showcase/premium/hover-card/mock.cjs +0 -1
- package/dist/showcase/premium/hover-card/mock.d.ts +0 -2
- package/dist/showcase/premium/hover-card/mock.js +0 -1
- package/dist/showcase/premium/hover-card/showcase.cjs +0 -1
- package/dist/showcase/premium/hover-card/showcase.d.ts +0 -2
- package/dist/showcase/premium/hover-card/showcase.js +0 -1
- package/dist/showcase/premium/masked-input/index.cjs +0 -1
- package/dist/showcase/premium/masked-input/index.d.ts +0 -2
- package/dist/showcase/premium/masked-input/index.js +0 -1
- package/dist/showcase/premium/masked-input/mock.cjs +0 -1
- package/dist/showcase/premium/masked-input/mock.d.ts +0 -2
- package/dist/showcase/premium/masked-input/mock.js +0 -1
- package/dist/showcase/premium/masked-input/showcase.cjs +0 -1
- package/dist/showcase/premium/masked-input/showcase.d.ts +0 -2
- package/dist/showcase/premium/masked-input/showcase.js +0 -1
- package/dist/showcase/premium/metric-grid/index.cjs +0 -1
- package/dist/showcase/premium/metric-grid/index.d.ts +0 -2
- package/dist/showcase/premium/metric-grid/index.js +0 -1
- package/dist/showcase/premium/metric-grid/mock.cjs +0 -1
- package/dist/showcase/premium/metric-grid/mock.d.ts +0 -2
- package/dist/showcase/premium/metric-grid/mock.js +0 -1
- package/dist/showcase/premium/metric-grid/showcase.cjs +0 -1
- package/dist/showcase/premium/metric-grid/showcase.d.ts +0 -3
- package/dist/showcase/premium/metric-grid/showcase.js +0 -1
- package/dist/showcase/premium/modal-shell/index.cjs +0 -1
- package/dist/showcase/premium/modal-shell/index.d.ts +0 -2
- package/dist/showcase/premium/modal-shell/index.js +0 -1
- package/dist/showcase/premium/modal-shell/mock.cjs +0 -1
- package/dist/showcase/premium/modal-shell/mock.d.ts +0 -2
- package/dist/showcase/premium/modal-shell/mock.js +0 -1
- package/dist/showcase/premium/modal-shell/showcase.cjs +0 -1
- package/dist/showcase/premium/modal-shell/showcase.d.ts +0 -3
- package/dist/showcase/premium/modal-shell/showcase.js +0 -1
- package/dist/showcase/premium/money-input/index.cjs +0 -1
- package/dist/showcase/premium/money-input/index.d.ts +0 -2
- package/dist/showcase/premium/money-input/index.js +0 -1
- package/dist/showcase/premium/money-input/mock.cjs +0 -1
- package/dist/showcase/premium/money-input/mock.d.ts +0 -2
- package/dist/showcase/premium/money-input/mock.js +0 -1
- package/dist/showcase/premium/money-input/showcase.cjs +0 -1
- package/dist/showcase/premium/money-input/showcase.d.ts +0 -1
- package/dist/showcase/premium/money-input/showcase.js +0 -1
- package/dist/showcase/premium/number-input/index.cjs +0 -1
- package/dist/showcase/premium/number-input/index.d.ts +0 -2
- package/dist/showcase/premium/number-input/index.js +0 -1
- package/dist/showcase/premium/number-input/mock.cjs +0 -1
- package/dist/showcase/premium/number-input/mock.d.ts +0 -2
- package/dist/showcase/premium/number-input/mock.js +0 -1
- package/dist/showcase/premium/number-input/showcase.cjs +0 -1
- package/dist/showcase/premium/number-input/showcase.d.ts +0 -1
- package/dist/showcase/premium/number-input/showcase.js +0 -1
- package/dist/showcase/premium/page-container/index.cjs +0 -1
- package/dist/showcase/premium/page-container/index.d.ts +0 -2
- package/dist/showcase/premium/page-container/index.js +0 -1
- package/dist/showcase/premium/page-container/mock.cjs +0 -1
- package/dist/showcase/premium/page-container/mock.d.ts +0 -2
- package/dist/showcase/premium/page-container/mock.js +0 -1
- package/dist/showcase/premium/page-container/showcase.cjs +0 -1
- package/dist/showcase/premium/page-container/showcase.d.ts +0 -3
- package/dist/showcase/premium/page-container/showcase.js +0 -1
- package/dist/showcase/premium/page-header/index.cjs +0 -1
- package/dist/showcase/premium/page-header/index.d.ts +0 -2
- package/dist/showcase/premium/page-header/index.js +0 -1
- package/dist/showcase/premium/page-header/mock.cjs +0 -1
- package/dist/showcase/premium/page-header/mock.d.ts +0 -2
- package/dist/showcase/premium/page-header/mock.js +0 -1
- package/dist/showcase/premium/page-header/showcase.cjs +0 -1
- package/dist/showcase/premium/page-header/showcase.d.ts +0 -3
- package/dist/showcase/premium/page-header/showcase.js +0 -1
- package/dist/showcase/premium/page-tabs/index.cjs +0 -1
- package/dist/showcase/premium/page-tabs/index.d.ts +0 -2
- package/dist/showcase/premium/page-tabs/index.js +0 -1
- package/dist/showcase/premium/page-tabs/mock.cjs +0 -1
- package/dist/showcase/premium/page-tabs/mock.d.ts +0 -2
- package/dist/showcase/premium/page-tabs/mock.js +0 -1
- package/dist/showcase/premium/page-tabs/showcase.cjs +0 -1
- package/dist/showcase/premium/page-tabs/showcase.d.ts +0 -3
- package/dist/showcase/premium/page-tabs/showcase.js +0 -1
- package/dist/showcase/premium/password-input/index.cjs +0 -1
- package/dist/showcase/premium/password-input/index.d.ts +0 -2
- package/dist/showcase/premium/password-input/index.js +0 -1
- package/dist/showcase/premium/password-input/mock.cjs +0 -1
- package/dist/showcase/premium/password-input/mock.d.ts +0 -2
- package/dist/showcase/premium/password-input/mock.js +0 -1
- package/dist/showcase/premium/password-input/showcase.cjs +0 -1
- package/dist/showcase/premium/password-input/showcase.d.ts +0 -3
- package/dist/showcase/premium/password-input/showcase.js +0 -1
- package/dist/showcase/premium/phone-input/index.cjs +0 -1
- package/dist/showcase/premium/phone-input/index.d.ts +0 -2
- package/dist/showcase/premium/phone-input/index.js +0 -1
- package/dist/showcase/premium/phone-input/mock.cjs +0 -1
- package/dist/showcase/premium/phone-input/mock.d.ts +0 -2
- package/dist/showcase/premium/phone-input/mock.js +0 -1
- package/dist/showcase/premium/phone-input/showcase.cjs +0 -1
- package/dist/showcase/premium/phone-input/showcase.d.ts +0 -2
- package/dist/showcase/premium/phone-input/showcase.js +0 -1
- package/dist/showcase/premium/property-grid/index.cjs +0 -1
- package/dist/showcase/premium/property-grid/index.d.ts +0 -2
- package/dist/showcase/premium/property-grid/index.js +0 -1
- package/dist/showcase/premium/property-grid/mock.cjs +0 -1
- package/dist/showcase/premium/property-grid/mock.d.ts +0 -2
- package/dist/showcase/premium/property-grid/mock.js +0 -1
- package/dist/showcase/premium/property-grid/showcase.cjs +0 -1
- package/dist/showcase/premium/property-grid/showcase.d.ts +0 -1
- package/dist/showcase/premium/property-grid/showcase.js +0 -1
- package/dist/showcase/premium/quantity-input/index.cjs +0 -1
- package/dist/showcase/premium/quantity-input/index.d.ts +0 -2
- package/dist/showcase/premium/quantity-input/index.js +0 -1
- package/dist/showcase/premium/quantity-input/mock.cjs +0 -1
- package/dist/showcase/premium/quantity-input/mock.d.ts +0 -2
- package/dist/showcase/premium/quantity-input/mock.js +0 -1
- package/dist/showcase/premium/quantity-input/showcase.cjs +0 -1
- package/dist/showcase/premium/quantity-input/showcase.d.ts +0 -1
- package/dist/showcase/premium/quantity-input/showcase.js +0 -1
- package/dist/showcase/premium/result/index.cjs +0 -1
- package/dist/showcase/premium/result/index.d.ts +0 -2
- package/dist/showcase/premium/result/index.js +0 -1
- package/dist/showcase/premium/result/mock.cjs +0 -1
- package/dist/showcase/premium/result/mock.d.ts +0 -2
- package/dist/showcase/premium/result/mock.js +0 -1
- package/dist/showcase/premium/result/showcase.cjs +0 -1
- package/dist/showcase/premium/result/showcase.d.ts +0 -3
- package/dist/showcase/premium/result/showcase.js +0 -1
- package/dist/showcase/premium/search-input/index.cjs +0 -1
- package/dist/showcase/premium/search-input/index.d.ts +0 -2
- package/dist/showcase/premium/search-input/index.js +0 -1
- package/dist/showcase/premium/search-input/mock.cjs +0 -1
- package/dist/showcase/premium/search-input/mock.d.ts +0 -2
- package/dist/showcase/premium/search-input/mock.js +0 -1
- package/dist/showcase/premium/search-input/showcase.cjs +0 -1
- package/dist/showcase/premium/search-input/showcase.d.ts +0 -3
- package/dist/showcase/premium/search-input/showcase.js +0 -1
- package/dist/showcase/premium/sheet-shell/index.cjs +0 -1
- package/dist/showcase/premium/sheet-shell/index.d.ts +0 -2
- package/dist/showcase/premium/sheet-shell/index.js +0 -1
- package/dist/showcase/premium/sheet-shell/mock.cjs +0 -1
- package/dist/showcase/premium/sheet-shell/mock.d.ts +0 -2
- package/dist/showcase/premium/sheet-shell/mock.js +0 -1
- package/dist/showcase/premium/sheet-shell/showcase.cjs +0 -1
- package/dist/showcase/premium/sheet-shell/showcase.d.ts +0 -2
- package/dist/showcase/premium/sheet-shell/showcase.js +0 -1
- package/dist/showcase/premium/sidebar-nav/index.cjs +0 -1
- package/dist/showcase/premium/sidebar-nav/index.d.ts +0 -2
- package/dist/showcase/premium/sidebar-nav/index.js +0 -1
- package/dist/showcase/premium/sidebar-nav/mock.cjs +0 -1
- package/dist/showcase/premium/sidebar-nav/mock.d.ts +0 -2
- package/dist/showcase/premium/sidebar-nav/mock.js +0 -1
- package/dist/showcase/premium/sidebar-nav/showcase.cjs +0 -1
- package/dist/showcase/premium/sidebar-nav/showcase.d.ts +0 -3
- package/dist/showcase/premium/sidebar-nav/showcase.js +0 -1
- package/dist/showcase/premium/simple-select/index.cjs +0 -1
- package/dist/showcase/premium/simple-select/index.d.ts +0 -2
- package/dist/showcase/premium/simple-select/index.js +0 -1
- package/dist/showcase/premium/simple-select/mock.cjs +0 -1
- package/dist/showcase/premium/simple-select/mock.d.ts +0 -2
- package/dist/showcase/premium/simple-select/mock.js +0 -1
- package/dist/showcase/premium/simple-select/showcase.cjs +0 -1
- package/dist/showcase/premium/simple-select/showcase.d.ts +0 -2
- package/dist/showcase/premium/simple-select/showcase.js +0 -1
- package/dist/showcase/premium/sticky-footer-bar/index.cjs +0 -1
- package/dist/showcase/premium/sticky-footer-bar/index.d.ts +0 -2
- package/dist/showcase/premium/sticky-footer-bar/index.js +0 -1
- package/dist/showcase/premium/sticky-footer-bar/mock.cjs +0 -1
- package/dist/showcase/premium/sticky-footer-bar/mock.d.ts +0 -2
- package/dist/showcase/premium/sticky-footer-bar/mock.js +0 -1
- package/dist/showcase/premium/sticky-footer-bar/showcase.cjs +0 -1
- package/dist/showcase/premium/sticky-footer-bar/showcase.d.ts +0 -1
- package/dist/showcase/premium/sticky-footer-bar/showcase.js +0 -1
- package/dist/src/components/actions/copy-field.cjs +0 -1
- package/dist/src/components/actions/copy-field.js +0 -35
- package/dist/src/components/charts/horizontal-bar-chart.cjs +0 -1
- package/dist/src/components/charts/horizontal-bar-chart.js +0 -50
- package/dist/src/components/charts/kpi.cjs +0 -1
- package/dist/src/components/charts/kpi.js +0 -59
- package/dist/src/components/display/comparison-card.cjs +0 -1
- package/dist/src/components/display/comparison-card.js +0 -20
- package/dist/src/components/display/data-list.cjs +0 -1
- package/dist/src/components/display/data-list.js +0 -68
- package/dist/src/components/display/delta-badge.cjs +0 -1
- package/dist/src/components/display/delta-badge.js +0 -20
- package/dist/src/components/display/descriptions.cjs +0 -1
- package/dist/src/components/display/descriptions.js +0 -38
- package/dist/src/components/display/metric-grid.cjs +0 -1
- package/dist/src/components/display/metric-grid.js +0 -58
- package/dist/src/components/display/progress-circle.cjs +0 -1
- package/dist/src/components/display/progress-circle.js +0 -21
- package/dist/src/components/display/property-grid.cjs +0 -1
- package/dist/src/components/display/property-grid.js +0 -31
- package/dist/src/components/display/result.cjs +0 -1
- package/dist/src/components/display/result.js +0 -71
- package/dist/src/components/display/trend-card.cjs +0 -1
- package/dist/src/components/display/trend-card.js +0 -48
- package/dist/src/components/display/user-card.cjs +0 -1
- package/dist/src/components/display/user-card.js +0 -42
- package/dist/src/components/layout/stat-card.cjs +0 -1
- package/dist/src/components/layout/stat-card.js +0 -113
- package/dist/src/components/modern/tour.cjs +0 -1
- package/dist/src/components/modern/tour.js +0 -44
- package/dist/src/components/navigation/anchor-nav.cjs +0 -1
- package/dist/src/components/navigation/anchor-nav.js +0 -26
- package/dist/src/components/navigation/command-bar.cjs +0 -1
- package/dist/src/components/navigation/command-bar.js +0 -17
- package/dist/src/components/navigation/nav-tabs.cjs +0 -1
- package/dist/src/components/navigation/nav-tabs.js +0 -51
- package/dist/src/components/navigation/page-tabs.cjs +0 -1
- package/dist/src/components/navigation/page-tabs.js +0 -50
- package/dist/src/components/navigation/stepper-tabs.cjs +0 -1
- package/dist/src/components/navigation/stepper-tabs.js +0 -41
- package/dist/src/components/overlay/dialog-actions.cjs +0 -1
- package/dist/src/components/overlay/dialog-actions.js +0 -33
- package/dist/src/components/overlay/modal-shell.cjs +0 -1
- package/dist/src/components/overlay/modal-shell.js +0 -44
- package/dist/src/components/overlay/sheet-shell.cjs +0 -1
- package/dist/src/components/overlay/sheet-shell.js +0 -116
- package/dist/src/components/ui/hover-card.cjs +0 -1
- package/dist/src/components/ui/hover-card.js +0 -37
- package/dist/src/components/ui/input-group/index.cjs +0 -1
- package/dist/src/components/ui/input-group/index.js +0 -2
- package/dist/src/components/ui/input-primitive/index.cjs +0 -1
- package/dist/src/components/ui/input-primitive/index.js +0 -2
- package/dist/src/components/upload/file-dropzone.cjs +0 -1
- package/dist/src/components/upload/file-dropzone.js +0 -36
- package/dist/src/showcase/premium/accordion/index.js +0 -3
- package/dist/src/showcase/premium/accordion/mock.cjs +0 -23
- package/dist/src/showcase/premium/accordion/mock.js +0 -28
- package/dist/src/showcase/premium/accordion/showcase.cjs +0 -1
- package/dist/src/showcase/premium/accordion/showcase.js +0 -172
- package/dist/src/showcase/premium/app-shell/index.cjs +0 -1
- package/dist/src/showcase/premium/app-shell/index.js +0 -3
- package/dist/src/showcase/premium/app-shell/mock.cjs +0 -48
- package/dist/src/showcase/premium/app-shell/mock.js +0 -38
- package/dist/src/showcase/premium/app-shell/showcase.cjs +0 -1
- package/dist/src/showcase/premium/app-shell/showcase.js +0 -208
- package/dist/src/showcase/premium/clearable-input/index.cjs +0 -1
- package/dist/src/showcase/premium/clearable-input/index.js +0 -3
- package/dist/src/showcase/premium/clearable-input/mock.cjs +0 -16
- package/dist/src/showcase/premium/clearable-input/mock.js +0 -32
- package/dist/src/showcase/premium/clearable-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/clearable-input/showcase.js +0 -94
- package/dist/src/showcase/premium/combobox/index.cjs +0 -1
- package/dist/src/showcase/premium/combobox/index.js +0 -3
- package/dist/src/showcase/premium/combobox/mock.cjs +0 -29
- package/dist/src/showcase/premium/combobox/mock.js +0 -39
- package/dist/src/showcase/premium/combobox/showcase.cjs +0 -1
- package/dist/src/showcase/premium/combobox/showcase.js +0 -157
- package/dist/src/showcase/premium/command-bar/index.js +0 -3
- package/dist/src/showcase/premium/command-bar/mock.cjs +0 -11
- package/dist/src/showcase/premium/command-bar/mock.js +0 -26
- package/dist/src/showcase/premium/command-bar/showcase.cjs +0 -1
- package/dist/src/showcase/premium/command-bar/showcase.js +0 -107
- package/dist/src/showcase/premium/copy-field/index.js +0 -3
- package/dist/src/showcase/premium/copy-field/mock.cjs +0 -11
- package/dist/src/showcase/premium/copy-field/mock.js +0 -26
- package/dist/src/showcase/premium/copy-field/showcase.cjs +0 -1
- package/dist/src/showcase/premium/copy-field/showcase.js +0 -85
- package/dist/src/showcase/premium/data-table-parts/data.cjs +0 -1
- package/dist/src/showcase/premium/data-table-parts/data.js +0 -127
- package/dist/src/showcase/premium/data-table-parts/index.cjs +0 -1
- package/dist/src/showcase/premium/data-table-parts/index.js +0 -3
- package/dist/src/showcase/premium/data-table-parts/mock.cjs +0 -1
- package/dist/src/showcase/premium/data-table-parts/mock.js +0 -30
- package/dist/src/showcase/premium/data-table-parts/showcase.cjs +0 -1
- package/dist/src/showcase/premium/data-table-parts/showcase.js +0 -256
- package/dist/src/showcase/premium/date-input/index.cjs +0 -1
- package/dist/src/showcase/premium/date-input/index.js +0 -3
- package/dist/src/showcase/premium/date-input/mock.cjs +0 -17
- package/dist/src/showcase/premium/date-input/mock.js +0 -43
- package/dist/src/showcase/premium/date-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/date-input/showcase.js +0 -29
- package/dist/src/showcase/premium/date-range-input/index.cjs +0 -1
- package/dist/src/showcase/premium/date-range-input/index.js +0 -3
- package/dist/src/showcase/premium/date-range-input/mock.cjs +0 -17
- package/dist/src/showcase/premium/date-range-input/mock.js +0 -43
- package/dist/src/showcase/premium/date-range-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/date-range-input/showcase.js +0 -40
- package/dist/src/showcase/premium/descriptions/index.js +0 -3
- package/dist/src/showcase/premium/descriptions/mock.cjs +0 -16
- package/dist/src/showcase/premium/descriptions/mock.js +0 -19
- package/dist/src/showcase/premium/descriptions/showcase.cjs +0 -1
- package/dist/src/showcase/premium/descriptions/showcase.js +0 -85
- package/dist/src/showcase/premium/hover-card/index.cjs +0 -1
- package/dist/src/showcase/premium/hover-card/index.js +0 -3
- package/dist/src/showcase/premium/hover-card/mock.cjs +0 -10
- package/dist/src/showcase/premium/hover-card/mock.js +0 -39
- package/dist/src/showcase/premium/hover-card/showcase.cjs +0 -1
- package/dist/src/showcase/premium/hover-card/showcase.js +0 -123
- package/dist/src/showcase/premium/masked-input/index.cjs +0 -1
- package/dist/src/showcase/premium/masked-input/index.js +0 -3
- package/dist/src/showcase/premium/masked-input/mock.cjs +0 -17
- package/dist/src/showcase/premium/masked-input/mock.js +0 -43
- package/dist/src/showcase/premium/masked-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/masked-input/showcase.js +0 -33
- package/dist/src/showcase/premium/metric-grid/index.cjs +0 -1
- package/dist/src/showcase/premium/metric-grid/index.js +0 -3
- package/dist/src/showcase/premium/metric-grid/mock.cjs +0 -11
- package/dist/src/showcase/premium/metric-grid/mock.js +0 -36
- package/dist/src/showcase/premium/metric-grid/showcase.cjs +0 -1
- package/dist/src/showcase/premium/metric-grid/showcase.js +0 -133
- package/dist/src/showcase/premium/modal-shell/index.cjs +0 -1
- package/dist/src/showcase/premium/modal-shell/index.js +0 -3
- package/dist/src/showcase/premium/modal-shell/mock.cjs +0 -30
- package/dist/src/showcase/premium/modal-shell/mock.js +0 -43
- package/dist/src/showcase/premium/modal-shell/showcase.cjs +0 -1
- package/dist/src/showcase/premium/modal-shell/showcase.js +0 -148
- package/dist/src/showcase/premium/money-input/index.cjs +0 -1
- package/dist/src/showcase/premium/money-input/index.js +0 -3
- package/dist/src/showcase/premium/money-input/mock.cjs +0 -28
- package/dist/src/showcase/premium/money-input/mock.js +0 -43
- package/dist/src/showcase/premium/money-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/money-input/showcase.js +0 -21
- package/dist/src/showcase/premium/number-input/index.cjs +0 -1
- package/dist/src/showcase/premium/number-input/index.js +0 -3
- package/dist/src/showcase/premium/number-input/mock.cjs +0 -32
- package/dist/src/showcase/premium/number-input/mock.js +0 -43
- package/dist/src/showcase/premium/number-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/number-input/showcase.js +0 -23
- package/dist/src/showcase/premium/page-container/index.cjs +0 -1
- package/dist/src/showcase/premium/page-container/index.js +0 -3
- package/dist/src/showcase/premium/page-container/mock.cjs +0 -9
- package/dist/src/showcase/premium/page-container/mock.js +0 -31
- package/dist/src/showcase/premium/page-container/showcase.cjs +0 -1
- package/dist/src/showcase/premium/page-container/showcase.js +0 -79
- package/dist/src/showcase/premium/page-header/index.cjs +0 -1
- package/dist/src/showcase/premium/page-header/index.js +0 -3
- package/dist/src/showcase/premium/page-header/mock.cjs +0 -14
- package/dist/src/showcase/premium/page-header/mock.js +0 -36
- package/dist/src/showcase/premium/page-header/showcase.cjs +0 -1
- package/dist/src/showcase/premium/page-header/showcase.js +0 -70
- package/dist/src/showcase/premium/page-tabs/index.cjs +0 -1
- package/dist/src/showcase/premium/page-tabs/index.js +0 -3
- package/dist/src/showcase/premium/page-tabs/mock.cjs +0 -18
- package/dist/src/showcase/premium/page-tabs/mock.js +0 -31
- package/dist/src/showcase/premium/page-tabs/showcase.cjs +0 -1
- package/dist/src/showcase/premium/page-tabs/showcase.js +0 -121
- package/dist/src/showcase/premium/password-input/index.cjs +0 -1
- package/dist/src/showcase/premium/password-input/index.js +0 -3
- package/dist/src/showcase/premium/password-input/mock.cjs +0 -16
- package/dist/src/showcase/premium/password-input/mock.js +0 -31
- package/dist/src/showcase/premium/password-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/password-input/showcase.js +0 -104
- package/dist/src/showcase/premium/phone-input/index.cjs +0 -1
- package/dist/src/showcase/premium/phone-input/index.js +0 -3
- package/dist/src/showcase/premium/phone-input/mock.cjs +0 -17
- package/dist/src/showcase/premium/phone-input/mock.js +0 -43
- package/dist/src/showcase/premium/phone-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/phone-input/showcase.js +0 -33
- package/dist/src/showcase/premium/property-grid/index.cjs +0 -1
- package/dist/src/showcase/premium/property-grid/index.js +0 -3
- package/dist/src/showcase/premium/property-grid/mock.cjs +0 -14
- package/dist/src/showcase/premium/property-grid/mock.js +0 -26
- package/dist/src/showcase/premium/property-grid/showcase.cjs +0 -1
- package/dist/src/showcase/premium/property-grid/showcase.js +0 -93
- package/dist/src/showcase/premium/quantity-input/index.cjs +0 -1
- package/dist/src/showcase/premium/quantity-input/index.js +0 -3
- package/dist/src/showcase/premium/quantity-input/mock.cjs +0 -29
- package/dist/src/showcase/premium/quantity-input/mock.js +0 -43
- package/dist/src/showcase/premium/quantity-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/quantity-input/showcase.js +0 -23
- package/dist/src/showcase/premium/result/index.cjs +0 -1
- package/dist/src/showcase/premium/result/index.js +0 -3
- package/dist/src/showcase/premium/result/mock.cjs +0 -12
- package/dist/src/showcase/premium/result/mock.js +0 -31
- package/dist/src/showcase/premium/result/showcase.cjs +0 -1
- package/dist/src/showcase/premium/result/showcase.js +0 -98
- package/dist/src/showcase/premium/search-input/index.cjs +0 -1
- package/dist/src/showcase/premium/search-input/index.js +0 -3
- package/dist/src/showcase/premium/search-input/mock.cjs +0 -18
- package/dist/src/showcase/premium/search-input/mock.js +0 -31
- package/dist/src/showcase/premium/search-input/showcase.cjs +0 -1
- package/dist/src/showcase/premium/search-input/showcase.js +0 -113
- package/dist/src/showcase/premium/sheet-shell/index.cjs +0 -1
- package/dist/src/showcase/premium/sheet-shell/index.js +0 -3
- package/dist/src/showcase/premium/sheet-shell/mock.cjs +0 -34
- package/dist/src/showcase/premium/sheet-shell/mock.js +0 -43
- package/dist/src/showcase/premium/sheet-shell/showcase.cjs +0 -1
- package/dist/src/showcase/premium/sheet-shell/showcase.js +0 -137
- package/dist/src/showcase/premium/sidebar-nav/index.cjs +0 -1
- package/dist/src/showcase/premium/sidebar-nav/index.js +0 -3
- package/dist/src/showcase/premium/sidebar-nav/mock.cjs +0 -11
- package/dist/src/showcase/premium/sidebar-nav/mock.js +0 -32
- package/dist/src/showcase/premium/sidebar-nav/showcase.cjs +0 -1
- package/dist/src/showcase/premium/sidebar-nav/showcase.js +0 -113
- package/dist/src/showcase/premium/simple-select/index.cjs +0 -1
- package/dist/src/showcase/premium/simple-select/index.js +0 -3
- package/dist/src/showcase/premium/simple-select/mock.cjs +0 -29
- package/dist/src/showcase/premium/simple-select/mock.js +0 -43
- package/dist/src/showcase/premium/simple-select/showcase.cjs +0 -1
- package/dist/src/showcase/premium/simple-select/showcase.js +0 -114
- package/dist/src/showcase/premium/sticky-footer-bar/index.cjs +0 -1
- package/dist/src/showcase/premium/sticky-footer-bar/index.js +0 -3
- package/dist/src/showcase/premium/sticky-footer-bar/mock.cjs +0 -15
- package/dist/src/showcase/premium/sticky-footer-bar/mock.js +0 -19
- package/dist/src/showcase/premium/sticky-footer-bar/showcase.cjs +0 -1
- package/dist/src/showcase/premium/sticky-footer-bar/showcase.js +0 -37
- package/packages/cli/vendor/src/components/actions/copy-field.tsx +0 -31
- package/packages/cli/vendor/src/components/charts/horizontal-bar-chart.tsx +0 -60
- package/packages/cli/vendor/src/components/charts/kpi.tsx +0 -68
- package/packages/cli/vendor/src/components/display/comparison-card.tsx +0 -35
- package/packages/cli/vendor/src/components/display/data-list.tsx +0 -97
- package/packages/cli/vendor/src/components/display/delta-badge.tsx +0 -42
- package/packages/cli/vendor/src/components/display/descriptions.tsx +0 -83
- package/packages/cli/vendor/src/components/display/metric-grid.tsx +0 -89
- package/packages/cli/vendor/src/components/display/progress-circle.tsx +0 -24
- package/packages/cli/vendor/src/components/display/property-grid.tsx +0 -54
- package/packages/cli/vendor/src/components/display/result.tsx +0 -90
- package/packages/cli/vendor/src/components/display/trend-card.tsx +0 -57
- package/packages/cli/vendor/src/components/display/user-card.tsx +0 -30
- package/packages/cli/vendor/src/components/layout/stat-card.tsx +0 -165
- package/packages/cli/vendor/src/components/modern/tour.tsx +0 -72
- package/packages/cli/vendor/src/components/navigation/anchor-nav.tsx +0 -44
- package/packages/cli/vendor/src/components/navigation/command-bar.tsx +0 -40
- package/packages/cli/vendor/src/components/navigation/nav-tabs.tsx +0 -69
- package/packages/cli/vendor/src/components/navigation/page-tabs.tsx +0 -94
- package/packages/cli/vendor/src/components/navigation/stepper-tabs.tsx +0 -67
- package/packages/cli/vendor/src/components/overlay/dialog-actions.tsx +0 -68
- package/packages/cli/vendor/src/components/overlay/modal-shell.tsx +0 -93
- package/packages/cli/vendor/src/components/overlay/sheet-shell.tsx +0 -212
- package/packages/cli/vendor/src/components/ui/hover-card.tsx +0 -78
- package/packages/cli/vendor/src/components/ui/input-group/index.tsx +0 -8
- package/packages/cli/vendor/src/components/ui/input-primitive/index.tsx +0 -2
- package/packages/cli/vendor/src/components/upload/file-dropzone.tsx +0 -38
- package/packages/cli/vendor/src/showcase/premium/accordion/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/accordion/mock.ts +0 -43
- package/packages/cli/vendor/src/showcase/premium/accordion/showcase.tsx +0 -138
- package/packages/cli/vendor/src/showcase/premium/app-shell/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/app-shell/mock.ts +0 -66
- package/packages/cli/vendor/src/showcase/premium/app-shell/showcase.tsx +0 -114
- package/packages/cli/vendor/src/showcase/premium/clearable-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/clearable-input/mock.ts +0 -32
- package/packages/cli/vendor/src/showcase/premium/clearable-input/showcase.tsx +0 -63
- package/packages/cli/vendor/src/showcase/premium/combobox/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/combobox/mock.ts +0 -48
- package/packages/cli/vendor/src/showcase/premium/combobox/showcase.tsx +0 -92
- package/packages/cli/vendor/src/showcase/premium/command-bar/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/command-bar/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/command-bar/showcase.tsx +0 -69
- package/packages/cli/vendor/src/showcase/premium/copy-field/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/copy-field/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/copy-field/showcase.tsx +0 -64
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/data.ts +0 -90
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/index.ts +0 -9
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/mock.ts +0 -63
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +0 -218
- package/packages/cli/vendor/src/showcase/premium/date-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/date-input/mock.ts +0 -37
- package/packages/cli/vendor/src/showcase/premium/date-input/showcase.tsx +0 -24
- package/packages/cli/vendor/src/showcase/premium/date-range-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/date-range-input/mock.ts +0 -37
- package/packages/cli/vendor/src/showcase/premium/date-range-input/showcase.tsx +0 -24
- package/packages/cli/vendor/src/showcase/premium/descriptions/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/descriptions/mock.ts +0 -31
- package/packages/cli/vendor/src/showcase/premium/descriptions/showcase.tsx +0 -45
- package/packages/cli/vendor/src/showcase/premium/hover-card/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/hover-card/mock.ts +0 -30
- package/packages/cli/vendor/src/showcase/premium/hover-card/showcase.tsx +0 -59
- package/packages/cli/vendor/src/showcase/premium/masked-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/masked-input/mock.ts +0 -42
- package/packages/cli/vendor/src/showcase/premium/masked-input/showcase.tsx +0 -25
- package/packages/cli/vendor/src/showcase/premium/metric-grid/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/metric-grid/mock.ts +0 -28
- package/packages/cli/vendor/src/showcase/premium/metric-grid/showcase.tsx +0 -70
- package/packages/cli/vendor/src/showcase/premium/modal-shell/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/modal-shell/mock.ts +0 -55
- package/packages/cli/vendor/src/showcase/premium/modal-shell/showcase.tsx +0 -93
- package/packages/cli/vendor/src/showcase/premium/money-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/money-input/mock.ts +0 -48
- package/packages/cli/vendor/src/showcase/premium/money-input/showcase.tsx +0 -21
- package/packages/cli/vendor/src/showcase/premium/number-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/number-input/mock.ts +0 -52
- package/packages/cli/vendor/src/showcase/premium/number-input/showcase.tsx +0 -14
- package/packages/cli/vendor/src/showcase/premium/page-container/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/page-container/mock.ts +0 -25
- package/packages/cli/vendor/src/showcase/premium/page-container/showcase.tsx +0 -50
- package/packages/cli/vendor/src/showcase/premium/page-header/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/page-header/mock.ts +0 -31
- package/packages/cli/vendor/src/showcase/premium/page-header/showcase.tsx +0 -44
- package/packages/cli/vendor/src/showcase/premium/page-tabs/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/page-tabs/mock.ts +0 -33
- package/packages/cli/vendor/src/showcase/premium/page-tabs/showcase.tsx +0 -67
- package/packages/cli/vendor/src/showcase/premium/password-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/password-input/mock.ts +0 -31
- package/packages/cli/vendor/src/showcase/premium/password-input/showcase.tsx +0 -74
- package/packages/cli/vendor/src/showcase/premium/phone-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/phone-input/mock.ts +0 -37
- package/packages/cli/vendor/src/showcase/premium/phone-input/showcase.tsx +0 -27
- package/packages/cli/vendor/src/showcase/premium/property-grid/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/property-grid/mock.ts +0 -29
- package/packages/cli/vendor/src/showcase/premium/property-grid/showcase.tsx +0 -48
- package/packages/cli/vendor/src/showcase/premium/quantity-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/quantity-input/mock.ts +0 -49
- package/packages/cli/vendor/src/showcase/premium/quantity-input/showcase.tsx +0 -21
- package/packages/cli/vendor/src/showcase/premium/result/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/result/mock.ts +0 -28
- package/packages/cli/vendor/src/showcase/premium/result/showcase.tsx +0 -67
- package/packages/cli/vendor/src/showcase/premium/search-input/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/search-input/mock.ts +0 -33
- package/packages/cli/vendor/src/showcase/premium/search-input/showcase.tsx +0 -85
- package/packages/cli/vendor/src/showcase/premium/sheet-shell/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/sheet-shell/mock.ts +0 -59
- package/packages/cli/vendor/src/showcase/premium/sheet-shell/showcase.tsx +0 -87
- package/packages/cli/vendor/src/showcase/premium/sidebar-nav/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/sidebar-nav/mock.ts +0 -28
- package/packages/cli/vendor/src/showcase/premium/sidebar-nav/showcase.tsx +0 -78
- package/packages/cli/vendor/src/showcase/premium/simple-select/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/simple-select/mock.ts +0 -49
- package/packages/cli/vendor/src/showcase/premium/simple-select/showcase.tsx +0 -66
- package/packages/cli/vendor/src/showcase/premium/sticky-footer-bar/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/sticky-footer-bar/mock.ts +0 -30
- package/packages/cli/vendor/src/showcase/premium/sticky-footer-bar/showcase.tsx +0 -33
|
@@ -18,17 +18,17 @@ var o = {
|
|
|
18
18
|
inline: "flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4"
|
|
19
19
|
};
|
|
20
20
|
function s({ className: a, label: s, description: c, error: l, success: u, loading: d = !1, required: f = !1, htmlFor: p, labelId: m, descriptionId: h, errorId: g, layout: _ = "vertical", descriptionPosition: v = "top", labelAction: y, requiredIndicator: b = /* @__PURE__ */ r("span", {
|
|
21
|
-
|
|
21
|
+
"data-slot": "form-field-required",
|
|
22
22
|
children: "*"
|
|
23
23
|
}), errorIcon: x, showErrorIcon: S = !0, disabled: C = !1, readOnly: w = !1, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, children: A, ...j }) {
|
|
24
|
-
let M = !!(s || y), N = c && v === "top", P = c && v === "bottom", F = x ?? /* @__PURE__ */ r(t, {
|
|
24
|
+
let M = !!(s || y), N = c && v === "top", P = c && v === "bottom", F = x ?? /* @__PURE__ */ r(t, { "data-icon": "error" }), I = M ? /* @__PURE__ */ i("div", {
|
|
25
25
|
"data-slot": "form-field-label-row",
|
|
26
26
|
className: e("flex min-w-0 items-center justify-between gap-3", _ === "inline" && "sm:w-auto", E),
|
|
27
27
|
children: [s ? /* @__PURE__ */ i("label", {
|
|
28
28
|
"data-slot": "form-field-label",
|
|
29
29
|
htmlFor: p,
|
|
30
30
|
id: m,
|
|
31
|
-
className: e("min-w-0
|
|
31
|
+
className: e("min-w-0", T),
|
|
32
32
|
children: [s, f && b]
|
|
33
33
|
}) : /* @__PURE__ */ r("span", {}), y && /* @__PURE__ */ r("div", {
|
|
34
34
|
"data-slot": "form-field-label-action",
|
|
@@ -38,20 +38,21 @@ function s({ className: a, label: s, description: c, error: l, success: u, loadi
|
|
|
38
38
|
}) : null, L = c ? /* @__PURE__ */ r("p", {
|
|
39
39
|
"data-slot": "form-field-description",
|
|
40
40
|
id: h,
|
|
41
|
-
className:
|
|
41
|
+
className: D,
|
|
42
42
|
children: c
|
|
43
43
|
}) : null, R = /* @__PURE__ */ r("div", {
|
|
44
44
|
"data-slot": "form-field-content",
|
|
45
|
-
className: e("min-w-0
|
|
45
|
+
className: e("flex min-w-0 flex-col gap-2", k),
|
|
46
46
|
children: A
|
|
47
47
|
}), z = l ? /* @__PURE__ */ i("p", {
|
|
48
48
|
"data-slot": "form-field-error",
|
|
49
49
|
id: g,
|
|
50
50
|
role: "alert",
|
|
51
51
|
"aria-live": "polite",
|
|
52
|
-
className: e("flex items-start gap-2
|
|
52
|
+
className: e("flex items-start gap-2", O),
|
|
53
53
|
children: [S && /* @__PURE__ */ r("span", {
|
|
54
|
-
|
|
54
|
+
"data-slot": "form-field-error-icon",
|
|
55
|
+
className: "shrink-0",
|
|
55
56
|
children: F
|
|
56
57
|
}), /* @__PURE__ */ r("span", {
|
|
57
58
|
className: "min-w-0",
|
|
@@ -59,11 +60,9 @@ function s({ className: a, label: s, description: c, error: l, success: u, loadi
|
|
|
59
60
|
})]
|
|
60
61
|
}) : null, B = u && !l ? /* @__PURE__ */ r("p", {
|
|
61
62
|
"data-slot": "form-field-success",
|
|
62
|
-
className: "rounded-[min(var(--radius-xl),16px)] border border-emerald-500/18 bg-emerald-500/8 px-3 py-2 text-sm font-medium leading-6 text-emerald-700 dark:text-emerald-300",
|
|
63
63
|
children: u
|
|
64
64
|
}) : null, V = d ? /* @__PURE__ */ r("p", {
|
|
65
65
|
"data-slot": "form-field-loading",
|
|
66
|
-
className: "text-sm leading-6 text-muted-foreground",
|
|
67
66
|
children: "Loading..."
|
|
68
67
|
}) : null;
|
|
69
68
|
return /* @__PURE__ */ r("div", {
|
|
@@ -75,7 +74,7 @@ function s({ className: a, label: s, description: c, error: l, success: u, loadi
|
|
|
75
74
|
"data-disabled": C || void 0,
|
|
76
75
|
"data-readonly": w || void 0,
|
|
77
76
|
"aria-disabled": C || void 0,
|
|
78
|
-
className: e(o[_],
|
|
77
|
+
className: e(o[_], a),
|
|
79
78
|
...j,
|
|
80
79
|
children: _ === "horizontal" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
|
|
81
80
|
className: "grid gap-2 sm:pt-2.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/input/index.cjs"),i=require("../ui/popover/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");function ee(e,t){let[n,r]=a.useState(e);return a.useEffect(()=>{let n=window.setTimeout(()=>{r(e)},t);return()=>{window.clearTimeout(n)}},[t,e]),n}function te(e){return typeof e==`object`&&!!e&&`options`in e}function ne(e){if(!e||e.length===0)return[];let t=e[0];return te(t)?e:[{options:e}]}function c(e){return e.flatMap(e=>e.options)}function l(e){return typeof e.label==`string`||typeof e.label==`number`?String(e.label).toLowerCase():e.value.toLowerCase()}function re(e,t){let n=e.trim().toLowerCase();return n?!t.some(e=>e.value.toLowerCase()===n||l(e)===n):!1}function u(e,t,n,r,i){if(e)return t?.value===e?t:i?.value===e?i:[...n,...r].find(t=>t.value===e)}function d(...e){let t=new Map;return e.forEach(e=>{e?.forEach(e=>{t.set(e.value,e)})}),Array.from(t.values())}function f(e,t){let n=new Map(t.map(e=>[e.value,e]));return e.map(e=>n.get(e)).filter(e=>!!e)}function ie(e,t,n){let r=e.get(t);if(r){if(Number.isFinite(n)&&Date.now()-r.createdAt>n){e.delete(t);return}return r.groups}}function ae(e,t,n){e.set(t,{groups:n,createdAt:Date.now()})}function oe(e){return e.trim().toLowerCase()}function p({className:e,children:n}){return(0,s.jsx)(`div`,{"data-slot":`async-select-state`,className:t.cn(`rounded-[var(--radius-md)] border border-[color:var(--aui-card-border,var(--border))] bg-[color:color-mix(in_oklch,var(--muted),transparent_55%)] px-3 py-3 text-sm leading-5 text-muted-foreground`,e),children:n})}function se(e){return typeof e.label==`string`||typeof e.label==`number`?String(e.label):e.value}function ce({option:e,selected:n,renderOption:r,optionClassName:i,onSelect:a}){return(0,s.jsxs)(`button`,{type:`button`,disabled:e.disabled,"data-slot":`async-select-option`,"data-selected":n||void 0,"data-disabled":e.disabled||void 0,className:t.cn(`flex w-full items-start gap-2.5 rounded-[var(--radius-md)] border border-transparent px-3 py-2.5 text-left text-sm outline-none transition-[background-color,border-color,color,box-shadow] hover:border-[color:color-mix(in_oklch,var(--primary),transparent_76%)] hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_93%)] focus-visible:border-[color:var(--aui-focus-ring,var(--ring))] focus-visible:shadow-[0_0_0_3px_var(--aui-focus-ring-soft,transparent)] data-[selected=true]:border-[color:color-mix(in_oklch,var(--primary),transparent_68%)] data-[selected=true]:bg-[color:color-mix(in_oklch,var(--primary),transparent_89%)] data-[selected=true]:text-foreground disabled:pointer-events-none disabled:opacity-50`,i),onClick:()=>a(e),children:[(0,s.jsx)(`span`,{className:t.cn(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border border-border/70`,n&&`border-primary bg-primary text-primary-foreground`),children:n&&(0,s.jsx)(o.CheckIcon,{className:`size-3`})}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1`,children:r?.(e,{selected:n})??(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,s.jsx)(`span`,{className:`truncate font-medium`,children:e.label}),e.description&&(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.description}),e.disabled&&e.disabledReason&&(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.disabledReason})]})})]})}function le({search:e,isCreating:t,label:n,onCreate:r}){return(0,s.jsxs)(`button`,{type:`button`,disabled:t,"data-slot":`async-select-create`,className:`flex w-full items-center gap-2 rounded-[var(--radius-md)] border border-dashed border-[color:color-mix(in_oklch,var(--primary),transparent_55%)] bg-[color:color-mix(in_oklch,var(--primary),transparent_94%)] px-3 py-2.5 text-left text-sm font-medium text-foreground outline-none transition-[background-color,border-color,color,box-shadow] hover:bg-[color:color-mix(in_oklch,var(--primary),transparent_90%)] disabled:pointer-events-none disabled:opacity-50`,onClick:r,children:[(0,s.jsx)(`span`,{className:`flex size-4 shrink-0 items-center justify-center`,children:t?(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}):(0,s.jsx)(o.PlusIcon,{className:`size-4`})}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:n?.(e)??`Create "${e.trim()}"`})]})}function m(e){let{className:te,value:l,selectedOption:d,onValueChange:f,loadOptions:se,loadSelectedOption:m,defaultOptions:h,disabled:g=!1,clearable:_=!0,cacheOptions:v=!0,cacheTtl:y=1/0,debounceMs:ue=250,minSearchLength:b=0,labels:x,renderOption:S,renderValue:C,renderLoading:de,renderEmpty:fe,renderError:w,renderMinSearch:pe,onCreateOption:me,createOptionLabel:he,showCreateOption:ge,showSelectedDescription:_e=!0,triggerClassName:ve,contentClassName:ye,searchClassName:be,optionClassName:xe,invalid:Se,...Ce}=e,T=a.useMemo(()=>ne(h),[h]),we=a.useMemo(()=>c(T),[T]),[E,D]=a.useState(!1),[O,k]=a.useState(``),[Te,A]=a.useState(T),[j,Ee]=a.useState(null),[M,N]=a.useState(!1),[P,F]=a.useState(!1),[I,L]=a.useState(!1),R=a.useRef(new Map),z=a.useRef(0),De=a.useRef(0),B=ee(O,ue).trim(),V=a.useMemo(()=>c(Te),[Te]),H=a.useMemo(()=>({search:O,minSearchLength:b,options:V}),[V,b,O]),U=u(l,d,V,we,j),Oe=_&&!!l&&!g,W=B.length<b,G=!W&&!!me&&(ge??re)(O,V);a.useEffect(()=>{R.current.clear()},[se]),a.useEffect(()=>{A(T)},[T]),a.useEffect(()=>{if(!l||U||!m)return;let e=new AbortController,t=++De.current;async function n(){let n=await m?.(l,e.signal);!e.signal.aborted&&t===De.current&&Ee(n??null)}return n(),()=>{e.abort()}},[U,m,l]),a.useEffect(()=>{if(!E)return;if(W){A(T),N(!1),L(!1);return}let e=v?ie(R.current,B,y):void 0;if(e){A(e),N(!1),L(!1);return}let t=new AbortController,n=++z.current;async function r(){N(!0),L(!1);try{let e=ne(await se(B,t.signal));!t.signal.aborted&&n===z.current&&(v&&ae(R.current,B,e),A(e))}catch{!t.signal.aborted&&n===z.current&&(L(!0),A([]))}finally{!t.signal.aborted&&n===z.current&&N(!1)}}return r(),()=>{t.abort()}},[v,y,se,E,T,B,W]);let K=e=>{e.disabled||(f?.(e.value,e),D(!1),k(``))},q=()=>{f?.(void 0),k(``)},ke=e=>{t.stopInteractivePropagation(e),q()},J=e=>{if(!g){if(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `){e.preventDefault(),D(!0);return}(e.key===`Backspace`||e.key===`Delete`)&&l&&(e.preventDefault(),q())}},Y=async()=>{if(!(!me||!O.trim()||W)){F(!0);try{let e=await me(O.trim()),t=oe(O);A(t=>[{options:[e]},...t]),v&&t&&ae(R.current,t,[{options:[e]}]),f?.(e.value,e),k(``),D(!1)}finally{F(!1)}}};return(0,s.jsx)(`div`,{"data-slot":`async-select`,className:t.cn(`w-full`,te),...Ce,children:(0,s.jsxs)(i.Popover,{open:E,onOpenChange:D,children:[(0,s.jsxs)(i.PopoverTrigger,{render:(0,s.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:g,"aria-expanded":E,"aria-invalid":Se||void 0,"data-slot":`async-select-trigger`,className:t.cn(`min-h-11 w-full justify-between rounded-[var(--aui-control-radius,var(--radius-md))] px-3.5 text-left`,ve),onKeyDown:J}),children:[(0,s.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:U?(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,s.jsx)(`span`,{className:`truncate font-semibold`,children:C?.(U)??U.label}),_e&&(U.description||U.disabled&&U.disabledReason)?(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:U.description??U.disabledReason}):null]}):(0,s.jsx)(`span`,{className:`truncate text-muted-foreground`,children:x?.placeholder??`Select`})}),(0,s.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[Oe&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,className:`rounded-full border border-border/65 p-1 text-muted-foreground transition-colors hover:border-border hover:bg-muted/55 hover:text-foreground`,"aria-label":x?.clear??`Clear`,onClick:ke,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t.stopInteractivePropagation(e),q())},children:(0,s.jsx)(o.XIcon,{className:`size-3.5`})}),(0,s.jsx)(o.ChevronsUpDownIcon,{className:`size-4 opacity-60`})]})]}),(0,s.jsxs)(i.PopoverContent,{align:`start`,"data-slot":`async-select-content`,className:t.cn(`w-(--anchor-width) min-w-72 gap-3 rounded-[var(--aui-card-radius,var(--radius-lg))] border-[color:var(--aui-card-border,var(--border))] bg-popover p-3 shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))]`,ye),children:[(0,s.jsxs)(`div`,{"data-slot":`async-select-search-wrap`,className:`relative`,children:[(0,s.jsx)(o.SearchIcon,{className:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),(0,s.jsx)(r.Input,{"data-slot":`async-select-search`,value:O,onChange:e=>k(e.target.value),placeholder:x?.searchPlaceholder??`Search...`,className:t.cn(`pl-8`,be)})]}),(0,s.jsxs)(`div`,{className:`max-h-72 space-y-1 overflow-y-auto pr-1`,children:[W&&V.length===0&&(pe?.(H)??(0,s.jsx)(p,{children:x?.minSearchLength?.(b)??`Type at least ${b} characters`})),M&&(de?.(H)??(0,s.jsx)(p,{children:(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}),x?.loading??`Loading...`]})})),!M&&I&&(w?.(H)??(0,s.jsx)(p,{className:`text-destructive`,children:x?.error??`Could not load options`})),!M&&!I&&!W&&V.length===0&&!G&&(fe?.(H)??(0,s.jsx)(p,{children:x?.empty??`No options found`})),!M&&!I&&G&&(0,s.jsx)(le,{search:O,isCreating:P,label:he,onCreate:Y}),!M&&!I&&Te.map((e,t)=>(0,s.jsxs)(`div`,{children:[e.label&&(0,s.jsx)(`div`,{className:`sticky top-0 z-10 bg-popover px-2 py-1 text-xs font-medium text-muted-foreground`,children:e.label}),e.options.map(e=>(0,s.jsx)(ce,{option:e,selected:e.value===l,renderOption:S,optionClassName:xe,onSelect:K},e.value))]},t))]})]})]})})}function h({className:e,value:te,selectedOptions:l,onValueChange:u,loadOptions:m,loadSelectedOptions:h,defaultOptions:g,disabled:_=!1,clearable:v=!0,cacheOptions:y=!0,cacheTtl:ue=1/0,closeOnSelect:b=!1,debounceMs:x=250,minSearchLength:S=0,maxSelected:C,maxVisibleTags:de,showSelectAll:fe=!1,labels:w,renderOption:pe,renderValue:me,renderTag:he,renderLoading:ge,renderEmpty:_e,renderError:ve,renderMinSearch:ye,renderMaxSelected:be,onCreateOption:xe,createOptionLabel:Se,showCreateOption:Ce,showSelectedDescription:T=!0,triggerClassName:we,contentClassName:E,searchClassName:D,optionClassName:O,tagClassName:k,invalid:Te,...A}){let j=a.useMemo(()=>te??[],[te]),Ee=j.join(`|`),M=a.useMemo(()=>ne(g),[g]),N=a.useMemo(()=>c(M),[M]),[P,F]=a.useState(!1),[I,L]=a.useState(``),[R,z]=a.useState(M),[De,B]=a.useState([]),[V,H]=a.useState(!1),[U,Oe]=a.useState(!1),[W,G]=a.useState(!1),K=a.useRef(new Map),q=a.useRef(0),ke=a.useRef(0),J=ee(I,x).trim(),Y=a.useMemo(()=>c(R),[R]),Ae=a.useMemo(()=>new Set(j),[j]),X=a.useMemo(()=>d(l,De,Y,N),[N,Y,De,l]),je=a.useMemo(()=>f(j,X),[X,j]),Z=a.useMemo(()=>({search:I,minSearchLength:S,options:Y,selectedCount:j.length,maxSelected:C}),[Y,C,S,I,j.length]),Me=j.length>0,Ne=v&&Me&&!_,Pe=typeof C==`number`&&j.length>=C,Fe=Math.max(de??j.length,1),Q=J.length<S,Ie=!Q&&!!xe&&(Ce??re)(I,Y),$=Y.filter(e=>!e.disabled).filter(e=>!Ae.has(e.value)),Le=fe&&$.length>0&&!Pe,Re=je.slice(0,Fe),ze=Math.max(je.length-Re.length,0);a.useEffect(()=>{K.current.clear()},[m]),a.useEffect(()=>{z(M)},[M]),a.useEffect(()=>{if(!j.length||!h)return;let e=new Set(X.map(e=>e.value)),t=j.filter(t=>!e.has(t));if(!t.length)return;let n=new AbortController,r=++ke.current;async function i(){let e=await h?.(t,n.signal);!n.signal.aborted&&r===ke.current&&e&&B(t=>d(t,e))}return i(),()=>{n.abort()}},[X,h,Ee,j]),a.useEffect(()=>{if(!P)return;if(Q){z(M),H(!1),G(!1);return}let e=y?ie(K.current,J,ue):void 0;if(e){z(e),H(!1),G(!1);return}let t=new AbortController,n=++q.current;async function r(){H(!0),G(!1);try{let e=ne(await m(J,t.signal));!t.signal.aborted&&n===q.current&&(y&&ae(K.current,J,e),z(e))}catch{!t.signal.aborted&&n===q.current&&(G(!0),z([]))}finally{!t.signal.aborted&&n===q.current&&H(!1)}}return r(),()=>{t.abort()}},[y,ue,m,P,M,J,Q]);let Be=(e,t)=>{u?.(e,f(e,t))},Ve=e=>{Be(j.filter(t=>t!==e),X)},He=e=>{e.disabled||(Be(Ae.has(e.value)?j.filter(t=>t!==e.value):Pe?j:[...j,e.value],d(X,[e])),b&&(F(!1),L(``)))},Ue=(e,n)=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Backspace`&&e.key!==`Delete`||(e.preventDefault(),t.stopInteractivePropagation(e),Ve(n.value))},We=e=>{if(!_){if(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `){e.preventDefault(),F(!0);return}I.length>0||j.length===0||(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),Ve(j[j.length-1]))}},Ge=()=>{if(!$.length)return;let e=typeof C==`number`?Math.max(C-j.length,0):$.length,t=$.slice(0,e);Be(Array.from(new Set([...j,...t.map(e=>e.value)])),d(X,t))},Ke=e=>{Ve(e.value)},qe=()=>{u?.([],[]),L(``)},Je=e=>{t.stopInteractivePropagation(e),qe()},Ye=async()=>{if(!(!xe||!I.trim()||Q)){Oe(!0);try{let e=await xe(I.trim()),t=oe(I),n=d(X,[e]),r=Ae.has(e.value)||Pe?j:[...j,e.value];z(t=>[{options:[e]},...t]),y&&t&&ae(K.current,t,[{options:[e]}]),Be(r,n),L(``),b&&F(!1)}finally{Oe(!1)}}};return(0,s.jsx)(`div`,{"data-slot":`async-multi-select`,className:t.cn(`w-full`,e),...A,children:(0,s.jsxs)(i.Popover,{open:P,onOpenChange:F,children:[(0,s.jsxs)(i.PopoverTrigger,{render:(0,s.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:_,"aria-expanded":P,"aria-invalid":Te||void 0,"data-slot":`async-select-trigger`,className:t.cn(`min-h-11 w-full justify-between rounded-[var(--aui-control-radius,var(--radius-md))] px-3.5 text-left`,we),onKeyDown:We}),children:[(0,s.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-wrap gap-1 text-left`,children:je.length>0?(0,s.jsxs)(s.Fragment,{children:[Re.map(e=>(0,s.jsxs)(`span`,{"data-slot":`async-select-tag`,className:t.cn(`inline-flex max-w-full items-center gap-1.5 rounded-[var(--radius-sm)] border border-[color:color-mix(in_oklch,var(--primary),transparent_70%)] bg-[color:color-mix(in_oklch,var(--primary),transparent_92%)] px-2 py-1 text-xs font-medium text-foreground`,k),children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,s.jsx)(`span`,{className:`truncate`,children:he?.(e,{remove:()=>Ke(e)})??me?.(e)??e.label}),T&&(e.description||e.disabled&&e.disabledReason)?(0,s.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:e.description??e.disabledReason}):null]}),!_&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,"data-slot":`async-select-tag-remove`,className:`rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-background hover:text-foreground`,"aria-label":`Remove ${se(e)}`,onClick:n=>{t.stopInteractivePropagation(n),Ke(e)},onKeyDown:t=>Ue(t,e),children:(0,s.jsx)(o.XIcon,{className:`size-3`})})]},e.value)),ze>0?(0,s.jsx)(`span`,{"data-slot":`async-select-tag-overflow`,className:t.cn(`inline-flex max-w-full items-center rounded-[var(--radius-sm)] border border-dashed border-[color:var(--aui-card-border,var(--border))] bg-[color:color-mix(in_oklch,var(--muted),transparent_58%)] px-2 py-1 text-xs font-medium text-muted-foreground`,k),children:w?.hiddenSelected?.(ze)??`+${ze} more`}):null]}):(0,s.jsx)(`span`,{className:`truncate text-muted-foreground`,children:w?.multiPlaceholder??w?.placeholder??`Select`})}),(0,s.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[Ne&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,"data-slot":`async-select-clear`,className:`rounded-full border border-border/65 p-1 text-muted-foreground transition-colors hover:border-border hover:bg-muted/55 hover:text-foreground`,"aria-label":w?.clearAll??w?.clear??`Clear all`,onClick:Je,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t.stopInteractivePropagation(e),qe())},children:(0,s.jsx)(o.XIcon,{className:`size-3.5`})}),(0,s.jsx)(o.ChevronsUpDownIcon,{className:`size-4 opacity-60`})]})]}),(0,s.jsxs)(i.PopoverContent,{align:`start`,"data-slot":`async-select-content`,className:t.cn(`w-(--anchor-width) min-w-72 gap-3 rounded-[var(--aui-card-radius,var(--radius-lg))] border-[color:var(--aui-card-border,var(--border))] bg-popover p-3 shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))]`,E),children:[(0,s.jsxs)(`div`,{"data-slot":`async-select-search-wrap`,className:`relative`,children:[(0,s.jsx)(o.SearchIcon,{className:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),(0,s.jsx)(r.Input,{"data-slot":`async-select-search`,value:I,onChange:e=>L(e.target.value),placeholder:w?.searchPlaceholder??`Search...`,className:t.cn(`pl-8`,D)})]}),(0,s.jsxs)(`div`,{"data-slot":`async-select-meta`,className:`flex flex-wrap items-center justify-between gap-2 rounded-[var(--radius-md)] border border-[color:var(--aui-card-border,var(--border))] bg-[color:color-mix(in_oklch,var(--muted),transparent_62%)] px-3 py-2 text-xs text-muted-foreground`,children:[Me&&w?.selectedCount&&(0,s.jsx)(`span`,{children:w.selectedCount(j.length)}),Pe&&(be?.(Z)??(0,s.jsx)(`span`,{children:w?.maxSelected?.(C??j.length)??`Maximum ${C} selected`})),(0,s.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[Le&&(0,s.jsx)(`button`,{type:`button`,"data-slot":`async-select-meta-action`,className:`rounded-[var(--radius-sm)] border border-border/75 px-2.5 py-1 font-medium text-foreground transition-colors hover:bg-background`,onClick:Ge,children:w?.selectAll??`Select all`}),Ne&&(0,s.jsx)(`button`,{type:`button`,"data-slot":`async-select-meta-action`,className:`rounded-[var(--radius-sm)] border border-border/75 px-2.5 py-1 font-medium text-foreground transition-colors hover:bg-background`,onClick:()=>u?.([],[]),children:w?.clearAll??w?.clear??`Clear all`})]})]}),(0,s.jsxs)(`div`,{className:`max-h-72 space-y-1 overflow-y-auto pr-1`,children:[Q&&Y.length===0&&(ye?.(Z)??(0,s.jsx)(p,{children:w?.minSearchLength?.(S)??`Type at least ${S} characters`})),V&&(ge?.(Z)??(0,s.jsx)(p,{children:(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}),w?.loading??`Loading...`]})})),!V&&W&&(ve?.(Z)??(0,s.jsx)(p,{className:`text-destructive`,children:w?.error??`Could not load options`})),!V&&!W&&!Q&&Y.length===0&&!Ie&&(_e?.(Z)??(0,s.jsx)(p,{children:w?.empty??`No options found`})),!V&&!W&&Ie&&(0,s.jsx)(le,{search:I,isCreating:U,label:Se,onCreate:Ye}),!V&&!W&&R.map((e,t)=>(0,s.jsxs)(`div`,{children:[e.label&&(0,s.jsx)(`div`,{className:`sticky top-0 z-10 bg-popover px-2 py-1 text-xs font-medium text-muted-foreground`,children:(0,s.jsx)(`span`,{"data-slot":`async-select-group-label`,children:e.label})}),e.options.map(e=>(0,s.jsx)(ce,{option:e,selected:Ae.has(e.value),renderOption:pe,optionClassName:O,onSelect:He},e.value))]},t))]})]})]})})}function g(e){return e.isMulti?(0,s.jsx)(h,{...e}):(0,s.jsx)(m,{...e})}exports.AsyncMultiSelect=h,exports.AsyncSelect=g;
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/input/index.cjs"),i=require("../ui/popover/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");function ee(e,t){let[n,r]=a.useState(e);return a.useEffect(()=>{let n=window.setTimeout(()=>{r(e)},t);return()=>{window.clearTimeout(n)}},[t,e]),n}function te(e){return typeof e==`object`&&!!e&&`options`in e}function ne(e){if(!e||e.length===0)return[];let t=e[0];return te(t)?e:[{options:e}]}function c(e){return e.flatMap(e=>e.options)}function l(e){return typeof e.label==`string`||typeof e.label==`number`?String(e.label).toLowerCase():e.value.toLowerCase()}function re(e,t){let n=e.trim().toLowerCase();return n?!t.some(e=>e.value.toLowerCase()===n||l(e)===n):!1}function u(e,t,n,r,i){if(e)return t?.value===e?t:i?.value===e?i:[...n,...r].find(t=>t.value===e)}function d(...e){let t=new Map;return e.forEach(e=>{e?.forEach(e=>{t.set(e.value,e)})}),Array.from(t.values())}function f(e,t){let n=new Map(t.map(e=>[e.value,e]));return e.map(e=>n.get(e)).filter(e=>!!e)}function ie(e,t,n){let r=e.get(t);if(r){if(Number.isFinite(n)&&Date.now()-r.createdAt>n){e.delete(t);return}return r.groups}}function ae(e,t,n){e.set(t,{groups:n,createdAt:Date.now()})}function oe(e){return e.trim().toLowerCase()}function p({className:e,children:t}){return(0,s.jsx)(`div`,{"data-slot":`async-select-state`,className:e,children:t})}function se(e){return typeof e.label==`string`||typeof e.label==`number`?String(e.label):e.value}function ce({option:e,selected:n,renderOption:r,optionClassName:i,onSelect:a}){return(0,s.jsxs)(`button`,{type:`button`,disabled:e.disabled,"data-slot":`async-select-option`,"data-selected":n||void 0,"data-disabled":e.disabled||void 0,className:t.cn(`flex w-full items-start gap-2.5 text-left outline-none disabled:pointer-events-none`,i),onClick:()=>a(e),children:[(0,s.jsx)(`span`,{"data-slot":`async-select-option-indicator`,"data-selected":n||void 0,className:`mt-0.5 shrink-0`,children:n&&(0,s.jsx)(o.CheckIcon,{"data-icon":`selected`})}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1`,children:r?.(e,{selected:n})??(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,s.jsx)(`span`,{className:`truncate font-medium`,children:e.label}),e.description&&(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.description}),e.disabled&&e.disabledReason&&(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.disabledReason})]})})]})}function le({search:e,isCreating:t,label:n,onCreate:r}){return(0,s.jsxs)(`button`,{type:`button`,disabled:t,"data-slot":`async-select-create`,className:`flex w-full items-center gap-2 text-left outline-none disabled:pointer-events-none`,onClick:r,children:[(0,s.jsx)(`span`,{className:`flex size-4 shrink-0 items-center justify-center`,children:t?(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}):(0,s.jsx)(o.PlusIcon,{className:`size-4`})}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:n?.(e)??`Create "${e.trim()}"`})]})}function m(e){let{className:te,value:l,selectedOption:d,onValueChange:f,loadOptions:se,loadSelectedOption:m,defaultOptions:h,disabled:g=!1,clearable:_=!0,cacheOptions:v=!0,cacheTtl:y=1/0,debounceMs:ue=250,minSearchLength:b=0,labels:x,renderOption:S,renderValue:C,renderLoading:de,renderEmpty:fe,renderError:w,renderMinSearch:pe,onCreateOption:me,createOptionLabel:he,showCreateOption:ge,showSelectedDescription:_e=!0,triggerClassName:ve,contentClassName:ye,searchClassName:be,optionClassName:xe,invalid:Se,...Ce}=e,T=a.useMemo(()=>ne(h),[h]),we=a.useMemo(()=>c(T),[T]),[E,D]=a.useState(!1),[O,k]=a.useState(``),[Te,A]=a.useState(T),[j,Ee]=a.useState(null),[M,N]=a.useState(!1),[P,F]=a.useState(!1),[I,L]=a.useState(!1),R=a.useRef(new Map),z=a.useRef(0),De=a.useRef(0),B=ee(O,ue).trim(),V=a.useMemo(()=>c(Te),[Te]),H=a.useMemo(()=>({search:O,minSearchLength:b,options:V}),[V,b,O]),U=u(l,d,V,we,j),Oe=_&&!!l&&!g,W=B.length<b,G=!W&&!!me&&(ge??re)(O,V);a.useEffect(()=>{R.current.clear()},[se]),a.useEffect(()=>{A(T)},[T]),a.useEffect(()=>{if(!l||U||!m)return;let e=new AbortController,t=++De.current;async function n(){let n=await m?.(l,e.signal);!e.signal.aborted&&t===De.current&&Ee(n??null)}return n(),()=>{e.abort()}},[U,m,l]),a.useEffect(()=>{if(!E)return;if(W){A(T),N(!1),L(!1);return}let e=v?ie(R.current,B,y):void 0;if(e){A(e),N(!1),L(!1);return}let t=new AbortController,n=++z.current;async function r(){N(!0),L(!1);try{let e=ne(await se(B,t.signal));!t.signal.aborted&&n===z.current&&(v&&ae(R.current,B,e),A(e))}catch{!t.signal.aborted&&n===z.current&&(L(!0),A([]))}finally{!t.signal.aborted&&n===z.current&&N(!1)}}return r(),()=>{t.abort()}},[v,y,se,E,T,B,W]);let K=e=>{e.disabled||(f?.(e.value,e),D(!1),k(``))},q=()=>{f?.(void 0),k(``)},ke=e=>{t.stopInteractivePropagation(e),q()},J=e=>{if(!g){if(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `){e.preventDefault(),D(!0);return}(e.key===`Backspace`||e.key===`Delete`)&&l&&(e.preventDefault(),q())}},Y=async()=>{if(!(!me||!O.trim()||W)){F(!0);try{let e=await me(O.trim()),t=oe(O);A(t=>[{options:[e]},...t]),v&&t&&ae(R.current,t,[{options:[e]}]),f?.(e.value,e),k(``),D(!1)}finally{F(!1)}}};return(0,s.jsx)(`div`,{"data-slot":`async-select`,className:t.cn(`w-full`,te),...Ce,children:(0,s.jsxs)(i.Popover,{open:E,onOpenChange:D,children:[(0,s.jsxs)(i.PopoverTrigger,{render:(0,s.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:g,"aria-expanded":E,"aria-invalid":Se||void 0,"data-slot":`async-select-trigger`,className:t.cn(`w-full justify-between text-left`,ve),onKeyDown:J}),children:[(0,s.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:U?(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,s.jsx)(`span`,{className:`truncate font-semibold`,children:C?.(U)??U.label}),_e&&(U.description||U.disabled&&U.disabledReason)?(0,s.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:U.description??U.disabledReason}):null]}):(0,s.jsx)(`span`,{className:`truncate text-muted-foreground`,children:x?.placeholder??`Select`})}),(0,s.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[Oe&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,"data-slot":`async-select-clear`,"aria-label":x?.clear??`Clear`,onClick:ke,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t.stopInteractivePropagation(e),q())},children:(0,s.jsx)(o.XIcon,{"data-icon":`clear`})}),(0,s.jsx)(o.ChevronsUpDownIcon,{className:`size-4 opacity-60`})]})]}),(0,s.jsxs)(i.PopoverContent,{align:`start`,"data-slot":`async-select-content`,className:t.cn(`w-(--anchor-width) min-w-72 gap-3`,ye),children:[(0,s.jsxs)(`div`,{"data-slot":`async-select-search-wrap`,className:`relative`,children:[(0,s.jsx)(o.SearchIcon,{"data-slot":`async-select-search-icon`}),(0,s.jsx)(r.Input,{"data-slot":`async-select-search`,value:O,onChange:e=>k(e.target.value),placeholder:x?.searchPlaceholder??`Search...`,className:t.cn(`pl-8`,be)})]}),(0,s.jsxs)(`div`,{className:`flex max-h-72 flex-col gap-1 overflow-y-auto pr-1`,children:[W&&V.length===0&&(pe?.(H)??(0,s.jsx)(p,{children:x?.minSearchLength?.(b)??`Type at least ${b} characters`})),M&&(de?.(H)??(0,s.jsx)(p,{children:(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}),x?.loading??`Loading...`]})})),!M&&I&&(w?.(H)??(0,s.jsx)(p,{"data-tone":`danger`,children:x?.error??`Could not load options`})),!M&&!I&&!W&&V.length===0&&!G&&(fe?.(H)??(0,s.jsx)(p,{children:x?.empty??`No options found`})),!M&&!I&&G&&(0,s.jsx)(le,{search:O,isCreating:P,label:he,onCreate:Y}),!M&&!I&&Te.map((e,t)=>(0,s.jsxs)(`div`,{children:[e.label&&(0,s.jsx)(`div`,{"data-slot":`async-select-group-label`,className:`sticky top-0`,children:e.label}),e.options.map(e=>(0,s.jsx)(ce,{option:e,selected:e.value===l,renderOption:S,optionClassName:xe,onSelect:K},e.value))]},t))]})]})]})})}function h({className:e,value:te,selectedOptions:l,onValueChange:u,loadOptions:m,loadSelectedOptions:h,defaultOptions:g,disabled:_=!1,clearable:v=!0,cacheOptions:y=!0,cacheTtl:ue=1/0,closeOnSelect:b=!1,debounceMs:x=250,minSearchLength:S=0,maxSelected:C,maxVisibleTags:de,showSelectAll:fe=!1,labels:w,renderOption:pe,renderValue:me,renderTag:he,renderLoading:ge,renderEmpty:_e,renderError:ve,renderMinSearch:ye,renderMaxSelected:be,onCreateOption:xe,createOptionLabel:Se,showCreateOption:Ce,showSelectedDescription:T=!0,triggerClassName:we,contentClassName:E,searchClassName:D,optionClassName:O,tagClassName:k,invalid:Te,...A}){let j=a.useMemo(()=>te??[],[te]),Ee=j.join(`|`),M=a.useMemo(()=>ne(g),[g]),N=a.useMemo(()=>c(M),[M]),[P,F]=a.useState(!1),[I,L]=a.useState(``),[R,z]=a.useState(M),[De,B]=a.useState([]),[V,H]=a.useState(!1),[U,Oe]=a.useState(!1),[W,G]=a.useState(!1),K=a.useRef(new Map),q=a.useRef(0),ke=a.useRef(0),J=ee(I,x).trim(),Y=a.useMemo(()=>c(R),[R]),Ae=a.useMemo(()=>new Set(j),[j]),X=a.useMemo(()=>d(l,De,Y,N),[N,Y,De,l]),je=a.useMemo(()=>f(j,X),[X,j]),Z=a.useMemo(()=>({search:I,minSearchLength:S,options:Y,selectedCount:j.length,maxSelected:C}),[Y,C,S,I,j.length]),Me=j.length>0,Ne=v&&Me&&!_,Pe=typeof C==`number`&&j.length>=C,Fe=Math.max(de??j.length,1),Q=J.length<S,Ie=!Q&&!!xe&&(Ce??re)(I,Y),$=Y.filter(e=>!e.disabled).filter(e=>!Ae.has(e.value)),Le=fe&&$.length>0&&!Pe,Re=je.slice(0,Fe),ze=Math.max(je.length-Re.length,0);a.useEffect(()=>{K.current.clear()},[m]),a.useEffect(()=>{z(M)},[M]),a.useEffect(()=>{if(!j.length||!h)return;let e=new Set(X.map(e=>e.value)),t=j.filter(t=>!e.has(t));if(!t.length)return;let n=new AbortController,r=++ke.current;async function i(){let e=await h?.(t,n.signal);!n.signal.aborted&&r===ke.current&&e&&B(t=>d(t,e))}return i(),()=>{n.abort()}},[X,h,Ee,j]),a.useEffect(()=>{if(!P)return;if(Q){z(M),H(!1),G(!1);return}let e=y?ie(K.current,J,ue):void 0;if(e){z(e),H(!1),G(!1);return}let t=new AbortController,n=++q.current;async function r(){H(!0),G(!1);try{let e=ne(await m(J,t.signal));!t.signal.aborted&&n===q.current&&(y&&ae(K.current,J,e),z(e))}catch{!t.signal.aborted&&n===q.current&&(G(!0),z([]))}finally{!t.signal.aborted&&n===q.current&&H(!1)}}return r(),()=>{t.abort()}},[y,ue,m,P,M,J,Q]);let Be=(e,t)=>{u?.(e,f(e,t))},Ve=e=>{Be(j.filter(t=>t!==e),X)},He=e=>{e.disabled||(Be(Ae.has(e.value)?j.filter(t=>t!==e.value):Pe?j:[...j,e.value],d(X,[e])),b&&(F(!1),L(``)))},Ue=(e,n)=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Backspace`&&e.key!==`Delete`||(e.preventDefault(),t.stopInteractivePropagation(e),Ve(n.value))},We=e=>{if(!_){if(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `){e.preventDefault(),F(!0);return}I.length>0||j.length===0||(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),Ve(j[j.length-1]))}},Ge=()=>{if(!$.length)return;let e=typeof C==`number`?Math.max(C-j.length,0):$.length,t=$.slice(0,e);Be(Array.from(new Set([...j,...t.map(e=>e.value)])),d(X,t))},Ke=e=>{Ve(e.value)},qe=()=>{u?.([],[]),L(``)},Je=e=>{t.stopInteractivePropagation(e),qe()},Ye=async()=>{if(!(!xe||!I.trim()||Q)){Oe(!0);try{let e=await xe(I.trim()),t=oe(I),n=d(X,[e]),r=Ae.has(e.value)||Pe?j:[...j,e.value];z(t=>[{options:[e]},...t]),y&&t&&ae(K.current,t,[{options:[e]}]),Be(r,n),L(``),b&&F(!1)}finally{Oe(!1)}}};return(0,s.jsx)(`div`,{"data-slot":`async-multi-select`,className:t.cn(`w-full`,e),...A,children:(0,s.jsxs)(i.Popover,{open:P,onOpenChange:F,children:[(0,s.jsxs)(i.PopoverTrigger,{render:(0,s.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:_,"aria-expanded":P,"aria-invalid":Te||void 0,"data-slot":`async-select-trigger`,className:t.cn(`w-full justify-between text-left`,we),onKeyDown:We}),children:[(0,s.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-wrap gap-1 text-left`,children:je.length>0?(0,s.jsxs)(s.Fragment,{children:[Re.map(e=>(0,s.jsxs)(`span`,{"data-slot":`async-select-tag`,className:t.cn(`inline-flex max-w-full items-center gap-1.5`,k),children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,s.jsx)(`span`,{className:`truncate`,children:he?.(e,{remove:()=>Ke(e)})??me?.(e)??e.label}),T&&(e.description||e.disabled&&e.disabledReason)?(0,s.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:e.description??e.disabledReason}):null]}),!_&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,"data-slot":`async-select-tag-remove`,"aria-label":`Remove ${se(e)}`,onClick:n=>{t.stopInteractivePropagation(n),Ke(e)},onKeyDown:t=>Ue(t,e),children:(0,s.jsx)(o.XIcon,{"data-icon":`remove`})})]},e.value)),ze>0?(0,s.jsx)(`span`,{"data-slot":`async-select-tag-overflow`,className:t.cn(`inline-flex max-w-full items-center`,k),children:w?.hiddenSelected?.(ze)??`+${ze} more`}):null]}):(0,s.jsx)(`span`,{className:`truncate text-muted-foreground`,children:w?.multiPlaceholder??w?.placeholder??`Select`})}),(0,s.jsxs)(`span`,{className:`ml-2 flex shrink-0 items-center gap-1`,children:[Ne&&(0,s.jsx)(`span`,{role:`button`,tabIndex:0,"data-slot":`async-select-clear`,"aria-label":w?.clearAll??w?.clear??`Clear all`,onClick:Je,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t.stopInteractivePropagation(e),qe())},children:(0,s.jsx)(o.XIcon,{"data-icon":`clear`})}),(0,s.jsx)(o.ChevronsUpDownIcon,{className:`size-4 opacity-60`})]})]}),(0,s.jsxs)(i.PopoverContent,{align:`start`,"data-slot":`async-select-content`,className:t.cn(`w-(--anchor-width) min-w-72 gap-3`,E),children:[(0,s.jsxs)(`div`,{"data-slot":`async-select-search-wrap`,className:`relative`,children:[(0,s.jsx)(o.SearchIcon,{"data-slot":`async-select-search-icon`}),(0,s.jsx)(r.Input,{"data-slot":`async-select-search`,value:I,onChange:e=>L(e.target.value),placeholder:w?.searchPlaceholder??`Search...`,className:t.cn(`pl-8`,D)})]}),(0,s.jsxs)(`div`,{"data-slot":`async-select-meta`,className:`flex flex-wrap items-center justify-between gap-2`,children:[Me&&w?.selectedCount&&(0,s.jsx)(`span`,{children:w.selectedCount(j.length)}),Pe&&(be?.(Z)??(0,s.jsx)(`span`,{children:w?.maxSelected?.(C??j.length)??`Maximum ${C} selected`})),(0,s.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[Le&&(0,s.jsx)(`button`,{type:`button`,"data-slot":`async-select-meta-action`,onClick:Ge,children:w?.selectAll??`Select all`}),Ne&&(0,s.jsx)(`button`,{type:`button`,"data-slot":`async-select-meta-action`,onClick:()=>u?.([],[]),children:w?.clearAll??w?.clear??`Clear all`})]})]}),(0,s.jsxs)(`div`,{className:`flex max-h-72 flex-col gap-1 overflow-y-auto pr-1`,children:[Q&&Y.length===0&&(ye?.(Z)??(0,s.jsx)(p,{children:w?.minSearchLength?.(S)??`Type at least ${S} characters`})),V&&(ge?.(Z)??(0,s.jsx)(p,{children:(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,s.jsx)(o.Loader2Icon,{className:`size-4 animate-spin`}),w?.loading??`Loading...`]})})),!V&&W&&(ve?.(Z)??(0,s.jsx)(p,{"data-tone":`danger`,children:w?.error??`Could not load options`})),!V&&!W&&!Q&&Y.length===0&&!Ie&&(_e?.(Z)??(0,s.jsx)(p,{children:w?.empty??`No options found`})),!V&&!W&&Ie&&(0,s.jsx)(le,{search:I,isCreating:U,label:Se,onCreate:Ye}),!V&&!W&&R.map((e,t)=>(0,s.jsxs)(`div`,{children:[e.label&&(0,s.jsx)(`div`,{className:`sticky top-0 z-10 bg-popover px-2 py-1 text-xs font-medium text-muted-foreground`,children:(0,s.jsx)(`span`,{"data-slot":`async-select-group-label`,children:e.label})}),e.options.map(e=>(0,s.jsx)(ce,{option:e,selected:Ae.has(e.value),renderOption:pe,optionClassName:O,onSelect:He},e.value))]},t))]})]})]})})}function g(e){if(e.isMulti){let{isMulti:t,...n}=e;return(0,s.jsx)(h,{"data-multi":t,...n})}return(0,s.jsx)(m,{...e})}exports.AsyncMultiSelect=h,exports.AsyncSelect=g;
|
|
@@ -70,11 +70,11 @@ function me(e, t, n) {
|
|
|
70
70
|
function he(e) {
|
|
71
71
|
return e.trim().toLowerCase();
|
|
72
72
|
}
|
|
73
|
-
function p({ className:
|
|
73
|
+
function p({ className: e, children: t }) {
|
|
74
74
|
return /* @__PURE__ */ s("div", {
|
|
75
75
|
"data-slot": "async-select-state",
|
|
76
|
-
className: e
|
|
77
|
-
children:
|
|
76
|
+
className: e,
|
|
77
|
+
children: t
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function ge(e) {
|
|
@@ -87,11 +87,13 @@ function _e({ option: t, selected: n, renderOption: r, optionClassName: i, onSel
|
|
|
87
87
|
"data-slot": "async-select-option",
|
|
88
88
|
"data-selected": n || void 0,
|
|
89
89
|
"data-disabled": t.disabled || void 0,
|
|
90
|
-
className: e("flex w-full items-start gap-2.5
|
|
90
|
+
className: e("flex w-full items-start gap-2.5 text-left outline-none disabled:pointer-events-none", i),
|
|
91
91
|
onClick: () => ee(t),
|
|
92
92
|
children: [/* @__PURE__ */ s("span", {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
"data-slot": "async-select-option-indicator",
|
|
94
|
+
"data-selected": n || void 0,
|
|
95
|
+
className: "mt-0.5 shrink-0",
|
|
96
|
+
children: n && /* @__PURE__ */ s(ne, { "data-icon": "selected" })
|
|
95
97
|
}), /* @__PURE__ */ s("span", {
|
|
96
98
|
className: "min-w-0 flex-1",
|
|
97
99
|
children: r?.(t, { selected: n }) ?? /* @__PURE__ */ c("span", {
|
|
@@ -119,7 +121,7 @@ function ve({ search: e, isCreating: t, label: n, onCreate: r }) {
|
|
|
119
121
|
type: "button",
|
|
120
122
|
disabled: t,
|
|
121
123
|
"data-slot": "async-select-create",
|
|
122
|
-
className: "flex w-full items-center gap-2
|
|
124
|
+
className: "flex w-full items-center gap-2 text-left outline-none disabled:pointer-events-none",
|
|
123
125
|
onClick: r,
|
|
124
126
|
children: [/* @__PURE__ */ s("span", {
|
|
125
127
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
@@ -233,7 +235,7 @@ function m(ne) {
|
|
|
233
235
|
"aria-expanded": T,
|
|
234
236
|
"aria-invalid": C || void 0,
|
|
235
237
|
"data-slot": "async-select-trigger",
|
|
236
|
-
className: e("
|
|
238
|
+
className: e("w-full justify-between text-left", De),
|
|
237
239
|
onKeyDown: Ie
|
|
238
240
|
}),
|
|
239
241
|
children: [/* @__PURE__ */ s("span", {
|
|
@@ -256,23 +258,23 @@ function m(ne) {
|
|
|
256
258
|
children: [Fe && /* @__PURE__ */ s("span", {
|
|
257
259
|
role: "button",
|
|
258
260
|
tabIndex: 0,
|
|
259
|
-
|
|
261
|
+
"data-slot": "async-select-clear",
|
|
260
262
|
"aria-label": y?.clear ?? "Clear",
|
|
261
263
|
onClick: J,
|
|
262
264
|
onKeyDown: (e) => {
|
|
263
265
|
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), t(e), q());
|
|
264
266
|
},
|
|
265
|
-
children: /* @__PURE__ */ s(se, {
|
|
267
|
+
children: /* @__PURE__ */ s(se, { "data-icon": "clear" })
|
|
266
268
|
}), /* @__PURE__ */ s(re, { className: "size-4 opacity-60" })]
|
|
267
269
|
})]
|
|
268
270
|
}), /* @__PURE__ */ c(ee, {
|
|
269
271
|
align: "start",
|
|
270
272
|
"data-slot": "async-select-content",
|
|
271
|
-
className: e("w-(--anchor-width) min-w-72 gap-3
|
|
273
|
+
className: e("w-(--anchor-width) min-w-72 gap-3", Oe),
|
|
272
274
|
children: [/* @__PURE__ */ c("div", {
|
|
273
275
|
"data-slot": "async-select-search-wrap",
|
|
274
276
|
className: "relative",
|
|
275
|
-
children: [/* @__PURE__ */ s(oe, {
|
|
277
|
+
children: [/* @__PURE__ */ s(oe, { "data-slot": "async-select-search-icon" }), /* @__PURE__ */ s(r, {
|
|
276
278
|
"data-slot": "async-select-search",
|
|
277
279
|
value: D,
|
|
278
280
|
onChange: (e) => O(e.target.value),
|
|
@@ -280,7 +282,7 @@ function m(ne) {
|
|
|
280
282
|
className: e("pl-8", ke)
|
|
281
283
|
})]
|
|
282
284
|
}), /* @__PURE__ */ c("div", {
|
|
283
|
-
className: "max-h-72
|
|
285
|
+
className: "flex max-h-72 flex-col gap-1 overflow-y-auto pr-1",
|
|
284
286
|
children: [
|
|
285
287
|
W && V.length === 0 && (S?.(H) ?? /* @__PURE__ */ s(p, { children: y?.minSearchLength?.(v) ?? `Type at least ${v} characters` })),
|
|
286
288
|
M && (x?.(H) ?? /* @__PURE__ */ s(p, { children: /* @__PURE__ */ c("span", {
|
|
@@ -288,7 +290,7 @@ function m(ne) {
|
|
|
288
290
|
children: [/* @__PURE__ */ s(ie, { className: "size-4 animate-spin" }), y?.loading ?? "Loading..."]
|
|
289
291
|
}) })),
|
|
290
292
|
!M && F && (Se?.(H) ?? /* @__PURE__ */ s(p, {
|
|
291
|
-
|
|
293
|
+
"data-tone": "danger",
|
|
292
294
|
children: y?.error ?? "Could not load options"
|
|
293
295
|
})),
|
|
294
296
|
!M && !F && !W && V.length === 0 && !G && (xe?.(H) ?? /* @__PURE__ */ s(p, { children: y?.empty ?? "No options found" })),
|
|
@@ -299,7 +301,8 @@ function m(ne) {
|
|
|
299
301
|
onCreate: Y
|
|
300
302
|
}),
|
|
301
303
|
!M && !F && k.map((e, t) => /* @__PURE__ */ c("div", { children: [e.label && /* @__PURE__ */ s("div", {
|
|
302
|
-
|
|
304
|
+
"data-slot": "async-select-group-label",
|
|
305
|
+
className: "sticky top-0",
|
|
303
306
|
children: e.label
|
|
304
307
|
}), e.options.map((e) => /* @__PURE__ */ s(_e, {
|
|
305
308
|
option: e,
|
|
@@ -441,14 +444,14 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
441
444
|
"aria-expanded": P,
|
|
442
445
|
"aria-invalid": A || void 0,
|
|
443
446
|
"data-slot": "async-select-trigger",
|
|
444
|
-
className: e("
|
|
447
|
+
className: e("w-full justify-between text-left", T),
|
|
445
448
|
onKeyDown: Qe
|
|
446
449
|
}),
|
|
447
450
|
children: [/* @__PURE__ */ s("span", {
|
|
448
451
|
className: "flex min-w-0 flex-1 flex-wrap gap-1 text-left",
|
|
449
452
|
children: Re.length > 0 ? /* @__PURE__ */ c(o, { children: [Ke.map((n) => /* @__PURE__ */ c("span", {
|
|
450
453
|
"data-slot": "async-select-tag",
|
|
451
|
-
className: e("inline-flex max-w-full items-center gap-1.5
|
|
454
|
+
className: e("inline-flex max-w-full items-center gap-1.5", k),
|
|
452
455
|
children: [/* @__PURE__ */ c("span", {
|
|
453
456
|
className: "flex min-w-0 flex-col",
|
|
454
457
|
children: [/* @__PURE__ */ s("span", {
|
|
@@ -462,17 +465,16 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
462
465
|
role: "button",
|
|
463
466
|
tabIndex: 0,
|
|
464
467
|
"data-slot": "async-select-tag-remove",
|
|
465
|
-
className: "rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-background hover:text-foreground",
|
|
466
468
|
"aria-label": `Remove ${ge(n)}`,
|
|
467
469
|
onClick: (e) => {
|
|
468
470
|
t(e), et(n);
|
|
469
471
|
},
|
|
470
472
|
onKeyDown: (e) => Ze(e, n),
|
|
471
|
-
children: /* @__PURE__ */ s(se, {
|
|
473
|
+
children: /* @__PURE__ */ s(se, { "data-icon": "remove" })
|
|
472
474
|
})]
|
|
473
475
|
}, n.value)), qe > 0 ? /* @__PURE__ */ s("span", {
|
|
474
476
|
"data-slot": "async-select-tag-overflow",
|
|
475
|
-
className: e("inline-flex max-w-full items-center
|
|
477
|
+
className: e("inline-flex max-w-full items-center", k),
|
|
476
478
|
children: S?.hiddenSelected?.(qe) ?? `+${qe} more`
|
|
477
479
|
}) : null] }) : /* @__PURE__ */ s("span", {
|
|
478
480
|
className: "truncate text-muted-foreground",
|
|
@@ -484,24 +486,23 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
484
486
|
role: "button",
|
|
485
487
|
tabIndex: 0,
|
|
486
488
|
"data-slot": "async-select-clear",
|
|
487
|
-
className: "rounded-full border border-border/65 p-1 text-muted-foreground transition-colors hover:border-border hover:bg-muted/55 hover:text-foreground",
|
|
488
489
|
"aria-label": S?.clearAll ?? S?.clear ?? "Clear all",
|
|
489
490
|
onClick: nt,
|
|
490
491
|
onKeyDown: (e) => {
|
|
491
492
|
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), t(e), tt());
|
|
492
493
|
},
|
|
493
|
-
children: /* @__PURE__ */ s(se, {
|
|
494
|
+
children: /* @__PURE__ */ s(se, { "data-icon": "clear" })
|
|
494
495
|
}), /* @__PURE__ */ s(re, { className: "size-4 opacity-60" })]
|
|
495
496
|
})]
|
|
496
497
|
}), /* @__PURE__ */ c(ee, {
|
|
497
498
|
align: "start",
|
|
498
499
|
"data-slot": "async-select-content",
|
|
499
|
-
className: e("w-(--anchor-width) min-w-72 gap-3
|
|
500
|
+
className: e("w-(--anchor-width) min-w-72 gap-3", E),
|
|
500
501
|
children: [
|
|
501
502
|
/* @__PURE__ */ c("div", {
|
|
502
503
|
"data-slot": "async-select-search-wrap",
|
|
503
504
|
className: "relative",
|
|
504
|
-
children: [/* @__PURE__ */ s(oe, {
|
|
505
|
+
children: [/* @__PURE__ */ s(oe, { "data-slot": "async-select-search-icon" }), /* @__PURE__ */ s(r, {
|
|
505
506
|
"data-slot": "async-select-search",
|
|
506
507
|
value: I,
|
|
507
508
|
onChange: (e) => L(e.target.value),
|
|
@@ -511,7 +512,7 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
511
512
|
}),
|
|
512
513
|
/* @__PURE__ */ c("div", {
|
|
513
514
|
"data-slot": "async-select-meta",
|
|
514
|
-
className: "flex flex-wrap items-center justify-between gap-2
|
|
515
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
515
516
|
children: [
|
|
516
517
|
ze && S?.selectedCount && /* @__PURE__ */ s("span", { children: S.selectedCount(j.length) }),
|
|
517
518
|
Ve && (Ae?.(Q) ?? /* @__PURE__ */ s("span", { children: S?.maxSelected?.(x ?? j.length) ?? `Maximum ${x} selected` })),
|
|
@@ -520,13 +521,11 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
520
521
|
children: [Ge && /* @__PURE__ */ s("button", {
|
|
521
522
|
type: "button",
|
|
522
523
|
"data-slot": "async-select-meta-action",
|
|
523
|
-
className: "rounded-[var(--radius-sm)] border border-border/75 px-2.5 py-1 font-medium text-foreground transition-colors hover:bg-background",
|
|
524
524
|
onClick: $e,
|
|
525
525
|
children: S?.selectAll ?? "Select all"
|
|
526
526
|
}), Be && /* @__PURE__ */ s("button", {
|
|
527
527
|
type: "button",
|
|
528
528
|
"data-slot": "async-select-meta-action",
|
|
529
|
-
className: "rounded-[var(--radius-sm)] border border-border/75 px-2.5 py-1 font-medium text-foreground transition-colors hover:bg-background",
|
|
530
529
|
onClick: () => u?.([], []),
|
|
531
530
|
children: S?.clearAll ?? S?.clear ?? "Clear all"
|
|
532
531
|
})]
|
|
@@ -534,7 +533,7 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
534
533
|
]
|
|
535
534
|
}),
|
|
536
535
|
/* @__PURE__ */ c("div", {
|
|
537
|
-
className: "max-h-72
|
|
536
|
+
className: "flex max-h-72 flex-col gap-1 overflow-y-auto pr-1",
|
|
538
537
|
children: [
|
|
539
538
|
$ && X.length === 0 && (ke?.(Q) ?? /* @__PURE__ */ s(p, { children: S?.minSearchLength?.(b) ?? `Type at least ${b} characters` })),
|
|
540
539
|
H && (Ee?.(Q) ?? /* @__PURE__ */ s(p, { children: /* @__PURE__ */ c("span", {
|
|
@@ -542,7 +541,7 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
542
541
|
children: [/* @__PURE__ */ s(ie, { className: "size-4 animate-spin" }), S?.loading ?? "Loading..."]
|
|
543
542
|
}) })),
|
|
544
543
|
!H && G && (Oe?.(Q) ?? /* @__PURE__ */ s(p, {
|
|
545
|
-
|
|
544
|
+
"data-tone": "danger",
|
|
546
545
|
children: S?.error ?? "Could not load options"
|
|
547
546
|
})),
|
|
548
547
|
!H && !G && !$ && X.length === 0 && !Ue && (De?.(Q) ?? /* @__PURE__ */ s(p, { children: S?.empty ?? "No options found" })),
|
|
@@ -573,7 +572,14 @@ function h({ className: ne, value: ae, selectedOptions: l, onValueChange: u, loa
|
|
|
573
572
|
});
|
|
574
573
|
}
|
|
575
574
|
function g(e) {
|
|
576
|
-
|
|
575
|
+
if (e.isMulti) {
|
|
576
|
+
let { isMulti: t, ...n } = e;
|
|
577
|
+
return /* @__PURE__ */ s(h, {
|
|
578
|
+
"data-multi": t,
|
|
579
|
+
...n
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return /* @__PURE__ */ s(m, { ...e });
|
|
577
583
|
}
|
|
578
584
|
//#endregion
|
|
579
585
|
export { h as AsyncMultiSelect, g as AsyncSelect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=/^#?([0-9a-f]{6})([0-9a-f]{2})?$/i;function a(e,t=`#000000`){let n=e.trim().match(i);return n?`#${n[1].toLowerCase()}${n[2]?.toLowerCase()??``}`:t}function o(e){return a(e).slice(0,7)}function s(e){let t=a(e);return t.length===9?Math.round(Number.parseInt(t.slice(7,9),16)/255*100):100}function c(e,t,n){let r=o(e);return n?`${r}${Math.round(Math.min(100,Math.max(0,t))/100*255).toString(16).padStart(2,`0`)}`:r}function l({value:e,defaultValue:a=`#2563eb`,onValueChange:l,swatches:u=[`#0f172a`,`#2563eb`,`#059669`,`#d97706`,`#dc2626`,`#7c3aed`],showAlpha:d=!1,disabled:f=!1,label:p,labels:m,className:h,...g}){let[_,v]=n.useState(()=>c(a,s(a),d)),y=c(e??_,s(e??_),d),[b,x]=n.useState(y);n.useEffect(()=>x(y),[y]);let S=t=>{let n=c(t,s(t),d);e===void 0&&v(n),l?.(n)},C=()=>{if(!i.test(b.trim())){x(y);return}S(b)};return(0,r.jsxs)(`div`,{"data-slot":`color-picker`,className:t.cn(`grid gap-3`,h),...g,children:[p?(0,r.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:p}):null,(0,r.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,r.jsxs)(`label`,{className:`relative size-10 shrink-0 overflow-hidden rounded-md border bg-background shadow-sm focus-within:ring-2 focus-within:ring-ring`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:m?.color??`Choose color`}),(0,r.jsx)(`input`,{type:`color`,"aria-label":m?.color??`Choose color`,value:o(y),disabled:f,className:`absolute -inset-2 size-14 cursor-pointer border-0 bg-transparent p-0 disabled:cursor-not-allowed`,onChange:e=>S(c(e.target.value,s(y),d))})]}),(0,r.jsx)(`input`,{"aria-label":m?.hex??`Hex color`,value:b,disabled:f,spellCheck:!1,className:`h-10 min-w-0 flex-1 rounded-md border bg-background px-3 font-mono text-sm uppercase outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onChange:e=>x(e.target.value),onBlur:C,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),C()),e.key===`Escape`&&x(y)}})]}),d?(0,r.jsxs)(`label`,{className:`grid grid-cols-[1fr_auto] items-center gap-3 text-xs text-muted-foreground`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:m?.alpha??`Opacity`}),(0,r.jsx)(`input`,{type:`range`,min:`0`,max:`100`,value:s(y),disabled:f,"aria-label":m?.alpha??`Opacity`,className:`w-full accent-foreground disabled:cursor-not-allowed`,onChange:e=>S(c(y,Number(e.target.value),!0))}),(0,r.jsxs)(`span`,{className:`w-10 text-right tabular-nums`,children:[s(y),`%`]})]}):null,u.length>0?(0,r.jsx)(`div`,{role:`list`,"aria-label":`Color swatches`,className:`flex flex-wrap gap-2`,children:u.map(e=>{let t=c(e,s(y),d),n=o(t)===o(y);return(0,r.jsx)(`button`,{type:`button`,role:`listitem`,"aria-label":`Use ${e}`,"aria-pressed":n,disabled:f,className:`size-7 rounded-md border border-black/10 shadow-sm outline-none ring-offset-2 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,style:{backgroundColor:o(t)},onClick:()=>S(t)},e)})}):null]})}exports.ColorPicker=l,exports.getAlphaPercent=s,exports.normalizeHexColor=a,exports.withAlpha=c;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/inputs/color-picker.tsx
|
|
6
|
+
var i = /^#?([0-9a-f]{6})([0-9a-f]{2})?$/i;
|
|
7
|
+
function a(e, t = "#000000") {
|
|
8
|
+
let n = e.trim().match(i);
|
|
9
|
+
return n ? `#${n[1].toLowerCase()}${n[2]?.toLowerCase() ?? ""}` : t;
|
|
10
|
+
}
|
|
11
|
+
function o(e) {
|
|
12
|
+
return a(e).slice(0, 7);
|
|
13
|
+
}
|
|
14
|
+
function s(e) {
|
|
15
|
+
let t = a(e);
|
|
16
|
+
return t.length === 9 ? Math.round(Number.parseInt(t.slice(7, 9), 16) / 255 * 100) : 100;
|
|
17
|
+
}
|
|
18
|
+
function c(e, t, n) {
|
|
19
|
+
let r = o(e);
|
|
20
|
+
return n ? `${r}${Math.round(Math.min(100, Math.max(0, t)) / 100 * 255).toString(16).padStart(2, "0")}` : r;
|
|
21
|
+
}
|
|
22
|
+
function l({ value: a, defaultValue: l = "#2563eb", onValueChange: u, swatches: d = [
|
|
23
|
+
"#0f172a",
|
|
24
|
+
"#2563eb",
|
|
25
|
+
"#059669",
|
|
26
|
+
"#d97706",
|
|
27
|
+
"#dc2626",
|
|
28
|
+
"#7c3aed"
|
|
29
|
+
], showAlpha: f = !1, disabled: p = !1, label: m, labels: h, className: g, ..._ }) {
|
|
30
|
+
let [v, y] = t.useState(() => c(l, s(l), f)), b = c(a ?? v, s(a ?? v), f), [x, S] = t.useState(b);
|
|
31
|
+
t.useEffect(() => S(b), [b]);
|
|
32
|
+
let C = (e) => {
|
|
33
|
+
let t = c(e, s(e), f);
|
|
34
|
+
a === void 0 && y(t), u?.(t);
|
|
35
|
+
}, w = () => {
|
|
36
|
+
if (!i.test(x.trim())) {
|
|
37
|
+
S(b);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
C(x);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ r("div", {
|
|
43
|
+
"data-slot": "color-picker",
|
|
44
|
+
className: e("grid gap-3", g),
|
|
45
|
+
..._,
|
|
46
|
+
children: [
|
|
47
|
+
m ? /* @__PURE__ */ n("div", {
|
|
48
|
+
className: "text-sm font-medium text-foreground",
|
|
49
|
+
children: m
|
|
50
|
+
}) : null,
|
|
51
|
+
/* @__PURE__ */ r("div", {
|
|
52
|
+
className: "flex min-w-0 items-center gap-2",
|
|
53
|
+
children: [/* @__PURE__ */ r("label", {
|
|
54
|
+
className: "relative size-10 shrink-0 overflow-hidden rounded-md border bg-background shadow-sm focus-within:ring-2 focus-within:ring-ring",
|
|
55
|
+
children: [/* @__PURE__ */ n("span", {
|
|
56
|
+
className: "sr-only",
|
|
57
|
+
children: h?.color ?? "Choose color"
|
|
58
|
+
}), /* @__PURE__ */ n("input", {
|
|
59
|
+
type: "color",
|
|
60
|
+
"aria-label": h?.color ?? "Choose color",
|
|
61
|
+
value: o(b),
|
|
62
|
+
disabled: p,
|
|
63
|
+
className: "absolute -inset-2 size-14 cursor-pointer border-0 bg-transparent p-0 disabled:cursor-not-allowed",
|
|
64
|
+
onChange: (e) => C(c(e.target.value, s(b), f))
|
|
65
|
+
})]
|
|
66
|
+
}), /* @__PURE__ */ n("input", {
|
|
67
|
+
"aria-label": h?.hex ?? "Hex color",
|
|
68
|
+
value: x,
|
|
69
|
+
disabled: p,
|
|
70
|
+
spellCheck: !1,
|
|
71
|
+
className: "h-10 min-w-0 flex-1 rounded-md border bg-background px-3 font-mono text-sm uppercase outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
72
|
+
onChange: (e) => S(e.target.value),
|
|
73
|
+
onBlur: w,
|
|
74
|
+
onKeyDown: (e) => {
|
|
75
|
+
e.key === "Enter" && (e.preventDefault(), w()), e.key === "Escape" && S(b);
|
|
76
|
+
}
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
f ? /* @__PURE__ */ r("label", {
|
|
80
|
+
className: "grid grid-cols-[1fr_auto] items-center gap-3 text-xs text-muted-foreground",
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ n("span", {
|
|
83
|
+
className: "sr-only",
|
|
84
|
+
children: h?.alpha ?? "Opacity"
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ n("input", {
|
|
87
|
+
type: "range",
|
|
88
|
+
min: "0",
|
|
89
|
+
max: "100",
|
|
90
|
+
value: s(b),
|
|
91
|
+
disabled: p,
|
|
92
|
+
"aria-label": h?.alpha ?? "Opacity",
|
|
93
|
+
className: "w-full accent-foreground disabled:cursor-not-allowed",
|
|
94
|
+
onChange: (e) => C(c(b, Number(e.target.value), !0))
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ r("span", {
|
|
97
|
+
className: "w-10 text-right tabular-nums",
|
|
98
|
+
children: [s(b), "%"]
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}) : null,
|
|
102
|
+
d.length > 0 ? /* @__PURE__ */ n("div", {
|
|
103
|
+
role: "list",
|
|
104
|
+
"aria-label": "Color swatches",
|
|
105
|
+
className: "flex flex-wrap gap-2",
|
|
106
|
+
children: d.map((e) => {
|
|
107
|
+
let t = c(e, s(b), f), r = o(t) === o(b);
|
|
108
|
+
return /* @__PURE__ */ n("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
role: "listitem",
|
|
111
|
+
"aria-label": `Use ${e}`,
|
|
112
|
+
"aria-pressed": r,
|
|
113
|
+
disabled: p,
|
|
114
|
+
className: "size-7 rounded-md border border-black/10 shadow-sm outline-none ring-offset-2 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
115
|
+
style: { backgroundColor: o(t) },
|
|
116
|
+
onClick: () => C(t)
|
|
117
|
+
}, e);
|
|
118
|
+
})
|
|
119
|
+
}) : null
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { l as ColorPicker, s as getAlphaPercent, a as normalizeHexColor, c as withAlpha };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../showcase/create-demo.cjs");var t=e.createShowcaseDemoRegistry([e.component(`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../showcase/create-demo.cjs");var t=e.createShowcaseDemoRegistry([e.component(`async-select`,`AsyncSelect`,`inputs`,`Remote select member for server search, hydration and large datasets.`),e.component(`slider`,`Slider`,`inputs`,`Single value range control for density, threshold, and score tuning.`),e.component(`range-slider`,`RangeSlider`,`inputs`,`Two-handle slider for min/max filtering.`),e.component(`rating`,`Rating`,`inputs`,`Compact score input for feedback and review flows.`),e.component(`otp-input`,`OtpInput`,`inputs`,`One-time code entry with fixed-length slots.`),e.component(`color-input`,`ColorInput`,`inputs`,`Theme and accent color field with native color selection.`),e.component(`inline-editable`,`InlineEditable`,`inputs`,`Inline text editing for compact dashboards and settings tables.`),e.component(`tag-input`,`TagInput`,`inputs`,`Tokenized text input for labels, skills, and quick filters.`)]);exports.inputsShowcaseDemoRegistry=t;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { component as e, createShowcaseDemoRegistry as t } from "../../showcase/create-demo.js";
|
|
2
2
|
//#region src/components/inputs/demo.tsx
|
|
3
3
|
var n = t([
|
|
4
|
-
e("password-input", "PasswordInput", "inputs", "Password field with visibility toggle and secure autocomplete defaults."),
|
|
5
|
-
e("number-input", "NumberInput", "inputs", "Numeric entry surface for counts, thresholds and dashboard filters."),
|
|
6
|
-
e("phone-input", "PhoneInput", "inputs", "Masked phone entry that preserves stable value handling in forms."),
|
|
7
|
-
e("money-input", "MoneyInput", "inputs", "Currency-focused value entry for invoices, pricing and finance screens."),
|
|
8
|
-
e("date-input", "DateInput", "inputs", "Single-date entry with normalized string value handling."),
|
|
9
|
-
e("date-range-input", "DateRangeInput", "inputs", "Range-based date entry for reporting, booking and filter flows."),
|
|
10
|
-
e("simple-select", "SimpleSelect", "inputs", "Static select member for local option sets and lightweight filter panels."),
|
|
11
4
|
e("async-select", "AsyncSelect", "inputs", "Remote select member for server search, hydration and large datasets."),
|
|
12
|
-
e("combobox", "Combobox", "inputs", "Local searchable choice input for reassignment and command-like selection."),
|
|
13
5
|
e("slider", "Slider", "inputs", "Single value range control for density, threshold, and score tuning."),
|
|
14
6
|
e("range-slider", "RangeSlider", "inputs", "Two-handle slider for min/max filtering."),
|
|
15
7
|
e("rating", "Rating", "inputs", "Compact score input for feedback and review flows."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./async-select.cjs"),t=require("./otp-input.cjs"),n=require("./rating.cjs"),r=require("./slider.cjs"),i=require("./tag-input.cjs"),a=require("./inline-editable.cjs"),o=require("./json-input.cjs"),s=require("./time-picker.cjs");exports.AsyncMultiSelect=e.AsyncMultiSelect,exports.AsyncSelect=e.AsyncSelect,exports.DateTimePicker=s.DateTimePicker,exports.InlineEditable=a.InlineEditable,exports.JsonInput=o.JsonInput,exports.OtpInput=t.OtpInput,exports.RangeSlider=r.RangeSlider,exports.Rating=n.Rating,exports.Slider=r.Slider,exports.TagInput=i.TagInput,exports.TimePicker=s.TimePicker,exports.TimeRangePicker=s.TimeRangePicker;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./async-select.cjs"),t=require("./otp-input.cjs"),n=require("./rating.cjs"),r=require("./slider.cjs"),i=require("./tag-input.cjs"),a=require("./inline-editable.cjs"),o=require("./json-input.cjs"),s=require("./time-picker.cjs"),c=require("./color-picker.cjs"),l=require("./signature-pad.cjs");exports.AsyncMultiSelect=e.AsyncMultiSelect,exports.AsyncSelect=e.AsyncSelect,exports.ColorPicker=c.ColorPicker,exports.DateTimePicker=s.DateTimePicker,exports.InlineEditable=a.InlineEditable,exports.JsonInput=o.JsonInput,exports.OtpInput=t.OtpInput,exports.RangeSlider=r.RangeSlider,exports.Rating=n.Rating,exports.SignaturePad=l.SignaturePad,exports.Slider=r.Slider,exports.TagInput=i.TagInput,exports.TimePicker=s.TimePicker,exports.TimeRangePicker=s.TimeRangePicker,exports.drawSignature=l.drawSignature,exports.getAlphaPercent=c.getAlphaPercent,exports.normalizeHexColor=c.normalizeHexColor,exports.withAlpha=c.withAlpha;
|
|
@@ -6,4 +6,6 @@ import { TagInput as o } from "./tag-input.js";
|
|
|
6
6
|
import { InlineEditable as s } from "./inline-editable.js";
|
|
7
7
|
import { JsonInput as c } from "./json-input.js";
|
|
8
8
|
import { DateTimePicker as l, TimePicker as u, TimeRangePicker as d } from "./time-picker.js";
|
|
9
|
-
|
|
9
|
+
import { ColorPicker as f, getAlphaPercent as p, normalizeHexColor as m, withAlpha as h } from "./color-picker.js";
|
|
10
|
+
import { SignaturePad as g, drawSignature as _ } from "./signature-pad.js";
|
|
11
|
+
export { e as AsyncMultiSelect, t as AsyncSelect, f as ColorPicker, l as DateTimePicker, s as InlineEditable, c as JsonInput, n as OtpInput, i as RangeSlider, r as Rating, g as SignaturePad, a as Slider, o as TagInput, u as TimePicker, d as TimeRangePicker, _ as drawSignature, p as getAlphaPercent, m as normalizeHexColor, h as withAlpha };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./async-select.cjs"),t=require("./otp-input.cjs"),n=require("./rating.cjs"),r=require("./slider.cjs"),i=require("./tag-input.cjs"),a=require("./inline-editable.cjs"),o=require("./json-input.cjs"),s=require("./time-picker.cjs");exports.AsyncMultiSelect=e.AsyncMultiSelect,exports.AsyncSelect=e.AsyncSelect,exports.DateTimePicker=s.DateTimePicker,exports.InlineEditable=a.InlineEditable,exports.JsonInput=o.JsonInput,exports.OtpInput=t.OtpInput,exports.RangeSlider=r.RangeSlider,exports.Rating=n.Rating,exports.Slider=r.Slider,exports.TagInput=i.TagInput,exports.TimePicker=s.TimePicker,exports.TimeRangePicker=s.TimeRangePicker;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./async-select.cjs"),t=require("./otp-input.cjs"),n=require("./rating.cjs"),r=require("./slider.cjs"),i=require("./tag-input.cjs"),a=require("./inline-editable.cjs"),o=require("./json-input.cjs"),s=require("./time-picker.cjs"),c=require("./color-picker.cjs"),l=require("./signature-pad.cjs");exports.AsyncMultiSelect=e.AsyncMultiSelect,exports.AsyncSelect=e.AsyncSelect,exports.ColorPicker=c.ColorPicker,exports.DateTimePicker=s.DateTimePicker,exports.InlineEditable=a.InlineEditable,exports.JsonInput=o.JsonInput,exports.OtpInput=t.OtpInput,exports.RangeSlider=r.RangeSlider,exports.Rating=n.Rating,exports.SignaturePad=l.SignaturePad,exports.Slider=r.Slider,exports.TagInput=i.TagInput,exports.TimePicker=s.TimePicker,exports.TimeRangePicker=s.TimeRangePicker,exports.drawSignature=l.drawSignature,exports.getAlphaPercent=c.getAlphaPercent,exports.normalizeHexColor=c.normalizeHexColor,exports.withAlpha=c.withAlpha;
|
|
@@ -6,4 +6,6 @@ import { TagInput as o } from "./tag-input.js";
|
|
|
6
6
|
import { InlineEditable as s } from "./inline-editable.js";
|
|
7
7
|
import { JsonInput as c } from "./json-input.js";
|
|
8
8
|
import { DateTimePicker as l, TimePicker as u, TimeRangePicker as d } from "./time-picker.js";
|
|
9
|
-
|
|
9
|
+
import { ColorPicker as f, getAlphaPercent as p, normalizeHexColor as m, withAlpha as h } from "./color-picker.js";
|
|
10
|
+
import { SignaturePad as g, drawSignature as _ } from "./signature-pad.js";
|
|
11
|
+
export { e as AsyncMultiSelect, t as AsyncSelect, f as ColorPicker, l as DateTimePicker, s as InlineEditable, c as JsonInput, n as OtpInput, i as RangeSlider, r as Rating, g as SignaturePad, a as Slider, o as TagInput, u as TimePicker, d as TimeRangePicker, _ as drawSignature, p as getAlphaPercent, m as normalizeHexColor, h as withAlpha };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");function a(e,t,n){let r=e.getContext(`2d`);if(r){r.clearRect(0,0,e.width,e.height),r.fillStyle=n.backgroundColor,r.fillRect(0,0,e.width,e.height),r.strokeStyle=n.color,r.fillStyle=n.color,r.lineCap=`round`,r.lineJoin=`round`;for(let i of t)if(i.length!==0){if(i.length===1){let t=i[0];r.beginPath(),r.arc(t.x*e.width,t.y*e.height,n.lineWidth/2,0,Math.PI*2),r.fill();continue}r.beginPath(),i.forEach((t,n)=>{let i=t.x*e.width,a=t.y*e.height;n===0?r.moveTo(i,a):r.lineTo(i,a)}),r.lineWidth=n.lineWidth,r.stroke()}}}var o=n.forwardRef(function({value:e,defaultValue:o=[],onValueChange:s,onStrokeEnd:c,width:l=640,height:u=240,lineWidth:d=2.5,color:f=`#111827`,backgroundColor:p=`#ffffff`,disabled:m=!1,labels:h,className:g,..._},v){let y=n.useRef(null),b=n.useRef(null),[x,S]=n.useState(o),C=e??x,w=n.useCallback(t=>{e===void 0&&S(t),s?.(t)},[s,e]),T=n.useCallback(()=>w([]),[w]),E=n.useCallback(()=>w(C.slice(0,-1)),[C,w]);n.useImperativeHandle(v,()=>({clear:T,undo:E,toDataURL:(e=`image/png`,t)=>y.current?.toDataURL(e,t)??``}),[T,E]),n.useEffect(()=>{let e=y.current;e&&a(e,C,{color:f,lineWidth:d,backgroundColor:p})},[p,f,u,d,C,l]);let D=e=>{let t=e.currentTarget.getBoundingClientRect();return{x:Math.min(1,Math.max(0,(e.clientX-t.left)/Math.max(t.width,1))),y:Math.min(1,Math.max(0,(e.clientY-t.top)/Math.max(t.height,1))),pressure:e.pressure||.5}};return(0,i.jsxs)(`div`,{"data-slot":`signature-pad`,className:t.cn(`grid gap-2`,g),..._,children:[(0,i.jsx)(`canvas`,{ref:y,width:l,height:u,role:`img`,"aria-label":h?.canvas??`Signature pad`,"data-disabled":m||void 0,className:`w-full touch-none rounded-md border bg-white shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60`,style:{aspectRatio:`${l} / ${u}`},tabIndex:m?-1:0,onPointerDown:e=>{if(m)return;let t=[D(e)];b.current={base:C,stroke:t},e.currentTarget.setPointerCapture(e.pointerId),w([...C,t])},onPointerMove:e=>{let t=b.current;if(!t||m||!e.currentTarget.hasPointerCapture(e.pointerId))return;let n=[...t.stroke,D(e)];b.current={...t,stroke:n},w([...t.base,n])},onPointerUp:e=>{let t=b.current;t&&(b.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),c?.(t.stroke))},onPointerCancel:()=>{b.current=null}}),(0,i.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,i.jsxs)(`button`,{type:`button`,disabled:m||C.length===0,className:`inline-flex h-9 items-center gap-2 rounded-md border bg-background px-3 text-sm font-medium outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`,onClick:E,children:[(0,i.jsx)(r.RotateCcwIcon,{className:`size-4`,"aria-hidden":`true`}),h?.undo??`Undo`]}),(0,i.jsxs)(`button`,{type:`button`,disabled:m||C.length===0,className:`inline-flex h-9 items-center gap-2 rounded-md border bg-background px-3 text-sm font-medium outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`,onClick:T,children:[(0,i.jsx)(r.Trash2Icon,{className:`size-4`,"aria-hidden":`true`}),h?.clear??`Clear`]})]})]})});exports.SignaturePad=o,exports.drawSignature=a;
|