@jinaan/uikit 0.1.44 → 0.1.45
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/data-table.d.ts +5 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/index.js +295 -291
- package/dist/index.js.map +1 -1
- package/dist/table-empty-state.d.ts +1 -1
- package/dist/table-empty-state.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +9 -1
- package/src/table-empty-state.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as f, useState as D, Children as bt, isValidElement as ht, useRef as j, useEffect as Q, useContext as W, useCallback as gt, createContext as te, useId as fe, useMemo as ot, useLayoutEffect as
|
|
4
|
-
import { Slot as
|
|
2
|
+
import { CircleNotch as dr, Robot as cr, Terminal as ur, Check as ee, Copy as pt, XCircle as mr, Warning as pr, CheckCircle as fr, Info as br, Minus as hr, X as ue, CaretDown as me, CaretRight as ft, MagnifyingGlass as gr, Columns as xr, Lock as vr, DotsSixVertical as Nr, FunnelSimple as it, WarningCircle as yr, CaretUp as wr, CaretUpDown as Cr, CaretLeft as Sr } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as f, useState as D, Children as bt, isValidElement as ht, useRef as j, useEffect as Q, useContext as W, useCallback as gt, createContext as te, useId as fe, useMemo as ot, useLayoutEffect as kr } from "react";
|
|
4
|
+
import { Slot as zr } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as Re } from "class-variance-authority";
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
6
|
+
import { clsx as Dr } from "clsx";
|
|
7
|
+
import { twMerge as Tr } from "tailwind-merge";
|
|
8
8
|
import * as je from "@radix-ui/react-avatar";
|
|
9
9
|
import * as st from "@radix-ui/react-checkbox";
|
|
10
10
|
import * as I from "@radix-ui/react-dialog";
|
|
11
11
|
import * as T from "@radix-ui/react-dropdown-menu";
|
|
12
12
|
import * as P from "@radix-ui/react-select";
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
13
|
+
import * as Mr from "@radix-ui/react-label";
|
|
14
|
+
import * as Pr from "@radix-ui/react-separator";
|
|
15
15
|
import * as Z from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return Tr(Dr(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ir(t, r, n) {
|
|
20
20
|
if (r === n || r < 0 || n < 0 || r >= t.length || n >= t.length)
|
|
21
21
|
return t;
|
|
22
22
|
const l = [...t], [i] = l.splice(r, 1);
|
|
23
23
|
return l.splice(n, 0, i), l;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Rr({ className: t }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
27
|
+
dr,
|
|
28
28
|
{
|
|
29
29
|
className: o("size-4 animate-spin text-muted", t),
|
|
30
30
|
weight: "bold",
|
|
@@ -32,7 +32,7 @@ function Pr({ className: t }) {
|
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const jr = Re(
|
|
36
36
|
"relative inline-flex select-none items-center justify-center gap-[var(--control-gap)] whitespace-nowrap rounded-[var(--control-radius)] border border-transparent font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-[120ms] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong disabled:pointer-events-none disabled:opacity-50",
|
|
37
37
|
{
|
|
38
38
|
variants: {
|
|
@@ -58,7 +58,7 @@ const Ir = Re(
|
|
|
58
58
|
size: "md"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), Er = {
|
|
62
62
|
xs: "[&_svg]:size-[var(--control-icon-xs)]",
|
|
63
63
|
sm: "[&_svg]:size-[var(--control-icon-sm)]",
|
|
64
64
|
md: "[&_svg]:size-[var(--control-icon-md)]",
|
|
@@ -72,15 +72,15 @@ const Ir = Re(
|
|
|
72
72
|
size: n = "md",
|
|
73
73
|
asChild: l = !1,
|
|
74
74
|
leadingIcon: i,
|
|
75
|
-
trailingIcon:
|
|
76
|
-
iconOnly:
|
|
75
|
+
trailingIcon: m,
|
|
76
|
+
iconOnly: u = !1,
|
|
77
77
|
loading: c = !1,
|
|
78
78
|
fullWidth: v = !1,
|
|
79
79
|
disabled: b,
|
|
80
80
|
children: h,
|
|
81
81
|
...y
|
|
82
82
|
}, C) => {
|
|
83
|
-
const N = l ?
|
|
83
|
+
const N = l ? zr : "button", S = Er[n ?? "md"];
|
|
84
84
|
return /* @__PURE__ */ e(
|
|
85
85
|
N,
|
|
86
86
|
{
|
|
@@ -88,8 +88,8 @@ const Ir = Re(
|
|
|
88
88
|
"aria-busy": c || void 0,
|
|
89
89
|
disabled: l ? void 0 : b || c,
|
|
90
90
|
className: o(
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
jr({ variant: r, size: n }),
|
|
92
|
+
u && "aspect-square px-0",
|
|
93
93
|
v && "w-full",
|
|
94
94
|
c && "disabled:opacity-100",
|
|
95
95
|
t
|
|
@@ -107,7 +107,7 @@ const Ir = Re(
|
|
|
107
107
|
children: [
|
|
108
108
|
!c && i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", S), "aria-hidden": !0, children: i }) : null,
|
|
109
109
|
h,
|
|
110
|
-
!c &&
|
|
110
|
+
!c && m ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", S), "aria-hidden": !0, children: m }) : null
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
),
|
|
@@ -120,7 +120,7 @@ const Ir = Re(
|
|
|
120
120
|
c ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
|
|
121
121
|
),
|
|
122
122
|
"aria-hidden": !0,
|
|
123
|
-
children: /* @__PURE__ */ e(
|
|
123
|
+
children: /* @__PURE__ */ e(Rr, { className: o("text-current", S) })
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
@@ -129,25 +129,25 @@ const Ir = Re(
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
M.displayName = "Button";
|
|
132
|
-
function
|
|
132
|
+
function Pa({
|
|
133
133
|
command: t,
|
|
134
134
|
tag: r = "Build with agents",
|
|
135
135
|
icon: n,
|
|
136
136
|
className: l
|
|
137
137
|
}) {
|
|
138
|
-
const [i,
|
|
138
|
+
const [i, m] = D(!1), u = async () => {
|
|
139
139
|
try {
|
|
140
|
-
await navigator.clipboard.writeText(t),
|
|
140
|
+
await navigator.clipboard.writeText(t), m(!0), window.setTimeout(() => m(!1), 1500);
|
|
141
141
|
} catch {
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
return /* @__PURE__ */ s("div", { className: o("relative inline-flex max-w-full", l), children: [
|
|
145
145
|
/* @__PURE__ */ s("span", { className: "absolute -top-2.5 left-4 z-10 inline-flex items-center gap-1.5 rounded-md bg-fg px-2 py-1 text-[11px] font-medium text-canvas shadow-sm", children: [
|
|
146
|
-
n ?? /* @__PURE__ */ e(
|
|
146
|
+
n ?? /* @__PURE__ */ e(cr, { className: "size-3.5", weight: "fill" }),
|
|
147
147
|
r
|
|
148
148
|
] }),
|
|
149
149
|
/* @__PURE__ */ s("div", { className: "mt-2 flex w-full items-center gap-2 rounded-xl border border-line bg-surface py-2 pl-3 pr-2 shadow-sm", children: [
|
|
150
|
-
/* @__PURE__ */ e(
|
|
150
|
+
/* @__PURE__ */ e(ur, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
|
|
151
151
|
/* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children: t }),
|
|
152
152
|
/* @__PURE__ */ e(
|
|
153
153
|
M,
|
|
@@ -157,7 +157,7 @@ function Ta({
|
|
|
157
157
|
iconOnly: !0,
|
|
158
158
|
"aria-label": "Copy prompt",
|
|
159
159
|
className: "ml-auto",
|
|
160
|
-
onClick:
|
|
160
|
+
onClick: u,
|
|
161
161
|
children: i ? /* @__PURE__ */ e(ee, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(pt, {})
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -197,7 +197,7 @@ const Nt = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
199
|
Nt.displayName = "AvatarFallback";
|
|
200
|
-
const
|
|
200
|
+
const _r = Re(
|
|
201
201
|
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
|
|
202
202
|
{
|
|
203
203
|
variants: {
|
|
@@ -213,7 +213,7 @@ const jr = Re(
|
|
|
213
213
|
},
|
|
214
214
|
defaultVariants: { variant: "neutral" }
|
|
215
215
|
}
|
|
216
|
-
),
|
|
216
|
+
), Lr = Re("size-1.5 shrink-0 rounded-full", {
|
|
217
217
|
variants: {
|
|
218
218
|
variant: {
|
|
219
219
|
neutral: "bg-subtle",
|
|
@@ -227,42 +227,42 @@ const jr = Re(
|
|
|
227
227
|
},
|
|
228
228
|
defaultVariants: { variant: "neutral" }
|
|
229
229
|
});
|
|
230
|
-
function
|
|
231
|
-
return /* @__PURE__ */ s("span", { className: o(
|
|
232
|
-
n ? /* @__PURE__ */ e("span", { className: o(
|
|
230
|
+
function Ar({ className: t, variant: r, dot: n = !1, children: l, ...i }) {
|
|
231
|
+
return /* @__PURE__ */ s("span", { className: o(_r({ variant: r }), t), ...i, children: [
|
|
232
|
+
n ? /* @__PURE__ */ e("span", { className: o(Lr({ variant: r })), "aria-hidden": !0 }) : null,
|
|
233
233
|
l
|
|
234
234
|
] });
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Br = {
|
|
237
237
|
info: {
|
|
238
|
-
Icon:
|
|
238
|
+
Icon: br,
|
|
239
239
|
className: "border-info/30 bg-info/10",
|
|
240
240
|
iconClassName: "text-info"
|
|
241
241
|
},
|
|
242
242
|
success: {
|
|
243
|
-
Icon:
|
|
243
|
+
Icon: fr,
|
|
244
244
|
className: "border-success/30 bg-success/10",
|
|
245
245
|
iconClassName: "text-success"
|
|
246
246
|
},
|
|
247
247
|
warning: {
|
|
248
|
-
Icon:
|
|
248
|
+
Icon: pr,
|
|
249
249
|
className: "border-warning/30 bg-warning/10",
|
|
250
250
|
iconClassName: "text-warning"
|
|
251
251
|
},
|
|
252
252
|
error: {
|
|
253
|
-
Icon:
|
|
253
|
+
Icon: mr,
|
|
254
254
|
className: "border-error/30 bg-error/10",
|
|
255
255
|
iconClassName: "text-error"
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Ia({
|
|
259
259
|
variant: t = "info",
|
|
260
260
|
title: r,
|
|
261
261
|
children: n,
|
|
262
262
|
icon: l,
|
|
263
263
|
className: i
|
|
264
264
|
}) {
|
|
265
|
-
const { Icon:
|
|
265
|
+
const { Icon: m, className: u, iconClassName: c } = Br[t];
|
|
266
266
|
return /* @__PURE__ */ s(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
@@ -270,11 +270,11 @@ function Ma({
|
|
|
270
270
|
className: o(
|
|
271
271
|
"flex items-start gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
|
|
272
272
|
"animate-in fade-in-0 slide-in-from-top-1 duration-200 motion-reduce:animate-none",
|
|
273
|
-
|
|
273
|
+
u,
|
|
274
274
|
i
|
|
275
275
|
),
|
|
276
276
|
children: [
|
|
277
|
-
/* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", c), children: l ?? /* @__PURE__ */ e(
|
|
277
|
+
/* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", c), children: l ?? /* @__PURE__ */ e(m, { weight: "fill" }) }),
|
|
278
278
|
/* @__PURE__ */ s("div", { className: "min-w-0 space-y-0.5", children: [
|
|
279
279
|
r ? /* @__PURE__ */ e("p", { className: "font-medium text-fg", children: r }) : null,
|
|
280
280
|
n ? /* @__PURE__ */ e("div", { className: "text-muted", children: n }) : null
|
|
@@ -283,7 +283,7 @@ function Ma({
|
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Fr({
|
|
287
287
|
className: t,
|
|
288
288
|
...r
|
|
289
289
|
}) {
|
|
@@ -298,7 +298,7 @@ function Ar({
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function $r({
|
|
302
302
|
className: t,
|
|
303
303
|
...r
|
|
304
304
|
}) {
|
|
@@ -313,7 +313,7 @@ function Br({
|
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Ra({ className: t, ...r }) {
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"table",
|
|
319
319
|
{
|
|
@@ -322,13 +322,13 @@ function Pa({ className: t, ...r }) {
|
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function ja({ className: t, ...r }) {
|
|
326
326
|
return /* @__PURE__ */ e("thead", { className: t, ...r });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function qr({ className: t, ...r }) {
|
|
329
329
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...r });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Gr({ className: t, ...r }) {
|
|
332
332
|
return /* @__PURE__ */ e(
|
|
333
333
|
"tr",
|
|
334
334
|
{
|
|
@@ -340,7 +340,7 @@ function $r({ className: t, ...r }) {
|
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Ea({ className: t, ...r }) {
|
|
344
344
|
return /* @__PURE__ */ e(
|
|
345
345
|
"th",
|
|
346
346
|
{
|
|
@@ -364,16 +364,16 @@ function ke({ className: t, ...r }) {
|
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const Hr = {
|
|
368
368
|
default: "bg-table-container",
|
|
369
369
|
muted: "bg-surface border border-line",
|
|
370
370
|
transparent: "bg-transparent"
|
|
371
|
-
},
|
|
371
|
+
}, Vr = {
|
|
372
372
|
default: "bg-table-panel border-table-panel-border",
|
|
373
373
|
muted: "bg-elevated border-line",
|
|
374
374
|
transparent: "bg-transparent border-line"
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function Wr(t) {
|
|
377
377
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
378
378
|
}
|
|
379
379
|
function be({
|
|
@@ -382,15 +382,15 @@ function be({
|
|
|
382
382
|
header: n,
|
|
383
383
|
children: l,
|
|
384
384
|
action: i,
|
|
385
|
-
tone:
|
|
386
|
-
className:
|
|
385
|
+
tone: m = "default",
|
|
386
|
+
className: u,
|
|
387
387
|
headerClassName: c,
|
|
388
388
|
panelClassName: v,
|
|
389
389
|
minHeight: b,
|
|
390
390
|
scrollMode: h = "surface",
|
|
391
391
|
headerContentRef: y
|
|
392
392
|
}) {
|
|
393
|
-
const C = !!(t || r), N = h === "panel", S =
|
|
393
|
+
const C = !!(t || r), N = h === "panel", S = Wr(i) ? /* @__PURE__ */ e(
|
|
394
394
|
M,
|
|
395
395
|
{
|
|
396
396
|
variant: i.variant ?? "primary",
|
|
@@ -437,14 +437,14 @@ function be({
|
|
|
437
437
|
}
|
|
438
438
|
)
|
|
439
439
|
) : null, g = /* @__PURE__ */ e(
|
|
440
|
-
|
|
440
|
+
$r,
|
|
441
441
|
{
|
|
442
|
-
className: o(
|
|
442
|
+
className: o(Vr[m], v),
|
|
443
443
|
style: b ? { minHeight: b } : void 0,
|
|
444
444
|
children: l
|
|
445
445
|
}
|
|
446
446
|
);
|
|
447
|
-
return /* @__PURE__ */ s(
|
|
447
|
+
return /* @__PURE__ */ s(Fr, { className: o("relative", Hr[m], u), children: [
|
|
448
448
|
N ? /* @__PURE__ */ s(Ie, { children: [
|
|
449
449
|
k,
|
|
450
450
|
g
|
|
@@ -455,7 +455,7 @@ function be({
|
|
|
455
455
|
S ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: S }) }) : null
|
|
456
456
|
] });
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Or(t) {
|
|
459
459
|
const r = bt.toArray(t), n = r.filter(
|
|
460
460
|
(l) => ht(l) && l.type === yt
|
|
461
461
|
);
|
|
@@ -464,13 +464,13 @@ function Vr(t) {
|
|
|
464
464
|
body: r.filter((l) => !n.includes(l))
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
const
|
|
467
|
+
const Ur = f(
|
|
468
468
|
({ className: t, children: r, ...n }, l) => {
|
|
469
|
-
const { header: i, body:
|
|
470
|
-
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(be, { className: o("shadow-xs", t), header: i, children:
|
|
469
|
+
const { header: i, body: m } = Or(r);
|
|
470
|
+
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(be, { className: o("shadow-xs", t), header: i, children: m }) });
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
|
-
|
|
473
|
+
Ur.displayName = "Card";
|
|
474
474
|
const yt = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
475
475
|
"div",
|
|
476
476
|
{
|
|
@@ -483,7 +483,7 @@ const yt = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
483
483
|
}
|
|
484
484
|
));
|
|
485
485
|
yt.displayName = "CardHeader";
|
|
486
|
-
const
|
|
486
|
+
const Xr = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
487
487
|
"h2",
|
|
488
488
|
{
|
|
489
489
|
ref: n,
|
|
@@ -491,8 +491,8 @@ const Or = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
491
491
|
...r
|
|
492
492
|
}
|
|
493
493
|
));
|
|
494
|
-
|
|
495
|
-
const
|
|
494
|
+
Xr.displayName = "CardTitle";
|
|
495
|
+
const Jr = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
496
496
|
"p",
|
|
497
497
|
{
|
|
498
498
|
ref: n,
|
|
@@ -504,10 +504,10 @@ const Ur = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
504
504
|
...r
|
|
505
505
|
}
|
|
506
506
|
));
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
const
|
|
507
|
+
Jr.displayName = "CardDescription";
|
|
508
|
+
const Kr = f(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...r }));
|
|
509
|
+
Kr.displayName = "CardContent";
|
|
510
|
+
const Qr = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
513
513
|
ref: n,
|
|
@@ -518,7 +518,7 @@ const Jr = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
518
518
|
...r
|
|
519
519
|
}
|
|
520
520
|
));
|
|
521
|
-
|
|
521
|
+
Qr.displayName = "CardFooter";
|
|
522
522
|
const Te = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
523
523
|
st.Root,
|
|
524
524
|
{
|
|
@@ -532,7 +532,7 @@ const Te = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
532
532
|
t
|
|
533
533
|
),
|
|
534
534
|
...r,
|
|
535
|
-
children: /* @__PURE__ */ e(st.Indicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: r.checked === "indeterminate" ? /* @__PURE__ */ e(
|
|
535
|
+
children: /* @__PURE__ */ e(st.Indicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: r.checked === "indeterminate" ? /* @__PURE__ */ e(hr, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(ee, { className: "size-3", weight: "bold" }) })
|
|
536
536
|
}
|
|
537
537
|
));
|
|
538
538
|
Te.displayName = "Checkbox";
|
|
@@ -542,7 +542,7 @@ function dt(t) {
|
|
|
542
542
|
function ct(t) {
|
|
543
543
|
return Math.min(1, Math.max(0.1, t));
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Yr(t, r) {
|
|
546
546
|
return !dt(t) || !dt(r) ? null : {
|
|
547
547
|
dx: t.left + t.width / 2 - (r.left + r.width / 2),
|
|
548
548
|
dy: t.top + t.height / 2 - (r.top + r.height / 2),
|
|
@@ -568,7 +568,7 @@ function Me(t) {
|
|
|
568
568
|
const n = Ee(r);
|
|
569
569
|
n && (V = { rect: n, at: Date.now() });
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Zr() {
|
|
572
572
|
ut || typeof document > "u" || (ut = !0, document.addEventListener(
|
|
573
573
|
"pointerdown",
|
|
574
574
|
(t) => Me(t.target),
|
|
@@ -581,7 +581,7 @@ function Qr() {
|
|
|
581
581
|
!0
|
|
582
582
|
));
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function ea(t) {
|
|
585
585
|
if (V && Date.now() - V.at < 2e3) {
|
|
586
586
|
const n = V.rect;
|
|
587
587
|
return V = null, n;
|
|
@@ -590,21 +590,21 @@ function Yr(t) {
|
|
|
590
590
|
const r = document.activeElement;
|
|
591
591
|
return r instanceof Element && r !== t && !t.contains(r) && r.matches(wt) ? Ee(r) : null;
|
|
592
592
|
}
|
|
593
|
-
const
|
|
593
|
+
const ta = 250, Ct = te(!1), St = te(() => {
|
|
594
594
|
}), _e = te(!1);
|
|
595
|
-
function
|
|
595
|
+
function ra({
|
|
596
596
|
open: t,
|
|
597
597
|
defaultOpen: r,
|
|
598
598
|
onOpenChange: n,
|
|
599
599
|
children: l,
|
|
600
600
|
...i
|
|
601
601
|
}) {
|
|
602
|
-
const [
|
|
602
|
+
const [m, u] = D(
|
|
603
603
|
r ?? !1
|
|
604
|
-
), [c, v] = D(!1), b = j(!1), h = j(null), y = t ??
|
|
604
|
+
), [c, v] = D(!1), b = j(!1), h = j(null), y = t ?? m, C = j(y);
|
|
605
605
|
C.current = y;
|
|
606
606
|
const N = t !== void 0;
|
|
607
|
-
Q(() =>
|
|
607
|
+
Q(() => Zr(), []), Q(() => {
|
|
608
608
|
t && (h.current && clearTimeout(h.current), b.current = !1, v(!1));
|
|
609
609
|
}, [t]), Q(
|
|
610
610
|
() => () => {
|
|
@@ -614,19 +614,19 @@ function ea({
|
|
|
614
614
|
);
|
|
615
615
|
const S = (k) => {
|
|
616
616
|
if (k) {
|
|
617
|
-
h.current && clearTimeout(h.current), b.current = !1, v(!1), N ||
|
|
617
|
+
h.current && clearTimeout(h.current), b.current = !1, v(!1), N || u(!0), n == null || n(!0);
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
620
|
if (!y || b.current) return;
|
|
621
621
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
622
|
-
N ||
|
|
622
|
+
N || u(!1), n == null || n(!1);
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
625
|
b.current = !0, v(!0), h.current = setTimeout(() => {
|
|
626
|
-
N ||
|
|
626
|
+
N || u(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
627
627
|
C.current && (b.current = !1, v(!1));
|
|
628
628
|
});
|
|
629
|
-
},
|
|
629
|
+
}, ta);
|
|
630
630
|
};
|
|
631
631
|
return /* @__PURE__ */ e(St.Provider, { value: () => S(!1), children: /* @__PURE__ */ e(Ct.Provider, { value: c, children: /* @__PURE__ */ e(_e.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
632
632
|
I.Root,
|
|
@@ -649,7 +649,7 @@ const kt = f(({ onClick: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
649
649
|
}
|
|
650
650
|
));
|
|
651
651
|
kt.displayName = "DialogTrigger";
|
|
652
|
-
const
|
|
652
|
+
const _a = I.Close, zt = f(
|
|
653
653
|
({ variant: t = "secondary", children: r = "Cancel", ...n }, l) => /* @__PURE__ */ e(I.Close, { asChild: !0, children: /* @__PURE__ */ e(M, { ref: l, type: "button", variant: t, ...n, children: r }) })
|
|
654
654
|
);
|
|
655
655
|
zt.displayName = "DialogCancel";
|
|
@@ -662,16 +662,16 @@ function Dt(t, r = !0) {
|
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
664
|
t.dataset.dialogMotionStarted = "true";
|
|
665
|
-
const l =
|
|
665
|
+
const l = ea(t), i = l ? Yr(l, n) : null;
|
|
666
666
|
i ? (t.style.setProperty("--dialog-dx", `${i.dx}px`), t.style.setProperty("--dialog-dy", `${i.dy}px`), t.style.setProperty("--dialog-sx", String(i.sx)), t.style.setProperty("--dialog-sy", String(i.sy)), t.classList.add("dialog-fly-in")) : (t.style.removeProperty("--dialog-dx"), t.style.removeProperty("--dialog-dy"), t.style.removeProperty("--dialog-sx"), t.style.removeProperty("--dialog-sy"), t.classList.add("dialog-pop-in"));
|
|
667
|
-
const
|
|
667
|
+
const m = () => {
|
|
668
668
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
669
|
-
},
|
|
670
|
-
c.target === t && (c.animationName !== "dialog-fly-in" && c.animationName !== "dialog-pop-in" || (t.removeEventListener("animationend",
|
|
669
|
+
}, u = (c) => {
|
|
670
|
+
c.target === t && (c.animationName !== "dialog-fly-in" && c.animationName !== "dialog-pop-in" || (t.removeEventListener("animationend", u), m()));
|
|
671
671
|
};
|
|
672
|
-
t.addEventListener("animationend",
|
|
672
|
+
t.addEventListener("animationend", u);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function aa(t) {
|
|
675
675
|
return t.replace(/dvh\b/g, "vh");
|
|
676
676
|
}
|
|
677
677
|
const Tt = f(
|
|
@@ -681,14 +681,14 @@ const Tt = f(
|
|
|
681
681
|
placement: n = "center",
|
|
682
682
|
topOffset: l = "11dvh",
|
|
683
683
|
motion: i = "auto",
|
|
684
|
-
style:
|
|
685
|
-
onEscapeKeyDown:
|
|
684
|
+
style: m,
|
|
685
|
+
onEscapeKeyDown: u,
|
|
686
686
|
onPointerDownOutside: c,
|
|
687
687
|
...v
|
|
688
688
|
}, b) => {
|
|
689
689
|
const h = W(Ct), y = n === "top", C = y ? {
|
|
690
690
|
"--dialog-top-offset": l,
|
|
691
|
-
"--dialog-top-offset-fallback":
|
|
691
|
+
"--dialog-top-offset-fallback": aa(l)
|
|
692
692
|
} : void 0, N = W(St), S = j(null), k = gt(
|
|
693
693
|
(g) => {
|
|
694
694
|
if (S.current = g, g && i === "auto" && Dt(g), typeof b == "function") {
|
|
@@ -728,7 +728,7 @@ const Tt = f(
|
|
|
728
728
|
I.Content,
|
|
729
729
|
{
|
|
730
730
|
ref: k,
|
|
731
|
-
style: C ? { ...C, ...
|
|
731
|
+
style: C ? { ...C, ...m } : m,
|
|
732
732
|
className: o(
|
|
733
733
|
"dialog-content pointer-events-auto relative flex max-h-[min(85vh,44rem)] w-full max-w-[22.4rem] flex-col gap-0 overflow-hidden will-change-[transform,opacity]",
|
|
734
734
|
"rounded-2xl border border-(--dialog-shell-border) bg-(--dialog-shell-bg) pb-3 shadow-(--dialog-shell-shadow) sm:pb-4",
|
|
@@ -739,7 +739,7 @@ const Tt = f(
|
|
|
739
739
|
t
|
|
740
740
|
),
|
|
741
741
|
onEscapeKeyDown: (g) => {
|
|
742
|
-
|
|
742
|
+
u == null || u(g), !g.defaultPrevented && (g.preventDefault(), N());
|
|
743
743
|
},
|
|
744
744
|
onPointerDownOutside: (g) => {
|
|
745
745
|
c == null || c(g), !g.defaultPrevented && (g.preventDefault(), N());
|
|
@@ -760,7 +760,7 @@ const Tt = f(
|
|
|
760
760
|
}
|
|
761
761
|
);
|
|
762
762
|
Tt.displayName = "DialogContent";
|
|
763
|
-
function
|
|
763
|
+
function na({
|
|
764
764
|
className: t,
|
|
765
765
|
...r
|
|
766
766
|
}) {
|
|
@@ -776,7 +776,7 @@ function ra({
|
|
|
776
776
|
}
|
|
777
777
|
);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function la({
|
|
780
780
|
className: t,
|
|
781
781
|
...r
|
|
782
782
|
}) {
|
|
@@ -789,7 +789,7 @@ function aa({
|
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function ia({
|
|
793
793
|
className: t,
|
|
794
794
|
...r
|
|
795
795
|
}) {
|
|
@@ -805,7 +805,7 @@ function na({
|
|
|
805
805
|
}
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function oa({
|
|
809
809
|
className: t,
|
|
810
810
|
...r
|
|
811
811
|
}) {
|
|
@@ -833,7 +833,7 @@ const Mt = f(({ className: t, ...r }, n) => {
|
|
|
833
833
|
);
|
|
834
834
|
});
|
|
835
835
|
Mt.displayName = "DialogTitle";
|
|
836
|
-
const
|
|
836
|
+
const sa = f(({ className: t, ...r }, n) => {
|
|
837
837
|
const l = W(_e) ? I.Description : "p";
|
|
838
838
|
return /* @__PURE__ */ e(
|
|
839
839
|
l,
|
|
@@ -844,56 +844,56 @@ const ia = f(({ className: t, ...r }, n) => {
|
|
|
844
844
|
}
|
|
845
845
|
);
|
|
846
846
|
});
|
|
847
|
-
|
|
847
|
+
sa.displayName = "DialogDescription";
|
|
848
848
|
const Pt = te(null);
|
|
849
|
-
function
|
|
849
|
+
function da({
|
|
850
850
|
label: t,
|
|
851
851
|
value: r,
|
|
852
852
|
onChange: n,
|
|
853
853
|
disabled: l = !1,
|
|
854
854
|
name: i,
|
|
855
|
-
className:
|
|
856
|
-
children:
|
|
855
|
+
className: m,
|
|
856
|
+
children: u,
|
|
857
857
|
...c
|
|
858
858
|
}) {
|
|
859
859
|
const v = fe(), b = i ?? v;
|
|
860
|
-
return /* @__PURE__ */ e(Pt.Provider, { value: { name: b, value: r, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6",
|
|
860
|
+
return /* @__PURE__ */ e(Pt.Provider, { value: { name: b, value: r, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", m), ...c, children: [
|
|
861
861
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
862
|
-
|
|
862
|
+
u
|
|
863
863
|
] }) });
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function ca({
|
|
866
866
|
value: t,
|
|
867
867
|
title: r,
|
|
868
868
|
description: n,
|
|
869
869
|
badge: l,
|
|
870
870
|
disabled: i = !1,
|
|
871
|
-
className:
|
|
871
|
+
className: m
|
|
872
872
|
}) {
|
|
873
|
-
const
|
|
874
|
-
if (!
|
|
873
|
+
const u = W(Pt), c = fe();
|
|
874
|
+
if (!u)
|
|
875
875
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
876
|
-
const v = i ||
|
|
876
|
+
const v = i || u.disabled, b = u.value === t;
|
|
877
877
|
return /* @__PURE__ */ s(
|
|
878
878
|
"label",
|
|
879
879
|
{
|
|
880
880
|
className: o(
|
|
881
881
|
"group relative flex items-start gap-3",
|
|
882
882
|
v ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
883
|
-
|
|
883
|
+
m
|
|
884
884
|
),
|
|
885
885
|
children: [
|
|
886
886
|
/* @__PURE__ */ e(
|
|
887
887
|
"input",
|
|
888
888
|
{
|
|
889
889
|
type: "radio",
|
|
890
|
-
name:
|
|
890
|
+
name: u.name,
|
|
891
891
|
value: t,
|
|
892
892
|
checked: b,
|
|
893
893
|
disabled: v,
|
|
894
894
|
onChange: () => {
|
|
895
895
|
var h;
|
|
896
|
-
return (h =
|
|
896
|
+
return (h = u.onChange) == null ? void 0 : h.call(u, t);
|
|
897
897
|
},
|
|
898
898
|
"aria-describedby": n ? c : void 0,
|
|
899
899
|
className: "peer sr-only"
|
|
@@ -913,7 +913,7 @@ function sa({
|
|
|
913
913
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
914
914
|
/* @__PURE__ */ s("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
915
915
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: r }),
|
|
916
|
-
l ? /* @__PURE__ */ e(
|
|
916
|
+
l ? /* @__PURE__ */ e(Ar, { variant: "primary", children: l }) : null
|
|
917
917
|
] }),
|
|
918
918
|
n ? /* @__PURE__ */ e("span", { id: c, className: "mt-1 block text-sm text-muted", children: n }) : null
|
|
919
919
|
] })
|
|
@@ -921,22 +921,22 @@ function sa({
|
|
|
921
921
|
}
|
|
922
922
|
);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function La({
|
|
925
925
|
open: t,
|
|
926
926
|
onOpenChange: r,
|
|
927
927
|
trigger: n,
|
|
928
928
|
title: l,
|
|
929
929
|
options: i,
|
|
930
|
-
defaultValue:
|
|
931
|
-
value:
|
|
930
|
+
defaultValue: m,
|
|
931
|
+
value: u,
|
|
932
932
|
onValueChange: c,
|
|
933
933
|
cancelLabel: v = "Cancel",
|
|
934
934
|
confirmLabel: b = "Continue",
|
|
935
935
|
onConfirm: h
|
|
936
936
|
}) {
|
|
937
937
|
var k;
|
|
938
|
-
const [y, C] = D(
|
|
939
|
-
return /* @__PURE__ */ s(
|
|
938
|
+
const [y, C] = D(m ?? ((k = i[0]) == null ? void 0 : k.value) ?? ""), N = u ?? y;
|
|
939
|
+
return /* @__PURE__ */ s(ra, { open: t, onOpenChange: r, children: [
|
|
940
940
|
n ? /* @__PURE__ */ e(kt, { asChild: !0, children: n }) : null,
|
|
941
941
|
/* @__PURE__ */ s(
|
|
942
942
|
Tt,
|
|
@@ -944,12 +944,12 @@ function Ea({
|
|
|
944
944
|
"aria-describedby": void 0,
|
|
945
945
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
946
946
|
children: [
|
|
947
|
-
/* @__PURE__ */ s(
|
|
948
|
-
/* @__PURE__ */ e(
|
|
949
|
-
/* @__PURE__ */ e(
|
|
950
|
-
|
|
947
|
+
/* @__PURE__ */ s(na, { children: [
|
|
948
|
+
/* @__PURE__ */ e(ia, { children: /* @__PURE__ */ e(Mt, { className: "text-xl", children: l }) }),
|
|
949
|
+
/* @__PURE__ */ e(la, { children: /* @__PURE__ */ e(da, { label: l, value: N, onChange: (g) => {
|
|
950
|
+
u === void 0 && C(g), c == null || c(g);
|
|
951
951
|
}, children: i.map((g) => /* @__PURE__ */ e(
|
|
952
|
-
|
|
952
|
+
ca,
|
|
953
953
|
{
|
|
954
954
|
value: g.value,
|
|
955
955
|
title: g.title,
|
|
@@ -959,7 +959,7 @@ function Ea({
|
|
|
959
959
|
g.value
|
|
960
960
|
)) }) })
|
|
961
961
|
] }),
|
|
962
|
-
/* @__PURE__ */ s(
|
|
962
|
+
/* @__PURE__ */ s(oa, { className: "gap-3 pt-2.5", children: [
|
|
963
963
|
/* @__PURE__ */ e(zt, { className: "flex-1", children: v }),
|
|
964
964
|
/* @__PURE__ */ e(M, { className: "flex-1", onClick: () => h == null ? void 0 : h(N), children: b })
|
|
965
965
|
] })
|
|
@@ -968,7 +968,7 @@ function Ea({
|
|
|
968
968
|
)
|
|
969
969
|
] });
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Aa({ code: t, label: r, className: n }) {
|
|
972
972
|
const [l, i] = D(!1);
|
|
973
973
|
return /* @__PURE__ */ e(
|
|
974
974
|
be,
|
|
@@ -991,17 +991,17 @@ function _a({ code: t, label: r, className: n }) {
|
|
|
991
991
|
}
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
|
-
const
|
|
994
|
+
const ua = {
|
|
995
995
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
996
996
|
md: "h-[var(--control-h-md)] text-sm",
|
|
997
997
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
998
998
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
999
|
-
},
|
|
999
|
+
}, ma = {
|
|
1000
1000
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
1001
1001
|
md: "px-[var(--control-pad-x-md)]",
|
|
1002
1002
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
1003
1003
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
1004
|
-
},
|
|
1004
|
+
}, pa = {
|
|
1005
1005
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
1006
1006
|
md: "left-[var(--control-pad-x-md)]",
|
|
1007
1007
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
@@ -1023,8 +1023,8 @@ const da = {
|
|
|
1023
1023
|
type: n = "text",
|
|
1024
1024
|
size: l = "md",
|
|
1025
1025
|
leadingIcon: i,
|
|
1026
|
-
trailingIcon:
|
|
1027
|
-
onClear:
|
|
1026
|
+
trailingIcon: m,
|
|
1027
|
+
onClear: u,
|
|
1028
1028
|
value: c,
|
|
1029
1029
|
defaultValue: v,
|
|
1030
1030
|
error: b = !1,
|
|
@@ -1035,7 +1035,7 @@ const da = {
|
|
|
1035
1035
|
readOnly: S,
|
|
1036
1036
|
...k
|
|
1037
1037
|
}, g) => {
|
|
1038
|
-
const _ = fe(), B = y ?? _, O = !!h, F = !!(
|
|
1038
|
+
const _ = fe(), B = y ?? _, O = !!h, F = !!(u && (c !== void 0 ? String(c).length > 0 : v !== void 0 && String(v).length > 0)), $ = O ? `${B}-description` : void 0, ge = [C, $].filter(Boolean).join(" ") || void 0, re = /* @__PURE__ */ e(
|
|
1039
1039
|
"input",
|
|
1040
1040
|
{
|
|
1041
1041
|
ref: g,
|
|
@@ -1045,14 +1045,14 @@ const da = {
|
|
|
1045
1045
|
readOnly: S,
|
|
1046
1046
|
"aria-invalid": b || void 0,
|
|
1047
1047
|
"aria-describedby": ge,
|
|
1048
|
-
style: i ||
|
|
1048
|
+
style: i || m || F ? {
|
|
1049
1049
|
paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
|
|
1050
|
-
paddingInlineEnd:
|
|
1050
|
+
paddingInlineEnd: m || F ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
|
|
1051
1051
|
} : void 0,
|
|
1052
1052
|
className: o(
|
|
1053
1053
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
1054
|
-
|
|
1055
|
-
|
|
1054
|
+
ua[l],
|
|
1055
|
+
ma[l],
|
|
1056
1056
|
"placeholder:text-(--input-placeholder)",
|
|
1057
1057
|
"hover:border-(--input-border-hover)",
|
|
1058
1058
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
@@ -1068,14 +1068,14 @@ const da = {
|
|
|
1068
1068
|
...k
|
|
1069
1069
|
}
|
|
1070
1070
|
);
|
|
1071
|
-
return !i && !
|
|
1071
|
+
return !i && !m && !F && !O ? re : /* @__PURE__ */ s("div", { className: o("w-full", r), children: [
|
|
1072
1072
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
1073
1073
|
i ? /* @__PURE__ */ e(
|
|
1074
1074
|
"span",
|
|
1075
1075
|
{
|
|
1076
1076
|
className: o(
|
|
1077
1077
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1078
|
-
|
|
1078
|
+
pa[l]
|
|
1079
1079
|
),
|
|
1080
1080
|
"aria-hidden": !0,
|
|
1081
1081
|
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ze[l]), children: i })
|
|
@@ -1087,14 +1087,14 @@ const da = {
|
|
|
1087
1087
|
{
|
|
1088
1088
|
type: "button",
|
|
1089
1089
|
"aria-label": "Clear search",
|
|
1090
|
-
onClick:
|
|
1090
|
+
onClick: u,
|
|
1091
1091
|
className: o(
|
|
1092
1092
|
"absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
|
|
1093
1093
|
mt[l]
|
|
1094
1094
|
),
|
|
1095
1095
|
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ze[l]), children: /* @__PURE__ */ e(ue, {}) })
|
|
1096
1096
|
}
|
|
1097
|
-
) :
|
|
1097
|
+
) : m ? /* @__PURE__ */ e(
|
|
1098
1098
|
"span",
|
|
1099
1099
|
{
|
|
1100
1100
|
className: o(
|
|
@@ -1102,7 +1102,7 @@ const da = {
|
|
|
1102
1102
|
mt[l]
|
|
1103
1103
|
),
|
|
1104
1104
|
"aria-hidden": !0,
|
|
1105
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ze[l]), children:
|
|
1105
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ze[l]), children: m })
|
|
1106
1106
|
}
|
|
1107
1107
|
) : null
|
|
1108
1108
|
] }),
|
|
@@ -1122,7 +1122,7 @@ function Ae(t, r) {
|
|
|
1122
1122
|
let n = 0;
|
|
1123
1123
|
return bt.forEach(t, (l) => {
|
|
1124
1124
|
if (!ht(l)) return;
|
|
1125
|
-
if (r.some((
|
|
1125
|
+
if (r.some((m) => m === l.type)) {
|
|
1126
1126
|
n += 1;
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
@@ -1168,7 +1168,7 @@ const Rt = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1168
1168
|
}
|
|
1169
1169
|
));
|
|
1170
1170
|
Rt.displayName = "DropdownMenuChevron";
|
|
1171
|
-
const
|
|
1171
|
+
const Ba = T.Group, Fa = T.Portal, de = f(({ className: t, sideOffset: r = 8, ...n }, l) => /* @__PURE__ */ e(T.Portal, { children: /* @__PURE__ */ e(
|
|
1172
1172
|
T.Content,
|
|
1173
1173
|
{
|
|
1174
1174
|
ref: l,
|
|
@@ -1228,7 +1228,7 @@ const ce = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1228
1228
|
}
|
|
1229
1229
|
));
|
|
1230
1230
|
ce.displayName = "DropdownMenuLabel";
|
|
1231
|
-
const
|
|
1231
|
+
const $a = T.Sub, jt = f(({ className: t, inset: r, children: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1232
1232
|
T.SubTrigger,
|
|
1233
1233
|
{
|
|
1234
1234
|
ref: i,
|
|
@@ -1247,7 +1247,7 @@ const Ba = T.Sub, jt = f(({ className: t, inset: r, children: n, ...l }, i) => /
|
|
|
1247
1247
|
}
|
|
1248
1248
|
));
|
|
1249
1249
|
jt.displayName = "DropdownMenuSubTrigger";
|
|
1250
|
-
const
|
|
1250
|
+
const fa = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1251
1251
|
T.SubContent,
|
|
1252
1252
|
{
|
|
1253
1253
|
ref: n,
|
|
@@ -1265,7 +1265,7 @@ const ma = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1265
1265
|
...r
|
|
1266
1266
|
}
|
|
1267
1267
|
));
|
|
1268
|
-
|
|
1268
|
+
fa.displayName = "DropdownMenuSubContent";
|
|
1269
1269
|
const Pe = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1270
1270
|
T.Separator,
|
|
1271
1271
|
{
|
|
@@ -1275,7 +1275,7 @@ const Pe = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1275
1275
|
}
|
|
1276
1276
|
));
|
|
1277
1277
|
Pe.displayName = "DropdownMenuSeparator";
|
|
1278
|
-
const
|
|
1278
|
+
const qa = P.Group, Et = P.Value;
|
|
1279
1279
|
function _t({
|
|
1280
1280
|
children: t,
|
|
1281
1281
|
disabled: r,
|
|
@@ -1306,10 +1306,10 @@ const Be = f(({ className: t, children: r, variant: n = "field", ...l }, i) => /
|
|
|
1306
1306
|
));
|
|
1307
1307
|
Be.displayName = "SelectTrigger";
|
|
1308
1308
|
const Fe = f(
|
|
1309
|
-
({ className: t, children: r, position: n = "popper", sideOffset: l = 8, ...i },
|
|
1309
|
+
({ className: t, children: r, position: n = "popper", sideOffset: l = 8, ...i }, m) => /* @__PURE__ */ e(P.Portal, { children: /* @__PURE__ */ e(
|
|
1310
1310
|
P.Content,
|
|
1311
1311
|
{
|
|
1312
|
-
ref:
|
|
1312
|
+
ref: m,
|
|
1313
1313
|
position: n,
|
|
1314
1314
|
sideOffset: l,
|
|
1315
1315
|
className: o(
|
|
@@ -1344,7 +1344,7 @@ const he = f(({ className: t, children: r, ...n }, l) => /* @__PURE__ */ s(
|
|
|
1344
1344
|
}
|
|
1345
1345
|
));
|
|
1346
1346
|
he.displayName = "SelectItem";
|
|
1347
|
-
const
|
|
1347
|
+
const ba = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1348
1348
|
P.Label,
|
|
1349
1349
|
{
|
|
1350
1350
|
ref: n,
|
|
@@ -1352,8 +1352,8 @@ const pa = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1352
1352
|
...r
|
|
1353
1353
|
}
|
|
1354
1354
|
));
|
|
1355
|
-
|
|
1356
|
-
function
|
|
1355
|
+
ba.displayName = "SelectLabel";
|
|
1356
|
+
function ha({
|
|
1357
1357
|
icon: t,
|
|
1358
1358
|
title: r,
|
|
1359
1359
|
description: n,
|
|
@@ -1378,14 +1378,14 @@ function fa({
|
|
|
1378
1378
|
}
|
|
1379
1379
|
);
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1381
|
+
const ga = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1382
|
+
function xa(t) {
|
|
1383
1383
|
return t.split(/\s+/).slice(0, 2).map((r) => {
|
|
1384
1384
|
var n;
|
|
1385
1385
|
return ((n = r[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1386
1386
|
}).join("");
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function Ga({
|
|
1389
1389
|
name: t,
|
|
1390
1390
|
secondary: r,
|
|
1391
1391
|
image: n
|
|
@@ -1393,7 +1393,7 @@ function $a({
|
|
|
1393
1393
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1394
1394
|
/* @__PURE__ */ s(xt, { className: "size-8", children: [
|
|
1395
1395
|
n ? /* @__PURE__ */ e(vt, { src: n, alt: "" }) : null,
|
|
1396
|
-
/* @__PURE__ */ e(Nt, { children:
|
|
1396
|
+
/* @__PURE__ */ e(Nt, { children: xa(t) })
|
|
1397
1397
|
] }),
|
|
1398
1398
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1399
1399
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1401,14 +1401,14 @@ function $a({
|
|
|
1401
1401
|
] })
|
|
1402
1402
|
] });
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function Ha({
|
|
1405
1405
|
rows: t,
|
|
1406
1406
|
columns: r,
|
|
1407
1407
|
getRowId: n,
|
|
1408
1408
|
loading: l = !1,
|
|
1409
1409
|
error: i,
|
|
1410
|
-
empty:
|
|
1411
|
-
search:
|
|
1410
|
+
empty: m,
|
|
1411
|
+
search: u,
|
|
1412
1412
|
filters: c,
|
|
1413
1413
|
toolbarStart: v,
|
|
1414
1414
|
toolbarEnd: b,
|
|
@@ -1428,35 +1428,37 @@ function qa({
|
|
|
1428
1428
|
pageSizeOptions: re = [10, 25, 50, 100],
|
|
1429
1429
|
pagination: Lt = "auto",
|
|
1430
1430
|
tone: At,
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1431
|
+
title: Bt,
|
|
1432
|
+
description: Ft,
|
|
1433
|
+
headerAction: $t,
|
|
1434
|
+
headerClassName: qt,
|
|
1435
|
+
panelClassName: Gt,
|
|
1436
|
+
className: Ht
|
|
1435
1437
|
}) {
|
|
1436
1438
|
const [$e, qe] = D(
|
|
1437
1439
|
() => Object.fromEntries(
|
|
1438
1440
|
r.filter((a) => a.defaultHidden && !a.required).map((a) => [a.id, !0])
|
|
1439
1441
|
)
|
|
1440
|
-
), [Ge, He] = D(null), [xe, Ve] = D(null), [
|
|
1442
|
+
), [Ge, He] = D(null), [xe, Ve] = D(null), [Vt, Wt] = D(
|
|
1441
1443
|
O ?? null
|
|
1442
|
-
), w = $ ? F ?? null :
|
|
1443
|
-
$ ? $(a) :
|
|
1444
|
-
}, [U, ae] = D(0), [L,
|
|
1445
|
-
const p = d ?
|
|
1444
|
+
), w = $ ? F ?? null : Vt, Ot = (a) => {
|
|
1445
|
+
$ ? $(a) : Wt(a);
|
|
1446
|
+
}, [U, ae] = D(0), [L, Ut] = D(ge), [q, ve] = D(/* @__PURE__ */ new Set()), [Xt, Ne] = D([]), We = r.map((a) => a.id), Oe = new Map(r.map((a) => [a.id, a])), Ue = Ge ? Ge.map((a) => Oe.get(a)).filter((a) => !!a) : r, X = Ue.filter((a) => !$e[a.id]), Xe = Ue.filter((a) => $e[a.id] && !a.required), Je = (a) => !!a.required, Jt = (a) => Oe.get(a), Kt = (a, d) => {
|
|
1447
|
+
const p = d ? Jt(d) : void 0;
|
|
1446
1448
|
!p || Je(p) || a === d || He((x) => {
|
|
1447
1449
|
const z = x ?? We;
|
|
1448
|
-
return
|
|
1450
|
+
return Ir(z, z.indexOf(a), z.indexOf(d));
|
|
1449
1451
|
});
|
|
1450
|
-
},
|
|
1452
|
+
}, Qt = (a) => {
|
|
1451
1453
|
qe((d) => ({ ...d, [a]: !1 })), He((d) => d && d.includes(a) ? d : [...d ?? We, a]);
|
|
1452
|
-
}, ye = (c ?? []).filter((a) =>
|
|
1454
|
+
}, ye = (c ?? []).filter((a) => Xt.includes(a.id)), Yt = (c ?? []).map((a) => `${a.id}:${a.value.join(",")}`).join("|"), ne = ot(() => {
|
|
1453
1455
|
let a = t;
|
|
1454
1456
|
for (const p of c ?? [])
|
|
1455
1457
|
p.value.length > 0 && (a = a.filter((x) => p.match(x, p.value)));
|
|
1456
|
-
if (!
|
|
1457
|
-
const d =
|
|
1458
|
-
return a.filter((p) =>
|
|
1459
|
-
}, [t,
|
|
1458
|
+
if (!u || !u.value.trim()) return a;
|
|
1459
|
+
const d = u.value.trim().toLowerCase();
|
|
1460
|
+
return a.filter((p) => u.keys(p).toLowerCase().includes(d));
|
|
1461
|
+
}, [t, u, c]), G = ot(() => {
|
|
1460
1462
|
if (!w) return ne;
|
|
1461
1463
|
const a = r.find((p) => p.id === w.id);
|
|
1462
1464
|
if (!(a != null && a.sortValue)) return ne;
|
|
@@ -1465,33 +1467,33 @@ function qa({
|
|
|
1465
1467
|
const z = a.sortValue(p), R = a.sortValue(x);
|
|
1466
1468
|
return z == null && R == null ? 0 : z == null ? 1 : R == null ? -1 : typeof z == "number" && typeof R == "number" ? (z - R) * d : String(z).localeCompare(String(R)) * d;
|
|
1467
1469
|
});
|
|
1468
|
-
}, [ne, w, r]), J = Math.max(1, Math.ceil(G.length / L)),
|
|
1470
|
+
}, [ne, w, r]), J = Math.max(1, Math.ceil(G.length / L)), Zt = !l && !i && G.length > 0 && (Lt === "always" || G.length > L);
|
|
1469
1471
|
Q(() => {
|
|
1470
1472
|
ae(0);
|
|
1471
|
-
}, [
|
|
1473
|
+
}, [u == null ? void 0 : u.value, L, w == null ? void 0 : w.id, w == null ? void 0 : w.dir, C, Yt]), Q(() => {
|
|
1472
1474
|
U > J - 1 && ae(J - 1);
|
|
1473
1475
|
}, [U, J]);
|
|
1474
|
-
const le = U * L, A = G.slice(le, le + L),
|
|
1476
|
+
const le = U * L, A = G.slice(le, le + L), er = (a) => {
|
|
1475
1477
|
if (!a.sortable) return;
|
|
1476
1478
|
const d = w;
|
|
1477
|
-
|
|
1479
|
+
Ot(
|
|
1478
1480
|
(d == null ? void 0 : d.id) === a.id ? d.dir === "asc" ? { id: a.id, dir: "desc" } : null : { id: a.id, dir: "asc" }
|
|
1479
1481
|
);
|
|
1480
|
-
}, Ke = A.length > 0 && A.every((a) => q.has(n(a))),
|
|
1482
|
+
}, Ke = A.length > 0 && A.every((a) => q.has(n(a))), tr = A.some((a) => q.has(n(a))), rr = t.filter((a) => q.has(n(a))), ar = () => {
|
|
1481
1483
|
ve((a) => {
|
|
1482
1484
|
const d = new Set(a);
|
|
1483
1485
|
return Ke ? A.forEach((p) => d.delete(n(p))) : A.forEach((p) => d.add(n(p))), d;
|
|
1484
1486
|
});
|
|
1485
|
-
},
|
|
1487
|
+
}, nr = (a) => {
|
|
1486
1488
|
ve((d) => {
|
|
1487
1489
|
const p = new Set(d);
|
|
1488
1490
|
return p.has(a) ? p.delete(a) : p.add(a), p;
|
|
1489
1491
|
});
|
|
1490
|
-
},
|
|
1492
|
+
}, lr = !!(u || c != null && c.length || v || b), ir = (a) => (w == null ? void 0 : w.id) === a.id ? w.dir === "asc" ? "ascending" : "descending" : void 0, Qe = j(null), Ye = j(null), Ze = j(null), et = j(null), [H, we] = D([]), or = X.map((a) => a.id).join("\0"), ie = `${k ? "s" : "-"}|${_ ? "a" : "-"}|${or}`, tt = j(ie), sr = H.length > 0, Ce = gt(() => {
|
|
1491
1493
|
const a = Ze.current, d = et.current;
|
|
1492
1494
|
a && d && (a.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1493
1495
|
}, []);
|
|
1494
|
-
|
|
1496
|
+
kr(() => {
|
|
1495
1497
|
const a = Qe.current;
|
|
1496
1498
|
if (!a) return;
|
|
1497
1499
|
if (tt.current !== ie) {
|
|
@@ -1522,9 +1524,9 @@ function qa({
|
|
|
1522
1524
|
if (d(), Ce(), typeof ResizeObserver > "u") return;
|
|
1523
1525
|
const p = new ResizeObserver(d);
|
|
1524
1526
|
return p.observe(a), () => p.disconnect();
|
|
1525
|
-
}, [ie,
|
|
1527
|
+
}, [ie, sr, l, i, Ce]);
|
|
1526
1528
|
const K = H.reduce((a, d) => a + d, 0);
|
|
1527
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1529
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", Ht), children: [
|
|
1528
1530
|
y && y.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: y.map((a) => {
|
|
1529
1531
|
const d = a.id === C;
|
|
1530
1532
|
return /* @__PURE__ */ e(
|
|
@@ -1543,17 +1545,17 @@ function qa({
|
|
|
1543
1545
|
a.id
|
|
1544
1546
|
);
|
|
1545
1547
|
}) }),
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
+
lr && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1549
|
+
u && /* @__PURE__ */ e(
|
|
1548
1550
|
Le,
|
|
1549
1551
|
{
|
|
1550
1552
|
type: "search",
|
|
1551
|
-
"aria-label":
|
|
1552
|
-
placeholder:
|
|
1553
|
-
value:
|
|
1554
|
-
onChange: (a) =>
|
|
1555
|
-
onClear: () =>
|
|
1556
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1553
|
+
"aria-label": u.placeholder ?? "Search",
|
|
1554
|
+
placeholder: u.placeholder ?? "Search...",
|
|
1555
|
+
value: u.value,
|
|
1556
|
+
onChange: (a) => u.onChange(a.target.value),
|
|
1557
|
+
onClear: () => u.onChange(""),
|
|
1558
|
+
leadingIcon: /* @__PURE__ */ e(gr, {}),
|
|
1557
1559
|
containerClassName: "w-full sm:w-[280px]",
|
|
1558
1560
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1559
1561
|
}
|
|
@@ -1565,7 +1567,7 @@ function qa({
|
|
|
1565
1567
|
{
|
|
1566
1568
|
variant: "secondary",
|
|
1567
1569
|
size: "md",
|
|
1568
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1570
|
+
leadingIcon: /* @__PURE__ */ e(xr, {}),
|
|
1569
1571
|
trailingIcon: /* @__PURE__ */ e(Rt, {}),
|
|
1570
1572
|
children: "Columns"
|
|
1571
1573
|
}
|
|
@@ -1587,7 +1589,7 @@ function qa({
|
|
|
1587
1589
|
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", a.id), Ve(a.id);
|
|
1588
1590
|
},
|
|
1589
1591
|
onDragOver: (p) => {
|
|
1590
|
-
xe && (p.preventDefault(),
|
|
1592
|
+
xe && (p.preventDefault(), Kt(xe, a.id));
|
|
1591
1593
|
},
|
|
1592
1594
|
onDrop: (p) => p.preventDefault(),
|
|
1593
1595
|
onDragEnd: () => Ve(null),
|
|
@@ -1598,8 +1600,8 @@ function qa({
|
|
|
1598
1600
|
className: "justify-between",
|
|
1599
1601
|
children: [
|
|
1600
1602
|
/* @__PURE__ */ e("span", { className: "truncate", children: a.header }),
|
|
1601
|
-
d ? /* @__PURE__ */ e(
|
|
1602
|
-
|
|
1603
|
+
d ? /* @__PURE__ */ e(vr, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1604
|
+
Nr,
|
|
1603
1605
|
{
|
|
1604
1606
|
"aria-hidden": !0,
|
|
1605
1607
|
className: o(
|
|
@@ -1620,7 +1622,7 @@ function qa({
|
|
|
1620
1622
|
Y,
|
|
1621
1623
|
{
|
|
1622
1624
|
checked: !1,
|
|
1623
|
-
onCheckedChange: () =>
|
|
1625
|
+
onCheckedChange: () => Qt(a.id),
|
|
1624
1626
|
onSelect: (d) => d.preventDefault(),
|
|
1625
1627
|
children: a.header
|
|
1626
1628
|
},
|
|
@@ -1730,7 +1732,7 @@ function qa({
|
|
|
1730
1732
|
size: "md",
|
|
1731
1733
|
variant: a.variant ?? "outline",
|
|
1732
1734
|
disabled: a.disabled,
|
|
1733
|
-
onClick: () => void a.onRun(
|
|
1735
|
+
onClick: () => void a.onRun(rr),
|
|
1734
1736
|
children: [
|
|
1735
1737
|
a.icon,
|
|
1736
1738
|
a.label
|
|
@@ -1756,10 +1758,12 @@ function qa({
|
|
|
1756
1758
|
{
|
|
1757
1759
|
scrollMode: "panel",
|
|
1758
1760
|
headerContentRef: Ze,
|
|
1759
|
-
action:
|
|
1761
|
+
action: $t,
|
|
1760
1762
|
tone: At,
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
+
title: Bt,
|
|
1764
|
+
description: Ft,
|
|
1765
|
+
headerClassName: qt,
|
|
1766
|
+
panelClassName: Gt,
|
|
1763
1767
|
header: (
|
|
1764
1768
|
// Visible header band. Presentational (aria-sort lives on the body's
|
|
1765
1769
|
// sr-only thead); widths are pinned to the measured body columns and
|
|
@@ -1783,14 +1787,14 @@ function qa({
|
|
|
1783
1787
|
Te,
|
|
1784
1788
|
{
|
|
1785
1789
|
"aria-label": "Select all rows",
|
|
1786
|
-
checked: Ke ? !0 :
|
|
1787
|
-
onCheckedChange:
|
|
1790
|
+
checked: Ke ? !0 : tr ? "indeterminate" : !1,
|
|
1791
|
+
onCheckedChange: ar
|
|
1788
1792
|
}
|
|
1789
1793
|
) }),
|
|
1790
1794
|
X.map((a) => /* @__PURE__ */ e(
|
|
1791
1795
|
"th",
|
|
1792
1796
|
{
|
|
1793
|
-
className: o(
|
|
1797
|
+
className: o(ga, a.align === "right" && "text-right", a.className),
|
|
1794
1798
|
children: /* @__PURE__ */ e(
|
|
1795
1799
|
"span",
|
|
1796
1800
|
{
|
|
@@ -1803,7 +1807,7 @@ function qa({
|
|
|
1803
1807
|
variant: "ghost",
|
|
1804
1808
|
size: "xs",
|
|
1805
1809
|
"aria-label": `Sort by ${a.header}`,
|
|
1806
|
-
onClick: () =>
|
|
1810
|
+
onClick: () => er(a),
|
|
1807
1811
|
className: o(
|
|
1808
1812
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1809
1813
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
@@ -1812,7 +1816,7 @@ function qa({
|
|
|
1812
1816
|
),
|
|
1813
1817
|
children: [
|
|
1814
1818
|
a.header,
|
|
1815
|
-
(w == null ? void 0 : w.id) === a.id ? w.dir === "asc" ? /* @__PURE__ */ e(
|
|
1819
|
+
(w == null ? void 0 : w.id) === a.id ? w.dir === "asc" ? /* @__PURE__ */ e(wr, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(me, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Cr, { className: "size-3.5 opacity-50" })
|
|
1816
1820
|
]
|
|
1817
1821
|
}
|
|
1818
1822
|
) : a.header
|
|
@@ -1828,19 +1832,19 @@ function qa({
|
|
|
1828
1832
|
)
|
|
1829
1833
|
),
|
|
1830
1834
|
children: /* @__PURE__ */ e("div", { ref: et, className: "overflow-x-auto", onScroll: Ce, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((a) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, a)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1831
|
-
/* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(
|
|
1835
|
+
/* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(yr, { weight: "duotone" }) }),
|
|
1832
1836
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1833
1837
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1834
1838
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1835
1839
|
] }),
|
|
1836
1840
|
i.action
|
|
1837
1841
|
] }) : A.length === 0 ? /* @__PURE__ */ e(
|
|
1838
|
-
|
|
1842
|
+
ha,
|
|
1839
1843
|
{
|
|
1840
|
-
icon:
|
|
1841
|
-
title: (
|
|
1842
|
-
description:
|
|
1843
|
-
action:
|
|
1844
|
+
icon: m == null ? void 0 : m.icon,
|
|
1845
|
+
title: (m == null ? void 0 : m.title) ?? "No results",
|
|
1846
|
+
description: m == null ? void 0 : m.description,
|
|
1847
|
+
action: m == null ? void 0 : m.action
|
|
1844
1848
|
}
|
|
1845
1849
|
) : /* @__PURE__ */ s(
|
|
1846
1850
|
"table",
|
|
@@ -1860,13 +1864,13 @@ function qa({
|
|
|
1860
1864
|
H.length > 0 && /* @__PURE__ */ e("colgroup", { children: H.map((a, d) => /* @__PURE__ */ e("col", { style: { width: a } }, d)) }),
|
|
1861
1865
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1862
1866
|
k && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1863
|
-
X.map((a) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort":
|
|
1867
|
+
X.map((a) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": ir(a), children: a.header }, a.id)),
|
|
1864
1868
|
_ && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1865
1869
|
] }) }),
|
|
1866
|
-
/* @__PURE__ */ e(
|
|
1870
|
+
/* @__PURE__ */ e(qr, { children: A.map((a) => {
|
|
1867
1871
|
const d = n(a), p = q.has(d);
|
|
1868
1872
|
return /* @__PURE__ */ s(
|
|
1869
|
-
|
|
1873
|
+
Gr,
|
|
1870
1874
|
{
|
|
1871
1875
|
"data-state": p ? "selected" : void 0,
|
|
1872
1876
|
onClick: B ? () => B(a) : void 0,
|
|
@@ -1877,7 +1881,7 @@ function qa({
|
|
|
1877
1881
|
{
|
|
1878
1882
|
"aria-label": "Select row",
|
|
1879
1883
|
checked: p,
|
|
1880
|
-
onCheckedChange: () =>
|
|
1884
|
+
onCheckedChange: () => nr(d)
|
|
1881
1885
|
}
|
|
1882
1886
|
) }),
|
|
1883
1887
|
X.map((x) => /* @__PURE__ */ e(
|
|
@@ -1909,7 +1913,7 @@ function qa({
|
|
|
1909
1913
|
) })
|
|
1910
1914
|
}
|
|
1911
1915
|
),
|
|
1912
|
-
|
|
1916
|
+
Zt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1913
1917
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1914
1918
|
le + 1,
|
|
1915
1919
|
"–",
|
|
@@ -1918,7 +1922,7 @@ function qa({
|
|
|
1918
1922
|
G.length
|
|
1919
1923
|
] }),
|
|
1920
1924
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1921
|
-
/* @__PURE__ */ s(_t, { value: String(L), onValueChange: (a) =>
|
|
1925
|
+
/* @__PURE__ */ s(_t, { value: String(L), onValueChange: (a) => Ut(Number(a)), children: [
|
|
1922
1926
|
/* @__PURE__ */ e(Be, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(Et, {}) }),
|
|
1923
1927
|
/* @__PURE__ */ e(Fe, { children: re.map((a) => /* @__PURE__ */ e(he, { value: String(a), children: a }, a)) })
|
|
1924
1928
|
] }),
|
|
@@ -1931,7 +1935,7 @@ function qa({
|
|
|
1931
1935
|
"aria-label": "Previous page",
|
|
1932
1936
|
disabled: U <= 0,
|
|
1933
1937
|
onClick: () => ae((a) => Math.max(0, a - 1)),
|
|
1934
|
-
children: /* @__PURE__ */ e(
|
|
1938
|
+
children: /* @__PURE__ */ e(Sr, {})
|
|
1935
1939
|
}
|
|
1936
1940
|
),
|
|
1937
1941
|
/* @__PURE__ */ e(
|
|
@@ -1950,7 +1954,7 @@ function qa({
|
|
|
1950
1954
|
] })
|
|
1951
1955
|
] });
|
|
1952
1956
|
}
|
|
1953
|
-
function
|
|
1957
|
+
function Va({ icon: t, title: r, description: n, action: l, className: i }) {
|
|
1954
1958
|
return /* @__PURE__ */ e(be, { className: i, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1955
1959
|
t ? /* @__PURE__ */ e("div", { className: "flex size-11 items-center justify-center rounded-xl border border-line bg-elevated text-subtle [&_svg]:size-6", children: t }) : null,
|
|
1956
1960
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
@@ -1960,15 +1964,15 @@ function Ga({ icon: t, title: r, description: n, action: l, className: i }) {
|
|
|
1960
1964
|
l
|
|
1961
1965
|
] }) });
|
|
1962
1966
|
}
|
|
1963
|
-
const
|
|
1967
|
+
const va = f(
|
|
1964
1968
|
({
|
|
1965
1969
|
className: t,
|
|
1966
1970
|
inputClassName: r,
|
|
1967
1971
|
selectClassName: n,
|
|
1968
1972
|
selectValue: l,
|
|
1969
1973
|
onSelectChange: i,
|
|
1970
|
-
selectOptions:
|
|
1971
|
-
selectAriaLabel:
|
|
1974
|
+
selectOptions: m,
|
|
1975
|
+
selectAriaLabel: u,
|
|
1972
1976
|
selectPlaceholder: c,
|
|
1973
1977
|
id: v,
|
|
1974
1978
|
size: b,
|
|
@@ -1999,7 +2003,7 @@ const ga = f(
|
|
|
1999
2003
|
/* @__PURE__ */ e(
|
|
2000
2004
|
Be,
|
|
2001
2005
|
{
|
|
2002
|
-
"aria-label":
|
|
2006
|
+
"aria-label": u,
|
|
2003
2007
|
variant: "ghost",
|
|
2004
2008
|
className: o(
|
|
2005
2009
|
"min-w-28 shrink-0 rounded-l-none border border-(--input-border) border-l-0 px-3 text-[13px] font-normal",
|
|
@@ -2008,14 +2012,14 @@ const ga = f(
|
|
|
2008
2012
|
children: /* @__PURE__ */ e(Et, { placeholder: c })
|
|
2009
2013
|
}
|
|
2010
2014
|
),
|
|
2011
|
-
/* @__PURE__ */ e(Fe, { children:
|
|
2015
|
+
/* @__PURE__ */ e(Fe, { children: m.map((N) => /* @__PURE__ */ e(he, { value: N.value, children: N.label }, N.value)) })
|
|
2012
2016
|
]
|
|
2013
2017
|
}
|
|
2014
2018
|
)
|
|
2015
2019
|
] })
|
|
2016
2020
|
);
|
|
2017
|
-
|
|
2018
|
-
function
|
|
2021
|
+
va.displayName = "InputSelect";
|
|
2022
|
+
function Wa({ className: t, ...r }) {
|
|
2019
2023
|
return /* @__PURE__ */ e(
|
|
2020
2024
|
"kbd",
|
|
2021
2025
|
{
|
|
@@ -2027,8 +2031,8 @@ function Ha({ className: t, ...r }) {
|
|
|
2027
2031
|
}
|
|
2028
2032
|
);
|
|
2029
2033
|
}
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2034
|
+
const Na = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2035
|
+
Mr.Root,
|
|
2032
2036
|
{
|
|
2033
2037
|
ref: n,
|
|
2034
2038
|
className: o(
|
|
@@ -2038,21 +2042,21 @@ const xa = f(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
2038
2042
|
...r
|
|
2039
2043
|
}
|
|
2040
2044
|
));
|
|
2041
|
-
|
|
2042
|
-
function
|
|
2045
|
+
Na.displayName = "Label";
|
|
2046
|
+
function Oa({
|
|
2043
2047
|
value: t,
|
|
2044
2048
|
onValueChange: r,
|
|
2045
2049
|
options: n,
|
|
2046
2050
|
size: l = "sm",
|
|
2047
2051
|
className: i,
|
|
2048
|
-
...
|
|
2052
|
+
...m
|
|
2049
2053
|
}) {
|
|
2050
|
-
const
|
|
2054
|
+
const u = fe();
|
|
2051
2055
|
return /* @__PURE__ */ e(
|
|
2052
2056
|
"div",
|
|
2053
2057
|
{
|
|
2054
2058
|
role: "radiogroup",
|
|
2055
|
-
"aria-label":
|
|
2059
|
+
"aria-label": m["aria-label"],
|
|
2056
2060
|
className: o(
|
|
2057
2061
|
"inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
|
|
2058
2062
|
l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
|
|
@@ -2074,7 +2078,7 @@ function Va({
|
|
|
2074
2078
|
"input",
|
|
2075
2079
|
{
|
|
2076
2080
|
type: "radio",
|
|
2077
|
-
name:
|
|
2081
|
+
name: u,
|
|
2078
2082
|
value: c.value,
|
|
2079
2083
|
checked: v,
|
|
2080
2084
|
onChange: () => r(c.value),
|
|
@@ -2091,8 +2095,8 @@ function Va({
|
|
|
2091
2095
|
}
|
|
2092
2096
|
);
|
|
2093
2097
|
}
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2098
|
+
const ya = f(({ className: t, orientation: r = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
2099
|
+
Pr.Root,
|
|
2096
2100
|
{
|
|
2097
2101
|
ref: i,
|
|
2098
2102
|
decorative: n,
|
|
@@ -2105,8 +2109,8 @@ const va = f(({ className: t, orientation: r = "horizontal", decorative: n = !0,
|
|
|
2105
2109
|
...l
|
|
2106
2110
|
}
|
|
2107
2111
|
));
|
|
2108
|
-
|
|
2109
|
-
function
|
|
2112
|
+
ya.displayName = "Separator";
|
|
2113
|
+
function Ua({ className: t, ...r }) {
|
|
2110
2114
|
return /* @__PURE__ */ e(
|
|
2111
2115
|
"div",
|
|
2112
2116
|
{
|
|
@@ -2115,7 +2119,7 @@ function Wa({ className: t, ...r }) {
|
|
|
2115
2119
|
}
|
|
2116
2120
|
);
|
|
2117
2121
|
}
|
|
2118
|
-
const
|
|
2122
|
+
const Xa = Z.Provider, Ja = Z.Root, Ka = Z.Trigger, wa = f(({ className: t, sideOffset: r = 6, ...n }, l) => /* @__PURE__ */ e(Z.Portal, { children: /* @__PURE__ */ e(
|
|
2119
2123
|
Z.Content,
|
|
2120
2124
|
{
|
|
2121
2125
|
ref: l,
|
|
@@ -2133,83 +2137,83 @@ const Oa = Z.Provider, Ua = Z.Root, Xa = Z.Trigger, Na = f(({ className: t, side
|
|
|
2133
2137
|
...n
|
|
2134
2138
|
}
|
|
2135
2139
|
) }));
|
|
2136
|
-
|
|
2140
|
+
wa.displayName = "TooltipContent";
|
|
2137
2141
|
export {
|
|
2138
|
-
|
|
2142
|
+
Pa as AgentPrompt,
|
|
2139
2143
|
xt as Avatar,
|
|
2140
2144
|
Nt as AvatarFallback,
|
|
2141
2145
|
vt as AvatarImage,
|
|
2142
|
-
|
|
2146
|
+
Ar as Badge,
|
|
2143
2147
|
M as Button,
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2148
|
+
Ia as Callout,
|
|
2149
|
+
Ur as Card,
|
|
2150
|
+
Kr as CardContent,
|
|
2151
|
+
Jr as CardDescription,
|
|
2152
|
+
Qr as CardFooter,
|
|
2149
2153
|
yt as CardHeader,
|
|
2150
|
-
|
|
2154
|
+
Xr as CardTitle,
|
|
2151
2155
|
Te as Checkbox,
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2156
|
+
La as ChoiceDialog,
|
|
2157
|
+
Aa as CodeBlock,
|
|
2158
|
+
Ha as DataTable,
|
|
2159
|
+
Ga as DataTableIdentity,
|
|
2160
|
+
ra as Dialog,
|
|
2161
|
+
la as DialogBody,
|
|
2158
2162
|
zt as DialogCancel,
|
|
2159
|
-
|
|
2163
|
+
_a as DialogClose,
|
|
2160
2164
|
Tt as DialogContent,
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
+
sa as DialogDescription,
|
|
2166
|
+
oa as DialogFooter,
|
|
2167
|
+
ia as DialogHeader,
|
|
2168
|
+
na as DialogPanel,
|
|
2165
2169
|
Mt as DialogTitle,
|
|
2166
2170
|
kt as DialogTrigger,
|
|
2167
2171
|
De as DropdownMenu,
|
|
2168
2172
|
Y as DropdownMenuCheckboxItem,
|
|
2169
2173
|
Rt as DropdownMenuChevron,
|
|
2170
2174
|
de as DropdownMenuContent,
|
|
2171
|
-
|
|
2175
|
+
Ba as DropdownMenuGroup,
|
|
2172
2176
|
pe as DropdownMenuItem,
|
|
2173
2177
|
ce as DropdownMenuLabel,
|
|
2174
|
-
|
|
2178
|
+
Fa as DropdownMenuPortal,
|
|
2175
2179
|
Pe as DropdownMenuSeparator,
|
|
2176
|
-
|
|
2177
|
-
|
|
2180
|
+
$a as DropdownMenuSub,
|
|
2181
|
+
fa as DropdownMenuSubContent,
|
|
2178
2182
|
jt as DropdownMenuSubTrigger,
|
|
2179
2183
|
se as DropdownMenuTrigger,
|
|
2180
|
-
|
|
2184
|
+
Va as EmptyState,
|
|
2181
2185
|
Le as Input,
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2186
|
+
va as InputSelect,
|
|
2187
|
+
Wa as Kbd,
|
|
2188
|
+
Na as Label,
|
|
2189
|
+
ca as RadioCard,
|
|
2190
|
+
da as RadioGroup,
|
|
2191
|
+
Oa as Segmented,
|
|
2188
2192
|
_t as Select,
|
|
2189
2193
|
Fe as SelectContent,
|
|
2190
|
-
|
|
2194
|
+
qa as SelectGroup,
|
|
2191
2195
|
he as SelectItem,
|
|
2192
|
-
|
|
2196
|
+
ba as SelectLabel,
|
|
2193
2197
|
Be as SelectTrigger,
|
|
2194
2198
|
Et as SelectValue,
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2199
|
+
ya as Separator,
|
|
2200
|
+
Ua as Skeleton,
|
|
2201
|
+
Rr as Spinner,
|
|
2202
|
+
Ra as Table,
|
|
2203
|
+
qr as TableBody,
|
|
2200
2204
|
ke as TableCell,
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2205
|
+
Fr as TableContainer,
|
|
2206
|
+
ha as TableEmptyState,
|
|
2207
|
+
Ea as TableHead,
|
|
2208
|
+
ja as TableHeader,
|
|
2209
|
+
$r as TablePanel,
|
|
2210
|
+
Gr as TableRow,
|
|
2207
2211
|
be as TableSurface,
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2212
|
+
Ja as Tooltip,
|
|
2213
|
+
wa as TooltipContent,
|
|
2214
|
+
Xa as TooltipProvider,
|
|
2215
|
+
Ka as TooltipTrigger,
|
|
2216
|
+
_r as badgeVariants,
|
|
2217
|
+
jr as buttonVariants
|
|
2214
2218
|
};
|
|
2215
2219
|
//# sourceMappingURL=index.js.map
|