@jinaan/uikit 0.1.41 → 0.1.43
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 +15 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/index.js +294 -279
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +31 -3
package/dist/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as f, useState as D, Children as mt, isValidElement as pt, useRef as j, useEffect as
|
|
4
|
-
import { Slot as
|
|
2
|
+
import { CircleNotch as la, Robot as ia, Terminal as oa, Check as ee, Copy as ct, XCircle as sa, Warning as da, CheckCircle as ca, Info as ua, Minus as ma, X as ue, CaretDown as me, CaretRight as ut, MagnifyingGlass as pa, Columns as fa, Lock as ba, DotsSixVertical as ha, FunnelSimple as rt, WarningCircle as ga, CaretUp as xa, CaretUpDown as va, CaretLeft as ya } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as f, useState as D, Children as mt, isValidElement as pt, useRef as j, useEffect as Q, useContext as W, useCallback as ft, createContext as te, useId as fe, useMemo as nt, useLayoutEffect as Na } from "react";
|
|
4
|
+
import { Slot as wa } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as Ie } from "class-variance-authority";
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
6
|
+
import { clsx as Ca } from "clsx";
|
|
7
|
+
import { twMerge as Sa } from "tailwind-merge";
|
|
8
8
|
import * as Re from "@radix-ui/react-avatar";
|
|
9
9
|
import * as lt 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
|
|
15
|
-
import * as
|
|
13
|
+
import * as ka from "@radix-ui/react-label";
|
|
14
|
+
import * as za from "@radix-ui/react-separator";
|
|
15
|
+
import * as Z from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return Sa(Ca(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Da(t, a, n) {
|
|
20
20
|
if (a === n || a < 0 || n < 0 || a >= t.length || n >= t.length)
|
|
21
21
|
return t;
|
|
22
22
|
const l = [...t], [i] = l.splice(a, 1);
|
|
23
23
|
return l.splice(n, 0, i), l;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ta({ className: t }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
27
|
+
la,
|
|
28
28
|
{
|
|
29
29
|
className: o("size-4 animate-spin text-muted", t),
|
|
30
30
|
weight: "bold",
|
|
@@ -32,7 +32,7 @@ function Sa({ className: t }) {
|
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const Ma = Ie(
|
|
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 ka = Ie(
|
|
|
58
58
|
size: "md"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), Pa = {
|
|
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)]",
|
|
@@ -80,7 +80,7 @@ const ka = Ie(
|
|
|
80
80
|
children: x,
|
|
81
81
|
...w
|
|
82
82
|
}, S) => {
|
|
83
|
-
const y = l ?
|
|
83
|
+
const y = l ? wa : "button", C = Pa[n ?? "md"];
|
|
84
84
|
return /* @__PURE__ */ e(
|
|
85
85
|
y,
|
|
86
86
|
{
|
|
@@ -88,7 +88,7 @@ const ka = Ie(
|
|
|
88
88
|
"aria-busy": c || void 0,
|
|
89
89
|
disabled: l ? void 0 : b || c,
|
|
90
90
|
className: o(
|
|
91
|
-
|
|
91
|
+
Ma({ variant: a, size: n }),
|
|
92
92
|
m && "aspect-square px-0",
|
|
93
93
|
v && "w-full",
|
|
94
94
|
c && "disabled:opacity-100",
|
|
@@ -120,7 +120,7 @@ const ka = Ie(
|
|
|
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(Ta, { className: o("text-current", C) })
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
@@ -129,7 +129,7 @@ const ka = Ie(
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
M.displayName = "Button";
|
|
132
|
-
function
|
|
132
|
+
function Dr({
|
|
133
133
|
command: t,
|
|
134
134
|
tag: a = "Build with agents",
|
|
135
135
|
icon: n,
|
|
@@ -143,11 +143,11 @@ function Cr({
|
|
|
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(ia, { className: "size-3.5", weight: "fill" }),
|
|
147
147
|
a
|
|
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(oa, { 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,
|
|
@@ -158,7 +158,7 @@ function Cr({
|
|
|
158
158
|
"aria-label": "Copy prompt",
|
|
159
159
|
className: "ml-auto",
|
|
160
160
|
onClick: m,
|
|
161
|
-
children: i ? /* @__PURE__ */ e(
|
|
161
|
+
children: i ? /* @__PURE__ */ e(ee, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ct, {})
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
] })
|
|
@@ -197,7 +197,7 @@ const gt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
199
|
gt.displayName = "AvatarFallback";
|
|
200
|
-
const
|
|
200
|
+
const Ia = Ie(
|
|
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 Da = Ie(
|
|
|
213
213
|
},
|
|
214
214
|
defaultVariants: { variant: "neutral" }
|
|
215
215
|
}
|
|
216
|
-
),
|
|
216
|
+
), Ra = Ie("size-1.5 shrink-0 rounded-full", {
|
|
217
217
|
variants: {
|
|
218
218
|
variant: {
|
|
219
219
|
neutral: "bg-subtle",
|
|
@@ -227,42 +227,42 @@ const Da = Ie(
|
|
|
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 ja({ className: t, variant: a, dot: n = !1, children: l, ...i }) {
|
|
231
|
+
return /* @__PURE__ */ s("span", { className: o(Ia({ variant: a }), t), ...i, children: [
|
|
232
|
+
n ? /* @__PURE__ */ e("span", { className: o(Ra({ variant: a })), "aria-hidden": !0 }) : null,
|
|
233
233
|
l
|
|
234
234
|
] });
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Ea = {
|
|
237
237
|
info: {
|
|
238
|
-
Icon:
|
|
238
|
+
Icon: ua,
|
|
239
239
|
className: "border-info/30 bg-info/10",
|
|
240
240
|
iconClassName: "text-info"
|
|
241
241
|
},
|
|
242
242
|
success: {
|
|
243
|
-
Icon:
|
|
243
|
+
Icon: ca,
|
|
244
244
|
className: "border-success/30 bg-success/10",
|
|
245
245
|
iconClassName: "text-success"
|
|
246
246
|
},
|
|
247
247
|
warning: {
|
|
248
|
-
Icon:
|
|
248
|
+
Icon: da,
|
|
249
249
|
className: "border-warning/30 bg-warning/10",
|
|
250
250
|
iconClassName: "text-warning"
|
|
251
251
|
},
|
|
252
252
|
error: {
|
|
253
|
-
Icon:
|
|
253
|
+
Icon: sa,
|
|
254
254
|
className: "border-error/30 bg-error/10",
|
|
255
255
|
iconClassName: "text-error"
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Tr({
|
|
259
259
|
variant: t = "info",
|
|
260
260
|
title: a,
|
|
261
261
|
children: n,
|
|
262
262
|
icon: l,
|
|
263
263
|
className: i
|
|
264
264
|
}) {
|
|
265
|
-
const { Icon: u, className: m, iconClassName: c } =
|
|
265
|
+
const { Icon: u, className: m, iconClassName: c } = Ea[t];
|
|
266
266
|
return /* @__PURE__ */ s(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
@@ -283,7 +283,7 @@ function Sr({
|
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function _a({
|
|
287
287
|
className: t,
|
|
288
288
|
...a
|
|
289
289
|
}) {
|
|
@@ -298,7 +298,7 @@ function Ia({
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function La({
|
|
302
302
|
className: t,
|
|
303
303
|
...a
|
|
304
304
|
}) {
|
|
@@ -313,7 +313,7 @@ function Ra({
|
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Mr({ className: t, ...a }) {
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"table",
|
|
319
319
|
{
|
|
@@ -322,13 +322,13 @@ function kr({ className: t, ...a }) {
|
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Pr({ className: t, ...a }) {
|
|
326
326
|
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Aa({ className: t, ...a }) {
|
|
329
329
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Ba({ className: t, ...a }) {
|
|
332
332
|
return /* @__PURE__ */ e(
|
|
333
333
|
"tr",
|
|
334
334
|
{
|
|
@@ -340,7 +340,7 @@ function Ea({ className: t, ...a }) {
|
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Ir({ className: t, ...a }) {
|
|
344
344
|
return /* @__PURE__ */ e(
|
|
345
345
|
"th",
|
|
346
346
|
{
|
|
@@ -364,16 +364,16 @@ function Se({ className: t, ...a }) {
|
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const Fa = {
|
|
368
368
|
default: "bg-table-container",
|
|
369
369
|
muted: "bg-surface border border-line",
|
|
370
370
|
transparent: "bg-transparent"
|
|
371
|
-
},
|
|
371
|
+
}, $a = {
|
|
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 qa(t) {
|
|
377
377
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
378
378
|
}
|
|
379
379
|
function be({
|
|
@@ -390,7 +390,7 @@ function be({
|
|
|
390
390
|
scrollMode: x = "surface",
|
|
391
391
|
headerContentRef: w
|
|
392
392
|
}) {
|
|
393
|
-
const S = !!(t || a), y = x === "panel", C =
|
|
393
|
+
const S = !!(t || a), y = x === "panel", C = qa(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, h = /* @__PURE__ */ e(
|
|
440
|
-
|
|
440
|
+
La,
|
|
441
441
|
{
|
|
442
|
-
className: o(
|
|
442
|
+
className: o($a[u], 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(_a, { className: o("relative", Fa[u], m), children: [
|
|
448
448
|
y ? /* @__PURE__ */ s(Pe, { children: [
|
|
449
449
|
k,
|
|
450
450
|
h
|
|
@@ -455,7 +455,7 @@ function be({
|
|
|
455
455
|
C ? /* @__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: C }) }) : null
|
|
456
456
|
] });
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Ga(t) {
|
|
459
459
|
const a = mt.toArray(t), n = a.filter(
|
|
460
460
|
(l) => pt(l) && l.type === xt
|
|
461
461
|
);
|
|
@@ -464,13 +464,13 @@ function Ba(t) {
|
|
|
464
464
|
body: a.filter((l) => !n.includes(l))
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
const
|
|
467
|
+
const Ha = f(
|
|
468
468
|
({ className: t, children: a, ...n }, l) => {
|
|
469
|
-
const { header: i, body: u } =
|
|
469
|
+
const { header: i, body: u } = Ga(a);
|
|
470
470
|
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(be, { className: o("shadow-xs", t), header: i, children: u }) });
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
|
-
|
|
473
|
+
Ha.displayName = "Card";
|
|
474
474
|
const xt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
475
475
|
"div",
|
|
476
476
|
{
|
|
@@ -483,7 +483,7 @@ const xt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
483
483
|
}
|
|
484
484
|
));
|
|
485
485
|
xt.displayName = "CardHeader";
|
|
486
|
-
const
|
|
486
|
+
const Va = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
487
487
|
"h2",
|
|
488
488
|
{
|
|
489
489
|
ref: n,
|
|
@@ -491,8 +491,8 @@ const $a = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
491
491
|
...a
|
|
492
492
|
}
|
|
493
493
|
));
|
|
494
|
-
|
|
495
|
-
const
|
|
494
|
+
Va.displayName = "CardTitle";
|
|
495
|
+
const Wa = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
496
496
|
"p",
|
|
497
497
|
{
|
|
498
498
|
ref: n,
|
|
@@ -504,10 +504,10 @@ const qa = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
504
504
|
...a
|
|
505
505
|
}
|
|
506
506
|
));
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
const
|
|
507
|
+
Wa.displayName = "CardDescription";
|
|
508
|
+
const Oa = f(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...a }));
|
|
509
|
+
Oa.displayName = "CardContent";
|
|
510
|
+
const Ua = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
513
513
|
ref: n,
|
|
@@ -518,7 +518,7 @@ const Ha = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
518
518
|
...a
|
|
519
519
|
}
|
|
520
520
|
));
|
|
521
|
-
|
|
521
|
+
Ua.displayName = "CardFooter";
|
|
522
522
|
const De = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
523
523
|
lt.Root,
|
|
524
524
|
{
|
|
@@ -532,7 +532,7 @@ const De = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
532
532
|
t
|
|
533
533
|
),
|
|
534
534
|
...a,
|
|
535
|
-
children: /* @__PURE__ */ e(lt.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: a.checked === "indeterminate" ? /* @__PURE__ */ e(
|
|
535
|
+
children: /* @__PURE__ */ e(lt.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: a.checked === "indeterminate" ? /* @__PURE__ */ e(ma, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(ee, { className: "size-3", weight: "bold" }) })
|
|
536
536
|
}
|
|
537
537
|
));
|
|
538
538
|
De.displayName = "Checkbox";
|
|
@@ -542,7 +542,7 @@ function it(t) {
|
|
|
542
542
|
function ot(t) {
|
|
543
543
|
return Math.min(1, Math.max(0.1, t));
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Xa(t, a) {
|
|
546
546
|
return !it(t) || !it(a) ? null : {
|
|
547
547
|
dx: t.left + t.width / 2 - (a.left + a.width / 2),
|
|
548
548
|
dy: t.top + t.height / 2 - (a.top + a.height / 2),
|
|
@@ -551,7 +551,7 @@ function Va(t, a) {
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
const vt = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
|
|
554
|
-
let
|
|
554
|
+
let V = null, st = !1;
|
|
555
555
|
function je(t) {
|
|
556
556
|
const a = t.getBoundingClientRect();
|
|
557
557
|
return a.width <= 0 || a.height <= 0 ? null : {
|
|
@@ -566,9 +566,9 @@ function Te(t) {
|
|
|
566
566
|
const a = t.closest(vt);
|
|
567
567
|
if (!a) return;
|
|
568
568
|
const n = je(a);
|
|
569
|
-
n && (
|
|
569
|
+
n && (V = { rect: n, at: Date.now() });
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Ja() {
|
|
572
572
|
st || typeof document > "u" || (st = !0, document.addEventListener(
|
|
573
573
|
"pointerdown",
|
|
574
574
|
(t) => Te(t.target),
|
|
@@ -581,18 +581,18 @@ function Wa() {
|
|
|
581
581
|
!0
|
|
582
582
|
));
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
if (
|
|
586
|
-
const n =
|
|
587
|
-
return
|
|
584
|
+
function Ka(t) {
|
|
585
|
+
if (V && Date.now() - V.at < 2e3) {
|
|
586
|
+
const n = V.rect;
|
|
587
|
+
return V = null, n;
|
|
588
588
|
}
|
|
589
|
-
|
|
589
|
+
V = null;
|
|
590
590
|
const a = document.activeElement;
|
|
591
591
|
return a instanceof Element && a !== t && !t.contains(a) && a.matches(vt) ? je(a) : null;
|
|
592
592
|
}
|
|
593
|
-
const
|
|
594
|
-
}), Ee =
|
|
595
|
-
function
|
|
593
|
+
const Qa = 250, yt = te(!1), Nt = te(() => {
|
|
594
|
+
}), Ee = te(!1);
|
|
595
|
+
function Ya({
|
|
596
596
|
open: t,
|
|
597
597
|
defaultOpen: a,
|
|
598
598
|
onOpenChange: n,
|
|
@@ -604,9 +604,9 @@ function Xa({
|
|
|
604
604
|
), [c, v] = D(!1), b = j(!1), x = j(null), w = t ?? u, S = j(w);
|
|
605
605
|
S.current = w;
|
|
606
606
|
const y = t !== void 0;
|
|
607
|
-
|
|
607
|
+
Q(() => Ja(), []), Q(() => {
|
|
608
608
|
t && (x.current && clearTimeout(x.current), b.current = !1, v(!1));
|
|
609
|
-
}, [t]),
|
|
609
|
+
}, [t]), Q(
|
|
610
610
|
() => () => {
|
|
611
611
|
x.current && clearTimeout(x.current);
|
|
612
612
|
},
|
|
@@ -626,7 +626,7 @@ function Xa({
|
|
|
626
626
|
y || m(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
627
627
|
S.current && (b.current = !1, v(!1));
|
|
628
628
|
});
|
|
629
|
-
},
|
|
629
|
+
}, Qa);
|
|
630
630
|
};
|
|
631
631
|
return /* @__PURE__ */ e(Nt.Provider, { value: () => C(!1), children: /* @__PURE__ */ e(yt.Provider, { value: c, children: /* @__PURE__ */ e(Ee.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
632
632
|
I.Root,
|
|
@@ -649,7 +649,7 @@ const wt = f(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
649
649
|
}
|
|
650
650
|
));
|
|
651
651
|
wt.displayName = "DialogTrigger";
|
|
652
|
-
const
|
|
652
|
+
const Rr = I.Close, Ct = f(
|
|
653
653
|
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(I.Close, { asChild: !0, children: /* @__PURE__ */ e(M, { ref: l, type: "button", variant: t, ...n, children: a }) })
|
|
654
654
|
);
|
|
655
655
|
Ct.displayName = "DialogCancel";
|
|
@@ -662,7 +662,7 @@ function St(t, a = !0) {
|
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
664
|
t.dataset.dialogMotionStarted = "true";
|
|
665
|
-
const l =
|
|
665
|
+
const l = Ka(t), i = l ? Xa(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
667
|
const u = () => {
|
|
668
668
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
@@ -671,7 +671,7 @@ function St(t, a = !0) {
|
|
|
671
671
|
};
|
|
672
672
|
t.addEventListener("animationend", m);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Za(t) {
|
|
675
675
|
return t.replace(/dvh\b/g, "vh");
|
|
676
676
|
}
|
|
677
677
|
const kt = f(
|
|
@@ -686,10 +686,10 @@ const kt = f(
|
|
|
686
686
|
onPointerDownOutside: c,
|
|
687
687
|
...v
|
|
688
688
|
}, b) => {
|
|
689
|
-
const x =
|
|
689
|
+
const x = W(yt), w = n === "top", S = w ? {
|
|
690
690
|
"--dialog-top-offset": l,
|
|
691
|
-
"--dialog-top-offset-fallback":
|
|
692
|
-
} : void 0, y =
|
|
691
|
+
"--dialog-top-offset-fallback": Za(l)
|
|
692
|
+
} : void 0, y = W(Nt), C = j(null), k = ft(
|
|
693
693
|
(h) => {
|
|
694
694
|
if (C.current = h, h && i === "auto" && St(h), typeof b == "function") {
|
|
695
695
|
b(h);
|
|
@@ -760,7 +760,7 @@ const kt = f(
|
|
|
760
760
|
}
|
|
761
761
|
);
|
|
762
762
|
kt.displayName = "DialogContent";
|
|
763
|
-
function
|
|
763
|
+
function er({
|
|
764
764
|
className: t,
|
|
765
765
|
...a
|
|
766
766
|
}) {
|
|
@@ -776,7 +776,7 @@ function Ka({
|
|
|
776
776
|
}
|
|
777
777
|
);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function tr({
|
|
780
780
|
className: t,
|
|
781
781
|
...a
|
|
782
782
|
}) {
|
|
@@ -789,7 +789,7 @@ function Qa({
|
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function ar({
|
|
793
793
|
className: t,
|
|
794
794
|
...a
|
|
795
795
|
}) {
|
|
@@ -805,7 +805,7 @@ function Ya({
|
|
|
805
805
|
}
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function rr({
|
|
809
809
|
className: t,
|
|
810
810
|
...a
|
|
811
811
|
}) {
|
|
@@ -822,7 +822,7 @@ function Za({
|
|
|
822
822
|
);
|
|
823
823
|
}
|
|
824
824
|
const zt = f(({ className: t, ...a }, n) => {
|
|
825
|
-
const l =
|
|
825
|
+
const l = W(Ee) ? I.Title : "h2";
|
|
826
826
|
return /* @__PURE__ */ e(
|
|
827
827
|
l,
|
|
828
828
|
{
|
|
@@ -833,8 +833,8 @@ const zt = f(({ className: t, ...a }, n) => {
|
|
|
833
833
|
);
|
|
834
834
|
});
|
|
835
835
|
zt.displayName = "DialogTitle";
|
|
836
|
-
const
|
|
837
|
-
const l =
|
|
836
|
+
const nr = f(({ className: t, ...a }, n) => {
|
|
837
|
+
const l = W(Ee) ? I.Description : "p";
|
|
838
838
|
return /* @__PURE__ */ e(
|
|
839
839
|
l,
|
|
840
840
|
{
|
|
@@ -844,9 +844,9 @@ const er = f(({ className: t, ...a }, n) => {
|
|
|
844
844
|
}
|
|
845
845
|
);
|
|
846
846
|
});
|
|
847
|
-
|
|
848
|
-
const Dt =
|
|
849
|
-
function
|
|
847
|
+
nr.displayName = "DialogDescription";
|
|
848
|
+
const Dt = te(null);
|
|
849
|
+
function lr({
|
|
850
850
|
label: t,
|
|
851
851
|
value: a,
|
|
852
852
|
onChange: n,
|
|
@@ -862,7 +862,7 @@ function tr({
|
|
|
862
862
|
m
|
|
863
863
|
] }) });
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function ir({
|
|
866
866
|
value: t,
|
|
867
867
|
title: a,
|
|
868
868
|
description: n,
|
|
@@ -870,7 +870,7 @@ function ar({
|
|
|
870
870
|
disabled: i = !1,
|
|
871
871
|
className: u
|
|
872
872
|
}) {
|
|
873
|
-
const m =
|
|
873
|
+
const m = W(Dt), c = fe();
|
|
874
874
|
if (!m)
|
|
875
875
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
876
876
|
const v = i || m.disabled, b = m.value === t;
|
|
@@ -913,7 +913,7 @@ function ar({
|
|
|
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: a }),
|
|
916
|
-
l ? /* @__PURE__ */ e(
|
|
916
|
+
l ? /* @__PURE__ */ e(ja, { 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,7 +921,7 @@ function ar({
|
|
|
921
921
|
}
|
|
922
922
|
);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function jr({
|
|
925
925
|
open: t,
|
|
926
926
|
onOpenChange: a,
|
|
927
927
|
trigger: n,
|
|
@@ -936,7 +936,7 @@ function Mr({
|
|
|
936
936
|
}) {
|
|
937
937
|
var k;
|
|
938
938
|
const [w, S] = D(u ?? ((k = i[0]) == null ? void 0 : k.value) ?? ""), y = m ?? w;
|
|
939
|
-
return /* @__PURE__ */ s(
|
|
939
|
+
return /* @__PURE__ */ s(Ya, { open: t, onOpenChange: a, children: [
|
|
940
940
|
n ? /* @__PURE__ */ e(wt, { asChild: !0, children: n }) : null,
|
|
941
941
|
/* @__PURE__ */ s(
|
|
942
942
|
kt,
|
|
@@ -944,12 +944,12 @@ function Mr({
|
|
|
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(
|
|
947
|
+
/* @__PURE__ */ s(er, { children: [
|
|
948
|
+
/* @__PURE__ */ e(ar, { children: /* @__PURE__ */ e(zt, { className: "text-xl", children: l }) }),
|
|
949
|
+
/* @__PURE__ */ e(tr, { children: /* @__PURE__ */ e(lr, { label: l, value: y, onChange: (h) => {
|
|
950
950
|
m === void 0 && S(h), c == null || c(h);
|
|
951
951
|
}, children: i.map((h) => /* @__PURE__ */ e(
|
|
952
|
-
|
|
952
|
+
ir,
|
|
953
953
|
{
|
|
954
954
|
value: h.value,
|
|
955
955
|
title: h.title,
|
|
@@ -959,7 +959,7 @@ function Mr({
|
|
|
959
959
|
h.value
|
|
960
960
|
)) }) })
|
|
961
961
|
] }),
|
|
962
|
-
/* @__PURE__ */ s(
|
|
962
|
+
/* @__PURE__ */ s(rr, { className: "gap-3 pt-2.5", children: [
|
|
963
963
|
/* @__PURE__ */ e(Ct, { className: "flex-1", children: v }),
|
|
964
964
|
/* @__PURE__ */ e(M, { className: "flex-1", onClick: () => x == null ? void 0 : x(y), children: b })
|
|
965
965
|
] })
|
|
@@ -968,7 +968,7 @@ function Mr({
|
|
|
968
968
|
)
|
|
969
969
|
] });
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Er({ code: t, label: a, className: n }) {
|
|
972
972
|
const [l, i] = D(!1);
|
|
973
973
|
return /* @__PURE__ */ e(
|
|
974
974
|
be,
|
|
@@ -977,7 +977,7 @@ function Pr({ code: t, label: a, className: n }) {
|
|
|
977
977
|
header: /* @__PURE__ */ e("div", { className: "flex h-(--table-header-h) items-center px-(--table-pad-x) pr-28", children: /* @__PURE__ */ e("span", { className: "truncate text-[13px] font-medium text-table-header", children: a }) }),
|
|
978
978
|
action: {
|
|
979
979
|
label: l ? "Copied" : "Copy",
|
|
980
|
-
icon: l ? /* @__PURE__ */ e(
|
|
980
|
+
icon: l ? /* @__PURE__ */ e(ee, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ct, {}),
|
|
981
981
|
variant: "ghost",
|
|
982
982
|
onClick: async () => {
|
|
983
983
|
try {
|
|
@@ -991,17 +991,17 @@ function Pr({ code: t, label: a, className: n }) {
|
|
|
991
991
|
}
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
|
-
const
|
|
994
|
+
const or = {
|
|
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
|
+
}, sr = {
|
|
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
|
+
}, dr = {
|
|
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)]",
|
|
@@ -1035,7 +1035,7 @@ const rr = {
|
|
|
1035
1035
|
readOnly: C,
|
|
1036
1036
|
...k
|
|
1037
1037
|
}, h) => {
|
|
1038
|
-
const _ = fe(), B = w ?? _,
|
|
1038
|
+
const _ = fe(), B = w ?? _, O = !!x, F = !!(m && (c !== void 0 ? String(c).length > 0 : v !== void 0 && String(v).length > 0)), $ = O ? `${B}-description` : void 0, he = [S, $].filter(Boolean).join(" ") || void 0, ae = /* @__PURE__ */ e(
|
|
1039
1039
|
"input",
|
|
1040
1040
|
{
|
|
1041
1041
|
ref: h,
|
|
@@ -1051,8 +1051,8 @@ const rr = {
|
|
|
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
|
+
or[l],
|
|
1055
|
+
sr[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 rr = {
|
|
|
1068
1068
|
...k
|
|
1069
1069
|
}
|
|
1070
1070
|
);
|
|
1071
|
-
return !i && !u && !F && !
|
|
1071
|
+
return !i && !u && !F && !O ? ae : /* @__PURE__ */ s("div", { className: o("w-full", a), 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
|
+
dr[l]
|
|
1079
1079
|
),
|
|
1080
1080
|
"aria-hidden": !0,
|
|
1081
1081
|
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ke[l]), children: i })
|
|
@@ -1106,10 +1106,10 @@ const rr = {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
) : null
|
|
1108
1108
|
] }),
|
|
1109
|
-
|
|
1109
|
+
O ? /* @__PURE__ */ e(
|
|
1110
1110
|
"p",
|
|
1111
1111
|
{
|
|
1112
|
-
id:
|
|
1112
|
+
id: $,
|
|
1113
1113
|
className: o("mt-1.5 text-xs", b ? "text-error" : "text-muted"),
|
|
1114
1114
|
children: x
|
|
1115
1115
|
}
|
|
@@ -1130,20 +1130,20 @@ function _e(t, a) {
|
|
|
1130
1130
|
i && (n += _e(i, a));
|
|
1131
1131
|
}), n;
|
|
1132
1132
|
}
|
|
1133
|
-
const Mt =
|
|
1133
|
+
const Mt = te(!1);
|
|
1134
1134
|
function ze({
|
|
1135
1135
|
children: t,
|
|
1136
1136
|
...a
|
|
1137
1137
|
}) {
|
|
1138
1138
|
const n = _e(t, [
|
|
1139
1139
|
pe,
|
|
1140
|
-
|
|
1140
|
+
Y,
|
|
1141
1141
|
It
|
|
1142
1142
|
]) === 0;
|
|
1143
1143
|
return /* @__PURE__ */ e(Mt.Provider, { value: n, children: /* @__PURE__ */ e(T.Root, { ...a, children: t }) });
|
|
1144
1144
|
}
|
|
1145
1145
|
const se = f(({ className: t, disabled: a, ...n }, l) => {
|
|
1146
|
-
const i =
|
|
1146
|
+
const i = W(Mt);
|
|
1147
1147
|
return /* @__PURE__ */ e(
|
|
1148
1148
|
T.Trigger,
|
|
1149
1149
|
{
|
|
@@ -1168,7 +1168,7 @@ const Pt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1168
1168
|
}
|
|
1169
1169
|
));
|
|
1170
1170
|
Pt.displayName = "DropdownMenuChevron";
|
|
1171
|
-
const
|
|
1171
|
+
const _r = T.Group, Lr = T.Portal, de = f(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(T.Portal, { children: /* @__PURE__ */ e(
|
|
1172
1172
|
T.Content,
|
|
1173
1173
|
{
|
|
1174
1174
|
ref: l,
|
|
@@ -1202,7 +1202,7 @@ const pe = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
|
1202
1202
|
}
|
|
1203
1203
|
));
|
|
1204
1204
|
pe.displayName = "DropdownMenuItem";
|
|
1205
|
-
const
|
|
1205
|
+
const Y = f(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1206
1206
|
T.CheckboxItem,
|
|
1207
1207
|
{
|
|
1208
1208
|
ref: i,
|
|
@@ -1213,12 +1213,12 @@ const Q = f(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__
|
|
|
1213
1213
|
checked: n,
|
|
1214
1214
|
...l,
|
|
1215
1215
|
children: [
|
|
1216
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(T.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(
|
|
1216
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(T.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(ee, { className: "size-3", weight: "bold" }) }) }),
|
|
1217
1217
|
a
|
|
1218
1218
|
]
|
|
1219
1219
|
}
|
|
1220
1220
|
));
|
|
1221
|
-
|
|
1221
|
+
Y.displayName = "DropdownMenuCheckboxItem";
|
|
1222
1222
|
const ce = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1223
1223
|
T.Label,
|
|
1224
1224
|
{
|
|
@@ -1228,7 +1228,7 @@ const ce = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1228
1228
|
}
|
|
1229
1229
|
));
|
|
1230
1230
|
ce.displayName = "DropdownMenuLabel";
|
|
1231
|
-
const
|
|
1231
|
+
const Ar = T.Sub, It = f(({ className: t, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1232
1232
|
T.SubTrigger,
|
|
1233
1233
|
{
|
|
1234
1234
|
ref: i,
|
|
@@ -1247,7 +1247,7 @@ const jr = T.Sub, It = f(({ className: t, inset: a, children: n, ...l }, i) => /
|
|
|
1247
1247
|
}
|
|
1248
1248
|
));
|
|
1249
1249
|
It.displayName = "DropdownMenuSubTrigger";
|
|
1250
|
-
const
|
|
1250
|
+
const cr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1251
1251
|
T.SubContent,
|
|
1252
1252
|
{
|
|
1253
1253
|
ref: n,
|
|
@@ -1265,7 +1265,7 @@ const ir = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1265
1265
|
...a
|
|
1266
1266
|
}
|
|
1267
1267
|
));
|
|
1268
|
-
|
|
1268
|
+
cr.displayName = "DropdownMenuSubContent";
|
|
1269
1269
|
const Me = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1270
1270
|
T.Separator,
|
|
1271
1271
|
{
|
|
@@ -1275,8 +1275,8 @@ const Me = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1275
1275
|
}
|
|
1276
1276
|
));
|
|
1277
1277
|
Me.displayName = "DropdownMenuSeparator";
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1278
|
+
const Br = P.Group, ur = P.Value;
|
|
1279
|
+
function mr({
|
|
1280
1280
|
children: t,
|
|
1281
1281
|
disabled: a,
|
|
1282
1282
|
...n
|
|
@@ -1337,13 +1337,13 @@ const Le = f(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
|
1337
1337
|
),
|
|
1338
1338
|
...n,
|
|
1339
1339
|
children: [
|
|
1340
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(P.ItemIndicator, { children: /* @__PURE__ */ e(
|
|
1340
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(P.ItemIndicator, { children: /* @__PURE__ */ e(ee, { className: "size-3.5" }) }) }),
|
|
1341
1341
|
/* @__PURE__ */ e(P.ItemText, { children: a })
|
|
1342
1342
|
]
|
|
1343
1343
|
}
|
|
1344
1344
|
));
|
|
1345
1345
|
Le.displayName = "SelectItem";
|
|
1346
|
-
const
|
|
1346
|
+
const pr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1347
1347
|
P.Label,
|
|
1348
1348
|
{
|
|
1349
1349
|
ref: n,
|
|
@@ -1351,8 +1351,8 @@ const dr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1351
1351
|
...a
|
|
1352
1352
|
}
|
|
1353
1353
|
));
|
|
1354
|
-
|
|
1355
|
-
function
|
|
1354
|
+
pr.displayName = "SelectLabel";
|
|
1355
|
+
function fr({
|
|
1356
1356
|
icon: t,
|
|
1357
1357
|
title: a,
|
|
1358
1358
|
description: n,
|
|
@@ -1377,14 +1377,14 @@ function cr({
|
|
|
1377
1377
|
}
|
|
1378
1378
|
);
|
|
1379
1379
|
}
|
|
1380
|
-
const
|
|
1381
|
-
function
|
|
1380
|
+
const br = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1381
|
+
function hr(t) {
|
|
1382
1382
|
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1383
1383
|
var n;
|
|
1384
1384
|
return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1385
1385
|
}).join("");
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function Fr({
|
|
1388
1388
|
name: t,
|
|
1389
1389
|
secondary: a,
|
|
1390
1390
|
image: n
|
|
@@ -1392,7 +1392,7 @@ function _r({
|
|
|
1392
1392
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1393
1393
|
/* @__PURE__ */ s(bt, { className: "size-8", children: [
|
|
1394
1394
|
n ? /* @__PURE__ */ e(ht, { src: n, alt: "" }) : null,
|
|
1395
|
-
/* @__PURE__ */ e(gt, { children:
|
|
1395
|
+
/* @__PURE__ */ e(gt, { children: hr(t) })
|
|
1396
1396
|
] }),
|
|
1397
1397
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1398
1398
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1400,7 +1400,7 @@ function _r({
|
|
|
1400
1400
|
] })
|
|
1401
1401
|
] });
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function $r({
|
|
1404
1404
|
rows: t,
|
|
1405
1405
|
columns: a,
|
|
1406
1406
|
getRowId: n,
|
|
@@ -1420,38 +1420,42 @@ function Lr({
|
|
|
1420
1420
|
bulkActions: h,
|
|
1421
1421
|
rowActions: _,
|
|
1422
1422
|
onRowClick: B,
|
|
1423
|
-
defaultSort:
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1423
|
+
defaultSort: O,
|
|
1424
|
+
sort: F,
|
|
1425
|
+
onSortChange: $,
|
|
1426
|
+
pageSize: he = 25,
|
|
1427
|
+
pageSizeOptions: ae = [10, 25, 50, 100],
|
|
1428
|
+
pagination: Et = "auto",
|
|
1429
|
+
tone: _t,
|
|
1430
|
+
headerAction: Lt,
|
|
1431
|
+
headerClassName: At,
|
|
1432
|
+
panelClassName: Bt,
|
|
1433
|
+
className: Ft
|
|
1432
1434
|
}) {
|
|
1433
1435
|
const [Ae, Be] = D(
|
|
1434
1436
|
() => Object.fromEntries(
|
|
1435
1437
|
a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
|
|
1436
1438
|
)
|
|
1437
|
-
), [Fe, $e] = D(null), [ge, qe] = D(null), [
|
|
1438
|
-
|
|
1439
|
-
),
|
|
1440
|
-
|
|
1439
|
+
), [Fe, $e] = D(null), [ge, qe] = D(null), [$t, qt] = D(
|
|
1440
|
+
O ?? null
|
|
1441
|
+
), N = $ ? F ?? null : $t, Gt = (r) => {
|
|
1442
|
+
$ ? $(r) : qt(r);
|
|
1443
|
+
}, [U, re] = D(0), [L, Ht] = D(he), [q, xe] = D(/* @__PURE__ */ new Set()), [Vt, ve] = D([]), Ge = a.map((r) => r.id), He = new Map(a.map((r) => [r.id, r])), Ve = Fe ? Fe.map((r) => He.get(r)).filter((r) => !!r) : a, X = Ve.filter((r) => !Ae[r.id]), We = Ve.filter((r) => Ae[r.id] && !r.required), Oe = (r) => !!r.required, Wt = (r) => He.get(r), Ot = (r, d) => {
|
|
1444
|
+
const p = d ? Wt(d) : void 0;
|
|
1441
1445
|
!p || Oe(p) || r === d || $e((g) => {
|
|
1442
1446
|
const z = g ?? Ge;
|
|
1443
|
-
return
|
|
1447
|
+
return Da(z, z.indexOf(r), z.indexOf(d));
|
|
1444
1448
|
});
|
|
1445
|
-
},
|
|
1449
|
+
}, Ut = (r) => {
|
|
1446
1450
|
Be((d) => ({ ...d, [r]: !1 })), $e((d) => d && d.includes(r) ? d : [...d ?? Ge, r]);
|
|
1447
|
-
}, ye = (c ?? []).filter((r) =>
|
|
1451
|
+
}, ye = (c ?? []).filter((r) => Vt.includes(r.id)), Xt = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ne = nt(() => {
|
|
1448
1452
|
let r = t;
|
|
1449
1453
|
for (const p of c ?? [])
|
|
1450
1454
|
p.value.length > 0 && (r = r.filter((g) => p.match(g, p.value)));
|
|
1451
1455
|
if (!m || !m.value.trim()) return r;
|
|
1452
1456
|
const d = m.value.trim().toLowerCase();
|
|
1453
1457
|
return r.filter((p) => m.keys(p).toLowerCase().includes(d));
|
|
1454
|
-
}, [t, m, c]),
|
|
1458
|
+
}, [t, m, c]), G = nt(() => {
|
|
1455
1459
|
if (!N) return ne;
|
|
1456
1460
|
const r = a.find((p) => p.id === N.id);
|
|
1457
1461
|
if (!(r != null && r.sortValue)) return ne;
|
|
@@ -1460,31 +1464,33 @@ function Lr({
|
|
|
1460
1464
|
const z = r.sortValue(p), R = r.sortValue(g);
|
|
1461
1465
|
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;
|
|
1462
1466
|
});
|
|
1463
|
-
}, [ne, N, a]),
|
|
1464
|
-
|
|
1467
|
+
}, [ne, N, a]), J = Math.max(1, Math.ceil(G.length / L)), Jt = !l && !i && G.length > 0 && (Et === "always" || G.length > L);
|
|
1468
|
+
Q(() => {
|
|
1465
1469
|
re(0);
|
|
1466
|
-
}, [m == null ? void 0 : m.value, L, N == null ? void 0 : N.id, N == null ? void 0 : N.dir, S,
|
|
1467
|
-
|
|
1468
|
-
}, [
|
|
1469
|
-
const le =
|
|
1470
|
-
r.sortable
|
|
1471
|
-
|
|
1470
|
+
}, [m == null ? void 0 : m.value, L, N == null ? void 0 : N.id, N == null ? void 0 : N.dir, S, Xt]), Q(() => {
|
|
1471
|
+
U > J - 1 && re(J - 1);
|
|
1472
|
+
}, [U, J]);
|
|
1473
|
+
const le = U * L, A = G.slice(le, le + L), Kt = (r) => {
|
|
1474
|
+
if (!r.sortable) return;
|
|
1475
|
+
const d = N;
|
|
1476
|
+
Gt(
|
|
1477
|
+
(d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
|
|
1472
1478
|
);
|
|
1473
|
-
}, Ue = A.length > 0 && A.every((r) =>
|
|
1479
|
+
}, Ue = A.length > 0 && A.every((r) => q.has(n(r))), Qt = A.some((r) => q.has(n(r))), Yt = t.filter((r) => q.has(n(r))), Zt = () => {
|
|
1474
1480
|
xe((r) => {
|
|
1475
1481
|
const d = new Set(r);
|
|
1476
1482
|
return Ue ? A.forEach((p) => d.delete(n(p))) : A.forEach((p) => d.add(n(p))), d;
|
|
1477
1483
|
});
|
|
1478
|
-
},
|
|
1484
|
+
}, ea = (r) => {
|
|
1479
1485
|
xe((d) => {
|
|
1480
1486
|
const p = new Set(d);
|
|
1481
1487
|
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1482
1488
|
});
|
|
1483
|
-
},
|
|
1489
|
+
}, ta = !!(m || c != null && c.length || v || b), aa = (r) => (N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? "ascending" : "descending" : void 0, Xe = j(null), Je = j(null), Ke = j(null), Qe = j(null), [H, Ne] = D([]), ra = X.map((r) => r.id).join("\0"), ie = `${k ? "s" : "-"}|${_ ? "a" : "-"}|${ra}`, Ye = j(ie), na = H.length > 0, we = ft(() => {
|
|
1484
1490
|
const r = Ke.current, d = Qe.current;
|
|
1485
1491
|
r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1486
1492
|
}, []);
|
|
1487
|
-
|
|
1493
|
+
Na(() => {
|
|
1488
1494
|
const r = Xe.current;
|
|
1489
1495
|
if (!r) return;
|
|
1490
1496
|
if (Ye.current !== ie) {
|
|
@@ -1515,9 +1521,9 @@ function Lr({
|
|
|
1515
1521
|
if (d(), we(), typeof ResizeObserver > "u") return;
|
|
1516
1522
|
const p = new ResizeObserver(d);
|
|
1517
1523
|
return p.observe(r), () => p.disconnect();
|
|
1518
|
-
}, [ie,
|
|
1519
|
-
const
|
|
1520
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1524
|
+
}, [ie, na, l, i, we]);
|
|
1525
|
+
const K = H.reduce((r, d) => r + d, 0);
|
|
1526
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", Ft), children: [
|
|
1521
1527
|
w && w.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: w.map((r) => {
|
|
1522
1528
|
const d = r.id === S;
|
|
1523
1529
|
return /* @__PURE__ */ e(
|
|
@@ -1536,7 +1542,7 @@ function Lr({
|
|
|
1536
1542
|
r.id
|
|
1537
1543
|
);
|
|
1538
1544
|
}) }),
|
|
1539
|
-
|
|
1545
|
+
ta && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1540
1546
|
m && /* @__PURE__ */ e(
|
|
1541
1547
|
Tt,
|
|
1542
1548
|
{
|
|
@@ -1546,7 +1552,7 @@ function Lr({
|
|
|
1546
1552
|
value: m.value,
|
|
1547
1553
|
onChange: (r) => m.onChange(r.target.value),
|
|
1548
1554
|
onClear: () => m.onChange(""),
|
|
1549
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1555
|
+
leadingIcon: /* @__PURE__ */ e(pa, {}),
|
|
1550
1556
|
containerClassName: "w-full sm:w-[280px]",
|
|
1551
1557
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1552
1558
|
}
|
|
@@ -1558,17 +1564,17 @@ function Lr({
|
|
|
1558
1564
|
{
|
|
1559
1565
|
variant: "secondary",
|
|
1560
1566
|
size: "md",
|
|
1561
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1567
|
+
leadingIcon: /* @__PURE__ */ e(fa, {}),
|
|
1562
1568
|
trailingIcon: /* @__PURE__ */ e(Pt, {}),
|
|
1563
1569
|
children: "Columns"
|
|
1564
1570
|
}
|
|
1565
1571
|
) }),
|
|
1566
1572
|
/* @__PURE__ */ s(de, { align: "end", className: "w-54", children: [
|
|
1567
1573
|
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Active columns" }),
|
|
1568
|
-
|
|
1574
|
+
X.map((r) => {
|
|
1569
1575
|
const d = Oe(r);
|
|
1570
1576
|
return /* @__PURE__ */ s(
|
|
1571
|
-
|
|
1577
|
+
Y,
|
|
1572
1578
|
{
|
|
1573
1579
|
checked: !0,
|
|
1574
1580
|
draggable: !d,
|
|
@@ -1580,7 +1586,7 @@ function Lr({
|
|
|
1580
1586
|
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), qe(r.id);
|
|
1581
1587
|
},
|
|
1582
1588
|
onDragOver: (p) => {
|
|
1583
|
-
ge && (p.preventDefault(),
|
|
1589
|
+
ge && (p.preventDefault(), Ot(ge, r.id));
|
|
1584
1590
|
},
|
|
1585
1591
|
onDrop: (p) => p.preventDefault(),
|
|
1586
1592
|
onDragEnd: () => qe(null),
|
|
@@ -1591,8 +1597,8 @@ function Lr({
|
|
|
1591
1597
|
className: "justify-between",
|
|
1592
1598
|
children: [
|
|
1593
1599
|
/* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
|
|
1594
|
-
d ? /* @__PURE__ */ e(
|
|
1595
|
-
|
|
1600
|
+
d ? /* @__PURE__ */ e(ba, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1601
|
+
ha,
|
|
1596
1602
|
{
|
|
1597
1603
|
"aria-hidden": !0,
|
|
1598
1604
|
className: o(
|
|
@@ -1610,10 +1616,10 @@ function Lr({
|
|
|
1610
1616
|
/* @__PURE__ */ e(Me, {}),
|
|
1611
1617
|
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Available columns" }),
|
|
1612
1618
|
We.map((r) => /* @__PURE__ */ e(
|
|
1613
|
-
|
|
1619
|
+
Y,
|
|
1614
1620
|
{
|
|
1615
1621
|
checked: !1,
|
|
1616
|
-
onCheckedChange: () =>
|
|
1622
|
+
onCheckedChange: () => Ut(r.id),
|
|
1617
1623
|
onSelect: (d) => d.preventDefault(),
|
|
1618
1624
|
children: r.header
|
|
1619
1625
|
},
|
|
@@ -1680,7 +1686,7 @@ function Lr({
|
|
|
1680
1686
|
r.options.map((p) => {
|
|
1681
1687
|
const g = r.value.includes(p.value);
|
|
1682
1688
|
return /* @__PURE__ */ e(
|
|
1683
|
-
|
|
1689
|
+
Y,
|
|
1684
1690
|
{
|
|
1685
1691
|
checked: g,
|
|
1686
1692
|
onCheckedChange: () => r.onChange(
|
|
@@ -1712,9 +1718,9 @@ function Lr({
|
|
|
1712
1718
|
)
|
|
1713
1719
|
] }) : null,
|
|
1714
1720
|
C,
|
|
1715
|
-
k &&
|
|
1721
|
+
k && q.size > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
|
|
1716
1722
|
/* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
|
|
1717
|
-
|
|
1723
|
+
q.size,
|
|
1718
1724
|
" selected"
|
|
1719
1725
|
] }),
|
|
1720
1726
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (h ?? []).map((r) => /* @__PURE__ */ s(
|
|
@@ -1723,7 +1729,7 @@ function Lr({
|
|
|
1723
1729
|
size: "md",
|
|
1724
1730
|
variant: r.variant ?? "outline",
|
|
1725
1731
|
disabled: r.disabled,
|
|
1726
|
-
onClick: () => void r.onRun(
|
|
1732
|
+
onClick: () => void r.onRun(Yt),
|
|
1727
1733
|
children: [
|
|
1728
1734
|
r.icon,
|
|
1729
1735
|
r.label
|
|
@@ -1749,10 +1755,10 @@ function Lr({
|
|
|
1749
1755
|
{
|
|
1750
1756
|
scrollMode: "panel",
|
|
1751
1757
|
headerContentRef: Ke,
|
|
1752
|
-
action:
|
|
1753
|
-
tone:
|
|
1754
|
-
headerClassName:
|
|
1755
|
-
panelClassName:
|
|
1758
|
+
action: Lt,
|
|
1759
|
+
tone: _t,
|
|
1760
|
+
headerClassName: At,
|
|
1761
|
+
panelClassName: Bt,
|
|
1756
1762
|
header: (
|
|
1757
1763
|
// Visible header band. Presentational (aria-sort lives on the body's
|
|
1758
1764
|
// sr-only thead); widths are pinned to the measured body columns and
|
|
@@ -1766,24 +1772,24 @@ function Lr({
|
|
|
1766
1772
|
style: {
|
|
1767
1773
|
// Fill the container when it fits; force totalWidth (and the
|
|
1768
1774
|
// shared scroller) only when the columns need more room.
|
|
1769
|
-
minWidth:
|
|
1770
|
-
visibility:
|
|
1775
|
+
minWidth: K > 0 ? K : void 0,
|
|
1776
|
+
visibility: K > 0 ? void 0 : "hidden"
|
|
1771
1777
|
},
|
|
1772
1778
|
children: [
|
|
1773
|
-
/* @__PURE__ */ e("colgroup", { children:
|
|
1779
|
+
/* @__PURE__ */ e("colgroup", { children: H.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1774
1780
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1775
1781
|
k && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
|
|
1776
1782
|
De,
|
|
1777
1783
|
{
|
|
1778
1784
|
"aria-label": "Select all rows",
|
|
1779
|
-
checked: Ue ? !0 :
|
|
1780
|
-
onCheckedChange:
|
|
1785
|
+
checked: Ue ? !0 : Qt ? "indeterminate" : !1,
|
|
1786
|
+
onCheckedChange: Zt
|
|
1781
1787
|
}
|
|
1782
1788
|
) }),
|
|
1783
|
-
|
|
1789
|
+
X.map((r) => /* @__PURE__ */ e(
|
|
1784
1790
|
"th",
|
|
1785
1791
|
{
|
|
1786
|
-
className: o(
|
|
1792
|
+
className: o(br, r.align === "right" && "text-right", r.className),
|
|
1787
1793
|
children: /* @__PURE__ */ e(
|
|
1788
1794
|
"span",
|
|
1789
1795
|
{
|
|
@@ -1796,7 +1802,7 @@ function Lr({
|
|
|
1796
1802
|
variant: "ghost",
|
|
1797
1803
|
size: "xs",
|
|
1798
1804
|
"aria-label": `Sort by ${r.header}`,
|
|
1799
|
-
onClick: () =>
|
|
1805
|
+
onClick: () => Kt(r),
|
|
1800
1806
|
className: o(
|
|
1801
1807
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1802
1808
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
@@ -1805,7 +1811,7 @@ function Lr({
|
|
|
1805
1811
|
),
|
|
1806
1812
|
children: [
|
|
1807
1813
|
r.header,
|
|
1808
|
-
(N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? /* @__PURE__ */ e(
|
|
1814
|
+
(N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? /* @__PURE__ */ e(xa, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(me, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(va, { className: "size-3.5 opacity-50" })
|
|
1809
1815
|
]
|
|
1810
1816
|
}
|
|
1811
1817
|
) : r.header
|
|
@@ -1821,14 +1827,14 @@ function Lr({
|
|
|
1821
1827
|
)
|
|
1822
1828
|
),
|
|
1823
1829
|
children: /* @__PURE__ */ e("div", { ref: Qe, className: "overflow-x-auto", onScroll: we, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((r) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, r)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1824
|
-
/* @__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(
|
|
1830
|
+
/* @__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(ga, { weight: "duotone" }) }),
|
|
1825
1831
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1826
1832
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1827
1833
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1828
1834
|
] }),
|
|
1829
1835
|
i.action
|
|
1830
1836
|
] }) : A.length === 0 ? /* @__PURE__ */ e(
|
|
1831
|
-
|
|
1837
|
+
fr,
|
|
1832
1838
|
{
|
|
1833
1839
|
icon: u == null ? void 0 : u.icon,
|
|
1834
1840
|
title: (u == null ? void 0 : u.title) ?? "No results",
|
|
@@ -1846,20 +1852,20 @@ function Lr({
|
|
|
1846
1852
|
// Measured: fill the container, pinned to the band's colgroup
|
|
1847
1853
|
// pixel widths; minWidth forces the shared scroller open only
|
|
1848
1854
|
// when the columns need more room than the container has.
|
|
1849
|
-
|
|
1855
|
+
H.length > 0 ? "w-full table-fixed" : "table-auto"
|
|
1850
1856
|
),
|
|
1851
|
-
style: { minWidth:
|
|
1857
|
+
style: { minWidth: K > 0 ? K : void 0 },
|
|
1852
1858
|
children: [
|
|
1853
|
-
|
|
1859
|
+
H.length > 0 && /* @__PURE__ */ e("colgroup", { children: H.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1854
1860
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1855
1861
|
k && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1856
|
-
|
|
1862
|
+
X.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": aa(r), children: r.header }, r.id)),
|
|
1857
1863
|
_ && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1858
1864
|
] }) }),
|
|
1859
|
-
/* @__PURE__ */ e(
|
|
1860
|
-
const d = n(r), p =
|
|
1865
|
+
/* @__PURE__ */ e(Aa, { children: A.map((r) => {
|
|
1866
|
+
const d = n(r), p = q.has(d);
|
|
1861
1867
|
return /* @__PURE__ */ s(
|
|
1862
|
-
|
|
1868
|
+
Ba,
|
|
1863
1869
|
{
|
|
1864
1870
|
"data-state": p ? "selected" : void 0,
|
|
1865
1871
|
onClick: B ? () => B(r) : void 0,
|
|
@@ -1870,10 +1876,10 @@ function Lr({
|
|
|
1870
1876
|
{
|
|
1871
1877
|
"aria-label": "Select row",
|
|
1872
1878
|
checked: p,
|
|
1873
|
-
onCheckedChange: () =>
|
|
1879
|
+
onCheckedChange: () => ea(d)
|
|
1874
1880
|
}
|
|
1875
1881
|
) }),
|
|
1876
|
-
|
|
1882
|
+
X.map((g) => /* @__PURE__ */ e(
|
|
1877
1883
|
Se,
|
|
1878
1884
|
{
|
|
1879
1885
|
"data-numeric": g.numeric ? "" : void 0,
|
|
@@ -1882,7 +1888,16 @@ function Lr({
|
|
|
1882
1888
|
},
|
|
1883
1889
|
g.id
|
|
1884
1890
|
)),
|
|
1885
|
-
_ && /* @__PURE__ */ e(
|
|
1891
|
+
_ && /* @__PURE__ */ e(
|
|
1892
|
+
Se,
|
|
1893
|
+
{
|
|
1894
|
+
className: "w-44 px-4 text-right",
|
|
1895
|
+
onClick: (g) => {
|
|
1896
|
+
g.target.closest("button, a, input, [role='menuitem']") && g.stopPropagation();
|
|
1897
|
+
},
|
|
1898
|
+
children: _(r)
|
|
1899
|
+
}
|
|
1900
|
+
)
|
|
1886
1901
|
]
|
|
1887
1902
|
},
|
|
1888
1903
|
d
|
|
@@ -1893,18 +1908,18 @@ function Lr({
|
|
|
1893
1908
|
) })
|
|
1894
1909
|
}
|
|
1895
1910
|
),
|
|
1896
|
-
|
|
1911
|
+
Jt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1897
1912
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1898
1913
|
le + 1,
|
|
1899
1914
|
"–",
|
|
1900
|
-
Math.min(le + L,
|
|
1915
|
+
Math.min(le + L, G.length),
|
|
1901
1916
|
" of ",
|
|
1902
|
-
|
|
1917
|
+
G.length
|
|
1903
1918
|
] }),
|
|
1904
1919
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1905
|
-
/* @__PURE__ */ s(
|
|
1906
|
-
/* @__PURE__ */ e(Rt, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(
|
|
1907
|
-
/* @__PURE__ */ e(jt, { children:
|
|
1920
|
+
/* @__PURE__ */ s(mr, { value: String(L), onValueChange: (r) => Ht(Number(r)), children: [
|
|
1921
|
+
/* @__PURE__ */ e(Rt, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(ur, {}) }),
|
|
1922
|
+
/* @__PURE__ */ e(jt, { children: ae.map((r) => /* @__PURE__ */ e(Le, { value: String(r), children: r }, r)) })
|
|
1908
1923
|
] }),
|
|
1909
1924
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
1910
1925
|
/* @__PURE__ */ e(
|
|
@@ -1913,9 +1928,9 @@ function Lr({
|
|
|
1913
1928
|
variant: "secondary",
|
|
1914
1929
|
size: "icon",
|
|
1915
1930
|
"aria-label": "Previous page",
|
|
1916
|
-
disabled:
|
|
1931
|
+
disabled: U <= 0,
|
|
1917
1932
|
onClick: () => re((r) => Math.max(0, r - 1)),
|
|
1918
|
-
children: /* @__PURE__ */ e(
|
|
1933
|
+
children: /* @__PURE__ */ e(ya, {})
|
|
1919
1934
|
}
|
|
1920
1935
|
),
|
|
1921
1936
|
/* @__PURE__ */ e(
|
|
@@ -1924,8 +1939,8 @@ function Lr({
|
|
|
1924
1939
|
variant: "secondary",
|
|
1925
1940
|
size: "icon",
|
|
1926
1941
|
"aria-label": "Next page",
|
|
1927
|
-
disabled:
|
|
1928
|
-
onClick: () => re((r) => Math.min(
|
|
1942
|
+
disabled: U >= J - 1,
|
|
1943
|
+
onClick: () => re((r) => Math.min(J - 1, r + 1)),
|
|
1929
1944
|
children: /* @__PURE__ */ e(ut, {})
|
|
1930
1945
|
}
|
|
1931
1946
|
)
|
|
@@ -1934,7 +1949,7 @@ function Lr({
|
|
|
1934
1949
|
] })
|
|
1935
1950
|
] });
|
|
1936
1951
|
}
|
|
1937
|
-
function
|
|
1952
|
+
function qr({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
1938
1953
|
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: [
|
|
1939
1954
|
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,
|
|
1940
1955
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
@@ -1944,7 +1959,7 @@ function Ar({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
|
1944
1959
|
l
|
|
1945
1960
|
] }) });
|
|
1946
1961
|
}
|
|
1947
|
-
function
|
|
1962
|
+
function Gr({ className: t, ...a }) {
|
|
1948
1963
|
return /* @__PURE__ */ e(
|
|
1949
1964
|
"kbd",
|
|
1950
1965
|
{
|
|
@@ -1956,8 +1971,8 @@ function Br({ className: t, ...a }) {
|
|
|
1956
1971
|
}
|
|
1957
1972
|
);
|
|
1958
1973
|
}
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1974
|
+
const gr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1975
|
+
ka.Root,
|
|
1961
1976
|
{
|
|
1962
1977
|
ref: n,
|
|
1963
1978
|
className: o(
|
|
@@ -1967,8 +1982,8 @@ const pr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1967
1982
|
...a
|
|
1968
1983
|
}
|
|
1969
1984
|
));
|
|
1970
|
-
|
|
1971
|
-
function
|
|
1985
|
+
gr.displayName = "Label";
|
|
1986
|
+
function Hr({
|
|
1972
1987
|
value: t,
|
|
1973
1988
|
onValueChange: a,
|
|
1974
1989
|
options: n,
|
|
@@ -2020,8 +2035,8 @@ function Fr({
|
|
|
2020
2035
|
}
|
|
2021
2036
|
);
|
|
2022
2037
|
}
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2038
|
+
const xr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
2039
|
+
za.Root,
|
|
2025
2040
|
{
|
|
2026
2041
|
ref: i,
|
|
2027
2042
|
decorative: n,
|
|
@@ -2034,8 +2049,8 @@ const fr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0,
|
|
|
2034
2049
|
...l
|
|
2035
2050
|
}
|
|
2036
2051
|
));
|
|
2037
|
-
|
|
2038
|
-
function
|
|
2052
|
+
xr.displayName = "Separator";
|
|
2053
|
+
function Vr({ className: t, ...a }) {
|
|
2039
2054
|
return /* @__PURE__ */ e(
|
|
2040
2055
|
"div",
|
|
2041
2056
|
{
|
|
@@ -2044,8 +2059,8 @@ function $r({ className: t, ...a }) {
|
|
|
2044
2059
|
}
|
|
2045
2060
|
);
|
|
2046
2061
|
}
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2062
|
+
const Wr = Z.Provider, Or = Z.Root, Ur = Z.Trigger, vr = f(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(Z.Portal, { children: /* @__PURE__ */ e(
|
|
2063
|
+
Z.Content,
|
|
2049
2064
|
{
|
|
2050
2065
|
ref: l,
|
|
2051
2066
|
sideOffset: a,
|
|
@@ -2062,82 +2077,82 @@ const qr = Y.Provider, Gr = Y.Root, Hr = Y.Trigger, br = f(({ className: t, side
|
|
|
2062
2077
|
...n
|
|
2063
2078
|
}
|
|
2064
2079
|
) }));
|
|
2065
|
-
|
|
2080
|
+
vr.displayName = "TooltipContent";
|
|
2066
2081
|
export {
|
|
2067
|
-
|
|
2082
|
+
Dr as AgentPrompt,
|
|
2068
2083
|
bt as Avatar,
|
|
2069
2084
|
gt as AvatarFallback,
|
|
2070
2085
|
ht as AvatarImage,
|
|
2071
|
-
|
|
2086
|
+
ja as Badge,
|
|
2072
2087
|
M as Button,
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2088
|
+
Tr as Callout,
|
|
2089
|
+
Ha as Card,
|
|
2090
|
+
Oa as CardContent,
|
|
2091
|
+
Wa as CardDescription,
|
|
2092
|
+
Ua as CardFooter,
|
|
2078
2093
|
xt as CardHeader,
|
|
2079
|
-
|
|
2094
|
+
Va as CardTitle,
|
|
2080
2095
|
De as Checkbox,
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2096
|
+
jr as ChoiceDialog,
|
|
2097
|
+
Er as CodeBlock,
|
|
2098
|
+
$r as DataTable,
|
|
2099
|
+
Fr as DataTableIdentity,
|
|
2100
|
+
Ya as Dialog,
|
|
2101
|
+
tr as DialogBody,
|
|
2087
2102
|
Ct as DialogCancel,
|
|
2088
|
-
|
|
2103
|
+
Rr as DialogClose,
|
|
2089
2104
|
kt as DialogContent,
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2105
|
+
nr as DialogDescription,
|
|
2106
|
+
rr as DialogFooter,
|
|
2107
|
+
ar as DialogHeader,
|
|
2108
|
+
er as DialogPanel,
|
|
2094
2109
|
zt as DialogTitle,
|
|
2095
2110
|
wt as DialogTrigger,
|
|
2096
2111
|
ze as DropdownMenu,
|
|
2097
|
-
|
|
2112
|
+
Y as DropdownMenuCheckboxItem,
|
|
2098
2113
|
Pt as DropdownMenuChevron,
|
|
2099
2114
|
de as DropdownMenuContent,
|
|
2100
|
-
|
|
2115
|
+
_r as DropdownMenuGroup,
|
|
2101
2116
|
pe as DropdownMenuItem,
|
|
2102
2117
|
ce as DropdownMenuLabel,
|
|
2103
|
-
|
|
2118
|
+
Lr as DropdownMenuPortal,
|
|
2104
2119
|
Me as DropdownMenuSeparator,
|
|
2105
|
-
|
|
2106
|
-
|
|
2120
|
+
Ar as DropdownMenuSub,
|
|
2121
|
+
cr as DropdownMenuSubContent,
|
|
2107
2122
|
It as DropdownMenuSubTrigger,
|
|
2108
2123
|
se as DropdownMenuTrigger,
|
|
2109
|
-
|
|
2124
|
+
qr as EmptyState,
|
|
2110
2125
|
Tt as Input,
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2126
|
+
Gr as Kbd,
|
|
2127
|
+
gr as Label,
|
|
2128
|
+
ir as RadioCard,
|
|
2129
|
+
lr as RadioGroup,
|
|
2130
|
+
Hr as Segmented,
|
|
2131
|
+
mr as Select,
|
|
2117
2132
|
jt as SelectContent,
|
|
2118
|
-
|
|
2133
|
+
Br as SelectGroup,
|
|
2119
2134
|
Le as SelectItem,
|
|
2120
|
-
|
|
2135
|
+
pr as SelectLabel,
|
|
2121
2136
|
Rt as SelectTrigger,
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2137
|
+
ur as SelectValue,
|
|
2138
|
+
xr as Separator,
|
|
2139
|
+
Vr as Skeleton,
|
|
2140
|
+
Ta as Spinner,
|
|
2141
|
+
Mr as Table,
|
|
2142
|
+
Aa as TableBody,
|
|
2128
2143
|
Se as TableCell,
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2144
|
+
_a as TableContainer,
|
|
2145
|
+
fr as TableEmptyState,
|
|
2146
|
+
Ir as TableHead,
|
|
2147
|
+
Pr as TableHeader,
|
|
2148
|
+
La as TablePanel,
|
|
2149
|
+
Ba as TableRow,
|
|
2135
2150
|
be as TableSurface,
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2151
|
+
Or as Tooltip,
|
|
2152
|
+
vr as TooltipContent,
|
|
2153
|
+
Wr as TooltipProvider,
|
|
2154
|
+
Ur as TooltipTrigger,
|
|
2155
|
+
Ia as badgeVariants,
|
|
2156
|
+
Ma as buttonVariants
|
|
2142
2157
|
};
|
|
2143
2158
|
//# sourceMappingURL=index.js.map
|