tembro 2.0.5 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/calendar/calendar.cjs +1 -1
- package/dist/components/calendar/calendar.d.ts +2 -1
- package/dist/components/calendar/calendar.js +126 -122
- package/dist/components/calendar/date-range-picker.cjs +1 -1
- package/dist/components/calendar/date-range-picker.d.ts +2 -1
- package/dist/components/calendar/date-range-picker.js +39 -39
- package/dist/components/charts/charts.cjs +1 -1
- package/dist/components/charts/charts.d.ts +13 -4
- package/dist/components/charts/charts.js +76 -46
- package/dist/components/charts/progress-ring.cjs +1 -1
- package/dist/components/charts/progress-ring.d.ts +3 -1
- package/dist/components/charts/progress-ring.js +11 -10
- package/dist/components/data-table/data-table-column-visibility-menu.cjs +1 -1
- package/dist/components/data-table/data-table-column-visibility-menu.d.ts +4 -1
- package/dist/components/data-table/data-table-column-visibility-menu.js +36 -8
- package/dist/components/data-table/data-table-pagination.cjs +1 -1
- package/dist/components/data-table/data-table-pagination.js +4 -4
- package/dist/components/data-table/data-table-toolbar.cjs +1 -1
- package/dist/components/data-table/data-table-toolbar.js +12 -13
- package/dist/components/data-table/data-table.cjs +1 -1
- package/dist/components/data-table/data-table.d.ts +2 -2
- package/dist/components/data-table/data-table.js +2 -1
- package/dist/components/display/carousel.cjs +1 -1
- package/dist/components/display/carousel.d.ts +15 -1
- package/dist/components/display/carousel.js +128 -86
- package/dist/components/display/code-block.cjs +2 -2
- package/dist/components/display/code-block.d.ts +2 -1
- package/dist/components/display/code-block.js +17 -12
- package/dist/components/display/delta-badge.cjs +1 -1
- package/dist/components/display/delta-badge.d.ts +2 -1
- package/dist/components/display/delta-badge.js +11 -7
- package/dist/components/display/kanban.cjs +1 -1
- package/dist/components/display/kanban.d.ts +4 -1
- package/dist/components/display/kanban.js +60 -33
- package/dist/components/display/metric-grid.cjs +1 -1
- package/dist/components/display/metric-grid.d.ts +1 -0
- package/dist/components/display/metric-grid.js +1 -1
- package/dist/components/display/qr-code.cjs +1 -1
- package/dist/components/display/qr-code.d.ts +2 -1
- package/dist/components/display/qr-code.js +19 -16
- package/dist/components/display/smart-card.d.ts +1 -1
- package/dist/components/display/status-legend.d.ts +1 -1
- package/dist/components/display/tag.cjs +1 -1
- package/dist/components/display/tag.d.ts +2 -1
- package/dist/components/display/tag.js +28 -22
- package/dist/components/display/tree-view.cjs +1 -1
- package/dist/components/display/tree-view.d.ts +9 -1
- package/dist/components/display/tree-view.js +104 -40
- package/dist/components/display/trend-card.cjs +1 -1
- package/dist/components/display/trend-card.js +27 -41
- package/dist/components/feedback/alert.cjs +1 -1
- package/dist/components/feedback/alert.d.ts +2 -1
- package/dist/components/feedback/alert.js +6 -6
- package/dist/components/feedback/loading-state.cjs +1 -1
- package/dist/components/feedback/loading-state.d.ts +3 -1
- package/dist/components/feedback/loading-state.js +23 -10
- package/dist/components/feedback/page-state.cjs +1 -1
- package/dist/components/feedback/page-state.d.ts +2 -1
- package/dist/components/feedback/page-state.js +7 -4
- package/dist/components/form/form-field-shell.cjs +1 -1
- package/dist/components/form/form-field-shell.d.ts +4 -2
- package/dist/components/form/form-field-shell.js +57 -41
- package/dist/components/form/form-input.cjs +1 -1
- package/dist/components/form/form-input.d.ts +3 -4
- package/dist/components/form/form-input.js +259 -257
- package/dist/components/form/form-select.cjs +1 -1
- package/dist/components/form/form-select.d.ts +2 -2
- package/dist/components/form/form-select.js +8 -6
- package/dist/components/form/form-switch.cjs +1 -1
- package/dist/components/form/form-switch.d.ts +1 -1
- package/dist/components/form/form-switch.js +58 -54
- package/dist/components/form/form-textarea.cjs +1 -1
- package/dist/components/form/form-textarea.d.ts +1 -1
- package/dist/components/form/form-textarea.js +29 -27
- package/dist/components/inputs/async-select.d.ts +3 -0
- package/dist/components/inputs/search-input.d.ts +3 -0
- package/dist/components/inputs/simple-select.cjs +1 -1
- package/dist/components/inputs/simple-select.d.ts +10 -32
- package/dist/components/inputs/simple-select.js +5 -101
- package/dist/components/layout/app-sidebar.cjs +1 -1
- package/dist/components/layout/app-sidebar.d.ts +1 -0
- package/dist/components/layout/app-sidebar.js +36 -36
- package/dist/components/layout/breadcrumbs.cjs +1 -1
- package/dist/components/layout/breadcrumbs.d.ts +2 -1
- package/dist/components/layout/breadcrumbs.js +7 -7
- package/dist/components/modern/calendar-scheduler.cjs +1 -1
- package/dist/components/modern/calendar-scheduler.d.ts +5 -1
- package/dist/components/modern/calendar-scheduler.js +47 -28
- package/dist/components/modern/dual-list-picker.cjs +1 -1
- package/dist/components/modern/dual-list-picker.d.ts +5 -1
- package/dist/components/modern/dual-list-picker.js +81 -23
- package/dist/components/modern/rich-text-editor.cjs +1 -1
- package/dist/components/modern/rich-text-editor.d.ts +3 -1
- package/dist/components/modern/rich-text-editor.js +12 -9
- package/dist/components/modern/tour.cjs +1 -1
- package/dist/components/modern/tour.d.ts +5 -1
- package/dist/components/modern/tour.js +57 -35
- package/dist/components/navigation/command-bar.cjs +1 -1
- package/dist/components/navigation/command-bar.d.ts +3 -1
- package/dist/components/navigation/command-bar.js +10 -7
- package/dist/components/navigation/demo.cjs +1 -1
- package/dist/components/navigation/demo.js +0 -1
- package/dist/components/navigation/nav-tabs.cjs +1 -1
- package/dist/components/navigation/nav-tabs.js +39 -27
- package/dist/components/navigation/page-tabs.cjs +1 -1
- package/dist/components/navigation/page-tabs.js +41 -30
- package/dist/components/navigation/pagination.cjs +1 -1
- package/dist/components/navigation/pagination.d.ts +7 -1
- package/dist/components/navigation/pagination.js +48 -25
- package/dist/components/notifications/notification-center.cjs +1 -1
- package/dist/components/notifications/notification-center.d.ts +3 -1
- package/dist/components/notifications/notification-center.js +56 -38
- package/dist/components/notifications/toast.cjs +1 -1
- package/dist/components/notifications/toast.d.ts +1 -0
- package/dist/components/notifications/toast.js +4 -0
- package/dist/components/overlay/alert-dialog.cjs +1 -1
- package/dist/components/overlay/alert-dialog.js +1 -1
- package/dist/components/overlay/confirm-dialog.cjs +1 -1
- package/dist/components/overlay/confirm-dialog.d.ts +4 -2
- package/dist/components/overlay/confirm-dialog.js +31 -22
- package/dist/components/overlay/drawer.cjs +1 -1
- package/dist/components/overlay/drawer.d.ts +3 -1
- package/dist/components/overlay/drawer.js +24 -16
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/badge/index.cjs +1 -1
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/badge/index.js +2 -1
- package/dist/components/ui/button/index.cjs +1 -1
- package/dist/components/ui/button/index.d.ts +2 -1
- package/dist/components/ui/button/index.js +13 -10
- package/dist/components/ui/card/index.cjs +1 -1
- package/dist/components/ui/card/index.d.ts +13 -2
- package/dist/components/ui/card/index.js +74 -49
- package/dist/components/ui/dialog/index.cjs +1 -1
- package/dist/components/ui/dialog/index.js +2 -1
- package/dist/components/ui/hover-card.cjs +1 -1
- package/dist/components/ui/hover-card.d.ts +11 -3
- package/dist/components/ui/hover-card.js +29 -24
- package/dist/components/ui/input/index.cjs +1 -1
- package/dist/components/ui/input/index.d.ts +9 -1
- package/dist/components/ui/input/index.js +63 -30
- package/dist/components/ui/popover/index.cjs +1 -1
- package/dist/components/ui/popover/index.d.ts +2 -2
- package/dist/components/ui/popover/index.js +6 -5
- package/dist/components/ui/radio-group/index.cjs +1 -1
- package/dist/components/ui/radio-group/index.d.ts +5 -1
- package/dist/components/ui/radio-group/index.js +50 -16
- package/dist/components/ui/right-click-menu/index.cjs +1 -1
- package/dist/components/ui/right-click-menu/index.d.ts +5 -1
- package/dist/components/ui/right-click-menu/index.js +77 -23
- package/dist/components/ui/segmented-control/index.cjs +1 -1
- package/dist/components/ui/segmented-control/index.d.ts +2 -1
- package/dist/components/ui/segmented-control/index.js +23 -11
- package/dist/components/ui/select/index.cjs +1 -1
- package/dist/components/ui/select/index.d.ts +40 -1
- package/dist/components/ui/select/index.js +159 -48
- package/dist/components/ui/switch/index.cjs +1 -1
- package/dist/components/ui/switch/index.d.ts +18 -0
- package/dist/components/ui/switch/index.js +47 -17
- package/dist/components/ui/tabs/index.cjs +1 -1
- package/dist/components/ui/tabs/index.d.ts +14 -4
- package/dist/components/ui/tabs/index.js +11 -8
- package/dist/components/ui/textarea/index.cjs +1 -1
- package/dist/components/ui/textarea/index.d.ts +10 -2
- package/dist/components/ui/textarea/index.js +37 -8
- package/dist/components/ui/textarea.cjs +1 -0
- package/dist/components/ui/textarea.d.ts +1 -0
- package/dist/components/ui/textarea.js +2 -0
- package/dist/components/ui/tooltip/index.cjs +1 -1
- package/dist/components/ui/tooltip/index.d.ts +11 -3
- package/dist/components/ui/tooltip/index.js +41 -20
- package/dist/components/upload/file-upload.cjs +1 -1
- package/dist/components/upload/file-upload.d.ts +8 -1
- package/dist/components/upload/file-upload.js +132 -100
- package/dist/components/upload/image-upload.cjs +1 -1
- package/dist/components/upload/image-upload.d.ts +5 -1
- package/dist/components/upload/image-upload.js +34 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +31 -31
- package/dist/public-component-surface.cjs +1 -1
- package/dist/public-component-surface.js +15 -0
- package/dist/showcase/component-api-schema.cjs +1 -1
- package/dist/showcase/component-api-schema.js +187 -10
- package/dist/showcase/create-demo.cjs +5 -4
- package/dist/showcase/create-demo.js +2 -2
- package/dist/showcase/fallback.cjs +3 -3
- package/dist/showcase/fallback.js +221 -243
- package/dist/showcase/premium/alert/showcase.cjs +1 -1
- package/dist/showcase/premium/alert/showcase.js +1 -0
- package/dist/showcase/premium/app-sidebar/showcase.cjs +1 -1
- package/dist/showcase/premium/app-sidebar/showcase.js +1 -0
- package/dist/showcase/premium/badge/showcase.cjs +1 -1
- package/dist/showcase/premium/badge/showcase.js +7 -0
- package/dist/showcase/premium/badge/types.d.ts +1 -1
- package/dist/showcase/premium/breadcrumbs/showcase.cjs +1 -1
- package/dist/showcase/premium/breadcrumbs/showcase.js +12 -1
- package/dist/showcase/premium/button/mock.cjs +1 -4
- package/dist/showcase/premium/button/mock.js +1 -1
- package/dist/showcase/premium/button/showcase.cjs +1 -1
- package/dist/showcase/premium/button/showcase.js +2 -2
- package/dist/showcase/premium/card/showcase.cjs +1 -1
- package/dist/showcase/premium/card/showcase.js +96 -47
- package/dist/showcase/premium/carousel/showcase.cjs +1 -1
- package/dist/showcase/premium/carousel/showcase.js +76 -49
- package/dist/showcase/premium/command-bar/showcase.cjs +1 -1
- package/dist/showcase/premium/command-bar/showcase.js +2 -0
- package/dist/showcase/premium/data-table/mock.cjs +12 -11
- package/dist/showcase/premium/data-table/mock.js +1 -1
- package/dist/showcase/premium/data-table/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table/showcase.js +1 -1
- package/dist/showcase/premium/data-table-parts/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table-parts/showcase.js +3 -1
- package/dist/showcase/premium/file-upload/showcase.cjs +1 -1
- package/dist/showcase/premium/file-upload/showcase.js +25 -4
- package/dist/showcase/premium/image-upload/showcase.cjs +1 -1
- package/dist/showcase/premium/image-upload/showcase.js +4 -1
- package/dist/showcase/premium/index.cjs +1 -1
- package/dist/showcase/premium/index.js +396 -402
- package/dist/showcase/premium/loading-state/showcase.cjs +1 -1
- package/dist/showcase/premium/loading-state/showcase.js +3 -1
- package/dist/showcase/premium/metric-grid/showcase.cjs +1 -1
- package/dist/showcase/premium/metric-grid/showcase.js +96 -28
- package/dist/showcase/premium/notification-center/showcase.cjs +1 -1
- package/dist/showcase/premium/notification-center/showcase.js +7 -3
- package/dist/showcase/premium/page-state/showcase.cjs +1 -1
- package/dist/showcase/premium/page-state/showcase.js +5 -1
- package/dist/showcase/premium/pagination/showcase.cjs +1 -1
- package/dist/showcase/premium/pagination/showcase.js +15 -2
- package/dist/showcase/premium/popover/showcase.cjs +1 -1
- package/dist/showcase/premium/popover/showcase.js +85 -50
- package/dist/showcase/premium/radio-group/showcase.cjs +1 -1
- package/dist/showcase/premium/radio-group/showcase.js +27 -4
- package/dist/showcase/premium/right-click-menu/showcase.cjs +1 -1
- package/dist/showcase/premium/right-click-menu/showcase.js +56 -43
- package/dist/showcase/premium/segmented-control/showcase.cjs +1 -1
- package/dist/showcase/premium/segmented-control/showcase.js +1 -0
- package/dist/showcase/premium/select/data.cjs +1 -1
- package/dist/showcase/premium/select/data.js +69 -34
- package/dist/showcase/premium/select/mock.cjs +20 -8
- package/dist/showcase/premium/select/mock.js +3 -2
- package/dist/showcase/premium/select/showcase.cjs +1 -1
- package/dist/showcase/premium/select/showcase.js +101 -86
- package/dist/showcase/premium/select/types.d.ts +3 -0
- package/dist/showcase/premium/statistic/showcase.cjs +1 -1
- package/dist/showcase/premium/statistic/showcase.js +57 -25
- package/dist/showcase/premium/switch/showcase.cjs +1 -1
- package/dist/showcase/premium/switch/showcase.js +25 -14
- package/dist/showcase/premium/tabs/showcase.cjs +1 -1
- package/dist/showcase/premium/tabs/showcase.js +171 -48
- package/dist/showcase/premium/textarea/mock.cjs +12 -4
- package/dist/showcase/premium/textarea/mock.js +1 -1
- package/dist/showcase/premium/textarea/showcase.cjs +1 -1
- package/dist/showcase/premium/textarea/showcase.js +8 -3
- package/dist/showcase/premium/toast/showcase.cjs +1 -1
- package/dist/showcase/premium/toast/showcase.js +32 -6
- package/dist/showcase/premium/types.d.ts +1 -1
- package/dist/showcase/registry-quality.cjs +1 -1
- package/dist/showcase/registry-quality.js +1 -0
- package/dist/showcase/registry-specific.cjs +1 -1
- package/dist/showcase/registry-specific.js +78 -74
- package/dist/showcase/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +90 -108
- package/dist/showcase/site-data.cjs +1 -1
- package/dist/showcase/site-data.js +60 -21
- package/dist/showcase/tembro-registry.json.cjs +1 -1
- package/dist/showcase/tembro-registry.json.js +34 -20
- package/dist/showcase/types.d.ts +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +31 -31
- package/packages/cli/vendor/src/components/calendar/calendar.tsx +59 -50
- package/packages/cli/vendor/src/components/calendar/date-range-picker.tsx +7 -4
- package/packages/cli/vendor/src/components/charts/charts.tsx +109 -66
- package/packages/cli/vendor/src/components/charts/progress-ring.tsx +37 -26
- package/packages/cli/vendor/src/components/data-table/data-table-column-visibility-menu.tsx +41 -22
- package/packages/cli/vendor/src/components/data-table/data-table-pagination.tsx +7 -7
- package/packages/cli/vendor/src/components/data-table/data-table-toolbar.tsx +8 -6
- package/packages/cli/vendor/src/components/data-table/data-table.tsx +21 -20
- package/packages/cli/vendor/src/components/display/carousel.tsx +102 -9
- package/packages/cli/vendor/src/components/display/code-block.tsx +22 -2
- package/packages/cli/vendor/src/components/display/delta-badge.tsx +11 -11
- package/packages/cli/vendor/src/components/display/kanban.tsx +103 -57
- package/packages/cli/vendor/src/components/display/metric-grid.tsx +16 -13
- package/packages/cli/vendor/src/components/display/qr-code.tsx +17 -15
- package/packages/cli/vendor/src/components/display/smart-card.tsx +1 -1
- package/packages/cli/vendor/src/components/display/status-legend.tsx +1 -1
- package/packages/cli/vendor/src/components/display/tag.tsx +39 -21
- package/packages/cli/vendor/src/components/display/tree-view.tsx +221 -84
- package/packages/cli/vendor/src/components/display/trend-card.tsx +6 -40
- package/packages/cli/vendor/src/components/feedback/alert.tsx +3 -1
- package/packages/cli/vendor/src/components/feedback/loading-state.tsx +33 -17
- package/packages/cli/vendor/src/components/feedback/page-state.tsx +8 -7
- package/packages/cli/vendor/src/components/form/form-field-shell.tsx +37 -8
- package/packages/cli/vendor/src/components/form/form-input.tsx +11 -12
- package/packages/cli/vendor/src/components/form/form-select.tsx +6 -4
- package/packages/cli/vendor/src/components/form/form-switch.tsx +9 -3
- package/packages/cli/vendor/src/components/form/form-textarea.tsx +6 -2
- package/packages/cli/vendor/src/components/inputs/async-select.tsx +11 -8
- package/packages/cli/vendor/src/components/inputs/search-input.tsx +5 -2
- package/packages/cli/vendor/src/components/inputs/simple-select.tsx +20 -190
- package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +3 -1
- package/packages/cli/vendor/src/components/layout/breadcrumbs.tsx +3 -1
- package/packages/cli/vendor/src/components/modern/calendar-scheduler.tsx +28 -13
- package/packages/cli/vendor/src/components/modern/dual-list-picker.tsx +103 -35
- package/packages/cli/vendor/src/components/modern/rich-text-editor.tsx +25 -22
- package/packages/cli/vendor/src/components/modern/tour.tsx +47 -29
- package/packages/cli/vendor/src/components/navigation/command-bar.tsx +6 -0
- package/packages/cli/vendor/src/components/navigation/demo.tsx +0 -1
- package/packages/cli/vendor/src/components/navigation/nav-tabs.tsx +38 -29
- package/packages/cli/vendor/src/components/navigation/page-tabs.tsx +35 -23
- package/packages/cli/vendor/src/components/navigation/pagination.tsx +65 -31
- package/packages/cli/vendor/src/components/notifications/notification-center.tsx +64 -39
- package/packages/cli/vendor/src/components/notifications/toast.tsx +23 -21
- package/packages/cli/vendor/src/components/overlay/alert-dialog.tsx +1 -1
- package/packages/cli/vendor/src/components/overlay/confirm-dialog.tsx +45 -22
- package/packages/cli/vendor/src/components/overlay/drawer.tsx +18 -5
- package/packages/cli/vendor/src/components/ui/accordion/index.tsx +4 -0
- package/packages/cli/vendor/src/components/ui/badge/index.tsx +2 -1
- package/packages/cli/vendor/src/components/ui/button/index.tsx +11 -5
- package/packages/cli/vendor/src/components/ui/card/index.tsx +95 -25
- package/packages/cli/vendor/src/components/ui/dialog/index.tsx +2 -1
- package/packages/cli/vendor/src/components/ui/hover-card.tsx +54 -28
- package/packages/cli/vendor/src/components/ui/input/index.tsx +98 -0
- package/packages/cli/vendor/src/components/ui/popover/index.tsx +10 -8
- package/packages/cli/vendor/src/components/ui/radio-group/index.tsx +55 -6
- package/packages/cli/vendor/src/components/ui/right-click-menu/index.tsx +120 -9
- package/packages/cli/vendor/src/components/ui/segmented-control/index.tsx +29 -3
- package/packages/cli/vendor/src/components/ui/select/index.tsx +260 -34
- package/packages/cli/vendor/src/components/ui/switch/index.tsx +71 -6
- package/packages/cli/vendor/src/components/ui/tabs/index.tsx +22 -6
- package/packages/cli/vendor/src/components/ui/textarea/index.tsx +105 -15
- package/packages/cli/vendor/src/components/ui/textarea.tsx +2 -0
- package/packages/cli/vendor/src/components/ui/tooltip/index.tsx +67 -22
- package/packages/cli/vendor/src/components/upload/file-upload.tsx +120 -57
- package/packages/cli/vendor/src/components/upload/image-upload.tsx +71 -24
- package/packages/cli/vendor/src/public-component-surface.ts +3 -0
- package/packages/cli/vendor/src/showcase/component-api-schema.ts +79 -41
- package/packages/cli/vendor/src/showcase/create-demo.tsx +16 -15
- package/packages/cli/vendor/src/showcase/fallback.tsx +4 -19
- package/packages/cli/vendor/src/showcase/premium/alert/showcase.tsx +1 -0
- package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +1 -0
- package/packages/cli/vendor/src/showcase/premium/badge/showcase.tsx +4 -2
- package/packages/cli/vendor/src/showcase/premium/badge/types.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/breadcrumbs/showcase.tsx +3 -1
- package/packages/cli/vendor/src/showcase/premium/button/mock.ts +2 -5
- package/packages/cli/vendor/src/showcase/premium/button/showcase.tsx +2 -2
- package/packages/cli/vendor/src/showcase/premium/card/showcase.tsx +26 -1
- package/packages/cli/vendor/src/showcase/premium/carousel/showcase.tsx +19 -3
- package/packages/cli/vendor/src/showcase/premium/command-bar/showcase.tsx +1 -1
- package/packages/cli/vendor/src/showcase/premium/data-table/mock.ts +26 -25
- package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/premium/file-upload/showcase.tsx +21 -1
- package/packages/cli/vendor/src/showcase/premium/image-upload/showcase.tsx +4 -1
- package/packages/cli/vendor/src/showcase/premium/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/loading-state/showcase.tsx +1 -1
- package/packages/cli/vendor/src/showcase/premium/metric-grid/showcase.tsx +36 -4
- package/packages/cli/vendor/src/showcase/premium/notification-center/showcase.tsx +4 -3
- package/packages/cli/vendor/src/showcase/premium/page-state/showcase.tsx +1 -0
- package/packages/cli/vendor/src/showcase/premium/pagination/showcase.tsx +13 -1
- package/packages/cli/vendor/src/showcase/premium/popover/showcase.tsx +27 -11
- package/packages/cli/vendor/src/showcase/premium/radio-group/showcase.tsx +13 -1
- package/packages/cli/vendor/src/showcase/premium/right-click-menu/showcase.tsx +8 -5
- package/packages/cli/vendor/src/showcase/premium/segmented-control/showcase.tsx +1 -0
- package/packages/cli/vendor/src/showcase/premium/select/data.ts +12 -3
- package/packages/cli/vendor/src/showcase/premium/select/mock.ts +4 -4
- package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +35 -22
- package/packages/cli/vendor/src/showcase/premium/select/types.ts +3 -0
- package/packages/cli/vendor/src/showcase/premium/statistic/showcase.tsx +10 -1
- package/packages/cli/vendor/src/showcase/premium/switch/showcase.tsx +15 -6
- package/packages/cli/vendor/src/showcase/premium/tabs/showcase.tsx +48 -1
- package/packages/cli/vendor/src/showcase/premium/textarea/mock.ts +12 -4
- package/packages/cli/vendor/src/showcase/premium/textarea/showcase.tsx +5 -0
- package/packages/cli/vendor/src/showcase/premium/toast/showcase.tsx +17 -1
- package/packages/cli/vendor/src/showcase/premium/types.ts +1 -1
- package/packages/cli/vendor/src/showcase/registry-quality.ts +3 -2
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +7 -8
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +5 -21
- package/packages/cli/vendor/src/showcase/site-data.tsx +21 -15
- package/packages/cli/vendor/src/showcase/tembro-registry.json +42 -20
- package/packages/cli/vendor/src/showcase/types.ts +1 -1
- package/registry.json +18 -6
|
@@ -18,14 +18,25 @@ type CardSurfaceSlots = {
|
|
|
18
18
|
media?: React.ReactNode;
|
|
19
19
|
content?: React.ReactNode;
|
|
20
20
|
footer?: React.ReactNode;
|
|
21
|
+
mediaClassName?: string;
|
|
22
|
+
bodyClassName?: string;
|
|
21
23
|
headerClassName?: string;
|
|
24
|
+
eyebrowClassName?: string;
|
|
22
25
|
titleClassName?: string;
|
|
23
26
|
descriptionClassName?: string;
|
|
24
27
|
contentClassName?: string;
|
|
25
28
|
footerClassName?: string;
|
|
26
29
|
};
|
|
27
|
-
export type
|
|
28
|
-
|
|
30
|
+
export type CardOrientation = "vertical" | "horizontal";
|
|
31
|
+
export type CardMediaAspect = "auto" | "square" | "video" | "poster" | "wide";
|
|
32
|
+
export type CardPadding = "none" | "sm" | "default" | "lg";
|
|
33
|
+
export type CardProps = Omit<React.ComponentProps<"div">, keyof CardSurfaceSlots> & VariantProps<typeof cardVariants> & CardSurfaceSlots & {
|
|
34
|
+
orientation?: CardOrientation;
|
|
35
|
+
mediaPosition?: "start" | "end";
|
|
36
|
+
mediaAspect?: CardMediaAspect;
|
|
37
|
+
padding?: CardPadding;
|
|
38
|
+
};
|
|
39
|
+
declare function Card({ className, variant, size, density, tone, interactive, selected, disabled, orientation, mediaPosition, mediaAspect, padding, tabIndex, eyebrow, title, description, badge, action, media, content, footer, mediaClassName, bodyClassName, headerClassName, eyebrowClassName, titleClassName, descriptionClassName, contentClassName, footerClassName, children, ...props }: CardProps): React.JSX.Element;
|
|
29
40
|
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
30
41
|
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
31
42
|
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -55,20 +55,36 @@ var a = t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded
|
|
|
55
55
|
function o(e) {
|
|
56
56
|
return e.eyebrow != null || e.title != null || e.description != null || e.badge != null || e.action != null || e.media != null || e.content != null || e.footer != null;
|
|
57
57
|
}
|
|
58
|
-
function s({ className: t, variant: s, size: m, density: h, tone: g, interactive: _, selected: v, disabled: y,
|
|
59
|
-
let
|
|
60
|
-
eyebrow:
|
|
61
|
-
title:
|
|
62
|
-
description:
|
|
63
|
-
badge:
|
|
64
|
-
action:
|
|
65
|
-
media:
|
|
66
|
-
content:
|
|
67
|
-
footer:
|
|
68
|
-
}),
|
|
58
|
+
function s({ className: t, variant: s, size: m, density: h, tone: g, interactive: _, selected: v, disabled: y, orientation: b = "vertical", mediaPosition: x = "start", mediaAspect: S = "auto", padding: C = "default", tabIndex: w, eyebrow: T, title: E, description: D, badge: O, action: k, media: A, content: j, footer: M, mediaClassName: N, bodyClassName: P, headerClassName: F, eyebrowClassName: I, titleClassName: L, descriptionClassName: R, contentClassName: z, footerClassName: B, children: V, ...H }) {
|
|
59
|
+
let U = o({
|
|
60
|
+
eyebrow: T,
|
|
61
|
+
title: E,
|
|
62
|
+
description: D,
|
|
63
|
+
badge: O,
|
|
64
|
+
action: k,
|
|
65
|
+
media: A,
|
|
66
|
+
content: j,
|
|
67
|
+
footer: M
|
|
68
|
+
}), W = j ?? V, G = T != null || E != null || D != null || O != null || k != null, K = M != null, q = A ? /* @__PURE__ */ r("div", {
|
|
69
|
+
"data-slot": "card-media",
|
|
70
|
+
"data-media-position": x,
|
|
71
|
+
"data-media-aspect": S,
|
|
72
|
+
className: e("overflow-hidden", b === "horizontal" ? "shrink-0 self-stretch" : "", S === "square" && (b === "horizontal" ? "w-40" : "aspect-square"), S === "video" && (b === "horizontal" ? "w-56" : "aspect-video"), S === "poster" && (b === "horizontal" ? "w-36" : "aspect-[3/4]"), S === "wide" && (b === "horizontal" ? "w-72" : "aspect-[16/7]"), N),
|
|
73
|
+
children: A
|
|
74
|
+
}) : null, J = {
|
|
75
|
+
none: "",
|
|
76
|
+
sm: "px-4",
|
|
77
|
+
default: "px-(--card-spacing)",
|
|
78
|
+
lg: "px-6"
|
|
79
|
+
}, Y = {
|
|
80
|
+
none: "",
|
|
81
|
+
sm: "pb-4",
|
|
82
|
+
default: "",
|
|
83
|
+
lg: "pb-6"
|
|
84
|
+
};
|
|
69
85
|
return /* @__PURE__ */ r("div", {
|
|
70
86
|
"data-slot": "card",
|
|
71
|
-
"data-surface":
|
|
87
|
+
"data-surface": U || void 0,
|
|
72
88
|
"data-size": m ?? "default",
|
|
73
89
|
"data-variant": s ?? "default",
|
|
74
90
|
"data-tone": g ?? "neutral",
|
|
@@ -76,9 +92,11 @@ function s({ className: t, variant: s, size: m, density: h, tone: g, interactive
|
|
|
76
92
|
"data-interactive": _ || void 0,
|
|
77
93
|
"data-selected": v || void 0,
|
|
78
94
|
"data-disabled": y || void 0,
|
|
79
|
-
"data-has-footer":
|
|
95
|
+
"data-has-footer": K || void 0,
|
|
96
|
+
"data-orientation": b,
|
|
97
|
+
"data-padding": C,
|
|
80
98
|
"aria-disabled": y || void 0,
|
|
81
|
-
tabIndex: _ && !y ?
|
|
99
|
+
tabIndex: _ && !y ? w ?? 0 : w,
|
|
82
100
|
className: e(a({
|
|
83
101
|
variant: s,
|
|
84
102
|
size: m,
|
|
@@ -87,42 +105,49 @@ function s({ className: t, variant: s, size: m, density: h, tone: g, interactive
|
|
|
87
105
|
interactive: _,
|
|
88
106
|
selected: v,
|
|
89
107
|
disabled: y
|
|
90
|
-
}), t),
|
|
91
|
-
...
|
|
92
|
-
children:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
}), b === "horizontal" && "flex-row py-0", _ && "hover:border-[color:var(--aui-control-hover-border,var(--ring))] hover:shadow-[var(--aui-card-shadow-hover,var(--aui-card-shadow,0_12px_32px_rgba(15,23,42,0.08)))]", v && "border-[color:var(--aui-control-border-strong,var(--ring))] shadow-[var(--aui-card-shadow-hover,var(--aui-card-shadow,0_12px_32px_rgba(15,23,42,0.08)))]", t),
|
|
109
|
+
...H,
|
|
110
|
+
children: U ? /* @__PURE__ */ i(n, { children: [
|
|
111
|
+
x === "start" ? q : null,
|
|
112
|
+
/* @__PURE__ */ i("div", {
|
|
113
|
+
"data-slot": "card-body",
|
|
114
|
+
className: e("flex min-w-0 flex-1 flex-col", b === "horizontal" ? "py-(--card-spacing)" : "", Y[C], P),
|
|
115
|
+
children: [
|
|
116
|
+
G ? /* @__PURE__ */ i(c, {
|
|
117
|
+
className: e(J[C], F),
|
|
118
|
+
children: [/* @__PURE__ */ i("div", {
|
|
119
|
+
className: "min-w-0 space-y-1",
|
|
120
|
+
children: [
|
|
121
|
+
T == null ? null : /* @__PURE__ */ r("div", {
|
|
122
|
+
className: e("text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/80", I),
|
|
123
|
+
children: T
|
|
124
|
+
}),
|
|
125
|
+
E == null ? null : /* @__PURE__ */ r(l, {
|
|
126
|
+
className: L,
|
|
127
|
+
children: E
|
|
128
|
+
}),
|
|
129
|
+
D == null ? null : /* @__PURE__ */ r(u, {
|
|
130
|
+
className: R,
|
|
131
|
+
children: D
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
}), O != null || k != null ? /* @__PURE__ */ i(d, {
|
|
135
|
+
className: "flex items-center gap-2",
|
|
136
|
+
children: [O, k]
|
|
137
|
+
}) : null]
|
|
138
|
+
}) : null,
|
|
139
|
+
W == null ? null : /* @__PURE__ */ r(f, {
|
|
140
|
+
className: e(J[C], z),
|
|
141
|
+
children: W
|
|
142
|
+
}),
|
|
143
|
+
K ? /* @__PURE__ */ r(p, {
|
|
144
|
+
className: e(J[C], B),
|
|
145
|
+
children: M
|
|
146
|
+
}) : null
|
|
147
|
+
]
|
|
120
148
|
}),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
children: O
|
|
124
|
-
}) : null
|
|
125
|
-
] }) : P
|
|
149
|
+
x === "end" ? q : null
|
|
150
|
+
] }) : V
|
|
126
151
|
});
|
|
127
152
|
}
|
|
128
153
|
function c({ className: t, ...n }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("../button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime"),o=require("@base-ui/react/dialog");function s({...e}){return(0,a.jsx)(o.Dialog.Root,{"data-slot":`dialog`,...e})}function c({...e}){return(0,a.jsx)(o.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return(0,a.jsx)(o.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return(0,a.jsx)(o.Dialog.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...n}){return(0,a.jsx)(o.Dialog.Backdrop,{"data-slot":`dialog-overlay`,className:t.cn(`fixed inset-0 isolate z-50 bg-[color-mix(in_oklch,var(--foreground),transparent_80%)] duration-100 supports-backdrop-filter:backdrop-blur-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...n})}function f({className:e,children:r,showCloseButton:s=!0,size:c=`md`,surface:u=`default`,...f}){return(0,a.jsxs)(l,{children:[(0,a.jsx)(d,{}),(0,a.jsxs)(o.Dialog.Popup,{"data-slot":`dialog-content`,"data-size":c,"data-surface":u,role:`dialog`,className:t.cn(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-5 overflow-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("../button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime"),o=require("@base-ui/react/dialog");function s({...e}){return(0,a.jsx)(o.Dialog.Root,{"data-slot":`dialog`,...e})}function c({...e}){return(0,a.jsx)(o.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return(0,a.jsx)(o.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return(0,a.jsx)(o.Dialog.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...n}){return(0,a.jsx)(o.Dialog.Backdrop,{"data-slot":`dialog-overlay`,className:t.cn(`fixed inset-0 isolate z-50 bg-[color-mix(in_oklch,var(--foreground),transparent_80%)] duration-100 supports-backdrop-filter:backdrop-blur-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...n})}function f({className:e,children:r,showCloseButton:s=!0,size:c=`md`,surface:u=`default`,...f}){return(0,a.jsxs)(l,{children:[(0,a.jsx)(d,{}),(0,a.jsxs)(o.Dialog.Popup,{"data-slot":`dialog-content`,"data-size":c,"data-surface":u,role:`dialog`,"aria-modal":`true`,className:t.cn(`fixed top-1/2 left-1/2 z-50 grid max-h-[min(92vh,calc(100dvh-2rem))] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-5 overflow-y-auto overscroll-contain rounded-[var(--radius-3xl)] border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-overlay-surface,var(--popover))] p-6 text-sm text-popover-foreground shadow-[var(--aui-control-panel-shadow,0_24px_70px_rgba(15,23,42,0.22))] backdrop-blur duration-100 outline-none data-[surface=plain]:overflow-visible data-[surface=plain]:border-transparent data-[surface=plain]:bg-transparent data-[surface=plain]:p-0 data-[surface=plain]:shadow-none data-[size=xs]:sm:max-w-sm data-[size=sm]:sm:max-w-md data-[size=md]:sm:max-w-lg data-[size=lg]:sm:max-w-2xl data-[size=xl]:sm:max-w-4xl data-[size=full]:h-[min(92vh,56rem)] data-[size=full]:max-w-[min(96vw,84rem)] data-[size=full]:grid-rows-[auto_minmax(0,1fr)] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...f,children:[r,s&&(0,a.jsxs)(o.Dialog.Close,{"data-slot":`dialog-close`,render:(0,a.jsx)(n.Button,{variant:`ghost`,className:`absolute top-3 right-3 rounded-full border border-transparent hover:border-border/50 hover:bg-muted/50`,size:`icon-sm`}),children:[(0,a.jsx)(i.XIcon,{}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function p({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`dialog-header`,className:t.cn(`flex flex-col gap-2.5`,e),...n})}function m({className:e,showCloseButton:r=!1,children:i,...s}){return(0,a.jsxs)(`div`,{"data-slot":`dialog-footer`,className:t.cn(`-mx-6 -mb-6 flex flex-col-reverse gap-2 border-t border-border/70 bg-muted/20 p-5 sm:flex-row sm:justify-end`,e),...s,children:[i,r&&(0,a.jsx)(o.Dialog.Close,{render:(0,a.jsx)(n.Button,{variant:`outline`}),children:`Close`})]})}function h({className:e,...n}){return(0,a.jsx)(o.Dialog.Title,{"data-slot":`dialog-title`,className:t.cn(`font-heading text-xl leading-tight font-semibold tracking-tight`,e),...n})}function g({className:e,...n}){return(0,a.jsx)(o.Dialog.Description,{"data-slot":`dialog-description`,className:t.cn(`text-sm leading-6 text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...n})}exports.Dialog=s,exports.DialogClose=u,exports.DialogContent=f,exports.DialogDescription=g,exports.DialogFooter=m,exports.DialogHeader=p,exports.DialogOverlay=d,exports.DialogPortal=l,exports.DialogTitle=h,exports.DialogTrigger=c;
|
|
@@ -42,7 +42,8 @@ function d({ className: o, children: s, showCloseButton: l = !0, size: d = "md",
|
|
|
42
42
|
"data-size": d,
|
|
43
43
|
"data-surface": f,
|
|
44
44
|
role: "dialog",
|
|
45
|
-
|
|
45
|
+
"aria-modal": "true",
|
|
46
|
+
className: e("fixed top-1/2 left-1/2 z-50 grid max-h-[min(92vh,calc(100dvh-2rem))] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-5 overflow-y-auto overscroll-contain rounded-[var(--radius-3xl)] border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-overlay-surface,var(--popover))] p-6 text-sm text-popover-foreground shadow-[var(--aui-control-panel-shadow,0_24px_70px_rgba(15,23,42,0.22))] backdrop-blur duration-100 outline-none data-[surface=plain]:overflow-visible data-[surface=plain]:border-transparent data-[surface=plain]:bg-transparent data-[surface=plain]:p-0 data-[surface=plain]:shadow-none data-[size=xs]:sm:max-w-sm data-[size=sm]:sm:max-w-md data-[size=md]:sm:max-w-lg data-[size=lg]:sm:max-w-2xl data-[size=xl]:sm:max-w-4xl data-[size=full]:h-[min(92vh,56rem)] data-[size=full]:max-w-[min(96vw,84rem)] data-[size=full]:grid-rows-[auto_minmax(0,1fr)] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
|
|
46
47
|
...p,
|
|
47
48
|
children: [s, l && /* @__PURE__ */ i(a.Close, {
|
|
48
49
|
"data-slot": "dialog-close",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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")
|
|
1
|
+
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"),i=require("@base-ui/react/preview-card");function a({trigger:e,content:n,side:a=`bottom`,align:o=`center`,sideOffset:s=10,alignOffset:c=0,collisionPadding:l=12,delay:u=450,closeDelay:d=180,disabled:f=!1,contentClassName:p,className:m,...h}){return f?(0,r.jsx)(`span`,{"data-slot":`hover-card`,className:t.cn(`inline-flex`,m),...h,children:e}):(0,r.jsxs)(i.PreviewCard.Root,{children:[(0,r.jsx)(i.PreviewCard.Trigger,{"data-slot":`hover-card-trigger`,delay:u,closeDelay:d,render:(0,r.jsx)(`span`,{"data-slot":`hover-card`,className:t.cn(`inline-flex`,m),...h}),children:e}),(0,r.jsx)(i.PreviewCard.Portal,{children:(0,r.jsx)(i.PreviewCard.Positioner,{className:`isolate z-50`,side:a,align:o,sideOffset:s,alignOffset:c,collisionPadding:l,children:(0,r.jsx)(i.PreviewCard.Popup,{"data-slot":`hover-card-content`,className:t.cn(`z-50 min-w-60 max-w-[min(24rem,calc(100vw-1rem))] origin-(--transform-origin) rounded-[var(--aui-card-radius,var(--radius-xl))] border border-border/80 bg-popover/98 p-4 text-sm text-popover-foreground shadow-[0_18px_42px_color-mix(in_oklch,var(--foreground),transparent_86%)] ring-1 ring-foreground/8 outline-hidden backdrop-blur duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,p),children:n})})})]})}exports.HoverCard=a;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
3
|
+
export type HoverCardProps = Omit<PreviewCardPrimitive.Root.Props, "children"> & Omit<React.ComponentProps<"span">, "content" | "children"> & {
|
|
3
4
|
trigger: React.ReactNode;
|
|
4
5
|
content: React.ReactNode;
|
|
5
|
-
side?: "
|
|
6
|
+
side?: PreviewCardPrimitive.Positioner.Props["side"];
|
|
7
|
+
align?: PreviewCardPrimitive.Positioner.Props["align"];
|
|
8
|
+
sideOffset?: PreviewCardPrimitive.Positioner.Props["sideOffset"];
|
|
9
|
+
alignOffset?: PreviewCardPrimitive.Positioner.Props["alignOffset"];
|
|
10
|
+
collisionPadding?: PreviewCardPrimitive.Positioner.Props["collisionPadding"];
|
|
11
|
+
delay?: PreviewCardPrimitive.Trigger.Props["delay"];
|
|
12
|
+
closeDelay?: PreviewCardPrimitive.Trigger.Props["closeDelay"];
|
|
13
|
+
disabled?: boolean;
|
|
6
14
|
contentClassName?: string;
|
|
7
15
|
};
|
|
8
|
-
declare function HoverCard({ trigger, content, side, contentClassName, className,
|
|
16
|
+
declare function HoverCard({ trigger, content, side, align, sideOffset, alignOffset, collisionPadding, delay, closeDelay, disabled, contentClassName, className, ...props }: HoverCardProps): React.JSX.Element;
|
|
9
17
|
export { HoverCard };
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { PreviewCard as r } from "@base-ui/react/preview-card";
|
|
4
5
|
//#region src/components/ui/hover-card.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
right: "left-full top-1/2 ml-2.5 -translate-y-1/2",
|
|
8
|
-
bottom: "left-1/2 top-full mt-2.5 -translate-x-1/2",
|
|
9
|
-
left: "right-full top-1/2 mr-2.5 -translate-y-1/2"
|
|
10
|
-
};
|
|
11
|
-
function i({ trigger: i, content: a, side: o = "bottom", contentClassName: s, className: c, children: l, ...u }) {
|
|
12
|
-
return /* @__PURE__ */ n("div", {
|
|
6
|
+
function i({ trigger: i, content: a, side: o = "bottom", align: s = "center", sideOffset: c = 10, alignOffset: l = 0, collisionPadding: u = 12, delay: d = 450, closeDelay: f = 180, disabled: p = !1, contentClassName: m, className: h, ...g }) {
|
|
7
|
+
return p ? /* @__PURE__ */ t("span", {
|
|
13
8
|
"data-slot": "hover-card",
|
|
14
|
-
className: e("
|
|
15
|
-
...
|
|
16
|
-
children:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
className: e("inline-flex", h),
|
|
10
|
+
...g,
|
|
11
|
+
children: i
|
|
12
|
+
}) : /* @__PURE__ */ n(r.Root, { children: [/* @__PURE__ */ t(r.Trigger, {
|
|
13
|
+
"data-slot": "hover-card-trigger",
|
|
14
|
+
delay: d,
|
|
15
|
+
closeDelay: f,
|
|
16
|
+
render: /* @__PURE__ */ t("span", {
|
|
17
|
+
"data-slot": "hover-card",
|
|
18
|
+
className: e("inline-flex", h),
|
|
19
|
+
...g
|
|
20
|
+
}),
|
|
21
|
+
children: i
|
|
22
|
+
}), /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(r.Positioner, {
|
|
23
|
+
className: "isolate z-50",
|
|
24
|
+
side: o,
|
|
25
|
+
align: s,
|
|
26
|
+
sideOffset: c,
|
|
27
|
+
alignOffset: l,
|
|
28
|
+
collisionPadding: u,
|
|
29
|
+
children: /* @__PURE__ */ t(r.Popup, {
|
|
30
|
+
"data-slot": "hover-card-content",
|
|
31
|
+
className: e("z-50 min-w-60 max-w-[min(24rem,calc(100vw-1rem))] origin-(--transform-origin) rounded-[var(--aui-card-radius,var(--radius-xl))] border border-border/80 bg-popover/98 p-4 text-sm text-popover-foreground shadow-[0_18px_42px_color-mix(in_oklch,var(--foreground),transparent_86%)] ring-1 ring-foreground/8 outline-hidden backdrop-blur duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", m),
|
|
32
|
+
children: a
|
|
33
|
+
})
|
|
34
|
+
}) })] });
|
|
30
35
|
}
|
|
31
36
|
//#endregion
|
|
32
37
|
export { i as HoverCard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("./primitive.cjs"),r=require("./group.cjs"),i=require("../../inputs/input-decorator.cjs"),a=require("../../inputs/clearable-input.cjs"),o=require("../../inputs/date-input.cjs"),s=require("../../inputs/date-range-input.cjs"),c=require("../../inputs/money-input.cjs"),l=require("../../inputs/masked-input.cjs"),u=require("../../inputs/number-input.cjs"),d=require("../../inputs/password-input.cjs"),f=require("../../inputs/phone-input.cjs"),p=require("../../inputs/quantity-input.cjs"),m=require("../../inputs/search-input.cjs");let h=require("react");h=e.__toESM(h,1);let g=require("react/jsx-runtime");function _(e){return typeof e==`string`?e.length:typeof e==`number`?String(e).length:Array.isArray(e)?e.join(``).length:0}var
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("./primitive.cjs"),r=require("./group.cjs"),i=require("../../inputs/input-decorator.cjs"),a=require("../../inputs/clearable-input.cjs"),o=require("../../inputs/date-input.cjs"),s=require("../../inputs/date-range-input.cjs"),c=require("../../inputs/money-input.cjs"),l=require("../../inputs/masked-input.cjs"),u=require("../../inputs/number-input.cjs"),d=require("../../inputs/password-input.cjs"),f=require("../../inputs/phone-input.cjs"),p=require("../../inputs/quantity-input.cjs"),m=require("../../inputs/search-input.cjs");let h=require("react");h=e.__toESM(h,1);let g=require("react/jsx-runtime");function _(e){return typeof e==`string`?e.length:typeof e==`number`?String(e).length:Array.isArray(e)?e.join(``).length:0}function v(e){return e.type===`search`||e.searchIcon!==void 0||e.loading!==void 0||e.loadingLabel!==void 0||e.resultCount!==void 0||e.shortcut!==void 0||e.debounceMs!==void 0||e.showMetaOnClear!==void 0||e.onDebouncedValueChange!==void 0}var y=h.forwardRef((e,r)=>{let y=e.kind??`text`;if(y===`search`)return(0,g.jsx)(m.SearchInput,{ref:r,...e});if(y===`password`)return(0,g.jsx)(d.PasswordInput,{ref:r,...e});if(y===`number`)return(0,g.jsx)(u.NumberInput,{ref:r,...e});if(y===`phone`)return(0,g.jsx)(f.PhoneInput,{ref:r,...e});if(y===`money`)return(0,g.jsx)(c.MoneyInput,{ref:r,...e});if(y===`quantity`)return(0,g.jsx)(p.QuantityInput,{ref:r,...e});if(y===`masked`)return(0,g.jsx)(l.MaskedInput,{ref:r,...e});if(y===`date`)return(0,g.jsx)(o.DateInput,{ref:r,...e});if(y===`date-range`)return(0,g.jsx)(s.DateRangeInput,{...e});if(y===`clearable`)return(0,g.jsx)(a.ClearableInput,{ref:r,...e});let b=e;if(v(b)){let{leading:e,searchIcon:n,helperText:i,errorText:a,showCharacterCount:o,countFormatter:s,helperClassName:c,inputClassName:l,...u}=b,d=Array.isArray(b.value)?b.value.join(` `):b.value==null||typeof b.value==`string`||typeof b.value==`number`?b.value:String(b.value),f=Array.isArray(b.defaultValue)?b.defaultValue.join(` `):b.defaultValue==null||typeof b.defaultValue==`string`||typeof b.defaultValue==`number`?b.defaultValue:String(b.defaultValue),p=(0,g.jsx)(m.SearchInput,{ref:r,searchIcon:n??e,inputClassName:l,...u,value:d,defaultValue:f});if(!i&&!a&&!o)return p;let h=_(b.value??b.defaultValue);return(0,g.jsxs)(`div`,{"data-slot":`input-field`,className:`grid gap-1.5`,children:[p,(0,g.jsxs)(`div`,{"data-slot":`input-meta`,className:`flex items-start justify-between gap-3 px-1`,children:[(0,g.jsx)(`div`,{"data-slot":`input-helper`,className:t.cn(`min-w-0 text-xs leading-5`,a?`text-destructive`:`text-muted-foreground`,c),children:a??i}),o?(0,g.jsx)(`div`,{"data-slot":`input-count`,className:t.cn(`shrink-0 text-[11px] font-medium tabular-nums`,a?`text-destructive`:`text-muted-foreground`),children:s?.(h,b.maxLength)??(typeof b.maxLength==`number`?`${h}/${b.maxLength}`:h)}):null]})]})}let{value:x,defaultValue:S,leading:C,trailing:w,trailingAction:T,clearable:E=!1,onValueChange:D,onClear:O,clearLabel:k,clearOnEscape:A,focusAfterClear:j,replaceTrailingWhenClear:M,helperText:N,errorText:P,showCharacterCount:F=!1,countFormatter:I,wrapperClassName:L,inputClassName:R,helperClassName:z,leadingPointerEvents:ee=!1,trailingPointerEvents:B=!0,onChange:V,maxLength:H,className:U,...W}=b,G=x!==void 0,[K,q]=h.useState(()=>_(S)),J=G?_(x):K,Y=P??N,X=P?`text-destructive`:`text-muted-foreground`,Z=e=>{G||q(e.target.value.length),V?.(e)},Q=e=>{Z(e),D?.(e.target.value)},$=E?(0,g.jsx)(a.ClearableInput,{ref:r,value:x,defaultValue:x===void 0?S:void 0,type:W.type??`text`,leadingIcon:C,trailing:w,trailingAction:T,clearable:E,onChange:Z,onValueChange:D,onClear:O,clearLabel:k,clearOnEscape:A,focusAfterClear:j,replaceTrailingWhenClear:M,wrapperClassName:L,inputClassName:R,className:U,maxLength:H,...W}):C||w||T?(0,g.jsx)(i.InputDecorator,{ref:r,value:x??void 0,defaultValue:x===void 0?S:void 0,type:W.type??`text`,leading:C,trailing:w,trailingAction:T,leadingPointerEvents:ee,trailingPointerEvents:B,wrapperClassName:L,inputClassName:R,className:U,onChange:Q,maxLength:H,...W}):(0,g.jsx)(n.InputPrimitive,{ref:r,value:x??void 0,defaultValue:x===void 0?S:void 0,type:W.type??`text`,className:t.cn(R,U),onChange:Q,maxLength:H,...W});return!Y&&!F?$:(0,g.jsxs)(`div`,{"data-slot":`input-field`,className:`grid gap-1.5`,children:[$,(0,g.jsxs)(`div`,{"data-slot":`input-meta`,className:`flex items-start justify-between gap-3 px-1`,children:[(0,g.jsx)(`div`,{"data-slot":`input-helper`,className:t.cn(`min-w-0 text-xs leading-5`,X,z),children:Y}),F?(0,g.jsx)(`div`,{"data-slot":`input-count`,className:t.cn(`shrink-0 text-[11px] font-medium tabular-nums`,P?`text-destructive`:`text-muted-foreground`),children:I?.(J,H)??(typeof H==`number`?`${J}/${H}`:J)}):null]})]})});y.displayName=`Input`,exports.Input=y,exports.InputGroup=r.InputGroup,exports.InputGroupAddon=r.InputGroupAddon,exports.InputGroupButton=r.InputGroupButton,exports.InputGroupInput=r.InputGroupInput,exports.InputGroupText=r.InputGroupText,exports.InputGroupTextarea=r.InputGroupTextarea;
|
|
@@ -16,6 +16,7 @@ export type InputTextProps = Omit<InputPrimitiveProps, "value"> & {
|
|
|
16
16
|
kind?: "text";
|
|
17
17
|
value?: string | number | readonly string[] | null;
|
|
18
18
|
onValueChange?: (value: string) => void;
|
|
19
|
+
onDebouncedValueChange?: (value: string) => void;
|
|
19
20
|
leading?: React.ReactNode;
|
|
20
21
|
trailing?: React.ReactNode;
|
|
21
22
|
trailingAction?: React.ReactNode;
|
|
@@ -34,6 +35,13 @@ export type InputTextProps = Omit<InputPrimitiveProps, "value"> & {
|
|
|
34
35
|
helperClassName?: string;
|
|
35
36
|
leadingPointerEvents?: boolean;
|
|
36
37
|
trailingPointerEvents?: boolean;
|
|
38
|
+
searchIcon?: React.ReactNode;
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
loadingLabel?: string;
|
|
41
|
+
resultCount?: number;
|
|
42
|
+
shortcut?: React.ReactNode;
|
|
43
|
+
debounceMs?: number;
|
|
44
|
+
showMetaOnClear?: boolean;
|
|
37
45
|
};
|
|
38
46
|
export type InputClearableProps = Omit<ClearableInputProps, "kind"> & {
|
|
39
47
|
kind: "clearable";
|
|
@@ -71,5 +79,5 @@ export type InputDateRangeProps = Omit<DateRangeInputProps, "onChange" | "onValu
|
|
|
71
79
|
value?: DateRangeInputProps["value"];
|
|
72
80
|
};
|
|
73
81
|
export type InputProps = InputTextProps | InputClearableProps | InputSearchProps | InputPasswordProps | InputNumberProps | InputPhoneProps | InputMoneyProps | InputQuantityProps | InputMaskedProps | InputDateProps | InputDateRangeProps;
|
|
74
|
-
declare const Input: React.ForwardRefExoticComponent<(Omit<InputTextProps, "ref"> | Omit<InputClearableProps, "ref"> | Omit<InputSearchProps, "ref"> | Omit<InputPasswordProps, "ref"> | Omit<InputNumberProps, "ref"> | Omit<InputPhoneProps, "ref"> | Omit<InputMoneyProps, "ref"> | Omit<InputQuantityProps, "ref"> | Omit<InputMaskedProps, "ref"> | Omit<InputDateProps, "ref"> | Omit<InputDateRangeProps, "ref">) & React.RefAttributes<
|
|
82
|
+
declare const Input: React.ForwardRefExoticComponent<(Omit<InputTextProps, "ref"> | Omit<InputClearableProps, "ref"> | Omit<InputSearchProps, "ref"> | Omit<InputPasswordProps, "ref"> | Omit<InputNumberProps, "ref"> | Omit<InputPhoneProps, "ref"> | Omit<InputMoneyProps, "ref"> | Omit<InputQuantityProps, "ref"> | Omit<InputMaskedProps, "ref"> | Omit<InputDateProps, "ref"> | Omit<InputDateRangeProps, "ref">) & React.RefAttributes<HTMLDivElement | HTMLInputElement>>;
|
|
75
83
|
export { Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, };
|
|
@@ -18,7 +18,10 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
|
18
18
|
function S(e) {
|
|
19
19
|
return typeof e == "string" ? e.length : typeof e == "number" ? String(e).length : Array.isArray(e) ? e.join("").length : 0;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
function C(e) {
|
|
22
|
+
return e.type === "search" || e.searchIcon !== void 0 || e.loading !== void 0 || e.loadingLabel !== void 0 || e.resultCount !== void 0 || e.shortcut !== void 0 || e.debounceMs !== void 0 || e.showMetaOnClear !== void 0 || e.onDebouncedValueChange !== void 0;
|
|
23
|
+
}
|
|
24
|
+
var w = y.forwardRef((n, r) => {
|
|
22
25
|
let i = n.kind ?? "text";
|
|
23
26
|
if (i === "search") return /* @__PURE__ */ b(v, {
|
|
24
27
|
ref: r,
|
|
@@ -57,39 +60,69 @@ var C = y.forwardRef((n, r) => {
|
|
|
57
60
|
ref: r,
|
|
58
61
|
...n
|
|
59
62
|
});
|
|
60
|
-
let
|
|
63
|
+
let a = n;
|
|
64
|
+
if (C(a)) {
|
|
65
|
+
let { leading: t, searchIcon: n, helperText: i, errorText: o, showCharacterCount: s, countFormatter: c, helperClassName: l, inputClassName: u, ...d } = a, f = Array.isArray(a.value) ? a.value.join(" ") : a.value == null || typeof a.value == "string" || typeof a.value == "number" ? a.value : String(a.value), p = Array.isArray(a.defaultValue) ? a.defaultValue.join(" ") : a.defaultValue == null || typeof a.defaultValue == "string" || typeof a.defaultValue == "number" ? a.defaultValue : String(a.defaultValue), m = /* @__PURE__ */ b(v, {
|
|
66
|
+
ref: r,
|
|
67
|
+
searchIcon: n ?? t,
|
|
68
|
+
inputClassName: u,
|
|
69
|
+
...d,
|
|
70
|
+
value: f,
|
|
71
|
+
defaultValue: p
|
|
72
|
+
});
|
|
73
|
+
if (!i && !o && !s) return m;
|
|
74
|
+
let h = S(a.value ?? a.defaultValue);
|
|
75
|
+
return /* @__PURE__ */ x("div", {
|
|
76
|
+
"data-slot": "input-field",
|
|
77
|
+
className: "grid gap-1.5",
|
|
78
|
+
children: [m, /* @__PURE__ */ x("div", {
|
|
79
|
+
"data-slot": "input-meta",
|
|
80
|
+
className: "flex items-start justify-between gap-3 px-1",
|
|
81
|
+
children: [/* @__PURE__ */ b("div", {
|
|
82
|
+
"data-slot": "input-helper",
|
|
83
|
+
className: e("min-w-0 text-xs leading-5", o ? "text-destructive" : "text-muted-foreground", l),
|
|
84
|
+
children: o ?? i
|
|
85
|
+
}), s ? /* @__PURE__ */ b("div", {
|
|
86
|
+
"data-slot": "input-count",
|
|
87
|
+
className: e("shrink-0 text-[11px] font-medium tabular-nums", o ? "text-destructive" : "text-muted-foreground"),
|
|
88
|
+
children: c?.(h, a.maxLength) ?? (typeof a.maxLength == "number" ? `${h}/${a.maxLength}` : h)
|
|
89
|
+
}) : null]
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
let { value: o, defaultValue: s, leading: w, trailing: T, trailingAction: E, clearable: D = !1, onValueChange: O, onClear: ee, clearLabel: k, clearOnEscape: A, focusAfterClear: j, replaceTrailingWhenClear: M, helperText: N, errorText: P, showCharacterCount: F = !1, countFormatter: te, wrapperClassName: I, inputClassName: L, helperClassName: R, leadingPointerEvents: z = !1, trailingPointerEvents: B = !0, onChange: V, maxLength: H, className: U, ...W } = a, G = o !== void 0, [K, q] = y.useState(() => S(s)), J = G ? S(o) : K, Y = P ?? N, X = P ? "text-destructive" : "text-muted-foreground", Z = (e) => {
|
|
61
94
|
G || q(e.target.value.length), V?.(e);
|
|
62
95
|
}, Q = (e) => {
|
|
63
|
-
Z(e),
|
|
64
|
-
}, $ =
|
|
96
|
+
Z(e), O?.(e.target.value);
|
|
97
|
+
}, $ = D ? /* @__PURE__ */ b(l, {
|
|
65
98
|
ref: r,
|
|
66
|
-
value:
|
|
67
|
-
defaultValue:
|
|
99
|
+
value: o,
|
|
100
|
+
defaultValue: o === void 0 ? s : void 0,
|
|
68
101
|
type: W.type ?? "text",
|
|
69
|
-
leadingIcon:
|
|
70
|
-
trailing:
|
|
71
|
-
trailingAction:
|
|
72
|
-
clearable:
|
|
102
|
+
leadingIcon: w,
|
|
103
|
+
trailing: T,
|
|
104
|
+
trailingAction: E,
|
|
105
|
+
clearable: D,
|
|
73
106
|
onChange: Z,
|
|
74
|
-
onValueChange:
|
|
75
|
-
onClear:
|
|
76
|
-
clearLabel:
|
|
77
|
-
clearOnEscape:
|
|
78
|
-
focusAfterClear:
|
|
79
|
-
replaceTrailingWhenClear:
|
|
107
|
+
onValueChange: O,
|
|
108
|
+
onClear: ee,
|
|
109
|
+
clearLabel: k,
|
|
110
|
+
clearOnEscape: A,
|
|
111
|
+
focusAfterClear: j,
|
|
112
|
+
replaceTrailingWhenClear: M,
|
|
80
113
|
wrapperClassName: I,
|
|
81
114
|
inputClassName: L,
|
|
82
115
|
className: U,
|
|
83
116
|
maxLength: H,
|
|
84
117
|
...W
|
|
85
|
-
}) :
|
|
118
|
+
}) : w || T || E ? /* @__PURE__ */ b(c, {
|
|
86
119
|
ref: r,
|
|
87
|
-
value:
|
|
88
|
-
defaultValue:
|
|
120
|
+
value: o ?? void 0,
|
|
121
|
+
defaultValue: o === void 0 ? s : void 0,
|
|
89
122
|
type: W.type ?? "text",
|
|
90
|
-
leading:
|
|
91
|
-
trailing:
|
|
92
|
-
trailingAction:
|
|
123
|
+
leading: w,
|
|
124
|
+
trailing: T,
|
|
125
|
+
trailingAction: E,
|
|
93
126
|
leadingPointerEvents: z,
|
|
94
127
|
trailingPointerEvents: B,
|
|
95
128
|
wrapperClassName: I,
|
|
@@ -100,15 +133,15 @@ var C = y.forwardRef((n, r) => {
|
|
|
100
133
|
...W
|
|
101
134
|
}) : /* @__PURE__ */ b(t, {
|
|
102
135
|
ref: r,
|
|
103
|
-
value:
|
|
104
|
-
defaultValue:
|
|
136
|
+
value: o ?? void 0,
|
|
137
|
+
defaultValue: o === void 0 ? s : void 0,
|
|
105
138
|
type: W.type ?? "text",
|
|
106
139
|
className: e(L, U),
|
|
107
140
|
onChange: Q,
|
|
108
141
|
maxLength: H,
|
|
109
142
|
...W
|
|
110
143
|
});
|
|
111
|
-
return !Y && !
|
|
144
|
+
return !Y && !F ? $ : /* @__PURE__ */ x("div", {
|
|
112
145
|
"data-slot": "input-field",
|
|
113
146
|
className: "grid gap-1.5",
|
|
114
147
|
children: [$, /* @__PURE__ */ x("div", {
|
|
@@ -118,14 +151,14 @@ var C = y.forwardRef((n, r) => {
|
|
|
118
151
|
"data-slot": "input-helper",
|
|
119
152
|
className: e("min-w-0 text-xs leading-5", X, R),
|
|
120
153
|
children: Y
|
|
121
|
-
}),
|
|
154
|
+
}), F ? /* @__PURE__ */ b("div", {
|
|
122
155
|
"data-slot": "input-count",
|
|
123
|
-
className: e("shrink-0 text-[11px] font-medium tabular-nums",
|
|
124
|
-
children:
|
|
156
|
+
className: e("shrink-0 text-[11px] font-medium tabular-nums", P ? "text-destructive" : "text-muted-foreground"),
|
|
157
|
+
children: te?.(J, H) ?? (typeof H == "number" ? `${J}/${H}` : J)
|
|
125
158
|
}) : null]
|
|
126
159
|
})]
|
|
127
160
|
});
|
|
128
161
|
});
|
|
129
|
-
|
|
162
|
+
w.displayName = "Input";
|
|
130
163
|
//#endregion
|
|
131
|
-
export {
|
|
164
|
+
export { w as Input, n as InputGroup, r as InputGroupAddon, i as InputGroupButton, a as InputGroupInput, o as InputGroupText, s as InputGroupTextarea };
|
|
@@ -1 +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"),i=require("@base-ui/react/popover");function a({...e}){return(0,r.jsx)(i.Popover.Root,{"data-slot":`popover`,...e})}function o({...e}){return(0,r.jsx)(i.Popover.Trigger,{"data-slot":`popover-trigger`,...e})}function s({className:e,align:n=`center`,alignOffset:a=0,side:
|
|
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"),i=require("@base-ui/react/popover");function a({...e}){return(0,r.jsx)(i.Popover.Root,{"data-slot":`popover`,...e})}function o({...e}){return(0,r.jsx)(i.Popover.Trigger,{"data-slot":`popover-trigger`,...e})}function s({className:e,align:n=`center`,alignOffset:a=0,collisionPadding:o=12,side:s=`bottom`,sideOffset:c=4,...l}){return(0,r.jsx)(i.Popover.Portal,{children:(0,r.jsx)(i.Popover.Positioner,{align:n,alignOffset:a,collisionPadding:o,side:s,sideOffset:c,className:`isolate z-50`,children:(0,r.jsx)(i.Popover.Popup,{"data-slot":`popover-content`,className:t.cn(`z-50 flex max-h-[min(var(--available-height),calc(100dvh-1rem))] w-[min(var(--anchor-width),20rem)] min-w-60 max-w-[calc(100vw-1rem)] origin-(--transform-origin) flex-col gap-3 overflow-y-auto rounded-[var(--aui-card-radius,var(--radius-xl))] border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-overlay-surface,var(--popover))] p-4 text-sm text-popover-foreground shadow-[var(--aui-popover-shadow,0_18px_42px_rgba(15,23,42,0.16))] outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...l})})})}function c({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`popover-header`,className:t.cn(`flex flex-col gap-1 text-sm`,e),...n})}function l({className:e,...n}){return(0,r.jsx)(i.Popover.Title,{"data-slot":`popover-title`,className:t.cn(`text-base font-semibold tracking-tight`,e),...n})}function u({className:e,...n}){return(0,r.jsx)(i.Popover.Description,{"data-slot":`popover-description`,className:t.cn(`leading-6 text-muted-foreground`,e),...n})}exports.Popover=a,exports.PopoverContent=s,exports.PopoverDescription=u,exports.PopoverHeader=c,exports.PopoverTitle=l,exports.PopoverTrigger=o;
|
|
@@ -2,13 +2,13 @@ import * as React from "react";
|
|
|
2
2
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
3
|
export type PopoverRootProps = PopoverPrimitive.Root.Props;
|
|
4
4
|
export type PopoverTriggerProps = PopoverPrimitive.Trigger.Props;
|
|
5
|
-
export type PopoverContentProps = PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">;
|
|
5
|
+
export type PopoverContentProps = PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "collisionBoundary" | "collisionPadding" | "side" | "sideOffset">;
|
|
6
6
|
export type PopoverHeaderProps = React.ComponentProps<"div">;
|
|
7
7
|
export type PopoverTitleProps = PopoverPrimitive.Title.Props;
|
|
8
8
|
export type PopoverDescriptionProps = PopoverPrimitive.Description.Props;
|
|
9
9
|
declare function Popover({ ...props }: PopoverPrimitive.Root.Props): React.JSX.Element;
|
|
10
10
|
declare function PopoverTrigger({ ...props }: PopoverTriggerProps): React.JSX.Element;
|
|
11
|
-
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: PopoverContentProps): React.JSX.Element;
|
|
11
|
+
declare function PopoverContent({ className, align, alignOffset, collisionPadding, side, sideOffset, ...props }: PopoverContentProps): React.JSX.Element;
|
|
12
12
|
declare function PopoverHeader({ className, ...props }: PopoverHeaderProps): React.JSX.Element;
|
|
13
13
|
declare function PopoverTitle({ className, ...props }: PopoverTitleProps): React.JSX.Element;
|
|
14
14
|
declare function PopoverDescription({ className, ...props }: PopoverDescriptionProps): React.JSX.Element;
|
|
@@ -16,17 +16,18 @@ function i({ ...e }) {
|
|
|
16
16
|
...e
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function a({ className: r, align: i = "center", alignOffset: a = 0,
|
|
19
|
+
function a({ className: r, align: i = "center", alignOffset: a = 0, collisionPadding: o = 12, side: s = "bottom", sideOffset: c = 4, ...l }) {
|
|
20
20
|
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Positioner, {
|
|
21
21
|
align: i,
|
|
22
22
|
alignOffset: a,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
collisionPadding: o,
|
|
24
|
+
side: s,
|
|
25
|
+
sideOffset: c,
|
|
25
26
|
className: "isolate z-50",
|
|
26
27
|
children: /* @__PURE__ */ t(n.Popup, {
|
|
27
28
|
"data-slot": "popover-content",
|
|
28
|
-
className: e("z-50 flex w-
|
|
29
|
-
...
|
|
29
|
+
className: e("z-50 flex max-h-[min(var(--available-height),calc(100dvh-1rem))] w-[min(var(--anchor-width),20rem)] min-w-60 max-w-[calc(100vw-1rem)] origin-(--transform-origin) flex-col gap-3 overflow-y-auto rounded-[var(--aui-card-radius,var(--radius-xl))] border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-overlay-surface,var(--popover))] p-4 text-sm text-popover-foreground shadow-[var(--aui-popover-shadow,0_18px_42px_rgba(15,23,42,0.16))] outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
|
|
30
|
+
...l
|
|
30
31
|
})
|
|
31
32
|
}) });
|
|
32
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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={sm:`size-3.5`,default:`size-4`,lg:`size-5`};function a({name:e,value:a,defaultValue:o,onValueChange:s,options:c,orientation:l=`vertical`,size:u=`default`,
|
|
1
|
+
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={sm:`size-3.5`,default:`size-4`,lg:`size-5`};function a({name:e,value:a,defaultValue:o,onValueChange:s,options:c,orientation:l=`vertical`,size:u=`default`,invalid:d=!1,disabled:f=!1,className:p,itemClassName:m,itemLabelClassName:h,itemDescriptionClassName:g,..._}){let v=n.useId(),y=e??v,[b,x]=n.useState(o??``),S=a!==void 0,C=S?a:b,w=n.useRef([]),T=c.filter(e=>!e.disabled&&!f),E=e=>{S||x(e),s?.(e)},D=e=>{let t=T[e];if(!t)return;let n=c.findIndex(e=>e.value===t.value);w.current[n]?.focus(),E(t.value)};return(0,r.jsx)(`div`,{role:`radiogroup`,"aria-invalid":d||void 0,"aria-disabled":f||void 0,"data-slot":`radio-group`,"data-orientation":l,"data-invalid":d||void 0,className:t.cn(`grid gap-2`,l===`horizontal`&&`sm:flex sm:flex-wrap sm:items-center`,p),onKeyDown:e=>{if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`,`Home`,`End`].includes(e.key)||T.length===0)return;e.preventDefault();let t=Math.max(0,T.findIndex(e=>e.value===C));if(e.key===`Home`){D(0);return}if(e.key===`End`){D(T.length-1);return}D((t+(e.key===`ArrowDown`||e.key===`ArrowRight`?1:-1)+T.length)%T.length)},..._,children:c.map((e,n)=>{let a=e.value===C,o=f||e.disabled;return(0,r.jsxs)(`label`,{"data-slot":`radio-group-item`,"data-checked":a||void 0,"data-disabled":o||void 0,"data-invalid":d||void 0,className:t.cn(`group flex cursor-pointer items-start gap-3 rounded-[min(var(--radius-xl),16px)] border border-border/80 bg-background/88 px-3 py-2.5 text-sm transition hover:border-ring/35 hover:bg-accent/60 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/30 data-[checked=true]:border-primary/35 data-[checked=true]:bg-primary/8 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-55 data-[invalid=true]:border-destructive/70 data-[invalid=true]:ring-3 data-[invalid=true]:ring-destructive/15`,m),children:[(0,r.jsx)(`input`,{ref:e=>{w.current[n]=e},type:`radio`,name:y,value:e.value,checked:a,disabled:o,"aria-invalid":d||void 0,className:`sr-only`,onChange:()=>E(e.value)}),(0,r.jsx)(`span`,{"aria-hidden":`true`,className:t.cn(`mt-0.5 inline-flex shrink-0 items-center justify-center rounded-full border border-input bg-background shadow-sm transition group-data-[checked=true]:border-primary group-data-[checked=true]:bg-primary`,i[u]),children:(0,r.jsx)(`span`,{className:`size-1.5 rounded-full bg-primary-foreground opacity-0 transition group-data-[checked=true]:opacity-100`})}),(0,r.jsxs)(`span`,{className:`min-w-0`,children:[(0,r.jsx)(`span`,{className:t.cn(`block font-medium text-foreground`,h),children:e.label}),e.description?(0,r.jsx)(`span`,{className:t.cn(`mt-1 block text-sm leading-6 text-muted-foreground`,g),children:e.description}):null]})]},e.value)})})}exports.RadioGroup=a;
|
|
@@ -13,7 +13,11 @@ export type RadioGroupProps = Omit<React.ComponentProps<"div">, "onChange"> & {
|
|
|
13
13
|
options: RadioGroupOption[];
|
|
14
14
|
orientation?: "vertical" | "horizontal";
|
|
15
15
|
size?: "sm" | "default" | "lg";
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
16
18
|
itemClassName?: string;
|
|
19
|
+
itemLabelClassName?: string;
|
|
20
|
+
itemDescriptionClassName?: string;
|
|
17
21
|
};
|
|
18
|
-
declare function RadioGroup({ name, value, defaultValue, onValueChange, options, orientation, size, className, itemClassName, ...props }: RadioGroupProps): React.JSX.Element;
|
|
22
|
+
declare function RadioGroup({ name, value, defaultValue, onValueChange, options, orientation, size, invalid, disabled, className, itemClassName, itemLabelClassName, itemDescriptionClassName, ...props }: RadioGroupProps): React.JSX.Element;
|
|
19
23
|
export { RadioGroup };
|