tembro 2.1.12 → 2.1.13
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/charts/charts.cjs +1 -1
- package/dist/components/charts/charts.d.ts +8 -3
- package/dist/components/charts/charts.js +79 -51
- package/dist/components/charts/horizontal-bar-chart.cjs +1 -1
- package/dist/components/charts/horizontal-bar-chart.d.ts +3 -1
- package/dist/components/charts/horizontal-bar-chart.js +12 -7
- package/dist/components/charts/index.cjs +1 -1
- package/dist/components/charts/index.js +5 -5
- package/dist/components/charts/public.cjs +1 -1
- package/dist/components/charts/public.js +2 -2
- package/dist/components/data-table/demo.cjs +1 -1
- package/dist/components/data-table/demo.d.ts +2 -6
- package/dist/components/data-table/demo.js +27 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +41 -41
- package/dist/showcase/create-demo.cjs +2 -138
- package/dist/showcase/create-demo.js +37 -52
- package/dist/showcase/demo-snippets/actions/index.cjs +64 -0
- package/dist/showcase/demo-snippets/actions/index.d.ts +1 -0
- package/dist/showcase/demo-snippets/actions/index.js +10 -0
- package/dist/showcase/demo-snippets/forms/index.cjs +26 -0
- package/dist/showcase/demo-snippets/forms/index.d.ts +1 -0
- package/dist/showcase/demo-snippets/forms/index.js +9 -0
- package/dist/showcase/demo-snippets/index.cjs +1 -0
- package/dist/showcase/demo-snippets/index.d.ts +1 -0
- package/dist/showcase/demo-snippets/index.js +13 -0
- package/dist/showcase/demo-snippets/layout/index.cjs +45 -0
- package/dist/showcase/demo-snippets/layout/index.d.ts +1 -0
- package/dist/showcase/demo-snippets/layout/index.js +9 -0
- package/dist/showcase/demo-snippets/upload/index.cjs +5 -0
- package/dist/showcase/demo-snippets/upload/index.d.ts +1 -0
- package/dist/showcase/demo-snippets/upload/index.js +4 -0
- package/dist/showcase/premium/index.cjs +1 -1
- package/dist/showcase/premium/index.js +278 -278
- package/dist/showcase/tembro-registry.json.cjs +1 -1
- package/dist/showcase/tembro-registry.json.js +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +36 -36
- package/packages/cli/vendor/src/components/charts/charts.tsx +59 -22
- package/packages/cli/vendor/src/components/charts/horizontal-bar-chart.tsx +34 -20
- package/packages/cli/vendor/src/components/data-table/demo.tsx +31 -2
- package/packages/cli/vendor/src/showcase/create-demo.tsx +8 -160
- package/packages/cli/vendor/src/showcase/demo-snippets/actions/index.ts +70 -0
- package/packages/cli/vendor/src/showcase/demo-snippets/forms/index.ts +31 -0
- package/packages/cli/vendor/src/showcase/demo-snippets/index.ts +11 -0
- package/packages/cli/vendor/src/showcase/demo-snippets/layout/index.ts +50 -0
- package/packages/cli/vendor/src/showcase/demo-snippets/upload/index.ts +7 -0
- package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
- package/registry.json +1 -1
package/dist/index.js
CHANGED
|
@@ -90,45 +90,45 @@ import { Timeline as jn } from "./components/display/timeline.js";
|
|
|
90
90
|
import { TreeView as Mn } from "./components/display/tree-view.js";
|
|
91
91
|
import { UserCard as Nn } from "./components/display/user-card.js";
|
|
92
92
|
import { DeltaBadge as Pn } from "./components/display/delta-badge.js";
|
|
93
|
-
import {
|
|
94
|
-
import { TrendCard as
|
|
95
|
-
import { ComparisonCard as
|
|
93
|
+
import { AreaChart as Fn, BarChart as In, ChartFrame as Ln, ChartLegend as Rn, DonutChart as zn, LineChart as Bn, MetricTrend as Vn, Sparkline as Hn } from "./components/charts/charts.js";
|
|
94
|
+
import { TrendCard as Un } from "./components/display/trend-card.js";
|
|
95
|
+
import { ComparisonCard as Wn } from "./components/display/comparison-card.js";
|
|
96
96
|
import { SmartCard as $ } from "./components/display/smart-card.js";
|
|
97
|
-
import { Carousel as
|
|
98
|
-
import { QRCode as
|
|
99
|
-
import { Chip as
|
|
100
|
-
import { Blockquote as
|
|
101
|
-
import { CalendarScheduler as
|
|
102
|
-
import { DualListPicker as
|
|
103
|
-
import { Menubar as
|
|
104
|
-
import { NavigationMenu as
|
|
105
|
-
import { ResizableHandle as
|
|
106
|
-
import { RichTextEditor as
|
|
107
|
-
import { Tour as
|
|
108
|
-
import { DataTableBulkActions as
|
|
109
|
-
import { DataTableColumnVisibilityMenu as
|
|
110
|
-
import { DataTablePagination as
|
|
111
|
-
import { DataTable as
|
|
112
|
-
import { DataTableSortableHeader as
|
|
113
|
-
import { DataTableViewPresets as
|
|
114
|
-
import { ToastProvider as
|
|
115
|
-
import { NotificationCenter as
|
|
116
|
-
import { CommandPalette as
|
|
117
|
-
import { addMonths as
|
|
118
|
-
import { Calendar as
|
|
119
|
-
import { DatePicker as
|
|
120
|
-
import { DateRangePicker as
|
|
121
|
-
import { FileUpload as
|
|
122
|
-
import { ImageUpload as
|
|
123
|
-
import { FileDropzone as
|
|
124
|
-
import { KpiCard as
|
|
125
|
-
import { ProgressRing as
|
|
126
|
-
import { HorizontalBarChart as
|
|
127
|
-
import { Stepper as
|
|
128
|
-
import { Wizard as
|
|
129
|
-
import { useSessionStorageState as
|
|
130
|
-
import { useBeforeUnloadWhenDirty as
|
|
131
|
-
import { useDisclosure as
|
|
132
|
-
import { useDebouncedCallback as
|
|
133
|
-
import { useDataTableViewState as
|
|
134
|
-
export { Pe as Accordion, Fe as AccordionContent, Ie as AccordionRoot, Le as AccordionTrigger, _ as ActionMenu, ln as ActivityFeed, tn as Alert, yt as AlertDialog, ut as AnchorNav, et as AppSidebar, Lt as AsyncMultiSelect, Rt as AsyncSelect, un as Avatar, dn as AvatarGroup, z as Badge,
|
|
97
|
+
import { Carousel as Gn, CarouselItem as Kn } from "./components/display/carousel.js";
|
|
98
|
+
import { QRCode as qn, QRCodeSvg as Jn } from "./components/display/qr-code.js";
|
|
99
|
+
import { Chip as Yn, Tag as Xn, TagGroup as Zn } from "./components/display/tag.js";
|
|
100
|
+
import { Blockquote as Qn, Heading as $n, Mark as er, Spoiler as tr, SpoilerSummary as nr, Text as rr } from "./components/display/typography.js";
|
|
101
|
+
import { CalendarScheduler as ir } from "./components/modern/calendar-scheduler.js";
|
|
102
|
+
import { DualListPicker as ar } from "./components/modern/dual-list-picker.js";
|
|
103
|
+
import { Menubar as or, MenubarContent as sr, MenubarItem as cr, MenubarMenu as lr, MenubarTrigger as ur } from "./components/modern/menubar.js";
|
|
104
|
+
import { NavigationMenu as dr, NavigationMenuItem as fr, NavigationMenuLink as pr, NavigationMenuList as mr } from "./components/modern/navigation-menu.js";
|
|
105
|
+
import { ResizableHandle as hr, ResizablePanel as gr, ResizablePanelGroup as _r } from "./components/modern/resizable-panel.js";
|
|
106
|
+
import { RichTextEditor as vr } from "./components/modern/rich-text-editor.js";
|
|
107
|
+
import { Tour as yr } from "./components/modern/tour.js";
|
|
108
|
+
import { DataTableBulkActions as br } from "./components/data-table/data-table-bulk-actions.js";
|
|
109
|
+
import { DataTableColumnVisibilityMenu as xr } from "./components/data-table/data-table-column-visibility-menu.js";
|
|
110
|
+
import { DataTablePagination as Sr, getDataTablePageCount as Cr } from "./components/data-table/data-table-pagination.js";
|
|
111
|
+
import { DataTable as wr } from "./components/data-table/data-table.js";
|
|
112
|
+
import { DataTableSortableHeader as Tr } from "./components/data-table/data-table-sortable-header.js";
|
|
113
|
+
import { DataTableViewPresets as Er } from "./components/data-table/data-table-view-presets.js";
|
|
114
|
+
import { ToastProvider as Dr, useToast as Or } from "./components/notifications/toast.js";
|
|
115
|
+
import { NotificationCenter as kr } from "./components/notifications/notification-center.js";
|
|
116
|
+
import { CommandPalette as Ar, useCommandPaletteShortcut as jr } from "./components/command/command-palette.js";
|
|
117
|
+
import { addMonths as Mr, getMonthDays as Nr, getMonthLabel as Pr, getWeekdayLabels as Fr, isAfterDate as Ir, isBeforeDate as Lr, isSameMonth as Rr, isWithinRange as zr, parseDateKey as Br, startOfMonth as Vr, toDateKey as Hr } from "./components/calendar/date-utils.js";
|
|
118
|
+
import { Calendar as Ur } from "./components/calendar/calendar.js";
|
|
119
|
+
import { DatePicker as Wr } from "./components/calendar/date-picker.js";
|
|
120
|
+
import { DateRangePicker as Gr } from "./components/calendar/date-range-picker.js";
|
|
121
|
+
import { FileUpload as Kr } from "./components/upload/file-upload.js";
|
|
122
|
+
import { ImageUpload as qr } from "./components/upload/image-upload.js";
|
|
123
|
+
import { FileDropzone as Jr } from "./components/upload/file-dropzone.js";
|
|
124
|
+
import { KpiCard as Yr, KpiGrid as Xr } from "./components/charts/kpi.js";
|
|
125
|
+
import { ProgressRing as Zr } from "./components/charts/progress-ring.js";
|
|
126
|
+
import { HorizontalBarChart as Qr } from "./components/charts/horizontal-bar-chart.js";
|
|
127
|
+
import { Stepper as $r } from "./components/wizard/stepper.js";
|
|
128
|
+
import { Wizard as ei } from "./components/wizard/wizard.js";
|
|
129
|
+
import { useSessionStorageState as ti } from "./hooks/use-session-storage-state.js";
|
|
130
|
+
import { useBeforeUnloadWhenDirty as ni } from "./hooks/use-before-unload-when-dirty.js";
|
|
131
|
+
import { useDisclosure as ri } from "./hooks/use-disclosure.js";
|
|
132
|
+
import { useDebouncedCallback as ii, useDebouncedValue as ai } from "./hooks/use-debounce.js";
|
|
133
|
+
import { useDataTableViewState as oi } from "./hooks/use-data-table-view-state.js";
|
|
134
|
+
export { Pe as Accordion, Fe as AccordionContent, Ie as AccordionRoot, Le as AccordionTrigger, _ as ActionMenu, ln as ActivityFeed, tn as Alert, yt as AlertDialog, ut as AnchorNav, et as AppSidebar, Fn as AreaChart, Lt as AsyncMultiSelect, Rt as AsyncSelect, un as Avatar, dn as AvatarGroup, z as Badge, In as BarChart, Qn as Blockquote, nt as Breadcrumbs, ne as Button, v as ButtonGroup, Ur as Calendar, ir as CalendarScheduler, j as Card, M as CardAction, N as CardContent, P as CardDescription, F as CardFooter, I as CardHeader, L as CardTitle, Gn as Carousel, Kn as CarouselItem, Ln as ChartFrame, Rn as ChartLegend, k as Checkbox, Yn as Chip, mn as CodeBlock, Ae as Collapse, je as CollapseContent, Me as CollapseGroup, Ne as CollapseTrigger, gt as CommandBar, Ar as CommandPalette, Wn as ComparisonCard, Ct as ConfirmDialog, y as CopyButton, b as CopyField, Qe as DEFAULT_MOBILE_BREAKPOINT, sn as DataList, cn as DataListRow, hn as DataState, wr as DataTable, br as DataTableBulkActions, xr as DataTableColumnVisibilityMenu, Sr as DataTablePagination, Tr as DataTableSortableHeader, Er as DataTableViewPresets, Wr as DatePicker, Gr as DateRangePicker, Q as DateTimePicker, Pn as DeltaBadge, on as DescriptionList, fn as Descriptions, G as Dialog, bt as DialogActionButton, xt as DialogActions, K as DialogClose, q as DialogContent, J as DialogDescription, Y as DialogFooter, X as DialogHeader, Z as DialogOverlay, re as DialogPortal, ie as DialogTitle, ae as DialogTrigger, Ve as Divider, zn as DonutChart, wt as Drawer, Tt as DrawerCloseButton, t as DropdownMenu, n as DropdownMenuCheckboxItem, r as DropdownMenuContent, i as DropdownMenuGroup, a as DropdownMenuItem, o as DropdownMenuItemDescription, s as DropdownMenuLabel, c as DropdownMenuPortal, l as DropdownMenuRadioGroup, u as DropdownMenuRadioItem, d as DropdownMenuSeparator, f as DropdownMenuShortcut, p as DropdownMenuSub, m as DropdownMenuSubContent, h as DropdownMenuSubTrigger, g as DropdownMenuTrigger, ar as DualListPicker, Jr as FileDropzone, Kr as FileUpload, _t as FilterBar, en as FormAsyncSelect, Jt as FormFieldShell, Xt as FormInput, Zt as FormSelect, Qt as FormSwitch, $t as FormTextarea, $n as Heading, Qr as HorizontalBarChart, Ke as HoverCard, qr as ImageUpload, $ as InfoCard, Wt as InlineEditable, rn as InlineState, O as Input, S as InputGroup, C as InputGroupAddon, w as InputGroupButton, T as InputGroupInput, E as InputGroupText, D as InputGroupTextarea, Gt as JsonInput, pn as KanbanBoard, qe as Kbd, Yr as KpiCard, Xr as KpiGrid, Bn as LineChart, gn as List, _n as ListRow, Ue as LoadingOverlay, nn as LoadingState, er as Mark, or as Menubar, sr as MenubarContent, cr as MenubarItem, lr as MenubarMenu, ur as MenubarTrigger, vn as MetricGrid, Vn as MetricTrend, St as ModalShell, dt as NavTabs, dr as NavigationMenu, fr as NavigationMenuItem, pr as NavigationMenuLink, mr as NavigationMenuList, kr as NotificationCenter, zt as OtpInput, rt as PageContainer, an as PageState, ft as PageTabs, pt as Pagination, oe as Popover, se as PopoverContent, ce as PopoverDescription, le as PopoverHeader, ue as PopoverTitle, de as PopoverTrigger, yn as Progress, bn as ProgressCard, Sn as ProgressCircle, Zr as ProgressRing, Cn as PropertyGrid, qn as QRCode, Jn as QRCodeSvg, Ze as QuickActionGrid, Je as RadioGroup, Vt as RangeSlider, Bt as Rating, hr as ResizableHandle, gr as ResizablePanel, _r as ResizablePanelGroup, wn as Result, Tn as ResultAction, vr as RichTextEditor, Xe as RightClickMenu, vt as SavedFilterSelect, Ye as ScrollBox, it as Section, st as SectionHeader, He as SegmentedControl, fe as Select, pe as SelectContent, me as SelectGroup, he as SelectItem, ge as SelectLabel, _e as SelectScrollDownButton, ve as SelectScrollUpButton, ye as SelectSeparator, be as SelectTrigger, xe as SelectValue, Et as Sheet, Dt as SheetClose, Ot as SheetContent, kt as SheetDescription, At as SheetFooter, jt as SheetHeader, Mt as SheetOverlay, Nt as SheetPortal, Pt as SheetShell, Ft as SheetTitle, It as SheetTrigger, tt as Sidebar, ct as SidebarNav, Re as Skeleton, ze as SkeletonCard, Be as SkeletonText, Ht as Slider, $ as SmartCard, Hn as Sparkline, We as Spinner, at as SplitLayout, tr as Spoiler, nr as SpoilerSummary, En as Statistic, Dn as StatisticCard, On as StatisticGrid, kn as StatusDot, An as StatusLegend, $r as Stepper, ht as StepperTabs, lt as StickyFooterBar, A as Switch, Se as Table, Ce as TableBody, we as TableCaption, Te as TableCell, Ee as TableFooter, De as TableHead, Oe as TableHeader, ke as TableRow, V as Tabs, H as TabsContent, U as TabsList, W as TabsTrigger, Xn as Tag, Zn as TagGroup, Ut as TagInput, rr as Text, x as Textarea, Kt as TimePicker, qt as TimeRangePicker, jn as Timeline, Dr as ToastProvider, ot as Toolbar, Ge as Tooltip, yr as Tour, Mn as TreeView, Un as TrendCard, Nn as UserCard, ei as Wizard, Mr as addMonths, B as badgeVariants, e as buttonVariants, R as cardVariants, ee as cn, Cr as getDataTablePageCount, Nr as getMonthDays, Pr as getMonthLabel, mt as getPaginationItems, xn as getProgressPercent, Fr as getWeekdayLabels, Ir as isAfterDate, Lr as isBeforeDate, Rr as isSameMonth, zr as isWithinRange, Br as parseDateKey, Yt as resolveFormFieldIds, Vr as startOfMonth, te as stopInteractivePropagation, Hr as toDateKey, ni as useBeforeUnloadWhenDirty, jr as useCommandPaletteShortcut, oi as useDataTableViewState, ii as useDebouncedCallback, ai as useDebouncedValue, ri as useDisclosure, $e as useIsMobile, ti as useSessionStorageState, Or as useToast };
|
|
@@ -1,140 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./render-registry-preview.cjs");let
|
|
2
|
-
|
|
3
|
-
export function Demo() {
|
|
4
|
-
return (
|
|
5
|
-
<Input
|
|
6
|
-
type="search"
|
|
7
|
-
value="invoice"
|
|
8
|
-
onValueChange={(value) => console.log(value)}
|
|
9
|
-
placeholder="Search invoices..."
|
|
10
|
-
resultCount={12}
|
|
11
|
-
shortcut="Ctrl K"
|
|
12
|
-
/>
|
|
13
|
-
)
|
|
14
|
-
}`,"password-input":`import { PasswordInput } from "tembro"
|
|
15
|
-
|
|
16
|
-
export function Demo() {
|
|
17
|
-
return <PasswordInput placeholder="Enter secure token" autoComplete="current-password" />
|
|
18
|
-
}`,"clearable-input":`import { Input } from "tembro"
|
|
19
|
-
|
|
20
|
-
export function Demo() {
|
|
21
|
-
return <Input defaultValue="Azamat UI" placeholder="Search customer" clearable />
|
|
22
|
-
}`,"tag-input":`import { TagInput } from "tembro"
|
|
23
|
-
|
|
24
|
-
export function Demo() {
|
|
25
|
-
return <TagInput defaultValue={["dashboard", "billing"]} placeholder="Add tag" />
|
|
26
|
-
}`,"action-menu":`import { ActionMenu, Button } from "tembro"
|
|
27
|
-
|
|
28
|
-
export function Demo() {
|
|
29
|
-
return (
|
|
30
|
-
<ActionMenu
|
|
31
|
-
label="Row actions"
|
|
32
|
-
actions={[
|
|
33
|
-
{ key: "open", label: "Open" },
|
|
34
|
-
{ key: "duplicate", label: "Duplicate" },
|
|
35
|
-
{ key: "archive", label: "Archive", destructive: true },
|
|
36
|
-
]}
|
|
37
|
-
trigger={<Button variant="outline">Actions</Button>}
|
|
38
|
-
/>
|
|
39
|
-
)
|
|
40
|
-
}`,"button-group":`import { ButtonGroup } from "tembro"
|
|
41
|
-
|
|
42
|
-
export function Demo() {
|
|
43
|
-
return (
|
|
44
|
-
<ButtonGroup
|
|
45
|
-
items={[
|
|
46
|
-
{ key: "day", label: "Day" },
|
|
47
|
-
{ key: "week", label: "Week" },
|
|
48
|
-
{ key: "month", label: "Month" },
|
|
49
|
-
]}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
}`,"quick-action-grid":`import { QuickActionGrid } from "tembro"
|
|
53
|
-
|
|
54
|
-
export function Demo() {
|
|
55
|
-
return (
|
|
56
|
-
<QuickActionGrid
|
|
57
|
-
columns={3}
|
|
58
|
-
items={[
|
|
59
|
-
{ key: "new", label: "New invoice", description: "Create a billing row." },
|
|
60
|
-
{ key: "import", label: "Import CSV", description: "Upload operational data." },
|
|
61
|
-
{ key: "share", label: "Share", description: "Invite a teammate." },
|
|
62
|
-
]}
|
|
63
|
-
/>
|
|
64
|
-
)
|
|
65
|
-
}`,"filter-bar":`import { Button, FilterBar, Input } from "tembro"
|
|
66
|
-
|
|
67
|
-
export function Demo() {
|
|
68
|
-
return (
|
|
69
|
-
<FilterBar
|
|
70
|
-
search={<Input type="search" value="" placeholder="Search rows..." readOnly />}
|
|
71
|
-
chips={[
|
|
72
|
-
{ key: "status", label: "Status", value: "Active", tone: "success" },
|
|
73
|
-
{ key: "owner", label: "Owner", value: "Azamat" },
|
|
74
|
-
]}
|
|
75
|
-
filters={<Button variant="outline">Status</Button>}
|
|
76
|
-
actions={<Button>Export</Button>}
|
|
77
|
-
onReset={() => undefined}
|
|
78
|
-
/>
|
|
79
|
-
)
|
|
80
|
-
}`,"description-list":`import { DescriptionList } from "tembro"
|
|
81
|
-
|
|
82
|
-
export function Demo() {
|
|
83
|
-
return (
|
|
84
|
-
<DescriptionList
|
|
85
|
-
title="Invoice details"
|
|
86
|
-
items={[
|
|
87
|
-
{ key: "id", label: "Invoice", value: "#4821" },
|
|
88
|
-
{ key: "amount", label: "Amount", value: "$12,420" },
|
|
89
|
-
{ key: "status", label: "Status", value: "Paid" },
|
|
90
|
-
]}
|
|
91
|
-
/>
|
|
92
|
-
)
|
|
93
|
-
}`,"stat-card":`import { StatCard } from "tembro"
|
|
94
|
-
|
|
95
|
-
export function Demo() {
|
|
96
|
-
return (
|
|
97
|
-
<StatCard
|
|
98
|
-
title="Revenue"
|
|
99
|
-
value="$84.2k"
|
|
100
|
-
description="Compared with last month"
|
|
101
|
-
trend={{ value: "+12.4%", tone: "success" }}
|
|
102
|
-
helperText="Updated just now"
|
|
103
|
-
/>
|
|
104
|
-
)
|
|
105
|
-
}`,pagination:`import { Pagination } from "tembro"
|
|
106
|
-
|
|
107
|
-
export function Demo() {
|
|
108
|
-
return <Pagination page={3} pageCount={9} onPageChange={(page) => console.log(page)} />
|
|
109
|
-
}`,"dialog-actions":`import { DialogActionButton, DialogActions } from "tembro"
|
|
110
|
-
|
|
111
|
-
export function Demo() {
|
|
112
|
-
return (
|
|
113
|
-
<DialogActions align="end">
|
|
114
|
-
<DialogActionButton variant="ghost">Cancel</DialogActionButton>
|
|
115
|
-
<DialogActionButton variant="outline">Save draft</DialogActionButton>
|
|
116
|
-
<DialogActionButton>Publish</DialogActionButton>
|
|
117
|
-
</DialogActions>
|
|
118
|
-
)
|
|
119
|
-
}`,"file-dropzone":`import { FileDropzone } from "tembro"
|
|
120
|
-
|
|
121
|
-
export function Demo() {
|
|
122
|
-
return <FileDropzone label="Drop contract files" description="PDF, PNG or CSV up to 10MB." />
|
|
123
|
-
}`,stepper:`import { Stepper } from "tembro"
|
|
124
|
-
|
|
125
|
-
export function Demo() {
|
|
126
|
-
return (
|
|
127
|
-
<Stepper
|
|
128
|
-
currentStep="billing"
|
|
129
|
-
steps={[
|
|
130
|
-
{ id: "profile", title: "Profile", completed: true },
|
|
131
|
-
{ id: "billing", title: "Billing" },
|
|
132
|
-
{ id: "review", title: "Review" },
|
|
133
|
-
]}
|
|
134
|
-
onStepChange={() => undefined}
|
|
135
|
-
/>
|
|
136
|
-
)
|
|
137
|
-
}`};function s(e){let t=e.importName??e.component,n=`tembro`;return e.kind===`data-table`?`import { ${t} } from "${n}"
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./render-registry-preview.cjs"),t=require("./demo-snippets/index.cjs");let n=require("react/jsx-runtime");function r(e,t,n,r,i=t){let a=m(e);return{slug:e,title:a,component:t,kind:n,summary:r,importName:i,highlights:[`${a} renders with realistic dashboard data instead of an empty shell.`,`${t} stays isolated so copy, install and preview remain component-scoped.`,u(n)],scenarios:[{title:`Use when`,description:d(n,r)},{title:`Implementation`,description:f(e,i)}]}}function i(e){return Object.fromEntries(e.map(e=>[e.slug,{mock:a(e),Showcase:t=>(0,n.jsx)(l,{definition:e,...t})}]))}function a(e){return{cliCommand:`npx tembro add ${e.slug}`,code:o(e),highlights:e.highlights,scenarios:e.scenarios,capabilityNotes:c(e)}}function o(e){return t.demoCodeSnippets[e.slug]??s(e)}function s(e){let t=e.importName??e.component,n=`tembro`;return e.kind===`data-table`?`import { ${t} } from "${n}"
|
|
138
2
|
|
|
139
3
|
export function Demo() {
|
|
140
4
|
return (
|
|
@@ -158,4 +22,4 @@ export function Demo() {
|
|
|
158
22
|
|
|
159
23
|
export function Demo() {
|
|
160
24
|
return <${t} />
|
|
161
|
-
}`}function c(e){return[`Add ${e.slug} into your local source with the CLI.`,`Open the ${e.title} page to review props, copyable code, and a live state preview.`,p(e.kind)]}function l({definition:
|
|
25
|
+
}`}function c(e){return[`Add ${e.slug} into your local source with the CLI.`,`Open the ${e.title} page to review props, copyable code, and a live state preview.`,p(e.kind)]}function l({definition:t,state:r,setState:i}){return(0,n.jsxs)(`div`,{className:`space-y-5`,children:[(0,n.jsxs)(`header`,{className:`space-y-2`,children:[(0,n.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,n.jsx)(`span`,{className:`rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]`,children:t.component}),(0,n.jsx)(`span`,{className:`rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]`,children:t.kind})]}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`h3`,{className:`text-2xl font-semibold tracking-tight text-[color:var(--aui-page-foreground)]`,children:t.title}),(0,n.jsx)(`p`,{className:`mt-2 max-w-2xl text-sm leading-6 text-[color:var(--aui-page-muted)]`,children:t.summary})]})]}),(0,n.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)]`,children:[(0,n.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]`,children:`Live example`}),(0,n.jsx)(`p`,{className:`mt-1 text-sm font-medium text-[color:var(--aui-page-foreground)]`,children:`Realistic dashboard state`})]}),(0,n.jsx)(`span`,{className:`rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-2.5 py-1 text-[11px] font-semibold text-[color:var(--aui-brand-strong)]`,children:`CLI ready`})]}),(0,n.jsx)(`div`,{className:`p-4 sm:p-5`,children:e.renderShowcasePreview(t,r,i)})]}),(0,n.jsx)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:t.highlights.slice(0,3).map(e=>(0,n.jsx)(`div`,{className:`rounded-2xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm leading-6 text-[color:var(--aui-page-muted)]`,children:e},e))}),(0,n.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:t.scenarios.slice(0,2).map(e=>(0,n.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-[color:var(--aui-divider)] px-4 py-3`,children:[(0,n.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]`,children:e.title}),(0,n.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-[color:var(--aui-page-muted)]`,children:e.description})]},e.title))})]})}function u(e){return{actions:`Actions include labels, destructive states and compact row controls.`,calendar:`Calendar examples keep date value and month state visible.`,"data-table":`Table demos show toolbar, selection, rows, actions and pagination context.`,display:`Display demos use real entity, metric and workflow copy.`,feedback:`Feedback demos include status, action and recovery context.`,form:`Form demos keep label, hint and validation spacing visible.`,inputs:`Input demos show controlled values, placeholder copy and useful affordances.`,layout:`Layout demos show how the component frames a production screen.`,navigation:`Navigation demos show active state and route-sized labels.`,overlay:`Overlay demos keep trigger, content and action semantics together.`,patterns:`Pattern demos show page-level composition, not just isolated atoms.`,upload:`Upload demos show accepted content and empty state messaging.`,wizard:`Wizard demos include steps, progress and content slots.`}[e]}function d(e,t){return e===`data-table`?`Use on operational pages where search, filters, selection and row actions must stay visible together.`:e===`patterns`?`Use when a whole route needs consistent header, stats, filters, sections and detail content.`:e===`overlay`?`Use when the user needs a focused decision without leaving the current route.`:e===`inputs`||e===`form`?`Use inside controlled forms where label, value and validation behavior must be predictable.`:t}function f(e,t){return`Run the CLI add command for ${e}, import ${t}, then replace the preview data with your product state.`}function p(e){return{actions:`Keep action labels explicit and mark destructive operations clearly.`,calendar:`Keep date values normalized before passing them into calendar state.`,"data-table":`Wire table state first, then add visual density and presets.`,display:`Use real empty, loading and long-text cases before shipping.`,feedback:`Pair every alert or state with the next useful user action.`,form:`Validate with RHF or controlled state before styling the wrapper.`,inputs:`Keep value and onChange behavior stable for filtering and forms.`,layout:`Use layout components at route level instead of nesting them deep inside widgets.`,navigation:`Keep active state route-driven where possible.`,overlay:`Preserve focus return, escape close and mobile behavior.`,patterns:`Treat patterns as starting points for full pages, not tiny widgets.`,upload:`Validate file type, size and async error states in your app layer.`,wizard:`Persist current step and form state between step changes.`}[e]}function m(e){return e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}exports.component=r,exports.createShowcaseDemoRegistry=i;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { renderShowcasePreview as e } from "./render-registry-preview.js";
|
|
2
|
-
import {
|
|
2
|
+
import { demoCodeSnippets as t } from "./demo-snippets/index.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
4
|
//#region src/showcase/create-demo.tsx
|
|
4
|
-
function
|
|
5
|
+
function i(e, t, n, r, i = t) {
|
|
5
6
|
let a = h(e);
|
|
6
7
|
return {
|
|
7
8
|
slug: e,
|
|
@@ -24,43 +25,27 @@ function r(e, t, n, r, i = t) {
|
|
|
24
25
|
}]
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function a(e) {
|
|
28
29
|
return Object.fromEntries(e.map((e) => [e.slug, {
|
|
29
|
-
mock:
|
|
30
|
-
Showcase: (
|
|
30
|
+
mock: o(e),
|
|
31
|
+
Showcase: (t) => /* @__PURE__ */ n(u, {
|
|
31
32
|
definition: e,
|
|
32
|
-
...
|
|
33
|
+
...t
|
|
33
34
|
})
|
|
34
35
|
}]));
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function o(e) {
|
|
37
38
|
return {
|
|
38
39
|
cliCommand: `npx tembro add ${e.slug}`,
|
|
39
|
-
code:
|
|
40
|
+
code: s(e),
|
|
40
41
|
highlights: e.highlights,
|
|
41
42
|
scenarios: e.scenarios,
|
|
42
43
|
capabilityNotes: l(e)
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
46
|
+
function s(e) {
|
|
47
|
+
return t[e.slug] ?? c(e);
|
|
47
48
|
}
|
|
48
|
-
var s = {
|
|
49
|
-
"search-input": "import { Input } from \"tembro\"\n\nexport function Demo() {\n return (\n <Input\n type=\"search\"\n value=\"invoice\"\n onValueChange={(value) => console.log(value)}\n placeholder=\"Search invoices...\"\n resultCount={12}\n shortcut=\"Ctrl K\"\n />\n )\n}",
|
|
50
|
-
"password-input": "import { PasswordInput } from \"tembro\"\n\nexport function Demo() {\n return <PasswordInput placeholder=\"Enter secure token\" autoComplete=\"current-password\" />\n}",
|
|
51
|
-
"clearable-input": "import { Input } from \"tembro\"\n\nexport function Demo() {\n return <Input defaultValue=\"Azamat UI\" placeholder=\"Search customer\" clearable />\n}",
|
|
52
|
-
"tag-input": "import { TagInput } from \"tembro\"\n\nexport function Demo() {\n return <TagInput defaultValue={[\"dashboard\", \"billing\"]} placeholder=\"Add tag\" />\n}",
|
|
53
|
-
"action-menu": "import { ActionMenu, Button } from \"tembro\"\n\nexport function Demo() {\n return (\n <ActionMenu\n label=\"Row actions\"\n actions={[\n { key: \"open\", label: \"Open\" },\n { key: \"duplicate\", label: \"Duplicate\" },\n { key: \"archive\", label: \"Archive\", destructive: true },\n ]}\n trigger={<Button variant=\"outline\">Actions</Button>}\n />\n )\n}",
|
|
54
|
-
"button-group": "import { ButtonGroup } from \"tembro\"\n\nexport function Demo() {\n return (\n <ButtonGroup\n items={[\n { key: \"day\", label: \"Day\" },\n { key: \"week\", label: \"Week\" },\n { key: \"month\", label: \"Month\" },\n ]}\n />\n )\n}",
|
|
55
|
-
"quick-action-grid": "import { QuickActionGrid } from \"tembro\"\n\nexport function Demo() {\n return (\n <QuickActionGrid\n columns={3}\n items={[\n { key: \"new\", label: \"New invoice\", description: \"Create a billing row.\" },\n { key: \"import\", label: \"Import CSV\", description: \"Upload operational data.\" },\n { key: \"share\", label: \"Share\", description: \"Invite a teammate.\" },\n ]}\n />\n )\n}",
|
|
56
|
-
"filter-bar": "import { Button, FilterBar, Input } from \"tembro\"\n\nexport function Demo() {\n return (\n <FilterBar\n search={<Input type=\"search\" value=\"\" placeholder=\"Search rows...\" readOnly />}\n chips={[\n { key: \"status\", label: \"Status\", value: \"Active\", tone: \"success\" },\n { key: \"owner\", label: \"Owner\", value: \"Azamat\" },\n ]}\n filters={<Button variant=\"outline\">Status</Button>}\n actions={<Button>Export</Button>}\n onReset={() => undefined}\n />\n )\n}",
|
|
57
|
-
"description-list": "import { DescriptionList } from \"tembro\"\n\nexport function Demo() {\n return (\n <DescriptionList\n title=\"Invoice details\"\n items={[\n { key: \"id\", label: \"Invoice\", value: \"#4821\" },\n { key: \"amount\", label: \"Amount\", value: \"$12,420\" },\n { key: \"status\", label: \"Status\", value: \"Paid\" },\n ]}\n />\n )\n}",
|
|
58
|
-
"stat-card": "import { StatCard } from \"tembro\"\n\nexport function Demo() {\n return (\n <StatCard\n title=\"Revenue\"\n value=\"$84.2k\"\n description=\"Compared with last month\"\n trend={{ value: \"+12.4%\", tone: \"success\" }}\n helperText=\"Updated just now\"\n />\n )\n}",
|
|
59
|
-
pagination: "import { Pagination } from \"tembro\"\n\nexport function Demo() {\n return <Pagination page={3} pageCount={9} onPageChange={(page) => console.log(page)} />\n}",
|
|
60
|
-
"dialog-actions": "import { DialogActionButton, DialogActions } from \"tembro\"\n\nexport function Demo() {\n return (\n <DialogActions align=\"end\">\n <DialogActionButton variant=\"ghost\">Cancel</DialogActionButton>\n <DialogActionButton variant=\"outline\">Save draft</DialogActionButton>\n <DialogActionButton>Publish</DialogActionButton>\n </DialogActions>\n )\n}",
|
|
61
|
-
"file-dropzone": "import { FileDropzone } from \"tembro\"\n\nexport function Demo() {\n return <FileDropzone label=\"Drop contract files\" description=\"PDF, PNG or CSV up to 10MB.\" />\n}",
|
|
62
|
-
stepper: "import { Stepper } from \"tembro\"\n\nexport function Demo() {\n return (\n <Stepper\n currentStep=\"billing\"\n steps={[\n { id: \"profile\", title: \"Profile\", completed: true },\n { id: \"billing\", title: \"Billing\" },\n { id: \"review\", title: \"Review\" },\n ]}\n onStepChange={() => undefined}\n />\n )\n}"
|
|
63
|
-
};
|
|
64
49
|
function c(e) {
|
|
65
50
|
let t = e.importName ?? e.component, n = "tembro";
|
|
66
51
|
return e.kind === "data-table" ? `import { ${t} } from "${n}"
|
|
@@ -96,63 +81,63 @@ function l(e) {
|
|
|
96
81
|
m(e.kind)
|
|
97
82
|
];
|
|
98
83
|
}
|
|
99
|
-
function u({ definition:
|
|
100
|
-
return /* @__PURE__ */
|
|
84
|
+
function u({ definition: t, state: i, setState: a }) {
|
|
85
|
+
return /* @__PURE__ */ r("div", {
|
|
101
86
|
className: "space-y-5",
|
|
102
87
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ r("header", {
|
|
104
89
|
className: "space-y-2",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ r("div", {
|
|
106
91
|
className: "flex flex-wrap gap-2",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ n("span", {
|
|
108
93
|
className: "rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]",
|
|
109
|
-
children:
|
|
110
|
-
}), /* @__PURE__ */
|
|
94
|
+
children: t.component
|
|
95
|
+
}), /* @__PURE__ */ n("span", {
|
|
111
96
|
className: "rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]",
|
|
112
|
-
children:
|
|
97
|
+
children: t.kind
|
|
113
98
|
})]
|
|
114
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("h3", {
|
|
115
100
|
className: "text-2xl font-semibold tracking-tight text-[color:var(--aui-page-foreground)]",
|
|
116
|
-
children:
|
|
117
|
-
}), /* @__PURE__ */
|
|
101
|
+
children: t.title
|
|
102
|
+
}), /* @__PURE__ */ n("p", {
|
|
118
103
|
className: "mt-2 max-w-2xl text-sm leading-6 text-[color:var(--aui-page-muted)]",
|
|
119
|
-
children:
|
|
104
|
+
children: t.summary
|
|
120
105
|
})] })]
|
|
121
106
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ r("div", {
|
|
123
108
|
className: "overflow-hidden rounded-2xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)]",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ r("div", {
|
|
125
110
|
className: "flex flex-wrap items-center justify-between gap-3 border-b border-[color:var(--aui-divider)] px-4 py-3",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("p", {
|
|
127
112
|
className: "text-xs font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]",
|
|
128
113
|
children: "Live example"
|
|
129
|
-
}), /* @__PURE__ */
|
|
114
|
+
}), /* @__PURE__ */ n("p", {
|
|
130
115
|
className: "mt-1 text-sm font-medium text-[color:var(--aui-page-foreground)]",
|
|
131
116
|
children: "Realistic dashboard state"
|
|
132
|
-
})] }), /* @__PURE__ */
|
|
117
|
+
})] }), /* @__PURE__ */ n("span", {
|
|
133
118
|
className: "rounded-full border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-2.5 py-1 text-[11px] font-semibold text-[color:var(--aui-brand-strong)]",
|
|
134
119
|
children: "CLI ready"
|
|
135
120
|
})]
|
|
136
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ n("div", {
|
|
137
122
|
className: "p-4 sm:p-5",
|
|
138
|
-
children: e(
|
|
123
|
+
children: e(t, i, a)
|
|
139
124
|
})]
|
|
140
125
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ n("div", {
|
|
142
127
|
className: "grid gap-3 md:grid-cols-3",
|
|
143
|
-
children:
|
|
128
|
+
children: t.highlights.slice(0, 3).map((e) => /* @__PURE__ */ n("div", {
|
|
144
129
|
className: "rounded-2xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm leading-6 text-[color:var(--aui-page-muted)]",
|
|
145
130
|
children: e
|
|
146
131
|
}, e))
|
|
147
132
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ n("div", {
|
|
149
134
|
className: "grid gap-3 md:grid-cols-2",
|
|
150
|
-
children:
|
|
135
|
+
children: t.scenarios.slice(0, 2).map((e) => /* @__PURE__ */ r("div", {
|
|
151
136
|
className: "rounded-2xl border border-dashed border-[color:var(--aui-divider)] px-4 py-3",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ n("p", {
|
|
153
138
|
className: "text-xs font-semibold uppercase tracking-[0.18em] text-[color:var(--aui-page-muted)]",
|
|
154
139
|
children: e.title
|
|
155
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ n("p", {
|
|
156
141
|
className: "mt-2 text-sm leading-6 text-[color:var(--aui-page-muted)]",
|
|
157
142
|
children: e.description
|
|
158
143
|
})]
|
|
@@ -205,4 +190,4 @@ function h(e) {
|
|
|
205
190
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
206
191
|
}
|
|
207
192
|
//#endregion
|
|
208
|
-
export {
|
|
193
|
+
export { i as component, a as createShowcaseDemoRegistry };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={"action-menu":`import { ActionMenu, Button } from "tembro"
|
|
2
|
+
|
|
3
|
+
export function Demo() {
|
|
4
|
+
return (
|
|
5
|
+
<ActionMenu
|
|
6
|
+
label="Row actions"
|
|
7
|
+
actions={[
|
|
8
|
+
{ key: "open", label: "Open" },
|
|
9
|
+
{ key: "duplicate", label: "Duplicate" },
|
|
10
|
+
{ key: "archive", label: "Archive", destructive: true },
|
|
11
|
+
]}
|
|
12
|
+
trigger={<Button variant="outline">Actions</Button>}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
}`,"button-group":`import { ButtonGroup } from "tembro"
|
|
16
|
+
|
|
17
|
+
export function Demo() {
|
|
18
|
+
return (
|
|
19
|
+
<ButtonGroup
|
|
20
|
+
items={[
|
|
21
|
+
{ key: "day", label: "Day" },
|
|
22
|
+
{ key: "week", label: "Week" },
|
|
23
|
+
{ key: "month", label: "Month" },
|
|
24
|
+
]}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
}`,"quick-action-grid":`import { QuickActionGrid } from "tembro"
|
|
28
|
+
|
|
29
|
+
export function Demo() {
|
|
30
|
+
return (
|
|
31
|
+
<QuickActionGrid
|
|
32
|
+
columns={3}
|
|
33
|
+
items={[
|
|
34
|
+
{ key: "new", label: "New invoice", description: "Create a billing row." },
|
|
35
|
+
{ key: "import", label: "Import CSV", description: "Upload operational data." },
|
|
36
|
+
{ key: "share", label: "Share", description: "Invite a teammate." },
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
)
|
|
40
|
+
}`,"dialog-actions":`import { DialogActionButton, DialogActions } from "tembro"
|
|
41
|
+
|
|
42
|
+
export function Demo() {
|
|
43
|
+
return (
|
|
44
|
+
<DialogActions align="end">
|
|
45
|
+
<DialogActionButton variant="ghost">Cancel</DialogActionButton>
|
|
46
|
+
<DialogActionButton variant="outline">Save draft</DialogActionButton>
|
|
47
|
+
<DialogActionButton>Publish</DialogActionButton>
|
|
48
|
+
</DialogActions>
|
|
49
|
+
)
|
|
50
|
+
}`,stepper:`import { Stepper } from "tembro"
|
|
51
|
+
|
|
52
|
+
export function Demo() {
|
|
53
|
+
return (
|
|
54
|
+
<Stepper
|
|
55
|
+
currentStep="billing"
|
|
56
|
+
steps={[
|
|
57
|
+
{ id: "profile", title: "Profile", completed: true },
|
|
58
|
+
{ id: "billing", title: "Billing" },
|
|
59
|
+
{ id: "review", title: "Review" },
|
|
60
|
+
]}
|
|
61
|
+
onStepChange={() => undefined}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}`};exports.actionDemoCodeSnippets=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const actionDemoCodeSnippets: Record<string, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/showcase/demo-snippets/actions/index.ts
|
|
2
|
+
var e = {
|
|
3
|
+
"action-menu": "import { ActionMenu, Button } from \"tembro\"\n\nexport function Demo() {\n return (\n <ActionMenu\n label=\"Row actions\"\n actions={[\n { key: \"open\", label: \"Open\" },\n { key: \"duplicate\", label: \"Duplicate\" },\n { key: \"archive\", label: \"Archive\", destructive: true },\n ]}\n trigger={<Button variant=\"outline\">Actions</Button>}\n />\n )\n}",
|
|
4
|
+
"button-group": "import { ButtonGroup } from \"tembro\"\n\nexport function Demo() {\n return (\n <ButtonGroup\n items={[\n { key: \"day\", label: \"Day\" },\n { key: \"week\", label: \"Week\" },\n { key: \"month\", label: \"Month\" },\n ]}\n />\n )\n}",
|
|
5
|
+
"quick-action-grid": "import { QuickActionGrid } from \"tembro\"\n\nexport function Demo() {\n return (\n <QuickActionGrid\n columns={3}\n items={[\n { key: \"new\", label: \"New invoice\", description: \"Create a billing row.\" },\n { key: \"import\", label: \"Import CSV\", description: \"Upload operational data.\" },\n { key: \"share\", label: \"Share\", description: \"Invite a teammate.\" },\n ]}\n />\n )\n}",
|
|
6
|
+
"dialog-actions": "import { DialogActionButton, DialogActions } from \"tembro\"\n\nexport function Demo() {\n return (\n <DialogActions align=\"end\">\n <DialogActionButton variant=\"ghost\">Cancel</DialogActionButton>\n <DialogActionButton variant=\"outline\">Save draft</DialogActionButton>\n <DialogActionButton>Publish</DialogActionButton>\n </DialogActions>\n )\n}",
|
|
7
|
+
stepper: "import { Stepper } from \"tembro\"\n\nexport function Demo() {\n return (\n <Stepper\n currentStep=\"billing\"\n steps={[\n { id: \"profile\", title: \"Profile\", completed: true },\n { id: \"billing\", title: \"Billing\" },\n { id: \"review\", title: \"Review\" },\n ]}\n onStepChange={() => undefined}\n />\n )\n}"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as actionDemoCodeSnippets };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={"search-input":`import { Input } from "tembro"
|
|
2
|
+
|
|
3
|
+
export function Demo() {
|
|
4
|
+
return (
|
|
5
|
+
<Input
|
|
6
|
+
type="search"
|
|
7
|
+
value="invoice"
|
|
8
|
+
onValueChange={(value) => console.log(value)}
|
|
9
|
+
placeholder="Search invoices..."
|
|
10
|
+
resultCount={12}
|
|
11
|
+
shortcut="Ctrl K"
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}`,"password-input":`import { PasswordInput } from "tembro"
|
|
15
|
+
|
|
16
|
+
export function Demo() {
|
|
17
|
+
return <PasswordInput placeholder="Enter secure token" autoComplete="current-password" />
|
|
18
|
+
}`,"clearable-input":`import { Input } from "tembro"
|
|
19
|
+
|
|
20
|
+
export function Demo() {
|
|
21
|
+
return <Input defaultValue="Azamat UI" placeholder="Search customer" clearable />
|
|
22
|
+
}`,"tag-input":`import { TagInput } from "tembro"
|
|
23
|
+
|
|
24
|
+
export function Demo() {
|
|
25
|
+
return <TagInput defaultValue={["dashboard", "billing"]} placeholder="Add tag" />
|
|
26
|
+
}`};exports.formDemoCodeSnippets=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formDemoCodeSnippets: Record<string, string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/showcase/demo-snippets/forms/index.ts
|
|
2
|
+
var e = {
|
|
3
|
+
"search-input": "import { Input } from \"tembro\"\n\nexport function Demo() {\n return (\n <Input\n type=\"search\"\n value=\"invoice\"\n onValueChange={(value) => console.log(value)}\n placeholder=\"Search invoices...\"\n resultCount={12}\n shortcut=\"Ctrl K\"\n />\n )\n}",
|
|
4
|
+
"password-input": "import { PasswordInput } from \"tembro\"\n\nexport function Demo() {\n return <PasswordInput placeholder=\"Enter secure token\" autoComplete=\"current-password\" />\n}",
|
|
5
|
+
"clearable-input": "import { Input } from \"tembro\"\n\nexport function Demo() {\n return <Input defaultValue=\"Azamat UI\" placeholder=\"Search customer\" clearable />\n}",
|
|
6
|
+
"tag-input": "import { TagInput } from \"tembro\"\n\nexport function Demo() {\n return <TagInput defaultValue={[\"dashboard\", \"billing\"]} placeholder=\"Add tag\" />\n}"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as formDemoCodeSnippets };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./actions/index.cjs"),t=require("./forms/index.cjs"),n=require("./layout/index.cjs"),r=require("./upload/index.cjs");var i={...e.actionDemoCodeSnippets,...t.formDemoCodeSnippets,...n.layoutDemoCodeSnippets,...r.uploadDemoCodeSnippets};exports.demoCodeSnippets=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const demoCodeSnippets: Record<string, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { actionDemoCodeSnippets as e } from "./actions/index.js";
|
|
2
|
+
import { formDemoCodeSnippets as t } from "./forms/index.js";
|
|
3
|
+
import { layoutDemoCodeSnippets as n } from "./layout/index.js";
|
|
4
|
+
import { uploadDemoCodeSnippets as r } from "./upload/index.js";
|
|
5
|
+
//#region src/showcase/demo-snippets/index.ts
|
|
6
|
+
var i = {
|
|
7
|
+
...e,
|
|
8
|
+
...t,
|
|
9
|
+
...n,
|
|
10
|
+
...r
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as demoCodeSnippets };
|