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/feedback/alert.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=[`info`,`success`,`warning`,`destructive`];function c({mode:e}){let[c,l]=i.useState(2),[u,d]=i.useState(0),[f,p]=i.useState(!0),m=s[c]??`warning`;return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Inline feedback`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Alert should guide the next user decision`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use alert when the page needs a visible, contextual message with a clear action. It should feel operational, not decorative.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Context aware`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Action ready`})]})]})}),f?(0,a.jsx)(r.Alert,{tone:m,dismissible:!0,onDismiss:()=>p(!1),title:m===`success`?`Workspace synced`:m===`destructive`?`Action blocked`:m===`info`?`Heads up`:`Review needed`,description:m===`success`?`Changes were saved and the team can continue safely.`:m===`destructive`?`The release cannot continue until billing permissions are restored.`:m===`info`?`Usage data refreshed and one metric changed since your last visit.`:`Billing rules changed and one approval is pending before publish.`,action:(0,a.jsx)(t.Button,{size:`sm`,variant:m===`destructive`?`destructive`:`default`,onClick:()=>d(e=>e+1),children:m===`success`?`Continue`:m===`destructive`?`Fix access`:m===`info`?`Open details`:`Open review`})}):(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Alert dismissed`}),(0,a.jsx)(t.Button,{className:`mt-4`,size:`sm`,variant:`outline`,onClick:()=>p(!0),children:`Restore alert`})]}),(0,a.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Action count`}),(0,a.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:u}),(0,a.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Alert CTA should resolve a real decision, not just dismiss a message.`})]}),(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Recommended usage`}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Put alert above the affected surface, form, or result area.`}),(0,a.jsx)(`p`,{children:`Prefer one primary action. If the user only needs acknowledgment, use toast instead.`})]})]})]}),e===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[s.map((e,n)=>(0,a.jsx)(t.Button,{size:`sm`,variant:c===n?`default`:`outline`,onClick:()=>l(n),children:e},e)),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>d(0),children:`Reset counter`}),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>p(!0),children:`Show alert`})]})}):null]})}exports.AlertShowcase=c;
|
|
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/feedback/alert.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=[`info`,`success`,`warning`,`destructive`];function c({mode:e}){let[c,l]=i.useState(2),[u,d]=i.useState(0),[f,p]=i.useState(!0),m=s[c]??`warning`;return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Inline feedback`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Alert should guide the next user decision`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use alert when the page needs a visible, contextual message with a clear action. It should feel operational, not decorative.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Context aware`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Action ready`})]})]})}),f?(0,a.jsx)(r.Alert,{tone:m,dismissible:!0,onDismiss:()=>p(!1),actionsAlign:m===`destructive`?`start`:`end`,title:m===`success`?`Workspace synced`:m===`destructive`?`Action blocked`:m===`info`?`Heads up`:`Review needed`,description:m===`success`?`Changes were saved and the team can continue safely.`:m===`destructive`?`The release cannot continue until billing permissions are restored.`:m===`info`?`Usage data refreshed and one metric changed since your last visit.`:`Billing rules changed and one approval is pending before publish.`,action:(0,a.jsx)(t.Button,{size:`sm`,variant:m===`destructive`?`destructive`:`default`,onClick:()=>d(e=>e+1),children:m===`success`?`Continue`:m===`destructive`?`Fix access`:m===`info`?`Open details`:`Open review`})}):(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Alert dismissed`}),(0,a.jsx)(t.Button,{className:`mt-4`,size:`sm`,variant:`outline`,onClick:()=>p(!0),children:`Restore alert`})]}),(0,a.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Action count`}),(0,a.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:u}),(0,a.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Alert CTA should resolve a real decision, not just dismiss a message.`})]}),(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Recommended usage`}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsx)(`p`,{children:`Put alert above the affected surface, form, or result area.`}),(0,a.jsx)(`p`,{children:`Prefer one primary action. If the user only needs acknowledgment, use toast instead.`})]})]})]}),e===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[s.map((e,n)=>(0,a.jsx)(t.Button,{size:`sm`,variant:c===n?`default`:`outline`,onClick:()=>l(n),children:e},e)),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>d(0),children:`Reset counter`}),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>p(!0),children:`Show alert`})]})}):null]})}exports.AlertShowcase=c;
|
|
@@ -53,6 +53,7 @@ function c({ mode: c }) {
|
|
|
53
53
|
tone: h,
|
|
54
54
|
dismissible: !0,
|
|
55
55
|
onDismiss: () => m(!1),
|
|
56
|
+
actionsAlign: h === "destructive" ? "start" : "end",
|
|
56
57
|
title: h === "success" ? "Workspace synced" : h === "destructive" ? "Action blocked" : h === "info" ? "Heads up" : "Review needed",
|
|
57
58
|
description: h === "success" ? "Changes were saved and the team can continue safely." : h === "destructive" ? "The release cannot continue until billing permissions are restored." : h === "info" ? "Usage data refreshed and one metric changed since your last visit." : "Billing rules changed and one approval is pending before publish.",
|
|
58
59
|
action: /* @__PURE__ */ i(e, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("../../../components/ui/button/index.cjs"),r=require("../../../components/ui/badge/index.cjs"),i=require("../../../components/layout/app-sidebar.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");var c=[{key:`overview`,label:`Overview`,href:`/overview`,icon:(0,s.jsx)(o.HomeIcon,{className:`size-4`})},{key:`projects`,label:`Projects`,href:`/projects`,icon:(0,s.jsx)(o.FolderIcon,{className:`size-4`}),badge:`8`},{key:`reports`,label:`Reports`,href:`/reports`,icon:(0,s.jsx)(o.BarChart3Icon,{className:`size-4`})},{key:`billing`,label:`Billing`,href:`/billing`,icon:(0,s.jsx)(o.CreditCardIcon,{className:`size-4`}),badge:`2`},{key:`settings`,label:`Settings`,href:`/settings`,icon:(0,s.jsx)(o.SettingsIcon,{className:`size-4`}),disabled:!0}],l=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function u({mode:e}){let[o,u]=a.useState(`overview`),[d,f]=a.useState(e===`playground`),[p,m]=a.useState(`desktop`),h=a.useMemo(()=>c.map(e=>({...e,active:e.key===o,onSelect:()=>u(e.key)})),[o]),g=c.find(e=>e.key===o),_=p===`mobile`;return(0,s.jsxs)(`div`,{className:`space-y-5`,children:[(0,s.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,s.jsxs)(`div`,{className:`max-w-xl`,children:[(0,s.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Navigation shell`}),(0,s.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Sidebar should feel install-ready on its own`}),(0,s.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`This preview keeps the focus on one reusable sidebar surface: identity, route items, badges, disabled states and collapsed behavior.`})]}),(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Header slot`}),(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Badges`}),(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Mobile drawer`})]})]})}),e===`playground`?(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,s.jsx)(n.Button,{size:`sm`,variant:d?`outline`:`default`,onClick:()=>f(e=>!e),children:d?`Expand sidebar`:`Collapse sidebar`}),(0,s.jsx)(n.Button,{size:`sm`,variant:`outline`,onClick:()=>u(`reports`),children:`Jump to reports`}),(0,s.jsx)(n.Button,{size:`sm`,variant:_?`default`:`outline`,onClick:()=>m(`mobile`),children:`Mobile drawer`}),(0,s.jsx)(n.Button,{size:`sm`,variant:_?`outline`:`default`,onClick:()=>m(`desktop`),children:`Desktop rail`})]}):null,(0,s.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]`,children:[(0,s.jsx)(`section`,{className:t.cn(l,_&&`mx-auto w-full max-w-[420px]`),children:(0,s.jsx)(i.AppSidebar,{collapsed:d,items:h,responsive:!0,mobileBreakpoint:_?1e4:0,mobileTitle:`Workspace navigation`,mobileDescription:`Open routes, check badges, and move between sections from one compact drawer.`,mobileToggleLabel:`Open workspace menu`,header:(0,s.jsx)(`div`,{className:`px-3 py-2 text-sm font-semibold`,children:`Azamat Workspace`}),footer:(0,s.jsx)(`div`,{className:`aui-text-muted px-3 py-2 text-xs`,children:`Starter plan • 3 editors`}),className:`min-h-[440px] rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface)]`})}),(0,s.jsxs)(`section`,{className:l,children:[(0,s.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Current route`}),(0,s.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:g?.label??`Overview`}),(0,s.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`Start with the sidebar itself as a stable navigation contract. Only after this feels right should the app introduce a bigger shell, page header, or route-level statistics around it.`}),(0,s.jsxs)(`div`,{className:`mt-6 grid gap-3 sm:grid-cols-3`,children:[(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Shell`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:_?`Mobile drawer`:d?`Collapsed`:`Expanded`})]}),(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Visible items`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:h.length})]}),(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Disabled`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:`1 route`})]})]})]})]})]})}exports.AppSidebarShowcase=u;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("../../../components/ui/button/index.cjs"),r=require("../../../components/ui/badge/index.cjs"),i=require("../../../components/layout/app-sidebar.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");var c=[{key:`overview`,label:`Overview`,href:`/overview`,icon:(0,s.jsx)(o.HomeIcon,{className:`size-4`})},{key:`projects`,label:`Projects`,href:`/projects`,icon:(0,s.jsx)(o.FolderIcon,{className:`size-4`}),badge:`8`},{key:`reports`,label:`Reports`,href:`/reports`,icon:(0,s.jsx)(o.BarChart3Icon,{className:`size-4`})},{key:`billing`,label:`Billing`,href:`/billing`,icon:(0,s.jsx)(o.CreditCardIcon,{className:`size-4`}),badge:`2`},{key:`settings`,label:`Settings`,href:`/settings`,icon:(0,s.jsx)(o.SettingsIcon,{className:`size-4`}),disabled:!0}],l=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function u({mode:e}){let[o,u]=a.useState(`overview`),[d,f]=a.useState(e===`playground`),[p,m]=a.useState(`desktop`),h=a.useMemo(()=>c.map(e=>({...e,active:e.key===o,onSelect:()=>u(e.key)})),[o]),g=c.find(e=>e.key===o),_=p===`mobile`;return(0,s.jsxs)(`div`,{className:`space-y-5`,children:[(0,s.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,s.jsxs)(`div`,{className:`max-w-xl`,children:[(0,s.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Navigation shell`}),(0,s.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Sidebar should feel install-ready on its own`}),(0,s.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`This preview keeps the focus on one reusable sidebar surface: identity, route items, badges, disabled states and collapsed behavior.`})]}),(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Header slot`}),(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Badges`}),(0,s.jsx)(r.Badge,{variant:`outline`,className:`rounded-full`,children:`Mobile drawer`})]})]})}),e===`playground`?(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,s.jsx)(n.Button,{size:`sm`,variant:d?`outline`:`default`,onClick:()=>f(e=>!e),children:d?`Expand sidebar`:`Collapse sidebar`}),(0,s.jsx)(n.Button,{size:`sm`,variant:`outline`,onClick:()=>u(`reports`),children:`Jump to reports`}),(0,s.jsx)(n.Button,{size:`sm`,variant:_?`default`:`outline`,onClick:()=>m(`mobile`),children:`Mobile drawer`}),(0,s.jsx)(n.Button,{size:`sm`,variant:_?`outline`:`default`,onClick:()=>m(`desktop`),children:`Desktop rail`})]}):null,(0,s.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]`,children:[(0,s.jsx)(`section`,{className:t.cn(l,_&&`mx-auto w-full max-w-[420px]`),children:(0,s.jsx)(i.AppSidebar,{collapsed:d,items:h,responsive:!0,mobileBreakpoint:_?1e4:0,mobileTitle:`Workspace navigation`,mobileDescription:`Open routes, check badges, and move between sections from one compact drawer.`,mobileToggleLabel:`Open workspace menu`,header:(0,s.jsx)(`div`,{className:`px-3 py-2 text-sm font-semibold`,children:`Azamat Workspace`}),footer:(0,s.jsx)(`div`,{className:`aui-text-muted px-3 py-2 text-xs`,children:`Starter plan • 3 editors`}),footerClassName:`bg-[color:var(--aui-page-bg-alt)]/55`,className:`min-h-[440px] rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface)]`})}),(0,s.jsxs)(`section`,{className:l,children:[(0,s.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Current route`}),(0,s.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:g?.label??`Overview`}),(0,s.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`Start with the sidebar itself as a stable navigation contract. Only after this feels right should the app introduce a bigger shell, page header, or route-level statistics around it.`}),(0,s.jsxs)(`div`,{className:`mt-6 grid gap-3 sm:grid-cols-3`,children:[(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Shell`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:_?`Mobile drawer`:d?`Collapsed`:`Expanded`})]}),(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Visible items`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:h.length})]}),(0,s.jsxs)(`div`,{className:`rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,s.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Disabled`}),(0,s.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:`1 route`})]})]})]})]})]})}exports.AppSidebarShowcase=u;
|
|
@@ -141,6 +141,7 @@ function m({ mode: a }) {
|
|
|
141
141
|
className: "aui-text-muted px-3 py-2 text-xs",
|
|
142
142
|
children: "Starter plan • 3 editors"
|
|
143
143
|
}),
|
|
144
|
+
footerClassName: "bg-[color:var(--aui-page-bg-alt)]/55",
|
|
144
145
|
className: "min-h-[440px] rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface)]"
|
|
145
146
|
})
|
|
146
147
|
}), /* @__PURE__ */ d("section", {
|
|
@@ -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("./data.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`border-t border-[color:var(--aui-divider)] py-6`;function s({state:e,setState:s,mode:c}){let l=[`default`,`secondary`,`destructive`,`outline`,`ghost`,`link`],u=r.badgeDemoItems.find(t=>t.variant===e.badgeVariant)??r.badgeDemoItems[0],[d,f]=i.useState(!0);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsx)(`section`,{className:`pb-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-end xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Status`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Badges should stay secondary`}),(0,a.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:`Use them for metadata and state, not as the main content block.`})]}),(0,a.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 xl:min-w-[360px] xl:max-w-[420px]`,children:[(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Variant`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:e.badgeVariant})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Current`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:u.label})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Samples`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:r.badgeDemoItems.length})]})]})]})}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.map(n=>(0,a.jsx)(t.Button,{type:`button`,size:`sm`,variant:e.badgeVariant===n?`default`:`secondary`,onClick:()=>s({badgeVariant:n}),children:n},n))}),(0,a.jsx)(`div`,{className:`flex flex-wrap items-center gap-3`,children:r.badgeDemoItems.map((t,r)=>(0,a.jsx)(n.Badge,{variant:r===0?e.badgeVariant:t.variant,status:r===0?`success`:void 0,count:r===1?12:void 0,children:t.label},t.label))}),(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(0,1.02fr)_minmax(0,0.98fr)]`,children:[(0,a.jsxs)(`div`,{className:`space-y-4`,children:[(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-[color:var(--aui-divider)] pb-4`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Live example`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:`Customer workspace`})]}),(0,a.jsx)(n.Badge,{variant:e.badgeVariant,status:`success`,label:u.label})]}),(0,a.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[[`Plan`,`Growth`],[`Owner`,`Azamat`],[`Last sync`,`2 min ago`]].map(([e,t])=>(0,a.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-[color:var(--aui-divider)] px-3 py-2`,children:[(0,a.jsx)(`span`,{className:`text-xs aui-text-muted`,children:e}),(0,a.jsx)(`span`,{className:`text-sm font-medium aui-text-strong`,children:t})]},e))}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-t border-[color:var(--aui-divider)] pt-4`,children:[(0,a.jsx)(n.Badge,{variant:`secondary`,label:`Customers`,count:18}),(0,a.jsx)(n.Badge,{status:`warning`,label:`Pending approval`}),d?(0,a.jsx)(n.Badge,{variant:`outline`,label:`Design owner`,removable:!0,onRemove:()=>f(!1)}):(0,a.jsx)(t.Button,{size:`sm`,variant:`secondary`,onClick:()=>f(!0),children:`Restore chip`})]})]}),(0,a.jsx)(`div`,{className:`border-y border-[color:var(--aui-divider)]`,children:r.badgeDemoItems.map(e=>(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-b border-[color:var(--aui-divider)] py-3 last:border-b-0`,children:[(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:e.label}),(0,a.jsx)(`p`,{className:`mt-1 text-sm leading-6 aui-text-muted`,children:e.note})]}),(0,a.jsx)(n.Badge,{variant:e.variant,status:e.label===`Live`?`success`:e.label===`Review`?`warning`:void 0,label:e.label})]},e.label))})]})]})}),c===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:r.badgeDemoItems.map(e=>(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,a.jsx)(n.Badge,{variant:e.variant,label:e.label,count:e.label===`Queued`?4:void 0}),(0,a.jsx)(`span`,{className:`text-[11px] uppercase tracking-[0.2em] aui-text-muted`,children:`sample`})]}),(0,a.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:e.note})]},e.label))})}):null]})}exports.BadgeShowcase=s;
|
|
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("./data.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`border-t border-[color:var(--aui-divider)] py-6`;function s({state:e,setState:s,mode:c}){let l=[`default`,`secondary`,`soft`,`destructive`,`outline`,`ghost`,`link`],u=r.badgeDemoItems.find(t=>t.variant===e.badgeVariant)??r.badgeDemoItems[0],[d,f]=i.useState(!0);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsx)(`section`,{className:`pb-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-end xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Status`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Badges should stay secondary`}),(0,a.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:`Use them for metadata and state, not as the main content block.`})]}),(0,a.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 xl:min-w-[360px] xl:max-w-[420px]`,children:[(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Variant`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:e.badgeVariant})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Current`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:u.label})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Samples`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:r.badgeDemoItems.length})]})]})]})}),(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.map(n=>(0,a.jsx)(t.Button,{type:`button`,size:`sm`,variant:e.badgeVariant===n?`default`:`secondary`,onClick:()=>s({badgeVariant:n}),children:n},n))}),(0,a.jsx)(`div`,{className:`flex flex-wrap items-center gap-3`,children:r.badgeDemoItems.map((t,r)=>(0,a.jsx)(n.Badge,{variant:r===0?e.badgeVariant:t.variant,status:r===0?`success`:void 0,count:r===1?12:void 0,children:t.label},t.label))}),(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[minmax(0,1.02fr)_minmax(0,0.98fr)]`,children:[(0,a.jsxs)(`div`,{className:`space-y-4`,children:[(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-[color:var(--aui-divider)] pb-4`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Live example`}),(0,a.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:`Customer workspace`})]}),(0,a.jsx)(n.Badge,{variant:e.badgeVariant,status:`success`,label:u.label})]}),(0,a.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[[`Plan`,`Growth`],[`Owner`,`Azamat`],[`Last sync`,`2 min ago`]].map(([e,t])=>(0,a.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-[color:var(--aui-divider)] px-3 py-2`,children:[(0,a.jsx)(`span`,{className:`text-xs aui-text-muted`,children:e}),(0,a.jsx)(`span`,{className:`text-sm font-medium aui-text-strong`,children:t})]},e))}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-t border-[color:var(--aui-divider)] pt-4`,children:[(0,a.jsx)(n.Badge,{variant:`secondary`,label:`Customers`,count:18}),(0,a.jsx)(n.Badge,{variant:`soft`,tone:`info`,label:`Synced`,dot:!0}),(0,a.jsx)(n.Badge,{status:`warning`,label:`Pending approval`}),d?(0,a.jsx)(n.Badge,{variant:`outline`,label:`Design owner`,removable:!0,onRemove:()=>f(!1)}):(0,a.jsx)(t.Button,{size:`sm`,variant:`secondary`,onClick:()=>f(!0),children:`Restore chip`})]})]}),(0,a.jsx)(`div`,{className:`border-y border-[color:var(--aui-divider)]`,children:r.badgeDemoItems.map(e=>(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-b border-[color:var(--aui-divider)] py-3 last:border-b-0`,children:[(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold aui-text-strong`,children:e.label}),(0,a.jsx)(`p`,{className:`mt-1 text-sm leading-6 aui-text-muted`,children:e.note})]}),(0,a.jsx)(n.Badge,{variant:e.variant,status:e.label===`Live`?`success`:e.label===`Review`?`warning`:void 0,label:e.label})]},e.label))})]})]})}),c===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:r.badgeDemoItems.map(e=>(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,a.jsx)(n.Badge,{variant:e.variant,label:e.label,count:e.label===`Queued`?4:void 0}),(0,a.jsx)(`span`,{className:`text-[11px] uppercase tracking-[0.2em] aui-text-muted`,children:`sample`})]}),(0,a.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:e.note})]},e.label))})}):null]})}exports.BadgeShowcase=s;
|
|
@@ -9,6 +9,7 @@ function s({ state: s, setState: c, mode: l }) {
|
|
|
9
9
|
let u = [
|
|
10
10
|
"default",
|
|
11
11
|
"secondary",
|
|
12
|
+
"soft",
|
|
12
13
|
"destructive",
|
|
13
14
|
"outline",
|
|
14
15
|
"ghost",
|
|
@@ -142,6 +143,12 @@ function s({ state: s, setState: c, mode: l }) {
|
|
|
142
143
|
label: "Customers",
|
|
143
144
|
count: 18
|
|
144
145
|
}),
|
|
146
|
+
/* @__PURE__ */ i(t, {
|
|
147
|
+
variant: "soft",
|
|
148
|
+
tone: "info",
|
|
149
|
+
label: "Synced",
|
|
150
|
+
dot: !0
|
|
151
|
+
}),
|
|
145
152
|
/* @__PURE__ */ i(t, {
|
|
146
153
|
status: "warning",
|
|
147
154
|
label: "Pending approval"
|
|
@@ -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/layout/breadcrumbs.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=[{key:`home`,label:`Home`,href:`/`},{key:`apps`,label:`Apps`,href:`/apps`},{key:`workspace`,label:`Workspace`,href:`/apps/workspace`},{key:`overview`,label:`Overview`,current:!0}],s=[{key:`home`,label:`Home`,href:`/`},{key:`dashboard`,label:`Dashboard`,current:!0}];function c({mode:e}){let[c,l]=i.useState(`full`),u=i.useMemo(()=>c===`full`?o:s,[c]);return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Path context`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Breadcrumbs should answer where the user is`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Keep them short, directional, and useful. The preview should show both a fuller application path and a compact route path.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Full path`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Compact path`})]})]})}),e===`playground`?(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,a.jsx)(t.Button,{size:`sm`,variant:c===`full`?`default`:`outline`,onClick:()=>l(`full`),children:`Full path`}),(0,a.jsx)(t.Button,{size:`sm`,variant:c===`compact`?`default`:`outline`,onClick:()=>l(`compact`),children:`Compact path`})]}):null,(0,a.jsx)(`div`,{className:`rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3`,children:(0,a.jsx)(r.Breadcrumbs,{items:u,separator:c===`full`?`/`:(0,a.jsx)(`span`,{className:`px-1 aui-text-muted`,children:`→`})})})]})}exports.BreadcrumbsShowcase=c;
|
|
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/layout/breadcrumbs.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=[{key:`home`,label:`Home`,href:`/`},{key:`apps`,label:`Apps`,href:`/apps`},{key:`workspace`,label:`Workspace`,href:`/apps/workspace`},{key:`team`,label:`Team settings`,href:`/apps/workspace/team`},{key:`security`,label:`Security`,href:`/apps/workspace/team/security`},{key:`overview`,label:`Overview`,current:!0}],s=[{key:`home`,label:`Home`,href:`/`},{key:`dashboard`,label:`Dashboard`,current:!0}];function c({mode:e}){let[c,l]=i.useState(`full`),u=i.useMemo(()=>c===`full`?o:s,[c]);return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Path context`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Breadcrumbs should answer where the user is`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Keep them short, directional, and useful. The preview should show both a fuller application path and a compact route path.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Full path`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Compact path`})]})]})}),e===`playground`?(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,a.jsx)(t.Button,{size:`sm`,variant:c===`full`?`default`:`outline`,onClick:()=>l(`full`),children:`Full path`}),(0,a.jsx)(t.Button,{size:`sm`,variant:c===`compact`?`default`:`outline`,onClick:()=>l(`compact`),children:`Compact path`})]}):null,(0,a.jsx)(`div`,{className:`rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3`,children:(0,a.jsx)(r.Breadcrumbs,{items:u,separator:c===`full`?`/`:(0,a.jsx)(`span`,{className:`px-1 aui-text-muted`,children:`→`}),maxItems:c===`full`?4:void 0})})]})}exports.BreadcrumbsShowcase=c;
|
|
@@ -20,6 +20,16 @@ var o = [
|
|
|
20
20
|
label: "Workspace",
|
|
21
21
|
href: "/apps/workspace"
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
key: "team",
|
|
25
|
+
label: "Team settings",
|
|
26
|
+
href: "/apps/workspace/team"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "security",
|
|
30
|
+
label: "Security",
|
|
31
|
+
href: "/apps/workspace/team/security"
|
|
32
|
+
},
|
|
23
33
|
{
|
|
24
34
|
key: "overview",
|
|
25
35
|
label: "Overview",
|
|
@@ -94,7 +104,8 @@ function c({ mode: c }) {
|
|
|
94
104
|
separator: l === "full" ? "/" : /* @__PURE__ */ i("span", {
|
|
95
105
|
className: "px-1 aui-text-muted",
|
|
96
106
|
children: "→"
|
|
97
|
-
})
|
|
107
|
+
}),
|
|
108
|
+
maxItems: l === "full" ? 4 : void 0
|
|
98
109
|
})
|
|
99
110
|
})
|
|
100
111
|
]
|
|
@@ -14,7 +14,7 @@ export function BasicExamples() {
|
|
|
14
14
|
|
|
15
15
|
<div className="flex flex-wrap gap-3">
|
|
16
16
|
<Button size="sm">Small</Button>
|
|
17
|
-
<Button
|
|
17
|
+
<Button iconOnly aria-label="Download">
|
|
18
18
|
<DownloadIcon className="size-4" />
|
|
19
19
|
</Button>
|
|
20
20
|
<Button>
|
|
@@ -33,9 +33,6 @@ export function BasicExamples() {
|
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
<div className="flex flex-wrap gap-3">
|
|
36
|
-
<Button asChild>
|
|
37
|
-
<a href="/docs">Open docs</a>
|
|
38
|
-
</Button>
|
|
39
36
|
<a className={buttonVariants({ variant: "outline", size: "sm" })} href="/components">
|
|
40
37
|
Link styled as button
|
|
41
38
|
</a>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/showcase/premium/button/mock.ts
|
|
2
2
|
var e = {
|
|
3
|
-
code: "import * as React from \"react\"\nimport { ArrowRightIcon, DownloadIcon } from \"lucide-react\"\nimport { Button, buttonVariants } from \"@/index\"\n\nexport function BasicExamples() {\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap gap-3\">\n <Button variant=\"default\">Primary</Button>\n <Button variant=\"secondary\">Secondary</Button>\n <Button variant=\"outline\">Outline</Button>\n <Button variant=\"destructive\">Destructive</Button>\n </div>\n\n <div className=\"flex flex-wrap gap-3\">\n <Button size=\"sm\">Small</Button>\n <Button
|
|
3
|
+
code: "import * as React from \"react\"\nimport { ArrowRightIcon, DownloadIcon } from \"lucide-react\"\nimport { Button, buttonVariants } from \"@/index\"\n\nexport function BasicExamples() {\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap gap-3\">\n <Button variant=\"default\">Primary</Button>\n <Button variant=\"secondary\">Secondary</Button>\n <Button variant=\"outline\">Outline</Button>\n <Button variant=\"destructive\">Destructive</Button>\n </div>\n\n <div className=\"flex flex-wrap gap-3\">\n <Button size=\"sm\">Small</Button>\n <Button iconOnly aria-label=\"Download\">\n <DownloadIcon className=\"size-4\" />\n </Button>\n <Button>\n Continue\n <ArrowRightIcon className=\"ml-2 size-4\" />\n </Button>\n </div>\n\n <div className=\"flex flex-wrap gap-3\">\n <Button variant=\"outline\" size=\"sm\" disabled>\n Disabled\n </Button>\n <Button variant=\"default\" loading>\n Loading\n </Button>\n </div>\n\n <div className=\"flex flex-wrap gap-3\">\n <a className={buttonVariants({ variant: \"outline\", size: \"sm\" })} href=\"/components\">\n Link styled as button\n </a>\n </div>\n </div>\n )\n}\n\nexport function ControlledButton() {\n const [loading, setLoading] = React.useState(false)\n\n return (\n <Button\n variant=\"default\"\n onClick={() => {\n setLoading(true)\n window.setTimeout(() => setLoading(false), 1800)\n }}\n loading={loading}\n >\n Submit\n </Button>\n )\n}\n\n// Don't overuse buttonVariants for every button instance.\n// Use Button's own variant/size props by default, and keep buttonVariants\n// only for styling non-button elements (a, Link) with shared look.",
|
|
4
4
|
htmlCode: "<button data-slot=\"button\" data-variant=\"primary\">\n Continue\n</button>",
|
|
5
5
|
cliCommand: "npx tembro add button",
|
|
6
6
|
highlights: [
|
|
@@ -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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=[[`Default`,`default`],[`Secondary`,`secondary`],[`Outline`,`outline`],[`Ghost`,`ghost`],[`Destructive`,`destructive`]],s=[`Ready`,`Focus`,`Loading`,`Disabled`],c=`border-t border-[color:var(--aui-divider)] py-6`;function l({label:e,variant:n}){return(0,a.jsxs)(`div`,{className:`grid gap-3 border-b border-[color:var(--aui-divider)] py-4 last:border-b-0 md:grid-cols-[160px_1fr] md:items-center`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-sm font-semibold`,children:e}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`npm package variant`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:n,children:e}),(0,a.jsx)(t.Button,{variant:n,size:`sm`,children:`Small`}),(0,a.jsx)(t.Button,{variant:n,
|
|
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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=[[`Default`,`default`],[`Secondary`,`secondary`],[`Outline`,`outline`],[`Ghost`,`ghost`],[`Destructive`,`destructive`]],s=[`Ready`,`Focus`,`Loading`,`Disabled`],c=`border-t border-[color:var(--aui-divider)] py-6`;function l({label:e,variant:n}){return(0,a.jsxs)(`div`,{className:`grid gap-3 border-b border-[color:var(--aui-divider)] py-4 last:border-b-0 md:grid-cols-[160px_1fr] md:items-center`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-sm font-semibold`,children:e}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`npm package variant`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:n,children:e}),(0,a.jsx)(t.Button,{variant:n,size:`sm`,children:`Small`}),(0,a.jsx)(t.Button,{variant:n,iconOnly:!0,"aria-label":`${e} icon button`,children:(0,a.jsx)(i.ArrowRightIcon,{className:`size-4`})})]})]})}function u({state:e,variant:n}){return e===`Loading`?(0,a.jsx)(t.Button,{variant:n,loading:!0,loadingLabel:`Saving`,children:`Save`}):(0,a.jsx)(t.Button,{variant:n,pressed:e===`Focus`,disabled:e===`Disabled`,className:e===`Focus`?`ring-2 ring-[color:var(--aui-ring)] ring-offset-2 ring-offset-[color:var(--aui-page-bg)]`:void 0,children:e})}function d(){let[e,d]=r.useState(`default`),[f,p]=r.useState(`idle`),[m,h]=r.useState(0);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 from npm`}),(0,a.jsx)(`h3`,{className:`aui-text-strong mt-3 text-2xl font-semibold tracking-tight`,children:`Real tembro buttons`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-3 max-w-2xl text-sm leading-6`,children:`This preview uses the exported Button component directly from the installed package. The docs page only provides spacing around it.`})]}),(0,a.jsxs)(`section`,{className:c,children:[(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_360px] xl:items-start`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Approval action row`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Primary, secondary and outline actions should read clearly without custom wrapper styles.`}),(0,a.jsx)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:o.map(([n,r])=>(0,a.jsx)(t.Button,{type:`button`,size:`sm`,variant:e===r?`default`:`outline`,onClick:()=>d(r),children:n},r))})]}),(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:`aui-text-strong text-sm font-semibold`,children:`Invoice #4821`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`Requires finance approval`})]}),(0,a.jsx)(n.Badge,{variant:f===`done`?`secondary`:`outline`,children:f===`idle`?`Pending`:f===`saving`?`Saving`:`Approved`})]}),(0,a.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:`secondary`,onClick:()=>h(e=>e+1),children:`Save draft`}),(0,a.jsx)(t.Button,{variant:`outline`,children:`Preview`}),(0,a.jsx)(t.Button,{variant:e,fullWidth:!0,loading:f===`saving`,loadingLabel:`Approving`,onClick:()=>{h(e=>e+1),p(`saving`),window.setTimeout(()=>p(`done`),850)},children:f===`done`?`Approved`:`Approve invoice`})]})]})]}),(0,a.jsxs)(`div`,{className:`mt-6 grid gap-3 md:grid-cols-4`,children:[(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Primary`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Main action with filled emphasis.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Secondary`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Alternative action without stealing focus.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Outline`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Low-emphasis action for previews and neutral workflows.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Destructive`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Reserved for archive, delete, or dangerous transitions.`})]})]})]}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Interaction states`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Keep the important states visible without a heavy table or nested card matrix.`}),(0,a.jsx)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:s.map(t=>(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-b border-[color:var(--aui-divider)] py-3`,children:[(0,a.jsx)(`span`,{className:`aui-text-muted text-xs font-semibold uppercase tracking-[0.2em]`,children:t}),(0,a.jsx)(u,{state:t,variant:e})]},t))})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Variant rail`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`All variants use the same exported Button API.`}),(0,a.jsx)(`div`,{className:`mt-2`,children:o.map(([e,t])=>(0,a.jsx)(l,{label:e,variant:t},t))})]})]})}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[1fr_1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Production footer`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`A compact footer pattern for forms, settings pages and dashboard actions.`}),(0,a.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:`secondary`,children:`Save draft`}),(0,a.jsx)(t.Button,{variant:`outline`,children:`Preview`}),(0,a.jsxs)(t.Button,{children:[`Continue`,(0,a.jsx)(i.ArrowRightIcon,{className:`ml-2 size-4`})]})]})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Icon, async and danger`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Loading and disabled states stay readable; destructive actions remain visually distinct.`}),(0,a.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[(0,a.jsxs)(t.Button,{variant:`destructive`,children:[(0,a.jsx)(i.Trash2Icon,{className:`mr-2 size-4`}),`Delete`]}),(0,a.jsx)(t.Button,{loading:!0,loadingLabel:`Publishing`,children:`Publish`}),(0,a.jsx)(t.Button,{variant:`outline`,iconOnly:!0,"aria-label":`Download`,children:(0,a.jsx)(i.DownloadIcon,{className:`size-4`})}),(0,a.jsx)(`a`,{href:`#`,className:t.buttonVariants({variant:`link`}),children:`Text link`})]})]})]})}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-sm`,children:[(0,a.jsx)(`span`,{className:`aui-text-muted`,children:`Interaction count:`}),(0,a.jsx)(n.Badge,{variant:`secondary`,children:m}),(0,a.jsx)(`span`,{className:`aui-text-muted`,children:`Selected variant:`}),(0,a.jsx)(n.Badge,{variant:`outline`,children:e})]})})]})}exports.ButtonShowcase=d;
|
|
@@ -39,7 +39,7 @@ function f({ label: t, variant: n }) {
|
|
|
39
39
|
}),
|
|
40
40
|
/* @__PURE__ */ s(e, {
|
|
41
41
|
variant: n,
|
|
42
|
-
|
|
42
|
+
iconOnly: !0,
|
|
43
43
|
"aria-label": `${t} icon button`,
|
|
44
44
|
children: /* @__PURE__ */ s(i, { className: "size-4" })
|
|
45
45
|
})
|
|
@@ -286,7 +286,7 @@ function m() {
|
|
|
286
286
|
}),
|
|
287
287
|
/* @__PURE__ */ s(e, {
|
|
288
288
|
variant: "outline",
|
|
289
|
-
|
|
289
|
+
iconOnly: !0,
|
|
290
290
|
"aria-label": "Download",
|
|
291
291
|
children: /* @__PURE__ */ s(a, { className: "size-4" })
|
|
292
292
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/card/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("./data.cjs");let i=require("react/jsx-runtime");var a=[`secondary`,`outline`,`destructive`],o=`border-t border-[color:var(--aui-divider)] py-6`;function s({state:s}){let c=r.cardDemoProjects[0],l=r.cardDemoProjects[1];return(0,i.jsxs)(`div`,{className:`space-y-0`,children:[(0,i.jsx)(`section`,{className:`pb-6`,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-end xl:justify-between`,children:[(0,i.jsxs)(`div`,{className:`max-w-xl`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Container`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`One card should hold the whole story`}),(0,i.jsx)(`p`,{className:`mt-3 text-sm leading-6 aui-text-muted`,children:`Show one rich card and one compact card, not extra chrome around them.`})]}),(0,i.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 xl:min-w-[360px] xl:max-w-[420px]`,children:[(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Primary`}),(0,i.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:c.title})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Compact`}),(0,i.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:s.cardCompact?`Small`:`Default`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted`,children:`Metrics`}),(0,i.jsx)(`p`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:c.metrics.length})]})]})]})}),(0,i.jsxs)(`section`,{className:o,children:[(0,i.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1.08fr)_minmax(0,0.92fr)]`,children:[(0,i.jsx)(t.Card,{size:s.cardCompact?`sm`:`default`,eyebrow:`Content`,title:c.title,description:c.description,badge:(0,i.jsx)(n.Badge,{tone:`success`,variant:`soft`,children:`Live`}),action:(0,i.jsx)(e.Button,{type:`button`,size:`xs`,variant:`outline`,children:`Open`}),content:(0,i.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:c.metrics.map(e=>(0,i.jsx)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] px-4 py-3 text-sm font-medium aui-text-strong`,children:e},e))}),footer:c.footer}),(0,i.jsx)(t.Card,{size:`sm`,interactive:!0,selected:!0,eyebrow:`Selectable`,title:l.title,description:l.description,content:(0,i.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.metrics.map((e,t)=>(0,i.jsx)(n.Badge,{variant:a[t],children:e},e))}),footer:l.footer})]}),(0,i.jsxs)(`div`,{className:`mt-4 grid gap-4 xl:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)]`,children:[(0,i.jsx)(t.Card,{orientation:`horizontal`,mediaAspect:`square`,title:`Media card`,description:`The same Card primitive owns image, copy, action and footer slots.`,media:(0,i.jsx)(`div`,{className:`h-full min-h-36 bg-[linear-gradient(135deg,var(--primary),color-mix(in_oklch,var(--primary),white_42%))]`}),action:(0,i.jsx)(e.Button,{type:`button`,size:`xs`,children:`View`}),content:(0,i.jsx)(`p`,{className:`text-sm leading-6 aui-text-muted`,children:`Use media slots for previews, thumbnails, charts, or product visuals without creating another card component.`})}),(0,i.jsx)(t.Card,{size:`sm`,density:`compact`,title:`Compact action card`,description:`Dense layouts still use the same header, content and footer anatomy.`,content:(0,i.jsx)(`div`,{className:`text-sm aui-text-strong`,children:`12 files ready for review`}),footer:(0,i.jsx)(e.Button,{type:`button`,size:`xs`,variant:`secondary`,children:`Review files`})})]})]})]})}exports.CardShowcase=s;
|
|
@@ -1,105 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Button as e } from "../../../components/ui/button/index.js";
|
|
2
|
+
import { Card as t } from "../../../components/ui/card/index.js";
|
|
3
|
+
import { Badge as n } from "../../../components/ui/badge/index.js";
|
|
4
|
+
import { cardDemoProjects as r } from "./data.js";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
6
|
//#region src/showcase/premium/card/showcase.tsx
|
|
6
|
-
var
|
|
7
|
+
var o = [
|
|
7
8
|
"secondary",
|
|
8
9
|
"outline",
|
|
9
10
|
"destructive"
|
|
10
|
-
],
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
return /* @__PURE__ */
|
|
11
|
+
], s = "border-t border-[color:var(--aui-divider)] py-6";
|
|
12
|
+
function c({ state: c }) {
|
|
13
|
+
let l = r[0], u = r[1];
|
|
14
|
+
return /* @__PURE__ */ a("div", {
|
|
14
15
|
className: "space-y-0",
|
|
15
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ i("section", {
|
|
16
17
|
className: "pb-6",
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ a("div", {
|
|
18
19
|
className: "flex flex-col gap-6 xl:flex-row xl:items-end xl:justify-between",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ a("div", {
|
|
20
21
|
className: "max-w-xl",
|
|
21
22
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ i("p", {
|
|
23
24
|
className: "text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted",
|
|
24
25
|
children: "Container"
|
|
25
26
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ i("h3", {
|
|
27
28
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
28
29
|
children: "One card should hold the whole story"
|
|
29
30
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ i("p", {
|
|
31
32
|
className: "mt-3 text-sm leading-6 aui-text-muted",
|
|
32
33
|
children: "Show one rich card and one compact card, not extra chrome around them."
|
|
33
34
|
})
|
|
34
35
|
]
|
|
35
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ a("div", {
|
|
36
37
|
className: "grid gap-3 sm:grid-cols-3 xl:min-w-[360px] xl:max-w-[420px]",
|
|
37
38
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ a("div", {
|
|
39
40
|
className: "rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ i("p", {
|
|
41
42
|
className: "text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted",
|
|
42
43
|
children: "Primary"
|
|
43
|
-
}), /* @__PURE__ */
|
|
44
|
+
}), /* @__PURE__ */ i("p", {
|
|
44
45
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
45
|
-
children:
|
|
46
|
+
children: l.title
|
|
46
47
|
})]
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ a("div", {
|
|
49
50
|
className: "rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ i("p", {
|
|
51
52
|
className: "text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted",
|
|
52
53
|
children: "Compact"
|
|
53
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ i("p", {
|
|
54
55
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
55
|
-
children:
|
|
56
|
+
children: c.cardCompact ? "Small" : "Default"
|
|
56
57
|
})]
|
|
57
58
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ a("div", {
|
|
59
60
|
className: "rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ i("p", {
|
|
61
62
|
className: "text-xs font-semibold uppercase tracking-[0.22em] aui-text-muted",
|
|
62
63
|
children: "Metrics"
|
|
63
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ i("p", {
|
|
64
65
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
65
|
-
children:
|
|
66
|
+
children: l.metrics.length
|
|
66
67
|
})]
|
|
67
68
|
})
|
|
68
69
|
]
|
|
69
70
|
})]
|
|
70
71
|
})
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
className:
|
|
73
|
-
children: /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ a("section", {
|
|
73
|
+
className: s,
|
|
74
|
+
children: [/* @__PURE__ */ a("div", {
|
|
74
75
|
className: "grid gap-4 xl:grid-cols-[minmax(0,1.08fr)_minmax(0,0.92fr)]",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
-
size:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
children: [/* @__PURE__ */ i(t, {
|
|
77
|
+
size: c.cardCompact ? "sm" : "default",
|
|
78
|
+
eyebrow: "Content",
|
|
79
|
+
title: l.title,
|
|
80
|
+
description: l.description,
|
|
81
|
+
badge: /* @__PURE__ */ i(n, {
|
|
82
|
+
tone: "success",
|
|
83
|
+
variant: "soft",
|
|
84
|
+
children: "Live"
|
|
85
|
+
}),
|
|
86
|
+
action: /* @__PURE__ */ i(e, {
|
|
87
|
+
type: "button",
|
|
88
|
+
size: "xs",
|
|
89
|
+
variant: "outline",
|
|
90
|
+
children: "Open"
|
|
91
|
+
}),
|
|
92
|
+
content: /* @__PURE__ */ i("div", {
|
|
80
93
|
className: "grid gap-3 sm:grid-cols-3",
|
|
81
|
-
children:
|
|
94
|
+
children: l.metrics.map((e) => /* @__PURE__ */ i("div", {
|
|
82
95
|
className: "rounded-xl border border-[color:var(--aui-divider)] px-4 py-3 text-sm font-medium aui-text-strong",
|
|
83
96
|
children: e
|
|
84
97
|
}, e))
|
|
85
98
|
}),
|
|
86
|
-
footer:
|
|
87
|
-
}), /* @__PURE__ */
|
|
99
|
+
footer: l.footer
|
|
100
|
+
}), /* @__PURE__ */ i(t, {
|
|
88
101
|
size: "sm",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
interactive: !0,
|
|
103
|
+
selected: !0,
|
|
104
|
+
eyebrow: "Selectable",
|
|
105
|
+
title: u.title,
|
|
106
|
+
description: u.description,
|
|
107
|
+
content: /* @__PURE__ */ i("div", {
|
|
92
108
|
className: "flex flex-wrap gap-2",
|
|
93
|
-
children:
|
|
94
|
-
variant:
|
|
109
|
+
children: u.metrics.map((e, t) => /* @__PURE__ */ i(n, {
|
|
110
|
+
variant: o[t],
|
|
95
111
|
children: e
|
|
96
112
|
}, e))
|
|
97
113
|
}),
|
|
98
|
-
footer:
|
|
114
|
+
footer: u.footer
|
|
99
115
|
})]
|
|
100
|
-
})
|
|
116
|
+
}), /* @__PURE__ */ a("div", {
|
|
117
|
+
className: "mt-4 grid gap-4 xl:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)]",
|
|
118
|
+
children: [/* @__PURE__ */ i(t, {
|
|
119
|
+
orientation: "horizontal",
|
|
120
|
+
mediaAspect: "square",
|
|
121
|
+
title: "Media card",
|
|
122
|
+
description: "The same Card primitive owns image, copy, action and footer slots.",
|
|
123
|
+
media: /* @__PURE__ */ i("div", { className: "h-full min-h-36 bg-[linear-gradient(135deg,var(--primary),color-mix(in_oklch,var(--primary),white_42%))]" }),
|
|
124
|
+
action: /* @__PURE__ */ i(e, {
|
|
125
|
+
type: "button",
|
|
126
|
+
size: "xs",
|
|
127
|
+
children: "View"
|
|
128
|
+
}),
|
|
129
|
+
content: /* @__PURE__ */ i("p", {
|
|
130
|
+
className: "text-sm leading-6 aui-text-muted",
|
|
131
|
+
children: "Use media slots for previews, thumbnails, charts, or product visuals without creating another card component."
|
|
132
|
+
})
|
|
133
|
+
}), /* @__PURE__ */ i(t, {
|
|
134
|
+
size: "sm",
|
|
135
|
+
density: "compact",
|
|
136
|
+
title: "Compact action card",
|
|
137
|
+
description: "Dense layouts still use the same header, content and footer anatomy.",
|
|
138
|
+
content: /* @__PURE__ */ i("div", {
|
|
139
|
+
className: "text-sm aui-text-strong",
|
|
140
|
+
children: "12 files ready for review"
|
|
141
|
+
}),
|
|
142
|
+
footer: /* @__PURE__ */ i(e, {
|
|
143
|
+
type: "button",
|
|
144
|
+
size: "xs",
|
|
145
|
+
variant: "secondary",
|
|
146
|
+
children: "Review files"
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
101
150
|
})]
|
|
102
151
|
});
|
|
103
152
|
}
|
|
104
153
|
//#endregion
|
|
105
|
-
export {
|
|
154
|
+
export { c as CardShowcase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs"),n=require("../../../components/ui/button/index.cjs"),r=require("../../../components/display/carousel.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=[{title:`Onboarding`,text:`Guide quickly from first login.`,tone:`Launch`,detail:`Hero slider for product onboarding and release tours.`},{title:`Components`,text:`Review ready-made dashboard patterns.`,tone:`Library`,detail:`Card rail, docs previews, and swipe-ready gallery states.`},{title:`Release`,text:`Publish, test, and iterate faster.`,tone:`Ship`,detail:`Active slide details stay below the main frame for context.`}];function s(){let[e,s]=i.useState(!0),[c,l]=i.useState(!0),[u,d]=i.useState(!1),[f,p]=i.useState(0),[m,h]=i.useState(!1);return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,a.jsxs)(n.Button,{size:`sm`,variant:e?`default`:`outline`,onClick:()=>s(e=>!e),children:[e?`Hide`:`Show`,` arrows`]}),(0,a.jsxs)(n.Button,{size:`sm`,variant:c?`default`:`outline`,onClick:()=>l(e=>!e),children:[c?`Hide`:`Show`,` dots`]}),(0,a.jsxs)(n.Button,{size:`sm`,variant:u?`default`:`outline`,onClick:()=>d(e=>!e),children:[u?`Stop`:`Start`,` autoplay`]})]}),(0,a.jsx)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:o.map((e,t)=>(0,a.jsxs)(n.Button,{type:`button`,variant:f===t?`default`:`outline`,className:`justify-start`,onClick:()=>p(t),children:[t+1,`. `,e.title]},e.title))}),(0,a.jsx)(r.Carousel,{index:f,loop:!0,showArrows:e,showDots:c,showStatus:!0,showThumbnails:!0,autoplay:u,autoplayInterval:2200,showPlaybackControl:!0,aspectRatio:`16 / 9`,onIndexChange:e=>p(e),onAutoplayChange:h,previousLabel:`Previous slide`,nextLabel:`Next slide`,renderThumbnail:(e,n,r)=>(0,a.jsxs)(`div`,{className:t.cn(`grid gap-1 p-3`,r&&`bg-primary/5`),children:[(0,a.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:[`0`,n+1]}),(0,a.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:o[n]?.title})]}),renderActiveDetail:(e,t)=>(0,a.jsxs)(`div`,{className:`rounded-[20px] border border-border/70 bg-card/80 p-4`,children:[(0,a.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:o[t]?.title}),(0,a.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:o[t]?.detail})]}),children:o.map((e,t)=>(0,a.jsx)(r.CarouselItem,{children:(0,a.jsx)(`div`,{className:`min-h-56 rounded-xl border border-border bg-card p-8`,children:(0,a.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,a.jsxs)(`div`,{className:`grid gap-2`,children:[(0,a.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] text-primary`,children:e.tone}),(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:`Slide ${t+1}`}),(0,a.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:e.title}),(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.text})]}),(0,a.jsxs)(`div`,{className:`rounded-full border border-border/70 px-3 py-1 text-xs text-muted-foreground`,children:[t+1,`/`,o.length]})]})})},e.title))}),(0,a.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[`Playback: `,m||u?`active`:`paused`]})]})}exports.CarouselShowcase=s;
|