@jinaan/uikit 0.1.57 → 0.1.58
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/index.js +365 -365
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/dropdown-menu.tsx +1 -1
- package/src/select.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -17,11 +17,11 @@ import * as se from "@radix-ui/react-tooltip";
|
|
|
17
17
|
function o(...t) {
|
|
18
18
|
return Oa(Ga(t));
|
|
19
19
|
}
|
|
20
|
-
function Ua(t, a,
|
|
21
|
-
if (a ===
|
|
20
|
+
function Ua(t, a, n) {
|
|
21
|
+
if (a === n || a < 0 || n < 0 || a >= t.length || n >= t.length)
|
|
22
22
|
return t;
|
|
23
23
|
const l = [...t], [i] = l.splice(a, 1);
|
|
24
|
-
return l.splice(
|
|
24
|
+
return l.splice(n, 0, i), l;
|
|
25
25
|
}
|
|
26
26
|
function At({ className: t }) {
|
|
27
27
|
return /* @__PURE__ */ e(
|
|
@@ -70,7 +70,7 @@ const Xa = Xe(
|
|
|
70
70
|
({
|
|
71
71
|
className: t,
|
|
72
72
|
variant: a,
|
|
73
|
-
size:
|
|
73
|
+
size: n = "md",
|
|
74
74
|
asChild: l = !1,
|
|
75
75
|
leadingIcon: i,
|
|
76
76
|
trailingIcon: c,
|
|
@@ -81,7 +81,7 @@ const Xa = Xe(
|
|
|
81
81
|
children: g,
|
|
82
82
|
...N
|
|
83
83
|
}, z) => {
|
|
84
|
-
const y = l ? Ha : "button", D = Ka[
|
|
84
|
+
const y = l ? Ha : "button", D = Ka[n ?? "md"];
|
|
85
85
|
return /* @__PURE__ */ e(
|
|
86
86
|
y,
|
|
87
87
|
{
|
|
@@ -89,7 +89,7 @@ const Xa = Xe(
|
|
|
89
89
|
"aria-busy": u || void 0,
|
|
90
90
|
disabled: l ? void 0 : b || u,
|
|
91
91
|
className: o(
|
|
92
|
-
Xa({ variant: a, size:
|
|
92
|
+
Xa({ variant: a, size: n }),
|
|
93
93
|
m && "aspect-square px-0",
|
|
94
94
|
x && "w-full",
|
|
95
95
|
u && "disabled:opacity-100",
|
|
@@ -130,10 +130,10 @@ const Xa = Xe(
|
|
|
130
130
|
}
|
|
131
131
|
);
|
|
132
132
|
R.displayName = "Button";
|
|
133
|
-
function
|
|
133
|
+
function Or({
|
|
134
134
|
command: t,
|
|
135
135
|
tag: a = "Build with agents",
|
|
136
|
-
icon:
|
|
136
|
+
icon: n,
|
|
137
137
|
className: l
|
|
138
138
|
}) {
|
|
139
139
|
const [i, c] = M(!1), m = async () => {
|
|
@@ -144,7 +144,7 @@ function Vn({
|
|
|
144
144
|
};
|
|
145
145
|
return /* @__PURE__ */ s("div", { className: o("relative inline-flex max-w-full", l), children: [
|
|
146
146
|
/* @__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: [
|
|
147
|
-
|
|
147
|
+
n ?? /* @__PURE__ */ e(ka, { className: "size-3.5", weight: "fill" }),
|
|
148
148
|
a
|
|
149
149
|
] }),
|
|
150
150
|
/* @__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: [
|
|
@@ -165,10 +165,10 @@ function Vn({
|
|
|
165
165
|
] })
|
|
166
166
|
] });
|
|
167
167
|
}
|
|
168
|
-
const Bt = h(({ className: t, ...a },
|
|
168
|
+
const Bt = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
169
169
|
Ke.Root,
|
|
170
170
|
{
|
|
171
|
-
ref:
|
|
171
|
+
ref: n,
|
|
172
172
|
className: o(
|
|
173
173
|
"relative flex size-8 shrink-0 overflow-hidden rounded-full border border-line",
|
|
174
174
|
t
|
|
@@ -177,19 +177,19 @@ const Bt = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
177
177
|
}
|
|
178
178
|
));
|
|
179
179
|
Bt.displayName = "Avatar";
|
|
180
|
-
const $t = h(({ className: t, ...a },
|
|
180
|
+
const $t = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
181
181
|
Ke.Image,
|
|
182
182
|
{
|
|
183
|
-
ref:
|
|
183
|
+
ref: n,
|
|
184
184
|
className: o("aspect-square size-full object-cover", t),
|
|
185
185
|
...a
|
|
186
186
|
}
|
|
187
187
|
));
|
|
188
188
|
$t.displayName = "AvatarImage";
|
|
189
|
-
const Ft = h(({ className: t, ...a },
|
|
189
|
+
const Ft = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
190
190
|
Ke.Fallback,
|
|
191
191
|
{
|
|
192
|
-
ref:
|
|
192
|
+
ref: n,
|
|
193
193
|
className: o(
|
|
194
194
|
"flex size-full items-center justify-center bg-elevated text-xs font-medium text-muted",
|
|
195
195
|
t
|
|
@@ -228,9 +228,9 @@ const Ja = Xe(
|
|
|
228
228
|
},
|
|
229
229
|
defaultVariants: { variant: "neutral" }
|
|
230
230
|
});
|
|
231
|
-
function Ya({ className: t, variant: a, dot:
|
|
231
|
+
function Ya({ className: t, variant: a, dot: n = !1, children: l, ...i }) {
|
|
232
232
|
return /* @__PURE__ */ s("span", { className: o(Ja({ variant: a }), t), ...i, children: [
|
|
233
|
-
|
|
233
|
+
n ? /* @__PURE__ */ e("span", { className: o(Qa({ variant: a })), "aria-hidden": !0 }) : null,
|
|
234
234
|
l
|
|
235
235
|
] });
|
|
236
236
|
}
|
|
@@ -256,10 +256,10 @@ const Za = {
|
|
|
256
256
|
iconClassName: "text-error"
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
function
|
|
259
|
+
function Vr({
|
|
260
260
|
variant: t = "info",
|
|
261
261
|
title: a,
|
|
262
|
-
children:
|
|
262
|
+
children: n,
|
|
263
263
|
icon: l,
|
|
264
264
|
className: i
|
|
265
265
|
}) {
|
|
@@ -278,13 +278,13 @@ function Wn({
|
|
|
278
278
|
/* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", u), children: l ?? /* @__PURE__ */ e(c, { weight: "fill" }) }),
|
|
279
279
|
/* @__PURE__ */ s("div", { className: "min-w-0 space-y-0.5", children: [
|
|
280
280
|
a ? /* @__PURE__ */ e("p", { className: "font-medium text-fg", children: a }) : null,
|
|
281
|
-
|
|
281
|
+
n ? /* @__PURE__ */ e("div", { className: "text-muted", children: n }) : null
|
|
282
282
|
] })
|
|
283
283
|
]
|
|
284
284
|
}
|
|
285
285
|
);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function er({
|
|
288
288
|
className: t,
|
|
289
289
|
...a
|
|
290
290
|
}) {
|
|
@@ -299,7 +299,7 @@ function en({
|
|
|
299
299
|
}
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function tr({
|
|
303
303
|
className: t,
|
|
304
304
|
...a
|
|
305
305
|
}) {
|
|
@@ -314,7 +314,7 @@ function tn({
|
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Wr({ className: t, ...a }) {
|
|
318
318
|
return /* @__PURE__ */ e(
|
|
319
319
|
"table",
|
|
320
320
|
{
|
|
@@ -323,10 +323,10 @@ function Un({ className: t, ...a }) {
|
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Ur({ className: t, ...a }) {
|
|
327
327
|
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function ar({ className: t, ...a }) {
|
|
330
330
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
|
|
331
331
|
}
|
|
332
332
|
function Dt({ className: t, ...a }) {
|
|
@@ -341,7 +341,7 @@ function Dt({ className: t, ...a }) {
|
|
|
341
341
|
}
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Xr({ className: t, ...a }) {
|
|
345
345
|
return /* @__PURE__ */ e(
|
|
346
346
|
"th",
|
|
347
347
|
{
|
|
@@ -353,7 +353,7 @@ function Kn({ className: t, ...a }) {
|
|
|
353
353
|
}
|
|
354
354
|
);
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function ne({ className: t, ...a }) {
|
|
357
357
|
return /* @__PURE__ */ e(
|
|
358
358
|
"td",
|
|
359
359
|
{
|
|
@@ -365,22 +365,22 @@ function re({ className: t, ...a }) {
|
|
|
365
365
|
}
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const rr = {
|
|
369
369
|
default: "bg-table-container",
|
|
370
370
|
muted: "bg-surface border border-line",
|
|
371
371
|
transparent: "bg-transparent"
|
|
372
|
-
},
|
|
372
|
+
}, nr = {
|
|
373
373
|
default: "bg-table-panel border-table-panel-border",
|
|
374
374
|
muted: "bg-elevated border-line",
|
|
375
375
|
transparent: "bg-transparent border-line"
|
|
376
376
|
};
|
|
377
|
-
function
|
|
377
|
+
function lr(t) {
|
|
378
378
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
379
379
|
}
|
|
380
380
|
function ke({
|
|
381
381
|
title: t,
|
|
382
382
|
description: a,
|
|
383
|
-
header:
|
|
383
|
+
header: n,
|
|
384
384
|
children: l,
|
|
385
385
|
action: i,
|
|
386
386
|
tone: c = "default",
|
|
@@ -393,7 +393,7 @@ function ke({
|
|
|
393
393
|
scrollMode: z = "surface",
|
|
394
394
|
headerContentRef: y
|
|
395
395
|
}) {
|
|
396
|
-
const D = !!(t || a), S = z === "panel", f =
|
|
396
|
+
const D = !!(t || a), S = z === "panel", f = lr(i) ? /* @__PURE__ */ e(
|
|
397
397
|
R,
|
|
398
398
|
{
|
|
399
399
|
variant: i.variant ?? "primary",
|
|
@@ -407,7 +407,7 @@ function ke({
|
|
|
407
407
|
i.label
|
|
408
408
|
] }) : i.label
|
|
409
409
|
}
|
|
410
|
-
) : i, I =
|
|
410
|
+
) : i, I = n || D ? (
|
|
411
411
|
// Header rows must not inherit the body row hover surface. Panel mode
|
|
412
412
|
// clips the band instead of scrolling it; the caller translates the
|
|
413
413
|
// inner wrapper so titles track the row content. px-px mirrors the
|
|
@@ -435,19 +435,19 @@ function ke({
|
|
|
435
435
|
]
|
|
436
436
|
}
|
|
437
437
|
) : null,
|
|
438
|
-
S ? /* @__PURE__ */ e("div", { ref: y, children:
|
|
438
|
+
S ? /* @__PURE__ */ e("div", { ref: y, children: n }) : n
|
|
439
439
|
]
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
) : null, T = /* @__PURE__ */ e(
|
|
443
|
-
|
|
443
|
+
tr,
|
|
444
444
|
{
|
|
445
|
-
className: o(
|
|
445
|
+
className: o(nr[c], x),
|
|
446
446
|
style: N ? { minHeight: N } : void 0,
|
|
447
447
|
children: l
|
|
448
448
|
}
|
|
449
449
|
);
|
|
450
|
-
return /* @__PURE__ */ s(
|
|
450
|
+
return /* @__PURE__ */ s(er, { className: o("relative", rr[c], m), children: [
|
|
451
451
|
S ? /* @__PURE__ */ s(le, { children: [
|
|
452
452
|
I,
|
|
453
453
|
T
|
|
@@ -468,26 +468,26 @@ function ke({
|
|
|
468
468
|
f ? /* @__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: f }) }) : null
|
|
469
469
|
] });
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
const a = Lt.toArray(t),
|
|
471
|
+
function or(t) {
|
|
472
|
+
const a = Lt.toArray(t), n = a.filter(
|
|
473
473
|
(l) => Et(l) && l.type === qt
|
|
474
474
|
);
|
|
475
475
|
return {
|
|
476
|
-
header:
|
|
477
|
-
body: a.filter((l) => !
|
|
476
|
+
header: n.length > 0 ? /* @__PURE__ */ e(le, { children: n }) : void 0,
|
|
477
|
+
body: a.filter((l) => !n.includes(l))
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
const
|
|
481
|
-
({ className: t, children: a, ...
|
|
482
|
-
const { header: i, body: c } =
|
|
483
|
-
return /* @__PURE__ */ e("div", { ref: l, ...
|
|
480
|
+
const ir = h(
|
|
481
|
+
({ className: t, children: a, ...n }, l) => {
|
|
482
|
+
const { header: i, body: c } = or(a);
|
|
483
|
+
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(ke, { className: o("shadow-xs", t), header: i, children: c }) });
|
|
484
484
|
}
|
|
485
485
|
);
|
|
486
|
-
|
|
487
|
-
const qt = h(({ className: t, ...a },
|
|
486
|
+
ir.displayName = "Card";
|
|
487
|
+
const qt = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
488
488
|
"div",
|
|
489
489
|
{
|
|
490
|
-
ref:
|
|
490
|
+
ref: n,
|
|
491
491
|
className: o(
|
|
492
492
|
"flex flex-col gap-1 px-5 py-4",
|
|
493
493
|
t
|
|
@@ -496,19 +496,19 @@ const qt = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
496
496
|
}
|
|
497
497
|
));
|
|
498
498
|
qt.displayName = "CardHeader";
|
|
499
|
-
const
|
|
499
|
+
const sr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
500
500
|
"h2",
|
|
501
501
|
{
|
|
502
|
-
ref:
|
|
502
|
+
ref: n,
|
|
503
503
|
className: o("text-sm font-semibold text-fg", t),
|
|
504
504
|
...a
|
|
505
505
|
}
|
|
506
506
|
));
|
|
507
|
-
|
|
508
|
-
const
|
|
507
|
+
sr.displayName = "CardTitle";
|
|
508
|
+
const dr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
509
509
|
"p",
|
|
510
510
|
{
|
|
511
|
-
ref:
|
|
511
|
+
ref: n,
|
|
512
512
|
className: o(
|
|
513
513
|
"mt-1 border-t border-card-divider pt-2 text-sm text-muted",
|
|
514
514
|
"first:mt-0 first:border-t-0 first:pt-0",
|
|
@@ -517,13 +517,13 @@ const cn = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
517
517
|
...a
|
|
518
518
|
}
|
|
519
519
|
));
|
|
520
|
-
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
const
|
|
520
|
+
dr.displayName = "CardDescription";
|
|
521
|
+
const cr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...a }));
|
|
522
|
+
cr.displayName = "CardContent";
|
|
523
|
+
const ur = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
524
524
|
"div",
|
|
525
525
|
{
|
|
526
|
-
ref:
|
|
526
|
+
ref: n,
|
|
527
527
|
className: o(
|
|
528
528
|
"flex items-center gap-3 border-t border-line px-5 py-3",
|
|
529
529
|
t
|
|
@@ -531,11 +531,11 @@ const mn = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
531
531
|
...a
|
|
532
532
|
}
|
|
533
533
|
));
|
|
534
|
-
|
|
535
|
-
const We = h(({ className: t, ...a },
|
|
534
|
+
ur.displayName = "CardFooter";
|
|
535
|
+
const We = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
536
536
|
kt.Root,
|
|
537
537
|
{
|
|
538
|
-
ref:
|
|
538
|
+
ref: n,
|
|
539
539
|
className: o(
|
|
540
540
|
"peer size-4 shrink-0 rounded border border-line-strong bg-transparent transition-colors",
|
|
541
541
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/40",
|
|
@@ -555,7 +555,7 @@ function Tt(t) {
|
|
|
555
555
|
function Mt(t) {
|
|
556
556
|
return Math.min(1, Math.max(0.1, t));
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function mr(t, a) {
|
|
559
559
|
return !Tt(t) || !Tt(a) ? null : {
|
|
560
560
|
dx: t.left + t.width / 2 - (a.left + a.width / 2),
|
|
561
561
|
dy: t.top + t.height / 2 - (a.top + a.height / 2),
|
|
@@ -578,10 +578,10 @@ function Ue(t) {
|
|
|
578
578
|
if (!(t instanceof Element)) return;
|
|
579
579
|
const a = t.closest(Ht);
|
|
580
580
|
if (!a) return;
|
|
581
|
-
const
|
|
582
|
-
|
|
581
|
+
const n = Je(a);
|
|
582
|
+
n && (Q = { rect: n, at: Date.now() });
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function pr() {
|
|
585
585
|
Pt || typeof document > "u" || (Pt = !0, document.addEventListener(
|
|
586
586
|
"pointerdown",
|
|
587
587
|
(t) => Ue(t.target),
|
|
@@ -594,21 +594,21 @@ function bn() {
|
|
|
594
594
|
!0
|
|
595
595
|
));
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function br(t) {
|
|
598
598
|
if (Q && Date.now() - Q.at < 2e3) {
|
|
599
|
-
const
|
|
600
|
-
return Q = null,
|
|
599
|
+
const n = Q.rect;
|
|
600
|
+
return Q = null, n;
|
|
601
601
|
}
|
|
602
602
|
Q = null;
|
|
603
603
|
const a = document.activeElement;
|
|
604
604
|
return a instanceof Element && a !== t && !t.contains(a) && a.matches(Ht) ? Je(a) : null;
|
|
605
605
|
}
|
|
606
|
-
const
|
|
606
|
+
const fr = 250, Gt = ue(!1), Ot = ue(() => {
|
|
607
607
|
}), Qe = ue(!1);
|
|
608
|
-
function
|
|
608
|
+
function hr({
|
|
609
609
|
open: t,
|
|
610
610
|
defaultOpen: a,
|
|
611
|
-
onOpenChange:
|
|
611
|
+
onOpenChange: n,
|
|
612
612
|
children: l,
|
|
613
613
|
...i
|
|
614
614
|
}) {
|
|
@@ -617,7 +617,7 @@ function gn({
|
|
|
617
617
|
), [u, x] = M(!1), b = $(!1), g = $(null), N = t ?? c, z = $(N);
|
|
618
618
|
z.current = N;
|
|
619
619
|
const y = t !== void 0;
|
|
620
|
-
V(() =>
|
|
620
|
+
V(() => pr(), []), V(() => {
|
|
621
621
|
t && (g.current && clearTimeout(g.current), b.current = !1, x(!1));
|
|
622
622
|
}, [t]), V(
|
|
623
623
|
() => () => {
|
|
@@ -627,19 +627,19 @@ function gn({
|
|
|
627
627
|
);
|
|
628
628
|
const D = (S) => {
|
|
629
629
|
if (S) {
|
|
630
|
-
g.current && clearTimeout(g.current), b.current = !1, x(!1), y || m(!0),
|
|
630
|
+
g.current && clearTimeout(g.current), b.current = !1, x(!1), y || m(!0), n == null || n(!0);
|
|
631
631
|
return;
|
|
632
632
|
}
|
|
633
633
|
if (!N || b.current) return;
|
|
634
634
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
635
|
-
y || m(!1),
|
|
635
|
+
y || m(!1), n == null || n(!1);
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
638
638
|
b.current = !0, x(!0), g.current = setTimeout(() => {
|
|
639
|
-
y || m(!1),
|
|
639
|
+
y || m(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
640
640
|
z.current && (b.current = !1, x(!1));
|
|
641
641
|
});
|
|
642
|
-
},
|
|
642
|
+
}, fr);
|
|
643
643
|
};
|
|
644
644
|
return /* @__PURE__ */ e(Ot.Provider, { value: () => D(!1), children: /* @__PURE__ */ e(Gt.Provider, { value: u, children: /* @__PURE__ */ e(Qe.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
645
645
|
F.Root,
|
|
@@ -651,10 +651,10 @@ function gn({
|
|
|
651
651
|
}
|
|
652
652
|
) }) }) });
|
|
653
653
|
}
|
|
654
|
-
const Vt = h(({ onClick: t, ...a },
|
|
654
|
+
const Vt = h(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
|
|
655
655
|
F.Trigger,
|
|
656
656
|
{
|
|
657
|
-
ref:
|
|
657
|
+
ref: n,
|
|
658
658
|
onClick: (l) => {
|
|
659
659
|
Ue(l.currentTarget), t == null || t(l);
|
|
660
660
|
},
|
|
@@ -662,20 +662,20 @@ const Vt = h(({ onClick: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
662
662
|
}
|
|
663
663
|
));
|
|
664
664
|
Vt.displayName = "DialogTrigger";
|
|
665
|
-
const
|
|
666
|
-
({ variant: t = "secondary", children: a = "Cancel", ...
|
|
665
|
+
const Kr = F.Close, Wt = h(
|
|
666
|
+
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(F.Close, { asChild: !0, children: /* @__PURE__ */ e(R, { ref: l, type: "button", variant: t, ...n, children: a }) })
|
|
667
667
|
);
|
|
668
668
|
Wt.displayName = "DialogCancel";
|
|
669
669
|
function Ut(t, a = !0) {
|
|
670
670
|
if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
671
671
|
return;
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
672
|
+
const n = Je(t);
|
|
673
|
+
if (!n) {
|
|
674
674
|
a && window.requestAnimationFrame(() => Ut(t, !1));
|
|
675
675
|
return;
|
|
676
676
|
}
|
|
677
677
|
t.dataset.dialogMotionStarted = "true";
|
|
678
|
-
const l =
|
|
678
|
+
const l = br(t), i = l ? mr(l, n) : null;
|
|
679
679
|
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"));
|
|
680
680
|
const c = () => {
|
|
681
681
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
@@ -684,14 +684,14 @@ function Ut(t, a = !0) {
|
|
|
684
684
|
};
|
|
685
685
|
t.addEventListener("animationend", m);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function gr(t) {
|
|
688
688
|
return t.replace(/dvh\b/g, "vh");
|
|
689
689
|
}
|
|
690
690
|
const Xt = h(
|
|
691
691
|
({
|
|
692
692
|
className: t,
|
|
693
693
|
children: a,
|
|
694
|
-
placement:
|
|
694
|
+
placement: n = "center",
|
|
695
695
|
topOffset: l = "11dvh",
|
|
696
696
|
motion: i = "auto",
|
|
697
697
|
style: c,
|
|
@@ -699,9 +699,9 @@ const Xt = h(
|
|
|
699
699
|
onPointerDownOutside: u,
|
|
700
700
|
...x
|
|
701
701
|
}, b) => {
|
|
702
|
-
const g = Z(Gt), N =
|
|
702
|
+
const g = Z(Gt), N = n === "top", z = N ? {
|
|
703
703
|
"--dialog-top-offset": l,
|
|
704
|
-
"--dialog-top-offset-fallback":
|
|
704
|
+
"--dialog-top-offset-fallback": gr(l)
|
|
705
705
|
} : void 0, y = Z(Ot), D = $(null), S = _t(
|
|
706
706
|
(f) => {
|
|
707
707
|
if (D.current = f, f && i === "auto" && Ut(f), typeof b == "function") {
|
|
@@ -773,7 +773,7 @@ const Xt = h(
|
|
|
773
773
|
}
|
|
774
774
|
);
|
|
775
775
|
Xt.displayName = "DialogContent";
|
|
776
|
-
function
|
|
776
|
+
function xr({
|
|
777
777
|
className: t,
|
|
778
778
|
...a
|
|
779
779
|
}) {
|
|
@@ -789,7 +789,7 @@ function vn({
|
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function vr({
|
|
793
793
|
className: t,
|
|
794
794
|
...a
|
|
795
795
|
}) {
|
|
@@ -802,7 +802,7 @@ function Nn({
|
|
|
802
802
|
}
|
|
803
803
|
);
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Nr({
|
|
806
806
|
className: t,
|
|
807
807
|
...a
|
|
808
808
|
}) {
|
|
@@ -818,7 +818,7 @@ function yn({
|
|
|
818
818
|
}
|
|
819
819
|
);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function yr({
|
|
822
822
|
className: t,
|
|
823
823
|
...a
|
|
824
824
|
}) {
|
|
@@ -834,35 +834,35 @@ function wn({
|
|
|
834
834
|
}
|
|
835
835
|
);
|
|
836
836
|
}
|
|
837
|
-
const Kt = h(({ className: t, ...a },
|
|
837
|
+
const Kt = h(({ className: t, ...a }, n) => {
|
|
838
838
|
const l = Z(Qe) ? F.Title : "h2";
|
|
839
839
|
return /* @__PURE__ */ e(
|
|
840
840
|
l,
|
|
841
841
|
{
|
|
842
|
-
ref:
|
|
842
|
+
ref: n,
|
|
843
843
|
className: o("text-base font-semibold text-fg", t),
|
|
844
844
|
...a
|
|
845
845
|
}
|
|
846
846
|
);
|
|
847
847
|
});
|
|
848
848
|
Kt.displayName = "DialogTitle";
|
|
849
|
-
const
|
|
849
|
+
const wr = h(({ className: t, ...a }, n) => {
|
|
850
850
|
const l = Z(Qe) ? F.Description : "p";
|
|
851
851
|
return /* @__PURE__ */ e(
|
|
852
852
|
l,
|
|
853
853
|
{
|
|
854
|
-
ref:
|
|
854
|
+
ref: n,
|
|
855
855
|
className: o("text-sm text-muted", t),
|
|
856
856
|
...a
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
859
|
});
|
|
860
|
-
|
|
860
|
+
wr.displayName = "DialogDescription";
|
|
861
861
|
const Jt = ue(null);
|
|
862
|
-
function
|
|
862
|
+
function Cr({
|
|
863
863
|
label: t,
|
|
864
864
|
value: a,
|
|
865
|
-
onChange:
|
|
865
|
+
onChange: n,
|
|
866
866
|
disabled: l = !1,
|
|
867
867
|
name: i,
|
|
868
868
|
className: c,
|
|
@@ -870,15 +870,15 @@ function zn({
|
|
|
870
870
|
...u
|
|
871
871
|
}) {
|
|
872
872
|
const x = Se(), b = i ?? x;
|
|
873
|
-
return /* @__PURE__ */ e(Jt.Provider, { value: { name: b, value: a, onChange:
|
|
873
|
+
return /* @__PURE__ */ e(Jt.Provider, { value: { name: b, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", c), ...u, children: [
|
|
874
874
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
875
875
|
m
|
|
876
876
|
] }) });
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function zr({
|
|
879
879
|
value: t,
|
|
880
880
|
title: a,
|
|
881
|
-
description:
|
|
881
|
+
description: n,
|
|
882
882
|
badge: l,
|
|
883
883
|
disabled: i = !1,
|
|
884
884
|
className: c
|
|
@@ -908,7 +908,7 @@ function Sn({
|
|
|
908
908
|
var g;
|
|
909
909
|
return (g = m.onChange) == null ? void 0 : g.call(m, t);
|
|
910
910
|
},
|
|
911
|
-
"aria-describedby":
|
|
911
|
+
"aria-describedby": n ? u : void 0,
|
|
912
912
|
className: "peer sr-only"
|
|
913
913
|
}
|
|
914
914
|
),
|
|
@@ -928,16 +928,16 @@ function Sn({
|
|
|
928
928
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: a }),
|
|
929
929
|
l ? /* @__PURE__ */ e(Ya, { variant: "primary", children: l }) : null
|
|
930
930
|
] }),
|
|
931
|
-
|
|
931
|
+
n ? /* @__PURE__ */ e("span", { id: u, className: "mt-1 block text-sm text-muted", children: n }) : null
|
|
932
932
|
] })
|
|
933
933
|
]
|
|
934
934
|
}
|
|
935
935
|
);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function Jr({
|
|
938
938
|
open: t,
|
|
939
939
|
onOpenChange: a,
|
|
940
|
-
trigger:
|
|
940
|
+
trigger: n,
|
|
941
941
|
title: l,
|
|
942
942
|
options: i,
|
|
943
943
|
defaultValue: c,
|
|
@@ -949,20 +949,20 @@ function Qn({
|
|
|
949
949
|
}) {
|
|
950
950
|
var S;
|
|
951
951
|
const [N, z] = M(c ?? ((S = i[0]) == null ? void 0 : S.value) ?? ""), y = m ?? N;
|
|
952
|
-
return /* @__PURE__ */ s(
|
|
953
|
-
|
|
952
|
+
return /* @__PURE__ */ s(hr, { open: t, onOpenChange: a, children: [
|
|
953
|
+
n ? /* @__PURE__ */ e(Vt, { asChild: !0, children: n }) : null,
|
|
954
954
|
/* @__PURE__ */ s(
|
|
955
955
|
Xt,
|
|
956
956
|
{
|
|
957
957
|
"aria-describedby": void 0,
|
|
958
958
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
959
959
|
children: [
|
|
960
|
-
/* @__PURE__ */ s(
|
|
961
|
-
/* @__PURE__ */ e(
|
|
962
|
-
/* @__PURE__ */ e(
|
|
960
|
+
/* @__PURE__ */ s(xr, { children: [
|
|
961
|
+
/* @__PURE__ */ e(Nr, { children: /* @__PURE__ */ e(Kt, { className: "text-xl", children: l }) }),
|
|
962
|
+
/* @__PURE__ */ e(vr, { children: /* @__PURE__ */ e(Cr, { label: l, value: y, onChange: (f) => {
|
|
963
963
|
m === void 0 && z(f), u == null || u(f);
|
|
964
964
|
}, children: i.map((f) => /* @__PURE__ */ e(
|
|
965
|
-
|
|
965
|
+
zr,
|
|
966
966
|
{
|
|
967
967
|
value: f.value,
|
|
968
968
|
title: f.title,
|
|
@@ -972,7 +972,7 @@ function Qn({
|
|
|
972
972
|
f.value
|
|
973
973
|
)) }) })
|
|
974
974
|
] }),
|
|
975
|
-
/* @__PURE__ */ s(
|
|
975
|
+
/* @__PURE__ */ s(yr, { className: "gap-3 pt-2.5", children: [
|
|
976
976
|
/* @__PURE__ */ e(Wt, { className: "flex-1", children: x }),
|
|
977
977
|
/* @__PURE__ */ e(R, { className: "flex-1", onClick: () => g == null ? void 0 : g(y), children: b })
|
|
978
978
|
] })
|
|
@@ -981,12 +981,12 @@ function Qn({
|
|
|
981
981
|
)
|
|
982
982
|
] });
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Qr({ code: t, label: a, className: n }) {
|
|
985
985
|
const [l, i] = M(!1);
|
|
986
986
|
return /* @__PURE__ */ e(
|
|
987
987
|
ke,
|
|
988
988
|
{
|
|
989
|
-
className:
|
|
989
|
+
className: n,
|
|
990
990
|
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 }) }),
|
|
991
991
|
action: {
|
|
992
992
|
label: l ? "Copied" : "Copy",
|
|
@@ -1004,17 +1004,17 @@ function Yn({ code: t, label: a, className: r }) {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1007
|
+
const Sr = {
|
|
1008
1008
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
1009
1009
|
md: "h-[var(--control-h-md)] text-sm",
|
|
1010
1010
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
1011
1011
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
1012
|
-
},
|
|
1012
|
+
}, kr = {
|
|
1013
1013
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
1014
1014
|
md: "px-[var(--control-pad-x-md)]",
|
|
1015
1015
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
1016
1016
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
1017
|
-
},
|
|
1017
|
+
}, Dr = {
|
|
1018
1018
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
1019
1019
|
md: "left-[var(--control-pad-x-md)]",
|
|
1020
1020
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
@@ -1033,7 +1033,7 @@ const kn = {
|
|
|
1033
1033
|
({
|
|
1034
1034
|
className: t,
|
|
1035
1035
|
containerClassName: a,
|
|
1036
|
-
type:
|
|
1036
|
+
type: n = "text",
|
|
1037
1037
|
size: l = "md",
|
|
1038
1038
|
leadingIcon: i,
|
|
1039
1039
|
trailingIcon: c,
|
|
@@ -1053,7 +1053,7 @@ const kn = {
|
|
|
1053
1053
|
{
|
|
1054
1054
|
ref: f,
|
|
1055
1055
|
id: T,
|
|
1056
|
-
type:
|
|
1056
|
+
type: n,
|
|
1057
1057
|
disabled: y,
|
|
1058
1058
|
readOnly: D,
|
|
1059
1059
|
"aria-invalid": b || void 0,
|
|
@@ -1064,14 +1064,14 @@ const kn = {
|
|
|
1064
1064
|
} : void 0,
|
|
1065
1065
|
className: o(
|
|
1066
1066
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
1067
|
-
|
|
1068
|
-
|
|
1067
|
+
Sr[l],
|
|
1068
|
+
kr[l],
|
|
1069
1069
|
"placeholder:text-(--input-placeholder)",
|
|
1070
1070
|
"hover:border-(--input-border-hover)",
|
|
1071
1071
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
1072
1072
|
b && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
1073
1073
|
!b && "border-(--input-border)",
|
|
1074
|
-
|
|
1074
|
+
n === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
|
|
1075
1075
|
y && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
1076
1076
|
D && "cursor-default focus-visible:ring-0",
|
|
1077
1077
|
t
|
|
@@ -1088,7 +1088,7 @@ const kn = {
|
|
|
1088
1088
|
{
|
|
1089
1089
|
className: o(
|
|
1090
1090
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1091
|
-
|
|
1091
|
+
Dr[l]
|
|
1092
1092
|
),
|
|
1093
1093
|
"aria-hidden": !0,
|
|
1094
1094
|
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", Ge[l]), children: i })
|
|
@@ -1131,10 +1131,10 @@ const kn = {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
);
|
|
1133
1133
|
de.displayName = "Input";
|
|
1134
|
-
function
|
|
1134
|
+
function Yr({
|
|
1135
1135
|
items: t,
|
|
1136
1136
|
value: a,
|
|
1137
|
-
onValueChange:
|
|
1137
|
+
onValueChange: n,
|
|
1138
1138
|
onSearchChange: l,
|
|
1139
1139
|
loading: i = !1,
|
|
1140
1140
|
minSearchLength: c = 3,
|
|
@@ -1163,7 +1163,7 @@ function Zn({
|
|
|
1163
1163
|
(W) => W.label.toLowerCase().includes(v) || (W.description ?? "").toLowerCase().includes(v)
|
|
1164
1164
|
);
|
|
1165
1165
|
}, [t, L, l]), Ie = (v) => {
|
|
1166
|
-
|
|
1166
|
+
n(v), I(!1), _(""), H("");
|
|
1167
1167
|
}, ee = () => {
|
|
1168
1168
|
_(""), H("");
|
|
1169
1169
|
};
|
|
@@ -1260,30 +1260,30 @@ function Zn({
|
|
|
1260
1260
|
);
|
|
1261
1261
|
}
|
|
1262
1262
|
function Ye(t, a) {
|
|
1263
|
-
let
|
|
1263
|
+
let n = 0;
|
|
1264
1264
|
return Lt.forEach(t, (l) => {
|
|
1265
1265
|
if (!Et(l)) return;
|
|
1266
1266
|
if (a.some((c) => c === l.type)) {
|
|
1267
|
-
|
|
1267
|
+
n += 1;
|
|
1268
1268
|
return;
|
|
1269
1269
|
}
|
|
1270
1270
|
const i = l.props.children;
|
|
1271
|
-
i && (
|
|
1272
|
-
}),
|
|
1271
|
+
i && (n += Ye(i, a));
|
|
1272
|
+
}), n;
|
|
1273
1273
|
}
|
|
1274
1274
|
const Qt = ue(!1);
|
|
1275
1275
|
function Oe({
|
|
1276
1276
|
children: t,
|
|
1277
1277
|
...a
|
|
1278
1278
|
}) {
|
|
1279
|
-
const
|
|
1279
|
+
const n = Ye(t, [
|
|
1280
1280
|
oe,
|
|
1281
1281
|
ie,
|
|
1282
1282
|
Zt
|
|
1283
1283
|
]) === 0;
|
|
1284
|
-
return /* @__PURE__ */ e(Qt.Provider, { value:
|
|
1284
|
+
return /* @__PURE__ */ e(Qt.Provider, { value: n, children: /* @__PURE__ */ e(j.Root, { ...a, children: t }) });
|
|
1285
1285
|
}
|
|
1286
|
-
const Ne = h(({ className: t, disabled: a, ...
|
|
1286
|
+
const Ne = h(({ className: t, disabled: a, ...n }, l) => {
|
|
1287
1287
|
const i = Z(Qt);
|
|
1288
1288
|
return /* @__PURE__ */ e(
|
|
1289
1289
|
j.Trigger,
|
|
@@ -1291,15 +1291,15 @@ const Ne = h(({ className: t, disabled: a, ...r }, l) => {
|
|
|
1291
1291
|
ref: l,
|
|
1292
1292
|
className: o("group", t),
|
|
1293
1293
|
disabled: a || i,
|
|
1294
|
-
...
|
|
1294
|
+
...n
|
|
1295
1295
|
}
|
|
1296
1296
|
);
|
|
1297
1297
|
});
|
|
1298
1298
|
Ne.displayName = "DropdownMenuTrigger";
|
|
1299
|
-
const Yt = h(({ className: t, ...a },
|
|
1299
|
+
const Yt = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1300
1300
|
Y,
|
|
1301
1301
|
{
|
|
1302
|
-
ref:
|
|
1302
|
+
ref: n,
|
|
1303
1303
|
"aria-hidden": !0,
|
|
1304
1304
|
className: o(
|
|
1305
1305
|
"ml-auto size-3.5 shrink-0 text-subtle transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
|
|
@@ -1309,13 +1309,13 @@ const Yt = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
1309
1309
|
}
|
|
1310
1310
|
));
|
|
1311
1311
|
Yt.displayName = "DropdownMenuChevron";
|
|
1312
|
-
const
|
|
1312
|
+
const Zr = j.Group, en = j.Portal, ye = h(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(j.Portal, { children: /* @__PURE__ */ e(
|
|
1313
1313
|
j.Content,
|
|
1314
1314
|
{
|
|
1315
1315
|
ref: l,
|
|
1316
1316
|
sideOffset: a,
|
|
1317
1317
|
className: o(
|
|
1318
|
-
"menu-surface btn-inner-border z-50 min-w-
|
|
1318
|
+
"menu-surface btn-inner-border z-50 min-w-(--radix-popper-anchor-width) overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
1319
1319
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1320
1320
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
1321
1321
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -1324,11 +1324,11 @@ const er = j.Group, tr = j.Portal, ye = h(({ className: t, sideOffset: a = 8, ..
|
|
|
1324
1324
|
"duration-150 ease-out",
|
|
1325
1325
|
t
|
|
1326
1326
|
),
|
|
1327
|
-
...
|
|
1327
|
+
...n
|
|
1328
1328
|
}
|
|
1329
1329
|
) }));
|
|
1330
1330
|
ye.displayName = "DropdownMenuContent";
|
|
1331
|
-
const oe = h(({ className: t, inset: a, ...
|
|
1331
|
+
const oe = h(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
1332
1332
|
j.Item,
|
|
1333
1333
|
{
|
|
1334
1334
|
ref: l,
|
|
@@ -1339,11 +1339,11 @@ const oe = h(({ className: t, inset: a, ...r }, l) => /* @__PURE__ */ e(
|
|
|
1339
1339
|
a && "pl-8",
|
|
1340
1340
|
t
|
|
1341
1341
|
),
|
|
1342
|
-
...
|
|
1342
|
+
...n
|
|
1343
1343
|
}
|
|
1344
1344
|
));
|
|
1345
1345
|
oe.displayName = "DropdownMenuItem";
|
|
1346
|
-
const ie = h(({ className: t, children: a, checked:
|
|
1346
|
+
const ie = h(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1347
1347
|
j.CheckboxItem,
|
|
1348
1348
|
{
|
|
1349
1349
|
ref: i,
|
|
@@ -1351,7 +1351,7 @@ const ie = h(({ className: t, children: a, checked: r, ...l }, i) => /* @__PURE_
|
|
|
1351
1351
|
"group relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-fg outline-none transition-colors focus:bg-(--menu-highlight)",
|
|
1352
1352
|
t
|
|
1353
1353
|
),
|
|
1354
|
-
checked:
|
|
1354
|
+
checked: n,
|
|
1355
1355
|
...l,
|
|
1356
1356
|
children: [
|
|
1357
1357
|
/* @__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(j.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(ce, { className: "size-3", weight: "bold" }) }) }),
|
|
@@ -1360,16 +1360,16 @@ const ie = h(({ className: t, children: a, checked: r, ...l }, i) => /* @__PURE_
|
|
|
1360
1360
|
}
|
|
1361
1361
|
));
|
|
1362
1362
|
ie.displayName = "DropdownMenuCheckboxItem";
|
|
1363
|
-
const we = h(({ className: t, ...a },
|
|
1363
|
+
const we = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1364
1364
|
j.Label,
|
|
1365
1365
|
{
|
|
1366
|
-
ref:
|
|
1366
|
+
ref: n,
|
|
1367
1367
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1368
1368
|
...a
|
|
1369
1369
|
}
|
|
1370
1370
|
));
|
|
1371
1371
|
we.displayName = "DropdownMenuLabel";
|
|
1372
|
-
const
|
|
1372
|
+
const tn = j.Sub, Zt = h(({ className: t, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1373
1373
|
j.SubTrigger,
|
|
1374
1374
|
{
|
|
1375
1375
|
ref: i,
|
|
@@ -1382,16 +1382,16 @@ const ar = j.Sub, Zt = h(({ className: t, inset: a, children: r, ...l }, i) => /
|
|
|
1382
1382
|
),
|
|
1383
1383
|
...l,
|
|
1384
1384
|
children: [
|
|
1385
|
-
|
|
1385
|
+
n,
|
|
1386
1386
|
/* @__PURE__ */ e(jt, { className: "ml-auto shrink-0" })
|
|
1387
1387
|
]
|
|
1388
1388
|
}
|
|
1389
1389
|
));
|
|
1390
1390
|
Zt.displayName = "DropdownMenuSubTrigger";
|
|
1391
|
-
const
|
|
1391
|
+
const Tr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1392
1392
|
j.SubContent,
|
|
1393
1393
|
{
|
|
1394
|
-
ref:
|
|
1394
|
+
ref: n,
|
|
1395
1395
|
sideOffset: 8,
|
|
1396
1396
|
className: o(
|
|
1397
1397
|
"menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
@@ -1406,26 +1406,26 @@ const Mn = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
1406
1406
|
...a
|
|
1407
1407
|
}
|
|
1408
1408
|
));
|
|
1409
|
-
|
|
1410
|
-
const Ce = h(({ className: t, ...a },
|
|
1409
|
+
Tr.displayName = "DropdownMenuSubContent";
|
|
1410
|
+
const Ce = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1411
1411
|
j.Separator,
|
|
1412
1412
|
{
|
|
1413
|
-
ref:
|
|
1413
|
+
ref: n,
|
|
1414
1414
|
className: o("-mx-1 my-1 h-px bg-line-strong", t),
|
|
1415
1415
|
...a
|
|
1416
1416
|
}
|
|
1417
1417
|
));
|
|
1418
1418
|
Ce.displayName = "DropdownMenuSeparator";
|
|
1419
|
-
const
|
|
1419
|
+
const an = E.Group, ea = E.Value;
|
|
1420
1420
|
function ta({
|
|
1421
1421
|
children: t,
|
|
1422
1422
|
disabled: a,
|
|
1423
|
-
...
|
|
1423
|
+
...n
|
|
1424
1424
|
}) {
|
|
1425
1425
|
const l = Ye(t, [De]) === 0;
|
|
1426
|
-
return /* @__PURE__ */ e(E.Root, { disabled: a || l, ...
|
|
1426
|
+
return /* @__PURE__ */ e(E.Root, { disabled: a || l, ...n, children: t });
|
|
1427
1427
|
}
|
|
1428
|
-
const Ze = h(({ className: t, children: a, variant:
|
|
1428
|
+
const Ze = h(({ className: t, children: a, variant: n = "field", ...l }, i) => /* @__PURE__ */ s(
|
|
1429
1429
|
E.Trigger,
|
|
1430
1430
|
{
|
|
1431
1431
|
ref: i,
|
|
@@ -1433,9 +1433,9 @@ const Ze = h(({ className: t, children: a, variant: r = "field", ...l }, i) => /
|
|
|
1433
1433
|
"group flex items-center justify-between gap-2 text-sm text-fg",
|
|
1434
1434
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1435
1435
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1436
|
+
n === "field" && "h-(--control-h-md) w-full rounded-md border border-line bg-surface px-3 focus:border-primary focus:ring-2 focus:ring-focus/30",
|
|
1437
|
+
n === "inline" && "btn-fill btn-inner-border btn-interactive h-(--control-h-md) w-auto rounded-(--control-radius) border-0 bg-(--button-secondary-bg) px-(--control-pad-x-sm) font-medium text-fg hover:bg-(--button-surface-hover) active:bg-(--button-surface-active) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong",
|
|
1438
|
+
n === "ghost" && "btn-inner-border btn-interactive h-(--control-h-md) w-auto rounded-(--control-radius) border-0 px-(--control-pad-x-sm) text-muted hover:bg-(--button-surface-hover) hover:text-fg active:bg-(--button-surface-active) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong",
|
|
1439
1439
|
t
|
|
1440
1440
|
),
|
|
1441
1441
|
...l,
|
|
@@ -1447,14 +1447,14 @@ const Ze = h(({ className: t, children: a, variant: r = "field", ...l }, i) => /
|
|
|
1447
1447
|
));
|
|
1448
1448
|
Ze.displayName = "SelectTrigger";
|
|
1449
1449
|
const et = h(
|
|
1450
|
-
({ className: t, children: a, position:
|
|
1450
|
+
({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...i }, c) => /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(
|
|
1451
1451
|
E.Content,
|
|
1452
1452
|
{
|
|
1453
1453
|
ref: c,
|
|
1454
|
-
position:
|
|
1454
|
+
position: n,
|
|
1455
1455
|
sideOffset: l,
|
|
1456
1456
|
className: o(
|
|
1457
|
-
"menu-surface btn-inner-border z-50 min-w-
|
|
1457
|
+
"menu-surface btn-inner-border z-50 min-w-(--radix-select-trigger-width) overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
1458
1458
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1459
1459
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
1460
1460
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
@@ -1469,7 +1469,7 @@ const et = h(
|
|
|
1469
1469
|
) })
|
|
1470
1470
|
);
|
|
1471
1471
|
et.displayName = "SelectContent";
|
|
1472
|
-
const De = h(({ className: t, children: a, ...
|
|
1472
|
+
const De = h(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
1473
1473
|
E.Item,
|
|
1474
1474
|
{
|
|
1475
1475
|
ref: l,
|
|
@@ -1477,7 +1477,7 @@ const De = h(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
|
|
|
1477
1477
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-fg outline-none focus:bg-(--menu-highlight) data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1478
1478
|
t
|
|
1479
1479
|
),
|
|
1480
|
-
...
|
|
1480
|
+
...n,
|
|
1481
1481
|
children: [
|
|
1482
1482
|
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(E.ItemIndicator, { children: /* @__PURE__ */ e(ce, { className: "size-3.5" }) }) }),
|
|
1483
1483
|
/* @__PURE__ */ e(E.ItemText, { children: a })
|
|
@@ -1485,19 +1485,19 @@ const De = h(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
|
|
|
1485
1485
|
}
|
|
1486
1486
|
));
|
|
1487
1487
|
De.displayName = "SelectItem";
|
|
1488
|
-
const
|
|
1488
|
+
const Mr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1489
1489
|
E.Label,
|
|
1490
1490
|
{
|
|
1491
|
-
ref:
|
|
1491
|
+
ref: n,
|
|
1492
1492
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1493
1493
|
...a
|
|
1494
1494
|
}
|
|
1495
1495
|
));
|
|
1496
|
-
|
|
1497
|
-
function
|
|
1496
|
+
Mr.displayName = "SelectLabel";
|
|
1497
|
+
function Pr({
|
|
1498
1498
|
icon: t,
|
|
1499
1499
|
title: a,
|
|
1500
|
-
description:
|
|
1500
|
+
description: n,
|
|
1501
1501
|
action: l,
|
|
1502
1502
|
className: i
|
|
1503
1503
|
}) {
|
|
@@ -1512,29 +1512,29 @@ function In({
|
|
|
1512
1512
|
t ? /* @__PURE__ */ e("div", { className: "flex size-12 items-center justify-center rounded-xl border border-line bg-elevated text-subtle [&_svg]:size-5", children: t }) : null,
|
|
1513
1513
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1514
1514
|
/* @__PURE__ */ e("p", { className: "text-base font-medium text-table-header-active", children: a }),
|
|
1515
|
-
|
|
1515
|
+
n ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-[13px] leading-5 text-table-muted", children: n }) : null
|
|
1516
1516
|
] }),
|
|
1517
1517
|
l ? /* @__PURE__ */ e("div", { className: "text-table-accent", children: l }) : null
|
|
1518
1518
|
]
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1523
|
-
function
|
|
1522
|
+
const Ir = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1523
|
+
function Rr(t) {
|
|
1524
1524
|
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1525
|
-
var
|
|
1526
|
-
return ((
|
|
1525
|
+
var n;
|
|
1526
|
+
return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1527
1527
|
}).join("");
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function rn({
|
|
1530
1530
|
name: t,
|
|
1531
1531
|
secondary: a,
|
|
1532
|
-
image:
|
|
1532
|
+
image: n
|
|
1533
1533
|
}) {
|
|
1534
1534
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1535
1535
|
/* @__PURE__ */ s(Bt, { className: "size-8", children: [
|
|
1536
|
-
|
|
1537
|
-
/* @__PURE__ */ e(Ft, { children:
|
|
1536
|
+
n ? /* @__PURE__ */ e($t, { src: n, alt: "" }) : null,
|
|
1537
|
+
/* @__PURE__ */ e(Ft, { children: Rr(t) })
|
|
1538
1538
|
] }),
|
|
1539
1539
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1540
1540
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1542,10 +1542,10 @@ function rr({
|
|
|
1542
1542
|
] })
|
|
1543
1543
|
] });
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function nn({
|
|
1546
1546
|
rows: t,
|
|
1547
1547
|
columns: a,
|
|
1548
|
-
getRowId:
|
|
1548
|
+
getRowId: n,
|
|
1549
1549
|
loading: l = !1,
|
|
1550
1550
|
error: i,
|
|
1551
1551
|
empty: c,
|
|
@@ -1579,39 +1579,39 @@ function lr({
|
|
|
1579
1579
|
}) {
|
|
1580
1580
|
const [tt, at] = M(
|
|
1581
1581
|
() => Object.fromEntries(
|
|
1582
|
-
a.filter((
|
|
1582
|
+
a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
|
|
1583
1583
|
)
|
|
1584
|
-
), [
|
|
1584
|
+
), [rt, nt] = M(null), [Re, lt] = M(null), [ra, na] = M(
|
|
1585
1585
|
A ?? null
|
|
1586
|
-
), C = q ? H ?? null :
|
|
1587
|
-
q ? q(
|
|
1588
|
-
}, [te, pe] = M(0), [G, oa] = M(L), [U, je] = M(/* @__PURE__ */ new Set()), [ia, sa] = M(/* @__PURE__ */ new Set()), da = (
|
|
1586
|
+
), C = q ? H ?? null : ra, la = (r) => {
|
|
1587
|
+
q ? q(r) : na(r);
|
|
1588
|
+
}, [te, pe] = M(0), [G, oa] = M(L), [U, je] = M(/* @__PURE__ */ new Set()), [ia, sa] = M(/* @__PURE__ */ new Set()), da = (r) => {
|
|
1589
1589
|
sa((d) => {
|
|
1590
1590
|
const p = new Set(d);
|
|
1591
|
-
return p.has(
|
|
1591
|
+
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1592
1592
|
});
|
|
1593
|
-
}, [ca, Le] = M([]), ot = a.map((
|
|
1593
|
+
}, [ca, Le] = M([]), ot = a.map((r) => r.id), it = new Map(a.map((r) => [r.id, r])), st = rt ? rt.map((r) => it.get(r)).filter((r) => !!r) : a, X = st.filter((r) => !tt[r.id]), dt = st.filter((r) => tt[r.id] && !r.required), ct = (r) => !!r.required, ua = (r) => it.get(r), ma = (r, d) => {
|
|
1594
1594
|
const p = d ? ua(d) : void 0;
|
|
1595
|
-
!p || ct(p) ||
|
|
1595
|
+
!p || ct(p) || r === d || nt((w) => {
|
|
1596
1596
|
const P = w ?? ot;
|
|
1597
|
-
return Ua(P, P.indexOf(
|
|
1597
|
+
return Ua(P, P.indexOf(r), P.indexOf(d));
|
|
1598
1598
|
});
|
|
1599
|
-
}, pa = (
|
|
1600
|
-
at((d) => ({ ...d, [
|
|
1601
|
-
}, Ee = (u ?? []).filter((
|
|
1602
|
-
let
|
|
1599
|
+
}, pa = (r) => {
|
|
1600
|
+
at((d) => ({ ...d, [r]: !1 })), nt((d) => d && d.includes(r) ? d : [...d ?? ot, r]);
|
|
1601
|
+
}, Ee = (u ?? []).filter((r) => ca.includes(r.id)), ba = (u ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), be = ve(() => {
|
|
1602
|
+
let r = t;
|
|
1603
1603
|
for (const p of u ?? [])
|
|
1604
|
-
p.value.length > 0 && (
|
|
1605
|
-
if (!m || !m.value.trim()) return
|
|
1604
|
+
p.value.length > 0 && (r = r.filter((w) => p.match(w, p.value)));
|
|
1605
|
+
if (!m || !m.value.trim()) return r;
|
|
1606
1606
|
const d = m.value.trim().toLowerCase();
|
|
1607
|
-
return
|
|
1607
|
+
return r.filter((p) => m.keys(p).toLowerCase().includes(d));
|
|
1608
1608
|
}, [t, m, u]), K = ve(() => {
|
|
1609
1609
|
if (!C) return be;
|
|
1610
|
-
const
|
|
1611
|
-
if (!(
|
|
1610
|
+
const r = a.find((p) => p.id === C.id);
|
|
1611
|
+
if (!(r != null && r.sortValue)) return be;
|
|
1612
1612
|
const d = C.dir === "asc" ? 1 : -1;
|
|
1613
1613
|
return [...be].sort((p, w) => {
|
|
1614
|
-
const P =
|
|
1614
|
+
const P = r.sortValue(p), k = r.sortValue(w);
|
|
1615
1615
|
return P == null && k == null ? 0 : P == null ? 1 : k == null ? -1 : typeof P == "number" && typeof k == "number" ? (P - k) * d : String(P).localeCompare(String(k)) * d;
|
|
1616
1616
|
});
|
|
1617
1617
|
}, [be, C, a]), ae = Math.max(1, Math.ceil(K.length / G)), fa = !l && !i && K.length > 0 && (Me === "always" || K.length > G);
|
|
@@ -1620,38 +1620,38 @@ function lr({
|
|
|
1620
1620
|
}, [m == null ? void 0 : m.value, G, C == null ? void 0 : C.id, C == null ? void 0 : C.dir, z, ba]), V(() => {
|
|
1621
1621
|
te > ae - 1 && pe(ae - 1);
|
|
1622
1622
|
}, [te, ae]);
|
|
1623
|
-
const fe = te * G, O = K.slice(fe, fe + G), ha = (
|
|
1624
|
-
if (!
|
|
1623
|
+
const fe = te * G, O = K.slice(fe, fe + G), ha = (r) => {
|
|
1624
|
+
if (!r.sortable) return;
|
|
1625
1625
|
const d = C;
|
|
1626
1626
|
la(
|
|
1627
|
-
(d == null ? void 0 : d.id) ===
|
|
1627
|
+
(d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
|
|
1628
1628
|
);
|
|
1629
|
-
}, ut = O.length > 0 && O.every((
|
|
1630
|
-
je((
|
|
1631
|
-
const d = new Set(
|
|
1632
|
-
return ut ? O.forEach((p) => d.delete(
|
|
1629
|
+
}, ut = O.length > 0 && O.every((r) => U.has(n(r))), ga = O.some((r) => U.has(n(r))), xa = t.filter((r) => U.has(n(r))), va = () => {
|
|
1630
|
+
je((r) => {
|
|
1631
|
+
const d = new Set(r);
|
|
1632
|
+
return ut ? O.forEach((p) => d.delete(n(p))) : O.forEach((p) => d.add(n(p))), d;
|
|
1633
1633
|
});
|
|
1634
|
-
}, Na = (
|
|
1634
|
+
}, Na = (r) => {
|
|
1635
1635
|
je((d) => {
|
|
1636
1636
|
const p = new Set(d);
|
|
1637
|
-
return p.has(
|
|
1637
|
+
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1638
1638
|
});
|
|
1639
|
-
}, ya = !!(m || u != null && u.length || x || b), wa = (
|
|
1639
|
+
}, ya = !!(m || u != null && u.length || x || b), wa = (r) => (C == null ? void 0 : C.id) === r.id ? C.dir === "asc" ? "ascending" : "descending" : void 0, mt = $(null), pt = $(null), bt = $(null), ft = $(null), [J, _e] = M([]), Ca = X.map((r) => r.id).join("\0"), he = `${S ? "s" : "-"}|${I ? "a" : "-"}|${T ? "e" : "-"}|${Ca}`, ht = $(he), ge = ve(() => {
|
|
1640
1640
|
try {
|
|
1641
1641
|
return JSON.stringify(t);
|
|
1642
1642
|
} catch {
|
|
1643
1643
|
return `rows:${t.length}`;
|
|
1644
1644
|
}
|
|
1645
1645
|
}, [t]), gt = $(ge), xt = J.length > 0, Ae = _t(() => {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1646
|
+
const r = bt.current, d = ft.current;
|
|
1647
|
+
r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1648
1648
|
}, []);
|
|
1649
1649
|
Fa(() => {
|
|
1650
|
-
const
|
|
1651
|
-
if (!
|
|
1650
|
+
const r = mt.current;
|
|
1651
|
+
if (!r) return;
|
|
1652
1652
|
const d = () => {
|
|
1653
1653
|
var Nt, yt, wt;
|
|
1654
|
-
const Be = (yt = (Nt =
|
|
1654
|
+
const Be = (yt = (Nt = r.tBodies[0]) == null ? void 0 : Nt.rows.item(0)) == null ? void 0 : yt.cells;
|
|
1655
1655
|
if (!Be || Be.length === 0) {
|
|
1656
1656
|
_e((B) => B.length === 0 ? B : []);
|
|
1657
1657
|
return;
|
|
@@ -1679,35 +1679,35 @@ function lr({
|
|
|
1679
1679
|
}
|
|
1680
1680
|
if (d(), Ae(), typeof ResizeObserver > "u") return;
|
|
1681
1681
|
const p = new ResizeObserver(d);
|
|
1682
|
-
p.observe(
|
|
1682
|
+
p.observe(r);
|
|
1683
1683
|
let w = null;
|
|
1684
1684
|
const P = () => {
|
|
1685
1685
|
w === null && (w = requestAnimationFrame(() => {
|
|
1686
1686
|
w = null, d();
|
|
1687
1687
|
}));
|
|
1688
|
-
}, k = new MutationObserver(P), vt =
|
|
1688
|
+
}, k = new MutationObserver(P), vt = r.tBodies[0];
|
|
1689
1689
|
return vt && k.observe(vt, { childList: !0, characterData: !0, subtree: !0 }), () => {
|
|
1690
1690
|
p.disconnect(), k.disconnect(), w !== null && cancelAnimationFrame(w);
|
|
1691
1691
|
};
|
|
1692
1692
|
}, [he, ge, xt, l, i, Ae]);
|
|
1693
|
-
const
|
|
1693
|
+
const re = J.reduce((r, d) => r + d, 0);
|
|
1694
1694
|
return /* @__PURE__ */ s("div", { className: o("space-y-4", aa), children: [
|
|
1695
|
-
N && N.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: N.map((
|
|
1696
|
-
const d =
|
|
1695
|
+
N && N.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: N.map((r) => {
|
|
1696
|
+
const d = r.id === z;
|
|
1697
1697
|
return /* @__PURE__ */ e(
|
|
1698
1698
|
"button",
|
|
1699
1699
|
{
|
|
1700
1700
|
type: "button",
|
|
1701
1701
|
role: "tab",
|
|
1702
1702
|
"aria-selected": d,
|
|
1703
|
-
onClick: () => y == null ? void 0 : y(
|
|
1703
|
+
onClick: () => y == null ? void 0 : y(r.id),
|
|
1704
1704
|
className: o(
|
|
1705
1705
|
"-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
|
|
1706
1706
|
d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
|
|
1707
1707
|
),
|
|
1708
|
-
children:
|
|
1708
|
+
children: r.label
|
|
1709
1709
|
},
|
|
1710
|
-
|
|
1710
|
+
r.id
|
|
1711
1711
|
);
|
|
1712
1712
|
}) }),
|
|
1713
1713
|
ya && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
@@ -1718,7 +1718,7 @@ function lr({
|
|
|
1718
1718
|
"aria-label": m.placeholder ?? "Search",
|
|
1719
1719
|
placeholder: m.placeholder ?? "Search...",
|
|
1720
1720
|
value: m.value,
|
|
1721
|
-
onChange: (
|
|
1721
|
+
onChange: (r) => m.onChange(r.target.value),
|
|
1722
1722
|
onClear: () => m.onChange(""),
|
|
1723
1723
|
leadingIcon: /* @__PURE__ */ e(Ve, {}),
|
|
1724
1724
|
containerClassName: "w-full sm:w-[280px]",
|
|
@@ -1739,8 +1739,8 @@ function lr({
|
|
|
1739
1739
|
) }),
|
|
1740
1740
|
/* @__PURE__ */ s(ye, { align: "end", className: "w-54", children: [
|
|
1741
1741
|
/* @__PURE__ */ e(we, { className: "text-[13px]", children: "Active columns" }),
|
|
1742
|
-
X.map((
|
|
1743
|
-
const d = ct(
|
|
1742
|
+
X.map((r) => {
|
|
1743
|
+
const d = ct(r);
|
|
1744
1744
|
return /* @__PURE__ */ s(
|
|
1745
1745
|
ie,
|
|
1746
1746
|
{
|
|
@@ -1751,47 +1751,47 @@ function lr({
|
|
|
1751
1751
|
p.preventDefault();
|
|
1752
1752
|
return;
|
|
1753
1753
|
}
|
|
1754
|
-
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain",
|
|
1754
|
+
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), lt(r.id);
|
|
1755
1755
|
},
|
|
1756
1756
|
onDragOver: (p) => {
|
|
1757
|
-
Re && (p.preventDefault(), ma(Re,
|
|
1757
|
+
Re && (p.preventDefault(), ma(Re, r.id));
|
|
1758
1758
|
},
|
|
1759
1759
|
onDrop: (p) => p.preventDefault(),
|
|
1760
1760
|
onDragEnd: () => lt(null),
|
|
1761
1761
|
onCheckedChange: (p) => {
|
|
1762
|
-
!p && !d && at((w) => ({ ...w, [
|
|
1762
|
+
!p && !d && at((w) => ({ ...w, [r.id]: !0 }));
|
|
1763
1763
|
},
|
|
1764
1764
|
onSelect: (p) => p.preventDefault(),
|
|
1765
1765
|
className: "justify-between",
|
|
1766
1766
|
children: [
|
|
1767
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1767
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
|
|
1768
1768
|
d ? /* @__PURE__ */ e(La, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1769
1769
|
Ea,
|
|
1770
1770
|
{
|
|
1771
1771
|
"aria-hidden": !0,
|
|
1772
1772
|
className: o(
|
|
1773
1773
|
"size-3.5 shrink-0",
|
|
1774
|
-
Re ===
|
|
1774
|
+
Re === r.id ? "text-primary" : "text-subtle"
|
|
1775
1775
|
)
|
|
1776
1776
|
}
|
|
1777
1777
|
)
|
|
1778
1778
|
]
|
|
1779
1779
|
},
|
|
1780
|
-
|
|
1780
|
+
r.id
|
|
1781
1781
|
);
|
|
1782
1782
|
}),
|
|
1783
1783
|
dt.length > 0 ? /* @__PURE__ */ s(le, { children: [
|
|
1784
1784
|
/* @__PURE__ */ e(Ce, {}),
|
|
1785
1785
|
/* @__PURE__ */ e(we, { className: "text-[13px]", children: "Available columns" }),
|
|
1786
|
-
dt.map((
|
|
1786
|
+
dt.map((r) => /* @__PURE__ */ e(
|
|
1787
1787
|
ie,
|
|
1788
1788
|
{
|
|
1789
1789
|
checked: !1,
|
|
1790
|
-
onCheckedChange: () => pa(
|
|
1790
|
+
onCheckedChange: () => pa(r.id),
|
|
1791
1791
|
onSelect: (d) => d.preventDefault(),
|
|
1792
|
-
children:
|
|
1792
|
+
children: r.header
|
|
1793
1793
|
},
|
|
1794
|
-
|
|
1794
|
+
r.id
|
|
1795
1795
|
))
|
|
1796
1796
|
] }) : null
|
|
1797
1797
|
] })
|
|
@@ -1807,23 +1807,23 @@ function lr({
|
|
|
1807
1807
|
children: /* @__PURE__ */ e(St, {})
|
|
1808
1808
|
}
|
|
1809
1809
|
) }),
|
|
1810
|
-
/* @__PURE__ */ e(ye, { align: "start", className: "w-54", children: u.map((
|
|
1810
|
+
/* @__PURE__ */ e(ye, { align: "start", className: "w-54", children: u.map((r) => /* @__PURE__ */ e(
|
|
1811
1811
|
oe,
|
|
1812
1812
|
{
|
|
1813
1813
|
onSelect: () => Le(
|
|
1814
|
-
(d) => d.includes(
|
|
1814
|
+
(d) => d.includes(r.id) ? d : [...d, r.id]
|
|
1815
1815
|
),
|
|
1816
|
-
children:
|
|
1816
|
+
children: r.label
|
|
1817
1817
|
},
|
|
1818
|
-
|
|
1818
|
+
r.id
|
|
1819
1819
|
)) })
|
|
1820
1820
|
] }) : null,
|
|
1821
1821
|
b ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: b }) : null
|
|
1822
1822
|
] }),
|
|
1823
1823
|
Ee.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1824
|
-
Ee.map((
|
|
1824
|
+
Ee.map((r) => {
|
|
1825
1825
|
const d = () => {
|
|
1826
|
-
|
|
1826
|
+
r.onChange([]), Le((p) => p.filter((w) => w !== r.id));
|
|
1827
1827
|
};
|
|
1828
1828
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1829
1829
|
/* @__PURE__ */ e(
|
|
@@ -1832,7 +1832,7 @@ function lr({
|
|
|
1832
1832
|
variant: "secondary",
|
|
1833
1833
|
size: "md",
|
|
1834
1834
|
iconOnly: !0,
|
|
1835
|
-
"aria-label": `Remove ${
|
|
1835
|
+
"aria-label": `Remove ${r.label} filter`,
|
|
1836
1836
|
className: "rounded-r-none",
|
|
1837
1837
|
onClick: d,
|
|
1838
1838
|
children: /* @__PURE__ */ e(ze, {})
|
|
@@ -1841,37 +1841,37 @@ function lr({
|
|
|
1841
1841
|
/* @__PURE__ */ s(Oe, { children: [
|
|
1842
1842
|
/* @__PURE__ */ e(Ne, { asChild: !0, children: /* @__PURE__ */ s(R, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1843
1843
|
/* @__PURE__ */ e(St, {}),
|
|
1844
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
1844
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: r.label }),
|
|
1845
1845
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1846
|
-
/* @__PURE__ */ e("span", { className: "text-muted max-w-28 truncate", children:
|
|
1846
|
+
/* @__PURE__ */ e("span", { className: "text-muted max-w-28 truncate", children: r.value.length > 0 ? r.type === "text" ? r.value[0] : `${r.value.length} selected` : "Enter value" }),
|
|
1847
1847
|
/* @__PURE__ */ e(Y, { className: "text-muted" })
|
|
1848
1848
|
] }) }),
|
|
1849
|
-
/* @__PURE__ */ s(ye, { align: "start", className:
|
|
1849
|
+
/* @__PURE__ */ s(ye, { align: "start", className: r.type === "text" ? "w-72" : "w-56", children: [
|
|
1850
1850
|
/* @__PURE__ */ s(we, { className: "text-[13px]", children: [
|
|
1851
1851
|
"Filter by ",
|
|
1852
|
-
|
|
1852
|
+
r.label
|
|
1853
1853
|
] }),
|
|
1854
|
-
|
|
1854
|
+
r.type === "text" ? /* @__PURE__ */ e("div", { className: "px-1 pb-1", children: /* @__PURE__ */ e(
|
|
1855
1855
|
de,
|
|
1856
1856
|
{
|
|
1857
|
-
value:
|
|
1858
|
-
onChange: (p) =>
|
|
1859
|
-
onClear:
|
|
1860
|
-
placeholder:
|
|
1861
|
-
"aria-label":
|
|
1857
|
+
value: r.value[0] ?? "",
|
|
1858
|
+
onChange: (p) => r.onChange(p.target.value ? [p.target.value] : []),
|
|
1859
|
+
onClear: r.value[0] ? () => r.onChange([]) : void 0,
|
|
1860
|
+
placeholder: r.placeholder ?? `Search ${r.label.toLowerCase()}...`,
|
|
1861
|
+
"aria-label": r.placeholder ?? `Search ${r.label.toLowerCase()}...`,
|
|
1862
1862
|
leadingIcon: /* @__PURE__ */ e(Ve, { className: "size-3.5" }),
|
|
1863
1863
|
size: "sm",
|
|
1864
1864
|
className: "h-(--control-h-xs) border-0 bg-(--combobox-search-bg) focus-visible:border-muted focus-visible:ring-0"
|
|
1865
1865
|
}
|
|
1866
1866
|
) }) : /* @__PURE__ */ s(le, { children: [
|
|
1867
|
-
(
|
|
1868
|
-
const w =
|
|
1867
|
+
(r.options ?? []).map((p) => {
|
|
1868
|
+
const w = r.value.includes(p.value);
|
|
1869
1869
|
return /* @__PURE__ */ e(
|
|
1870
1870
|
ie,
|
|
1871
1871
|
{
|
|
1872
1872
|
checked: w,
|
|
1873
|
-
onCheckedChange: () =>
|
|
1874
|
-
w ?
|
|
1873
|
+
onCheckedChange: () => r.onChange(
|
|
1874
|
+
w ? r.value.filter((P) => P !== p.value) : [...r.value, p.value]
|
|
1875
1875
|
),
|
|
1876
1876
|
onSelect: (P) => P.preventDefault(),
|
|
1877
1877
|
children: p.label
|
|
@@ -1882,20 +1882,20 @@ function lr({
|
|
|
1882
1882
|
/* @__PURE__ */ e(Ce, {}),
|
|
1883
1883
|
/* @__PURE__ */ e(oe, { onSelect: d, children: "Clear filter" })
|
|
1884
1884
|
] }),
|
|
1885
|
-
|
|
1885
|
+
r.type === "text" ? /* @__PURE__ */ s(le, { children: [
|
|
1886
1886
|
/* @__PURE__ */ e(Ce, {}),
|
|
1887
1887
|
/* @__PURE__ */ e(oe, { onSelect: d, children: "Clear filter" })
|
|
1888
1888
|
] }) : null
|
|
1889
1889
|
] })
|
|
1890
1890
|
] })
|
|
1891
|
-
] },
|
|
1891
|
+
] }, r.id);
|
|
1892
1892
|
}),
|
|
1893
1893
|
/* @__PURE__ */ e(
|
|
1894
1894
|
"button",
|
|
1895
1895
|
{
|
|
1896
1896
|
type: "button",
|
|
1897
1897
|
onClick: () => {
|
|
1898
|
-
for (const
|
|
1898
|
+
for (const r of Ee) r.onChange([]);
|
|
1899
1899
|
Le([]);
|
|
1900
1900
|
},
|
|
1901
1901
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
@@ -1909,19 +1909,19 @@ function lr({
|
|
|
1909
1909
|
U.size,
|
|
1910
1910
|
" selected"
|
|
1911
1911
|
] }),
|
|
1912
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (f ?? []).map((
|
|
1912
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (f ?? []).map((r) => /* @__PURE__ */ s(
|
|
1913
1913
|
R,
|
|
1914
1914
|
{
|
|
1915
1915
|
size: "md",
|
|
1916
|
-
variant:
|
|
1917
|
-
disabled:
|
|
1918
|
-
onClick: () => void
|
|
1916
|
+
variant: r.variant ?? "outline",
|
|
1917
|
+
disabled: r.disabled,
|
|
1918
|
+
onClick: () => void r.onRun(xa),
|
|
1919
1919
|
children: [
|
|
1920
|
-
|
|
1921
|
-
|
|
1920
|
+
r.icon,
|
|
1921
|
+
r.label
|
|
1922
1922
|
]
|
|
1923
1923
|
},
|
|
1924
|
-
|
|
1924
|
+
r.label
|
|
1925
1925
|
)) }),
|
|
1926
1926
|
/* @__PURE__ */ s(
|
|
1927
1927
|
"button",
|
|
@@ -1960,11 +1960,11 @@ function lr({
|
|
|
1960
1960
|
style: {
|
|
1961
1961
|
// Fill the container when it fits; force totalWidth (and the
|
|
1962
1962
|
// shared scroller) only when the columns need more room.
|
|
1963
|
-
minWidth:
|
|
1964
|
-
visibility:
|
|
1963
|
+
minWidth: re > 0 ? re : void 0,
|
|
1964
|
+
visibility: re > 0 ? void 0 : "hidden"
|
|
1965
1965
|
},
|
|
1966
1966
|
children: [
|
|
1967
|
-
/* @__PURE__ */ e("colgroup", { children: J.map((
|
|
1967
|
+
/* @__PURE__ */ e("colgroup", { children: J.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1968
1968
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1969
1969
|
S && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
|
|
1970
1970
|
We,
|
|
@@ -1975,39 +1975,39 @@ function lr({
|
|
|
1975
1975
|
}
|
|
1976
1976
|
) }),
|
|
1977
1977
|
T && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-9 px-1.5" }),
|
|
1978
|
-
X.map((
|
|
1978
|
+
X.map((r) => /* @__PURE__ */ e(
|
|
1979
1979
|
"th",
|
|
1980
1980
|
{
|
|
1981
|
-
className: o(
|
|
1981
|
+
className: o(Ir, r.align === "right" && "text-right", r.className),
|
|
1982
1982
|
children: /* @__PURE__ */ e(
|
|
1983
1983
|
"span",
|
|
1984
1984
|
{
|
|
1985
1985
|
"data-col-sizer": !0,
|
|
1986
1986
|
className: "inline-block whitespace-nowrap px-(--table-pad-x) -mx-(--table-pad-x)",
|
|
1987
|
-
children:
|
|
1987
|
+
children: r.sortable ? /* @__PURE__ */ s(
|
|
1988
1988
|
R,
|
|
1989
1989
|
{
|
|
1990
1990
|
type: "button",
|
|
1991
1991
|
variant: "ghost",
|
|
1992
1992
|
size: "xs",
|
|
1993
|
-
"aria-label": `Sort by ${
|
|
1994
|
-
onClick: () => ha(
|
|
1993
|
+
"aria-label": `Sort by ${r.header}`,
|
|
1994
|
+
onClick: () => ha(r),
|
|
1995
1995
|
className: o(
|
|
1996
1996
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1997
1997
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
1998
1998
|
"active:scale-100 active:bg-transparent active:shadow-none",
|
|
1999
|
-
(C == null ? void 0 : C.id) ===
|
|
1999
|
+
(C == null ? void 0 : C.id) === r.id && "text-table-header-active"
|
|
2000
2000
|
),
|
|
2001
2001
|
children: [
|
|
2002
|
-
|
|
2003
|
-
(C == null ? void 0 : C.id) ===
|
|
2002
|
+
r.header,
|
|
2003
|
+
(C == null ? void 0 : C.id) === r.id ? C.dir === "asc" ? /* @__PURE__ */ e(Aa, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Y, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Ba, { className: "size-3.5 opacity-50" })
|
|
2004
2004
|
]
|
|
2005
2005
|
}
|
|
2006
|
-
) :
|
|
2006
|
+
) : r.header
|
|
2007
2007
|
}
|
|
2008
2008
|
)
|
|
2009
2009
|
},
|
|
2010
|
-
|
|
2010
|
+
r.id
|
|
2011
2011
|
)),
|
|
2012
2012
|
I && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
2013
2013
|
] }) })
|
|
@@ -2015,7 +2015,7 @@ function lr({
|
|
|
2015
2015
|
}
|
|
2016
2016
|
)
|
|
2017
2017
|
),
|
|
2018
|
-
children: /* @__PURE__ */ e("div", { ref: ft, className: "overflow-x-auto", onScroll: Ae, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((
|
|
2018
|
+
children: /* @__PURE__ */ e("div", { ref: ft, className: "overflow-x-auto", onScroll: Ae, 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: [
|
|
2019
2019
|
/* @__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(_a, { weight: "duotone" }) }),
|
|
2020
2020
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
2021
2021
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
@@ -2023,7 +2023,7 @@ function lr({
|
|
|
2023
2023
|
] }),
|
|
2024
2024
|
i.action
|
|
2025
2025
|
] }) : O.length === 0 ? /* @__PURE__ */ e(
|
|
2026
|
-
|
|
2026
|
+
Pr,
|
|
2027
2027
|
{
|
|
2028
2028
|
icon: c == null ? void 0 : c.icon,
|
|
2029
2029
|
title: (c == null ? void 0 : c.title) ?? "No results",
|
|
@@ -2043,26 +2043,26 @@ function lr({
|
|
|
2043
2043
|
// when the columns need more room than the container has.
|
|
2044
2044
|
J.length > 0 ? "w-full table-fixed" : "table-auto"
|
|
2045
2045
|
),
|
|
2046
|
-
style: { minWidth:
|
|
2046
|
+
style: { minWidth: re > 0 ? re : void 0 },
|
|
2047
2047
|
children: [
|
|
2048
|
-
J.length > 0 && /* @__PURE__ */ e("colgroup", { children: J.map((
|
|
2048
|
+
J.length > 0 && /* @__PURE__ */ e("colgroup", { children: J.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
2049
2049
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
2050
2050
|
S && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
2051
2051
|
T && /* @__PURE__ */ e("th", { scope: "col", children: "Details" }),
|
|
2052
|
-
X.map((
|
|
2052
|
+
X.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": wa(r), children: r.header }, r.id)),
|
|
2053
2053
|
I && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
2054
2054
|
] }) }),
|
|
2055
|
-
/* @__PURE__ */ e(
|
|
2056
|
-
const d = r
|
|
2055
|
+
/* @__PURE__ */ e(ar, { children: O.map((r) => {
|
|
2056
|
+
const d = n(r), p = U.has(d), w = ia.has(d), P = X.length + (S ? 1 : 0) + (T ? 1 : 0) + (I ? 1 : 0);
|
|
2057
2057
|
return /* @__PURE__ */ s(qa, { children: [
|
|
2058
2058
|
/* @__PURE__ */ s(
|
|
2059
2059
|
Dt,
|
|
2060
2060
|
{
|
|
2061
2061
|
"data-state": p ? "selected" : void 0,
|
|
2062
|
-
onClick: _ ? () => _(
|
|
2062
|
+
onClick: _ ? () => _(r) : void 0,
|
|
2063
2063
|
className: _ ? "cursor-pointer" : void 0,
|
|
2064
2064
|
children: [
|
|
2065
|
-
S && /* @__PURE__ */ e(
|
|
2065
|
+
S && /* @__PURE__ */ e(ne, { className: "w-11", onClick: (k) => k.stopPropagation(), children: /* @__PURE__ */ e(
|
|
2066
2066
|
We,
|
|
2067
2067
|
{
|
|
2068
2068
|
"aria-label": "Select row",
|
|
@@ -2070,7 +2070,7 @@ function lr({
|
|
|
2070
2070
|
onCheckedChange: () => Na(d)
|
|
2071
2071
|
}
|
|
2072
2072
|
) }),
|
|
2073
|
-
T && /* @__PURE__ */ e(
|
|
2073
|
+
T && /* @__PURE__ */ e(ne, { className: "w-9 px-1.5", onClick: (k) => k.stopPropagation(), children: /* @__PURE__ */ e(
|
|
2074
2074
|
R,
|
|
2075
2075
|
{
|
|
2076
2076
|
type: "button",
|
|
@@ -2093,33 +2093,33 @@ function lr({
|
|
|
2093
2093
|
}
|
|
2094
2094
|
) }),
|
|
2095
2095
|
X.map((k) => /* @__PURE__ */ e(
|
|
2096
|
-
|
|
2096
|
+
ne,
|
|
2097
2097
|
{
|
|
2098
2098
|
"data-numeric": k.numeric ? "" : void 0,
|
|
2099
2099
|
className: o(k.align === "right" && "text-right", k.className),
|
|
2100
|
-
children: k.cell(
|
|
2100
|
+
children: k.cell(r)
|
|
2101
2101
|
},
|
|
2102
2102
|
k.id
|
|
2103
2103
|
)),
|
|
2104
2104
|
I && /* @__PURE__ */ e(
|
|
2105
|
-
|
|
2105
|
+
ne,
|
|
2106
2106
|
{
|
|
2107
2107
|
className: "w-44 px-4 text-right",
|
|
2108
2108
|
onClick: (k) => {
|
|
2109
2109
|
k.target.closest("button, a, input, [role='menuitem']") && k.stopPropagation();
|
|
2110
2110
|
},
|
|
2111
|
-
children: I(
|
|
2111
|
+
children: I(r)
|
|
2112
2112
|
}
|
|
2113
2113
|
)
|
|
2114
2114
|
]
|
|
2115
2115
|
}
|
|
2116
2116
|
),
|
|
2117
2117
|
T && w ? /* @__PURE__ */ e(Dt, { className: "hover:bg-inherit", "data-expanded": "", children: /* @__PURE__ */ e(
|
|
2118
|
-
|
|
2118
|
+
ne,
|
|
2119
2119
|
{
|
|
2120
2120
|
colSpan: P,
|
|
2121
2121
|
className: "border-t border-line bg-elevated/60 px-(--table-pad-x) py-3 align-top text-[13px] text-muted",
|
|
2122
|
-
children: T(
|
|
2122
|
+
children: T(r)
|
|
2123
2123
|
}
|
|
2124
2124
|
) }) : null
|
|
2125
2125
|
] }, d);
|
|
@@ -2138,9 +2138,9 @@ function lr({
|
|
|
2138
2138
|
K.length
|
|
2139
2139
|
] }),
|
|
2140
2140
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
2141
|
-
/* @__PURE__ */ s(ta, { value: String(G), onValueChange: (
|
|
2141
|
+
/* @__PURE__ */ s(ta, { value: String(G), onValueChange: (r) => oa(Number(r)), children: [
|
|
2142
2142
|
/* @__PURE__ */ e(Ze, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(ea, {}) }),
|
|
2143
|
-
/* @__PURE__ */ e(et, { children: Te.map((
|
|
2143
|
+
/* @__PURE__ */ e(et, { children: Te.map((r) => /* @__PURE__ */ e(De, { value: String(r), children: r }, r)) })
|
|
2144
2144
|
] }),
|
|
2145
2145
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
2146
2146
|
/* @__PURE__ */ e(
|
|
@@ -2150,7 +2150,7 @@ function lr({
|
|
|
2150
2150
|
size: "icon",
|
|
2151
2151
|
"aria-label": "Previous page",
|
|
2152
2152
|
disabled: te <= 0,
|
|
2153
|
-
onClick: () => pe((
|
|
2153
|
+
onClick: () => pe((r) => Math.max(0, r - 1)),
|
|
2154
2154
|
children: /* @__PURE__ */ e($a, {})
|
|
2155
2155
|
}
|
|
2156
2156
|
),
|
|
@@ -2161,7 +2161,7 @@ function lr({
|
|
|
2161
2161
|
size: "icon",
|
|
2162
2162
|
"aria-label": "Next page",
|
|
2163
2163
|
disabled: te >= ae - 1,
|
|
2164
|
-
onClick: () => pe((
|
|
2164
|
+
onClick: () => pe((r) => Math.min(ae - 1, r + 1)),
|
|
2165
2165
|
children: /* @__PURE__ */ e(jt, {})
|
|
2166
2166
|
}
|
|
2167
2167
|
)
|
|
@@ -2170,21 +2170,21 @@ function lr({
|
|
|
2170
2170
|
] })
|
|
2171
2171
|
] });
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function ln({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
2174
2174
|
return /* @__PURE__ */ e(ke, { className: i, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
2175
2175
|
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,
|
|
2176
2176
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
2177
2177
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
|
|
2178
|
-
|
|
2178
|
+
n ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-sm text-sm text-muted", children: n }) : null
|
|
2179
2179
|
] }),
|
|
2180
2180
|
l
|
|
2181
2181
|
] }) });
|
|
2182
2182
|
}
|
|
2183
|
-
const
|
|
2183
|
+
const jr = h(
|
|
2184
2184
|
({
|
|
2185
2185
|
className: t,
|
|
2186
2186
|
inputClassName: a,
|
|
2187
|
-
selectClassName:
|
|
2187
|
+
selectClassName: n,
|
|
2188
2188
|
selectValue: l,
|
|
2189
2189
|
onSelectChange: i,
|
|
2190
2190
|
selectOptions: c,
|
|
@@ -2223,7 +2223,7 @@ const Ln = h(
|
|
|
2223
2223
|
variant: "ghost",
|
|
2224
2224
|
className: o(
|
|
2225
2225
|
"min-w-28 shrink-0 rounded-l-none border border-(--input-border) border-l-0 px-3 text-[13px] font-normal",
|
|
2226
|
-
|
|
2226
|
+
n
|
|
2227
2227
|
),
|
|
2228
2228
|
children: /* @__PURE__ */ e(ea, { placeholder: u })
|
|
2229
2229
|
}
|
|
@@ -2234,8 +2234,8 @@ const Ln = h(
|
|
|
2234
2234
|
)
|
|
2235
2235
|
] })
|
|
2236
2236
|
);
|
|
2237
|
-
|
|
2238
|
-
function
|
|
2237
|
+
jr.displayName = "InputSelect";
|
|
2238
|
+
function on({ className: t, ...a }) {
|
|
2239
2239
|
return /* @__PURE__ */ e(
|
|
2240
2240
|
"kbd",
|
|
2241
2241
|
{
|
|
@@ -2247,10 +2247,10 @@ function ir({ className: t, ...a }) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
);
|
|
2249
2249
|
}
|
|
2250
|
-
const
|
|
2250
|
+
const Lr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2251
2251
|
Va.Root,
|
|
2252
2252
|
{
|
|
2253
|
-
ref:
|
|
2253
|
+
ref: n,
|
|
2254
2254
|
className: o(
|
|
2255
2255
|
"mb-2.5 block text-sm font-medium text-fg leading-none last:mb-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
2256
2256
|
t
|
|
@@ -2258,11 +2258,11 @@ const En = h(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
2258
2258
|
...a
|
|
2259
2259
|
}
|
|
2260
2260
|
));
|
|
2261
|
-
|
|
2262
|
-
function
|
|
2261
|
+
Lr.displayName = "Label";
|
|
2262
|
+
function sn({
|
|
2263
2263
|
value: t,
|
|
2264
2264
|
onValueChange: a,
|
|
2265
|
-
options:
|
|
2265
|
+
options: n,
|
|
2266
2266
|
size: l = "sm",
|
|
2267
2267
|
className: i,
|
|
2268
2268
|
...c
|
|
@@ -2278,7 +2278,7 @@ function sr({
|
|
|
2278
2278
|
l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
|
|
2279
2279
|
i
|
|
2280
2280
|
),
|
|
2281
|
-
children:
|
|
2281
|
+
children: n.map((u) => {
|
|
2282
2282
|
const x = u.value === t;
|
|
2283
2283
|
return /* @__PURE__ */ s(
|
|
2284
2284
|
"label",
|
|
@@ -2311,11 +2311,11 @@ function sr({
|
|
|
2311
2311
|
}
|
|
2312
2312
|
);
|
|
2313
2313
|
}
|
|
2314
|
-
const
|
|
2314
|
+
const Er = h(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
2315
2315
|
Wa.Root,
|
|
2316
2316
|
{
|
|
2317
2317
|
ref: i,
|
|
2318
|
-
decorative:
|
|
2318
|
+
decorative: n,
|
|
2319
2319
|
orientation: a,
|
|
2320
2320
|
className: o(
|
|
2321
2321
|
"shrink-0 bg-line",
|
|
@@ -2325,8 +2325,8 @@ const _n = h(({ className: t, orientation: a = "horizontal", decorative: r = !0,
|
|
|
2325
2325
|
...l
|
|
2326
2326
|
}
|
|
2327
2327
|
));
|
|
2328
|
-
|
|
2329
|
-
function
|
|
2328
|
+
Er.displayName = "Separator";
|
|
2329
|
+
function dn({ className: t, ...a }) {
|
|
2330
2330
|
return /* @__PURE__ */ e(
|
|
2331
2331
|
"div",
|
|
2332
2332
|
{
|
|
@@ -2335,7 +2335,7 @@ function dr({ className: t, ...a }) {
|
|
|
2335
2335
|
}
|
|
2336
2336
|
);
|
|
2337
2337
|
}
|
|
2338
|
-
const
|
|
2338
|
+
const cn = se.Provider, un = se.Root, mn = se.Trigger, _r = h(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(se.Portal, { children: /* @__PURE__ */ e(
|
|
2339
2339
|
se.Content,
|
|
2340
2340
|
{
|
|
2341
2341
|
ref: l,
|
|
@@ -2350,86 +2350,86 @@ const cr = se.Provider, ur = se.Root, mr = se.Trigger, An = h(({ className: t, s
|
|
|
2350
2350
|
"duration-150 ease-out",
|
|
2351
2351
|
t
|
|
2352
2352
|
),
|
|
2353
|
-
...
|
|
2353
|
+
...n
|
|
2354
2354
|
}
|
|
2355
2355
|
) }));
|
|
2356
|
-
|
|
2356
|
+
_r.displayName = "TooltipContent";
|
|
2357
2357
|
export {
|
|
2358
|
-
|
|
2358
|
+
Or as AgentPrompt,
|
|
2359
2359
|
Bt as Avatar,
|
|
2360
2360
|
Ft as AvatarFallback,
|
|
2361
2361
|
$t as AvatarImage,
|
|
2362
2362
|
Ya as Badge,
|
|
2363
2363
|
R as Button,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2364
|
+
Vr as Callout,
|
|
2365
|
+
ir as Card,
|
|
2366
|
+
cr as CardContent,
|
|
2367
|
+
dr as CardDescription,
|
|
2368
|
+
ur as CardFooter,
|
|
2369
2369
|
qt as CardHeader,
|
|
2370
|
-
|
|
2370
|
+
sr as CardTitle,
|
|
2371
2371
|
We as Checkbox,
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2372
|
+
Jr as ChoiceDialog,
|
|
2373
|
+
Qr as CodeBlock,
|
|
2374
|
+
Yr as Combobox,
|
|
2375
|
+
nn as DataTable,
|
|
2376
|
+
rn as DataTableIdentity,
|
|
2377
|
+
hr as Dialog,
|
|
2378
|
+
vr as DialogBody,
|
|
2379
2379
|
Wt as DialogCancel,
|
|
2380
|
-
|
|
2380
|
+
Kr as DialogClose,
|
|
2381
2381
|
Xt as DialogContent,
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2382
|
+
wr as DialogDescription,
|
|
2383
|
+
yr as DialogFooter,
|
|
2384
|
+
Nr as DialogHeader,
|
|
2385
|
+
xr as DialogPanel,
|
|
2386
2386
|
Kt as DialogTitle,
|
|
2387
2387
|
Vt as DialogTrigger,
|
|
2388
2388
|
Oe as DropdownMenu,
|
|
2389
2389
|
ie as DropdownMenuCheckboxItem,
|
|
2390
2390
|
Yt as DropdownMenuChevron,
|
|
2391
2391
|
ye as DropdownMenuContent,
|
|
2392
|
-
|
|
2392
|
+
Zr as DropdownMenuGroup,
|
|
2393
2393
|
oe as DropdownMenuItem,
|
|
2394
2394
|
we as DropdownMenuLabel,
|
|
2395
|
-
|
|
2395
|
+
en as DropdownMenuPortal,
|
|
2396
2396
|
Ce as DropdownMenuSeparator,
|
|
2397
|
-
|
|
2398
|
-
|
|
2397
|
+
tn as DropdownMenuSub,
|
|
2398
|
+
Tr as DropdownMenuSubContent,
|
|
2399
2399
|
Zt as DropdownMenuSubTrigger,
|
|
2400
2400
|
Ne as DropdownMenuTrigger,
|
|
2401
|
-
|
|
2401
|
+
ln as EmptyState,
|
|
2402
2402
|
de as Input,
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2403
|
+
jr as InputSelect,
|
|
2404
|
+
on as Kbd,
|
|
2405
|
+
Lr as Label,
|
|
2406
|
+
zr as RadioCard,
|
|
2407
|
+
Cr as RadioGroup,
|
|
2408
|
+
sn as Segmented,
|
|
2409
2409
|
ta as Select,
|
|
2410
2410
|
et as SelectContent,
|
|
2411
|
-
|
|
2411
|
+
an as SelectGroup,
|
|
2412
2412
|
De as SelectItem,
|
|
2413
|
-
|
|
2413
|
+
Mr as SelectLabel,
|
|
2414
2414
|
Ze as SelectTrigger,
|
|
2415
2415
|
ea as SelectValue,
|
|
2416
|
-
|
|
2417
|
-
|
|
2416
|
+
Er as Separator,
|
|
2417
|
+
dn as Skeleton,
|
|
2418
2418
|
At as Spinner,
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2419
|
+
Wr as Table,
|
|
2420
|
+
ar as TableBody,
|
|
2421
|
+
ne as TableCell,
|
|
2422
|
+
er as TableContainer,
|
|
2423
|
+
Pr as TableEmptyState,
|
|
2424
|
+
Xr as TableHead,
|
|
2425
|
+
Ur as TableHeader,
|
|
2426
|
+
tr as TablePanel,
|
|
2427
2427
|
Dt as TableRow,
|
|
2428
2428
|
ke as TableSurface,
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2429
|
+
un as Tooltip,
|
|
2430
|
+
_r as TooltipContent,
|
|
2431
|
+
cn as TooltipProvider,
|
|
2432
|
+
mn as TooltipTrigger,
|
|
2433
2433
|
Ja as badgeVariants,
|
|
2434
2434
|
Xa as buttonVariants
|
|
2435
2435
|
};
|