tembro 2.0.6 → 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-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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/ui/right-click-menu/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/ui/right-click-menu/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");var s=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function c(){let[e,c]=i.useState(`Rename`);return(0,o.jsxs)(`div`,{className:`space-y-5`,children:[(0,o.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,o.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,o.jsxs)(`div`,{className:`max-w-xl`,children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Context actions`}),(0,o.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Right click menu should hide secondary actions until they are needed`}),(0,o.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use it for workspace-style surfaces where always-visible row actions would create too much noise.`})]}),(0,o.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,o.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Secondary actions`}),(0,o.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Pointer workflow`}),(0,o.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Compact menu`})]})]}),(0,o.jsxs)(`div`,{className:`mt-6 grid gap-4 xl:grid-cols-[1.05fr_0.95fr]`,children:[(0,o.jsxs)(`div`,{className:s,children:[(0,o.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Interactive surface`}),(0,o.jsx)(`div`,{className:`mt-3`,children:(0,o.jsx)(r.RightClickMenu,{items:[{label:`Rename`,icon:(0,o.jsx)(a.PencilIcon,{}),shortcut:`R`,onSelect:()=>c(`Rename`)},{label:`Duplicate`,icon:(0,o.jsx)(a.CopyIcon,{}),shortcut:`D`,onSelect:()=>c(`Duplicate`)},{label:`Archive`,icon:(0,o.jsx)(a.ArchiveIcon,{}),onSelect:()=>c(`Archive`)},{label:`Remove`,icon:(0,o.jsx)(a.Trash2Icon,{}),variant:`destructive`,onSelect:()=>c(`Remove`)}],children:(0,o.jsx)(`div`,{className:`rounded-[20px] border border-dashed border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-4 py-12 text-center text-sm aui-text-muted`,tabIndex:0,children:`Right click, use Shift+F10, or press the context-menu key in this area`})})})]}),(0,o.jsxs)(`div`,{className:s,children:[(0,o.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Last action`}),(0,o.jsx)(`p`,{className:`mt-3 text-lg font-semibold aui-text-strong`,children:e}),(0,o.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Keep a visible fallback action path for keyboard and touch users.`})]})]})]}),(0,o.jsx)(`section`,{className:s,children:(0,o.jsxs)(`div`,{className:`flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Live state`}),(0,o.jsxs)(`h4`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:[`Selected action: `,e]})]}),(0,o.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[`Rename`,`Duplicate`,`Archive`].map(n=>(0,o.jsx)(t.Button,{type:`button`,size:`sm`,variant:e===n?`default`:`secondary`,onClick:()=>c(n),children:n},n))})]})})]})}exports.RightClickMenuShowcase=c;
|
|
@@ -2,122 +2,135 @@ import { Button as e } from "../../../components/ui/button/index.js";
|
|
|
2
2
|
import { Badge as t } from "../../../components/ui/badge/index.js";
|
|
3
3
|
import { RightClickMenu as n } from "../../../components/ui/right-click-menu/index.js";
|
|
4
4
|
import * as r from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { ArchiveIcon as i, CopyIcon as a, PencilIcon as o, Trash2Icon as s } from "lucide-react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
7
|
//#region src/showcase/premium/right-click-menu/showcase.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let [
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
var u = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5";
|
|
9
|
+
function d() {
|
|
10
|
+
let [d, f] = r.useState("Rename");
|
|
11
|
+
return /* @__PURE__ */ l("div", {
|
|
11
12
|
className: "space-y-5",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ l("section", {
|
|
13
14
|
className: "rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ l("div", {
|
|
15
16
|
className: "flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ l("div", {
|
|
17
18
|
className: "max-w-xl",
|
|
18
19
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ c("p", {
|
|
20
21
|
className: "text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted",
|
|
21
22
|
children: "Context actions"
|
|
22
23
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ c("h3", {
|
|
24
25
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
25
26
|
children: "Right click menu should hide secondary actions until they are needed"
|
|
26
27
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ c("p", {
|
|
28
29
|
className: "mt-3 max-w-lg text-sm leading-6 aui-text-muted",
|
|
29
30
|
children: "Use it for workspace-style surfaces where always-visible row actions would create too much noise."
|
|
30
31
|
})
|
|
31
32
|
]
|
|
32
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ l("div", {
|
|
33
34
|
className: "flex flex-wrap gap-2",
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ c(t, {
|
|
36
37
|
variant: "outline",
|
|
37
38
|
className: "rounded-full",
|
|
38
39
|
children: "Secondary actions"
|
|
39
40
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ c(t, {
|
|
41
42
|
variant: "outline",
|
|
42
43
|
className: "rounded-full",
|
|
43
44
|
children: "Pointer workflow"
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ c(t, {
|
|
46
47
|
variant: "outline",
|
|
47
48
|
className: "rounded-full",
|
|
48
49
|
children: "Compact menu"
|
|
49
50
|
})
|
|
50
51
|
]
|
|
51
52
|
})]
|
|
52
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ l("div", {
|
|
53
54
|
className: "mt-6 grid gap-4 xl:grid-cols-[1.05fr_0.95fr]",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
-
className:
|
|
56
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ l("div", {
|
|
56
|
+
className: u,
|
|
57
|
+
children: [/* @__PURE__ */ c("p", {
|
|
57
58
|
className: "text-sm font-medium aui-text-muted",
|
|
58
59
|
children: "Interactive surface"
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ c("div", {
|
|
60
61
|
className: "mt-3",
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ c(n, {
|
|
62
63
|
items: [
|
|
63
64
|
{
|
|
64
65
|
label: "Rename",
|
|
65
|
-
|
|
66
|
+
icon: /* @__PURE__ */ c(o, {}),
|
|
67
|
+
shortcut: "R",
|
|
68
|
+
onSelect: () => f("Rename")
|
|
66
69
|
},
|
|
67
70
|
{
|
|
68
71
|
label: "Duplicate",
|
|
69
|
-
|
|
72
|
+
icon: /* @__PURE__ */ c(a, {}),
|
|
73
|
+
shortcut: "D",
|
|
74
|
+
onSelect: () => f("Duplicate")
|
|
70
75
|
},
|
|
71
76
|
{
|
|
72
77
|
label: "Archive",
|
|
73
|
-
|
|
78
|
+
icon: /* @__PURE__ */ c(i, {}),
|
|
79
|
+
onSelect: () => f("Archive")
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "Remove",
|
|
83
|
+
icon: /* @__PURE__ */ c(s, {}),
|
|
84
|
+
variant: "destructive",
|
|
85
|
+
onSelect: () => f("Remove")
|
|
74
86
|
}
|
|
75
87
|
],
|
|
76
|
-
children: /* @__PURE__ */
|
|
88
|
+
children: /* @__PURE__ */ c("div", {
|
|
77
89
|
className: "rounded-[20px] border border-dashed border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-4 py-12 text-center text-sm aui-text-muted",
|
|
78
|
-
|
|
90
|
+
tabIndex: 0,
|
|
91
|
+
children: "Right click, use Shift+F10, or press the context-menu key in this area"
|
|
79
92
|
})
|
|
80
93
|
})
|
|
81
94
|
})]
|
|
82
|
-
}), /* @__PURE__ */
|
|
83
|
-
className:
|
|
95
|
+
}), /* @__PURE__ */ l("div", {
|
|
96
|
+
className: u,
|
|
84
97
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ c("p", {
|
|
86
99
|
className: "text-sm font-medium aui-text-muted",
|
|
87
100
|
children: "Last action"
|
|
88
101
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ c("p", {
|
|
90
103
|
className: "mt-3 text-lg font-semibold aui-text-strong",
|
|
91
|
-
children:
|
|
104
|
+
children: d
|
|
92
105
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ c("p", {
|
|
94
107
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
95
108
|
children: "Keep a visible fallback action path for keyboard and touch users."
|
|
96
109
|
})
|
|
97
110
|
]
|
|
98
111
|
})]
|
|
99
112
|
})]
|
|
100
|
-
}), /* @__PURE__ */
|
|
101
|
-
className:
|
|
102
|
-
children: /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ c("section", {
|
|
114
|
+
className: u,
|
|
115
|
+
children: /* @__PURE__ */ l("div", {
|
|
103
116
|
className: "flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
105
118
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
106
119
|
children: "Live state"
|
|
107
|
-
}), /* @__PURE__ */
|
|
120
|
+
}), /* @__PURE__ */ l("h4", {
|
|
108
121
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
109
|
-
children: ["Selected action: ",
|
|
110
|
-
})] }), /* @__PURE__ */
|
|
122
|
+
children: ["Selected action: ", d]
|
|
123
|
+
})] }), /* @__PURE__ */ c("div", {
|
|
111
124
|
className: "flex flex-wrap gap-2",
|
|
112
125
|
children: [
|
|
113
126
|
"Rename",
|
|
114
127
|
"Duplicate",
|
|
115
128
|
"Archive"
|
|
116
|
-
].map((t) => /* @__PURE__ */
|
|
129
|
+
].map((t) => /* @__PURE__ */ c(e, {
|
|
117
130
|
type: "button",
|
|
118
131
|
size: "sm",
|
|
119
|
-
variant:
|
|
120
|
-
onClick: () =>
|
|
132
|
+
variant: d === t ? "default" : "secondary",
|
|
133
|
+
onClick: () => f(t),
|
|
121
134
|
children: t
|
|
122
135
|
}, t))
|
|
123
136
|
})]
|
|
@@ -126,4 +139,4 @@ function s() {
|
|
|
126
139
|
});
|
|
127
140
|
}
|
|
128
141
|
//#endregion
|
|
129
|
-
export {
|
|
142
|
+
export { d as RightClickMenuShowcase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/badge/index.cjs"),n=require("../../../components/ui/segmented-control/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=`border-t border-[color:var(--aui-divider)] py-6`;function s(){let[e,s]=r.useState(`board`),[c,l]=r.useState(`comfortable`);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsxs)(`section`,{className:`pb-6`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Installed primitive`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`SegmentedControl is the inline mode switch`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-2xl text-sm leading-6 aui-text-muted`,children:`Use it when the user should compare mutually-exclusive states immediately, not open a dropdown first.`})]}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_360px]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-lg font-semibold aui-text-strong`,children:`Workspace view switch`}),(0,a.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`The primary use-case is a visible view toggle for board, list, or table layouts.`}),(0,a.jsx)(`div`,{className:`mt-5`,children:(0,a.jsx)(n.SegmentedControl,{value:e,onValueChange:s,options:[{value:`board`,label:`Board`,icon:(0,a.jsx)(i.LayoutGridIcon,{className:`size-4`})},{value:`list`,label:`List`,icon:(0,a.jsx)(i.Rows3Icon,{className:`size-4`})},{value:`table`,label:`Table`,icon:(0,a.jsx)(i.Table2Icon,{className:`size-4`})}]})})]}),(0,a.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4`,children:[(0,a.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:`Current surface`}),(0,a.jsx)(`p`,{className:`mt-1 text-xs aui-text-muted`,children:`Controlled selection is ready for route state or URL sync.`})]}),(0,a.jsx)(t.Badge,{variant:`secondary`,children:e})]}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Prefer segmented controls for 2 to 4 options that should stay visible together.`}),(0,a.jsx)(`p`,{children:`Once the list grows larger or becomes searchable, move to Select instead.`})]})]})]})}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-lg font-semibold aui-text-strong`,children:`Density and size tokens`}),(0,a.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`Compact admin pages often need a second segmented row for density or behavior mode.`}),(0,a.jsxs)(`div`,{className:`mt-5 space-y-4`,children:[(0,a.jsx)(n.SegmentedControl,{size:`sm`,value:c,onValueChange:l,options:[{value:`compact`,label:`Compact`},{value:`comfortable`,label:`Comfortable`},{value:`spacious`,label:`Spacious`}]}),(0,a.jsx)(n.SegmentedControl,{size:`lg`,fullWidth:!0,defaultValue:`filters`,options:[{value:`filters`,label:`Filters`,icon:(0,a.jsx)(i.SlidersHorizontalIcon,{className:`size-4`})},{value:`views`,label:`Views`,icon:(0,a.jsx)(i.Rows3Icon,{className:`size-4`})}]})]})]}),(0,a.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] p-4`,children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:`Guidance`}),(0,a.jsxs)(`div`,{className:`mt-3 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Use one sentence labels. Long phrases make the rail heavy and unstable.`}),(0,a.jsx)(`p`,{children:`Keep the selected segment visually stronger than neighboring options, but do not turn it into a full button row.`}),(0,a.jsx)(`p`,{children:`If a segment triggers navigation instead of state, route tabs may be the better primitive.`})]})]})]})})]})}exports.SegmentedControlShowcase=s;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/badge/index.cjs"),n=require("../../../components/ui/segmented-control/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=`border-t border-[color:var(--aui-divider)] py-6`;function s(){let[e,s]=r.useState(`board`),[c,l]=r.useState(`comfortable`);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsxs)(`section`,{className:`pb-6`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Installed primitive`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`SegmentedControl is the inline mode switch`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-2xl text-sm leading-6 aui-text-muted`,children:`Use it when the user should compare mutually-exclusive states immediately, not open a dropdown first.`})]}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_360px]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-lg font-semibold aui-text-strong`,children:`Workspace view switch`}),(0,a.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`The primary use-case is a visible view toggle for board, list, or table layouts.`}),(0,a.jsx)(`div`,{className:`mt-5`,children:(0,a.jsx)(n.SegmentedControl,{value:e,onValueChange:s,options:[{value:`board`,label:`Board`,icon:(0,a.jsx)(i.LayoutGridIcon,{className:`size-4`})},{value:`list`,label:`List`,icon:(0,a.jsx)(i.Rows3Icon,{className:`size-4`})},{value:`table`,label:`Table`,icon:(0,a.jsx)(i.Table2Icon,{className:`size-4`})}]})})]}),(0,a.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4`,children:[(0,a.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:`Current surface`}),(0,a.jsx)(`p`,{className:`mt-1 text-xs aui-text-muted`,children:`Controlled selection is ready for route state or URL sync.`})]}),(0,a.jsx)(t.Badge,{variant:`secondary`,children:e})]}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Prefer segmented controls for 2 to 4 options that should stay visible together.`}),(0,a.jsx)(`p`,{children:`Once the list grows larger or becomes searchable, move to Select instead.`})]})]})]})}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-lg font-semibold aui-text-strong`,children:`Density and size tokens`}),(0,a.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`Compact admin pages often need a second segmented row for density or behavior mode.`}),(0,a.jsxs)(`div`,{className:`mt-5 space-y-4`,children:[(0,a.jsx)(n.SegmentedControl,{size:`sm`,value:c,onValueChange:l,options:[{value:`compact`,label:`Compact`},{value:`comfortable`,label:`Comfortable`},{value:`spacious`,label:`Spacious`}]}),(0,a.jsx)(n.SegmentedControl,{size:`lg`,fullWidth:!0,equalWidth:!0,defaultValue:`filters`,options:[{value:`filters`,label:`Filters`,icon:(0,a.jsx)(i.SlidersHorizontalIcon,{className:`size-4`})},{value:`views`,label:`Views`,icon:(0,a.jsx)(i.Rows3Icon,{className:`size-4`})}]})]})]}),(0,a.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] p-4`,children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:`Guidance`}),(0,a.jsxs)(`div`,{className:`mt-3 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Use one sentence labels. Long phrases make the rail heavy and unstable.`}),(0,a.jsx)(`p`,{children:`Keep the selected segment visually stronger than neighboring options, but do not turn it into a full button row.`}),(0,a.jsx)(`p`,{children:`If a segment triggers navigation instead of state, route tabs may be the better primitive.`})]})]})]})})]})}exports.SegmentedControlShowcase=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[{title:`Plan picker`,options:[{value:`starter`,label:`Starter`},{value:`growth`,label:`Growth`},{value:`enterprise`,label:`Enterprise`}]},{title:`Status filter`,size:`sm`,options:[{value:`active`,label:`Active`},{value:`review`,label:`Review`},{value:`draft`,label:`Draft`}]}];exports.selectDemoGroups=e;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[{title:`Plan picker`,options:[{value:`starter`,label:`Starter`},{value:`growth`,label:`Growth`,description:`25 seats and shared support`},{value:`enterprise`,label:`Enterprise`,description:`Unlimited seats and priority support`}]},{title:`Status filter`,size:`sm`,options:[{value:`active`,label:`Active`},{value:`review`,label:`Review`},{value:`draft`,label:`Draft`}]},{title:`Grouped workspace routing`,options:[{value:`north`,label:`North Region`,description:`Sales operations`,keywords:[`sales`]},{value:`south`,label:`South Region`,description:`Support queue`,keywords:[`support`]},{value:`billing`,label:`Billing Desk`,description:`Finance team`,keywords:[`finance`]},{value:`archive`,label:`Archive`,description:`Read-only records`,disabled:!0,keywords:[`disabled`]}]}];exports.selectDemoGroups=e;
|
|
@@ -1,37 +1,72 @@
|
|
|
1
1
|
//#region src/showcase/premium/select/data.ts
|
|
2
|
-
var e = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
title: "Plan picker",
|
|
5
|
+
options: [
|
|
6
|
+
{
|
|
7
|
+
value: "starter",
|
|
8
|
+
label: "Starter"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "growth",
|
|
12
|
+
label: "Growth",
|
|
13
|
+
description: "25 seats and shared support"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: "enterprise",
|
|
17
|
+
label: "Enterprise",
|
|
18
|
+
description: "Unlimited seats and priority support"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "Status filter",
|
|
24
|
+
size: "sm",
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
value: "active",
|
|
28
|
+
label: "Active"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "review",
|
|
32
|
+
label: "Review"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "draft",
|
|
36
|
+
label: "Draft"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "Grouped workspace routing",
|
|
42
|
+
options: [
|
|
43
|
+
{
|
|
44
|
+
value: "north",
|
|
45
|
+
label: "North Region",
|
|
46
|
+
description: "Sales operations",
|
|
47
|
+
keywords: ["sales"]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: "south",
|
|
51
|
+
label: "South Region",
|
|
52
|
+
description: "Support queue",
|
|
53
|
+
keywords: ["support"]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: "billing",
|
|
57
|
+
label: "Billing Desk",
|
|
58
|
+
description: "Finance team",
|
|
59
|
+
keywords: ["finance"]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: "archive",
|
|
63
|
+
label: "Archive",
|
|
64
|
+
description: "Read-only records",
|
|
65
|
+
disabled: !0,
|
|
66
|
+
keywords: ["disabled"]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
];
|
|
36
71
|
//#endregion
|
|
37
72
|
export { e as selectDemoGroups };
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={code:`import { Select } from "tembro"
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const planGroups = [
|
|
4
|
+
{
|
|
5
|
+
label: "Plans",
|
|
6
|
+
options: [
|
|
7
|
+
{ value: "starter", label: "Starter" },
|
|
8
|
+
{ value: "growth", label: "Growth", description: "25 seats" },
|
|
9
|
+
{ value: "enterprise", label: "Enterprise", description: "Priority support" },
|
|
10
|
+
],
|
|
11
|
+
},
|
|
7
12
|
]
|
|
8
13
|
|
|
9
14
|
export function Example() {
|
|
10
|
-
return
|
|
11
|
-
|
|
15
|
+
return (
|
|
16
|
+
<Select
|
|
17
|
+
defaultValue="starter"
|
|
18
|
+
groups={planGroups}
|
|
19
|
+
searchable
|
|
20
|
+
clearable
|
|
21
|
+
emptyMessage="No plan matched"
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
}`,cliCommand:`npx tembro add select`,highlights:[`Primary selection surface`,`Controlled selection`,`Searchable local flow`,`Grouped option support`,`Compact trigger options`],relatedBlockSlugs:[`crm-dashboard`,`users-table`,`dashboard-starter`],scenarios:[{title:`Plan picker`,description:`Switch between starter, growth and enterprise plans.`},{title:`Status filter`,description:`Use select inside dashboards and reporting toolbars.`},{title:`Compact trigger`,description:`Render small controls in dense admin layouts.`},{title:`Grouped options`,description:`Present structured choices without overwhelming the form.`}],capabilityNotes:[`Start here for most static single-choice flows before reaching for helper members.`,`Supports controlled and uncontrolled selected values, grouped options, clearable state, and searchable local filtering.`,`Includes trigger sizing for compact or default density layouts.`,`AsyncSelect, AsyncMultiSelect, SimpleSelect, and Combobox should read as related members rather than separate starting points.`]};exports.selectMock=e;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
//#region src/showcase/premium/select/mock.ts
|
|
2
2
|
var e = {
|
|
3
|
-
code: "import { Select } from \"tembro\"\n\nconst
|
|
3
|
+
code: "import { Select } from \"tembro\"\n\nconst planGroups = [\n {\n label: \"Plans\",\n options: [\n { value: \"starter\", label: \"Starter\" },\n { value: \"growth\", label: \"Growth\", description: \"25 seats\" },\n { value: \"enterprise\", label: \"Enterprise\", description: \"Priority support\" },\n ],\n },\n]\n\nexport function Example() {\n return (\n <Select\n defaultValue=\"starter\"\n groups={planGroups}\n searchable\n clearable\n emptyMessage=\"No plan matched\"\n />\n )\n}",
|
|
4
4
|
cliCommand: "npx tembro add select",
|
|
5
5
|
highlights: [
|
|
6
6
|
"Primary selection surface",
|
|
7
7
|
"Controlled selection",
|
|
8
8
|
"Searchable local flow",
|
|
9
|
+
"Grouped option support",
|
|
9
10
|
"Compact trigger options"
|
|
10
11
|
],
|
|
11
12
|
relatedBlockSlugs: [
|
|
@@ -33,7 +34,7 @@ var e = {
|
|
|
33
34
|
],
|
|
34
35
|
capabilityNotes: [
|
|
35
36
|
"Start here for most static single-choice flows before reaching for helper members.",
|
|
36
|
-
"Supports controlled and uncontrolled selected values
|
|
37
|
+
"Supports controlled and uncontrolled selected values, grouped options, clearable state, and searchable local filtering.",
|
|
37
38
|
"Includes trigger sizing for compact or default density layouts.",
|
|
38
39
|
"AsyncSelect, AsyncMultiSelect, SimpleSelect, and Combobox should read as related members rather than separate starting points."
|
|
39
40
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/ui/select/index.cjs"),i=require("./data.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=`border-t border-[color:var(--aui-divider)] py-6`;function c({state:e,setState:c}){let l=i.selectDemoGroups[0].options,u=i.selectDemoGroups[1].options,d=e.selectValue??l[0].value,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/ui/select/index.cjs"),i=require("./data.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=`border-t border-[color:var(--aui-divider)] py-6`;function c({state:e,setState:c}){let l=i.selectDemoGroups[0].options,u=i.selectDemoGroups[1].options,d=i.selectDemoGroups[2].options,f=e.selectValue??l[0].value,p=l.find(e=>e.value===f)??l[0],m=l[1]??l[0],[h,g]=a.useState(`plan`),[_,v]=a.useState(`north`),y=p.value===`enterprise`?[[`Seats`,`Unlimited`],[`Support`,`Dedicated`],[`SLA`,`Priority`]]:p.value===`growth`?[[`Seats`,`25`],[`Support`,`Shared`],[`SLA`,`Same day`]]:[[`Seats`,`5`],[`Support`,`Email`],[`SLA`,`Standard`]];return(0,o.jsxs)(`div`,{className:`space-y-0`,children:[(0,o.jsxs)(`section`,{className:`pb-6`,children:[(0,o.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-end xl:justify-between`,children:[(0,o.jsxs)(`div`,{className:`max-w-xl`,children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Selection`}),(0,o.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`One clean select surface first`}),(0,o.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:`Show the default trigger, controlled value, and summary update in one place.`})]}),(0,o.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 xl:min-w-[360px] xl:max-w-[420px]`,children:[(0,o.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Choice`}),(0,o.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:p.label})]}),(0,o.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Mode`}),(0,o.jsx)(`p`,{className:`mt-2 text-lg font-semibold capitalize aui-text-strong`,children:h})]}),(0,o.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Options`}),(0,o.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:h===`plan`?l.length:u.length})]})]})]}),(0,o.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2`,children:[(0,o.jsx)(t.Button,{size:`sm`,variant:h===`plan`?`default`:`outline`,onClick:()=>g(`plan`),children:`Default trigger`}),(0,o.jsx)(t.Button,{size:`sm`,variant:h===`density`?`default`:`outline`,onClick:()=>g(`density`),children:`Compact trigger`})]})]}),(0,o.jsx)(`section`,{className:s,children:(0,o.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)]`,children:[(0,o.jsxs)(`div`,{className:`space-y-4`,children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Primary select`}),(0,o.jsx)(`h4`,{className:`mt-2 text-xl font-semibold tracking-tight aui-text-strong`,children:h===`plan`?`Standard choice trigger`:`Compact toolbar trigger`})]}),(0,o.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] p-4`,children:[(0,o.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:h===`plan`?`Workspace plan`:`Toolbar density`}),(0,o.jsx)(`div`,{className:`mt-3`,children:h===`plan`?(0,o.jsx)(r.Select,{value:f,onValueChange:e=>c({selectValue:e??l[0].value}),options:l,triggerClassName:`w-full`}):(0,o.jsx)(r.Select,{defaultValue:u[0].value,options:u,size:`sm`,triggerClassName:`w-full`})})]}),(0,o.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] p-4`,children:[(0,o.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Grouped searchable select`}),(0,o.jsx)(`div`,{className:`mt-3`,children:(0,o.jsx)(r.Select,{value:_,onValueChange:e=>v(e??`north`),searchable:!0,clearable:!0,placeholder:`Choose workspace`,emptyMessage:`No workspace matched`,groups:[{label:`Regions`,options:d.slice(0,2)},{label:`Operations`,options:d.slice(2)}],triggerClassName:`w-full`})})]}),(0,o.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:y.map(([e,t])=>(0,o.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,o.jsx)(`p`,{className:`text-xs aui-text-muted`,children:e}),(0,o.jsx)(`p`,{className:`mt-1 text-sm font-medium aui-text-strong`,children:t})]},e))})]}),(0,o.jsxs)(`div`,{className:`space-y-4`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Controlled result`}),(0,o.jsx)(`h4`,{className:`mt-2 text-xl font-semibold tracking-tight aui-text-strong`,children:p.label})]}),(0,o.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:p.value})]}),(0,o.jsx)(`div`,{className:`border-y border-[color:var(--aui-divider)]`,children:[`Base Select should cover normal forms and static choices first.`,`Async and searchable variants should be documented as upgrades, not parallel defaults.`,`Controlled value must update nearby product UI immediately.`].map(e=>(0,o.jsx)(`div`,{className:`border-b border-[color:var(--aui-divider)] py-3 text-sm leading-6 aui-text-muted last:border-b-0`,children:e},e))}),(0,o.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,o.jsxs)(t.Button,{type:`button`,size:`sm`,onClick:()=>c({selectValue:m.value}),children:[`Choose `,m.label]}),(0,o.jsx)(t.Button,{type:`button`,size:`sm`,variant:`secondary`,onClick:()=>c({selectValue:l[0].value}),children:`Reset`})]})]})]})})]})}exports.SelectShowcase=c;
|
|
@@ -7,11 +7,11 @@ import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
|
7
7
|
//#region src/showcase/premium/select/showcase.tsx
|
|
8
8
|
var s = "border-t border-[color:var(--aui-divider)] py-6";
|
|
9
9
|
function c({ state: c, setState: l }) {
|
|
10
|
-
let u = r[0].options, d = r[1].options, f = c.selectValue ?? u[0].value,
|
|
10
|
+
let u = r[0].options, d = r[1].options, f = r[2].options, p = c.selectValue ?? u[0].value, m = u.find((e) => e.value === p) ?? u[0], h = u[1] ?? u[0], [g, _] = i.useState("plan"), [v, y] = i.useState("north"), b = m.value === "enterprise" ? [
|
|
11
11
|
["Seats", "Unlimited"],
|
|
12
12
|
["Support", "Dedicated"],
|
|
13
13
|
["SLA", "Priority"]
|
|
14
|
-
] :
|
|
14
|
+
] : m.value === "growth" ? [
|
|
15
15
|
["Seats", "25"],
|
|
16
16
|
["Support", "Shared"],
|
|
17
17
|
["SLA", "Same day"]
|
|
@@ -52,7 +52,7 @@ function c({ state: c, setState: l }) {
|
|
|
52
52
|
children: "Choice"
|
|
53
53
|
}), /* @__PURE__ */ a("p", {
|
|
54
54
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
55
|
-
children:
|
|
55
|
+
children: m.label
|
|
56
56
|
})]
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ o("div", {
|
|
@@ -62,7 +62,7 @@ function c({ state: c, setState: l }) {
|
|
|
62
62
|
children: "Mode"
|
|
63
63
|
}), /* @__PURE__ */ a("p", {
|
|
64
64
|
className: "mt-2 text-lg font-semibold capitalize aui-text-strong",
|
|
65
|
-
children:
|
|
65
|
+
children: g
|
|
66
66
|
})]
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ o("div", {
|
|
@@ -72,7 +72,7 @@ function c({ state: c, setState: l }) {
|
|
|
72
72
|
children: "Options"
|
|
73
73
|
}), /* @__PURE__ */ a("p", {
|
|
74
74
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
75
|
-
children:
|
|
75
|
+
children: g === "plan" ? u.length : d.length
|
|
76
76
|
})]
|
|
77
77
|
})
|
|
78
78
|
]
|
|
@@ -81,13 +81,13 @@ function c({ state: c, setState: l }) {
|
|
|
81
81
|
className: "mt-6 flex flex-wrap gap-2",
|
|
82
82
|
children: [/* @__PURE__ */ a(e, {
|
|
83
83
|
size: "sm",
|
|
84
|
-
variant:
|
|
85
|
-
onClick: () =>
|
|
84
|
+
variant: g === "plan" ? "default" : "outline",
|
|
85
|
+
onClick: () => _("plan"),
|
|
86
86
|
children: "Default trigger"
|
|
87
87
|
}), /* @__PURE__ */ a(e, {
|
|
88
88
|
size: "sm",
|
|
89
|
-
variant:
|
|
90
|
-
onClick: () =>
|
|
89
|
+
variant: g === "density" ? "default" : "outline",
|
|
90
|
+
onClick: () => _("density"),
|
|
91
91
|
children: "Compact trigger"
|
|
92
92
|
})]
|
|
93
93
|
})]
|
|
@@ -103,17 +103,17 @@ function c({ state: c, setState: l }) {
|
|
|
103
103
|
children: "Primary select"
|
|
104
104
|
}), /* @__PURE__ */ a("h4", {
|
|
105
105
|
className: "mt-2 text-xl font-semibold tracking-tight aui-text-strong",
|
|
106
|
-
children:
|
|
106
|
+
children: g === "plan" ? "Standard choice trigger" : "Compact toolbar trigger"
|
|
107
107
|
})] }),
|
|
108
108
|
/* @__PURE__ */ o("div", {
|
|
109
109
|
className: "rounded-[20px] border border-[color:var(--aui-divider)] p-4",
|
|
110
110
|
children: [/* @__PURE__ */ a("p", {
|
|
111
111
|
className: "text-sm font-medium aui-text-muted",
|
|
112
|
-
children:
|
|
112
|
+
children: g === "plan" ? "Workspace plan" : "Toolbar density"
|
|
113
113
|
}), /* @__PURE__ */ a("div", {
|
|
114
114
|
className: "mt-3",
|
|
115
|
-
children:
|
|
116
|
-
value:
|
|
115
|
+
children: g === "plan" ? /* @__PURE__ */ a(n, {
|
|
116
|
+
value: p,
|
|
117
117
|
onValueChange: (e) => l({ selectValue: e ?? u[0].value }),
|
|
118
118
|
options: u,
|
|
119
119
|
triggerClassName: "w-full"
|
|
@@ -125,9 +125,34 @@ function c({ state: c, setState: l }) {
|
|
|
125
125
|
})
|
|
126
126
|
})]
|
|
127
127
|
}),
|
|
128
|
+
/* @__PURE__ */ o("div", {
|
|
129
|
+
className: "rounded-[20px] border border-[color:var(--aui-divider)] p-4",
|
|
130
|
+
children: [/* @__PURE__ */ a("p", {
|
|
131
|
+
className: "text-sm font-medium aui-text-muted",
|
|
132
|
+
children: "Grouped searchable select"
|
|
133
|
+
}), /* @__PURE__ */ a("div", {
|
|
134
|
+
className: "mt-3",
|
|
135
|
+
children: /* @__PURE__ */ a(n, {
|
|
136
|
+
value: v,
|
|
137
|
+
onValueChange: (e) => y(e ?? "north"),
|
|
138
|
+
searchable: !0,
|
|
139
|
+
clearable: !0,
|
|
140
|
+
placeholder: "Choose workspace",
|
|
141
|
+
emptyMessage: "No workspace matched",
|
|
142
|
+
groups: [{
|
|
143
|
+
label: "Regions",
|
|
144
|
+
options: f.slice(0, 2)
|
|
145
|
+
}, {
|
|
146
|
+
label: "Operations",
|
|
147
|
+
options: f.slice(2)
|
|
148
|
+
}],
|
|
149
|
+
triggerClassName: "w-full"
|
|
150
|
+
})
|
|
151
|
+
})]
|
|
152
|
+
}),
|
|
128
153
|
/* @__PURE__ */ a("div", {
|
|
129
154
|
className: "grid gap-3 sm:grid-cols-3",
|
|
130
|
-
children:
|
|
155
|
+
children: b.map(([e, t]) => /* @__PURE__ */ o("div", {
|
|
131
156
|
className: "rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3",
|
|
132
157
|
children: [/* @__PURE__ */ a("p", {
|
|
133
158
|
className: "text-xs aui-text-muted",
|
|
@@ -149,11 +174,11 @@ function c({ state: c, setState: l }) {
|
|
|
149
174
|
children: "Controlled result"
|
|
150
175
|
}), /* @__PURE__ */ a("h4", {
|
|
151
176
|
className: "mt-2 text-xl font-semibold tracking-tight aui-text-strong",
|
|
152
|
-
children:
|
|
177
|
+
children: m.label
|
|
153
178
|
})] }), /* @__PURE__ */ a(t, {
|
|
154
179
|
variant: "outline",
|
|
155
180
|
className: "rounded-full",
|
|
156
|
-
children:
|
|
181
|
+
children: m.value
|
|
157
182
|
})]
|
|
158
183
|
}),
|
|
159
184
|
/* @__PURE__ */ a("div", {
|
|
@@ -172,8 +197,8 @@ function c({ state: c, setState: l }) {
|
|
|
172
197
|
children: [/* @__PURE__ */ o(e, {
|
|
173
198
|
type: "button",
|
|
174
199
|
size: "sm",
|
|
175
|
-
onClick: () => l({ selectValue:
|
|
176
|
-
children: ["Choose ",
|
|
200
|
+
onClick: () => l({ selectValue: h.value }),
|
|
201
|
+
children: ["Choose ", h.label]
|
|
177
202
|
}), /* @__PURE__ */ a(e, {
|
|
178
203
|
type: "button",
|
|
179
204
|
size: "sm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/badge/index.cjs"),t=require("../../../components/display/statistic.cjs");let
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/badge/index.cjs"),t=require("../../../components/display/statistic.cjs"),n=require("../../../components/display/trend-card.cjs"),r=require("../../../components/charts/progress-ring.cjs");let i=require("react/jsx-runtime");var a=`border-t border-[color:var(--aui-divider)] py-6`;function o(){return(0,i.jsxs)(`div`,{className:`space-y-0`,children:[(0,i.jsxs)(`section`,{className:`pb-6`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Installed display primitive`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Statistic is the KPI surface, not a generic card clone`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-2xl text-sm leading-6 aui-text-muted`,children:`Use the base statistic when the number matters most. Promote to StatisticCard or StatisticGrid when several metrics need shared structure.`})]}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(t.StatisticGrid,{columns:3,children:[(0,i.jsx)(t.StatisticCard,{label:`Revenue`,value:`$24.8k`,change:`+12.4%`,trend:`up`,description:`vs last 30 days`}),(0,i.jsx)(t.StatisticCard,{label:`Errors`,value:`14`,change:`-3.1%`,trend:`down`,description:`production incidents`}),(0,i.jsx)(t.StatisticCard,{label:`Adoption`,value:`86%`,description:`workspace activation rate`,action:(0,i.jsx)(e.Badge,{variant:`secondary`,children:`Live`})})]})}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_360px]`,children:[(0,i.jsx)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4`,children:(0,i.jsx)(t.Statistic,{label:`Publish latency`,value:`1.8s`,suffix:`avg`,change:`-0.4s`,trend:`down`,description:`from the previous release window`})}),(0,i.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] p-4`,children:[(0,i.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:`Guidance`}),(0,i.jsxs)(`div`,{className:`mt-3 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,i.jsx)(`p`,{children:`Keep labels short and units clear. Users should understand the value before reading the description.`}),(0,i.jsx)(`p`,{children:`Trend color should reinforce meaning, not carry the whole message alone.`})]})]})]})}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_240px]`,children:[(0,i.jsx)(n.TrendCard,{title:`Release velocity`,value:`24`,change:`+3`,trend:`up`,description:`completed this sprint`,sparkline:[8,10,9,14,18,19,24]}),(0,i.jsx)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] p-4`,children:(0,i.jsx)(r.ProgressRing,{value:76,label:`76%`,description:`coverage`,tone:`success`})})]})})]})}exports.StatisticShowcase=o;
|