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
|
@@ -1,52 +1,74 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/modern/tour.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
return
|
|
5
|
+
function i({ steps: i, index: a = 0, onIndexChange: o, onClose: s, onSkip: c, onFinish: l, placement: u = "bottom", className: d, ...f }) {
|
|
6
|
+
let p = i[a], m = t.useRef(null);
|
|
7
|
+
return t.useEffect(() => {
|
|
8
|
+
m.current?.focus();
|
|
9
|
+
}, [a]), p ? /* @__PURE__ */ n("div", {
|
|
10
|
+
ref: m,
|
|
8
11
|
"data-slot": "tour",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
"data-placement": u,
|
|
13
|
+
tabIndex: -1,
|
|
14
|
+
className: e("rounded-xl border bg-popover p-4 text-popover-foreground shadow-lg outline-none focus-visible:ring-2 focus-visible:ring-ring/40", d),
|
|
15
|
+
...f,
|
|
16
|
+
children: /* @__PURE__ */ r("div", {
|
|
12
17
|
className: "grid gap-2",
|
|
13
18
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ n("div", {
|
|
15
20
|
className: "font-semibold",
|
|
16
|
-
children:
|
|
21
|
+
children: p.title
|
|
17
22
|
}),
|
|
18
|
-
|
|
23
|
+
p.description && /* @__PURE__ */ n("div", {
|
|
19
24
|
className: "text-sm text-muted-foreground",
|
|
20
|
-
children:
|
|
25
|
+
children: p.description
|
|
21
26
|
}),
|
|
22
|
-
/* @__PURE__ */ n("div", {
|
|
27
|
+
p.target && /* @__PURE__ */ n("div", {
|
|
28
|
+
className: "text-xs text-muted-foreground",
|
|
29
|
+
children: p.target
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ r("div", {
|
|
23
32
|
className: "flex items-center justify-between gap-3 pt-2",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ r("span", {
|
|
25
34
|
className: "text-xs text-muted-foreground",
|
|
26
35
|
children: [
|
|
27
|
-
|
|
36
|
+
a + 1,
|
|
28
37
|
" / ",
|
|
29
|
-
|
|
38
|
+
i.length
|
|
30
39
|
]
|
|
31
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ r("div", {
|
|
32
41
|
className: "flex gap-2",
|
|
33
|
-
children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ n("button", {
|
|
44
|
+
type: "button",
|
|
45
|
+
className: "rounded-md border px-2.5 py-1 text-sm",
|
|
46
|
+
onClick: () => {
|
|
47
|
+
c?.(), s?.();
|
|
48
|
+
},
|
|
49
|
+
children: "Skip"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ n("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: "rounded-md border px-2.5 py-1 text-sm",
|
|
54
|
+
disabled: a === 0,
|
|
55
|
+
onClick: () => o?.(a - 1),
|
|
56
|
+
children: "Back"
|
|
57
|
+
}),
|
|
58
|
+
a < i.length - 1 ? /* @__PURE__ */ n("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
className: "rounded-md bg-primary px-2.5 py-1 text-sm text-primary-foreground",
|
|
61
|
+
onClick: () => o?.(a + 1),
|
|
62
|
+
children: "Next"
|
|
63
|
+
}) : /* @__PURE__ */ n("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
className: "rounded-md bg-primary px-2.5 py-1 text-sm text-primary-foreground",
|
|
66
|
+
onClick: () => {
|
|
67
|
+
l?.(), s?.();
|
|
68
|
+
},
|
|
69
|
+
children: "Done"
|
|
70
|
+
})
|
|
71
|
+
]
|
|
50
72
|
})]
|
|
51
73
|
})
|
|
52
74
|
]
|
|
@@ -54,4 +76,4 @@ function r({ steps: r, index: i = 0, onIndexChange: a, onClose: o, className: s,
|
|
|
54
76
|
}) : null;
|
|
55
77
|
}
|
|
56
78
|
//#endregion
|
|
57
|
-
export {
|
|
79
|
+
export { i as Tour };
|
|
@@ -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");function i({open:e=!0,position:n=`bottom`,
|
|
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");function i({open:e=!0,position:n=`bottom`,grouped:i=!1,label:a,children:o,className:s,...c}){return e?(0,r.jsxs)(`div`,{"data-slot":`command-bar`,className:t.cn(`fixed left-1/2 z-50 flex -translate-x-1/2 items-center gap-2 rounded-full border bg-background/95 px-4 py-2 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/60`,n===`bottom`?`bottom-6`:`top-6`,i&&`gap-3 rounded-[28px] px-3 py-2.5`,s),...c,children:[a?(0,r.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:a}):null,o]}):null}exports.CommandBar=i;
|
|
@@ -3,6 +3,8 @@ export type CommandBarProps = React.ComponentProps<"div"> & {
|
|
|
3
3
|
open?: boolean;
|
|
4
4
|
onOpenChange?: (open: boolean) => void;
|
|
5
5
|
position?: "bottom" | "top";
|
|
6
|
+
grouped?: boolean;
|
|
7
|
+
label?: React.ReactNode;
|
|
6
8
|
};
|
|
7
|
-
declare function CommandBar({ open, position, children, className, ...props }: CommandBarProps): React.JSX.Element | null;
|
|
9
|
+
declare function CommandBar({ open, position, grouped, label, children, className, ...props }: CommandBarProps): React.JSX.Element | null;
|
|
8
10
|
export { CommandBar };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/navigation/command-bar.tsx
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function r({ open: r = !0, position: i = "bottom", grouped: a = !1, label: o, children: s, className: c, ...l }) {
|
|
6
|
+
return r ? /* @__PURE__ */ n("div", {
|
|
7
7
|
"data-slot": "command-bar",
|
|
8
|
-
className: e("fixed left-1/2 z-50 flex -translate-x-1/2 items-center gap-2 rounded-full border bg-background/95 px-4 py-2 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/60",
|
|
9
|
-
...
|
|
10
|
-
children:
|
|
8
|
+
className: e("fixed left-1/2 z-50 flex -translate-x-1/2 items-center gap-2 rounded-full border bg-background/95 px-4 py-2 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/60", i === "bottom" ? "bottom-6" : "top-6", a && "gap-3 rounded-[28px] px-3 py-2.5", c),
|
|
9
|
+
...l,
|
|
10
|
+
children: [o ? /* @__PURE__ */ t("span", {
|
|
11
|
+
className: "text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",
|
|
12
|
+
children: o
|
|
13
|
+
}) : null, s]
|
|
11
14
|
}) : null;
|
|
12
15
|
}
|
|
13
16
|
//#endregion
|
|
14
|
-
export {
|
|
17
|
+
export { r as CommandBar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../showcase/create-demo.cjs");var t=e.createShowcaseDemoRegistry([e.component(`pagination`,`Pagination`,`navigation`,`Controlled page navigation with edge buttons and active state.`),e.component(`nav-tabs`,`NavTabs`,`navigation`,`Navigation tabs for switching related document sections.`),e.component(`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../showcase/create-demo.cjs");var t=e.createShowcaseDemoRegistry([e.component(`pagination`,`Pagination`,`navigation`,`Controlled page navigation with edge buttons and active state.`),e.component(`nav-tabs`,`NavTabs`,`navigation`,`Navigation tabs for switching related document sections.`),e.component(`page-tabs`,`PageTabs`,`navigation`,`Top-level page tab strip for route-sized sections.`),e.component(`stepper-tabs`,`StepperTabs`,`navigation`,`Step-like tabs for setup and onboarding progress.`)]);exports.navigationShowcaseDemoRegistry=t;
|
|
@@ -3,7 +3,6 @@ import { component as e, createShowcaseDemoRegistry as t } from "../../showcase/
|
|
|
3
3
|
var n = t([
|
|
4
4
|
e("pagination", "Pagination", "navigation", "Controlled page navigation with edge buttons and active state."),
|
|
5
5
|
e("nav-tabs", "NavTabs", "navigation", "Navigation tabs for switching related document sections."),
|
|
6
|
-
e("anchor-nav", "AnchorNav", "navigation", "Section jump navigation for long detail pages."),
|
|
7
6
|
e("page-tabs", "PageTabs", "navigation", "Top-level page tab strip for route-sized sections."),
|
|
8
7
|
e("stepper-tabs", "StepperTabs", "navigation", "Step-like tabs for setup and onboarding progress.")
|
|
9
8
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/tabs/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a={sm:`h-8 px-3 text-xs`,default:`h-10 px-4 text-sm`,lg:`h-11 px-5 text-base`};function o({items:e,value:r,onValueChange:o,size:s=`default`,fullWidth:c=!1,className:l,...u}){return(0,i.jsx)(n.Tabs,{value:r,onValueChange:e=>o?.(String(e)),"data-slot":`nav-tabs`,className:t.cn(`min-w-0`,c&&`w-full`,l),...u,children:(0,i.jsx)(n.TabsList,{"data-slot":`nav-tabs-list`,variant:`pills`,overflow:`scroll`,className:t.cn(c&&`w-full`),children:e.map(e=>{let l=e.value===r,u=(0,i.jsxs)(i.Fragment,{children:[e.icon?(0,i.jsx)(`span`,{className:`[&_svg]:size-4`,children:e.icon}):null,(0,i.jsx)(`span`,{className:`truncate`,children:e.label})]}),d=t.cn(`min-w-0 disabled:pointer-events-none disabled:opacity-50`,a[s],c&&`flex-1`,l&&`bg-background text-foreground shadow-sm`);return e.href?(0,i.jsx)(n.TabsTrigger,{value:e.value,render:(0,i.jsx)(`a`,{href:e.href,"aria-current":l?`page`:void 0,className:d}),children:u},e.value):(0,i.jsx)(n.TabsTrigger,{value:e.value,disabled:e.disabled,className:d,onClick:()=>o?.(e.value),children:u},e.value)})})})}exports.NavTabs=o;
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Tabs as t, TabsList as n, TabsTrigger as r } from "../ui/tabs/index.js";
|
|
2
3
|
import "react";
|
|
3
|
-
import { Fragment as
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/navigation/nav-tabs.tsx
|
|
5
|
-
var
|
|
6
|
+
var s = {
|
|
6
7
|
sm: "h-8 px-3 text-xs",
|
|
7
8
|
default: "h-10 px-4 text-sm",
|
|
8
9
|
lg: "h-11 px-5 text-base"
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
function c({ items: c, value: l, onValueChange: u, size: d = "default", fullWidth: f = !1, className: p, ...m }) {
|
|
12
|
+
return /* @__PURE__ */ a(t, {
|
|
13
|
+
value: l,
|
|
14
|
+
onValueChange: (e) => u?.(String(e)),
|
|
12
15
|
"data-slot": "nav-tabs",
|
|
13
|
-
className: e("
|
|
14
|
-
...
|
|
15
|
-
children: a
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: a
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
className: e("min-w-0", f && "w-full", p),
|
|
17
|
+
...m,
|
|
18
|
+
children: /* @__PURE__ */ a(n, {
|
|
19
|
+
"data-slot": "nav-tabs-list",
|
|
20
|
+
variant: "pills",
|
|
21
|
+
overflow: "scroll",
|
|
22
|
+
className: e(f && "w-full"),
|
|
23
|
+
children: c.map((t) => {
|
|
24
|
+
let n = t.value === l, c = /* @__PURE__ */ o(i, { children: [t.icon ? /* @__PURE__ */ a("span", {
|
|
25
|
+
className: "[&_svg]:size-4",
|
|
26
|
+
children: t.icon
|
|
27
|
+
}) : null, /* @__PURE__ */ a("span", {
|
|
28
|
+
className: "truncate",
|
|
29
|
+
children: t.label
|
|
30
|
+
})] }), p = e("min-w-0 disabled:pointer-events-none disabled:opacity-50", s[d], f && "flex-1", n && "bg-background text-foreground shadow-sm");
|
|
31
|
+
return t.href ? /* @__PURE__ */ a(r, {
|
|
32
|
+
value: t.value,
|
|
33
|
+
render: /* @__PURE__ */ a("a", {
|
|
34
|
+
href: t.href,
|
|
35
|
+
"aria-current": n ? "page" : void 0,
|
|
36
|
+
className: p
|
|
37
|
+
}),
|
|
38
|
+
children: c
|
|
39
|
+
}, t.value) : /* @__PURE__ */ a(r, {
|
|
40
|
+
value: t.value,
|
|
41
|
+
disabled: t.disabled,
|
|
42
|
+
className: p,
|
|
43
|
+
onClick: () => u?.(t.value),
|
|
44
|
+
children: c
|
|
45
|
+
}, t.value);
|
|
46
|
+
})
|
|
35
47
|
})
|
|
36
48
|
});
|
|
37
49
|
}
|
|
38
50
|
//#endregion
|
|
39
|
-
export {
|
|
51
|
+
export { c as NavTabs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/badge/index.cjs");let
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/badge/index.cjs"),r=require("../ui/tabs/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");function o({value:e,items:i,onValueChange:o,variant:s=`underline`,size:c=`default`,className:l,...u}){let d=i.filter(e=>!e.hidden);return(0,a.jsx)(r.Tabs,{value:e,onValueChange:e=>{let t=d.find(t=>t.value===e);t&&o?.(t.value,t)},"data-slot":`page-tabs`,"data-variant":s,className:t.cn(`min-w-0`,l),...u,children:(0,a.jsx)(r.TabsList,{"data-slot":`page-tabs-list`,variant:s===`underline`?`underline`:`pills`,overflow:`scroll`,className:t.cn(`w-full`,s===`cards`&&`gap-2 border-0 bg-transparent p-0 shadow-none`),children:d.map(i=>{let o=i.value===e;return(0,a.jsxs)(r.TabsTrigger,{disabled:i.disabled,value:i.value,"data-slot":`page-tab`,"data-active":o||void 0,className:t.cn(`min-w-0 px-3 disabled:pointer-events-none disabled:opacity-50`,c===`sm`?`h-8`:`h-10`,s===`underline`&&`px-1`,s===`cards`&&`rounded-[var(--radius-2xl)] border border-border/75 bg-card/96 text-muted-foreground shadow-sm ring-1 ring-foreground/4 hover:border-primary/28 hover:text-foreground`,s===`cards`&&o&&`border-primary/50 bg-primary/7 text-foreground`),children:[i.icon,(0,a.jsx)(`span`,{className:`truncate`,children:i.label}),i.badge!==void 0&&(0,a.jsx)(n.Badge,{variant:o&&s===`pills`?`secondary`:`outline`,className:`rounded-full`,children:i.badge})]},i.value)})})})}exports.PageTabs=o;
|
|
@@ -1,39 +1,50 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import { Badge as t } from "../ui/badge/index.js";
|
|
3
|
+
import { Tabs as n, TabsList as r, TabsTrigger as i } from "../ui/tabs/index.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/navigation/page-tabs.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */ n
|
|
7
|
+
function s({ value: s, items: c, onValueChange: l, variant: u = "underline", size: d = "default", className: f, ...p }) {
|
|
8
|
+
let m = c.filter((e) => !e.hidden);
|
|
9
|
+
return /* @__PURE__ */ a(n, {
|
|
10
|
+
value: s,
|
|
11
|
+
onValueChange: (e) => {
|
|
12
|
+
let t = m.find((t) => t.value === e);
|
|
13
|
+
t && l?.(t.value, t);
|
|
14
|
+
},
|
|
9
15
|
"data-slot": "page-tabs",
|
|
10
|
-
"data-variant":
|
|
11
|
-
className: e("
|
|
12
|
-
...
|
|
13
|
-
children:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
"data-variant": u,
|
|
17
|
+
className: e("min-w-0", f),
|
|
18
|
+
...p,
|
|
19
|
+
children: /* @__PURE__ */ a(r, {
|
|
20
|
+
"data-slot": "page-tabs-list",
|
|
21
|
+
variant: u === "underline" ? "underline" : "pills",
|
|
22
|
+
overflow: "scroll",
|
|
23
|
+
className: e("w-full", u === "cards" && "gap-2 border-0 bg-transparent p-0 shadow-none"),
|
|
24
|
+
children: m.map((n) => {
|
|
25
|
+
let r = n.value === s;
|
|
26
|
+
return /* @__PURE__ */ o(i, {
|
|
27
|
+
disabled: n.disabled,
|
|
28
|
+
value: n.value,
|
|
29
|
+
"data-slot": "page-tab",
|
|
30
|
+
"data-active": r || void 0,
|
|
31
|
+
className: e("min-w-0 px-3 disabled:pointer-events-none disabled:opacity-50", d === "sm" ? "h-8" : "h-10", u === "underline" && "px-1", u === "cards" && "rounded-[var(--radius-2xl)] border border-border/75 bg-card/96 text-muted-foreground shadow-sm ring-1 ring-foreground/4 hover:border-primary/28 hover:text-foreground", u === "cards" && r && "border-primary/50 bg-primary/7 text-foreground"),
|
|
32
|
+
children: [
|
|
33
|
+
n.icon,
|
|
34
|
+
/* @__PURE__ */ a("span", {
|
|
35
|
+
className: "truncate",
|
|
36
|
+
children: n.label
|
|
37
|
+
}),
|
|
38
|
+
n.badge !== void 0 && /* @__PURE__ */ a(t, {
|
|
39
|
+
variant: r && u === "pills" ? "secondary" : "outline",
|
|
40
|
+
className: "rounded-full",
|
|
41
|
+
children: n.badge
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}, n.value);
|
|
45
|
+
})
|
|
35
46
|
})
|
|
36
47
|
});
|
|
37
48
|
}
|
|
38
49
|
//#endregion
|
|
39
|
-
export {
|
|
50
|
+
export { s as PageTabs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o(e,t){let n=Math.max(t-e+1,0);return Array.from({length:n},(t,n)=>n+e)}function s(e,t,n=1){if(t<=n*2+5)return o(1,t);let r=Math.max(e-n,1),i=Math.min(e+n,t),a=r>2,s=i<t-1;return!a&&s?[...o(1,n*2+3),`ellipsis`,t]:a&&!s?[1,`ellipsis`,...o(t-(n*2+3)+1,t)]:[1,`ellipsis`,...o(r,i),`ellipsis`,t]}function c({className:e,page:r,pageCount:o,onPageChange:c,siblingCount:l=1,showEdges:u=!0,disabled:d=!1,labels:f,...
|
|
1
|
+
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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o(e,t){let n=Math.max(t-e+1,0);return Array.from({length:n},(t,n)=>n+e)}function s(e,t,n=1){if(t<=n*2+5)return o(1,t);let r=Math.max(e-n,1),i=Math.min(e+n,t),a=r>2,s=i<t-1;return!a&&s?[...o(1,n*2+3),`ellipsis`,t]:a&&!s?[1,`ellipsis`,...o(t-(n*2+3)+1,t)]:[1,`ellipsis`,...o(r,i),`ellipsis`,t]}function c({className:e,page:r,pageCount:o,onPageChange:c,siblingCount:l=1,showEdges:u=!0,disabled:d=!1,labels:f,compact:p=!1,totalCount:m,pageSize:h,pageSizeOptions:g,onPageSizeChange:_,showSummary:v=!1,...y}){let b=Math.max(o,1),x=Math.min(Math.max(r,1),b),S=s(x,b,l),C=e=>{let t=Math.min(Math.max(e,1),b);t!==x&&c(t)};return(0,a.jsxs)(`nav`,{"data-slot":`pagination`,"aria-label":`Pagination`,className:t.cn(`flex flex-wrap items-center justify-center gap-1 rounded-full border border-border/70 bg-background/76 p-1 shadow-none backdrop-blur`,e),...y,children:[v&&m!==void 0&&h?(0,a.jsxs)(`div`,{className:`px-2 text-xs text-muted-foreground`,children:[Math.min((x-1)*h+1,m),`-`,Math.min(x*h,m),` of `,m]}):null,u&&(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:p?`icon-xs`:`icon-sm`,disabled:d||x<=1,"aria-label":f?.first??`First page`,onClick:()=>C(1),children:(0,a.jsx)(i.ChevronFirstIcon,{})}),(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:p?`icon-xs`:`icon-sm`,disabled:d||x<=1,"aria-label":f?.previous??`Previous page`,onClick:()=>C(x-1),children:(0,a.jsx)(i.ChevronLeftIcon,{})}),S.map((e,r)=>e===`ellipsis`?(0,a.jsxs)(`span`,{"data-slot":`pagination-ellipsis`,className:`flex size-8 items-center justify-center text-muted-foreground`,children:[(0,a.jsx)(i.MoreHorizontalIcon,{className:`size-4`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`More pages`})]},`ellipsis-${r}`):(0,a.jsx)(n.Button,{type:`button`,variant:e===x?`default`:`outline`,size:p?`icon-xs`:`icon-sm`,disabled:d,"aria-current":e===x?`page`:void 0,"aria-label":f?.page?.(e)??`Page ${e}`,onClick:()=>C(e),className:t.cn(e!==x&&`border-border/70 bg-background/80 shadow-none`),children:e},e)),(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:p?`icon-xs`:`icon-sm`,disabled:d||x>=b,"aria-label":f?.next??`Next page`,onClick:()=>C(x+1),children:(0,a.jsx)(i.ChevronRightIcon,{})}),u&&(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:p?`icon-xs`:`icon-sm`,disabled:d||x>=b,"aria-label":f?.last??`Last page`,onClick:()=>C(b),children:(0,a.jsx)(i.ChevronLastIcon,{})}),g&&h&&_?(0,a.jsxs)(`label`,{className:`ml-1 inline-flex items-center gap-2 rounded-full border border-border/70 bg-background/90 px-3 py-1 text-xs text-muted-foreground`,children:[(0,a.jsx)(`span`,{children:`Rows`}),(0,a.jsx)(`select`,{className:`bg-transparent text-foreground outline-none`,value:h,onChange:e=>_(Number(e.target.value)),disabled:d,children:g.map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))})]}):null]})}exports.Pagination=c,exports.getPaginationItems=s;
|
|
@@ -15,7 +15,13 @@ export type PaginationProps = Omit<React.ComponentProps<"nav">, "onChange"> & {
|
|
|
15
15
|
showEdges?: boolean;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
labels?: PaginationLabels;
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
totalCount?: number;
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
pageSizeOptions?: number[];
|
|
22
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
23
|
+
showSummary?: boolean;
|
|
18
24
|
};
|
|
19
25
|
declare function getPaginationItems(page: number, pageCount: number, siblingCount?: number): PaginationItem[];
|
|
20
|
-
declare function Pagination({ className, page, pageCount, onPageChange, siblingCount, showEdges, disabled, labels, ...props }: PaginationProps): React.JSX.Element;
|
|
26
|
+
declare function Pagination({ className, page, pageCount, onPageChange, siblingCount, showEdges, disabled, labels, compact, totalCount, pageSize, pageSizeOptions, onPageSizeChange, showSummary, ...props }: PaginationProps): React.JSX.Element;
|
|
21
27
|
export { Pagination, getPaginationItems };
|
|
@@ -27,36 +27,46 @@ function u(e, t, n = 1) {
|
|
|
27
27
|
t
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
|
-
function d({ className: l, page: d, pageCount: f, onPageChange: p, siblingCount: m = 1, showEdges: h = !0, disabled: g = !1, labels: _,
|
|
31
|
-
let
|
|
32
|
-
let t = Math.min(Math.max(e, 1),
|
|
33
|
-
t !==
|
|
30
|
+
function d({ className: l, page: d, pageCount: f, onPageChange: p, siblingCount: m = 1, showEdges: h = !0, disabled: g = !1, labels: _, compact: v = !1, totalCount: y, pageSize: b, pageSizeOptions: x, onPageSizeChange: S, showSummary: C = !1, ...w }) {
|
|
31
|
+
let T = Math.max(f, 1), E = Math.min(Math.max(d, 1), T), D = u(E, T, m), O = (e) => {
|
|
32
|
+
let t = Math.min(Math.max(e, 1), T);
|
|
33
|
+
t !== E && p(t);
|
|
34
34
|
};
|
|
35
35
|
return /* @__PURE__ */ c("nav", {
|
|
36
36
|
"data-slot": "pagination",
|
|
37
37
|
"aria-label": "Pagination",
|
|
38
|
-
className: e("flex items-center justify-center gap-1 rounded-full border border-border/70 bg-background/76 p-1 shadow-none backdrop-blur", l),
|
|
39
|
-
...
|
|
38
|
+
className: e("flex flex-wrap items-center justify-center gap-1 rounded-full border border-border/70 bg-background/76 p-1 shadow-none backdrop-blur", l),
|
|
39
|
+
...w,
|
|
40
40
|
children: [
|
|
41
|
+
C && y !== void 0 && b ? /* @__PURE__ */ c("div", {
|
|
42
|
+
className: "px-2 text-xs text-muted-foreground",
|
|
43
|
+
children: [
|
|
44
|
+
Math.min((E - 1) * b + 1, y),
|
|
45
|
+
"-",
|
|
46
|
+
Math.min(E * b, y),
|
|
47
|
+
" of ",
|
|
48
|
+
y
|
|
49
|
+
]
|
|
50
|
+
}) : null,
|
|
41
51
|
h && /* @__PURE__ */ s(t, {
|
|
42
52
|
type: "button",
|
|
43
53
|
variant: "outline",
|
|
44
|
-
size: "icon-sm",
|
|
45
|
-
disabled: g ||
|
|
54
|
+
size: v ? "icon-xs" : "icon-sm",
|
|
55
|
+
disabled: g || E <= 1,
|
|
46
56
|
"aria-label": _?.first ?? "First page",
|
|
47
|
-
onClick: () =>
|
|
57
|
+
onClick: () => O(1),
|
|
48
58
|
children: /* @__PURE__ */ s(n, {})
|
|
49
59
|
}),
|
|
50
60
|
/* @__PURE__ */ s(t, {
|
|
51
61
|
type: "button",
|
|
52
62
|
variant: "outline",
|
|
53
|
-
size: "icon-sm",
|
|
54
|
-
disabled: g ||
|
|
63
|
+
size: v ? "icon-xs" : "icon-sm",
|
|
64
|
+
disabled: g || E <= 1,
|
|
55
65
|
"aria-label": _?.previous ?? "Previous page",
|
|
56
|
-
onClick: () =>
|
|
66
|
+
onClick: () => O(E - 1),
|
|
57
67
|
children: /* @__PURE__ */ s(i, {})
|
|
58
68
|
}),
|
|
59
|
-
|
|
69
|
+
D.map((n, r) => n === "ellipsis" ? /* @__PURE__ */ c("span", {
|
|
60
70
|
"data-slot": "pagination-ellipsis",
|
|
61
71
|
className: "flex size-8 items-center justify-center text-muted-foreground",
|
|
62
72
|
children: [/* @__PURE__ */ s(o, { className: "size-4" }), /* @__PURE__ */ s("span", {
|
|
@@ -65,33 +75,46 @@ function d({ className: l, page: d, pageCount: f, onPageChange: p, siblingCount:
|
|
|
65
75
|
})]
|
|
66
76
|
}, `ellipsis-${r}`) : /* @__PURE__ */ s(t, {
|
|
67
77
|
type: "button",
|
|
68
|
-
variant: n ===
|
|
69
|
-
size: "icon-sm",
|
|
78
|
+
variant: n === E ? "default" : "outline",
|
|
79
|
+
size: v ? "icon-xs" : "icon-sm",
|
|
70
80
|
disabled: g,
|
|
71
|
-
"aria-current": n ===
|
|
81
|
+
"aria-current": n === E ? "page" : void 0,
|
|
72
82
|
"aria-label": _?.page?.(n) ?? `Page ${n}`,
|
|
73
|
-
onClick: () =>
|
|
74
|
-
className: e(n !==
|
|
83
|
+
onClick: () => O(n),
|
|
84
|
+
className: e(n !== E && "border-border/70 bg-background/80 shadow-none"),
|
|
75
85
|
children: n
|
|
76
86
|
}, n)),
|
|
77
87
|
/* @__PURE__ */ s(t, {
|
|
78
88
|
type: "button",
|
|
79
89
|
variant: "outline",
|
|
80
|
-
size: "icon-sm",
|
|
81
|
-
disabled: g ||
|
|
90
|
+
size: v ? "icon-xs" : "icon-sm",
|
|
91
|
+
disabled: g || E >= T,
|
|
82
92
|
"aria-label": _?.next ?? "Next page",
|
|
83
|
-
onClick: () =>
|
|
93
|
+
onClick: () => O(E + 1),
|
|
84
94
|
children: /* @__PURE__ */ s(a, {})
|
|
85
95
|
}),
|
|
86
96
|
h && /* @__PURE__ */ s(t, {
|
|
87
97
|
type: "button",
|
|
88
98
|
variant: "outline",
|
|
89
|
-
size: "icon-sm",
|
|
90
|
-
disabled: g ||
|
|
99
|
+
size: v ? "icon-xs" : "icon-sm",
|
|
100
|
+
disabled: g || E >= T,
|
|
91
101
|
"aria-label": _?.last ?? "Last page",
|
|
92
|
-
onClick: () =>
|
|
102
|
+
onClick: () => O(T),
|
|
93
103
|
children: /* @__PURE__ */ s(r, {})
|
|
94
|
-
})
|
|
104
|
+
}),
|
|
105
|
+
x && b && S ? /* @__PURE__ */ c("label", {
|
|
106
|
+
className: "ml-1 inline-flex items-center gap-2 rounded-full border border-border/70 bg-background/90 px-3 py-1 text-xs text-muted-foreground",
|
|
107
|
+
children: [/* @__PURE__ */ s("span", { children: "Rows" }), /* @__PURE__ */ s("select", {
|
|
108
|
+
className: "bg-transparent text-foreground outline-none",
|
|
109
|
+
value: b,
|
|
110
|
+
onChange: (e) => S(Number(e.target.value)),
|
|
111
|
+
disabled: g,
|
|
112
|
+
children: x.map((e) => /* @__PURE__ */ s("option", {
|
|
113
|
+
value: e,
|
|
114
|
+
children: e
|
|
115
|
+
}, e))
|
|
116
|
+
})]
|
|
117
|
+
}) : null
|
|
95
118
|
]
|
|
96
119
|
});
|
|
97
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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/popover/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({notifications:e,onMarkAllRead:i,
|
|
1
|
+
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/popover/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({notifications:e,onMarkAllRead:i,onClearAll:s,onNotificationClick:c,emptyLabel:l=`No new notifications`,title:u=`Notifications`,className:d,...f}){let p=e.filter(e=>!e.read).length,m=e.reduce((e,t)=>{let n=String(t.group??`Recent`);return e[n]=[...e[n]??[],t],e},{});return(0,o.jsx)(`div`,{"data-slot":`notification-center`,className:d,...f,children:(0,o.jsxs)(r.Popover,{children:[(0,o.jsxs)(n.Button,{render:(0,o.jsx)(r.PopoverTrigger,{}),variant:`ghost`,size:`icon`,className:`relative rounded-full border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-control-bg)] text-foreground shadow-sm hover:bg-[color:color-mix(in_srgb,var(--aui-control-bg)_82%,white_18%)]`,children:[(0,o.jsx)(a.BellIcon,{className:`size-5`}),p>0&&(0,o.jsxs)(`span`,{className:`absolute -right-1 -top-1 inline-flex min-w-5 items-center justify-center rounded-full bg-[color:var(--aui-brand-strong)] px-1.5 py-0.5 text-[10px] font-bold leading-none text-white shadow-[0_8px_20px_rgba(16,185,129,0.35)]`,children:[p,(0,o.jsxs)(`span`,{className:`sr-only`,children:[p,` unread notifications`]})]})]}),(0,o.jsxs)(r.PopoverContent,{className:`w-[24rem] overflow-hidden rounded-3xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-page-bg)] p-0 shadow-[0_24px_60px_rgba(15,23,42,0.18)]`,align:`end`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between border-b border-[color:var(--aui-surface-border)] bg-[color:var(--aui-control-bg)] px-5 py-4`,children:[(0,o.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,o.jsx)(`h4`,{className:`font-semibold tracking-tight text-foreground`,children:u}),(0,o.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p>0?`${p} unread update${p>1?`s`:``}`:`You're all caught up`})]}),(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p>0&&i?(0,o.jsx)(n.Button,{variant:`ghost`,size:`sm`,className:`h-8 rounded-full border border-[color:var(--aui-surface-border)] px-3 text-xs font-semibold text-muted-foreground hover:bg-[color:var(--aui-page-bg)] hover:text-foreground`,onClick:i,children:`Mark all read`}):null,e.length>0&&s?(0,o.jsx)(n.Button,{variant:`ghost`,size:`sm`,className:`h-8 rounded-full border border-[color:var(--aui-surface-border)] px-3 text-xs font-semibold text-muted-foreground hover:bg-[color:var(--aui-page-bg)] hover:text-foreground`,onClick:s,children:`Clear all`}):null]})]}),(0,o.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto bg-[color:var(--aui-page-bg)] p-2`,children:e.length===0?(0,o.jsx)(`div`,{className:`rounded-2xl border border-dashed border-[color:var(--aui-surface-border)] px-6 py-10 text-center text-sm text-muted-foreground`,children:l}):(0,o.jsx)(`div`,{className:`flex flex-col gap-3`,children:Object.entries(m).map(([e,n])=>(0,o.jsxs)(`div`,{className:`grid gap-2`,children:[(0,o.jsx)(`div`,{className:`px-2 pt-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:e}),n.map(e=>(0,o.jsxs)(`button`,{className:t.cn(`flex flex-col gap-1 rounded-2xl border border-transparent px-4 py-3 text-left transition hover:border-[color:var(--aui-surface-border)] hover:bg-[color:var(--aui-control-bg)]`,!e.read&&`border-[color:color-mix(in_srgb,var(--aui-brand-strong)_16%,var(--aui-surface-border))] bg-[color:color-mix(in_srgb,var(--aui-brand-strong)_8%,var(--aui-control-bg))]`),onClick:()=>c?.(e),children:[(0,o.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-2`,children:[(0,o.jsx)(`span`,{className:`text-sm font-semibold leading-tight text-foreground`,children:e.title}),!e.read&&(0,o.jsx)(`span`,{className:`mt-1 flex size-2 shrink-0 rounded-full bg-[color:var(--aui-brand-strong)] shadow-[0_0_0_4px_color-mix(in_srgb,var(--aui-brand-strong)_14%,transparent)]`})]}),e.description&&(0,o.jsx)(`span`,{className:`line-clamp-2 text-xs leading-5 text-muted-foreground`,children:e.description}),e.time&&(0,o.jsx)(`span`,{className:`mt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/80`,children:e.time})]},e.id))]},e))})})]})]})})}exports.NotificationCenter=s;
|
|
@@ -5,13 +5,15 @@ export type NotificationItem = {
|
|
|
5
5
|
description?: React.ReactNode;
|
|
6
6
|
time?: React.ReactNode;
|
|
7
7
|
read?: boolean;
|
|
8
|
+
group?: React.ReactNode;
|
|
8
9
|
};
|
|
9
10
|
export type NotificationCenterProps = React.ComponentProps<"div"> & {
|
|
10
11
|
notifications: NotificationItem[];
|
|
11
12
|
onMarkAllRead?: () => void;
|
|
13
|
+
onClearAll?: () => void;
|
|
12
14
|
onNotificationClick?: (notification: NotificationItem) => void;
|
|
13
15
|
emptyLabel?: React.ReactNode;
|
|
14
16
|
title?: React.ReactNode;
|
|
15
17
|
};
|
|
16
|
-
declare function NotificationCenter({ notifications, onMarkAllRead, onNotificationClick, emptyLabel, title, className, ...props }: NotificationCenterProps): React.JSX.Element;
|
|
18
|
+
declare function NotificationCenter({ notifications, onMarkAllRead, onClearAll, onNotificationClick, emptyLabel, title, className, ...props }: NotificationCenterProps): React.JSX.Element;
|
|
17
19
|
export { NotificationCenter };
|