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,53 +1,55 @@
|
|
|
1
1
|
import { Badge as e } from "../../../components/ui/badge/index.js";
|
|
2
2
|
import { Statistic as t, StatisticCard as n, StatisticGrid as r } from "../../../components/display/statistic.js";
|
|
3
|
-
import {
|
|
3
|
+
import { TrendCard as i } from "../../../components/display/trend-card.js";
|
|
4
|
+
import { ProgressRing as a } from "../../../components/charts/progress-ring.js";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
6
|
//#region src/showcase/premium/statistic/showcase.tsx
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
var c = "border-t border-[color:var(--aui-divider)] py-6";
|
|
8
|
+
function l() {
|
|
9
|
+
return /* @__PURE__ */ s("div", {
|
|
8
10
|
className: "space-y-0",
|
|
9
11
|
children: [
|
|
10
|
-
/* @__PURE__ */
|
|
12
|
+
/* @__PURE__ */ s("section", {
|
|
11
13
|
className: "pb-6",
|
|
12
14
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ o("p", {
|
|
14
16
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
15
17
|
children: "Installed display primitive"
|
|
16
18
|
}),
|
|
17
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ o("h3", {
|
|
18
20
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
19
21
|
children: "Statistic is the KPI surface, not a generic card clone"
|
|
20
22
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ o("p", {
|
|
22
24
|
className: "mt-3 max-w-2xl text-sm leading-6 aui-text-muted",
|
|
23
25
|
children: "Use the base statistic when the number matters most. Promote to StatisticCard or StatisticGrid when several metrics need shared structure."
|
|
24
26
|
})
|
|
25
27
|
]
|
|
26
28
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
className:
|
|
29
|
-
children: /* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ o("section", {
|
|
30
|
+
className: c,
|
|
31
|
+
children: /* @__PURE__ */ s(r, {
|
|
30
32
|
columns: 3,
|
|
31
33
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ o(n, {
|
|
33
35
|
label: "Revenue",
|
|
34
36
|
value: "$24.8k",
|
|
35
37
|
change: "+12.4%",
|
|
36
38
|
trend: "up",
|
|
37
39
|
description: "vs last 30 days"
|
|
38
40
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(n, {
|
|
40
42
|
label: "Errors",
|
|
41
43
|
value: "14",
|
|
42
44
|
change: "-3.1%",
|
|
43
45
|
trend: "down",
|
|
44
46
|
description: "production incidents"
|
|
45
47
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ o(n, {
|
|
47
49
|
label: "Adoption",
|
|
48
50
|
value: "86%",
|
|
49
51
|
description: "workspace activation rate",
|
|
50
|
-
action: /* @__PURE__ */
|
|
52
|
+
action: /* @__PURE__ */ o(e, {
|
|
51
53
|
variant: "secondary",
|
|
52
54
|
children: "Live"
|
|
53
55
|
})
|
|
@@ -55,13 +57,13 @@ function s() {
|
|
|
55
57
|
]
|
|
56
58
|
})
|
|
57
59
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
className:
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ o("section", {
|
|
61
|
+
className: c,
|
|
62
|
+
children: /* @__PURE__ */ s("div", {
|
|
61
63
|
className: "grid gap-6 xl:grid-cols-[1fr_360px]",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ o("div", {
|
|
63
65
|
className: "rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4",
|
|
64
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ o(t, {
|
|
65
67
|
label: "Publish latency",
|
|
66
68
|
value: "1.8s",
|
|
67
69
|
suffix: "avg",
|
|
@@ -69,20 +71,50 @@ function s() {
|
|
|
69
71
|
trend: "down",
|
|
70
72
|
description: "from the previous release window"
|
|
71
73
|
})
|
|
72
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ s("div", {
|
|
73
75
|
className: "rounded-xl border border-[color:var(--aui-divider)] p-4",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ o("p", {
|
|
75
77
|
className: "text-sm font-semibold aui-text-strong",
|
|
76
78
|
children: "Guidance"
|
|
77
|
-
}), /* @__PURE__ */
|
|
79
|
+
}), /* @__PURE__ */ s("div", {
|
|
78
80
|
className: "mt-3 space-y-3 text-sm leading-6 aui-text-muted",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ o("p", { children: "Keep labels short and units clear. Users should understand the value before reading the description." }), /* @__PURE__ */ o("p", { children: "Trend color should reinforce meaning, not carry the whole message alone." })]
|
|
80
82
|
})]
|
|
81
83
|
})]
|
|
82
84
|
})
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ o("section", {
|
|
87
|
+
className: c,
|
|
88
|
+
children: /* @__PURE__ */ s("div", {
|
|
89
|
+
className: "grid gap-6 xl:grid-cols-[1fr_240px]",
|
|
90
|
+
children: [/* @__PURE__ */ o(i, {
|
|
91
|
+
title: "Release velocity",
|
|
92
|
+
value: "24",
|
|
93
|
+
change: "+3",
|
|
94
|
+
trend: "up",
|
|
95
|
+
description: "completed this sprint",
|
|
96
|
+
sparkline: [
|
|
97
|
+
8,
|
|
98
|
+
10,
|
|
99
|
+
9,
|
|
100
|
+
14,
|
|
101
|
+
18,
|
|
102
|
+
19,
|
|
103
|
+
24
|
|
104
|
+
]
|
|
105
|
+
}), /* @__PURE__ */ o("div", {
|
|
106
|
+
className: "rounded-xl border border-[color:var(--aui-divider)] p-4",
|
|
107
|
+
children: /* @__PURE__ */ o(a, {
|
|
108
|
+
value: 76,
|
|
109
|
+
label: "76%",
|
|
110
|
+
description: "coverage",
|
|
111
|
+
tone: "success"
|
|
112
|
+
})
|
|
113
|
+
})]
|
|
114
|
+
})
|
|
83
115
|
})
|
|
84
116
|
]
|
|
85
117
|
});
|
|
86
118
|
}
|
|
87
119
|
//#endregion
|
|
88
|
-
export {
|
|
120
|
+
export { l as StatisticShowcase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/switch/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("./data.cjs");let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({state:o,setState:s}){return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start 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:`Preferences`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Switches should feel like settings`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`This pattern is for single on/off preferences. The preview should read like a settings page, not a stack of anonymous toggles.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Controlled`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Settings`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Single preference`})]})]}),(0,i.jsx)(`div`,{className:`mt-6 grid gap-3`,children:r.switchDemoRows.map((e,n)=>(0,i.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/switch/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("./data.cjs");let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({state:o,setState:s}){return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start 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:`Preferences`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Switches should feel like settings`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`This pattern is for single on/off preferences. The preview should read like a settings page, not a stack of anonymous toggles.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Controlled`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Settings`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Single preference`})]})]}),(0,i.jsx)(`div`,{className:`mt-6 grid gap-3`,children:r.switchDemoRows.map((e,n)=>(0,i.jsx)(`div`,{className:a,children:(0,i.jsx)(t.Switch,{label:e.title,description:e.description,checked:n===0?o.switchOn:e.defaultChecked,onCheckedChange:n===0?e=>s({switchOn:e}):void 0,defaultChecked:n>0?e.defaultChecked:void 0,size:n===0?`lg`:`md`,labelPlacement:`start`,className:`w-full justify-between`})},e.title))})]}),(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Live state`}),(0,i.jsxs)(`h4`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:[`Dark mode sync is `,o.switchOn?`on`:`off`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Switches should show immediate preference feedback without requiring a save button.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(e.Button,{type:`button`,size:`sm`,onClick:()=>s({switchOn:!0}),children:`Turn on`}),(0,i.jsx)(e.Button,{type:`button`,size:`sm`,variant:`secondary`,onClick:()=>s({switchOn:!1}),children:`Turn off`})]})]}),(0,i.jsxs)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:[(0,i.jsx)(t.Switch,{label:`Sync in progress`,description:`Loading disables the control until the request finishes.`,loading:!0,defaultChecked:!0}),(0,i.jsx)(t.Switch,{label:`Invalid setting`,description:`Error state keeps the same field layout.`,invalid:!0})]})]})]})}exports.SwitchShowcase=o;
|
|
@@ -50,24 +50,23 @@ function s({ state: s, setState: c }) {
|
|
|
50
50
|
})]
|
|
51
51
|
}), /* @__PURE__ */ i("div", {
|
|
52
52
|
className: "mt-6 grid gap-3",
|
|
53
|
-
children: r.map((e, n) => /* @__PURE__ */
|
|
54
|
-
className:
|
|
55
|
-
children:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}), /* @__PURE__ */ i("p", {
|
|
59
|
-
className: "text-sm aui-text-muted",
|
|
60
|
-
children: e.description
|
|
61
|
-
})] }), /* @__PURE__ */ i(t, {
|
|
53
|
+
children: r.map((e, n) => /* @__PURE__ */ i("div", {
|
|
54
|
+
className: o,
|
|
55
|
+
children: /* @__PURE__ */ i(t, {
|
|
56
|
+
label: e.title,
|
|
57
|
+
description: e.description,
|
|
62
58
|
checked: n === 0 ? s.switchOn : e.defaultChecked,
|
|
63
59
|
onCheckedChange: n === 0 ? (e) => c({ switchOn: e }) : void 0,
|
|
64
|
-
defaultChecked: n > 0 ? e.defaultChecked : void 0
|
|
65
|
-
|
|
60
|
+
defaultChecked: n > 0 ? e.defaultChecked : void 0,
|
|
61
|
+
size: n === 0 ? "lg" : "md",
|
|
62
|
+
labelPlacement: "start",
|
|
63
|
+
className: "w-full justify-between"
|
|
64
|
+
})
|
|
66
65
|
}, e.title))
|
|
67
66
|
})]
|
|
68
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ a("section", {
|
|
69
68
|
className: o,
|
|
70
|
-
children: /* @__PURE__ */ a("div", {
|
|
69
|
+
children: [/* @__PURE__ */ a("div", {
|
|
71
70
|
className: "flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between",
|
|
72
71
|
children: [/* @__PURE__ */ a("div", { children: [
|
|
73
72
|
/* @__PURE__ */ i("p", {
|
|
@@ -97,7 +96,19 @@ function s({ state: s, setState: c }) {
|
|
|
97
96
|
children: "Turn off"
|
|
98
97
|
})]
|
|
99
98
|
})]
|
|
100
|
-
})
|
|
99
|
+
}), /* @__PURE__ */ a("div", {
|
|
100
|
+
className: "mt-5 grid gap-3 sm:grid-cols-2",
|
|
101
|
+
children: [/* @__PURE__ */ i(t, {
|
|
102
|
+
label: "Sync in progress",
|
|
103
|
+
description: "Loading disables the control until the request finishes.",
|
|
104
|
+
loading: !0,
|
|
105
|
+
defaultChecked: !0
|
|
106
|
+
}), /* @__PURE__ */ i(t, {
|
|
107
|
+
label: "Invalid setting",
|
|
108
|
+
description: "Error state keeps the same field layout.",
|
|
109
|
+
invalid: !0
|
|
110
|
+
})]
|
|
111
|
+
})]
|
|
101
112
|
})]
|
|
102
113
|
});
|
|
103
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/tabs/index.cjs"),n=require("./data.cjs");let r=require("react/jsx-runtime");var
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/tabs/index.cjs"),n=require("./data.cjs");let r=require("lucide-react"),i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({state:o,setState:s}){let c=n.tabsDemoPanels.find(e=>e.value===o.activeTab);return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`View switching`}),(0,i.jsx)(`h3`,{className:`aui-text-strong mt-3 text-2xl font-semibold tracking-tight`,children:`Tabs should read like page sections`}),(0,i.jsx)(`p`,{className:`aui-text-muted mt-3 max-w-2xl text-sm leading-6`,children:`Overview, activity and settings stay separated without turning the screen into a navigation maze.`})]}),(0,i.jsxs)(`section`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Current tab`}),(0,i.jsx)(`p`,{className:`mt-3 text-lg font-semibold aui-text-strong`,children:c?.label}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`The selected view should feel like a real section change, not a tiny state toggle.`})]}),(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Sections`}),(0,i.jsxs)(`p`,{className:`mt-3 text-lg font-semibold aui-text-strong`,children:[n.tabsDemoPanels.length,` surfaces`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Use a small number of high-signal tabs so the layout stays readable.`})]}),(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Pattern`}),(0,i.jsx)(`p`,{className:`mt-3 text-lg font-semibold aui-text-strong`,children:`Page sections`}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Tabs work best when each panel owns a distinct slice of the workflow.`})]})]}),(0,i.jsx)(`div`,{className:a,children:(0,i.jsxs)(t.Tabs,{value:o.activeTab,onValueChange:e=>s({activeTab:e}),children:[(0,i.jsx)(t.TabsList,{overflow:`scroll`,children:n.tabsDemoPanels.map(e=>(0,i.jsx)(t.TabsTrigger,{value:e.value,children:e.label},e.value))}),n.tabsDemoPanels.map(e=>(0,i.jsx)(t.TabsContent,{value:e.value,className:`aui-text-muted mt-4 border-t border-[color:var(--aui-divider)] pt-4 text-sm leading-6`,children:e.content},e.value))]})}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-lg font-semibold aui-text-strong`,children:`Variants and overflow`}),(0,i.jsx)(`p`,{className:`mt-2 max-w-xl text-sm leading-6 aui-text-muted`,children:`The same primitive covers underline navigation, compact density, icon labels, and long mobile tab rows.`})]}),(0,i.jsxs)(`div`,{className:`grid gap-4`,children:[(0,i.jsx)(t.Tabs,{defaultValue:`activity`,children:(0,i.jsxs)(t.TabsList,{variant:`underline`,overflow:`scroll`,children:[(0,i.jsxs)(t.TabsTrigger,{variant:`underline`,value:`activity`,children:[(0,i.jsx)(r.ActivityIcon,{}),`Activity`]}),(0,i.jsxs)(t.TabsTrigger,{variant:`underline`,value:`files`,children:[(0,i.jsx)(r.FileTextIcon,{}),`Files`]}),(0,i.jsxs)(t.TabsTrigger,{variant:`underline`,value:`members`,children:[(0,i.jsx)(r.UsersIcon,{}),`Members`]}),(0,i.jsxs)(t.TabsTrigger,{variant:`underline`,value:`security`,children:[(0,i.jsx)(r.ShieldIcon,{}),`Security`]}),(0,i.jsxs)(t.TabsTrigger,{variant:`underline`,value:`settings`,children:[(0,i.jsx)(r.SettingsIcon,{}),`Settings`]})]})}),(0,i.jsx)(t.Tabs,{defaultValue:`compact`,children:(0,i.jsxs)(t.TabsList,{variant:`compact`,overflow:`wrap`,children:[(0,i.jsx)(t.TabsTrigger,{variant:`compact`,value:`compact`,children:`Compact`}),(0,i.jsxs)(t.TabsTrigger,{variant:`compact`,value:`alerts`,children:[(0,i.jsx)(r.BellIcon,{}),`Alerts`]}),(0,i.jsx)(t.TabsTrigger,{variant:`compact`,value:`audit`,children:`Audit`})]})}),(0,i.jsxs)(t.Tabs,{defaultValue:`vertical`,orientation:`vertical`,className:`grid gap-3 sm:grid-cols-[180px_1fr]`,children:[(0,i.jsxs)(t.TabsList,{variant:`pills`,overflow:`wrap`,className:`grid`,children:[(0,i.jsx)(t.TabsTrigger,{variant:`pills`,value:`vertical`,children:`Vertical`}),(0,i.jsx)(t.TabsTrigger,{variant:`pills`,value:`pills`,children:`Pills`}),(0,i.jsx)(t.TabsTrigger,{variant:`pills`,value:`overflow`,children:`Overflow`})]}),(0,i.jsx)(t.TabsContent,{value:`vertical`,className:`mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted`,children:`Vertical tabs keep local settings readable when each panel has a larger form.`}),(0,i.jsx)(t.TabsContent,{value:`pills`,className:`mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted`,children:`Pill tabs carry a stronger selected state for dense dashboards.`}),(0,i.jsx)(t.TabsContent,{value:`overflow`,className:`mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted`,children:`Scroll overflow keeps long labels accessible on small screens.`})]})]})]})}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Live state`}),(0,i.jsxs)(`h4`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:[`Active tab: `,c?.label]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Change tabs above or jump directly to a common product section.`})]}),(0,i.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.tabsDemoPanels.map(t=>(0,i.jsx)(e.Button,{type:`button`,size:`sm`,variant:o.activeTab===t.value?`default`:`secondary`,onClick:()=>s({activeTab:t.value}),children:t.label},t.value))})]})})]})}exports.TabsShowcase=o;
|
|
@@ -1,80 +1,81 @@
|
|
|
1
1
|
import { Button as e } from "../../../components/ui/button/index.js";
|
|
2
2
|
import { Tabs as t, TabsContent as n, TabsList as r, TabsTrigger as i } from "../../../components/ui/tabs/index.js";
|
|
3
3
|
import { tabsDemoPanels as a } from "./data.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ActivityIcon as o, BellIcon as s, FileTextIcon as c, SettingsIcon as l, ShieldIcon as u, UsersIcon as d } from "lucide-react";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
6
|
//#region src/showcase/premium/tabs/showcase.tsx
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
return /* @__PURE__ */
|
|
7
|
+
var m = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5";
|
|
8
|
+
function h({ state: h, setState: g }) {
|
|
9
|
+
let _ = a.find((e) => e.value === h.activeTab);
|
|
10
|
+
return /* @__PURE__ */ p("div", {
|
|
10
11
|
className: "space-y-5",
|
|
11
12
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ p("section", {
|
|
13
14
|
className: "rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6",
|
|
14
15
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ f("p", {
|
|
16
17
|
className: "text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted",
|
|
17
18
|
children: "View switching"
|
|
18
19
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ f("h3", {
|
|
20
21
|
className: "aui-text-strong mt-3 text-2xl font-semibold tracking-tight",
|
|
21
22
|
children: "Tabs should read like page sections"
|
|
22
23
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ f("p", {
|
|
24
25
|
className: "aui-text-muted mt-3 max-w-2xl text-sm leading-6",
|
|
25
26
|
children: "Overview, activity and settings stay separated without turning the screen into a navigation maze."
|
|
26
27
|
})
|
|
27
28
|
]
|
|
28
29
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ p("section", {
|
|
30
31
|
className: "grid gap-3 md:grid-cols-3",
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
className:
|
|
33
|
+
/* @__PURE__ */ p("div", {
|
|
34
|
+
className: m,
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ f("p", {
|
|
36
37
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
37
38
|
children: "Current tab"
|
|
38
39
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ f("p", {
|
|
40
41
|
className: "mt-3 text-lg font-semibold aui-text-strong",
|
|
41
|
-
children:
|
|
42
|
+
children: _?.label
|
|
42
43
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ f("p", {
|
|
44
45
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
45
46
|
children: "The selected view should feel like a real section change, not a tiny state toggle."
|
|
46
47
|
})
|
|
47
48
|
]
|
|
48
49
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
className:
|
|
50
|
+
/* @__PURE__ */ p("div", {
|
|
51
|
+
className: m,
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ f("p", {
|
|
53
54
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
54
55
|
children: "Sections"
|
|
55
56
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ p("p", {
|
|
57
58
|
className: "mt-3 text-lg font-semibold aui-text-strong",
|
|
58
59
|
children: [a.length, " surfaces"]
|
|
59
60
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ f("p", {
|
|
61
62
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
62
63
|
children: "Use a small number of high-signal tabs so the layout stays readable."
|
|
63
64
|
})
|
|
64
65
|
]
|
|
65
66
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
className:
|
|
67
|
+
/* @__PURE__ */ p("div", {
|
|
68
|
+
className: m,
|
|
68
69
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ f("p", {
|
|
70
71
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
71
72
|
children: "Pattern"
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ f("p", {
|
|
74
75
|
className: "mt-3 text-lg font-semibold aui-text-strong",
|
|
75
76
|
children: "Page sections"
|
|
76
77
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ f("p", {
|
|
78
79
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
79
80
|
children: "Tabs work best when each panel owns a distinct slice of the workflow."
|
|
80
81
|
})
|
|
@@ -82,45 +83,167 @@ function l({ state: l, setState: u }) {
|
|
|
82
83
|
})
|
|
83
84
|
]
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
className:
|
|
87
|
-
children: /* @__PURE__ */
|
|
88
|
-
value:
|
|
89
|
-
onValueChange: (e) =>
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
children: e
|
|
93
|
-
|
|
86
|
+
/* @__PURE__ */ f("div", {
|
|
87
|
+
className: m,
|
|
88
|
+
children: /* @__PURE__ */ p(t, {
|
|
89
|
+
value: h.activeTab,
|
|
90
|
+
onValueChange: (e) => g({ activeTab: e }),
|
|
91
|
+
children: [/* @__PURE__ */ f(r, {
|
|
92
|
+
overflow: "scroll",
|
|
93
|
+
children: a.map((e) => /* @__PURE__ */ f(i, {
|
|
94
|
+
value: e.value,
|
|
95
|
+
children: e.label
|
|
96
|
+
}, e.value))
|
|
97
|
+
}), a.map((e) => /* @__PURE__ */ f(n, {
|
|
94
98
|
value: e.value,
|
|
95
99
|
className: "aui-text-muted mt-4 border-t border-[color:var(--aui-divider)] pt-4 text-sm leading-6",
|
|
96
100
|
children: e.content
|
|
97
101
|
}, e.value))]
|
|
98
102
|
})
|
|
99
103
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
className:
|
|
102
|
-
children: /* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ f("section", {
|
|
105
|
+
className: m,
|
|
106
|
+
children: /* @__PURE__ */ p("div", {
|
|
107
|
+
className: "grid gap-6 xl:grid-cols-[0.9fr_1.1fr]",
|
|
108
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
109
|
+
className: "text-lg font-semibold aui-text-strong",
|
|
110
|
+
children: "Variants and overflow"
|
|
111
|
+
}), /* @__PURE__ */ f("p", {
|
|
112
|
+
className: "mt-2 max-w-xl text-sm leading-6 aui-text-muted",
|
|
113
|
+
children: "The same primitive covers underline navigation, compact density, icon labels, and long mobile tab rows."
|
|
114
|
+
})] }), /* @__PURE__ */ p("div", {
|
|
115
|
+
className: "grid gap-4",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ f(t, {
|
|
118
|
+
defaultValue: "activity",
|
|
119
|
+
children: /* @__PURE__ */ p(r, {
|
|
120
|
+
variant: "underline",
|
|
121
|
+
overflow: "scroll",
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ p(i, {
|
|
124
|
+
variant: "underline",
|
|
125
|
+
value: "activity",
|
|
126
|
+
children: [/* @__PURE__ */ f(o, {}), "Activity"]
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ p(i, {
|
|
129
|
+
variant: "underline",
|
|
130
|
+
value: "files",
|
|
131
|
+
children: [/* @__PURE__ */ f(c, {}), "Files"]
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ p(i, {
|
|
134
|
+
variant: "underline",
|
|
135
|
+
value: "members",
|
|
136
|
+
children: [/* @__PURE__ */ f(d, {}), "Members"]
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ p(i, {
|
|
139
|
+
variant: "underline",
|
|
140
|
+
value: "security",
|
|
141
|
+
children: [/* @__PURE__ */ f(u, {}), "Security"]
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ p(i, {
|
|
144
|
+
variant: "underline",
|
|
145
|
+
value: "settings",
|
|
146
|
+
children: [/* @__PURE__ */ f(l, {}), "Settings"]
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ f(t, {
|
|
152
|
+
defaultValue: "compact",
|
|
153
|
+
children: /* @__PURE__ */ p(r, {
|
|
154
|
+
variant: "compact",
|
|
155
|
+
overflow: "wrap",
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ f(i, {
|
|
158
|
+
variant: "compact",
|
|
159
|
+
value: "compact",
|
|
160
|
+
children: "Compact"
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ p(i, {
|
|
163
|
+
variant: "compact",
|
|
164
|
+
value: "alerts",
|
|
165
|
+
children: [/* @__PURE__ */ f(s, {}), "Alerts"]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ f(i, {
|
|
168
|
+
variant: "compact",
|
|
169
|
+
value: "audit",
|
|
170
|
+
children: "Audit"
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
})
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ p(t, {
|
|
176
|
+
defaultValue: "vertical",
|
|
177
|
+
orientation: "vertical",
|
|
178
|
+
className: "grid gap-3 sm:grid-cols-[180px_1fr]",
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ p(r, {
|
|
181
|
+
variant: "pills",
|
|
182
|
+
overflow: "wrap",
|
|
183
|
+
className: "grid",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ f(i, {
|
|
186
|
+
variant: "pills",
|
|
187
|
+
value: "vertical",
|
|
188
|
+
children: "Vertical"
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ f(i, {
|
|
191
|
+
variant: "pills",
|
|
192
|
+
value: "pills",
|
|
193
|
+
children: "Pills"
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ f(i, {
|
|
196
|
+
variant: "pills",
|
|
197
|
+
value: "overflow",
|
|
198
|
+
children: "Overflow"
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ f(n, {
|
|
203
|
+
value: "vertical",
|
|
204
|
+
className: "mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted",
|
|
205
|
+
children: "Vertical tabs keep local settings readable when each panel has a larger form."
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ f(n, {
|
|
208
|
+
value: "pills",
|
|
209
|
+
className: "mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted",
|
|
210
|
+
children: "Pill tabs carry a stronger selected state for dense dashboards."
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ f(n, {
|
|
213
|
+
value: "overflow",
|
|
214
|
+
className: "mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted",
|
|
215
|
+
children: "Scroll overflow keeps long labels accessible on small screens."
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
})]
|
|
221
|
+
})
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ f("section", {
|
|
224
|
+
className: m,
|
|
225
|
+
children: /* @__PURE__ */ p("div", {
|
|
103
226
|
className: "flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ p("div", { children: [
|
|
228
|
+
/* @__PURE__ */ f("p", {
|
|
106
229
|
className: "text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
107
230
|
children: "Live state"
|
|
108
231
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ p("h4", {
|
|
110
233
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
111
|
-
children: ["Active tab: ",
|
|
234
|
+
children: ["Active tab: ", _?.label]
|
|
112
235
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ f("p", {
|
|
114
237
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
115
238
|
children: "Change tabs above or jump directly to a common product section."
|
|
116
239
|
})
|
|
117
|
-
] }), /* @__PURE__ */
|
|
240
|
+
] }), /* @__PURE__ */ f("div", {
|
|
118
241
|
className: "flex flex-wrap gap-2",
|
|
119
|
-
children: a.map((t) => /* @__PURE__ */
|
|
242
|
+
children: a.map((t) => /* @__PURE__ */ f(e, {
|
|
120
243
|
type: "button",
|
|
121
244
|
size: "sm",
|
|
122
|
-
variant:
|
|
123
|
-
onClick: () =>
|
|
245
|
+
variant: h.activeTab === t.value ? "default" : "secondary",
|
|
246
|
+
onClick: () => g({ activeTab: t.value }),
|
|
124
247
|
children: t.label
|
|
125
248
|
}, t.value))
|
|
126
249
|
})]
|
|
@@ -130,4 +253,4 @@ function l({ state: l, setState: u }) {
|
|
|
130
253
|
});
|
|
131
254
|
}
|
|
132
255
|
//#endregion
|
|
133
|
-
export {
|
|
256
|
+
export { h as TabsShowcase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={code:`import { FormEvent, useState } from "react"
|
|
2
|
-
import { Textarea } from "
|
|
2
|
+
import { Textarea } from "tembro"
|
|
3
3
|
|
|
4
4
|
export function Example() {
|
|
5
5
|
const [note, setNote] = useState("")
|
|
@@ -12,11 +12,19 @@ export function Example() {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<form onSubmit={submit} className="space-y-3">
|
|
15
|
-
<Textarea
|
|
16
|
-
|
|
15
|
+
<Textarea
|
|
16
|
+
rows={6}
|
|
17
|
+
value={note}
|
|
18
|
+
onValueChange={setNote}
|
|
19
|
+
placeholder="Write your message..."
|
|
20
|
+
helperText="Keep instructions visible below the field."
|
|
21
|
+
errorText={error ? "Please enter at least 10 characters." : undefined}
|
|
22
|
+
maxLength={240}
|
|
23
|
+
showCharacterCount
|
|
24
|
+
/>
|
|
25
|
+
<Textarea rows={4} defaultValue="Internal changelog draft..." helperText="Draft copy" />
|
|
17
26
|
<Textarea readOnly value="Locked review comment" rows={3} />
|
|
18
27
|
<button type="submit">Submit</button>
|
|
19
|
-
{error ? <p className="text-sm text-red-600">Please enter at least 10 characters.</p> : null}
|
|
20
28
|
</form>
|
|
21
29
|
)
|
|
22
30
|
}`,htmlCode:`<textarea data-slot="textarea" placeholder="Write your message..." rows="6"></textarea>`,cliCommand:`npx tembro add textarea`,highlights:[`Long-form notes`,`Multiline forms`,`Rows/height control`,`Validation-friendly error context`],relatedBlockSlugs:[`settings-form`,`auth-sign-in`,`pricing-section`],scenarios:[{title:`Support notes`,description:`Capture longer messages with 6+ rows without layout shift.`},{title:`Release notes`,description:`Use multiline fields for changelog and update summaries.`},{title:`Review comments`,description:`Keep readOnly previews for policy or audit style workflows.`},{title:`Internal description editor`,description:`Combine rows with validation text and section headers.`}],capabilityNotes:[`Designed for multi-line content with enough vertical rhythm for long text.`,`Supports controlled/uncontrolled usage with rows customization.`,`Should demonstrate empty, filled and read-only states in form contexts.`,`Pairs well with form shells and richer editorial patterns.`]};exports.textareaMock=e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/showcase/premium/textarea/mock.ts
|
|
2
2
|
var e = {
|
|
3
|
-
code: "import { FormEvent, useState } from \"react\"\nimport { Textarea } from \"
|
|
3
|
+
code: "import { FormEvent, useState } from \"react\"\nimport { Textarea } from \"tembro\"\n\nexport function Example() {\n const [note, setNote] = useState(\"\")\n const [error, setError] = useState(false)\n\n function submit(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n setError(note.trim().length < 10)\n }\n\n return (\n <form onSubmit={submit} className=\"space-y-3\">\n <Textarea\n rows={6}\n value={note}\n onValueChange={setNote}\n placeholder=\"Write your message...\"\n helperText=\"Keep instructions visible below the field.\"\n errorText={error ? \"Please enter at least 10 characters.\" : undefined}\n maxLength={240}\n showCharacterCount\n />\n <Textarea rows={4} defaultValue=\"Internal changelog draft...\" helperText=\"Draft copy\" />\n <Textarea readOnly value=\"Locked review comment\" rows={3} />\n <button type=\"submit\">Submit</button>\n </form>\n )\n}",
|
|
4
4
|
htmlCode: "<textarea data-slot=\"textarea\" placeholder=\"Write your message...\" rows=\"6\"></textarea>",
|
|
5
5
|
cliCommand: "npx tembro add textarea",
|
|
6
6
|
highlights: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/textarea/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("./data.cjs");let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({state:o,setState:s}){return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start 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:`Long-form entry`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Textarea should feel calm and readable`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use it for notes, summaries, and message bodies. The preview should focus on readability, resize behavior, and passive states instead of raw field duplication.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Editable`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Read-only`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Resizable`})]})]}),(0,i.jsxs)(`div`,{className:`mt-6 grid gap-4 xl:grid-cols-[1.12fr_0.88fr]`,children:[(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Internal note`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.Textarea,{value:o.textareaValue,onChange:e=>s({textareaValue:e.target.value}),rows:r.textareaDemoFields[0].rows,className:`${r.textareaDemoFields[0].minHeight} resize-y`,placeholder:r.textareaDemoFields[0].placeholder})})]}),(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Current length`}),(0,i.jsxs)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:[o.textareaValue.length,` chars`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Long text surfaces should stay readable before they become decorative. Keep line-height, contrast, and padding stable as content grows.`})]})]})]}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Live state`}),(0,i.jsxs)(`h4`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:[`Draft length: `,o.textareaValue.length,` characters`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Fill or clear the note to verify controlled textarea behavior and visual density.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(e.Button,{type:`button`,size:`sm`,onClick:()=>s({textareaValue:`Customer prefers weekly status updates and a shorter approval cycle.`}),children:`Fill sample`}),(0,i.jsx)(e.Button,{type:`button`,size:`sm`,variant:`secondary`,onClick:()=>s({textareaValue:``}),children:`Clear`})]})]})}),(0,i.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Pre-filled draft`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.Textarea,{defaultValue:r.textareaDemoFields[1].defaultValue,rows:r.textareaDemoFields[1].rows,className:`${r.textareaDemoFields[1].minHeight} resize-none
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/button/index.cjs"),t=require("../../../components/ui/textarea/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("./data.cjs");let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({state:o,setState:s}){return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start 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:`Long-form entry`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Textarea should feel calm and readable`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use it for notes, summaries, and message bodies. The preview should focus on readability, resize behavior, and passive states instead of raw field duplication.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Editable`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Read-only`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Resizable`})]})]}),(0,i.jsxs)(`div`,{className:`mt-6 grid gap-4 xl:grid-cols-[1.12fr_0.88fr]`,children:[(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Internal note`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.Textarea,{value:o.textareaValue,onChange:e=>s({textareaValue:e.target.value}),rows:r.textareaDemoFields[0].rows,className:`${r.textareaDemoFields[0].minHeight} resize-y`,placeholder:r.textareaDemoFields[0].placeholder,helperText:`Visible helper copy keeps instructions outside the placeholder.`,maxLength:240,showCharacterCount:!0})})]}),(0,i.jsxs)(`div`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Current length`}),(0,i.jsxs)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:[o.textareaValue.length,` chars`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Long text surfaces should stay readable before they become decorative. Keep line-height, contrast, and padding stable as content grows.`})]})]})]}),(0,i.jsx)(`section`,{className:a,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Live state`}),(0,i.jsxs)(`h4`,{className:`mt-2 text-lg font-semibold aui-text-strong`,children:[`Draft length: `,o.textareaValue.length,` characters`]}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Fill or clear the note to verify controlled textarea behavior and visual density.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(e.Button,{type:`button`,size:`sm`,onClick:()=>s({textareaValue:`Customer prefers weekly status updates and a shorter approval cycle.`}),children:`Fill sample`}),(0,i.jsx)(e.Button,{type:`button`,size:`sm`,variant:`secondary`,onClick:()=>s({textareaValue:``}),children:`Clear`})]})]})}),(0,i.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Pre-filled draft`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.Textarea,{defaultValue:r.textareaDemoFields[1].defaultValue,rows:r.textareaDemoFields[1].rows,className:`${r.textareaDemoFields[1].minHeight} resize-none`,helperText:`Uncontrolled draft with stable helper spacing.`})})]}),(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Read-only copy`}),(0,i.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[(0,i.jsx)(t.Textarea,{value:r.textareaDemoFields[2].defaultValue,readOnly:r.textareaDemoFields[2].readOnly,rows:r.textareaDemoFields[2].rows,className:`${r.textareaDemoFields[2].minHeight} resize-none opacity-70`,errorText:o.textareaValue.trim().length>0&&o.textareaValue.trim().length<10?`Draft needs at least 10 characters.`:void 0}),(0,i.jsx)(`p`,{className:`text-sm leading-6 aui-text-muted`,children:`Read-only textareas should still be easy to scan and copy without looking like disabled, broken, or low-priority content.`})]})]})]})]})}exports.TextareaShowcase=o;
|