@skiddph/prui 0.6.0 → 0.8.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/app/resource.d.ts +44 -1
- package/dist/app.js +1 -1
- package/dist/chunks/auth-shell-DQJ4UmUv.js +1208 -0
- package/dist/chunks/data-table-toolbar-B-5J2Ozl.js +736 -0
- package/dist/core/accordion.d.ts +16 -0
- package/dist/core/accordion.js +108 -0
- package/dist/core/alert.d.ts +20 -0
- package/dist/core/alert.js +63 -0
- package/dist/core/anchor.d.ts +35 -0
- package/dist/core/anchor.js +39 -0
- package/dist/core/breadcrumb.d.ts +30 -0
- package/dist/core/breadcrumb.js +67 -0
- package/dist/core/button.d.ts +8 -1
- package/dist/core/button.js +23 -18
- package/dist/core/calendar.d.ts +29 -0
- package/dist/core/calendar.js +180 -0
- package/dist/core/card.d.ts +5 -1
- package/dist/core/card.js +33 -29
- package/dist/core/checkbox.d.ts +19 -0
- package/dist/core/checkbox.js +55 -0
- package/dist/core/combobox.d.ts +32 -0
- package/dist/core/combobox.js +183 -0
- package/dist/core/date-picker.d.ts +41 -0
- package/dist/core/date-picker.js +202 -0
- package/dist/core/dialog.d.ts +8 -0
- package/dist/core/dialog.js +59 -61
- package/dist/core/drawer.d.ts +34 -0
- package/dist/core/drawer.js +129 -0
- package/dist/core/dropdown.d.ts +8 -4
- package/dist/core/dropdown.js +136 -51
- package/dist/core/file-upload.d.ts +28 -0
- package/dist/core/file-upload.js +111 -0
- package/dist/core/index.d.ts +21 -0
- package/dist/core/list-nav.d.ts +27 -0
- package/dist/core/list-nav.js +51 -0
- package/dist/core/modal.d.ts +14 -5
- package/dist/core/modal.js +163 -156
- package/dist/core/overlay.d.ts +93 -0
- package/dist/core/overlay.js +189 -0
- package/dist/core/popover.d.ts +29 -0
- package/dist/core/popover.js +124 -0
- package/dist/core/progress.d.ts +21 -0
- package/dist/core/progress.js +59 -0
- package/dist/core/radio.d.ts +20 -0
- package/dist/core/radio.js +115 -0
- package/dist/core/select.d.ts +6 -0
- package/dist/core/select.js +178 -97
- package/dist/core/skeleton.d.ts +20 -0
- package/dist/core/skeleton.js +41 -0
- package/dist/core/spinner.d.ts +15 -0
- package/dist/core/spinner.js +41 -0
- package/dist/core/tabs.js +82 -53
- package/dist/core/timeline.d.ts +22 -0
- package/dist/core/timeline.js +57 -0
- package/dist/core/toast.d.ts +36 -0
- package/dist/core/toast.js +123 -0
- package/dist/core/tooltip.d.ts +23 -0
- package/dist/core/tooltip.js +96 -0
- package/dist/core/tree-view.d.ts +34 -0
- package/dist/core/tree-view.js +133 -0
- package/dist/core.js +152 -62
- package/dist/data-table/data-table.d.ts +22 -1
- package/dist/data-table.js +1 -1
- package/dist/forms/form.d.ts +8 -0
- package/dist/forms.js +213 -200
- package/dist/i18n/index.d.ts +83 -0
- package/dist/i18n.js +99 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +256 -156
- package/dist/prui-utilities.css +1 -1
- package/dist/prui.css +111 -4
- package/dist/theme/base.css +110 -3
- package/dist/theme/index.d.ts +27 -0
- package/dist/theme.js +86 -58
- package/package.json +9 -2
- package/dist/chunks/auth-shell-CW2XMz2G.js +0 -969
- package/dist/chunks/data-table-toolbar-BUy2EWPy.js +0 -581
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { ArrowUp as fe, ArrowDown as be, ArrowUpDown as xe, Inbox as he, ChevronRight as F, ChevronLeft as ye, Check as Ne, PlusCircle as ge, Search as ke } from "lucide-react";
|
|
4
|
+
import { cn as I } from "../core/cn.js";
|
|
5
|
+
import { usePruiI18n as G } from "../i18n.js";
|
|
6
|
+
import { Button as A } from "../core/button.js";
|
|
7
|
+
import { Select as we, SelectTrigger as Se, SelectValue as Te, SelectContent as De, SelectItem as Re } from "../core/select.js";
|
|
8
|
+
import { Input as T } from "../core/input.js";
|
|
9
|
+
import { Badge as je } from "../core/card.js";
|
|
10
|
+
import { Dropdown as Ue } from "../core/dropdown.js";
|
|
11
|
+
import { Label as j } from "../core/label.js";
|
|
12
|
+
function Ve({
|
|
13
|
+
columns: r,
|
|
14
|
+
rows: u,
|
|
15
|
+
rowKey: v,
|
|
16
|
+
sort: p,
|
|
17
|
+
onSortChange: d,
|
|
18
|
+
defaultSort: s = null,
|
|
19
|
+
loading: f = !1,
|
|
20
|
+
emptyMessage: b,
|
|
21
|
+
onRowClick: n,
|
|
22
|
+
selectable: l,
|
|
23
|
+
selectedRowKeys: o,
|
|
24
|
+
onSelectionChange: m,
|
|
25
|
+
renderExpandedRow: a,
|
|
26
|
+
expandedRowKeys: g,
|
|
27
|
+
onExpandedRowsChange: x,
|
|
28
|
+
virtualized: k = !1,
|
|
29
|
+
className: C
|
|
30
|
+
}) {
|
|
31
|
+
const { t: J } = G(), [ee, te] = y.useState(s), [ae, le] = y.useState([]), [re, ne] = y.useState([]), Z = p !== void 0, h = Z ? p : ee, E = o !== void 0, $ = E ? o : ae, O = g !== void 0, B = O ? g : re, M = l !== void 0 && l !== !1, L = l === !0 || typeof l == "object" && l.multiple !== !1, U = y.useCallback(
|
|
32
|
+
(t, i) => {
|
|
33
|
+
if (v) return v(t, i);
|
|
34
|
+
const N = t.id;
|
|
35
|
+
return N !== void 0 ? N : i;
|
|
36
|
+
},
|
|
37
|
+
[v]
|
|
38
|
+
), z = y.useMemo(() => r.filter((t) => !t.hidden), [r]), S = y.useMemo(() => {
|
|
39
|
+
if (!h) return u;
|
|
40
|
+
const t = r.find((N) => N.key === h.key);
|
|
41
|
+
if (!(t != null && t.sortable)) return u;
|
|
42
|
+
const i = h.direction === "asc" ? 1 : -1;
|
|
43
|
+
return [...u].sort((N, R) => {
|
|
44
|
+
const P = N[h.key], W = R[h.key];
|
|
45
|
+
return P == null && W == null ? 0 : P == null ? 1 : W == null ? -1 : typeof P == "number" && typeof W == "number" ? (P - W) * i : String(P).localeCompare(String(W)) * i;
|
|
46
|
+
});
|
|
47
|
+
}, [u, h, r]), ie = (t) => {
|
|
48
|
+
const i = r.find((R) => R.key === t);
|
|
49
|
+
if (!(i != null && i.sortable)) return;
|
|
50
|
+
const N = (h == null ? void 0 : h.key) === t ? h.direction === "asc" ? { key: t, direction: "desc" } : null : { key: t, direction: "asc" };
|
|
51
|
+
Z || te(N), d == null || d(N);
|
|
52
|
+
}, q = (t) => {
|
|
53
|
+
E || le(t), m == null || m(t, u.filter((i, N) => t.includes(U(i, N))));
|
|
54
|
+
}, se = (t, i) => {
|
|
55
|
+
if (!L) {
|
|
56
|
+
const R = $.includes(t) ? [] : [t];
|
|
57
|
+
q(R);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const N = $.includes(t) ? $.filter((R) => R !== t) : [...$, t];
|
|
61
|
+
q(N);
|
|
62
|
+
}, Q = M && S.length > 0 && S.every((t, i) => $.includes(U(t, i))), oe = M && !Q && S.some((t, i) => $.includes(U(t, i))), ce = () => {
|
|
63
|
+
q(Q ? L ? [] : [] : S.map((t, i) => U(t, i)));
|
|
64
|
+
}, de = (t) => {
|
|
65
|
+
O || ne(t), x == null || x(t);
|
|
66
|
+
}, ue = (t) => {
|
|
67
|
+
de(B.includes(t) ? B.filter((i) => i !== t) : [...B, t]);
|
|
68
|
+
}, X = y.useRef(null), [H, me] = y.useState(41), [D, pe] = y.useState({ start: 0, end: 50 }), w = k && S.length > 50, Y = y.useCallback(() => {
|
|
69
|
+
const t = X.current;
|
|
70
|
+
if (!t) return;
|
|
71
|
+
const i = 8, N = Math.max(0, Math.floor(t.scrollTop / H) - i), R = Math.ceil(t.clientHeight / H) + i * 2;
|
|
72
|
+
pe({ start: N, end: N + R });
|
|
73
|
+
}, [H]);
|
|
74
|
+
y.useEffect(() => {
|
|
75
|
+
if (!w) return;
|
|
76
|
+
const t = X.current;
|
|
77
|
+
if (!t) return;
|
|
78
|
+
const i = t.querySelector("tbody tr");
|
|
79
|
+
i && i.offsetHeight > 0 && me(i.offsetHeight), Y();
|
|
80
|
+
}, [w, Y, S.length]);
|
|
81
|
+
const ve = w ? S.slice(D.start, D.end) : S, V = w ? D.start * H : 0, K = w ? Math.max(0, (S.length - D.end) * H) : 0;
|
|
82
|
+
return /* @__PURE__ */ e(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
ref: X,
|
|
86
|
+
onScroll: w ? Y : void 0,
|
|
87
|
+
className: I(
|
|
88
|
+
"prui-data-table w-full overflow-auto rounded-[var(--prui-radius)] border border-[var(--prui-line)]",
|
|
89
|
+
w && "max-h-[70vh]",
|
|
90
|
+
C
|
|
91
|
+
),
|
|
92
|
+
children: /* @__PURE__ */ c("table", { className: "w-full text-sm", children: [
|
|
93
|
+
/* @__PURE__ */ e("thead", { className: "sticky top-0 z-[var(--prui-z-content)]", children: /* @__PURE__ */ c("tr", { className: "border-b border-[var(--prui-line)] bg-[var(--prui-raise)]", children: [
|
|
94
|
+
a ? /* @__PURE__ */ e("th", { scope: "col", className: "w-8 px-3 py-2", "aria-label": void 0, children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle row" }) }) : null,
|
|
95
|
+
M ? /* @__PURE__ */ e("th", { scope: "col", className: "w-10 px-3 py-2", children: L ? /* @__PURE__ */ e(
|
|
96
|
+
"input",
|
|
97
|
+
{
|
|
98
|
+
type: "checkbox",
|
|
99
|
+
"aria-label": J.selectAllRows,
|
|
100
|
+
checked: Q,
|
|
101
|
+
ref: (t) => {
|
|
102
|
+
t && (t.indeterminate = oe);
|
|
103
|
+
},
|
|
104
|
+
onChange: ce,
|
|
105
|
+
className: "h-4 w-4 cursor-pointer accent-[var(--prui-brand)]"
|
|
106
|
+
}
|
|
107
|
+
) : /* @__PURE__ */ e("span", { className: "sr-only", children: "Selected" }) }) : null,
|
|
108
|
+
z.map((t) => {
|
|
109
|
+
const i = (h == null ? void 0 : h.key) === t.key, N = i ? (h == null ? void 0 : h.direction) === "asc" ? fe : be : xe;
|
|
110
|
+
return /* @__PURE__ */ e(
|
|
111
|
+
"th",
|
|
112
|
+
{
|
|
113
|
+
scope: "col",
|
|
114
|
+
"aria-sort": i ? (h == null ? void 0 : h.direction) === "asc" ? "ascending" : "descending" : t.sortable ? "none" : void 0,
|
|
115
|
+
style: t.width !== void 0 ? { width: t.width } : void 0,
|
|
116
|
+
className: I(
|
|
117
|
+
"px-3 py-2 text-xs font-medium uppercase tracking-wide text-[var(--prui-dim)]",
|
|
118
|
+
t.align === "right" && "text-right",
|
|
119
|
+
t.align === "center" && "text-center"
|
|
120
|
+
),
|
|
121
|
+
children: t.sortable ? /* @__PURE__ */ c(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
type: "button",
|
|
125
|
+
onClick: () => ie(t.key),
|
|
126
|
+
className: I(
|
|
127
|
+
"inline-flex items-center gap-1 hover:text-[var(--prui-fg)] cursor-pointer uppercase",
|
|
128
|
+
i && "text-[var(--prui-fg)]"
|
|
129
|
+
),
|
|
130
|
+
children: [
|
|
131
|
+
t.label,
|
|
132
|
+
/* @__PURE__ */ e(N, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
) : t.label
|
|
136
|
+
},
|
|
137
|
+
t.key
|
|
138
|
+
);
|
|
139
|
+
})
|
|
140
|
+
] }) }),
|
|
141
|
+
/* @__PURE__ */ e("tbody", { children: f ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: z.length + (M ? 1 : 0) + (a ? 1 : 0), className: "px-3 py-8 text-center text-[var(--prui-dim)]", "data-testid": "data-table-loading", children: J.loading }) }) : S.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: z.length + (M ? 1 : 0) + (a ? 1 : 0), className: "px-3 py-8 text-center text-[var(--prui-dim)]", "data-testid": "data-table-empty", children: /* @__PURE__ */ c("span", { className: "inline-flex items-center gap-2", children: [
|
|
142
|
+
/* @__PURE__ */ e(he, { className: "h-4 w-4", "aria-hidden": !0 }),
|
|
143
|
+
b ?? J.noResults
|
|
144
|
+
] }) }) }) : /* @__PURE__ */ c(_, { children: [
|
|
145
|
+
V > 0 ? /* @__PURE__ */ e("tr", { "aria-hidden": !0, style: { height: V }, children: /* @__PURE__ */ e("td", { colSpan: z.length + 2, style: { padding: 0, border: 0 } }) }) : null,
|
|
146
|
+
ve.map((t, i) => /* @__PURE__ */ e(
|
|
147
|
+
Me,
|
|
148
|
+
{
|
|
149
|
+
row: t,
|
|
150
|
+
index: w ? D.start + i : i,
|
|
151
|
+
rowKeyValue: U(t, w ? D.start + i : i),
|
|
152
|
+
columns: z,
|
|
153
|
+
onRowClick: n,
|
|
154
|
+
selectable: M,
|
|
155
|
+
selected: $.includes(U(t, w ? D.start + i : i)),
|
|
156
|
+
selectionMultiple: L,
|
|
157
|
+
onToggleSelected: se,
|
|
158
|
+
expandable: !!a,
|
|
159
|
+
expanded: B.includes(U(t, w ? D.start + i : i)),
|
|
160
|
+
onToggleExpanded: ue,
|
|
161
|
+
renderExpandedRow: a,
|
|
162
|
+
colCount: z.length + (M ? 1 : 0) + (a ? 1 : 0)
|
|
163
|
+
},
|
|
164
|
+
v ? v(t, D.start + i) : U(t, i)
|
|
165
|
+
)),
|
|
166
|
+
K > 0 ? /* @__PURE__ */ e("tr", { "aria-hidden": !0, style: { height: K }, children: /* @__PURE__ */ e("td", { colSpan: z.length + 2, style: { padding: 0, border: 0 } }) }) : null
|
|
167
|
+
] }) })
|
|
168
|
+
] })
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
function $e({
|
|
173
|
+
row: r,
|
|
174
|
+
index: u,
|
|
175
|
+
rowKeyValue: v,
|
|
176
|
+
columns: p,
|
|
177
|
+
onRowClick: d,
|
|
178
|
+
selectable: s,
|
|
179
|
+
selected: f,
|
|
180
|
+
selectionMultiple: b,
|
|
181
|
+
onToggleSelected: n,
|
|
182
|
+
expandable: l,
|
|
183
|
+
expanded: o,
|
|
184
|
+
onToggleExpanded: m,
|
|
185
|
+
renderExpandedRow: a,
|
|
186
|
+
colCount: g
|
|
187
|
+
}) {
|
|
188
|
+
const { t: x } = G();
|
|
189
|
+
return /* @__PURE__ */ c(_, { children: [
|
|
190
|
+
/* @__PURE__ */ c(
|
|
191
|
+
"tr",
|
|
192
|
+
{
|
|
193
|
+
"data-selected": f || void 0,
|
|
194
|
+
"aria-selected": s ? f : void 0,
|
|
195
|
+
onClick: d ? () => d(r, u) : void 0,
|
|
196
|
+
className: I(
|
|
197
|
+
"border-b border-[var(--prui-line)] last:border-b-0 text-[var(--prui-fg)]",
|
|
198
|
+
d && "cursor-pointer hover:bg-[var(--prui-raise)]",
|
|
199
|
+
f && "bg-[var(--prui-brand)]/8"
|
|
200
|
+
),
|
|
201
|
+
children: [
|
|
202
|
+
l ? /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(
|
|
203
|
+
"button",
|
|
204
|
+
{
|
|
205
|
+
type: "button",
|
|
206
|
+
"aria-label": o ? x.collapseRow : x.expandRow,
|
|
207
|
+
"aria-expanded": o,
|
|
208
|
+
onClick: (k) => {
|
|
209
|
+
k.stopPropagation(), m(v);
|
|
210
|
+
},
|
|
211
|
+
className: "inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-[var(--prui-radius-1)] text-[var(--prui-dim)] hover:bg-[var(--prui-raise)] hover:text-[var(--prui-fg)]",
|
|
212
|
+
children: /* @__PURE__ */ e(F, { className: I("h-3.5 w-3.5 transition-transform", o && "rotate-90"), "aria-hidden": !0 })
|
|
213
|
+
}
|
|
214
|
+
) }) : null,
|
|
215
|
+
s ? /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(
|
|
216
|
+
"input",
|
|
217
|
+
{
|
|
218
|
+
type: b ? "checkbox" : "radio",
|
|
219
|
+
"aria-label": `${x.selectRow} ${u + 1}`,
|
|
220
|
+
checked: f,
|
|
221
|
+
onChange: () => n(v, r),
|
|
222
|
+
onClick: (k) => k.stopPropagation(),
|
|
223
|
+
className: "h-4 w-4 cursor-pointer accent-[var(--prui-brand)]"
|
|
224
|
+
}
|
|
225
|
+
) }) : null,
|
|
226
|
+
p.map((k) => /* @__PURE__ */ e(
|
|
227
|
+
"td",
|
|
228
|
+
{
|
|
229
|
+
className: I(
|
|
230
|
+
"px-3 py-2",
|
|
231
|
+
k.align === "right" && "text-right",
|
|
232
|
+
k.align === "center" && "text-center",
|
|
233
|
+
k.className
|
|
234
|
+
),
|
|
235
|
+
children: k.render ? k.render(r) : /* @__PURE__ */ e(ze, { value: r[k.key] })
|
|
236
|
+
},
|
|
237
|
+
k.key
|
|
238
|
+
))
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
l && o && a ? /* @__PURE__ */ e("tr", { "data-expanded-row": String(v), children: /* @__PURE__ */ e("td", { colSpan: g, className: "border-b border-[var(--prui-line)] bg-[var(--prui-raise)]/40 px-4 py-3", children: a(r) }) }) : null
|
|
243
|
+
] });
|
|
244
|
+
}
|
|
245
|
+
const Me = y.memo($e);
|
|
246
|
+
function ze({ value: r }) {
|
|
247
|
+
const { t: u } = G();
|
|
248
|
+
return typeof r == "boolean" ? /* @__PURE__ */ e("span", { children: r ? u.yes : u.no }) : /* @__PURE__ */ e(_, { children: Ie(r) });
|
|
249
|
+
}
|
|
250
|
+
function Ie(r) {
|
|
251
|
+
return r == null || r === "" ? /* @__PURE__ */ e("span", { className: "text-[var(--prui-dim)]", children: "-" }) : r instanceof Date ? r.toLocaleDateString() : String(r);
|
|
252
|
+
}
|
|
253
|
+
const Ke = {
|
|
254
|
+
name: "DataTable",
|
|
255
|
+
props: [
|
|
256
|
+
{ name: "columns", type: "Column<T>[]", default: null, control: "object" },
|
|
257
|
+
{ name: "rows", type: "T[]", default: "[]", control: "object" },
|
|
258
|
+
{ name: "sort", type: "{ key, direction } | null", default: "undefined", control: "none" },
|
|
259
|
+
{ name: "onSortChange", type: "(sort) => void", default: null, control: "none" },
|
|
260
|
+
{ name: "loading", type: "boolean", default: "false", control: "boolean" },
|
|
261
|
+
{ name: "emptyMessage", type: "ReactNode", default: "'No results.'", control: "text" },
|
|
262
|
+
{ name: "onRowClick", type: "(row, index) => void", default: null, control: "none" },
|
|
263
|
+
{ name: "selectable", type: "boolean | { multiple?: boolean }", default: "undefined", control: "boolean", description: "Renders a checkbox column." },
|
|
264
|
+
{ name: "selectedRowKeys", type: "(string | number)[]", default: "undefined", control: "object" },
|
|
265
|
+
{ name: "onSelectionChange", type: "(keys, rows) => void", default: null, control: "none" },
|
|
266
|
+
{ name: "renderExpandedRow", type: "(row) => ReactNode", default: null, control: "none" },
|
|
267
|
+
{ name: "expandedRowKeys", type: "(string | number)[]", default: "undefined", control: "object" },
|
|
268
|
+
{ name: "onExpandedRowsChange", type: "(keys) => void", default: null, control: "none" },
|
|
269
|
+
{ name: "virtualized", type: "boolean", default: "false", control: "boolean", description: "Window-render large row sets." }
|
|
270
|
+
]
|
|
271
|
+
};
|
|
272
|
+
function Fe({
|
|
273
|
+
page: r,
|
|
274
|
+
pageSize: u = 20,
|
|
275
|
+
hasNextPage: v,
|
|
276
|
+
hasPreviousPage: p,
|
|
277
|
+
onPageChange: d,
|
|
278
|
+
onPageSizeChange: s,
|
|
279
|
+
pageSizeOptions: f = [10, 20, 50, 100],
|
|
280
|
+
className: b
|
|
281
|
+
}) {
|
|
282
|
+
const { t: n } = G();
|
|
283
|
+
return /* @__PURE__ */ c("div", { className: b ?? "flex items-center justify-between gap-2 py-2", children: [
|
|
284
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-sm text-[var(--prui-dim)]", children: [
|
|
285
|
+
/* @__PURE__ */ e("span", { children: n.rowsPerPage }),
|
|
286
|
+
/* @__PURE__ */ e("div", { className: "w-20", children: /* @__PURE__ */ c(
|
|
287
|
+
we,
|
|
288
|
+
{
|
|
289
|
+
value: String(u),
|
|
290
|
+
onChange: (l) => s == null ? void 0 : s(Number(l)),
|
|
291
|
+
options: f.map((l) => ({ label: String(l), value: String(l) })),
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ e(Se, { "aria-label": n.rowsPerPage, className: "h-7", children: /* @__PURE__ */ e(Te, {}) }),
|
|
294
|
+
/* @__PURE__ */ e(De, { children: f.map((l) => /* @__PURE__ */ e(Re, { value: String(l), children: l }, l)) })
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
) })
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
300
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[var(--prui-dim)]", "data-testid": "pagination-page", children: `${n.page} ${r}` }),
|
|
301
|
+
/* @__PURE__ */ e(
|
|
302
|
+
A,
|
|
303
|
+
{
|
|
304
|
+
variant: "default",
|
|
305
|
+
size: "icon",
|
|
306
|
+
"aria-label": n.previousPage,
|
|
307
|
+
disabled: !p,
|
|
308
|
+
onClick: () => d == null ? void 0 : d(r - 1, "prev"),
|
|
309
|
+
children: /* @__PURE__ */ e(ye, { className: "h-4 w-4", "aria-hidden": !0 })
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
/* @__PURE__ */ e(
|
|
313
|
+
A,
|
|
314
|
+
{
|
|
315
|
+
variant: "default",
|
|
316
|
+
size: "icon",
|
|
317
|
+
"aria-label": n.nextPage,
|
|
318
|
+
disabled: !v,
|
|
319
|
+
onClick: () => d == null ? void 0 : d(r + 1, "next"),
|
|
320
|
+
children: /* @__PURE__ */ e(F, { className: "h-4 w-4", "aria-hidden": !0 })
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
] })
|
|
324
|
+
] });
|
|
325
|
+
}
|
|
326
|
+
const Ce = {
|
|
327
|
+
name: "DataTablePagination",
|
|
328
|
+
props: [
|
|
329
|
+
{ name: "page", type: "number", default: null, control: "number" },
|
|
330
|
+
{ name: "pageSize", type: "number", default: "20", control: "select", options: ["10", "20", "50", "100"] },
|
|
331
|
+
{ name: "hasNextPage", type: "boolean", default: null, control: "boolean" },
|
|
332
|
+
{ name: "hasPreviousPage", type: "boolean", default: null, control: "boolean" },
|
|
333
|
+
{ name: "onPageChange", type: "(page, direction) => void", default: null, control: "none" },
|
|
334
|
+
{ name: "onPageSizeChange", type: "(size) => void", default: null, control: "none" }
|
|
335
|
+
]
|
|
336
|
+
};
|
|
337
|
+
function Ae({
|
|
338
|
+
label: r,
|
|
339
|
+
options: u,
|
|
340
|
+
value: v,
|
|
341
|
+
defaultValue: p,
|
|
342
|
+
onChange: d,
|
|
343
|
+
className: s
|
|
344
|
+
}) {
|
|
345
|
+
const [f, b] = y.useState(p ?? []), n = v !== void 0, l = n ? v : f, o = (m) => {
|
|
346
|
+
const a = l.includes(m) ? l.filter((g) => g !== m) : [...l, m];
|
|
347
|
+
n || b(a), d == null || d(a);
|
|
348
|
+
};
|
|
349
|
+
return /* @__PURE__ */ e(
|
|
350
|
+
Ue,
|
|
351
|
+
{
|
|
352
|
+
className: s,
|
|
353
|
+
trigger: /* @__PURE__ */ c(
|
|
354
|
+
"button",
|
|
355
|
+
{
|
|
356
|
+
type: "button",
|
|
357
|
+
className: "prui-faceted-filter inline-flex h-8 items-center gap-1.5 rounded-[var(--prui-radius)] border border-[var(--prui-line)] bg-[var(--prui-background)] px-2.5 text-sm cursor-pointer hover:border-[var(--prui-dim)]",
|
|
358
|
+
"data-testid": "faceted-filter",
|
|
359
|
+
children: [
|
|
360
|
+
/* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5 text-[var(--prui-dim)]", "aria-hidden": !0 }),
|
|
361
|
+
r,
|
|
362
|
+
l.length > 0 ? /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e("span", { className: "ml-1 rounded-[var(--prui-radius-full)] bg-[var(--prui-raise)] px-1.5 text-xs", children: l.length }) }) : null
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
children: /* @__PURE__ */ c("div", { role: "menu", className: "min-w-44", children: [
|
|
367
|
+
u.length === 0 ? /* @__PURE__ */ e("div", { className: "px-2 py-1.5 text-sm text-[var(--prui-dim)]", children: "No options" }) : u.map((m) => {
|
|
368
|
+
const a = l.includes(m.value);
|
|
369
|
+
return /* @__PURE__ */ c(
|
|
370
|
+
"button",
|
|
371
|
+
{
|
|
372
|
+
type: "button",
|
|
373
|
+
role: "menuitemcheckbox",
|
|
374
|
+
"aria-checked": a,
|
|
375
|
+
onClick: () => o(m.value),
|
|
376
|
+
"data-selected": a || void 0,
|
|
377
|
+
className: "flex w-full cursor-pointer items-center gap-2 rounded-[calc(var(--prui-radius)-1px)] px-2 py-1.5 text-left text-sm text-[var(--prui-fg)] hover:bg-[var(--prui-raise)]",
|
|
378
|
+
children: [
|
|
379
|
+
/* @__PURE__ */ e(
|
|
380
|
+
"span",
|
|
381
|
+
{
|
|
382
|
+
className: "flex h-4 w-4 items-center justify-center rounded-[var(--prui-radius-1)] border border-[var(--prui-line)]",
|
|
383
|
+
style: a ? { backgroundColor: "var(--prui-brand)", borderColor: "var(--prui-brand)" } : void 0,
|
|
384
|
+
children: a ? /* @__PURE__ */ e(Ne, { className: "h-3 w-3 text-white", "aria-hidden": !0 }) : null
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
m.label,
|
|
388
|
+
m.count !== void 0 ? /* @__PURE__ */ e(je, { variant: "outline", className: "ml-auto", children: m.count }) : null
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
m.value
|
|
392
|
+
);
|
|
393
|
+
}),
|
|
394
|
+
l.length > 0 ? /* @__PURE__ */ c(
|
|
395
|
+
"button",
|
|
396
|
+
{
|
|
397
|
+
type: "button",
|
|
398
|
+
onClick: () => {
|
|
399
|
+
n || b([]), d == null || d([]);
|
|
400
|
+
},
|
|
401
|
+
className: "mt-1 w-full cursor-pointer rounded-[calc(var(--prui-radius)-1px)] border-t border-[var(--prui-line)] px-2 py-1.5 text-left text-xs text-[var(--prui-dim)] hover:text-[var(--prui-fg)]",
|
|
402
|
+
children: [
|
|
403
|
+
"Clear (",
|
|
404
|
+
l.length,
|
|
405
|
+
")"
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
) : null
|
|
409
|
+
] })
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
function He({
|
|
414
|
+
label: r = "Date range",
|
|
415
|
+
value: u,
|
|
416
|
+
defaultValue: v,
|
|
417
|
+
onChange: p,
|
|
418
|
+
className: d
|
|
419
|
+
}) {
|
|
420
|
+
const [s, f] = y.useState(v ?? {}), b = u !== void 0, n = b ? u : s, l = (o) => {
|
|
421
|
+
b || f(o), p == null || p(o);
|
|
422
|
+
};
|
|
423
|
+
return /* @__PURE__ */ c("div", { className: d ?? "flex items-end gap-2", "data-testid": "daterange-filter", children: [
|
|
424
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
425
|
+
/* @__PURE__ */ c(j, { className: "text-xs text-[var(--prui-dim)]", children: [
|
|
426
|
+
r,
|
|
427
|
+
" from"
|
|
428
|
+
] }),
|
|
429
|
+
/* @__PURE__ */ e(
|
|
430
|
+
T,
|
|
431
|
+
{
|
|
432
|
+
type: "date",
|
|
433
|
+
"aria-label": `${r} from`,
|
|
434
|
+
className: "h-8 w-36",
|
|
435
|
+
value: n.from ?? "",
|
|
436
|
+
onChange: (o) => l({ ...n, from: o.target.value || void 0 })
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
] }),
|
|
440
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
441
|
+
/* @__PURE__ */ e(j, { className: "text-xs text-[var(--prui-dim)]", children: "to" }),
|
|
442
|
+
/* @__PURE__ */ e(
|
|
443
|
+
T,
|
|
444
|
+
{
|
|
445
|
+
type: "date",
|
|
446
|
+
"aria-label": `${r} to`,
|
|
447
|
+
className: "h-8 w-36",
|
|
448
|
+
value: n.to ?? "",
|
|
449
|
+
onChange: (o) => l({ ...n, to: o.target.value || void 0 })
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
] }),
|
|
453
|
+
n.from || n.to ? /* @__PURE__ */ e(A, { variant: "ghost", size: "sm", onClick: () => l({}), children: "Clear" }) : null
|
|
454
|
+
] });
|
|
455
|
+
}
|
|
456
|
+
function Pe({
|
|
457
|
+
label: r = "Date",
|
|
458
|
+
value: u,
|
|
459
|
+
defaultValue: v,
|
|
460
|
+
onChange: p,
|
|
461
|
+
className: d
|
|
462
|
+
}) {
|
|
463
|
+
const [s, f] = y.useState(v ?? {}), b = u !== void 0, n = b ? u : s, l = (o) => {
|
|
464
|
+
b || f(o), p == null || p(o);
|
|
465
|
+
};
|
|
466
|
+
return /* @__PURE__ */ c("div", { className: d ?? "flex items-end gap-2", "data-testid": "date-filter", children: [
|
|
467
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
468
|
+
/* @__PURE__ */ e(j, { className: "text-xs text-[var(--prui-dim)]", children: r }),
|
|
469
|
+
/* @__PURE__ */ e(
|
|
470
|
+
T,
|
|
471
|
+
{
|
|
472
|
+
type: "date",
|
|
473
|
+
"aria-label": r,
|
|
474
|
+
className: "h-8 w-36",
|
|
475
|
+
value: n.date ?? "",
|
|
476
|
+
onChange: (o) => l({ date: o.target.value || void 0 })
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
] }),
|
|
480
|
+
n.date ? /* @__PURE__ */ e(A, { variant: "ghost", size: "sm", onClick: () => l({}), children: "Clear" }) : null
|
|
481
|
+
] });
|
|
482
|
+
}
|
|
483
|
+
function We({
|
|
484
|
+
label: r = "Range",
|
|
485
|
+
value: u,
|
|
486
|
+
defaultValue: v,
|
|
487
|
+
onChange: p,
|
|
488
|
+
className: d
|
|
489
|
+
}) {
|
|
490
|
+
const [s, f] = y.useState(v ?? {}), b = u !== void 0, n = b ? u : s, l = (m) => {
|
|
491
|
+
b || f(m), p == null || p(m);
|
|
492
|
+
}, o = (m) => {
|
|
493
|
+
if (m === "") return;
|
|
494
|
+
const a = Number(m);
|
|
495
|
+
return Number.isNaN(a) ? void 0 : a;
|
|
496
|
+
};
|
|
497
|
+
return /* @__PURE__ */ c("div", { className: d ?? "flex items-end gap-2", "data-testid": "numberrange-filter", children: [
|
|
498
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
499
|
+
/* @__PURE__ */ c(j, { className: "text-xs text-[var(--prui-dim)]", children: [
|
|
500
|
+
r,
|
|
501
|
+
" min"
|
|
502
|
+
] }),
|
|
503
|
+
/* @__PURE__ */ e(
|
|
504
|
+
T,
|
|
505
|
+
{
|
|
506
|
+
type: "number",
|
|
507
|
+
"aria-label": `${r} min`,
|
|
508
|
+
className: "h-8 w-24",
|
|
509
|
+
value: n.min ?? "",
|
|
510
|
+
onChange: (m) => l({ ...n, min: o(m.target.value) })
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
] }),
|
|
514
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
515
|
+
/* @__PURE__ */ e(j, { className: "text-xs text-[var(--prui-dim)]", children: "max" }),
|
|
516
|
+
/* @__PURE__ */ e(
|
|
517
|
+
T,
|
|
518
|
+
{
|
|
519
|
+
type: "number",
|
|
520
|
+
"aria-label": `${r} max`,
|
|
521
|
+
className: "h-8 w-24",
|
|
522
|
+
value: n.max ?? "",
|
|
523
|
+
onChange: (m) => l({ ...n, max: o(m.target.value) })
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
] }),
|
|
527
|
+
n.min !== void 0 || n.max !== void 0 ? /* @__PURE__ */ e(A, { variant: "ghost", size: "sm", onClick: () => l({}), children: "Clear" }) : null
|
|
528
|
+
] });
|
|
529
|
+
}
|
|
530
|
+
function Be({
|
|
531
|
+
label: r = "Price",
|
|
532
|
+
value: u,
|
|
533
|
+
defaultValue: v,
|
|
534
|
+
onChange: p,
|
|
535
|
+
currency: d = "₱",
|
|
536
|
+
className: s
|
|
537
|
+
}) {
|
|
538
|
+
const [f, b] = y.useState(v ?? {}), n = u !== void 0, l = n ? u : f, o = (a) => {
|
|
539
|
+
n || b(a), p == null || p(a);
|
|
540
|
+
}, m = (a) => {
|
|
541
|
+
if (a === "") return;
|
|
542
|
+
const g = Number(a);
|
|
543
|
+
return Number.isNaN(g) ? void 0 : g;
|
|
544
|
+
};
|
|
545
|
+
return /* @__PURE__ */ c("div", { className: s ?? "flex items-end gap-2", "data-testid": "price-filter", children: [
|
|
546
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
547
|
+
/* @__PURE__ */ c(j, { className: "text-xs text-[var(--prui-dim)]", children: [
|
|
548
|
+
r,
|
|
549
|
+
" min"
|
|
550
|
+
] }),
|
|
551
|
+
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
552
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-xs text-[var(--prui-dim)]", "aria-hidden": !0, children: d }),
|
|
553
|
+
/* @__PURE__ */ e(
|
|
554
|
+
T,
|
|
555
|
+
{
|
|
556
|
+
type: "number",
|
|
557
|
+
"aria-label": `${r} min`,
|
|
558
|
+
className: "h-8 w-24 pl-6",
|
|
559
|
+
value: l.min ?? "",
|
|
560
|
+
onChange: (a) => o({ ...l, min: m(a.target.value) })
|
|
561
|
+
}
|
|
562
|
+
)
|
|
563
|
+
] })
|
|
564
|
+
] }),
|
|
565
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
566
|
+
/* @__PURE__ */ e(j, { className: "text-xs text-[var(--prui-dim)]", children: "max" }),
|
|
567
|
+
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
568
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-xs text-[var(--prui-dim)]", "aria-hidden": !0, children: d }),
|
|
569
|
+
/* @__PURE__ */ e(
|
|
570
|
+
T,
|
|
571
|
+
{
|
|
572
|
+
type: "number",
|
|
573
|
+
"aria-label": `${r} max`,
|
|
574
|
+
className: "h-8 w-24 pl-6",
|
|
575
|
+
value: l.max ?? "",
|
|
576
|
+
onChange: (a) => o({ ...l, max: m(a.target.value) })
|
|
577
|
+
}
|
|
578
|
+
)
|
|
579
|
+
] })
|
|
580
|
+
] }),
|
|
581
|
+
l.min !== void 0 || l.max !== void 0 ? /* @__PURE__ */ e(A, { variant: "ghost", size: "sm", onClick: () => o({}), children: "Clear" }) : null
|
|
582
|
+
] });
|
|
583
|
+
}
|
|
584
|
+
function Le({
|
|
585
|
+
label: r = "Time",
|
|
586
|
+
value: u,
|
|
587
|
+
defaultValue: v,
|
|
588
|
+
onChange: p,
|
|
589
|
+
className: d
|
|
590
|
+
}) {
|
|
591
|
+
const [s, f] = y.useState(v ?? {}), b = u !== void 0, n = b ? u : s, l = (o) => {
|
|
592
|
+
b || f(o), p == null || p(o);
|
|
593
|
+
};
|
|
594
|
+
return /* @__PURE__ */ c("div", { className: d ?? "flex items-end gap-2", "data-testid": "time-filter", children: [
|
|
595
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
596
|
+
/* @__PURE__ */ c(j, { className: "text-xs text-[var(--prui-dim)]", children: [
|
|
597
|
+
r,
|
|
598
|
+
" from"
|
|
599
|
+
] }),
|
|
600
|
+
/* @__PURE__ */ e(
|
|
601
|
+
T,
|
|
602
|
+
{
|
|
603
|
+
type: "time",
|
|
604
|
+
"aria-label": `${r} from`,
|
|
605
|
+
className: "h-8 w-28",
|
|
606
|
+
value: n.from ?? "",
|
|
607
|
+
onChange: (o) => l({ ...n, from: o.target.value || void 0 })
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
] }),
|
|
611
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
612
|
+
/* @__PURE__ */ e(j, { className: "text-xs text-[var(--prui-dim)]", children: "to" }),
|
|
613
|
+
/* @__PURE__ */ e(
|
|
614
|
+
T,
|
|
615
|
+
{
|
|
616
|
+
type: "time",
|
|
617
|
+
"aria-label": `${r} to`,
|
|
618
|
+
className: "h-8 w-28",
|
|
619
|
+
value: n.to ?? "",
|
|
620
|
+
onChange: (o) => l({ ...n, to: o.target.value || void 0 })
|
|
621
|
+
}
|
|
622
|
+
)
|
|
623
|
+
] }),
|
|
624
|
+
n.from || n.to ? /* @__PURE__ */ e(A, { variant: "ghost", size: "sm", onClick: () => l({}), children: "Clear" }) : null
|
|
625
|
+
] });
|
|
626
|
+
}
|
|
627
|
+
function et({
|
|
628
|
+
searchPlaceholder: r = "Search...",
|
|
629
|
+
searchValue: u,
|
|
630
|
+
onSearchChange: v,
|
|
631
|
+
filters: p = [],
|
|
632
|
+
filterValues: d,
|
|
633
|
+
onFilterChange: s,
|
|
634
|
+
actions: f,
|
|
635
|
+
className: b
|
|
636
|
+
}) {
|
|
637
|
+
const [n, l] = y.useState(""), o = u !== void 0, m = o ? u : n;
|
|
638
|
+
return /* @__PURE__ */ c("div", { className: I("prui-toolbar flex flex-wrap items-center gap-2 py-2", b), children: [
|
|
639
|
+
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
640
|
+
/* @__PURE__ */ e(ke, { className: "absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--prui-dim)]", "aria-hidden": !0 }),
|
|
641
|
+
/* @__PURE__ */ e(
|
|
642
|
+
T,
|
|
643
|
+
{
|
|
644
|
+
type: "search",
|
|
645
|
+
"aria-label": "Search",
|
|
646
|
+
placeholder: r,
|
|
647
|
+
className: "h-8 w-56 pl-8",
|
|
648
|
+
value: m,
|
|
649
|
+
onChange: (a) => {
|
|
650
|
+
o || l(a.target.value), v == null || v(a.target.value);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
)
|
|
654
|
+
] }),
|
|
655
|
+
p.map((a) => {
|
|
656
|
+
const g = d == null ? void 0 : d[a.key];
|
|
657
|
+
return a.type === "select" ? /* @__PURE__ */ e(
|
|
658
|
+
Ae,
|
|
659
|
+
{
|
|
660
|
+
label: a.label,
|
|
661
|
+
options: a.options ?? [],
|
|
662
|
+
value: g ?? [],
|
|
663
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
664
|
+
},
|
|
665
|
+
a.key
|
|
666
|
+
) : a.type === "daterange" ? /* @__PURE__ */ e(
|
|
667
|
+
He,
|
|
668
|
+
{
|
|
669
|
+
label: a.label,
|
|
670
|
+
value: g ?? {},
|
|
671
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
672
|
+
},
|
|
673
|
+
a.key
|
|
674
|
+
) : a.type === "date" ? /* @__PURE__ */ e(
|
|
675
|
+
Pe,
|
|
676
|
+
{
|
|
677
|
+
label: a.label,
|
|
678
|
+
value: g ?? {},
|
|
679
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
680
|
+
},
|
|
681
|
+
a.key
|
|
682
|
+
) : a.type === "price" ? /* @__PURE__ */ e(
|
|
683
|
+
Be,
|
|
684
|
+
{
|
|
685
|
+
label: a.label,
|
|
686
|
+
value: g ?? {},
|
|
687
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
688
|
+
},
|
|
689
|
+
a.key
|
|
690
|
+
) : a.type === "time" ? /* @__PURE__ */ e(
|
|
691
|
+
Le,
|
|
692
|
+
{
|
|
693
|
+
label: a.label,
|
|
694
|
+
value: g ?? {},
|
|
695
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
696
|
+
},
|
|
697
|
+
a.key
|
|
698
|
+
) : /* @__PURE__ */ e(
|
|
699
|
+
We,
|
|
700
|
+
{
|
|
701
|
+
label: a.label,
|
|
702
|
+
value: g ?? {},
|
|
703
|
+
onChange: (x) => s == null ? void 0 : s(a.key, x)
|
|
704
|
+
},
|
|
705
|
+
a.key
|
|
706
|
+
);
|
|
707
|
+
}),
|
|
708
|
+
f ? /* @__PURE__ */ e("div", { className: "ml-auto flex items-center gap-2", children: f }) : null
|
|
709
|
+
] });
|
|
710
|
+
}
|
|
711
|
+
const tt = {
|
|
712
|
+
name: "DataTableToolbar",
|
|
713
|
+
props: [
|
|
714
|
+
{ name: "searchPlaceholder", type: "string", default: "'Search...'", control: "text" },
|
|
715
|
+
{ name: "searchValue", type: "string", default: "undefined", control: "text" },
|
|
716
|
+
{ name: "onSearchChange", type: "(value: string) => void", default: null, control: "none" },
|
|
717
|
+
{ name: "filters", type: "ToolbarFilterConfig[]", default: "[]", control: "object" },
|
|
718
|
+
{ name: "filterValues", type: "ToolbarFilterValues", default: "{}", control: "object" },
|
|
719
|
+
{ name: "onFilterChange", type: "(key, value) => void", default: null, control: "none" },
|
|
720
|
+
{ name: "actions", type: "ReactNode", default: null, control: "none" }
|
|
721
|
+
]
|
|
722
|
+
};
|
|
723
|
+
export {
|
|
724
|
+
Ve as D,
|
|
725
|
+
Ae as F,
|
|
726
|
+
We as N,
|
|
727
|
+
Be as P,
|
|
728
|
+
Le as T,
|
|
729
|
+
Fe as a,
|
|
730
|
+
et as b,
|
|
731
|
+
Pe as c,
|
|
732
|
+
He as d,
|
|
733
|
+
Ce as e,
|
|
734
|
+
Ke as f,
|
|
735
|
+
tt as g
|
|
736
|
+
};
|