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,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { Button, MetricGrid } from "@/index"
|
|
3
|
+
import { BarChart, Button, ChartFrame, ChartLegend, DonutChart, MetricGrid } from "@/index"
|
|
4
4
|
|
|
5
5
|
import type { ComponentDemoProps } from "../types"
|
|
6
6
|
|
|
7
7
|
const items = [
|
|
8
|
-
{ key: "users", label: "Users", value: "2,410", description: "Last 30 days", tone: "success" as const },
|
|
9
|
-
{ key: "revenue", label: "Revenue", value: "$132k", description: "Compared with last month", tone: "info" as const },
|
|
8
|
+
{ key: "users", label: "Users", value: "2,410", description: "Last 30 days", tone: "success" as const, trend: "+12%" },
|
|
9
|
+
{ key: "revenue", label: "Revenue", value: "$132k", description: "Compared with last month", tone: "info" as const, trend: "+8.4%" },
|
|
10
10
|
{ key: "errors", label: "Errors", value: "3", description: "Immediate follow up", tone: "danger" as const },
|
|
11
11
|
{ key: "churn", label: "Churn", value: "1.8%", description: "Within target", tone: "warning" as const },
|
|
12
12
|
]
|
|
@@ -33,6 +33,38 @@ export function MetricGridShowcase({ mode }: ComponentDemoProps) {
|
|
|
33
33
|
) : null}
|
|
34
34
|
|
|
35
35
|
<MetricGrid items={items} columns={columnCount} compact={compact} />
|
|
36
|
+
<div className="grid gap-4 xl:grid-cols-2">
|
|
37
|
+
<ChartFrame title="Category performance" description="Bar chart shares the same token palette.">
|
|
38
|
+
<BarChart
|
|
39
|
+
data={[
|
|
40
|
+
{ label: "CRM", value: 42 },
|
|
41
|
+
{ label: "Finance", value: 31 },
|
|
42
|
+
{ label: "Auth", value: -8 },
|
|
43
|
+
{ label: "Forms", value: 26 },
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
</ChartFrame>
|
|
47
|
+
<ChartFrame title="Traffic split" description="Donut, legend and KPI blocks stay visually aligned.">
|
|
48
|
+
<div className="grid justify-items-center gap-4">
|
|
49
|
+
<DonutChart
|
|
50
|
+
centerValue="68%"
|
|
51
|
+
centerLabel="Usage"
|
|
52
|
+
data={[
|
|
53
|
+
{ label: "Dashboard", value: 42 },
|
|
54
|
+
{ label: "Forms", value: 18 },
|
|
55
|
+
{ label: "Reports", value: 8 },
|
|
56
|
+
]}
|
|
57
|
+
/>
|
|
58
|
+
<ChartLegend
|
|
59
|
+
data={[
|
|
60
|
+
{ label: "Dashboard", value: 42 },
|
|
61
|
+
{ label: "Forms", value: 18 },
|
|
62
|
+
{ label: "Reports", value: 8 },
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</ChartFrame>
|
|
67
|
+
</div>
|
|
36
68
|
</div>
|
|
37
69
|
)
|
|
38
|
-
}
|
|
70
|
+
}
|
|
@@ -8,9 +8,9 @@ const panelClass =
|
|
|
8
8
|
"rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5"
|
|
9
9
|
|
|
10
10
|
const seedItems = [
|
|
11
|
-
{ id: "1", title: "Invoice paid", description: "Acme Growth settled invoice #2048.", time: "2m ago", read: false },
|
|
12
|
-
{ id: "2", title: "Deployment ready", description: "Release candidate passed checks and waits for promotion.", time: "12m ago", read: false },
|
|
13
|
-
{ id: "3", title: "Member invited", description: "Operations workspace access was sent to Dilshod.", time: "1h ago", read: true },
|
|
11
|
+
{ id: "1", title: "Invoice paid", description: "Acme Growth settled invoice #2048.", time: "2m ago", read: false, group: "Today" },
|
|
12
|
+
{ id: "2", title: "Deployment ready", description: "Release candidate passed checks and waits for promotion.", time: "12m ago", read: false, group: "Today" },
|
|
13
|
+
{ id: "3", title: "Member invited", description: "Operations workspace access was sent to Dilshod.", time: "1h ago", read: true, group: "Earlier" },
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
export function NotificationCenterShowcase({ mode }: ComponentDemoProps) {
|
|
@@ -44,6 +44,7 @@ export function NotificationCenterShowcase({ mode }: ComponentDemoProps) {
|
|
|
44
44
|
<NotificationCenter
|
|
45
45
|
notifications={items}
|
|
46
46
|
onMarkAllRead={() => setItems((current) => current.map((item) => ({ ...item, read: true })))}
|
|
47
|
+
onClearAll={() => setItems([])}
|
|
47
48
|
onNotificationClick={(notification) =>
|
|
48
49
|
setItems((current) => current.map((item) => (item.id === notification.id ? { ...item, read: true } : item)))
|
|
49
50
|
}
|
|
@@ -11,6 +11,7 @@ export function PaginationShowcase({ mode }: ComponentDemoProps) {
|
|
|
11
11
|
const [page, setPage] = React.useState(6)
|
|
12
12
|
const [pageCount, setPageCount] = React.useState(18)
|
|
13
13
|
const [showEdges, setShowEdges] = React.useState(true)
|
|
14
|
+
const [pageSize, setPageSize] = React.useState(20)
|
|
14
15
|
|
|
15
16
|
return (
|
|
16
17
|
<div className="space-y-5">
|
|
@@ -36,7 +37,17 @@ export function PaginationShowcase({ mode }: ComponentDemoProps) {
|
|
|
36
37
|
<p className="text-sm font-medium aui-text-muted">Review queue pages</p>
|
|
37
38
|
<p className="mt-2 text-sm leading-6 aui-text-muted">Showing page <span className="font-medium aui-text-strong">{page}</span> of <span className="font-medium aui-text-strong">{pageCount}</span>.</p>
|
|
38
39
|
</div>
|
|
39
|
-
<Pagination
|
|
40
|
+
<Pagination
|
|
41
|
+
page={page}
|
|
42
|
+
pageCount={pageCount}
|
|
43
|
+
onPageChange={setPage}
|
|
44
|
+
showEdges={showEdges}
|
|
45
|
+
totalCount={pageCount * pageSize}
|
|
46
|
+
pageSize={pageSize}
|
|
47
|
+
pageSizeOptions={[10, 20, 50]}
|
|
48
|
+
onPageSizeChange={setPageSize}
|
|
49
|
+
showSummary
|
|
50
|
+
/>
|
|
40
51
|
</div>
|
|
41
52
|
</section>
|
|
42
53
|
|
|
@@ -53,6 +64,7 @@ export function PaginationShowcase({ mode }: ComponentDemoProps) {
|
|
|
53
64
|
<div className="mt-4 space-y-2 text-sm leading-6 aui-text-muted">
|
|
54
65
|
<p>Page: <span className="font-medium aui-text-strong">{page}</span></p>
|
|
55
66
|
<p>Total pages: <span className="font-medium aui-text-strong">{pageCount}</span></p>
|
|
67
|
+
<p>Page size: <span className="font-medium aui-text-strong">{pageSize}</span></p>
|
|
56
68
|
<p>Edges: <span className="font-medium aui-text-strong">{showEdges ? "visible" : "hidden"}</span></p>
|
|
57
69
|
</div>
|
|
58
70
|
</section>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "@/index"
|
|
1
|
+
import { Button, Input, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "@/index"
|
|
2
2
|
|
|
3
3
|
import { popoverDemoItems } from "./data"
|
|
4
4
|
|
|
@@ -57,16 +57,32 @@ export function PopoverShowcase() {
|
|
|
57
57
|
</section>
|
|
58
58
|
|
|
59
59
|
<section className={panelClass}>
|
|
60
|
-
<div className="
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
<div className="grid gap-5 xl:grid-cols-[0.85fr_1.15fr]">
|
|
61
|
+
<div>
|
|
62
|
+
<p className="text-lg font-semibold aui-text-strong">Inline settings form</p>
|
|
63
|
+
<p className="mt-2 max-w-xl text-sm leading-6 aui-text-muted">
|
|
64
|
+
Short forms fit when they change a local view and can be dismissed without losing page context.
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
<div className="flex justify-start xl:justify-end">
|
|
68
|
+
<Popover>
|
|
69
|
+
<PopoverTrigger render={<Button variant="outline" />}>Edit workspace</PopoverTrigger>
|
|
70
|
+
<PopoverContent align="end" collisionPadding={16}>
|
|
71
|
+
<PopoverHeader>
|
|
72
|
+
<PopoverTitle>Workspace details</PopoverTitle>
|
|
73
|
+
<PopoverDescription>Update the label used in local navigation.</PopoverDescription>
|
|
74
|
+
</PopoverHeader>
|
|
75
|
+
<div className="grid gap-3">
|
|
76
|
+
<Input aria-label="Workspace name" defaultValue="Growth analytics" />
|
|
77
|
+
<Input aria-label="Workspace slug" defaultValue="growth" />
|
|
78
|
+
</div>
|
|
79
|
+
<div className="flex justify-end gap-2">
|
|
80
|
+
<Button type="button" variant="secondary" size="sm">Cancel</Button>
|
|
81
|
+
<Button type="button" size="sm">Save</Button>
|
|
82
|
+
</div>
|
|
83
|
+
</PopoverContent>
|
|
84
|
+
</Popover>
|
|
85
|
+
</div>
|
|
70
86
|
</div>
|
|
71
87
|
</section>
|
|
72
88
|
</div>
|
|
@@ -8,7 +8,7 @@ const panelClass =
|
|
|
8
8
|
const planOptions = [
|
|
9
9
|
{ value: "starter", label: "Starter", description: "Good for single workspace setup." },
|
|
10
10
|
{ value: "growth", label: "Growth", description: "Adds more seats and team workflows." },
|
|
11
|
-
{ value: "enterprise", label: "Enterprise", description: "Advanced controls and support." },
|
|
11
|
+
{ value: "enterprise", label: "Enterprise", description: "Advanced controls and support.", disabled: true },
|
|
12
12
|
] as const
|
|
13
13
|
|
|
14
14
|
export function RadioGroupShowcase() {
|
|
@@ -61,6 +61,18 @@ export function RadioGroupShowcase() {
|
|
|
61
61
|
))}
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
|
+
<div className="mt-5">
|
|
65
|
+
<RadioGroup
|
|
66
|
+
invalid
|
|
67
|
+
defaultValue="card"
|
|
68
|
+
orientation="horizontal"
|
|
69
|
+
options={[
|
|
70
|
+
{ value: "card", label: "Card" },
|
|
71
|
+
{ value: "bank", label: "Bank" },
|
|
72
|
+
{ value: "invoice", label: "Invoice", disabled: true },
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
64
76
|
</section>
|
|
65
77
|
</div>
|
|
66
78
|
)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
+
import { ArchiveIcon, CopyIcon, PencilIcon, Trash2Icon } from "lucide-react"
|
|
4
|
+
|
|
3
5
|
import { Badge, Button, RightClickMenu } from "@/index"
|
|
4
6
|
|
|
5
7
|
const panelClass =
|
|
@@ -32,13 +34,14 @@ export function RightClickMenuShowcase() {
|
|
|
32
34
|
<div className="mt-3">
|
|
33
35
|
<RightClickMenu
|
|
34
36
|
items={[
|
|
35
|
-
{ label: "Rename", onSelect: () => setLastAction("Rename") },
|
|
36
|
-
{ label: "Duplicate", onSelect: () => setLastAction("Duplicate") },
|
|
37
|
-
{ label: "Archive", onSelect: () => setLastAction("Archive") },
|
|
37
|
+
{ label: "Rename", icon: <PencilIcon />, shortcut: "R", onSelect: () => setLastAction("Rename") },
|
|
38
|
+
{ label: "Duplicate", icon: <CopyIcon />, shortcut: "D", onSelect: () => setLastAction("Duplicate") },
|
|
39
|
+
{ label: "Archive", icon: <ArchiveIcon />, onSelect: () => setLastAction("Archive") },
|
|
40
|
+
{ label: "Remove", icon: <Trash2Icon />, variant: "destructive", onSelect: () => setLastAction("Remove") },
|
|
38
41
|
]}
|
|
39
42
|
>
|
|
40
|
-
<div className="rounded-[20px] border border-dashed border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-4 py-12 text-center text-sm aui-text-muted">
|
|
41
|
-
Right click
|
|
43
|
+
<div className="rounded-[20px] border border-dashed border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-4 py-12 text-center text-sm aui-text-muted" tabIndex={0}>
|
|
44
|
+
Right click, use Shift+F10, or press the context-menu key in this area
|
|
42
45
|
</div>
|
|
43
46
|
</RightClickMenu>
|
|
44
47
|
</div>
|
|
@@ -5,8 +5,8 @@ export const selectDemoGroups: SelectDemoGroup[] = [
|
|
|
5
5
|
title: "Plan picker",
|
|
6
6
|
options: [
|
|
7
7
|
{ value: "starter", label: "Starter" },
|
|
8
|
-
{ value: "growth", label: "Growth" },
|
|
9
|
-
{ value: "enterprise", label: "Enterprise" },
|
|
8
|
+
{ value: "growth", label: "Growth", description: "25 seats and shared support" },
|
|
9
|
+
{ value: "enterprise", label: "Enterprise", description: "Unlimited seats and priority support" },
|
|
10
10
|
],
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -18,4 +18,13 @@ export const selectDemoGroups: SelectDemoGroup[] = [
|
|
|
18
18
|
{ value: "draft", label: "Draft" },
|
|
19
19
|
],
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
title: "Grouped workspace routing",
|
|
23
|
+
options: [
|
|
24
|
+
{ value: "north", label: "North Region", description: "Sales operations", keywords: ["sales"] },
|
|
25
|
+
{ value: "south", label: "South Region", description: "Support queue", keywords: ["support"] },
|
|
26
|
+
{ value: "billing", label: "Billing Desk", description: "Finance team", keywords: ["finance"] },
|
|
27
|
+
{ value: "archive", label: "Archive", description: "Read-only records", disabled: true, keywords: ["disabled"] },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentDemoMock } from "../types"
|
|
2
2
|
|
|
3
3
|
export const selectMock: ComponentDemoMock = {
|
|
4
|
-
code: `import { Select } from "tembro"\n\nconst
|
|
5
|
-
cliCommand: "npx tembro add select",
|
|
6
|
-
highlights: ["Primary selection surface", "Controlled selection", "Searchable local flow", "Compact trigger options"],
|
|
4
|
+
code: `import { Select } from "tembro"\n\nconst planGroups = [\n {\n label: "Plans",\n options: [\n { value: "starter", label: "Starter" },\n { value: "growth", label: "Growth", description: "25 seats" },\n { value: "enterprise", label: "Enterprise", description: "Priority support" },\n ],\n },\n]\n\nexport function Example() {\n return (\n <Select\n defaultValue="starter"\n groups={planGroups}\n searchable\n clearable\n emptyMessage="No plan matched"\n />\n )\n}`,
|
|
5
|
+
cliCommand: "npx tembro add select",
|
|
6
|
+
highlights: ["Primary selection surface", "Controlled selection", "Searchable local flow", "Grouped option support", "Compact trigger options"],
|
|
7
7
|
relatedBlockSlugs: ["crm-dashboard", "users-table", "dashboard-starter"],
|
|
8
8
|
scenarios: [
|
|
9
9
|
{ title: "Plan picker", description: "Switch between starter, growth and enterprise plans." },
|
|
@@ -13,7 +13,7 @@ export const selectMock: ComponentDemoMock = {
|
|
|
13
13
|
],
|
|
14
14
|
capabilityNotes: [
|
|
15
15
|
"Start here for most static single-choice flows before reaching for helper members.",
|
|
16
|
-
"Supports controlled and uncontrolled selected values
|
|
16
|
+
"Supports controlled and uncontrolled selected values, grouped options, clearable state, and searchable local filtering.",
|
|
17
17
|
"Includes trigger sizing for compact or default density layouts.",
|
|
18
18
|
"AsyncSelect, AsyncMultiSelect, SimpleSelect, and Combobox should read as related members rather than separate starting points.",
|
|
19
19
|
],
|
|
@@ -13,10 +13,12 @@ type SelectMode = "plan" | "density"
|
|
|
13
13
|
export function SelectShowcase({ state, setState }: ComponentDemoProps) {
|
|
14
14
|
const planOptions = selectDemoGroups[0].options
|
|
15
15
|
const compactOptions = selectDemoGroups[1].options
|
|
16
|
+
const groupedOptions = selectDemoGroups[2].options
|
|
16
17
|
const selectedValue = state.selectValue ?? planOptions[0].value
|
|
17
18
|
const selectedPlan = planOptions.find((option) => option.value === selectedValue) ?? planOptions[0]
|
|
18
19
|
const highlightedPlan = planOptions[1] ?? planOptions[0]
|
|
19
20
|
const [surface, setSurface] = React.useState<SelectMode>("plan")
|
|
21
|
+
const [workspace, setWorkspace] = React.useState("north")
|
|
20
22
|
|
|
21
23
|
const summaryRows =
|
|
22
24
|
selectedPlan.value === "enterprise"
|
|
@@ -55,7 +57,7 @@ export function SelectShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
55
57
|
<Button size="sm" variant={surface === "plan" ? "default" : "outline"} onClick={() => setSurface("plan")}>
|
|
56
58
|
Default trigger
|
|
57
59
|
</Button>
|
|
58
|
-
|
|
60
|
+
<Button size="sm" variant={surface === "density" ? "default" : "outline"} onClick={() => setSurface("density")}>
|
|
59
61
|
Compact trigger
|
|
60
62
|
</Button>
|
|
61
63
|
</div>
|
|
@@ -92,6 +94,25 @@ export function SelectShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
92
94
|
</div>
|
|
93
95
|
</div>
|
|
94
96
|
|
|
97
|
+
<div className="rounded-[20px] border border-[color:var(--aui-divider)] p-4">
|
|
98
|
+
<p className="text-sm font-medium aui-text-muted">Grouped searchable select</p>
|
|
99
|
+
<div className="mt-3">
|
|
100
|
+
<Select
|
|
101
|
+
value={workspace}
|
|
102
|
+
onValueChange={(value) => setWorkspace(value ?? "north")}
|
|
103
|
+
searchable
|
|
104
|
+
clearable
|
|
105
|
+
placeholder="Choose workspace"
|
|
106
|
+
emptyMessage="No workspace matched"
|
|
107
|
+
groups={[
|
|
108
|
+
{ label: "Regions", options: groupedOptions.slice(0, 2) },
|
|
109
|
+
{ label: "Operations", options: groupedOptions.slice(2) },
|
|
110
|
+
]}
|
|
111
|
+
triggerClassName="w-full"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
95
116
|
<div className="grid gap-3 sm:grid-cols-3">
|
|
96
117
|
{summaryRows.map(([label, value]) => (
|
|
97
118
|
<div key={label} className="rounded-[18px] border border-[color:var(--aui-divider)] px-4 py-3">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Badge, Statistic, StatisticCard, StatisticGrid } from "@/index"
|
|
1
|
+
import { Badge, ProgressRing, Statistic, StatisticCard, StatisticGrid, TrendCard } from "@/index"
|
|
2
2
|
|
|
3
3
|
const panelClass = "border-t border-[color:var(--aui-divider)] py-6"
|
|
4
4
|
|
|
@@ -43,6 +43,15 @@ export function StatisticShowcase() {
|
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</section>
|
|
46
|
+
|
|
47
|
+
<section className={panelClass}>
|
|
48
|
+
<div className="grid gap-6 xl:grid-cols-[1fr_240px]">
|
|
49
|
+
<TrendCard title="Release velocity" value="24" change="+3" trend="up" description="completed this sprint" sparkline={[8, 10, 9, 14, 18, 19, 24]} />
|
|
50
|
+
<div className="rounded-xl border border-[color:var(--aui-divider)] p-4">
|
|
51
|
+
<ProgressRing value={76} label="76%" description="coverage" tone="success" />
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</section>
|
|
46
55
|
</div>
|
|
47
56
|
)
|
|
48
57
|
}
|
|
@@ -29,12 +29,17 @@ export function SwitchShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
29
29
|
|
|
30
30
|
<div className="mt-6 grid gap-3">
|
|
31
31
|
{switchDemoRows.map((row, index) => (
|
|
32
|
-
<div key={row.title} className={
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
<div key={row.title} className={panelClass}>
|
|
33
|
+
<Switch
|
|
34
|
+
label={row.title}
|
|
35
|
+
description={row.description}
|
|
36
|
+
checked={index === 0 ? state.switchOn : row.defaultChecked}
|
|
37
|
+
onCheckedChange={index === 0 ? (switchOn) => setState({ switchOn }) : undefined}
|
|
38
|
+
defaultChecked={index > 0 ? row.defaultChecked : undefined}
|
|
39
|
+
size={index === 0 ? "lg" : "md"}
|
|
40
|
+
labelPlacement="start"
|
|
41
|
+
className="w-full justify-between"
|
|
42
|
+
/>
|
|
38
43
|
</div>
|
|
39
44
|
))}
|
|
40
45
|
</div>
|
|
@@ -60,6 +65,10 @@ export function SwitchShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
60
65
|
</Button>
|
|
61
66
|
</div>
|
|
62
67
|
</div>
|
|
68
|
+
<div className="mt-5 grid gap-3 sm:grid-cols-2">
|
|
69
|
+
<Switch label="Sync in progress" description="Loading disables the control until the request finishes." loading defaultChecked />
|
|
70
|
+
<Switch label="Invalid setting" description="Error state keeps the same field layout." invalid />
|
|
71
|
+
</div>
|
|
63
72
|
</section>
|
|
64
73
|
</div>
|
|
65
74
|
)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ActivityIcon, BellIcon, FileTextIcon, SettingsIcon, ShieldIcon, UsersIcon } from "lucide-react"
|
|
2
|
+
|
|
1
3
|
import { Button, Tabs, TabsContent, TabsList, TabsTrigger } from "@/index"
|
|
2
4
|
|
|
3
5
|
import type { ComponentDemoProps } from "../types"
|
|
@@ -38,7 +40,7 @@ export function TabsShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
38
40
|
|
|
39
41
|
<div className={panelClass}>
|
|
40
42
|
<Tabs value={state.activeTab} onValueChange={(value: string) => setState({ activeTab: value as ComponentDemoProps["state"]["activeTab"] })}>
|
|
41
|
-
<TabsList>
|
|
43
|
+
<TabsList overflow="scroll">
|
|
42
44
|
{tabsDemoPanels.map((panel) => (
|
|
43
45
|
<TabsTrigger key={panel.value} value={panel.value}>{panel.label}</TabsTrigger>
|
|
44
46
|
))}
|
|
@@ -51,6 +53,51 @@ export function TabsShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
51
53
|
</Tabs>
|
|
52
54
|
</div>
|
|
53
55
|
|
|
56
|
+
<section className={panelClass}>
|
|
57
|
+
<div className="grid gap-6 xl:grid-cols-[0.9fr_1.1fr]">
|
|
58
|
+
<div>
|
|
59
|
+
<p className="text-lg font-semibold aui-text-strong">Variants and overflow</p>
|
|
60
|
+
<p className="mt-2 max-w-xl text-sm leading-6 aui-text-muted">
|
|
61
|
+
The same primitive covers underline navigation, compact density, icon labels, and long mobile tab rows.
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="grid gap-4">
|
|
65
|
+
<Tabs defaultValue="activity">
|
|
66
|
+
<TabsList variant="underline" overflow="scroll">
|
|
67
|
+
<TabsTrigger variant="underline" value="activity"><ActivityIcon />Activity</TabsTrigger>
|
|
68
|
+
<TabsTrigger variant="underline" value="files"><FileTextIcon />Files</TabsTrigger>
|
|
69
|
+
<TabsTrigger variant="underline" value="members"><UsersIcon />Members</TabsTrigger>
|
|
70
|
+
<TabsTrigger variant="underline" value="security"><ShieldIcon />Security</TabsTrigger>
|
|
71
|
+
<TabsTrigger variant="underline" value="settings"><SettingsIcon />Settings</TabsTrigger>
|
|
72
|
+
</TabsList>
|
|
73
|
+
</Tabs>
|
|
74
|
+
<Tabs defaultValue="compact">
|
|
75
|
+
<TabsList variant="compact" overflow="wrap">
|
|
76
|
+
<TabsTrigger variant="compact" value="compact">Compact</TabsTrigger>
|
|
77
|
+
<TabsTrigger variant="compact" value="alerts"><BellIcon />Alerts</TabsTrigger>
|
|
78
|
+
<TabsTrigger variant="compact" value="audit">Audit</TabsTrigger>
|
|
79
|
+
</TabsList>
|
|
80
|
+
</Tabs>
|
|
81
|
+
<Tabs defaultValue="vertical" orientation="vertical" className="grid gap-3 sm:grid-cols-[180px_1fr]">
|
|
82
|
+
<TabsList variant="pills" overflow="wrap" className="grid">
|
|
83
|
+
<TabsTrigger variant="pills" value="vertical">Vertical</TabsTrigger>
|
|
84
|
+
<TabsTrigger variant="pills" value="pills">Pills</TabsTrigger>
|
|
85
|
+
<TabsTrigger variant="pills" value="overflow">Overflow</TabsTrigger>
|
|
86
|
+
</TabsList>
|
|
87
|
+
<TabsContent value="vertical" className="mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted">
|
|
88
|
+
Vertical tabs keep local settings readable when each panel has a larger form.
|
|
89
|
+
</TabsContent>
|
|
90
|
+
<TabsContent value="pills" className="mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted">
|
|
91
|
+
Pill tabs carry a stronger selected state for dense dashboards.
|
|
92
|
+
</TabsContent>
|
|
93
|
+
<TabsContent value="overflow" className="mt-0 rounded-xl border border-[color:var(--aui-divider)] p-4 text-sm leading-6 aui-text-muted">
|
|
94
|
+
Scroll overflow keeps long labels accessible on small screens.
|
|
95
|
+
</TabsContent>
|
|
96
|
+
</Tabs>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</section>
|
|
100
|
+
|
|
54
101
|
<section className={panelClass}>
|
|
55
102
|
<div className="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between">
|
|
56
103
|
<div>
|
|
@@ -2,7 +2,7 @@ import type { ComponentDemoMock } from "../types"
|
|
|
2
2
|
|
|
3
3
|
export const textareaMock: ComponentDemoMock = {
|
|
4
4
|
code: `import { FormEvent, useState } from "react"
|
|
5
|
-
import { Textarea } from "
|
|
5
|
+
import { Textarea } from "tembro"
|
|
6
6
|
|
|
7
7
|
export function Example() {
|
|
8
8
|
const [note, setNote] = useState("")
|
|
@@ -15,11 +15,19 @@ export function Example() {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<form onSubmit={submit} className="space-y-3">
|
|
18
|
-
<Textarea
|
|
19
|
-
|
|
18
|
+
<Textarea
|
|
19
|
+
rows={6}
|
|
20
|
+
value={note}
|
|
21
|
+
onValueChange={setNote}
|
|
22
|
+
placeholder="Write your message..."
|
|
23
|
+
helperText="Keep instructions visible below the field."
|
|
24
|
+
errorText={error ? "Please enter at least 10 characters." : undefined}
|
|
25
|
+
maxLength={240}
|
|
26
|
+
showCharacterCount
|
|
27
|
+
/>
|
|
28
|
+
<Textarea rows={4} defaultValue="Internal changelog draft..." helperText="Draft copy" />
|
|
20
29
|
<Textarea readOnly value="Locked review comment" rows={3} />
|
|
21
30
|
<button type="submit">Submit</button>
|
|
22
|
-
{error ? <p className="text-sm text-red-600">Please enter at least 10 characters.</p> : null}
|
|
23
31
|
</form>
|
|
24
32
|
)
|
|
25
33
|
}`,
|
|
@@ -39,6 +39,9 @@ export function TextareaShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
39
39
|
rows={textareaDemoFields[0].rows}
|
|
40
40
|
className={`${textareaDemoFields[0].minHeight} resize-y`}
|
|
41
41
|
placeholder={textareaDemoFields[0].placeholder}
|
|
42
|
+
helperText="Visible helper copy keeps instructions outside the placeholder."
|
|
43
|
+
maxLength={240}
|
|
44
|
+
showCharacterCount
|
|
42
45
|
/>
|
|
43
46
|
</div>
|
|
44
47
|
</div>
|
|
@@ -83,6 +86,7 @@ export function TextareaShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
83
86
|
defaultValue={textareaDemoFields[1].defaultValue}
|
|
84
87
|
rows={textareaDemoFields[1].rows}
|
|
85
88
|
className={`${textareaDemoFields[1].minHeight} resize-none`}
|
|
89
|
+
helperText="Uncontrolled draft with stable helper spacing."
|
|
86
90
|
/>
|
|
87
91
|
</div>
|
|
88
92
|
</section>
|
|
@@ -95,6 +99,7 @@ export function TextareaShowcase({ state, setState }: ComponentDemoProps) {
|
|
|
95
99
|
readOnly={textareaDemoFields[2].readOnly}
|
|
96
100
|
rows={textareaDemoFields[2].rows}
|
|
97
101
|
className={`${textareaDemoFields[2].minHeight} resize-none opacity-70`}
|
|
102
|
+
errorText={state.textareaValue.trim().length > 0 && state.textareaValue.trim().length < 10 ? "Draft needs at least 10 characters." : undefined}
|
|
98
103
|
/>
|
|
99
104
|
<p className="text-sm leading-6 aui-text-muted">
|
|
100
105
|
Read-only textareas should still be easy to scan and copy without looking like disabled, broken, or low-priority content.
|
|
@@ -9,7 +9,7 @@ const panelClass =
|
|
|
9
9
|
|
|
10
10
|
function ToastPlayground({ mode }: { mode: ComponentDemoProps["mode"] }) {
|
|
11
11
|
const [seed, setSeed] = React.useState(0)
|
|
12
|
-
const { addToast, success, warning, error, clearToasts, toasts, dismissToast } = useToast()
|
|
12
|
+
const { addToast, success, warning, error, promise, clearToasts, toasts, dismissToast } = useToast()
|
|
13
13
|
|
|
14
14
|
const addSimple = () => {
|
|
15
15
|
setSeed((value) => value + 1)
|
|
@@ -39,6 +39,19 @@ function ToastPlayground({ mode }: { mode: ComponentDemoProps["mode"] }) {
|
|
|
39
39
|
error({ title: "Request failed", description: `Failure occurred while saving item #${seed + 1}` })
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
const runPromiseToast = () => {
|
|
43
|
+
void promise(
|
|
44
|
+
new Promise<string>((resolve) => {
|
|
45
|
+
window.setTimeout(() => resolve("Export ready"), 1200)
|
|
46
|
+
}),
|
|
47
|
+
{
|
|
48
|
+
loading: { title: "Preparing export", description: "Building CSV package.", group: "Export" },
|
|
49
|
+
success: (message) => ({ title: message, description: "Download can start now.", group: "Export" }),
|
|
50
|
+
error: () => ({ title: "Export failed", description: "Retry after refreshing.", group: "Export" }),
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
return (
|
|
43
56
|
<div className="space-y-5">
|
|
44
57
|
<section className="rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6">
|
|
@@ -70,6 +83,9 @@ function ToastPlayground({ mode }: { mode: ComponentDemoProps["mode"] }) {
|
|
|
70
83
|
<Button size="sm" variant="outline" onClick={addError}>
|
|
71
84
|
Error
|
|
72
85
|
</Button>
|
|
86
|
+
<Button size="sm" variant="outline" onClick={runPromiseToast}>
|
|
87
|
+
Promise
|
|
88
|
+
</Button>
|
|
73
89
|
<Button size="sm" variant="outline" onClick={clearToasts}>
|
|
74
90
|
Clear all
|
|
75
91
|
</Button>
|
|
@@ -6,7 +6,7 @@ export type ComponentDemoState = {
|
|
|
6
6
|
checked: boolean
|
|
7
7
|
switchOn: boolean
|
|
8
8
|
selectValue: string
|
|
9
|
-
badgeVariant: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link"
|
|
9
|
+
badgeVariant: "default" | "secondary" | "soft" | "destructive" | "outline" | "ghost" | "link"
|
|
10
10
|
cardCompact: boolean
|
|
11
11
|
activeTab: "overview" | "activity" | "settings"
|
|
12
12
|
}
|
|
@@ -50,8 +50,9 @@ export const registryQualityDemoRegistry = createShowcaseDemoRegistry([
|
|
|
50
50
|
component("quick-action-grid", "QuickActionGrid", "actions", "Action launcher grid for dense dashboard shortcuts."),
|
|
51
51
|
component("filter-bar", "FilterBar", "actions", "Search, filters, active-count and reset actions in one toolbar."),
|
|
52
52
|
|
|
53
|
-
component("app-header", "AppHeader", "layout", "Sticky product header with left, center and right slots."),
|
|
54
|
-
component("
|
|
53
|
+
component("app-header", "AppHeader", "layout", "Sticky product header with left, center and right slots."),
|
|
54
|
+
component("app-shell", "AppShell", "layout", "Responsive application shell with sidebar, header and content regions."),
|
|
55
|
+
component("section-header", "SectionHeader", "layout", "Reusable section title block with actions and metadata."),
|
|
55
56
|
component("stat-card", "StatCard", "layout", "Dashboard stat card for KPI, trend and helper text."),
|
|
56
57
|
|
|
57
58
|
component("alert", "Alert", "feedback", "Inline feedback banner for success, warning, info, and error states."),
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
ActionMenu,
|
|
16
16
|
Alert,
|
|
17
17
|
AlertDialog,
|
|
18
|
-
AnchorNav,
|
|
19
18
|
Badge,
|
|
20
19
|
Button,
|
|
21
20
|
ButtonGroup,
|
|
@@ -226,20 +225,6 @@ function NavigationPreview({ slug }: { slug: string }) {
|
|
|
226
225
|
return <Pagination page={3} pageCount={9} onPageChange={() => undefined} />
|
|
227
226
|
}
|
|
228
227
|
|
|
229
|
-
if (slug === "anchor-nav") {
|
|
230
|
-
return (
|
|
231
|
-
<AnchorNav
|
|
232
|
-
orientation="horizontal"
|
|
233
|
-
title="Sections"
|
|
234
|
-
items={[
|
|
235
|
-
{ key: "overview", label: "Overview", href: "#overview", active: true },
|
|
236
|
-
{ key: "usage", label: "Usage", href: "#usage" },
|
|
237
|
-
{ key: "api", label: "API", href: "#api" },
|
|
238
|
-
]}
|
|
239
|
-
/>
|
|
240
|
-
)
|
|
241
|
-
}
|
|
242
|
-
|
|
243
228
|
if (slug === "page-tabs") {
|
|
244
229
|
return (
|
|
245
230
|
<PageTabs
|