tembro 2.0.5 → 2.0.6
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/data-table/data-table-pagination.cjs +1 -1
- package/dist/components/data-table/data-table-pagination.js +4 -4
- package/dist/components/data-table/data-table.cjs +1 -1
- package/dist/components/data-table/data-table.d.ts +2 -2
- package/dist/components/data-table/data-table.js +2 -1
- package/dist/components/display/carousel.cjs +1 -1
- package/dist/components/display/carousel.d.ts +7 -1
- package/dist/components/display/carousel.js +44 -44
- package/dist/components/display/smart-card.d.ts +1 -1
- package/dist/components/display/status-legend.d.ts +1 -1
- package/dist/components/form/form-input.cjs +1 -1
- package/dist/components/form/form-input.d.ts +3 -4
- package/dist/components/form/form-input.js +257 -257
- package/dist/components/form/form-select.cjs +1 -1
- package/dist/components/form/form-select.d.ts +2 -2
- package/dist/components/form/form-select.js +6 -6
- package/dist/components/inputs/async-select.d.ts +3 -0
- package/dist/components/inputs/search-input.d.ts +3 -0
- package/dist/components/inputs/simple-select.cjs +1 -1
- package/dist/components/inputs/simple-select.d.ts +10 -32
- package/dist/components/inputs/simple-select.js +5 -101
- package/dist/components/ui/card/index.cjs +1 -1
- package/dist/components/ui/card/index.d.ts +13 -2
- package/dist/components/ui/card/index.js +74 -49
- package/dist/components/ui/input/index.cjs +1 -1
- package/dist/components/ui/input/index.d.ts +8 -0
- package/dist/components/ui/input/index.js +63 -30
- package/dist/components/ui/select/index.cjs +1 -1
- package/dist/components/ui/select/index.d.ts +33 -1
- package/dist/components/ui/select/index.js +154 -48
- package/dist/showcase/create-demo.cjs +5 -4
- package/dist/showcase/create-demo.js +2 -2
- package/dist/showcase/premium/data-table/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table/showcase.js +1 -1
- package/dist/showcase/premium/data-table-parts/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table-parts/showcase.js +3 -1
- package/dist/showcase/premium/select/mock.cjs +8 -9
- package/dist/showcase/premium/select/mock.js +1 -1
- package/dist/showcase/premium/select/showcase.cjs +1 -1
- package/dist/showcase/premium/select/showcase.js +76 -86
- package/dist/showcase/registry-specific.cjs +1 -1
- package/dist/showcase/registry-specific.js +78 -74
- package/dist/showcase/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +91 -87
- 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 +1 -1
- package/packages/cli/vendor/src/components/data-table/data-table-pagination.tsx +7 -7
- package/packages/cli/vendor/src/components/data-table/data-table.tsx +21 -20
- package/packages/cli/vendor/src/components/display/carousel.tsx +18 -6
- package/packages/cli/vendor/src/components/display/smart-card.tsx +1 -1
- package/packages/cli/vendor/src/components/display/status-legend.tsx +1 -1
- package/packages/cli/vendor/src/components/form/form-input.tsx +9 -12
- package/packages/cli/vendor/src/components/form/form-select.tsx +4 -4
- package/packages/cli/vendor/src/components/inputs/async-select.tsx +11 -8
- package/packages/cli/vendor/src/components/inputs/search-input.tsx +5 -2
- package/packages/cli/vendor/src/components/inputs/simple-select.tsx +20 -190
- package/packages/cli/vendor/src/components/ui/card/index.tsx +95 -25
- package/packages/cli/vendor/src/components/ui/input/index.tsx +98 -0
- package/packages/cli/vendor/src/components/ui/select/index.tsx +227 -34
- package/packages/cli/vendor/src/showcase/create-demo.tsx +16 -15
- package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +3 -3
- package/packages/cli/vendor/src/showcase/premium/select/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +13 -21
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +7 -8
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +5 -6
- package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
- package/registry.json +1 -1
|
@@ -2,27 +2,26 @@ import { Button as e } from "../components/ui/button/index.js";
|
|
|
2
2
|
import { ActionMenu as t } from "../components/actions/action-menu.js";
|
|
3
3
|
import { ButtonGroup as n } from "../components/actions/button-group.js";
|
|
4
4
|
import { PasswordInput as r } from "../components/inputs/password-input.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { PageState as ie } from "../components/feedback/page-state.js";
|
|
5
|
+
import { Input as i } from "../components/ui/input/index.js";
|
|
6
|
+
import { Badge as a } from "../components/ui/badge/index.js";
|
|
7
|
+
import { QuickActionGrid as o } from "../components/actions/quick-action-grid.js";
|
|
8
|
+
import { SectionHeader as s } from "../components/layout/section-header.js";
|
|
9
|
+
import { AnchorNav as ee } from "../components/navigation/anchor-nav.js";
|
|
10
|
+
import { NavTabs as c } from "../components/navigation/nav-tabs.js";
|
|
11
|
+
import { PageTabs as l } from "../components/navigation/page-tabs.js";
|
|
12
|
+
import { Pagination as u } from "../components/navigation/pagination.js";
|
|
13
|
+
import { StepperTabs as d } from "../components/navigation/stepper-tabs.js";
|
|
14
|
+
import { FilterBar as f } from "../components/filters/filter-bar.js";
|
|
15
|
+
import { AlertDialog as p } from "../components/overlay/alert-dialog.js";
|
|
16
|
+
import { DialogActionButton as m, DialogActions as h } from "../components/overlay/dialog-actions.js";
|
|
17
|
+
import { Drawer as g } from "../components/overlay/drawer.js";
|
|
18
|
+
import { ColorInput as _ } from "../components/inputs/color-input.js";
|
|
19
|
+
import { OtpInput as v } from "../components/inputs/otp-input.js";
|
|
20
|
+
import { Rating as y } from "../components/inputs/rating.js";
|
|
21
|
+
import { RangeSlider as b, Slider as x } from "../components/inputs/slider.js";
|
|
22
|
+
import { TagInput as te } from "../components/inputs/tag-input.js";
|
|
23
|
+
import { Alert as ne } from "../components/feedback/alert.js";
|
|
24
|
+
import { PageState as re } from "../components/feedback/page-state.js";
|
|
26
25
|
import { DescriptionList as S } from "../components/display/description-list.js";
|
|
27
26
|
import { List as C } from "../components/display/list.js";
|
|
28
27
|
import { Progress as w } from "../components/display/progress.js";
|
|
@@ -42,80 +41,81 @@ import { AppHeader as L } from "../components/layout/app-header.js";
|
|
|
42
41
|
import { ResourceDetailPage as R } from "../components/patterns/resource-detail-page.js";
|
|
43
42
|
import { ResourcePage as z, ResourcePageSection as B } from "../components/patterns/resource-page.js";
|
|
44
43
|
import "react";
|
|
45
|
-
import { ArchiveIcon as V, BellIcon as
|
|
44
|
+
import { ArchiveIcon as V, BellIcon as H, ChevronRightIcon as ie, DownloadIcon as U, FilterIcon as W, LayoutDashboardIcon as G, MoreHorizontalIcon as K, SearchIcon as q, UploadCloudIcon as J } from "lucide-react";
|
|
46
45
|
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
47
46
|
//#region src/showcase/render-registry-preview.tsx
|
|
48
|
-
function
|
|
49
|
-
return e.kind === "inputs" ? /* @__PURE__ */ X(
|
|
47
|
+
function ae(e, t, n) {
|
|
48
|
+
return e.kind === "inputs" ? /* @__PURE__ */ X(oe, {
|
|
50
49
|
slug: e.slug,
|
|
51
50
|
state: t,
|
|
52
51
|
setState: n
|
|
53
|
-
}) : e.kind === "form" ? /* @__PURE__ */ X(
|
|
52
|
+
}) : e.kind === "form" ? /* @__PURE__ */ X(se, {
|
|
54
53
|
state: t,
|
|
55
54
|
setState: n
|
|
56
|
-
}) : e.kind === "overlay" ? /* @__PURE__ */ X(
|
|
55
|
+
}) : e.kind === "overlay" ? /* @__PURE__ */ X(ce, { slug: e.slug }) : e.kind === "navigation" ? /* @__PURE__ */ X(le, { slug: e.slug }) : e.kind === "feedback" ? /* @__PURE__ */ X(ue, { slug: e.slug }) : e.kind === "display" ? /* @__PURE__ */ X(de, { slug: e.slug }) : e.kind === "actions" ? /* @__PURE__ */ X(fe, {
|
|
57
56
|
slug: e.slug,
|
|
58
57
|
state: t,
|
|
59
58
|
setState: n
|
|
60
|
-
}) : e.kind === "layout" ? /* @__PURE__ */ X(
|
|
59
|
+
}) : e.kind === "layout" ? /* @__PURE__ */ X(pe, { slug: e.slug }) : e.kind === "data-table" ? /* @__PURE__ */ X($, { slug: e.slug }) : e.kind === "calendar" ? /* @__PURE__ */ X(me, {}) : e.kind === "upload" ? /* @__PURE__ */ X(he, { slug: e.slug }) : e.kind === "wizard" ? /* @__PURE__ */ X(ge, { slug: e.slug }) : e.kind === "patterns" ? /* @__PURE__ */ X(_e, { slug: e.slug }) : null;
|
|
61
60
|
}
|
|
62
61
|
function Q({ tone: e, children: t }) {
|
|
63
|
-
return /* @__PURE__ */ X(
|
|
62
|
+
return /* @__PURE__ */ X(a, {
|
|
64
63
|
variant: e === "danger" ? "destructive" : e === "warning" ? "outline" : "secondary",
|
|
65
64
|
children: t
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
|
-
function
|
|
69
|
-
let
|
|
67
|
+
function oe({ slug: e, state: t, setState: n }) {
|
|
68
|
+
let a = t.textValue, o = (e) => n({ textValue: e });
|
|
70
69
|
return e === "search-input" ? /* @__PURE__ */ X(i, {
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
type: "search",
|
|
71
|
+
value: a,
|
|
72
|
+
onValueChange: o,
|
|
73
73
|
resultCount: 12,
|
|
74
74
|
shortcut: "Ctrl K",
|
|
75
75
|
placeholder: "Search customers..."
|
|
76
76
|
}) : e === "password-input" ? /* @__PURE__ */ X(r, {
|
|
77
77
|
value: "secret-token",
|
|
78
|
-
onValueChange:
|
|
78
|
+
onValueChange: o,
|
|
79
79
|
placeholder: "Password"
|
|
80
|
-
}) : e === "clearable-input" ? /* @__PURE__ */ X(
|
|
81
|
-
value:
|
|
82
|
-
onValueChange:
|
|
80
|
+
}) : e === "clearable-input" ? /* @__PURE__ */ X(i, {
|
|
81
|
+
value: a,
|
|
82
|
+
onValueChange: o,
|
|
83
83
|
placeholder: "Clearable input",
|
|
84
84
|
clearable: !0
|
|
85
|
-
}) : e === "slider" ? /* @__PURE__ */ X(
|
|
85
|
+
}) : e === "slider" ? /* @__PURE__ */ X(x, {
|
|
86
86
|
label: "Density",
|
|
87
87
|
description: "Tune content density.",
|
|
88
88
|
defaultValue: 64,
|
|
89
89
|
showValue: !0
|
|
90
|
-
}) : e === "range-slider" ? /* @__PURE__ */ X(
|
|
90
|
+
}) : e === "range-slider" ? /* @__PURE__ */ X(b, {
|
|
91
91
|
label: "Revenue range",
|
|
92
92
|
description: "Filter between two values.",
|
|
93
93
|
defaultValue: [20, 80],
|
|
94
94
|
showValue: !0
|
|
95
|
-
}) : e === "rating" ? /* @__PURE__ */ X(
|
|
95
|
+
}) : e === "rating" ? /* @__PURE__ */ X(y, {
|
|
96
96
|
defaultValue: 4,
|
|
97
97
|
labels: { clear: "Reset" }
|
|
98
|
-
}) : e === "otp-input" ? /* @__PURE__ */ X(
|
|
99
|
-
value:
|
|
100
|
-
onValueChange:
|
|
101
|
-
}) : e === "color-input" ? /* @__PURE__ */ X(
|
|
98
|
+
}) : e === "otp-input" ? /* @__PURE__ */ X(v, {
|
|
99
|
+
value: a.replace(/\D/g, "").slice(0, 6),
|
|
100
|
+
onValueChange: o
|
|
101
|
+
}) : e === "color-input" ? /* @__PURE__ */ X(_, {
|
|
102
102
|
defaultValue: "#22c55e",
|
|
103
103
|
label: "Accent color",
|
|
104
104
|
description: "Theme token preview."
|
|
105
|
-
}) : e === "tag-input" ? /* @__PURE__ */ X(
|
|
105
|
+
}) : e === "tag-input" ? /* @__PURE__ */ X(te, {
|
|
106
106
|
defaultValue: [
|
|
107
107
|
"dashboard",
|
|
108
108
|
"beta",
|
|
109
109
|
"ops"
|
|
110
110
|
],
|
|
111
111
|
placeholder: "Add label"
|
|
112
|
-
}) : /* @__PURE__ */ X(
|
|
113
|
-
value:
|
|
112
|
+
}) : /* @__PURE__ */ X(i, {
|
|
113
|
+
value: a,
|
|
114
114
|
onChange: (e) => n({ textValue: e.currentTarget.value }),
|
|
115
115
|
placeholder: "Unified input"
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function se({ state: e, setState: t }) {
|
|
119
119
|
return /* @__PURE__ */ Z("div", {
|
|
120
120
|
className: "grid gap-4 md:grid-cols-2",
|
|
121
121
|
children: [/* @__PURE__ */ Z("label", {
|
|
@@ -125,7 +125,7 @@ function ce({ state: e, setState: t }) {
|
|
|
125
125
|
className: "text-sm font-medium text-[color:var(--aui-page-foreground)]",
|
|
126
126
|
children: "Email address"
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */ X(
|
|
128
|
+
/* @__PURE__ */ X(i, {
|
|
129
129
|
value: e.textValue,
|
|
130
130
|
onChange: (e) => t({ textValue: e.currentTarget.value })
|
|
131
131
|
}),
|
|
@@ -142,6 +142,7 @@ function ce({ state: e, setState: t }) {
|
|
|
142
142
|
children: "Status"
|
|
143
143
|
}),
|
|
144
144
|
/* @__PURE__ */ X(i, {
|
|
145
|
+
type: "search",
|
|
145
146
|
value: "Active customers",
|
|
146
147
|
resultCount: 7,
|
|
147
148
|
readOnly: !0
|
|
@@ -154,24 +155,24 @@ function ce({ state: e, setState: t }) {
|
|
|
154
155
|
})]
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function ce({ slug: t }) {
|
|
158
159
|
return t === "dialog-actions" ? /* @__PURE__ */ X("div", {
|
|
159
160
|
className: "rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-4",
|
|
160
|
-
children: /* @__PURE__ */ Z(
|
|
161
|
+
children: /* @__PURE__ */ Z(h, {
|
|
161
162
|
align: "end",
|
|
162
163
|
children: [
|
|
163
|
-
/* @__PURE__ */ X(
|
|
164
|
+
/* @__PURE__ */ X(m, {
|
|
164
165
|
variant: "ghost",
|
|
165
166
|
children: "Cancel"
|
|
166
167
|
}),
|
|
167
|
-
/* @__PURE__ */ X(
|
|
168
|
+
/* @__PURE__ */ X(m, {
|
|
168
169
|
variant: "outline",
|
|
169
170
|
children: "Save draft"
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */ X(
|
|
172
|
+
/* @__PURE__ */ X(m, { children: "Publish" })
|
|
172
173
|
]
|
|
173
174
|
})
|
|
174
|
-
}) : t === "alert-dialog" ? /* @__PURE__ */ X(
|
|
175
|
+
}) : t === "alert-dialog" ? /* @__PURE__ */ X(p, {
|
|
175
176
|
open: !1,
|
|
176
177
|
title: "Archive invoice?",
|
|
177
178
|
description: "This keeps the invoice readable but removes it from active queues.",
|
|
@@ -179,7 +180,7 @@ function le({ slug: t }) {
|
|
|
179
180
|
variant: "destructive",
|
|
180
181
|
children: "Open alert"
|
|
181
182
|
})
|
|
182
|
-
}) : t === "drawer" ? /* @__PURE__ */ X(
|
|
183
|
+
}) : t === "drawer" ? /* @__PURE__ */ X(g, {
|
|
183
184
|
open: !1,
|
|
184
185
|
trigger: /* @__PURE__ */ X(e, {
|
|
185
186
|
variant: "outline",
|
|
@@ -211,12 +212,12 @@ function le({ slug: t }) {
|
|
|
211
212
|
]
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
-
return e === "pagination" ? /* @__PURE__ */ X(
|
|
215
|
+
function le({ slug: e }) {
|
|
216
|
+
return e === "pagination" ? /* @__PURE__ */ X(u, {
|
|
216
217
|
page: 3,
|
|
217
218
|
pageCount: 9,
|
|
218
219
|
onPageChange: () => void 0
|
|
219
|
-
}) : e === "anchor-nav" ? /* @__PURE__ */ X(
|
|
220
|
+
}) : e === "anchor-nav" ? /* @__PURE__ */ X(ee, {
|
|
220
221
|
orientation: "horizontal",
|
|
221
222
|
title: "Sections",
|
|
222
223
|
items: [
|
|
@@ -237,7 +238,7 @@ function ue({ slug: e }) {
|
|
|
237
238
|
href: "#api"
|
|
238
239
|
}
|
|
239
240
|
]
|
|
240
|
-
}) : e === "page-tabs" ? /* @__PURE__ */ X(
|
|
241
|
+
}) : e === "page-tabs" ? /* @__PURE__ */ X(l, {
|
|
241
242
|
value: "overview",
|
|
242
243
|
variant: "pills",
|
|
243
244
|
items: [
|
|
@@ -255,7 +256,7 @@ function ue({ slug: e }) {
|
|
|
255
256
|
badge: "3"
|
|
256
257
|
}
|
|
257
258
|
]
|
|
258
|
-
}) : e === "stepper-tabs" ? /* @__PURE__ */ X(
|
|
259
|
+
}) : e === "stepper-tabs" ? /* @__PURE__ */ X(d, {
|
|
259
260
|
value: "billing",
|
|
260
261
|
items: [
|
|
261
262
|
{
|
|
@@ -275,7 +276,7 @@ function ue({ slug: e }) {
|
|
|
275
276
|
description: "Confirm release"
|
|
276
277
|
}
|
|
277
278
|
]
|
|
278
|
-
}) : /* @__PURE__ */ X(
|
|
279
|
+
}) : /* @__PURE__ */ X(c, {
|
|
279
280
|
value: "overview",
|
|
280
281
|
items: [
|
|
281
282
|
{
|
|
@@ -293,8 +294,8 @@ function ue({ slug: e }) {
|
|
|
293
294
|
]
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
-
return t === "alert" ? /* @__PURE__ */ X(
|
|
297
|
+
function ue({ slug: t }) {
|
|
298
|
+
return t === "alert" ? /* @__PURE__ */ X(ne, {
|
|
298
299
|
tone: "warning",
|
|
299
300
|
title: "Review needed",
|
|
300
301
|
description: "Billing rules changed and one approval is pending.",
|
|
@@ -302,7 +303,7 @@ function de({ slug: t }) {
|
|
|
302
303
|
size: "sm",
|
|
303
304
|
children: "Open"
|
|
304
305
|
})
|
|
305
|
-
}) : t === "page-state" ? /* @__PURE__ */ X(
|
|
306
|
+
}) : t === "page-state" ? /* @__PURE__ */ X(re, {
|
|
306
307
|
title: "Workspace connected",
|
|
307
308
|
description: "The route is ready to accept live data and team actions.",
|
|
308
309
|
tone: "success",
|
|
@@ -332,7 +333,7 @@ function de({ slug: t }) {
|
|
|
332
333
|
]
|
|
333
334
|
});
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
+
function de({ slug: t }) {
|
|
336
337
|
return t === "description-list" ? /* @__PURE__ */ X(S, {
|
|
337
338
|
title: "Invoice details",
|
|
338
339
|
description: "Structured facts with responsive columns.",
|
|
@@ -425,15 +426,15 @@ function fe({ slug: t }) {
|
|
|
425
426
|
}) : t === "delta-badge" ? /* @__PURE__ */ Z("div", {
|
|
426
427
|
className: "flex flex-wrap gap-2",
|
|
427
428
|
children: [
|
|
428
|
-
/* @__PURE__ */ X(
|
|
429
|
+
/* @__PURE__ */ X(a, {
|
|
429
430
|
variant: "secondary",
|
|
430
431
|
children: "+12.4%"
|
|
431
432
|
}),
|
|
432
|
-
/* @__PURE__ */ X(
|
|
433
|
+
/* @__PURE__ */ X(a, {
|
|
433
434
|
variant: "outline",
|
|
434
435
|
children: "-3.1%"
|
|
435
436
|
}),
|
|
436
|
-
/* @__PURE__ */ X(
|
|
437
|
+
/* @__PURE__ */ X(a, {
|
|
437
438
|
variant: "destructive",
|
|
438
439
|
children: "Risk"
|
|
439
440
|
})
|
|
@@ -522,14 +523,15 @@ function fe({ slug: t }) {
|
|
|
522
523
|
})
|
|
523
524
|
});
|
|
524
525
|
}
|
|
525
|
-
function
|
|
526
|
-
return r === "filter-bar" ? /* @__PURE__ */ X(
|
|
526
|
+
function fe({ slug: r, state: a, setState: s }) {
|
|
527
|
+
return r === "filter-bar" ? /* @__PURE__ */ X(f, {
|
|
527
528
|
search: /* @__PURE__ */ X(i, {
|
|
529
|
+
type: "search",
|
|
528
530
|
value: a.textValue,
|
|
529
|
-
onValueChange: (e) =>
|
|
531
|
+
onValueChange: (e) => s({ textValue: e }),
|
|
530
532
|
placeholder: "Search invoices..."
|
|
531
533
|
}),
|
|
532
|
-
onReset: () =>
|
|
534
|
+
onReset: () => s({ textValue: "" }),
|
|
533
535
|
chips: [{
|
|
534
536
|
key: "status",
|
|
535
537
|
label: "Status",
|
|
@@ -589,7 +591,7 @@ function pe({ slug: r, state: a, setState: o }) {
|
|
|
589
591
|
key: "month",
|
|
590
592
|
label: "Month"
|
|
591
593
|
}
|
|
592
|
-
] }) : r === "quick-action-grid" ? /* @__PURE__ */ X(
|
|
594
|
+
] }) : r === "quick-action-grid" ? /* @__PURE__ */ X(o, {
|
|
593
595
|
columns: 3,
|
|
594
596
|
items: [
|
|
595
597
|
{
|
|
@@ -613,7 +615,7 @@ function pe({ slug: r, state: a, setState: o }) {
|
|
|
613
615
|
]
|
|
614
616
|
}) : r === "data-table-saved-filters" ? /* @__PURE__ */ Z("div", {
|
|
615
617
|
className: "grid gap-3",
|
|
616
|
-
children: [/* @__PURE__ */ X(
|
|
618
|
+
children: [/* @__PURE__ */ X(f, {
|
|
617
619
|
chips: [
|
|
618
620
|
{
|
|
619
621
|
key: "status",
|
|
@@ -668,7 +670,7 @@ function pe({ slug: r, state: a, setState: o }) {
|
|
|
668
670
|
{
|
|
669
671
|
key: "open",
|
|
670
672
|
label: "Open",
|
|
671
|
-
icon: /* @__PURE__ */ X(
|
|
673
|
+
icon: /* @__PURE__ */ X(ie, { className: "size-4" })
|
|
672
674
|
},
|
|
673
675
|
{
|
|
674
676
|
key: "download",
|
|
@@ -691,14 +693,14 @@ function pe({ slug: r, state: a, setState: o }) {
|
|
|
691
693
|
})]
|
|
692
694
|
});
|
|
693
695
|
}
|
|
694
|
-
function
|
|
696
|
+
function pe({ slug: t }) {
|
|
695
697
|
return t === "app-header" ? /* @__PURE__ */ X(L, {
|
|
696
698
|
sticky: !1,
|
|
697
699
|
left: /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(G, { className: "size-4" }), /* @__PURE__ */ X("span", {
|
|
698
700
|
className: "font-medium",
|
|
699
701
|
children: "Dashboard"
|
|
700
702
|
})] }),
|
|
701
|
-
center: /* @__PURE__ */ X(
|
|
703
|
+
center: /* @__PURE__ */ X(a, {
|
|
702
704
|
variant: "secondary",
|
|
703
705
|
children: "Preview"
|
|
704
706
|
}),
|
|
@@ -706,13 +708,13 @@ function $({ slug: t }) {
|
|
|
706
708
|
variant: "ghost",
|
|
707
709
|
size: "icon-sm",
|
|
708
710
|
"aria-label": "Notifications",
|
|
709
|
-
children: /* @__PURE__ */ X(
|
|
711
|
+
children: /* @__PURE__ */ X(H, {})
|
|
710
712
|
}), /* @__PURE__ */ X(e, {
|
|
711
713
|
size: "sm",
|
|
712
714
|
children: "Deploy"
|
|
713
715
|
})] }),
|
|
714
716
|
className: "rounded-xl border border-[color:var(--aui-divider)]"
|
|
715
|
-
}) : t === "section-header" ? /* @__PURE__ */ X(
|
|
717
|
+
}) : t === "section-header" ? /* @__PURE__ */ X(s, {
|
|
716
718
|
eyebrow: "Components",
|
|
717
719
|
title: "Production-ready surfaces",
|
|
718
720
|
description: "SectionHeader keeps copy, metadata and actions aligned.",
|
|
@@ -731,13 +733,14 @@ function $({ slug: t }) {
|
|
|
731
733
|
helperText: "StatCard keeps KPI, helper text and trend in one compact tile."
|
|
732
734
|
});
|
|
733
735
|
}
|
|
734
|
-
function
|
|
736
|
+
function $({ slug: t }) {
|
|
735
737
|
return /* @__PURE__ */ Z("div", {
|
|
736
738
|
className: "overflow-hidden rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)]",
|
|
737
739
|
children: [
|
|
738
740
|
/* @__PURE__ */ Z("div", {
|
|
739
741
|
className: "flex flex-wrap items-center justify-between gap-3 border-b border-[color:var(--aui-divider)] p-3",
|
|
740
742
|
children: [/* @__PURE__ */ X(i, {
|
|
743
|
+
type: "search",
|
|
741
744
|
value: "",
|
|
742
745
|
placeholder: "Search rows...",
|
|
743
746
|
className: "max-w-xs",
|
|
@@ -806,7 +809,7 @@ function me({ slug: t }) {
|
|
|
806
809
|
"data-table-actions-column": "Actions column",
|
|
807
810
|
"data-table-bulk-actions": "Bulk action bar",
|
|
808
811
|
"data-table-view-presets": "Saved view presets"
|
|
809
|
-
}[t] ?? "DataTable part", " preview"] }), /* @__PURE__ */ X(
|
|
812
|
+
}[t] ?? "DataTable part", " preview"] }), /* @__PURE__ */ X(u, {
|
|
810
813
|
page: 1,
|
|
811
814
|
pageCount: 4,
|
|
812
815
|
onPageChange: () => void 0,
|
|
@@ -816,14 +819,14 @@ function me({ slug: t }) {
|
|
|
816
819
|
]
|
|
817
820
|
});
|
|
818
821
|
}
|
|
819
|
-
function
|
|
822
|
+
function me() {
|
|
820
823
|
return /* @__PURE__ */ X(M, {
|
|
821
824
|
value: "2026-06-18",
|
|
822
825
|
defaultMonth: "2026-06-01",
|
|
823
826
|
onValueChange: () => void 0
|
|
824
827
|
});
|
|
825
828
|
}
|
|
826
|
-
function
|
|
829
|
+
function he({ slug: e }) {
|
|
827
830
|
return e === "file-dropzone" ? /* @__PURE__ */ X(P, {
|
|
828
831
|
label: "Drop contract files",
|
|
829
832
|
description: "PDF, PNG or CSV up to 10MB."
|
|
@@ -844,7 +847,7 @@ function ge({ slug: e }) {
|
|
|
844
847
|
})]
|
|
845
848
|
});
|
|
846
849
|
}
|
|
847
|
-
function
|
|
850
|
+
function ge({ slug: e }) {
|
|
848
851
|
let t = [
|
|
849
852
|
{
|
|
850
853
|
id: "profile",
|
|
@@ -885,7 +888,7 @@ function _e({ slug: e }) {
|
|
|
885
888
|
})
|
|
886
889
|
});
|
|
887
890
|
}
|
|
888
|
-
function
|
|
891
|
+
function _e({ slug: t }) {
|
|
889
892
|
return t === "resource-detail-page" ? /* @__PURE__ */ X(R, {
|
|
890
893
|
title: "Customer profile",
|
|
891
894
|
description: "ResourceDetailPage organizes detail screens.",
|
|
@@ -930,8 +933,9 @@ function ve({ slug: t }) {
|
|
|
930
933
|
}
|
|
931
934
|
})]
|
|
932
935
|
}),
|
|
933
|
-
filters: /* @__PURE__ */ X(
|
|
936
|
+
filters: /* @__PURE__ */ X(f, {
|
|
934
937
|
search: /* @__PURE__ */ X(i, {
|
|
938
|
+
type: "search",
|
|
935
939
|
value: "",
|
|
936
940
|
placeholder: "Search...",
|
|
937
941
|
readOnly: !0
|
|
@@ -955,4 +959,4 @@ function ve({ slug: t }) {
|
|
|
955
959
|
});
|
|
956
960
|
}
|
|
957
961
|
//#endregion
|
|
958
|
-
export {
|
|
962
|
+
export { ae as renderShowcasePreview };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={$schema:`https://tembro.dev/registry.schema.json`,name:`tembro`,version:`2.0.
|
|
1
|
+
var e={$schema:`https://tembro.dev/registry.schema.json`,name:`tembro`,version:`2.0.6`,description:`Reusable React + TypeScript UI kit registry`,groups:{ui:[`badge`,`button`,`card`,`checkbox`,`accordion`,`collapse`,`dialog`,`divider`,`dropdown-menu`,`input`,`kbd`,`popover`,`radio-group`,`right-click-menu`,`scroll-box`,`select`,`segmented-control`,`skeleton`,`spinner`,`switch`,`table`,`tabs`,`textarea`,`tooltip`],overlay:[`alert-dialog`,`confirm-dialog`,`drawer`,`modal-shell`,`sheet-shell`],navigation:[`nav-tabs`,`page-tabs`,`pagination`,`stepper-tabs`,`command-bar`],inputs:[`number-input`,`money-input`,`phone-input`,`async-select`,`combobox`,`search-input`,`password-input`,`masked-input`,`quantity-input`,`tag-input`,`otp-input`,`slider`,`rating`,`quantity-stepper`,`inline-editable`,`simple-select`],form:[`form-field-shell`,`form-input`,`form-select`,`form-textarea`,`form-switch`,`form-async-select`],feedback:[`alert`,`loading-state`,`page-state`,`data-state`],display:[`activity-feed`,`avatar`,`code-block`,`data-list`,`data-state`,`info-card`,`kanban`,`list`,`metric-grid`,`progress`,`progress-circle`,`property-grid`,`result`,`statistic`,`status-dot`,`status-legend`,`timeline`,`tree-view`,`user-card`,`trend-card`],actions:[`action-menu`,`button-group`,`copy-button`,`quick-action-grid`],layout:[`app-header`,`sidebar`,`breadcrumbs`,`page-container`,`section`,`section-header`,`sidebar-nav`,`stat-card`,`sticky-footer-bar`],filters:[`filter-bar`,`saved-filter-select`],"data-table":[`data-table`,`data-table-bulk-actions`,`data-table-view-presets`,`data-table-column-visibility-menu`,`data-table-sortable-header`],calendar:[`calendar`,`date-picker`,`date-range-picker`],upload:[`file-upload`,`image-upload`,`file-dropzone`],wizard:[`stepper`,`wizard`],notifications:[`toast`,`notification-center`],command:[],patterns:[`resource-page`,`resource-detail-page`],modern:[`calendar-scheduler`,`dual-list-picker`,`menubar`,`navigation-menu`,`resizable-panel`,`rich-text-editor`,`tour`,`qr-code`,`tag`,`carousel`,`typography`,`json-input`,`time-picker`],hooks:[`use-session-storage-state`,`use-before-unload-when-dirty`,`use-is-mobile`,`use-disclosure`,`use-debounce`,`use-data-table-view-state`],kits:[`dashboard`,`calendar-kit`,`wizard-kit`,`all`]},recommended:`button.input.textarea.checkbox.switch.radio-group.dialog.popover.select.table.badge.card.tabs.collapse.accordion.segmented-control.spinner.tooltip.kbd.sidebar.breadcrumbs.data-state.loading-state.progress.metric-grid.activity-feed.action-menu.date-picker.data-table.notification-center`.split(`.`),recommendedByMode:{foundation:[`button`,`input`,`textarea`,`checkbox`,`switch`,`radio-group`,`dialog`,`popover`,`select`,`table`,`badge`,`card`,`tabs`,`kbd`,`scroll-box`],sourceCopy:[`sidebar`,`sidebar-nav`,`breadcrumbs`,`data-state`,`loading-state`,`metric-grid`,`activity-feed`,`action-menu`,`filter-bar`,`date-picker`,`date-range-picker`,`file-upload`,`file-dropzone`,`use-data-table-view-state`,`data-table`,`form-input`,`form-select`,`form-textarea`,`form-switch`,`notification-center`,`command-bar`],system:[`data-table`,`data-table-view-presets`,`sidebar`,`sidebar-nav`]},publicSurface:{documented:[`button`,`input`,`select`,`card`,`badge`,`checkbox`,`dialog`,`form-field-shell`,`data-table`,`alert`,`charts`,`sidebar`,`file-upload`,`progress`],standalone:`accordion.divider.segmented-control.skeleton.spinner.command-bar.quantity-stepper.inline-editable.avatar.code-block.data-state.kanban.list.property-grid.statistic.tree-view.copy-button.section.sticky-footer-bar.calendar-scheduler.dual-list-picker.menubar.navigation-menu.resizable-panel.rich-text-editor.tour.qr-code.tag.carousel.typography.json-input.time-picker`.split(`.`)},migrationAliases:{"form-async-select":`form-select`,"app-sidebar":`sidebar`,"smart-card":`info-card`}};exports.default=e;
|
package/package.json
CHANGED
|
@@ -1180,4 +1180,4 @@ ${t}`),e.forEach(r=>{let i=ne[r],n=La(r),o=qa(r,i.category),s=i.registryDependen
|
|
|
1180
1180
|
${n}`),o.sort().forEach(s=>{let a=ne[s],c=La(s),u=qa(s,a.category),l=a.registryDependencies?.length?` -> ${a.registryDependencies.join(", ")}`:"";console.log(` ${s} [${c}/${u}]${l}`);});console.log(`
|
|
1181
1181
|
Status:`),console.log(" stable = safe public API"),console.log(" preview = usable but API may change"),console.log(" experimental = not ready for stable app contracts"),console.log(" internal = helper metadata"),console.log(`
|
|
1182
1182
|
Distribution:`),console.log(" foundation = small runtime-safe primitives, hooks, and helpers"),console.log(" source-copy = copy into app source with init/add and edit locally"),console.log(" system = larger product surfaces, kits, and patterns; prefer source-copy only"),console.log(`
|
|
1183
|
-
Usage:`),console.log(` ${$e("add button input data-table")}`),console.log(` ${$e("add form --overwrite")}`);}var Ua=Me(rt());async function Ly(t){let e=process.cwd(),r=G__default.default.join(e,"tembro.json"),i=Ua.default.existsSync(r)?await Ua.default.readJson(r):{},n=t??i.cssPath??i.globalCssPath??"src/index.css",o=await An({cwd:e,cssPath:n});C.success(`Tembro theme CSS yangilandi: ${o}`);}var Je=Me(rt());var qy={minimal:[{source:"src/lib/utils.ts",target:"{utils}"},{source:"src/components/ui/button",target:"{ui}/button"},{source:"src/components/ui/input",target:"{ui}/input"},{source:"src/components/ui/card",target:"{ui}/card"},{source:"src/components/ui/badge",target:"{ui}/badge"}],dashboard:[{source:"src/lib/utils.ts",target:"{utils}"},{source:"src/components/ui/button",target:"{ui}/button"},{source:"src/components/ui/input",target:"{ui}/input"},{source:"src/components/ui/card",target:"{ui}/card"},{source:"src/components/ui/badge",target:"{ui}/badge"},{source:"src/components/ui/dropdown-menu.tsx",target:"{ui}/dropdown-menu.tsx"},{source:"src/components/ui/skeleton.tsx",target:"{ui}/skeleton.tsx"},{source:"src/components/ui/tabs.tsx",target:"{ui}/tabs.tsx"},{source:"src/components/feedback/page-state.tsx",target:"{components}/feedback/page-state.tsx"},{source:"src/components/filters/filter-bar.tsx",target:"{components}/filters/filter-bar.tsx"},{source:"src/components/display/property-grid.tsx",target:"{components}/display/property-grid.tsx"},{source:"src/components/display/smart-card.tsx",target:"{components}/display/smart-card.tsx"},{source:"src/components/data-table/data-table.tsx",target:"{components}/data-table/data-table.tsx"}]};function c1(t,e="@"){return e==="@"?t:t.replaceAll("@/",`${e}/`)}function l1(t,e){let r=e.paths?.components??"src/components",i=e.paths?.ui??"src/components/ui",n=e.utilsPath??"src/lib/utils.ts";return t.replaceAll("{components}",r).replaceAll("{ui}",i).replaceAll("{utils}",n)}async function By(t,e,r,i){if((await Je.default.stat(t)).isDirectory()){let o=await Je.default.readdir(t,{withFileTypes:true});for(let s of o)await By(G__default.default.join(t,s.name),G__default.default.join(e,s.name),r,i);return}if(i.dryRun){C.info(`[dry-run] ${t} -> ${e}`);return}if(Je.default.existsSync(e)&&!i.overwrite){C.warn(`${e} allaqachon mavjud.`);return}await Je.default.ensureDir(G__default.default.dirname(e)),await Je.default.writeFile(e,c1(await Je.default.readFile(t,"utf8"),r)),C.success(`${e} qo\u2018shildi.`);}async function Uy(t,e={}){let r=qy[t];r||(C.error(`Preset topilmadi: ${t}`),process.exit(1));let i=process.cwd(),n=G__default.default.join(i,"tembro.json");Je.default.existsSync(n)||(C.error("tembro.json topilmadi. Avval init qiling."),process.exit(1));let o=await Je.default.readJson(n),s=In((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));for(let a of r){let c=G__default.default.join(s,a.source),u=G__default.default.join(i,l1(a.target,o));await By(c,u,o.alias,e);}}var Ot=new Tt;Ot.name("tembro").description("Tembro source-copy CLI").version("2.0.
|
|
1183
|
+
Usage:`),console.log(` ${$e("add button input data-table")}`),console.log(` ${$e("add form --overwrite")}`);}var Ua=Me(rt());async function Ly(t){let e=process.cwd(),r=G__default.default.join(e,"tembro.json"),i=Ua.default.existsSync(r)?await Ua.default.readJson(r):{},n=t??i.cssPath??i.globalCssPath??"src/index.css",o=await An({cwd:e,cssPath:n});C.success(`Tembro theme CSS yangilandi: ${o}`);}var Je=Me(rt());var qy={minimal:[{source:"src/lib/utils.ts",target:"{utils}"},{source:"src/components/ui/button",target:"{ui}/button"},{source:"src/components/ui/input",target:"{ui}/input"},{source:"src/components/ui/card",target:"{ui}/card"},{source:"src/components/ui/badge",target:"{ui}/badge"}],dashboard:[{source:"src/lib/utils.ts",target:"{utils}"},{source:"src/components/ui/button",target:"{ui}/button"},{source:"src/components/ui/input",target:"{ui}/input"},{source:"src/components/ui/card",target:"{ui}/card"},{source:"src/components/ui/badge",target:"{ui}/badge"},{source:"src/components/ui/dropdown-menu.tsx",target:"{ui}/dropdown-menu.tsx"},{source:"src/components/ui/skeleton.tsx",target:"{ui}/skeleton.tsx"},{source:"src/components/ui/tabs.tsx",target:"{ui}/tabs.tsx"},{source:"src/components/feedback/page-state.tsx",target:"{components}/feedback/page-state.tsx"},{source:"src/components/filters/filter-bar.tsx",target:"{components}/filters/filter-bar.tsx"},{source:"src/components/display/property-grid.tsx",target:"{components}/display/property-grid.tsx"},{source:"src/components/display/smart-card.tsx",target:"{components}/display/smart-card.tsx"},{source:"src/components/data-table/data-table.tsx",target:"{components}/data-table/data-table.tsx"}]};function c1(t,e="@"){return e==="@"?t:t.replaceAll("@/",`${e}/`)}function l1(t,e){let r=e.paths?.components??"src/components",i=e.paths?.ui??"src/components/ui",n=e.utilsPath??"src/lib/utils.ts";return t.replaceAll("{components}",r).replaceAll("{ui}",i).replaceAll("{utils}",n)}async function By(t,e,r,i){if((await Je.default.stat(t)).isDirectory()){let o=await Je.default.readdir(t,{withFileTypes:true});for(let s of o)await By(G__default.default.join(t,s.name),G__default.default.join(e,s.name),r,i);return}if(i.dryRun){C.info(`[dry-run] ${t} -> ${e}`);return}if(Je.default.existsSync(e)&&!i.overwrite){C.warn(`${e} allaqachon mavjud.`);return}await Je.default.ensureDir(G__default.default.dirname(e)),await Je.default.writeFile(e,c1(await Je.default.readFile(t,"utf8"),r)),C.success(`${e} qo\u2018shildi.`);}async function Uy(t,e={}){let r=qy[t];r||(C.error(`Preset topilmadi: ${t}`),process.exit(1));let i=process.cwd(),n=G__default.default.join(i,"tembro.json");Je.default.existsSync(n)||(C.error("tembro.json topilmadi. Avval init qiling."),process.exit(1));let o=await Je.default.readJson(n),s=In((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));for(let a of r){let c=G__default.default.join(s,a.source),u=G__default.default.join(i,l1(a.target,o));await By(c,u,o.alias,e);}}var Ot=new Tt;Ot.name("tembro").description("Tembro source-copy CLI").version("2.0.6");Ot.command("init").description("Initialize local Tembro source files in your project").option("--template <template>","Project defaults: vite or next","vite").option("--skip-install","Do not install base dependencies").option("-y, --defaults","Use template defaults without interactive prompts").action(Py);Ot.command("preset").description("Add a source-copy preset to your project").argument("<name>","preset name: minimal or dashboard").option("-o, --overwrite","overwrite existing files").option("--dry-run","show files without writing").option("--skip-install","do not install package dependencies").action(Uy);Ot.command("list").description("List available registry components").action(jy);Ot.command("add").description("Copy component source files into your project").argument("[components...]","components to add").option("-o, --overwrite","overwrite existing files").option("--dry-run","show files without writing").option("--skip-install","do not install package dependencies").action($y);Ot.command("theme").description("Write or update Tembro theme CSS in your global CSS file").argument("[cssPath]","global CSS path, default from tembro.json or src/index.css").action(Ly);Ot.parse();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { Pagination, type PaginationLabels } from "@/components/navigation/pagination"
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { Select } from "@/components/ui/select"
|
|
4
|
+
import { Pagination, type PaginationLabels } from "@/components/navigation/pagination"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
export type DataTablePaginationLabels = PaginationLabels & {
|
|
8
8
|
rowsPerPage?: React.ReactNode
|
|
@@ -63,9 +63,9 @@ function DataTablePagination({
|
|
|
63
63
|
{showPageSize && onPageSizeChange && (
|
|
64
64
|
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
65
65
|
<span>{labels?.rowsPerPage ?? "Rows per page"}</span>
|
|
66
|
-
<
|
|
66
|
+
<Select
|
|
67
67
|
value={String(pageSize)}
|
|
68
|
-
onValueChange={(value) => onPageSizeChange(Number(value))}
|
|
68
|
+
onValueChange={(value) => onPageSizeChange(Number(value))}
|
|
69
69
|
options={pageSizeOptions.map((option) => ({
|
|
70
70
|
label: String(option),
|
|
71
71
|
value: String(option),
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
|
|
21
21
|
import { createDataTableActionsColumn } from "@/components/data-table/data-table-actions-column"
|
|
22
22
|
import { DataTableBulkActions, type DataTableBulkAction } from "@/components/data-table/data-table-bulk-actions"
|
|
23
|
-
import { DataTableColumnVisibilityMenu } from "@/components/data-table/data-table-column-visibility-menu"
|
|
24
|
-
import { DataTablePagination, type DataTablePaginationProps } from "@/components/data-table/data-table-pagination"
|
|
25
|
-
import { type DataTableRowAction } from "@/components/data-table/data-table-row-actions"
|
|
26
|
-
import { DataTableToolbar, type DataTableToolbarProps } from "@/components/data-table/data-table-toolbar"
|
|
23
|
+
import { DataTableColumnVisibilityMenu } from "@/components/data-table/data-table-column-visibility-menu"
|
|
24
|
+
import { DataTablePagination, type DataTablePaginationProps } from "@/components/data-table/data-table-pagination"
|
|
25
|
+
import { type DataTableRowAction } from "@/components/data-table/data-table-row-actions"
|
|
26
|
+
import { DataTableToolbar, type DataTableToolbarProps } from "@/components/data-table/data-table-toolbar"
|
|
27
27
|
import { DataState, type DataStateProps } from "@/components/display/data-state"
|
|
28
|
-
import { LoadingState, type LoadingStateProps } from "@/components/feedback/loading-state"
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
Table,
|
|
33
|
-
TableBody,
|
|
28
|
+
import { LoadingState, type LoadingStateProps } from "@/components/feedback/loading-state"
|
|
29
|
+
import { Button } from "@/components/ui/button"
|
|
30
|
+
import { Input, type InputSearchProps } from "@/components/ui/input"
|
|
31
|
+
import {
|
|
32
|
+
Table,
|
|
33
|
+
TableBody,
|
|
34
34
|
TableCell,
|
|
35
35
|
TableHead,
|
|
36
36
|
TableHeader,
|
|
@@ -50,12 +50,12 @@ export type DataTableFeatureConfig = {
|
|
|
50
50
|
export?: boolean
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export type DataTableSearchConfig = Pick<
|
|
54
|
-
|
|
55
|
-
| "value"
|
|
56
|
-
| "onValueChange"
|
|
57
|
-
| "placeholder"
|
|
58
|
-
| "inputClassName"
|
|
53
|
+
export type DataTableSearchConfig = Pick<
|
|
54
|
+
InputSearchProps,
|
|
55
|
+
| "value"
|
|
56
|
+
| "onValueChange"
|
|
57
|
+
| "placeholder"
|
|
58
|
+
| "inputClassName"
|
|
59
59
|
| "disabled"
|
|
60
60
|
| "clearable"
|
|
61
61
|
| "clearLabel"
|
|
@@ -324,10 +324,11 @@ function DataTable<TData, TValue = unknown>({
|
|
|
324
324
|
)
|
|
325
325
|
const shouldShowColumnVisibilityInToolbar = shouldShowColumnVisibility && hasPrimaryToolbarContent
|
|
326
326
|
const defaultSearch = shouldShowSearch && search ? (
|
|
327
|
-
<
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
<Input
|
|
328
|
+
type="search"
|
|
329
|
+
value={search.value}
|
|
330
|
+
onValueChange={search.onValueChange}
|
|
331
|
+
placeholder={search.placeholder ?? "Search..."}
|
|
331
332
|
wrapperClassName={search.wrapperClassName ?? search.className}
|
|
332
333
|
inputClassName={search.inputClassName}
|
|
333
334
|
disabled={search.disabled}
|