tembro 2.0.6 → 2.1.1
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-toolbar.cjs +1 -1
- package/dist/components/data-table/data-table-toolbar.js +12 -13
- package/dist/components/display/carousel.cjs +1 -1
- package/dist/components/display/carousel.d.ts +9 -1
- package/dist/components/display/carousel.js +123 -81
- 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/status-legend.cjs +1 -1
- package/dist/components/display/status-legend.js +6 -2
- 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.js +2 -0
- package/dist/components/form/form-select.cjs +1 -1
- package/dist/components/form/form-select.js +2 -0
- 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/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/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.d.ts +1 -1
- 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 +8 -1
- package/dist/components/ui/select/index.js +40 -35
- 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/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/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 +19 -6
- 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 +43 -18
- 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/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +57 -79
- 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-toolbar.tsx +8 -6
- package/packages/cli/vendor/src/components/display/carousel.tsx +84 -3
- 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/status-legend.tsx +11 -8
- 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 +2 -0
- package/packages/cli/vendor/src/components/form/form-select.tsx +2 -0
- 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/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/dialog/index.tsx +2 -1
- package/packages/cli/vendor/src/components/ui/hover-card.tsx +54 -28
- 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 +64 -31
- 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/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/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 +22 -1
- 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/render-registry-preview.tsx +0 -15
- 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
|
@@ -29,14 +29,16 @@ export const componentApiSchemas: Record<string, ComponentApiSchema> = {
|
|
|
29
29
|
{ name: "variant", type: "'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'warning' | 'link'", defaultValue: "'default'", description: "Controls visual hierarchy and action tone.", example: "variant=\"destructive\"" },
|
|
30
30
|
{ name: "size", type: "'xs' | 'sm' | 'default' | 'md' | 'lg' | 'xl' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'", defaultValue: "'default'", description: "Controls height, spacing and icon-only sizing.", example: "size=\"icon-sm\"" },
|
|
31
31
|
{ name: "loading", type: "boolean", defaultValue: "false", description: "Shows the spinner, disables interaction and communicates pending state.", example: "loading={isSaving}" },
|
|
32
|
-
{ name: "loadingLabel", type: "string", defaultValue: "'Loading'", description: "Accessible label displayed while the button is loading.", example: "loadingLabel=\"Saving\"" },
|
|
33
|
-
{ name: "disabled", type: "boolean", defaultValue: "false", description: "Disables the action and removes it from normal interaction.", example: "disabled={!canSubmit}" },
|
|
34
|
-
{ name: "leftIcon", type: "ReactNode", defaultValue: "-", description: "Icon rendered before the label. Use for primary verbs and scan-friendly actions." },
|
|
35
|
-
{ name: "rightIcon", type: "ReactNode", defaultValue: "-", description: "Icon rendered after the label. Use for forward navigation or external transitions." },
|
|
36
|
-
{ name: "
|
|
37
|
-
{ name: "
|
|
38
|
-
{ name: "
|
|
39
|
-
{ name: "
|
|
32
|
+
{ name: "loadingLabel", type: "string", defaultValue: "'Loading'", description: "Accessible label displayed while the button is loading.", example: "loadingLabel=\"Saving\"" },
|
|
33
|
+
{ name: "disabled", type: "boolean", defaultValue: "false", description: "Disables the action and removes it from normal interaction.", example: "disabled={!canSubmit}" },
|
|
34
|
+
{ name: "leftIcon", type: "ReactNode", defaultValue: "-", description: "Icon rendered before the label. Use for primary verbs and scan-friendly actions." },
|
|
35
|
+
{ name: "rightIcon", type: "ReactNode", defaultValue: "-", description: "Icon rendered after the label. Use for forward navigation or external transitions." },
|
|
36
|
+
{ name: "iconOnly", type: "boolean", defaultValue: "false", description: "Switches default sizing to the icon button size while keeping Button semantics.", example: "iconOnly aria-label=\"Download\"" },
|
|
37
|
+
{ name: "fullWidth", type: "boolean", defaultValue: "false", description: "Expands the button to fill its parent width.", example: "fullWidth" },
|
|
38
|
+
{ name: "pressed", type: "boolean", defaultValue: "false", description: "Marks toggle-like button state with aria-pressed and selected styling.", example: "pressed={active}" },
|
|
39
|
+
{ name: "className", type: "string", defaultValue: "-", description: "Optional class override for spacing or layout composition." },
|
|
40
|
+
{ name: "children", type: "ReactNode", defaultValue: "-", required: true, description: "Button label or icon content. Icon-only buttons must still provide an accessible name." },
|
|
41
|
+
{ name: "aria-label", type: "string", defaultValue: "-", description: "Required for icon-only buttons so the action is announced correctly.", notes: "Use when children are only icons." },
|
|
40
42
|
],
|
|
41
43
|
examples: [
|
|
42
44
|
{ title: "Primary action", code: "<Button>Save changes</Button>" },
|
|
@@ -51,18 +53,24 @@ export const componentApiSchemas: Record<string, ComponentApiSchema> = {
|
|
|
51
53
|
source: "metadata",
|
|
52
54
|
summary: "Primary typed-value surface. Start with Input and move into presets only when behavior requires it.",
|
|
53
55
|
props: [
|
|
54
|
-
{ name: "value", type: "string | number", defaultValue: "-", description: "Controlled input value.", example: "value={name}" },
|
|
55
|
-
{ name: "defaultValue", type: "string | number", defaultValue: "-", description: "Uncontrolled initial value." },
|
|
56
|
-
{ name: "
|
|
57
|
-
{ name: "
|
|
58
|
-
{ name: "
|
|
59
|
-
{ name: "
|
|
60
|
-
{ name: "
|
|
61
|
-
{ name: "
|
|
62
|
-
{ name: "
|
|
63
|
-
{ name: "
|
|
64
|
-
{ name: "
|
|
65
|
-
{ name: "
|
|
56
|
+
{ name: "value", type: "string | number", defaultValue: "-", description: "Controlled input value.", example: "value={name}" },
|
|
57
|
+
{ name: "defaultValue", type: "string | number", defaultValue: "-", description: "Uncontrolled initial value." },
|
|
58
|
+
{ name: "kind", type: "'text' | 'search' | 'password' | 'number' | 'phone' | 'money' | 'quantity' | 'masked' | 'date' | 'date-range'", defaultValue: "'text'", description: "Routes Input into a supported preset without teaching a new public component name first.", example: "kind=\"search\"" },
|
|
59
|
+
{ name: "onChange", type: "ChangeEventHandler<HTMLInputElement>", defaultValue: "-", description: "Native change handler for value updates.", example: "onChange={(event) => setValue(event.target.value)}" },
|
|
60
|
+
{ name: "onValueChange", type: "(value: string) => void", defaultValue: "-", description: "Direct text callback for controlled string flows.", example: "onValueChange={setQuery}" },
|
|
61
|
+
{ name: "type", type: "HTMLInputTypeAttribute", defaultValue: "'text'", description: "Native input type. Prefer presets only when formatting or masking is required." },
|
|
62
|
+
{ name: "placeholder", type: "string", defaultValue: "-", description: "Short hint for empty input state." },
|
|
63
|
+
{ name: "leading", type: "ReactNode", defaultValue: "-", description: "Non-interactive leading slot for icons, prefixes, or labels." },
|
|
64
|
+
{ name: "trailing", type: "ReactNode", defaultValue: "-", description: "Passive trailing slot for units, counts, or status copy." },
|
|
65
|
+
{ name: "clearable", type: "boolean", defaultValue: "false", description: "Shows the built-in clear action when a value exists.", example: "clearable" },
|
|
66
|
+
{ name: "onClear", type: "() => void", defaultValue: "-", description: "Called after the built-in clear action resets the field." },
|
|
67
|
+
{ name: "trailingAction", type: "ReactNode", defaultValue: "-", description: "Interactive trailing slot for counters, shortcuts, or toggle actions.", example: "trailingAction={<span>12 results</span>}" },
|
|
68
|
+
{ name: "replaceTrailingWhenClear", type: "boolean", defaultValue: "true", description: "Controls whether clear replaces trailing content or sits beside it." },
|
|
69
|
+
{ name: "clearOnEscape", type: "boolean", defaultValue: "false", description: "Clears the value on Escape when clearable mode is active." },
|
|
70
|
+
{ name: "helperText", type: "ReactNode", defaultValue: "-", description: "Support copy rendered below the field." },
|
|
71
|
+
{ name: "errorText", type: "ReactNode", defaultValue: "-", description: "Validation copy rendered below the field and connected to danger styling." },
|
|
72
|
+
{ name: "showCharacterCount", type: "boolean", defaultValue: "false", description: "Shows current length and maxLength when available." },
|
|
73
|
+
{ name: "disabled", type: "boolean", defaultValue: "false", description: "Disables editing and interaction." },
|
|
66
74
|
{ name: "required", type: "boolean", defaultValue: "false", description: "Marks the input as required for native validation." },
|
|
67
75
|
{ name: "name", type: "string", defaultValue: "-", description: "Form field name used during submission." },
|
|
68
76
|
{ name: "id", type: "string", defaultValue: "-", description: "Connects input to label and help text." },
|
|
@@ -75,27 +83,57 @@ export const componentApiSchemas: Record<string, ComponentApiSchema> = {
|
|
|
75
83
|
],
|
|
76
84
|
accessibility: ["Always pair form inputs with labels.", "Use aria-describedby for helper/error text.", "Keep disabled and read-only states visually distinct."],
|
|
77
85
|
},
|
|
78
|
-
select: {
|
|
79
|
-
slug: "select",
|
|
80
|
-
source: "metadata",
|
|
81
|
-
summary: "Primary selection surface. Start with Select
|
|
82
|
-
props: [
|
|
83
|
-
{ name: "value", type: "string |
|
|
84
|
-
{ name: "defaultValue", type: "string |
|
|
85
|
-
{ name: "onValueChange", type: "(value: string |
|
|
86
|
-
{ name: "options", type: "Array<{ label: string; value: string; disabled?: boolean }>", defaultValue: "[]", required: true, description: "Selectable option list." },
|
|
87
|
-
{ name: "
|
|
88
|
-
{ name: "
|
|
89
|
-
{ name: "
|
|
90
|
-
{ name: "
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
{
|
|
95
|
-
{
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
select: {
|
|
87
|
+
slug: "select",
|
|
88
|
+
source: "metadata",
|
|
89
|
+
summary: "Primary single-selection surface. Start with Select for finite option sets, then use AsyncSelect with isMulti only when remote loading or multi-value behavior is required.",
|
|
90
|
+
props: [
|
|
91
|
+
{ name: "value", type: "string | null", defaultValue: "-", description: "Controlled selected value." },
|
|
92
|
+
{ name: "defaultValue", type: "string | null", defaultValue: "-", description: "Uncontrolled initial selected value." },
|
|
93
|
+
{ name: "onValueChange", type: "(value: string | undefined) => void", defaultValue: "-", description: "Called when the selected value changes.", example: "onValueChange={setStatus}" },
|
|
94
|
+
{ name: "options", type: "Array<{ label: string; value: string; disabled?: boolean }>", defaultValue: "[]", required: true, description: "Selectable option list." },
|
|
95
|
+
{ name: "groups", type: "Array<{ label?: ReactNode; options: SelectOption[] }>", defaultValue: "-", description: "Grouped selectable options for longer finite lists." },
|
|
96
|
+
{ name: "placeholder", type: "string", defaultValue: "-", description: "Text shown when no value is selected." },
|
|
97
|
+
{ name: "disabled", type: "boolean", defaultValue: "false", description: "Disables the control and option selection." },
|
|
98
|
+
{ name: "searchable", type: "boolean", defaultValue: "false", description: "Enables local filtering on the main Select surface." },
|
|
99
|
+
{ name: "clearable", type: "boolean", defaultValue: "false", description: "Shows a clear action when a value is selected." },
|
|
100
|
+
{ name: "loading", type: "boolean", defaultValue: "false", description: "Disables selection and renders a loading state." },
|
|
101
|
+
{ name: "emptyLabel", type: "ReactNode", defaultValue: "'No options found'", description: "Empty state content for local filtering." },
|
|
102
|
+
{ name: "emptyMessage", type: "ReactNode", defaultValue: "-", description: "Alias for empty state content used by newer docs." },
|
|
103
|
+
{ name: "renderOption", type: "(option, state) => ReactNode", defaultValue: "-", description: "Custom option renderer for richer rows." },
|
|
104
|
+
],
|
|
105
|
+
examples: [
|
|
106
|
+
{ title: "Primary select", code: "<Select value={status} onValueChange={setStatus} options={statusOptions} />" },
|
|
107
|
+
{ title: "Searchable primary select", code: "<Select value={owner} onValueChange={setOwner} searchable options={ownerOptions} />" },
|
|
108
|
+
{ title: "Grouped select", code: "<Select value={region} onValueChange={setRegion} groups={regionGroups} searchable />" },
|
|
109
|
+
{ title: "Async member direction", code: "// Prefer Select first; use AsyncSelect only when remote loading is required." },
|
|
110
|
+
],
|
|
111
|
+
accessibility: ["Use clear option labels.", "Keep disabled options visible but not selectable.", "Do not replace long forms with hidden select menus."],
|
|
112
|
+
},
|
|
113
|
+
textarea: {
|
|
114
|
+
slug: "textarea",
|
|
115
|
+
source: "metadata",
|
|
116
|
+
summary: "Multi-line text entry surface with helper, error, read-only, disabled and character-count support.",
|
|
117
|
+
props: [
|
|
118
|
+
{ name: "value", type: "string", defaultValue: "-", description: "Controlled textarea value." },
|
|
119
|
+
{ name: "defaultValue", type: "string", defaultValue: "-", description: "Uncontrolled initial value." },
|
|
120
|
+
{ name: "onChange", type: "ChangeEventHandler<HTMLTextAreaElement>", defaultValue: "-", description: "Native change handler." },
|
|
121
|
+
{ name: "onValueChange", type: "(value: string) => void", defaultValue: "-", description: "Direct text callback for controlled flows." },
|
|
122
|
+
{ name: "rows", type: "number", defaultValue: "-", description: "Initial visible row count." },
|
|
123
|
+
{ name: "maxLength", type: "number", defaultValue: "-", description: "Native maximum character length." },
|
|
124
|
+
{ name: "helperText", type: "ReactNode", defaultValue: "-", description: "Support copy rendered below the field." },
|
|
125
|
+
{ name: "errorText", type: "ReactNode", defaultValue: "-", description: "Validation copy rendered below the field and danger styling." },
|
|
126
|
+
{ name: "showCharacterCount", type: "boolean", defaultValue: "false", description: "Shows current length and maxLength when available." },
|
|
127
|
+
{ name: "disabled", type: "boolean", defaultValue: "false", description: "Disables editing." },
|
|
128
|
+
{ name: "readOnly", type: "boolean", defaultValue: "false", description: "Keeps content copyable while preventing edits." },
|
|
129
|
+
],
|
|
130
|
+
examples: [
|
|
131
|
+
{ title: "Controlled note", code: "<Textarea value={note} onValueChange={setNote} helperText=\"Internal note\" />" },
|
|
132
|
+
{ title: "Limited feedback", code: "<Textarea maxLength={240} showCharacterCount />" },
|
|
133
|
+
{ title: "Error state", code: "<Textarea errorText=\"Please add at least 10 characters.\" />" },
|
|
134
|
+
],
|
|
135
|
+
accessibility: ["Pair textareas with visible labels.", "Use helper and error copy instead of placeholder-only instructions.", "Keep read-only distinct from disabled."],
|
|
136
|
+
},
|
|
99
137
|
"data-table": {
|
|
100
138
|
slug: "data-table",
|
|
101
139
|
source: "metadata",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Accordion,
|
|
3
|
-
Alert,
|
|
4
|
-
|
|
5
|
-
Avatar,
|
|
2
|
+
Accordion,
|
|
3
|
+
Alert,
|
|
4
|
+
Avatar,
|
|
6
5
|
AvatarGroup,
|
|
7
6
|
Badge,
|
|
8
7
|
Button,
|
|
@@ -504,21 +503,7 @@ function renderGenericPreviewSurface(
|
|
|
504
503
|
)
|
|
505
504
|
}
|
|
506
505
|
|
|
507
|
-
if (item.slug === "
|
|
508
|
-
return (
|
|
509
|
-
<AnchorNav
|
|
510
|
-
orientation="horizontal"
|
|
511
|
-
title="Sections"
|
|
512
|
-
items={[
|
|
513
|
-
{ key: "overview", label: "Overview", href: "#overview", active: true },
|
|
514
|
-
{ key: "usage", label: "Usage", href: "#usage" },
|
|
515
|
-
{ key: "api", label: "API", href: "#api" },
|
|
516
|
-
]}
|
|
517
|
-
/>
|
|
518
|
-
)
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
if (item.slug === "page-tabs") {
|
|
506
|
+
if (item.slug === "page-tabs") {
|
|
522
507
|
return (
|
|
523
508
|
<PageTabs
|
|
524
509
|
value="overview"
|
|
@@ -39,6 +39,7 @@ export function AlertShowcase({ mode }: ComponentDemoProps) {
|
|
|
39
39
|
tone={tone}
|
|
40
40
|
dismissible
|
|
41
41
|
onDismiss={() => setVisible(false)}
|
|
42
|
+
actionsAlign={tone === "destructive" ? "start" : "end"}
|
|
42
43
|
title={tone === "success" ? "Workspace synced" : tone === "destructive" ? "Action blocked" : tone === "info" ? "Heads up" : "Review needed"}
|
|
43
44
|
description={
|
|
44
45
|
tone === "success"
|
|
@@ -82,6 +82,7 @@ export function AppSidebarShowcase({ mode }: ComponentDemoProps) {
|
|
|
82
82
|
mobileToggleLabel="Open workspace menu"
|
|
83
83
|
header={<div className="px-3 py-2 text-sm font-semibold">Azamat Workspace</div>}
|
|
84
84
|
footer={<div className="aui-text-muted px-3 py-2 text-xs">Starter plan • 3 editors</div>}
|
|
85
|
+
footerClassName="bg-[color:var(--aui-page-bg-alt)]/55"
|
|
85
86
|
className="min-h-[440px] rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface)]"
|
|
86
87
|
/>
|
|
87
88
|
</section>
|
|
@@ -6,9 +6,10 @@ import type { ComponentDemoProps } from "../types"
|
|
|
6
6
|
import { badgeDemoItems } from "./data"
|
|
7
7
|
|
|
8
8
|
const panelClass = "border-t border-[color:var(--aui-divider)] py-6"
|
|
9
|
+
type BadgeVariant = ComponentDemoProps["state"]["badgeVariant"]
|
|
9
10
|
|
|
10
11
|
export function BadgeShowcase({ state, setState, mode }: ComponentDemoProps) {
|
|
11
|
-
const variants = ["default", "secondary", "destructive", "outline", "ghost", "link"]
|
|
12
|
+
const variants: BadgeVariant[] = ["default", "secondary", "soft", "destructive", "outline", "ghost", "link"]
|
|
12
13
|
const activeItem = badgeDemoItems.find((item) => item.variant === state.badgeVariant) ?? badgeDemoItems[0]
|
|
13
14
|
const [chipVisible, setChipVisible] = React.useState(true)
|
|
14
15
|
|
|
@@ -47,7 +48,7 @@ export function BadgeShowcase({ state, setState, mode }: ComponentDemoProps) {
|
|
|
47
48
|
key={variant}
|
|
48
49
|
type="button"
|
|
49
50
|
size="sm"
|
|
50
|
-
variant={state.badgeVariant === variant ? "default" : "secondary"}
|
|
51
|
+
variant={state.badgeVariant === variant ? ("default" as const) : ("secondary" as const)}
|
|
51
52
|
onClick={() => setState({ badgeVariant: variant })}
|
|
52
53
|
>
|
|
53
54
|
{variant}
|
|
@@ -93,6 +94,7 @@ export function BadgeShowcase({ state, setState, mode }: ComponentDemoProps) {
|
|
|
93
94
|
|
|
94
95
|
<div className="flex flex-wrap gap-2 border-t border-[color:var(--aui-divider)] pt-4">
|
|
95
96
|
<Badge variant="secondary" label="Customers" count={18} />
|
|
97
|
+
<Badge variant="soft" tone="info" label="Synced" dot />
|
|
96
98
|
<Badge status="warning" label="Pending approval" />
|
|
97
99
|
{chipVisible ? (
|
|
98
100
|
<Badge
|
|
@@ -8,6 +8,8 @@ const pages = [
|
|
|
8
8
|
{ key: "home", label: "Home", href: "/" },
|
|
9
9
|
{ key: "apps", label: "Apps", href: "/apps" },
|
|
10
10
|
{ key: "workspace", label: "Workspace", href: "/apps/workspace" },
|
|
11
|
+
{ key: "team", label: "Team settings", href: "/apps/workspace/team" },
|
|
12
|
+
{ key: "security", label: "Security", href: "/apps/workspace/team/security" },
|
|
11
13
|
{ key: "overview", label: "Overview", current: true },
|
|
12
14
|
]
|
|
13
15
|
|
|
@@ -52,7 +54,7 @@ export function BreadcrumbsShowcase({ mode }: ComponentDemoProps) {
|
|
|
52
54
|
) : null}
|
|
53
55
|
|
|
54
56
|
<div className="rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3">
|
|
55
|
-
<Breadcrumbs items={selectedItems} separator={separator} />
|
|
57
|
+
<Breadcrumbs items={selectedItems} separator={separator} maxItems={activeMode === "full" ? 4 : undefined} />
|
|
56
58
|
</div>
|
|
57
59
|
</div>
|
|
58
60
|
)
|
|
@@ -17,7 +17,7 @@ export function BasicExamples() {
|
|
|
17
17
|
|
|
18
18
|
<div className="flex flex-wrap gap-3">
|
|
19
19
|
<Button size="sm">Small</Button>
|
|
20
|
-
<Button
|
|
20
|
+
<Button iconOnly aria-label="Download">
|
|
21
21
|
<DownloadIcon className="size-4" />
|
|
22
22
|
</Button>
|
|
23
23
|
<Button>
|
|
@@ -36,9 +36,6 @@ export function BasicExamples() {
|
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<div className="flex flex-wrap gap-3">
|
|
39
|
-
<Button asChild>
|
|
40
|
-
<a href="/docs">Open docs</a>
|
|
41
|
-
</Button>
|
|
42
39
|
<a className={buttonVariants({ variant: "outline", size: "sm" })} href="/components">
|
|
43
40
|
Link styled as button
|
|
44
41
|
</a>
|
|
@@ -92,4 +89,4 @@ export function ControlledButton() {
|
|
|
92
89
|
"Supports focus, disabled and loading states for safe async interactions.",
|
|
93
90
|
"Use buttonVariants for non-button elements, but keep Button variant props for real button usage.",
|
|
94
91
|
],
|
|
95
|
-
}
|
|
92
|
+
}
|
|
@@ -31,7 +31,7 @@ function VariantRow({
|
|
|
31
31
|
<div className="flex flex-wrap items-center gap-2">
|
|
32
32
|
<Button variant={variant}>{label}</Button>
|
|
33
33
|
<Button variant={variant} size="sm">Small</Button>
|
|
34
|
-
<Button variant={variant}
|
|
34
|
+
<Button variant={variant} iconOnly aria-label={`${label} icon button`}>
|
|
35
35
|
<ArrowRightIcon className="size-4" />
|
|
36
36
|
</Button>
|
|
37
37
|
</div>
|
|
@@ -220,7 +220,7 @@ export function ButtonShowcase() {
|
|
|
220
220
|
<Button loading loadingLabel="Publishing">
|
|
221
221
|
Publish
|
|
222
222
|
</Button>
|
|
223
|
-
<Button variant="outline"
|
|
223
|
+
<Button variant="outline" iconOnly aria-label="Download">
|
|
224
224
|
<DownloadIcon className="size-4" />
|
|
225
225
|
</Button>
|
|
226
226
|
<a href="#" className={buttonVariants({ variant: "link" })}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Badge, Card } from "@/index"
|
|
1
|
+
import { Badge, Button, Card } from "@/index"
|
|
2
2
|
|
|
3
3
|
import type { ComponentDemoProps } from "../types"
|
|
4
4
|
|
|
@@ -42,8 +42,11 @@ export function CardShowcase({ state }: ComponentDemoProps) {
|
|
|
42
42
|
<div className="grid gap-4 xl:grid-cols-[minmax(0,1.08fr)_minmax(0,0.92fr)]">
|
|
43
43
|
<Card
|
|
44
44
|
size={state.cardCompact ? "sm" : "default"}
|
|
45
|
+
eyebrow="Content"
|
|
45
46
|
title={primaryProject.title}
|
|
46
47
|
description={primaryProject.description}
|
|
48
|
+
badge={<Badge tone="success" variant="soft">Live</Badge>}
|
|
49
|
+
action={<Button type="button" size="xs" variant="outline">Open</Button>}
|
|
47
50
|
content={
|
|
48
51
|
<div className="grid gap-3 sm:grid-cols-3">
|
|
49
52
|
{primaryProject.metrics.map((metric) => (
|
|
@@ -58,6 +61,9 @@ export function CardShowcase({ state }: ComponentDemoProps) {
|
|
|
58
61
|
|
|
59
62
|
<Card
|
|
60
63
|
size="sm"
|
|
64
|
+
interactive
|
|
65
|
+
selected
|
|
66
|
+
eyebrow="Selectable"
|
|
61
67
|
title={compactProject.title}
|
|
62
68
|
description={compactProject.description}
|
|
63
69
|
content={
|
|
@@ -70,6 +76,25 @@ export function CardShowcase({ state }: ComponentDemoProps) {
|
|
|
70
76
|
footer={compactProject.footer}
|
|
71
77
|
/>
|
|
72
78
|
</div>
|
|
79
|
+
<div className="mt-4 grid gap-4 xl:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)]">
|
|
80
|
+
<Card
|
|
81
|
+
orientation="horizontal"
|
|
82
|
+
mediaAspect="square"
|
|
83
|
+
title="Media card"
|
|
84
|
+
description="The same Card primitive owns image, copy, action and footer slots."
|
|
85
|
+
media={<div className="h-full min-h-36 bg-[linear-gradient(135deg,var(--primary),color-mix(in_oklch,var(--primary),white_42%))]" />}
|
|
86
|
+
action={<Button type="button" size="xs">View</Button>}
|
|
87
|
+
content={<p className="text-sm leading-6 aui-text-muted">Use media slots for previews, thumbnails, charts, or product visuals without creating another card component.</p>}
|
|
88
|
+
/>
|
|
89
|
+
<Card
|
|
90
|
+
size="sm"
|
|
91
|
+
density="compact"
|
|
92
|
+
title="Compact action card"
|
|
93
|
+
description="Dense layouts still use the same header, content and footer anatomy."
|
|
94
|
+
content={<div className="text-sm aui-text-strong">12 files ready for review</div>}
|
|
95
|
+
footer={<Button type="button" size="xs" variant="secondary">Review files</Button>}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
73
98
|
</section>
|
|
74
99
|
</div>
|
|
75
100
|
)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
3
|
import { Button, Carousel, CarouselItem } from "@/index"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
4
5
|
|
|
5
6
|
const steps = [
|
|
6
|
-
{ title: "Onboarding", text: "Guide quickly from first login.", tone: "Launch" },
|
|
7
|
-
{ title: "Components", text: "Review ready-made dashboard patterns.", tone: "Library" },
|
|
8
|
-
{ title: "Release", text: "Publish, test, and iterate faster.", tone: "Ship" },
|
|
7
|
+
{ title: "Onboarding", text: "Guide quickly from first login.", tone: "Launch", detail: "Hero slider for product onboarding and release tours." },
|
|
8
|
+
{ title: "Components", text: "Review ready-made dashboard patterns.", tone: "Library", detail: "Card rail, docs previews, and swipe-ready gallery states." },
|
|
9
|
+
{ title: "Release", text: "Publish, test, and iterate faster.", tone: "Ship", detail: "Active slide details stay below the main frame for context." },
|
|
9
10
|
]
|
|
10
11
|
|
|
11
12
|
export function CarouselShowcase() {
|
|
@@ -48,13 +49,28 @@ export function CarouselShowcase() {
|
|
|
48
49
|
loop
|
|
49
50
|
showArrows={showArrows}
|
|
50
51
|
showDots={showDots}
|
|
52
|
+
showStatus
|
|
53
|
+
showThumbnails
|
|
51
54
|
autoplay={autoplay}
|
|
52
55
|
autoplayInterval={2200}
|
|
53
56
|
showPlaybackControl
|
|
57
|
+
aspectRatio="16 / 9"
|
|
54
58
|
onIndexChange={(next) => setIndex(next)}
|
|
55
59
|
onAutoplayChange={setPlaying}
|
|
56
60
|
previousLabel="Previous slide"
|
|
57
61
|
nextLabel="Next slide"
|
|
62
|
+
renderThumbnail={(_, itemIndex, active) => (
|
|
63
|
+
<div className={cn("grid gap-1 p-3", active && "bg-primary/5")}>
|
|
64
|
+
<div className="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground">0{itemIndex + 1}</div>
|
|
65
|
+
<div className="text-sm font-medium text-foreground">{steps[itemIndex]?.title}</div>
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
renderActiveDetail={(_, activeIndex) => (
|
|
69
|
+
<div className="rounded-[20px] border border-border/70 bg-card/80 p-4">
|
|
70
|
+
<p className="text-sm font-semibold text-foreground">{steps[activeIndex]?.title}</p>
|
|
71
|
+
<p className="mt-1 text-sm text-muted-foreground">{steps[activeIndex]?.detail}</p>
|
|
72
|
+
</div>
|
|
73
|
+
)}
|
|
58
74
|
>
|
|
59
75
|
{steps.map((step, slideIndex) => (
|
|
60
76
|
<CarouselItem key={step.title}>
|
|
@@ -46,7 +46,7 @@ export function CommandBarShowcase() {
|
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
48
48
|
|
|
49
|
-
<CommandBar open={open} position={position} className="max-w-[calc(100%-2rem)]">
|
|
49
|
+
<CommandBar open={open} position={position} grouped label="Review flow" className="max-w-[calc(100%-2rem)]">
|
|
50
50
|
<Kbd>G</Kbd>
|
|
51
51
|
<Button size="sm" variant="ghost">
|
|
52
52
|
<MessageSquareIcon className="mr-2 size-4" />
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import type { ComponentDemoMock } from "../types"
|
|
2
2
|
|
|
3
|
-
export const dataTableMock: ComponentDemoMock = {
|
|
4
|
-
code: `import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
export const dataTableMock: ComponentDemoMock = {
|
|
4
|
+
code: `import { DataTable } from "tembro"
|
|
5
|
+
|
|
6
|
+
export function Example() {
|
|
7
|
+
return (
|
|
8
|
+
<DataTable
|
|
9
|
+
columns={columns}
|
|
10
|
+
data={rows}
|
|
11
|
+
title="Customers"
|
|
12
|
+
description="Search, filter, select, and act on operational rows."
|
|
13
|
+
search={{ value: query, onValueChange: setQuery, placeholder: "Search rows..." }}
|
|
14
|
+
filters={<StatusFilter value={status} onValueChange={setStatus} />}
|
|
15
|
+
toolbarActions={<ExportButton rows={rows} />}
|
|
16
|
+
features={{ columnVisibility: true, rowActions: true, bulkActions: true }}
|
|
17
|
+
rowSelection={rowSelection}
|
|
18
|
+
onRowSelectionChange={setRowSelection}
|
|
19
|
+
rowActions={(row) => getActions(row.original)}
|
|
20
|
+
bulkActions={bulkActions}
|
|
21
|
+
pagination={{ pageIndex, pageSize, pageCount, totalRows: rows.length, onPageChange: setPageIndex }}
|
|
22
|
+
density="comfortable"
|
|
23
|
+
striped
|
|
24
|
+
bordered
|
|
25
|
+
stickyHeader
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}`,
|
|
28
29
|
highlights: ["Toolbar actions", "Bulk actions", "Row click", "Visibility menu", "Density", "Preset-driven views", "Mobile strategy", "Pagination"],
|
|
29
30
|
scenarios: [
|
|
30
31
|
{ title: "Finance operations", description: "Filter, sort and paginate transactional rows with export-ready actions." },
|
|
@@ -4,6 +4,18 @@ import { Badge, FileUpload } from "@/index"
|
|
|
4
4
|
|
|
5
5
|
export function FileUploadShowcase() {
|
|
6
6
|
const [files, setFiles] = React.useState<File[]>([])
|
|
7
|
+
const [status, setStatus] = React.useState<Record<string, "idle" | "uploading" | "success" | "error">>({})
|
|
8
|
+
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
setStatus((current) => {
|
|
11
|
+
const next = { ...current }
|
|
12
|
+
files.forEach((file, index) => {
|
|
13
|
+
const key = `${file.name}-${file.size}-${file.lastModified}`
|
|
14
|
+
next[key] ??= index === 0 ? "uploading" : index === 1 ? "error" : "success"
|
|
15
|
+
})
|
|
16
|
+
return next
|
|
17
|
+
})
|
|
18
|
+
}, [files])
|
|
7
19
|
|
|
8
20
|
return (
|
|
9
21
|
<div className="space-y-4">
|
|
@@ -22,12 +34,20 @@ export function FileUploadShowcase() {
|
|
|
22
34
|
<FileUpload
|
|
23
35
|
files={files}
|
|
24
36
|
onFilesChange={setFiles}
|
|
37
|
+
status={status}
|
|
25
38
|
accept=".pdf,.docx,.png"
|
|
26
39
|
maxFiles={4}
|
|
27
40
|
maxSize={4 * 1024 * 1024}
|
|
28
41
|
dropzoneLabel="Upload release assets"
|
|
29
42
|
dropzoneDescription="Drag files here or choose from your device."
|
|
30
43
|
helperText="Supports PDF, DOCX and PNG up to 4 MB."
|
|
44
|
+
onRetryFile={(file) => {
|
|
45
|
+
const key = `${file.name}-${file.size}-${file.lastModified}`
|
|
46
|
+
setStatus((current) => ({ ...current, [key]: "uploading" }))
|
|
47
|
+
window.setTimeout(() => {
|
|
48
|
+
setStatus((current) => ({ ...current, [key]: "success" }))
|
|
49
|
+
}, 900)
|
|
50
|
+
}}
|
|
31
51
|
/>
|
|
32
52
|
|
|
33
53
|
<div className="grid gap-3 md:grid-cols-3">
|
|
@@ -37,7 +57,7 @@ export function FileUploadShowcase() {
|
|
|
37
57
|
</div>
|
|
38
58
|
<div className="rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm">
|
|
39
59
|
<p className="font-medium aui-text-strong">Interaction model</p>
|
|
40
|
-
<p className="mt-2 aui-text-muted">
|
|
60
|
+
<p className="mt-2 aui-text-muted">Uploading, success and retry-ready error rows all stay isolated from the parent dropzone click.</p>
|
|
41
61
|
</div>
|
|
42
62
|
<div className="rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm">
|
|
43
63
|
<p className="font-medium aui-text-strong">Use case</p>
|
|
@@ -23,6 +23,9 @@ export function ImageUploadShowcase() {
|
|
|
23
23
|
files={files}
|
|
24
24
|
onFilesChange={setFiles}
|
|
25
25
|
maxFiles={3}
|
|
26
|
+
minImageWidth={1200}
|
|
27
|
+
minImageHeight={800}
|
|
28
|
+
aspectRatio={1.5}
|
|
26
29
|
helperText="Upload hero illustrations or block thumbnails."
|
|
27
30
|
/>
|
|
28
31
|
|
|
@@ -33,7 +36,7 @@ export function ImageUploadShowcase() {
|
|
|
33
36
|
</div>
|
|
34
37
|
<div className="rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm">
|
|
35
38
|
<p className="font-medium aui-text-strong">Interaction model</p>
|
|
36
|
-
<p className="mt-2 aui-text-muted">
|
|
39
|
+
<p className="mt-2 aui-text-muted">Preview, remove, and ratio validation live inside the same reusable media surface.</p>
|
|
37
40
|
</div>
|
|
38
41
|
<div className="rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm">
|
|
39
42
|
<p className="font-medium aui-text-strong">Use case</p>
|
|
@@ -5,7 +5,6 @@ import { AlertDialogShowcase, alertDialogMock } from "./alert-dialog"
|
|
|
5
5
|
import { accordionMock, AccordionShowcase } from "./accordion"
|
|
6
6
|
import { activityFeedMock, ActivityFeedShowcase } from "./activity-feed"
|
|
7
7
|
import { ActionMenuShowcase, actionMenuMock } from "./action-menu"
|
|
8
|
-
import { appShellMock, AppShellShowcase } from "./app-shell"
|
|
9
8
|
import { appSidebarMock, AppSidebarShowcase } from "./app-sidebar"
|
|
10
9
|
import { asyncSelectMock, AsyncSelectShowcase } from "./async-select"
|
|
11
10
|
import { asyncMultiSelectMock, AsyncMultiSelectShowcase } from "./async-multi-select"
|
|
@@ -203,7 +202,6 @@ export const premiumShowcaseDemoRegistry: Record<string, ComponentDemoBundle> =
|
|
|
203
202
|
table: { mock: tableMock, Showcase: TableShowcase },
|
|
204
203
|
sidebar: { mock: appSidebarMock, Showcase: AppSidebarShowcase },
|
|
205
204
|
"app-sidebar": { mock: appSidebarMock, Showcase: AppSidebarShowcase },
|
|
206
|
-
"app-shell": { mock: appShellMock, Showcase: AppShellShowcase },
|
|
207
205
|
"sidebar-nav": { mock: sidebarNavMock, Showcase: SidebarNavShowcase },
|
|
208
206
|
breadcrumbs: { mock: breadcrumbsMock, Showcase: BreadcrumbsShowcase },
|
|
209
207
|
"page-header": { mock: pageHeaderMock, Showcase: PageHeaderShowcase },
|
|
@@ -48,7 +48,7 @@ export function LoadingStateShowcase({ mode }: ComponentDemoProps) {
|
|
|
48
48
|
) : null}
|
|
49
49
|
|
|
50
50
|
<LoadingState label={labels[index]} description={descriptions[index]} />
|
|
51
|
-
{showSecondary ? <LoadingState label={`${labels[index]} (
|
|
51
|
+
{showSecondary ? <LoadingState variant="progress" progress={68} label={`${labels[index]} (progress)`} description="This is a second loading area inside the same page." /> : null}
|
|
52
52
|
</div>
|
|
53
53
|
)
|
|
54
54
|
}
|