@jinaan/uikit 0.1.47 → 0.1.49
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.map +1 -1
- package/dist/index.js +464 -458
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +20 -8
package/dist/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as f, useState as T, Children as
|
|
4
|
-
import { Slot as
|
|
5
|
-
import { cva as
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as je } from "react/jsx-runtime";
|
|
2
|
+
import { CircleNotch as ha, Robot as ga, Terminal as xa, Check as ae, Copy as ht, XCircle as va, Warning as Na, CheckCircle as ya, Info as wa, Minus as Ca, X as be, CaretDown as Y, CaretRight as gt, MagnifyingGlass as Sa, Columns as za, Lock as ka, DotsSixVertical as Da, FunnelSimple as dt, WarningCircle as Ta, CaretUp as Ma, CaretUpDown as Pa, CaretLeft as Ia } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as f, useState as T, Children as xt, isValidElement as vt, useRef as _, useEffect as Z, useContext as O, useCallback as Nt, createContext as re, useId as ge, useMemo as De, useLayoutEffect as Ra, Fragment as ja } from "react";
|
|
4
|
+
import { Slot as _a } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as _e } from "class-variance-authority";
|
|
6
|
+
import { clsx as Ea } from "clsx";
|
|
7
|
+
import { twMerge as La } from "tailwind-merge";
|
|
8
|
+
import * as Ee from "@radix-ui/react-avatar";
|
|
9
|
+
import * as ct from "@radix-ui/react-checkbox";
|
|
10
|
+
import * as E from "@radix-ui/react-dialog";
|
|
11
11
|
import * as P from "@radix-ui/react-dropdown-menu";
|
|
12
12
|
import * as R from "@radix-ui/react-select";
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
13
|
+
import * as Aa from "@radix-ui/react-label";
|
|
14
|
+
import * as Ba from "@radix-ui/react-separator";
|
|
15
15
|
import * as te from "@radix-ui/react-tooltip";
|
|
16
16
|
function i(...t) {
|
|
17
|
-
return
|
|
17
|
+
return La(Ea(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function $a(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], [o] = l.splice(a, 1);
|
|
23
23
|
return l.splice(n, 0, o), l;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Fa({ className: t }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
27
|
+
ha,
|
|
28
28
|
{
|
|
29
29
|
className: i("size-4 animate-spin text-muted", t),
|
|
30
30
|
weight: "bold",
|
|
@@ -32,7 +32,7 @@ function Ba({ className: t }) {
|
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const qa = _e(
|
|
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 Fa = Re(
|
|
|
58
58
|
size: "md"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), Ga = {
|
|
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 Fa = Re(
|
|
|
80
80
|
children: h,
|
|
81
81
|
...y
|
|
82
82
|
}, k) => {
|
|
83
|
-
const v = l ?
|
|
83
|
+
const v = l ? _a : "button", D = Ga[n ?? "md"];
|
|
84
84
|
return /* @__PURE__ */ e(
|
|
85
85
|
v,
|
|
86
86
|
{
|
|
@@ -88,7 +88,7 @@ const Fa = Re(
|
|
|
88
88
|
"aria-busy": c || void 0,
|
|
89
89
|
disabled: l ? void 0 : b || c,
|
|
90
90
|
className: i(
|
|
91
|
-
|
|
91
|
+
qa({ variant: a, size: n }),
|
|
92
92
|
u && "aspect-square px-0",
|
|
93
93
|
x && "w-full",
|
|
94
94
|
c && "disabled:opacity-100",
|
|
@@ -120,7 +120,7 @@ const Fa = Re(
|
|
|
120
120
|
c ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
|
|
121
121
|
),
|
|
122
122
|
"aria-hidden": !0,
|
|
123
|
-
children: /* @__PURE__ */ e(
|
|
123
|
+
children: /* @__PURE__ */ e(Fa, { className: i("text-current", D) })
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
@@ -129,7 +129,7 @@ const Fa = Re(
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
M.displayName = "Button";
|
|
132
|
-
function
|
|
132
|
+
function Ar({
|
|
133
133
|
command: t,
|
|
134
134
|
tag: a = "Build with agents",
|
|
135
135
|
icon: n,
|
|
@@ -143,11 +143,11 @@ function Er({
|
|
|
143
143
|
};
|
|
144
144
|
return /* @__PURE__ */ s("div", { className: i("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(ga, { 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(xa, { 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,14 +158,14 @@ function Er({
|
|
|
158
158
|
"aria-label": "Copy prompt",
|
|
159
159
|
className: "ml-auto",
|
|
160
160
|
onClick: u,
|
|
161
|
-
children: o ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(
|
|
161
|
+
children: o ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ht, {})
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const yt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
168
|
+
Ee.Root,
|
|
169
169
|
{
|
|
170
170
|
ref: n,
|
|
171
171
|
className: i(
|
|
@@ -175,18 +175,18 @@ const vt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
175
175
|
...a
|
|
176
176
|
}
|
|
177
177
|
));
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
178
|
+
yt.displayName = "Avatar";
|
|
179
|
+
const wt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
180
|
+
Ee.Image,
|
|
181
181
|
{
|
|
182
182
|
ref: n,
|
|
183
183
|
className: i("aspect-square size-full object-cover", t),
|
|
184
184
|
...a
|
|
185
185
|
}
|
|
186
186
|
));
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
187
|
+
wt.displayName = "AvatarImage";
|
|
188
|
+
const Ct = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
189
|
+
Ee.Fallback,
|
|
190
190
|
{
|
|
191
191
|
ref: n,
|
|
192
192
|
className: i(
|
|
@@ -196,8 +196,8 @@ const yt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
196
196
|
...a
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
|
-
|
|
200
|
-
const
|
|
199
|
+
Ct.displayName = "AvatarFallback";
|
|
200
|
+
const Ha = _e(
|
|
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 qa = Re(
|
|
|
213
213
|
},
|
|
214
214
|
defaultVariants: { variant: "neutral" }
|
|
215
215
|
}
|
|
216
|
-
),
|
|
216
|
+
), Va = _e("size-1.5 shrink-0 rounded-full", {
|
|
217
217
|
variants: {
|
|
218
218
|
variant: {
|
|
219
219
|
neutral: "bg-subtle",
|
|
@@ -227,42 +227,42 @@ const qa = Re(
|
|
|
227
227
|
},
|
|
228
228
|
defaultVariants: { variant: "neutral" }
|
|
229
229
|
});
|
|
230
|
-
function
|
|
231
|
-
return /* @__PURE__ */ s("span", { className: i(
|
|
232
|
-
n ? /* @__PURE__ */ e("span", { className: i(
|
|
230
|
+
function Wa({ className: t, variant: a, dot: n = !1, children: l, ...o }) {
|
|
231
|
+
return /* @__PURE__ */ s("span", { className: i(Ha({ variant: a }), t), ...o, children: [
|
|
232
|
+
n ? /* @__PURE__ */ e("span", { className: i(Va({ variant: a })), "aria-hidden": !0 }) : null,
|
|
233
233
|
l
|
|
234
234
|
] });
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Oa = {
|
|
237
237
|
info: {
|
|
238
|
-
Icon:
|
|
238
|
+
Icon: wa,
|
|
239
239
|
className: "border-info/30 bg-info/10",
|
|
240
240
|
iconClassName: "text-info"
|
|
241
241
|
},
|
|
242
242
|
success: {
|
|
243
|
-
Icon:
|
|
243
|
+
Icon: ya,
|
|
244
244
|
className: "border-success/30 bg-success/10",
|
|
245
245
|
iconClassName: "text-success"
|
|
246
246
|
},
|
|
247
247
|
warning: {
|
|
248
|
-
Icon:
|
|
248
|
+
Icon: Na,
|
|
249
249
|
className: "border-warning/30 bg-warning/10",
|
|
250
250
|
iconClassName: "text-warning"
|
|
251
251
|
},
|
|
252
252
|
error: {
|
|
253
|
-
Icon:
|
|
253
|
+
Icon: va,
|
|
254
254
|
className: "border-error/30 bg-error/10",
|
|
255
255
|
iconClassName: "text-error"
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Br({
|
|
259
259
|
variant: t = "info",
|
|
260
260
|
title: a,
|
|
261
261
|
children: n,
|
|
262
262
|
icon: l,
|
|
263
263
|
className: o
|
|
264
264
|
}) {
|
|
265
|
-
const { Icon: m, className: u, iconClassName: c } =
|
|
265
|
+
const { Icon: m, className: u, iconClassName: c } = Oa[t];
|
|
266
266
|
return /* @__PURE__ */ s(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
@@ -283,7 +283,7 @@ function Lr({
|
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Ua({
|
|
287
287
|
className: t,
|
|
288
288
|
...a
|
|
289
289
|
}) {
|
|
@@ -298,7 +298,7 @@ function Wa({
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Xa({
|
|
302
302
|
className: t,
|
|
303
303
|
...a
|
|
304
304
|
}) {
|
|
@@ -313,7 +313,7 @@ function Oa({
|
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function $r({ className: t, ...a }) {
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"table",
|
|
319
319
|
{
|
|
@@ -322,13 +322,13 @@ function Ar({ className: t, ...a }) {
|
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Fr({ className: t, ...a }) {
|
|
326
326
|
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ja({ className: t, ...a }) {
|
|
329
329
|
return /* @__PURE__ */ e("tbody", { className: i("[&_tr:last-child]:border-0", t), ...a });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function ut({ className: t, ...a }) {
|
|
332
332
|
return /* @__PURE__ */ e(
|
|
333
333
|
"tr",
|
|
334
334
|
{
|
|
@@ -340,7 +340,7 @@ function dt({ className: t, ...a }) {
|
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function qr({ className: t, ...a }) {
|
|
344
344
|
return /* @__PURE__ */ e(
|
|
345
345
|
"th",
|
|
346
346
|
{
|
|
@@ -364,19 +364,19 @@ function Q({ className: t, ...a }) {
|
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const Ka = {
|
|
368
368
|
default: "bg-table-container",
|
|
369
369
|
muted: "bg-surface border border-line",
|
|
370
370
|
transparent: "bg-transparent"
|
|
371
|
-
},
|
|
371
|
+
}, Qa = {
|
|
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 Ya(t) {
|
|
377
377
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function xe({
|
|
380
380
|
title: t,
|
|
381
381
|
description: a,
|
|
382
382
|
header: n,
|
|
@@ -392,7 +392,7 @@ function ge({
|
|
|
392
392
|
scrollMode: k = "surface",
|
|
393
393
|
headerContentRef: v
|
|
394
394
|
}) {
|
|
395
|
-
const D = !!(t || a), S = k === "panel", g =
|
|
395
|
+
const D = !!(t || a), S = k === "panel", g = Ya(o) ? /* @__PURE__ */ e(
|
|
396
396
|
M,
|
|
397
397
|
{
|
|
398
398
|
variant: o.variant ?? "primary",
|
|
@@ -439,15 +439,15 @@ function ge({
|
|
|
439
439
|
}
|
|
440
440
|
)
|
|
441
441
|
) : null, I = /* @__PURE__ */ e(
|
|
442
|
-
|
|
442
|
+
Xa,
|
|
443
443
|
{
|
|
444
|
-
className: i(
|
|
444
|
+
className: i(Qa[m], x),
|
|
445
445
|
style: y ? { minHeight: y } : void 0,
|
|
446
446
|
children: l
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
|
-
return /* @__PURE__ */ s(
|
|
450
|
-
S ? /* @__PURE__ */ s(
|
|
449
|
+
return /* @__PURE__ */ s(Ua, { className: i("relative", Ka[m], u), children: [
|
|
450
|
+
S ? /* @__PURE__ */ s(je, { children: [
|
|
451
451
|
j,
|
|
452
452
|
I
|
|
453
453
|
] }) : /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
@@ -467,23 +467,23 @@ function ge({
|
|
|
467
467
|
g ? /* @__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: g }) }) : null
|
|
468
468
|
] });
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
const a =
|
|
472
|
-
(l) =>
|
|
470
|
+
function Za(t) {
|
|
471
|
+
const a = xt.toArray(t), n = a.filter(
|
|
472
|
+
(l) => vt(l) && l.type === St
|
|
473
473
|
);
|
|
474
474
|
return {
|
|
475
|
-
header: n.length > 0 ? /* @__PURE__ */ e(
|
|
475
|
+
header: n.length > 0 ? /* @__PURE__ */ e(je, { children: n }) : void 0,
|
|
476
476
|
body: a.filter((l) => !n.includes(l))
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const er = f(
|
|
480
480
|
({ className: t, children: a, ...n }, l) => {
|
|
481
|
-
const { header: o, body: m } =
|
|
482
|
-
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(
|
|
481
|
+
const { header: o, body: m } = Za(a);
|
|
482
|
+
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(xe, { className: i("shadow-xs", t), header: o, children: m }) });
|
|
483
483
|
}
|
|
484
484
|
);
|
|
485
|
-
|
|
486
|
-
const
|
|
485
|
+
er.displayName = "Card";
|
|
486
|
+
const St = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
487
487
|
"div",
|
|
488
488
|
{
|
|
489
489
|
ref: n,
|
|
@@ -494,8 +494,8 @@ const wt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
494
494
|
...a
|
|
495
495
|
}
|
|
496
496
|
));
|
|
497
|
-
|
|
498
|
-
const
|
|
497
|
+
St.displayName = "CardHeader";
|
|
498
|
+
const tr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
499
499
|
"h2",
|
|
500
500
|
{
|
|
501
501
|
ref: n,
|
|
@@ -503,8 +503,8 @@ const Za = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
503
503
|
...a
|
|
504
504
|
}
|
|
505
505
|
));
|
|
506
|
-
|
|
507
|
-
const
|
|
506
|
+
tr.displayName = "CardTitle";
|
|
507
|
+
const ar = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
508
508
|
"p",
|
|
509
509
|
{
|
|
510
510
|
ref: n,
|
|
@@ -516,10 +516,10 @@ const er = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
516
516
|
...a
|
|
517
517
|
}
|
|
518
518
|
));
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
519
|
+
ar.displayName = "CardDescription";
|
|
520
|
+
const rr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: i("px-5 py-4", t), ...a }));
|
|
521
|
+
rr.displayName = "CardContent";
|
|
522
|
+
const nr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
523
523
|
"div",
|
|
524
524
|
{
|
|
525
525
|
ref: n,
|
|
@@ -530,9 +530,9 @@ const ar = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
530
530
|
...a
|
|
531
531
|
}
|
|
532
532
|
));
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
|
|
533
|
+
nr.displayName = "CardFooter";
|
|
534
|
+
const Pe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
535
|
+
ct.Root,
|
|
536
536
|
{
|
|
537
537
|
ref: n,
|
|
538
538
|
className: i(
|
|
@@ -544,27 +544,27 @@ const Te = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
544
544
|
t
|
|
545
545
|
),
|
|
546
546
|
...a,
|
|
547
|
-
children: /* @__PURE__ */ e(
|
|
547
|
+
children: /* @__PURE__ */ e(ct.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(Ca, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(ae, { className: "size-3", weight: "bold" }) })
|
|
548
548
|
}
|
|
549
549
|
));
|
|
550
|
-
|
|
551
|
-
function
|
|
550
|
+
Pe.displayName = "Checkbox";
|
|
551
|
+
function mt(t) {
|
|
552
552
|
return t.width > 0 && t.height > 0;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function pt(t) {
|
|
555
555
|
return Math.min(1, Math.max(0.1, t));
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
return !
|
|
557
|
+
function lr(t, a) {
|
|
558
|
+
return !mt(t) || !mt(a) ? null : {
|
|
559
559
|
dx: t.left + t.width / 2 - (a.left + a.width / 2),
|
|
560
560
|
dy: t.top + t.height / 2 - (a.top + a.height / 2),
|
|
561
|
-
sx:
|
|
562
|
-
sy:
|
|
561
|
+
sx: pt(t.width / a.width),
|
|
562
|
+
sy: pt(t.height / a.height)
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
const
|
|
566
|
-
let W = null,
|
|
567
|
-
function
|
|
565
|
+
const zt = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
|
|
566
|
+
let W = null, ft = !1;
|
|
567
|
+
function Le(t) {
|
|
568
568
|
const a = t.getBoundingClientRect();
|
|
569
569
|
return a.width <= 0 || a.height <= 0 ? null : {
|
|
570
570
|
left: a.left,
|
|
@@ -573,38 +573,38 @@ function _e(t) {
|
|
|
573
573
|
height: a.height
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function Ie(t) {
|
|
577
577
|
if (!(t instanceof Element)) return;
|
|
578
|
-
const a = t.closest(
|
|
578
|
+
const a = t.closest(zt);
|
|
579
579
|
if (!a) return;
|
|
580
|
-
const n =
|
|
580
|
+
const n = Le(a);
|
|
581
581
|
n && (W = { rect: n, at: Date.now() });
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
|
|
583
|
+
function ir() {
|
|
584
|
+
ft || typeof document > "u" || (ft = !0, document.addEventListener(
|
|
585
585
|
"pointerdown",
|
|
586
|
-
(t) =>
|
|
586
|
+
(t) => Ie(t.target),
|
|
587
587
|
!0
|
|
588
588
|
), document.addEventListener(
|
|
589
589
|
"keydown",
|
|
590
590
|
(t) => {
|
|
591
|
-
t.key !== "Enter" && t.key !== " " ||
|
|
591
|
+
t.key !== "Enter" && t.key !== " " || Ie(document.activeElement);
|
|
592
592
|
},
|
|
593
593
|
!0
|
|
594
594
|
));
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function or(t) {
|
|
597
597
|
if (W && Date.now() - W.at < 2e3) {
|
|
598
598
|
const n = W.rect;
|
|
599
599
|
return W = null, n;
|
|
600
600
|
}
|
|
601
601
|
W = null;
|
|
602
602
|
const a = document.activeElement;
|
|
603
|
-
return a instanceof Element && a !== t && !t.contains(a) && a.matches(
|
|
603
|
+
return a instanceof Element && a !== t && !t.contains(a) && a.matches(zt) ? Le(a) : null;
|
|
604
604
|
}
|
|
605
|
-
const
|
|
606
|
-
}),
|
|
607
|
-
function
|
|
605
|
+
const sr = 250, kt = re(!1), Dt = re(() => {
|
|
606
|
+
}), Ae = re(!1);
|
|
607
|
+
function dr({
|
|
608
608
|
open: t,
|
|
609
609
|
defaultOpen: a,
|
|
610
610
|
onOpenChange: n,
|
|
@@ -613,10 +613,10 @@ function or({
|
|
|
613
613
|
}) {
|
|
614
614
|
const [m, u] = T(
|
|
615
615
|
a ?? !1
|
|
616
|
-
), [c, x] = T(!1), b =
|
|
616
|
+
), [c, x] = T(!1), b = _(!1), h = _(null), y = t ?? m, k = _(y);
|
|
617
617
|
k.current = y;
|
|
618
618
|
const v = t !== void 0;
|
|
619
|
-
Z(() =>
|
|
619
|
+
Z(() => ir(), []), Z(() => {
|
|
620
620
|
t && (h.current && clearTimeout(h.current), b.current = !1, x(!1));
|
|
621
621
|
}, [t]), Z(
|
|
622
622
|
() => () => {
|
|
@@ -638,10 +638,10 @@ function or({
|
|
|
638
638
|
v || u(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
639
639
|
k.current && (b.current = !1, x(!1));
|
|
640
640
|
});
|
|
641
|
-
},
|
|
641
|
+
}, sr);
|
|
642
642
|
};
|
|
643
|
-
return /* @__PURE__ */ e(
|
|
644
|
-
|
|
643
|
+
return /* @__PURE__ */ e(Dt.Provider, { value: () => D(!1), children: /* @__PURE__ */ e(kt.Provider, { value: c, children: /* @__PURE__ */ e(Ae.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
644
|
+
E.Root,
|
|
645
645
|
{
|
|
646
646
|
open: y,
|
|
647
647
|
onOpenChange: D,
|
|
@@ -650,31 +650,31 @@ function or({
|
|
|
650
650
|
}
|
|
651
651
|
) }) }) });
|
|
652
652
|
}
|
|
653
|
-
const
|
|
654
|
-
|
|
653
|
+
const Tt = f(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
|
|
654
|
+
E.Trigger,
|
|
655
655
|
{
|
|
656
656
|
ref: n,
|
|
657
657
|
onClick: (l) => {
|
|
658
|
-
|
|
658
|
+
Ie(l.currentTarget), t == null || t(l);
|
|
659
659
|
},
|
|
660
660
|
...a
|
|
661
661
|
}
|
|
662
662
|
));
|
|
663
|
-
|
|
664
|
-
const
|
|
665
|
-
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(
|
|
663
|
+
Tt.displayName = "DialogTrigger";
|
|
664
|
+
const Gr = E.Close, Mt = f(
|
|
665
|
+
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(E.Close, { asChild: !0, children: /* @__PURE__ */ e(M, { ref: l, type: "button", variant: t, ...n, children: a }) })
|
|
666
666
|
);
|
|
667
|
-
|
|
668
|
-
function
|
|
667
|
+
Mt.displayName = "DialogCancel";
|
|
668
|
+
function Pt(t, a = !0) {
|
|
669
669
|
if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
670
670
|
return;
|
|
671
|
-
const n =
|
|
671
|
+
const n = Le(t);
|
|
672
672
|
if (!n) {
|
|
673
|
-
a && window.requestAnimationFrame(() =>
|
|
673
|
+
a && window.requestAnimationFrame(() => Pt(t, !1));
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
676
|
t.dataset.dialogMotionStarted = "true";
|
|
677
|
-
const l =
|
|
677
|
+
const l = or(t), o = l ? lr(l, n) : null;
|
|
678
678
|
o ? (t.style.setProperty("--dialog-dx", `${o.dx}px`), t.style.setProperty("--dialog-dy", `${o.dy}px`), t.style.setProperty("--dialog-sx", String(o.sx)), t.style.setProperty("--dialog-sy", String(o.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"));
|
|
679
679
|
const m = () => {
|
|
680
680
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
@@ -683,10 +683,10 @@ function Tt(t, a = !0) {
|
|
|
683
683
|
};
|
|
684
684
|
t.addEventListener("animationend", u);
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function cr(t) {
|
|
687
687
|
return t.replace(/dvh\b/g, "vh");
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const It = f(
|
|
690
690
|
({
|
|
691
691
|
className: t,
|
|
692
692
|
children: a,
|
|
@@ -698,12 +698,12 @@ const Mt = f(
|
|
|
698
698
|
onPointerDownOutside: c,
|
|
699
699
|
...x
|
|
700
700
|
}, b) => {
|
|
701
|
-
const h = O(
|
|
701
|
+
const h = O(kt), y = n === "top", k = y ? {
|
|
702
702
|
"--dialog-top-offset": l,
|
|
703
|
-
"--dialog-top-offset-fallback":
|
|
704
|
-
} : void 0, v = O(
|
|
703
|
+
"--dialog-top-offset-fallback": cr(l)
|
|
704
|
+
} : void 0, v = O(Dt), D = _(null), S = Nt(
|
|
705
705
|
(g) => {
|
|
706
|
-
if (D.current = g, g && o === "auto" &&
|
|
706
|
+
if (D.current = g, g && o === "auto" && Pt(g), typeof b == "function") {
|
|
707
707
|
b(g);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
@@ -711,9 +711,9 @@ const Mt = f(
|
|
|
711
711
|
},
|
|
712
712
|
[o, b]
|
|
713
713
|
);
|
|
714
|
-
return /* @__PURE__ */ s(
|
|
714
|
+
return /* @__PURE__ */ s(E.Portal, { children: [
|
|
715
715
|
/* @__PURE__ */ e(
|
|
716
|
-
|
|
716
|
+
E.Overlay,
|
|
717
717
|
{
|
|
718
718
|
className: i(
|
|
719
719
|
"fixed inset-0 z-50 overflow-hidden bg-overlay backdrop-blur-[3px] data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
@@ -737,7 +737,7 @@ const Mt = f(
|
|
|
737
737
|
y ? "items-start" : "items-center"
|
|
738
738
|
),
|
|
739
739
|
children: /* @__PURE__ */ s(
|
|
740
|
-
|
|
740
|
+
E.Content,
|
|
741
741
|
{
|
|
742
742
|
ref: S,
|
|
743
743
|
style: k ? { ...k, ...m } : m,
|
|
@@ -759,8 +759,8 @@ const Mt = f(
|
|
|
759
759
|
...x,
|
|
760
760
|
children: [
|
|
761
761
|
a,
|
|
762
|
-
/* @__PURE__ */ s(
|
|
763
|
-
/* @__PURE__ */ e(
|
|
762
|
+
/* @__PURE__ */ s(E.Close, { className: "absolute right-3.5 top-3.5 z-10 rounded-sm text-subtle transition-colors hover:text-fg focus-visible:outline-none", children: [
|
|
763
|
+
/* @__PURE__ */ e(be, { className: "size-4" }),
|
|
764
764
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
765
765
|
] })
|
|
766
766
|
]
|
|
@@ -771,8 +771,8 @@ const Mt = f(
|
|
|
771
771
|
] });
|
|
772
772
|
}
|
|
773
773
|
);
|
|
774
|
-
|
|
775
|
-
function
|
|
774
|
+
It.displayName = "DialogContent";
|
|
775
|
+
function ur({
|
|
776
776
|
className: t,
|
|
777
777
|
...a
|
|
778
778
|
}) {
|
|
@@ -788,7 +788,7 @@ function dr({
|
|
|
788
788
|
}
|
|
789
789
|
);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function mr({
|
|
792
792
|
className: t,
|
|
793
793
|
...a
|
|
794
794
|
}) {
|
|
@@ -801,7 +801,7 @@ function cr({
|
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function pr({
|
|
805
805
|
className: t,
|
|
806
806
|
...a
|
|
807
807
|
}) {
|
|
@@ -817,7 +817,7 @@ function ur({
|
|
|
817
817
|
}
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function fr({
|
|
821
821
|
className: t,
|
|
822
822
|
...a
|
|
823
823
|
}) {
|
|
@@ -833,8 +833,8 @@ function mr({
|
|
|
833
833
|
}
|
|
834
834
|
);
|
|
835
835
|
}
|
|
836
|
-
const
|
|
837
|
-
const l = O(
|
|
836
|
+
const Rt = f(({ className: t, ...a }, n) => {
|
|
837
|
+
const l = O(Ae) ? E.Title : "h2";
|
|
838
838
|
return /* @__PURE__ */ e(
|
|
839
839
|
l,
|
|
840
840
|
{
|
|
@@ -844,9 +844,9 @@ const Pt = f(({ className: t, ...a }, n) => {
|
|
|
844
844
|
}
|
|
845
845
|
);
|
|
846
846
|
});
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
const l = O(
|
|
847
|
+
Rt.displayName = "DialogTitle";
|
|
848
|
+
const br = f(({ className: t, ...a }, n) => {
|
|
849
|
+
const l = O(Ae) ? E.Description : "p";
|
|
850
850
|
return /* @__PURE__ */ e(
|
|
851
851
|
l,
|
|
852
852
|
{
|
|
@@ -856,9 +856,9 @@ const pr = f(({ className: t, ...a }, n) => {
|
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
858
|
});
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
function
|
|
859
|
+
br.displayName = "DialogDescription";
|
|
860
|
+
const jt = re(null);
|
|
861
|
+
function hr({
|
|
862
862
|
label: t,
|
|
863
863
|
value: a,
|
|
864
864
|
onChange: n,
|
|
@@ -868,13 +868,13 @@ function fr({
|
|
|
868
868
|
children: u,
|
|
869
869
|
...c
|
|
870
870
|
}) {
|
|
871
|
-
const x =
|
|
872
|
-
return /* @__PURE__ */ e(
|
|
871
|
+
const x = ge(), b = o ?? x;
|
|
872
|
+
return /* @__PURE__ */ e(jt.Provider, { value: { name: b, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: i("flex flex-col gap-6", m), ...c, children: [
|
|
873
873
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
874
874
|
u
|
|
875
875
|
] }) });
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function gr({
|
|
878
878
|
value: t,
|
|
879
879
|
title: a,
|
|
880
880
|
description: n,
|
|
@@ -882,7 +882,7 @@ function br({
|
|
|
882
882
|
disabled: o = !1,
|
|
883
883
|
className: m
|
|
884
884
|
}) {
|
|
885
|
-
const u = O(
|
|
885
|
+
const u = O(jt), c = ge();
|
|
886
886
|
if (!u)
|
|
887
887
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
888
888
|
const x = o || u.disabled, b = u.value === t;
|
|
@@ -925,7 +925,7 @@ function br({
|
|
|
925
925
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
926
926
|
/* @__PURE__ */ s("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
927
927
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: a }),
|
|
928
|
-
l ? /* @__PURE__ */ e(
|
|
928
|
+
l ? /* @__PURE__ */ e(Wa, { variant: "primary", children: l }) : null
|
|
929
929
|
] }),
|
|
930
930
|
n ? /* @__PURE__ */ e("span", { id: c, className: "mt-1 block text-sm text-muted", children: n }) : null
|
|
931
931
|
] })
|
|
@@ -933,7 +933,7 @@ function br({
|
|
|
933
933
|
}
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Hr({
|
|
937
937
|
open: t,
|
|
938
938
|
onOpenChange: a,
|
|
939
939
|
trigger: n,
|
|
@@ -948,20 +948,20 @@ function qr({
|
|
|
948
948
|
}) {
|
|
949
949
|
var S;
|
|
950
950
|
const [y, k] = T(m ?? ((S = o[0]) == null ? void 0 : S.value) ?? ""), v = u ?? y;
|
|
951
|
-
return /* @__PURE__ */ s(
|
|
952
|
-
n ? /* @__PURE__ */ e(
|
|
951
|
+
return /* @__PURE__ */ s(dr, { open: t, onOpenChange: a, children: [
|
|
952
|
+
n ? /* @__PURE__ */ e(Tt, { asChild: !0, children: n }) : null,
|
|
953
953
|
/* @__PURE__ */ s(
|
|
954
|
-
|
|
954
|
+
It,
|
|
955
955
|
{
|
|
956
956
|
"aria-describedby": void 0,
|
|
957
957
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
958
958
|
children: [
|
|
959
|
-
/* @__PURE__ */ s(
|
|
960
|
-
/* @__PURE__ */ e(
|
|
961
|
-
/* @__PURE__ */ e(
|
|
959
|
+
/* @__PURE__ */ s(ur, { children: [
|
|
960
|
+
/* @__PURE__ */ e(pr, { children: /* @__PURE__ */ e(Rt, { className: "text-xl", children: l }) }),
|
|
961
|
+
/* @__PURE__ */ e(mr, { children: /* @__PURE__ */ e(hr, { label: l, value: v, onChange: (g) => {
|
|
962
962
|
u === void 0 && k(g), c == null || c(g);
|
|
963
963
|
}, children: o.map((g) => /* @__PURE__ */ e(
|
|
964
|
-
|
|
964
|
+
gr,
|
|
965
965
|
{
|
|
966
966
|
value: g.value,
|
|
967
967
|
title: g.title,
|
|
@@ -971,8 +971,8 @@ function qr({
|
|
|
971
971
|
g.value
|
|
972
972
|
)) }) })
|
|
973
973
|
] }),
|
|
974
|
-
/* @__PURE__ */ s(
|
|
975
|
-
/* @__PURE__ */ e(
|
|
974
|
+
/* @__PURE__ */ s(fr, { className: "gap-3 pt-2.5", children: [
|
|
975
|
+
/* @__PURE__ */ e(Mt, { className: "flex-1", children: x }),
|
|
976
976
|
/* @__PURE__ */ e(M, { className: "flex-1", onClick: () => h == null ? void 0 : h(v), children: b })
|
|
977
977
|
] })
|
|
978
978
|
]
|
|
@@ -980,16 +980,16 @@ function qr({
|
|
|
980
980
|
)
|
|
981
981
|
] });
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Vr({ code: t, label: a, className: n }) {
|
|
984
984
|
const [l, o] = T(!1);
|
|
985
985
|
return /* @__PURE__ */ e(
|
|
986
|
-
|
|
986
|
+
xe,
|
|
987
987
|
{
|
|
988
988
|
className: n,
|
|
989
989
|
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 }) }),
|
|
990
990
|
action: {
|
|
991
991
|
label: l ? "Copied" : "Copy",
|
|
992
|
-
icon: l ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(
|
|
992
|
+
icon: l ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ht, {}),
|
|
993
993
|
variant: "ghost",
|
|
994
994
|
onClick: async () => {
|
|
995
995
|
try {
|
|
@@ -1003,32 +1003,32 @@ function Gr({ code: t, label: a, className: n }) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
);
|
|
1005
1005
|
}
|
|
1006
|
-
const
|
|
1006
|
+
const xr = {
|
|
1007
1007
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
1008
1008
|
md: "h-[var(--control-h-md)] text-sm",
|
|
1009
1009
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
1010
1010
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
1011
|
-
},
|
|
1011
|
+
}, vr = {
|
|
1012
1012
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
1013
1013
|
md: "px-[var(--control-pad-x-md)]",
|
|
1014
1014
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
1015
1015
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
1016
|
-
},
|
|
1016
|
+
}, Nr = {
|
|
1017
1017
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
1018
1018
|
md: "left-[var(--control-pad-x-md)]",
|
|
1019
1019
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
1020
1020
|
xl: "left-[var(--control-pad-x-xl)]"
|
|
1021
|
-
},
|
|
1021
|
+
}, bt = {
|
|
1022
1022
|
sm: "right-[var(--control-pad-x-sm)]",
|
|
1023
1023
|
md: "right-[var(--control-pad-x-md)]",
|
|
1024
1024
|
lg: "right-[var(--control-pad-x-lg)]",
|
|
1025
1025
|
xl: "right-[var(--control-pad-x-xl)]"
|
|
1026
|
-
},
|
|
1026
|
+
}, Te = {
|
|
1027
1027
|
sm: "size-[var(--control-icon-sm)]",
|
|
1028
1028
|
md: "size-[var(--control-icon-md)]",
|
|
1029
1029
|
lg: "size-[var(--control-icon-lg)]",
|
|
1030
1030
|
xl: "size-[var(--control-icon-xl)]"
|
|
1031
|
-
},
|
|
1031
|
+
}, Be = f(
|
|
1032
1032
|
({
|
|
1033
1033
|
className: t,
|
|
1034
1034
|
containerClassName: a,
|
|
@@ -1047,7 +1047,7 @@ const hr = {
|
|
|
1047
1047
|
readOnly: D,
|
|
1048
1048
|
...S
|
|
1049
1049
|
}, g) => {
|
|
1050
|
-
const j =
|
|
1050
|
+
const j = ge(), I = y ?? j, A = !!h, F = !!(u && (c !== void 0 ? String(c).length > 0 : x !== void 0 && String(x).length > 0)), ne = A ? `${I}-description` : void 0, U = [k, ne].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ e(
|
|
1051
1051
|
"input",
|
|
1052
1052
|
{
|
|
1053
1053
|
ref: g,
|
|
@@ -1057,14 +1057,14 @@ const hr = {
|
|
|
1057
1057
|
readOnly: D,
|
|
1058
1058
|
"aria-invalid": b || void 0,
|
|
1059
1059
|
"aria-describedby": U,
|
|
1060
|
-
style: o || m ||
|
|
1060
|
+
style: o || m || F ? {
|
|
1061
1061
|
paddingInlineStart: o ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
|
|
1062
|
-
paddingInlineEnd: m ||
|
|
1062
|
+
paddingInlineEnd: m || F ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
|
|
1063
1063
|
} : void 0,
|
|
1064
1064
|
className: i(
|
|
1065
1065
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
1066
|
-
|
|
1067
|
-
|
|
1066
|
+
xr[l],
|
|
1067
|
+
vr[l],
|
|
1068
1068
|
"placeholder:text-(--input-placeholder)",
|
|
1069
1069
|
"hover:border-(--input-border-hover)",
|
|
1070
1070
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
@@ -1080,21 +1080,21 @@ const hr = {
|
|
|
1080
1080
|
...S
|
|
1081
1081
|
}
|
|
1082
1082
|
);
|
|
1083
|
-
return !o && !m &&
|
|
1083
|
+
return !o && !m && !F && !A ? le : /* @__PURE__ */ s("div", { className: i("w-full", a), children: [
|
|
1084
1084
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
1085
1085
|
o ? /* @__PURE__ */ e(
|
|
1086
1086
|
"span",
|
|
1087
1087
|
{
|
|
1088
1088
|
className: i(
|
|
1089
1089
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1090
|
-
|
|
1090
|
+
Nr[l]
|
|
1091
1091
|
),
|
|
1092
1092
|
"aria-hidden": !0,
|
|
1093
|
-
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center",
|
|
1093
|
+
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: o })
|
|
1094
1094
|
}
|
|
1095
1095
|
) : null,
|
|
1096
1096
|
le,
|
|
1097
|
-
|
|
1097
|
+
F ? /* @__PURE__ */ e(
|
|
1098
1098
|
"button",
|
|
1099
1099
|
{
|
|
1100
1100
|
type: "button",
|
|
@@ -1102,19 +1102,19 @@ const hr = {
|
|
|
1102
1102
|
onClick: u,
|
|
1103
1103
|
className: i(
|
|
1104
1104
|
"absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
|
|
1105
|
-
|
|
1105
|
+
bt[l]
|
|
1106
1106
|
),
|
|
1107
|
-
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center",
|
|
1107
|
+
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: /* @__PURE__ */ e(be, {}) })
|
|
1108
1108
|
}
|
|
1109
1109
|
) : m ? /* @__PURE__ */ e(
|
|
1110
1110
|
"span",
|
|
1111
1111
|
{
|
|
1112
1112
|
className: i(
|
|
1113
1113
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1114
|
-
|
|
1114
|
+
bt[l]
|
|
1115
1115
|
),
|
|
1116
1116
|
"aria-hidden": !0,
|
|
1117
|
-
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center",
|
|
1117
|
+
children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: m })
|
|
1118
1118
|
}
|
|
1119
1119
|
) : null
|
|
1120
1120
|
] }),
|
|
@@ -1129,33 +1129,33 @@ const hr = {
|
|
|
1129
1129
|
] });
|
|
1130
1130
|
}
|
|
1131
1131
|
);
|
|
1132
|
-
|
|
1133
|
-
function
|
|
1132
|
+
Be.displayName = "Input";
|
|
1133
|
+
function $e(t, a) {
|
|
1134
1134
|
let n = 0;
|
|
1135
|
-
return
|
|
1136
|
-
if (!
|
|
1135
|
+
return xt.forEach(t, (l) => {
|
|
1136
|
+
if (!vt(l)) return;
|
|
1137
1137
|
if (a.some((m) => m === l.type)) {
|
|
1138
1138
|
n += 1;
|
|
1139
1139
|
return;
|
|
1140
1140
|
}
|
|
1141
1141
|
const o = l.props.children;
|
|
1142
|
-
o && (n +=
|
|
1142
|
+
o && (n += $e(o, a));
|
|
1143
1143
|
}), n;
|
|
1144
1144
|
}
|
|
1145
|
-
const
|
|
1146
|
-
function
|
|
1145
|
+
const _t = re(!1);
|
|
1146
|
+
function Me({
|
|
1147
1147
|
children: t,
|
|
1148
1148
|
...a
|
|
1149
1149
|
}) {
|
|
1150
|
-
const n =
|
|
1151
|
-
|
|
1150
|
+
const n = $e(t, [
|
|
1151
|
+
he,
|
|
1152
1152
|
ee,
|
|
1153
|
-
|
|
1153
|
+
Lt
|
|
1154
1154
|
]) === 0;
|
|
1155
|
-
return /* @__PURE__ */ e(
|
|
1155
|
+
return /* @__PURE__ */ e(_t.Provider, { value: n, children: /* @__PURE__ */ e(P.Root, { ...a, children: t }) });
|
|
1156
1156
|
}
|
|
1157
|
-
const
|
|
1158
|
-
const o = O(
|
|
1157
|
+
const me = f(({ className: t, disabled: a, ...n }, l) => {
|
|
1158
|
+
const o = O(_t);
|
|
1159
1159
|
return /* @__PURE__ */ e(
|
|
1160
1160
|
P.Trigger,
|
|
1161
1161
|
{
|
|
@@ -1166,8 +1166,8 @@ const ue = f(({ className: t, disabled: a, ...n }, l) => {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
1168
|
});
|
|
1169
|
-
|
|
1170
|
-
const
|
|
1169
|
+
me.displayName = "DropdownMenuTrigger";
|
|
1170
|
+
const Et = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1171
1171
|
Y,
|
|
1172
1172
|
{
|
|
1173
1173
|
ref: n,
|
|
@@ -1179,8 +1179,8 @@ const jt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1179
1179
|
...a
|
|
1180
1180
|
}
|
|
1181
1181
|
));
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1182
|
+
Et.displayName = "DropdownMenuChevron";
|
|
1183
|
+
const Wr = P.Group, Or = P.Portal, pe = f(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(P.Portal, { children: /* @__PURE__ */ e(
|
|
1184
1184
|
P.Content,
|
|
1185
1185
|
{
|
|
1186
1186
|
ref: l,
|
|
@@ -1198,8 +1198,8 @@ const Hr = P.Group, Vr = P.Portal, me = f(({ className: t, sideOffset: a = 8, ..
|
|
|
1198
1198
|
...n
|
|
1199
1199
|
}
|
|
1200
1200
|
) }));
|
|
1201
|
-
|
|
1202
|
-
const
|
|
1201
|
+
pe.displayName = "DropdownMenuContent";
|
|
1202
|
+
const he = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
1203
1203
|
P.Item,
|
|
1204
1204
|
{
|
|
1205
1205
|
ref: l,
|
|
@@ -1213,7 +1213,7 @@ const be = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
|
1213
1213
|
...n
|
|
1214
1214
|
}
|
|
1215
1215
|
));
|
|
1216
|
-
|
|
1216
|
+
he.displayName = "DropdownMenuItem";
|
|
1217
1217
|
const ee = f(({ className: t, children: a, checked: n, ...l }, o) => /* @__PURE__ */ s(
|
|
1218
1218
|
P.CheckboxItem,
|
|
1219
1219
|
{
|
|
@@ -1231,7 +1231,7 @@ const ee = f(({ className: t, children: a, checked: n, ...l }, o) => /* @__PURE_
|
|
|
1231
1231
|
}
|
|
1232
1232
|
));
|
|
1233
1233
|
ee.displayName = "DropdownMenuCheckboxItem";
|
|
1234
|
-
const
|
|
1234
|
+
const fe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1235
1235
|
P.Label,
|
|
1236
1236
|
{
|
|
1237
1237
|
ref: n,
|
|
@@ -1239,8 +1239,8 @@ const pe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1239
1239
|
...a
|
|
1240
1240
|
}
|
|
1241
1241
|
));
|
|
1242
|
-
|
|
1243
|
-
const
|
|
1242
|
+
fe.displayName = "DropdownMenuLabel";
|
|
1243
|
+
const Ur = P.Sub, Lt = f(({ className: t, inset: a, children: n, ...l }, o) => /* @__PURE__ */ s(
|
|
1244
1244
|
P.SubTrigger,
|
|
1245
1245
|
{
|
|
1246
1246
|
ref: o,
|
|
@@ -1254,12 +1254,12 @@ const Wr = P.Sub, _t = f(({ className: t, inset: a, children: n, ...l }, o) => /
|
|
|
1254
1254
|
...l,
|
|
1255
1255
|
children: [
|
|
1256
1256
|
n,
|
|
1257
|
-
/* @__PURE__ */ e(
|
|
1257
|
+
/* @__PURE__ */ e(gt, { className: "ml-auto shrink-0" })
|
|
1258
1258
|
]
|
|
1259
1259
|
}
|
|
1260
1260
|
));
|
|
1261
|
-
|
|
1262
|
-
const
|
|
1261
|
+
Lt.displayName = "DropdownMenuSubTrigger";
|
|
1262
|
+
const yr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1263
1263
|
P.SubContent,
|
|
1264
1264
|
{
|
|
1265
1265
|
ref: n,
|
|
@@ -1277,8 +1277,8 @@ const vr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1277
1277
|
...a
|
|
1278
1278
|
}
|
|
1279
1279
|
));
|
|
1280
|
-
|
|
1281
|
-
const
|
|
1280
|
+
yr.displayName = "DropdownMenuSubContent";
|
|
1281
|
+
const Re = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1282
1282
|
P.Separator,
|
|
1283
1283
|
{
|
|
1284
1284
|
ref: n,
|
|
@@ -1286,17 +1286,17 @@ const Pe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1286
1286
|
...a
|
|
1287
1287
|
}
|
|
1288
1288
|
));
|
|
1289
|
-
|
|
1290
|
-
const
|
|
1291
|
-
function
|
|
1289
|
+
Re.displayName = "DropdownMenuSeparator";
|
|
1290
|
+
const Xr = R.Group, At = R.Value;
|
|
1291
|
+
function Bt({
|
|
1292
1292
|
children: t,
|
|
1293
1293
|
disabled: a,
|
|
1294
1294
|
...n
|
|
1295
1295
|
}) {
|
|
1296
|
-
const l =
|
|
1296
|
+
const l = $e(t, [ve]) === 0;
|
|
1297
1297
|
return /* @__PURE__ */ e(R.Root, { disabled: a || l, ...n, children: t });
|
|
1298
1298
|
}
|
|
1299
|
-
const
|
|
1299
|
+
const Fe = f(({ className: t, children: a, variant: n = "field", ...l }, o) => /* @__PURE__ */ s(
|
|
1300
1300
|
R.Trigger,
|
|
1301
1301
|
{
|
|
1302
1302
|
ref: o,
|
|
@@ -1316,8 +1316,8 @@ const Be = f(({ className: t, children: a, variant: n = "field", ...l }, o) => /
|
|
|
1316
1316
|
]
|
|
1317
1317
|
}
|
|
1318
1318
|
));
|
|
1319
|
-
|
|
1320
|
-
const
|
|
1319
|
+
Fe.displayName = "SelectTrigger";
|
|
1320
|
+
const qe = f(
|
|
1321
1321
|
({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...o }, m) => /* @__PURE__ */ e(R.Portal, { children: /* @__PURE__ */ e(
|
|
1322
1322
|
R.Content,
|
|
1323
1323
|
{
|
|
@@ -1339,8 +1339,8 @@ const Fe = f(
|
|
|
1339
1339
|
}
|
|
1340
1340
|
) })
|
|
1341
1341
|
);
|
|
1342
|
-
|
|
1343
|
-
const
|
|
1342
|
+
qe.displayName = "SelectContent";
|
|
1343
|
+
const ve = f(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
1344
1344
|
R.Item,
|
|
1345
1345
|
{
|
|
1346
1346
|
ref: l,
|
|
@@ -1355,8 +1355,8 @@ const xe = f(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
|
1355
1355
|
]
|
|
1356
1356
|
}
|
|
1357
1357
|
));
|
|
1358
|
-
|
|
1359
|
-
const
|
|
1358
|
+
ve.displayName = "SelectItem";
|
|
1359
|
+
const wr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1360
1360
|
R.Label,
|
|
1361
1361
|
{
|
|
1362
1362
|
ref: n,
|
|
@@ -1364,8 +1364,8 @@ const Nr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1364
1364
|
...a
|
|
1365
1365
|
}
|
|
1366
1366
|
));
|
|
1367
|
-
|
|
1368
|
-
function
|
|
1367
|
+
wr.displayName = "SelectLabel";
|
|
1368
|
+
function Cr({
|
|
1369
1369
|
icon: t,
|
|
1370
1370
|
title: a,
|
|
1371
1371
|
description: n,
|
|
@@ -1390,22 +1390,22 @@ function yr({
|
|
|
1390
1390
|
}
|
|
1391
1391
|
);
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1394
|
-
function
|
|
1393
|
+
const Sr = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1394
|
+
function zr(t) {
|
|
1395
1395
|
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1396
1396
|
var n;
|
|
1397
1397
|
return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1398
1398
|
}).join("");
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Jr({
|
|
1401
1401
|
name: t,
|
|
1402
1402
|
secondary: a,
|
|
1403
1403
|
image: n
|
|
1404
1404
|
}) {
|
|
1405
1405
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1406
|
-
/* @__PURE__ */ s(
|
|
1407
|
-
n ? /* @__PURE__ */ e(
|
|
1408
|
-
/* @__PURE__ */ e(
|
|
1406
|
+
/* @__PURE__ */ s(yt, { className: "size-8", children: [
|
|
1407
|
+
n ? /* @__PURE__ */ e(wt, { src: n, alt: "" }) : null,
|
|
1408
|
+
/* @__PURE__ */ e(Ct, { children: zr(t) })
|
|
1409
1409
|
] }),
|
|
1410
1410
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1411
1411
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1413,7 +1413,7 @@ function Ur({
|
|
|
1413
1413
|
] })
|
|
1414
1414
|
] });
|
|
1415
1415
|
}
|
|
1416
|
-
function
|
|
1416
|
+
function Kr({
|
|
1417
1417
|
rows: t,
|
|
1418
1418
|
columns: a,
|
|
1419
1419
|
getRowId: n,
|
|
@@ -1434,49 +1434,49 @@ function Xr({
|
|
|
1434
1434
|
rowActions: j,
|
|
1435
1435
|
renderExpanded: I,
|
|
1436
1436
|
onRowClick: A,
|
|
1437
|
-
defaultSort:
|
|
1437
|
+
defaultSort: F,
|
|
1438
1438
|
sort: ne,
|
|
1439
1439
|
onSortChange: U,
|
|
1440
1440
|
pageSize: le = 25,
|
|
1441
|
-
pageSizeOptions:
|
|
1442
|
-
pagination:
|
|
1443
|
-
tone:
|
|
1444
|
-
title:
|
|
1445
|
-
description:
|
|
1446
|
-
headerAction:
|
|
1447
|
-
headerClassName:
|
|
1448
|
-
panelClassName:
|
|
1449
|
-
className:
|
|
1441
|
+
pageSizeOptions: $t = [10, 25, 50, 100],
|
|
1442
|
+
pagination: Ft = "auto",
|
|
1443
|
+
tone: qt,
|
|
1444
|
+
title: Gt,
|
|
1445
|
+
description: Ht,
|
|
1446
|
+
headerAction: Vt,
|
|
1447
|
+
headerClassName: Wt,
|
|
1448
|
+
panelClassName: Ot,
|
|
1449
|
+
className: Ut
|
|
1450
1450
|
}) {
|
|
1451
|
-
const [
|
|
1451
|
+
const [Ge, He] = T(
|
|
1452
1452
|
() => Object.fromEntries(
|
|
1453
1453
|
a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
|
|
1454
1454
|
)
|
|
1455
|
-
), [
|
|
1456
|
-
|
|
1457
|
-
), w = U ? ne ?? null :
|
|
1458
|
-
U ? U(r) :
|
|
1459
|
-
}, [X, ie] = T(0), [B,
|
|
1460
|
-
|
|
1455
|
+
), [Ve, We] = T(null), [Ne, Oe] = T(null), [Xt, Jt] = T(
|
|
1456
|
+
F ?? null
|
|
1457
|
+
), w = U ? ne ?? null : Xt, Kt = (r) => {
|
|
1458
|
+
U ? U(r) : Jt(r);
|
|
1459
|
+
}, [X, ie] = T(0), [B, Qt] = T(le), [q, ye] = T(/* @__PURE__ */ new Set()), [Yt, Zt] = T(/* @__PURE__ */ new Set()), ea = (r) => {
|
|
1460
|
+
Zt((d) => {
|
|
1461
1461
|
const p = new Set(d);
|
|
1462
1462
|
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1463
1463
|
});
|
|
1464
|
-
}, [
|
|
1465
|
-
const p = d ?
|
|
1466
|
-
!p ||
|
|
1467
|
-
const z = N ??
|
|
1468
|
-
return
|
|
1464
|
+
}, [ta, we] = T([]), Ue = a.map((r) => r.id), Xe = new Map(a.map((r) => [r.id, r])), Je = Ve ? Ve.map((r) => Xe.get(r)).filter((r) => !!r) : a, G = Je.filter((r) => !Ge[r.id]), Ke = Je.filter((r) => Ge[r.id] && !r.required), Qe = (r) => !!r.required, aa = (r) => Xe.get(r), ra = (r, d) => {
|
|
1465
|
+
const p = d ? aa(d) : void 0;
|
|
1466
|
+
!p || Qe(p) || r === d || We((N) => {
|
|
1467
|
+
const z = N ?? Ue;
|
|
1468
|
+
return $a(z, z.indexOf(r), z.indexOf(d));
|
|
1469
1469
|
});
|
|
1470
|
-
},
|
|
1471
|
-
|
|
1472
|
-
},
|
|
1470
|
+
}, na = (r) => {
|
|
1471
|
+
He((d) => ({ ...d, [r]: !1 })), We((d) => d && d.includes(r) ? d : [...d ?? Ue, r]);
|
|
1472
|
+
}, Ce = (c ?? []).filter((r) => ta.includes(r.id)), la = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), oe = De(() => {
|
|
1473
1473
|
let r = t;
|
|
1474
1474
|
for (const p of c ?? [])
|
|
1475
1475
|
p.value.length > 0 && (r = r.filter((N) => p.match(N, p.value)));
|
|
1476
1476
|
if (!u || !u.value.trim()) return r;
|
|
1477
1477
|
const d = u.value.trim().toLowerCase();
|
|
1478
1478
|
return r.filter((p) => u.keys(p).toLowerCase().includes(d));
|
|
1479
|
-
}, [t, u, c]), H =
|
|
1479
|
+
}, [t, u, c]), H = De(() => {
|
|
1480
1480
|
if (!w) return oe;
|
|
1481
1481
|
const r = a.find((p) => p.id === w.id);
|
|
1482
1482
|
if (!(r != null && r.sortValue)) return oe;
|
|
@@ -1485,66 +1485,72 @@ function Xr({
|
|
|
1485
1485
|
const z = r.sortValue(p), C = r.sortValue(N);
|
|
1486
1486
|
return z == null && C == null ? 0 : z == null ? 1 : C == null ? -1 : typeof z == "number" && typeof C == "number" ? (z - C) * d : String(z).localeCompare(String(C)) * d;
|
|
1487
1487
|
});
|
|
1488
|
-
}, [oe, w, a]), J = Math.max(1, Math.ceil(H.length / B)),
|
|
1488
|
+
}, [oe, w, a]), J = Math.max(1, Math.ceil(H.length / B)), ia = !l && !o && H.length > 0 && (Ft === "always" || H.length > B);
|
|
1489
1489
|
Z(() => {
|
|
1490
1490
|
ie(0);
|
|
1491
|
-
}, [u == null ? void 0 : u.value, B, w == null ? void 0 : w.id, w == null ? void 0 : w.dir, k,
|
|
1491
|
+
}, [u == null ? void 0 : u.value, B, w == null ? void 0 : w.id, w == null ? void 0 : w.dir, k, la]), Z(() => {
|
|
1492
1492
|
X > J - 1 && ie(J - 1);
|
|
1493
1493
|
}, [X, J]);
|
|
1494
|
-
const se = X * B,
|
|
1494
|
+
const se = X * B, $ = H.slice(se, se + B), oa = (r) => {
|
|
1495
1495
|
if (!r.sortable) return;
|
|
1496
1496
|
const d = w;
|
|
1497
|
-
|
|
1497
|
+
Kt(
|
|
1498
1498
|
(d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
|
|
1499
1499
|
);
|
|
1500
|
-
},
|
|
1501
|
-
|
|
1500
|
+
}, Ye = $.length > 0 && $.every((r) => q.has(n(r))), sa = $.some((r) => q.has(n(r))), da = t.filter((r) => q.has(n(r))), ca = () => {
|
|
1501
|
+
ye((r) => {
|
|
1502
1502
|
const d = new Set(r);
|
|
1503
|
-
return
|
|
1503
|
+
return Ye ? $.forEach((p) => d.delete(n(p))) : $.forEach((p) => d.add(n(p))), d;
|
|
1504
1504
|
});
|
|
1505
|
-
},
|
|
1506
|
-
|
|
1505
|
+
}, ua = (r) => {
|
|
1506
|
+
ye((d) => {
|
|
1507
1507
|
const p = new Set(d);
|
|
1508
1508
|
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1509
1509
|
});
|
|
1510
|
-
},
|
|
1511
|
-
|
|
1510
|
+
}, ma = !!(u || c != null && c.length || x || b), pa = (r) => (w == null ? void 0 : w.id) === r.id ? w.dir === "asc" ? "ascending" : "descending" : void 0, Ze = _(null), et = _(null), tt = _(null), at = _(null), [V, Se] = T([]), fa = G.map((r) => r.id).join("\0"), de = `${S ? "s" : "-"}|${j ? "a" : "-"}|${I ? "e" : "-"}|${fa}`, rt = _(de), ce = De(() => {
|
|
1511
|
+
try {
|
|
1512
|
+
return JSON.stringify(t);
|
|
1513
|
+
} catch {
|
|
1514
|
+
return `rows:${t.length}`;
|
|
1515
|
+
}
|
|
1516
|
+
}, [t]), nt = _(ce), ba = V.length > 0, ze = Nt(() => {
|
|
1517
|
+
const r = tt.current, d = at.current;
|
|
1512
1518
|
r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1513
1519
|
}, []);
|
|
1514
|
-
|
|
1515
|
-
const r =
|
|
1520
|
+
Ra(() => {
|
|
1521
|
+
const r = Ze.current;
|
|
1516
1522
|
if (!r) return;
|
|
1517
|
-
if (
|
|
1518
|
-
|
|
1523
|
+
if (rt.current !== de || nt.current !== ce) {
|
|
1524
|
+
rt.current = de, nt.current = ce, Se((N) => N.length === 0 ? N : []);
|
|
1519
1525
|
return;
|
|
1520
1526
|
}
|
|
1521
1527
|
const d = () => {
|
|
1522
|
-
var
|
|
1523
|
-
const N = (
|
|
1528
|
+
var lt, it, ot;
|
|
1529
|
+
const N = (it = (lt = r.tBodies[0]) == null ? void 0 : lt.rows.item(0)) == null ? void 0 : it.cells;
|
|
1524
1530
|
if (!N || N.length === 0) {
|
|
1525
|
-
|
|
1531
|
+
Se((L) => L.length === 0 ? L : []);
|
|
1526
1532
|
return;
|
|
1527
1533
|
}
|
|
1528
|
-
const z = (
|
|
1534
|
+
const z = (ot = et.current) == null ? void 0 : ot.querySelectorAll("thead th"), C = Array.from(
|
|
1529
1535
|
N,
|
|
1530
|
-
(L,
|
|
1531
|
-
var
|
|
1536
|
+
(L, ke) => {
|
|
1537
|
+
var ue, st;
|
|
1532
1538
|
return Math.max(
|
|
1533
1539
|
L.getBoundingClientRect().width,
|
|
1534
|
-
((
|
|
1540
|
+
((st = (ue = z == null ? void 0 : z.item(ke)) == null ? void 0 : ue.querySelector("[data-col-sizer]")) == null ? void 0 : st.getBoundingClientRect().width) ?? 0
|
|
1535
1541
|
);
|
|
1536
1542
|
}
|
|
1537
1543
|
);
|
|
1538
|
-
|
|
1539
|
-
(L) => L.length === C.length && L.every((
|
|
1544
|
+
Se(
|
|
1545
|
+
(L) => L.length === C.length && L.every((ke, ue) => ke === C[ue]) ? L : C
|
|
1540
1546
|
);
|
|
1541
1547
|
};
|
|
1542
|
-
if (d(),
|
|
1548
|
+
if (d(), ze(), typeof ResizeObserver > "u") return;
|
|
1543
1549
|
const p = new ResizeObserver(d);
|
|
1544
1550
|
return p.observe(r), () => p.disconnect();
|
|
1545
|
-
}, [de,
|
|
1551
|
+
}, [de, ce, ba, l, o, ze]);
|
|
1546
1552
|
const K = V.reduce((r, d) => r + d, 0);
|
|
1547
|
-
return /* @__PURE__ */ s("div", { className: i("space-y-4",
|
|
1553
|
+
return /* @__PURE__ */ s("div", { className: i("space-y-4", Ut), children: [
|
|
1548
1554
|
y && y.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: y.map((r) => {
|
|
1549
1555
|
const d = r.id === k;
|
|
1550
1556
|
return /* @__PURE__ */ e(
|
|
@@ -1563,9 +1569,9 @@ function Xr({
|
|
|
1563
1569
|
r.id
|
|
1564
1570
|
);
|
|
1565
1571
|
}) }),
|
|
1566
|
-
|
|
1572
|
+
ma && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1567
1573
|
u && /* @__PURE__ */ e(
|
|
1568
|
-
|
|
1574
|
+
Be,
|
|
1569
1575
|
{
|
|
1570
1576
|
type: "search",
|
|
1571
1577
|
"aria-label": u.placeholder ?? "Search",
|
|
@@ -1573,27 +1579,27 @@ function Xr({
|
|
|
1573
1579
|
value: u.value,
|
|
1574
1580
|
onChange: (r) => u.onChange(r.target.value),
|
|
1575
1581
|
onClear: () => u.onChange(""),
|
|
1576
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1582
|
+
leadingIcon: /* @__PURE__ */ e(Sa, {}),
|
|
1577
1583
|
containerClassName: "w-full sm:w-[280px]",
|
|
1578
1584
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1579
1585
|
}
|
|
1580
1586
|
),
|
|
1581
1587
|
x,
|
|
1582
|
-
h && /* @__PURE__ */ s(
|
|
1583
|
-
/* @__PURE__ */ e(
|
|
1588
|
+
h && /* @__PURE__ */ s(Me, { children: [
|
|
1589
|
+
/* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1584
1590
|
M,
|
|
1585
1591
|
{
|
|
1586
1592
|
variant: "secondary",
|
|
1587
1593
|
size: "md",
|
|
1588
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1589
|
-
trailingIcon: /* @__PURE__ */ e(
|
|
1594
|
+
leadingIcon: /* @__PURE__ */ e(za, {}),
|
|
1595
|
+
trailingIcon: /* @__PURE__ */ e(Et, {}),
|
|
1590
1596
|
children: "Columns"
|
|
1591
1597
|
}
|
|
1592
1598
|
) }),
|
|
1593
|
-
/* @__PURE__ */ s(
|
|
1594
|
-
/* @__PURE__ */ e(
|
|
1599
|
+
/* @__PURE__ */ s(pe, { align: "end", className: "w-54", children: [
|
|
1600
|
+
/* @__PURE__ */ e(fe, { className: "text-[13px]", children: "Active columns" }),
|
|
1595
1601
|
G.map((r) => {
|
|
1596
|
-
const d =
|
|
1602
|
+
const d = Qe(r);
|
|
1597
1603
|
return /* @__PURE__ */ s(
|
|
1598
1604
|
ee,
|
|
1599
1605
|
{
|
|
@@ -1604,27 +1610,27 @@ function Xr({
|
|
|
1604
1610
|
p.preventDefault();
|
|
1605
1611
|
return;
|
|
1606
1612
|
}
|
|
1607
|
-
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id),
|
|
1613
|
+
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), Oe(r.id);
|
|
1608
1614
|
},
|
|
1609
1615
|
onDragOver: (p) => {
|
|
1610
|
-
|
|
1616
|
+
Ne && (p.preventDefault(), ra(Ne, r.id));
|
|
1611
1617
|
},
|
|
1612
1618
|
onDrop: (p) => p.preventDefault(),
|
|
1613
|
-
onDragEnd: () =>
|
|
1619
|
+
onDragEnd: () => Oe(null),
|
|
1614
1620
|
onCheckedChange: (p) => {
|
|
1615
|
-
!p && !d &&
|
|
1621
|
+
!p && !d && He((N) => ({ ...N, [r.id]: !0 }));
|
|
1616
1622
|
},
|
|
1617
1623
|
onSelect: (p) => p.preventDefault(),
|
|
1618
1624
|
className: "justify-between",
|
|
1619
1625
|
children: [
|
|
1620
1626
|
/* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
|
|
1621
|
-
d ? /* @__PURE__ */ e(
|
|
1622
|
-
|
|
1627
|
+
d ? /* @__PURE__ */ e(ka, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1628
|
+
Da,
|
|
1623
1629
|
{
|
|
1624
1630
|
"aria-hidden": !0,
|
|
1625
1631
|
className: i(
|
|
1626
1632
|
"size-3.5 shrink-0",
|
|
1627
|
-
|
|
1633
|
+
Ne === r.id ? "text-primary" : "text-subtle"
|
|
1628
1634
|
)
|
|
1629
1635
|
}
|
|
1630
1636
|
)
|
|
@@ -1633,14 +1639,14 @@ function Xr({
|
|
|
1633
1639
|
r.id
|
|
1634
1640
|
);
|
|
1635
1641
|
}),
|
|
1636
|
-
|
|
1637
|
-
/* @__PURE__ */ e(
|
|
1638
|
-
/* @__PURE__ */ e(
|
|
1639
|
-
|
|
1642
|
+
Ke.length > 0 ? /* @__PURE__ */ s(je, { children: [
|
|
1643
|
+
/* @__PURE__ */ e(Re, {}),
|
|
1644
|
+
/* @__PURE__ */ e(fe, { className: "text-[13px]", children: "Available columns" }),
|
|
1645
|
+
Ke.map((r) => /* @__PURE__ */ e(
|
|
1640
1646
|
ee,
|
|
1641
1647
|
{
|
|
1642
1648
|
checked: !1,
|
|
1643
|
-
onCheckedChange: () =>
|
|
1649
|
+
onCheckedChange: () => na(r.id),
|
|
1644
1650
|
onSelect: (d) => d.preventDefault(),
|
|
1645
1651
|
children: r.header
|
|
1646
1652
|
},
|
|
@@ -1649,21 +1655,21 @@ function Xr({
|
|
|
1649
1655
|
] }) : null
|
|
1650
1656
|
] })
|
|
1651
1657
|
] }),
|
|
1652
|
-
c && c.length > 0 ? /* @__PURE__ */ s(
|
|
1653
|
-
/* @__PURE__ */ e(
|
|
1658
|
+
c && c.length > 0 ? /* @__PURE__ */ s(Me, { children: [
|
|
1659
|
+
/* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1654
1660
|
M,
|
|
1655
1661
|
{
|
|
1656
1662
|
variant: "secondary",
|
|
1657
1663
|
size: "md",
|
|
1658
1664
|
iconOnly: !0,
|
|
1659
1665
|
"aria-label": "Add filter",
|
|
1660
|
-
children: /* @__PURE__ */ e(
|
|
1666
|
+
children: /* @__PURE__ */ e(dt, {})
|
|
1661
1667
|
}
|
|
1662
1668
|
) }),
|
|
1663
|
-
/* @__PURE__ */ e(
|
|
1664
|
-
|
|
1669
|
+
/* @__PURE__ */ e(pe, { align: "start", className: "w-54", children: c.map((r) => /* @__PURE__ */ e(
|
|
1670
|
+
he,
|
|
1665
1671
|
{
|
|
1666
|
-
onSelect: () =>
|
|
1672
|
+
onSelect: () => we(
|
|
1667
1673
|
(d) => d.includes(r.id) ? d : [...d, r.id]
|
|
1668
1674
|
),
|
|
1669
1675
|
children: r.label
|
|
@@ -1673,10 +1679,10 @@ function Xr({
|
|
|
1673
1679
|
] }) : null,
|
|
1674
1680
|
b ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: b }) : null
|
|
1675
1681
|
] }),
|
|
1676
|
-
|
|
1677
|
-
|
|
1682
|
+
Ce.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1683
|
+
Ce.map((r) => {
|
|
1678
1684
|
const d = () => {
|
|
1679
|
-
r.onChange([]),
|
|
1685
|
+
r.onChange([]), we((p) => p.filter((N) => N !== r.id));
|
|
1680
1686
|
};
|
|
1681
1687
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1682
1688
|
/* @__PURE__ */ e(
|
|
@@ -1688,19 +1694,19 @@ function Xr({
|
|
|
1688
1694
|
"aria-label": `Remove ${r.label} filter`,
|
|
1689
1695
|
className: "rounded-r-none",
|
|
1690
1696
|
onClick: d,
|
|
1691
|
-
children: /* @__PURE__ */ e(
|
|
1697
|
+
children: /* @__PURE__ */ e(be, {})
|
|
1692
1698
|
}
|
|
1693
1699
|
),
|
|
1694
|
-
/* @__PURE__ */ s(
|
|
1695
|
-
/* @__PURE__ */ e(
|
|
1696
|
-
/* @__PURE__ */ e(
|
|
1700
|
+
/* @__PURE__ */ s(Me, { children: [
|
|
1701
|
+
/* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ s(M, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1702
|
+
/* @__PURE__ */ e(dt, {}),
|
|
1697
1703
|
/* @__PURE__ */ e("span", { className: "font-medium", children: r.label }),
|
|
1698
1704
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1699
1705
|
/* @__PURE__ */ e("span", { className: "text-muted", children: r.value.length > 0 ? `${r.value.length} selected` : "Enter value" }),
|
|
1700
1706
|
/* @__PURE__ */ e(Y, { className: "text-muted" })
|
|
1701
1707
|
] }) }),
|
|
1702
|
-
/* @__PURE__ */ s(
|
|
1703
|
-
/* @__PURE__ */ s(
|
|
1708
|
+
/* @__PURE__ */ s(pe, { align: "start", className: "w-56", children: [
|
|
1709
|
+
/* @__PURE__ */ s(fe, { className: "text-[13px]", children: [
|
|
1704
1710
|
"Filter by ",
|
|
1705
1711
|
r.label
|
|
1706
1712
|
] }),
|
|
@@ -1719,8 +1725,8 @@ function Xr({
|
|
|
1719
1725
|
p.value
|
|
1720
1726
|
);
|
|
1721
1727
|
}),
|
|
1722
|
-
/* @__PURE__ */ e(
|
|
1723
|
-
/* @__PURE__ */ e(
|
|
1728
|
+
/* @__PURE__ */ e(Re, {}),
|
|
1729
|
+
/* @__PURE__ */ e(he, { onSelect: d, children: "Clear filter" })
|
|
1724
1730
|
] })
|
|
1725
1731
|
] })
|
|
1726
1732
|
] }, r.id);
|
|
@@ -1730,8 +1736,8 @@ function Xr({
|
|
|
1730
1736
|
{
|
|
1731
1737
|
type: "button",
|
|
1732
1738
|
onClick: () => {
|
|
1733
|
-
for (const r of
|
|
1734
|
-
|
|
1739
|
+
for (const r of Ce) r.onChange([]);
|
|
1740
|
+
we([]);
|
|
1735
1741
|
},
|
|
1736
1742
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1737
1743
|
children: "Clear filters"
|
|
@@ -1750,7 +1756,7 @@ function Xr({
|
|
|
1750
1756
|
size: "md",
|
|
1751
1757
|
variant: r.variant ?? "outline",
|
|
1752
1758
|
disabled: r.disabled,
|
|
1753
|
-
onClick: () => void r.onRun(
|
|
1759
|
+
onClick: () => void r.onRun(da),
|
|
1754
1760
|
children: [
|
|
1755
1761
|
r.icon,
|
|
1756
1762
|
r.label
|
|
@@ -1762,26 +1768,26 @@ function Xr({
|
|
|
1762
1768
|
"button",
|
|
1763
1769
|
{
|
|
1764
1770
|
type: "button",
|
|
1765
|
-
onClick: () =>
|
|
1771
|
+
onClick: () => ye(/* @__PURE__ */ new Set()),
|
|
1766
1772
|
className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
|
|
1767
1773
|
children: [
|
|
1768
|
-
/* @__PURE__ */ e(
|
|
1774
|
+
/* @__PURE__ */ e(be, { className: "size-3.5" }),
|
|
1769
1775
|
"Clear"
|
|
1770
1776
|
]
|
|
1771
1777
|
}
|
|
1772
1778
|
)
|
|
1773
1779
|
] }),
|
|
1774
1780
|
/* @__PURE__ */ e(
|
|
1775
|
-
|
|
1781
|
+
xe,
|
|
1776
1782
|
{
|
|
1777
1783
|
scrollMode: "panel",
|
|
1778
|
-
headerContentRef:
|
|
1779
|
-
action:
|
|
1780
|
-
tone:
|
|
1781
|
-
title:
|
|
1782
|
-
description:
|
|
1783
|
-
headerClassName:
|
|
1784
|
-
panelClassName:
|
|
1784
|
+
headerContentRef: tt,
|
|
1785
|
+
action: Vt,
|
|
1786
|
+
tone: qt,
|
|
1787
|
+
title: Gt,
|
|
1788
|
+
description: Ht,
|
|
1789
|
+
headerClassName: Wt,
|
|
1790
|
+
panelClassName: Ot,
|
|
1785
1791
|
header: (
|
|
1786
1792
|
// Visible header band. Presentational (aria-sort lives on the body's
|
|
1787
1793
|
// sr-only thead); widths are pinned to the measured body columns and
|
|
@@ -1789,7 +1795,7 @@ function Xr({
|
|
|
1789
1795
|
/* @__PURE__ */ s(
|
|
1790
1796
|
"table",
|
|
1791
1797
|
{
|
|
1792
|
-
ref:
|
|
1798
|
+
ref: et,
|
|
1793
1799
|
role: "presentation",
|
|
1794
1800
|
className: "w-full table-fixed border-collapse",
|
|
1795
1801
|
style: {
|
|
@@ -1802,18 +1808,18 @@ function Xr({
|
|
|
1802
1808
|
/* @__PURE__ */ e("colgroup", { children: V.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1803
1809
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1804
1810
|
S && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
|
|
1805
|
-
|
|
1811
|
+
Pe,
|
|
1806
1812
|
{
|
|
1807
1813
|
"aria-label": "Select all rows",
|
|
1808
|
-
checked:
|
|
1809
|
-
onCheckedChange:
|
|
1814
|
+
checked: Ye ? !0 : sa ? "indeterminate" : !1,
|
|
1815
|
+
onCheckedChange: ca
|
|
1810
1816
|
}
|
|
1811
1817
|
) }),
|
|
1812
|
-
I && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-
|
|
1818
|
+
I && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-9 px-1.5" }),
|
|
1813
1819
|
G.map((r) => /* @__PURE__ */ e(
|
|
1814
1820
|
"th",
|
|
1815
1821
|
{
|
|
1816
|
-
className: i(
|
|
1822
|
+
className: i(Sr, r.align === "right" && "text-right", r.className),
|
|
1817
1823
|
children: /* @__PURE__ */ e(
|
|
1818
1824
|
"span",
|
|
1819
1825
|
{
|
|
@@ -1826,7 +1832,7 @@ function Xr({
|
|
|
1826
1832
|
variant: "ghost",
|
|
1827
1833
|
size: "xs",
|
|
1828
1834
|
"aria-label": `Sort by ${r.header}`,
|
|
1829
|
-
onClick: () =>
|
|
1835
|
+
onClick: () => oa(r),
|
|
1830
1836
|
className: i(
|
|
1831
1837
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1832
1838
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
@@ -1835,7 +1841,7 @@ function Xr({
|
|
|
1835
1841
|
),
|
|
1836
1842
|
children: [
|
|
1837
1843
|
r.header,
|
|
1838
|
-
(w == null ? void 0 : w.id) === r.id ? w.dir === "asc" ? /* @__PURE__ */ e(
|
|
1844
|
+
(w == null ? void 0 : w.id) === r.id ? w.dir === "asc" ? /* @__PURE__ */ e(Ma, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Y, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Pa, { className: "size-3.5 opacity-50" })
|
|
1839
1845
|
]
|
|
1840
1846
|
}
|
|
1841
1847
|
) : r.header
|
|
@@ -1850,15 +1856,15 @@ function Xr({
|
|
|
1850
1856
|
}
|
|
1851
1857
|
)
|
|
1852
1858
|
),
|
|
1853
|
-
children: /* @__PURE__ */ e("div", { ref:
|
|
1854
|
-
/* @__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(
|
|
1859
|
+
children: /* @__PURE__ */ e("div", { ref: at, className: "overflow-x-auto", onScroll: ze, 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)) }) : o ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1860
|
+
/* @__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(Ta, { weight: "duotone" }) }),
|
|
1855
1861
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1856
1862
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: o.title }),
|
|
1857
1863
|
o.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: o.description }) : null
|
|
1858
1864
|
] }),
|
|
1859
1865
|
o.action
|
|
1860
|
-
] }) :
|
|
1861
|
-
|
|
1866
|
+
] }) : $.length === 0 ? /* @__PURE__ */ e(
|
|
1867
|
+
Cr,
|
|
1862
1868
|
{
|
|
1863
1869
|
icon: m == null ? void 0 : m.icon,
|
|
1864
1870
|
title: (m == null ? void 0 : m.title) ?? "No results",
|
|
@@ -1868,7 +1874,7 @@ function Xr({
|
|
|
1868
1874
|
) : /* @__PURE__ */ s(
|
|
1869
1875
|
"table",
|
|
1870
1876
|
{
|
|
1871
|
-
ref:
|
|
1877
|
+
ref: Ze,
|
|
1872
1878
|
className: i(
|
|
1873
1879
|
"border-collapse text-left",
|
|
1874
1880
|
// Unmeasured: content-sized so intrinsic column widths can be
|
|
@@ -1884,28 +1890,28 @@ function Xr({
|
|
|
1884
1890
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1885
1891
|
S && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1886
1892
|
I && /* @__PURE__ */ e("th", { scope: "col", children: "Details" }),
|
|
1887
|
-
G.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort":
|
|
1893
|
+
G.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": pa(r), children: r.header }, r.id)),
|
|
1888
1894
|
j && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1889
1895
|
] }) }),
|
|
1890
|
-
/* @__PURE__ */ e(
|
|
1891
|
-
const d = n(r), p = q.has(d), N =
|
|
1892
|
-
return /* @__PURE__ */ s(
|
|
1896
|
+
/* @__PURE__ */ e(Ja, { children: $.map((r) => {
|
|
1897
|
+
const d = n(r), p = q.has(d), N = Yt.has(d), z = G.length + (S ? 1 : 0) + (I ? 1 : 0) + (j ? 1 : 0);
|
|
1898
|
+
return /* @__PURE__ */ s(ja, { children: [
|
|
1893
1899
|
/* @__PURE__ */ s(
|
|
1894
|
-
|
|
1900
|
+
ut,
|
|
1895
1901
|
{
|
|
1896
1902
|
"data-state": p ? "selected" : void 0,
|
|
1897
1903
|
onClick: A ? () => A(r) : void 0,
|
|
1898
1904
|
className: A ? "cursor-pointer" : void 0,
|
|
1899
1905
|
children: [
|
|
1900
1906
|
S && /* @__PURE__ */ e(Q, { className: "w-11", onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1901
|
-
|
|
1907
|
+
Pe,
|
|
1902
1908
|
{
|
|
1903
1909
|
"aria-label": "Select row",
|
|
1904
1910
|
checked: p,
|
|
1905
|
-
onCheckedChange: () =>
|
|
1911
|
+
onCheckedChange: () => ua(d)
|
|
1906
1912
|
}
|
|
1907
1913
|
) }),
|
|
1908
|
-
I && /* @__PURE__ */ e(Q, { className: "w-
|
|
1914
|
+
I && /* @__PURE__ */ e(Q, { className: "w-9 px-1.5", onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1909
1915
|
M,
|
|
1910
1916
|
{
|
|
1911
1917
|
type: "button",
|
|
@@ -1914,7 +1920,7 @@ function Xr({
|
|
|
1914
1920
|
className: "size-7",
|
|
1915
1921
|
"aria-label": N ? "Collapse row" : "Expand row",
|
|
1916
1922
|
"aria-expanded": N,
|
|
1917
|
-
onClick: () =>
|
|
1923
|
+
onClick: () => ea(d),
|
|
1918
1924
|
children: /* @__PURE__ */ e(
|
|
1919
1925
|
Y,
|
|
1920
1926
|
{
|
|
@@ -1949,7 +1955,7 @@ function Xr({
|
|
|
1949
1955
|
]
|
|
1950
1956
|
}
|
|
1951
1957
|
),
|
|
1952
|
-
I && N ? /* @__PURE__ */ e(
|
|
1958
|
+
I && N ? /* @__PURE__ */ e(ut, { className: "hover:bg-inherit", "data-expanded": "", children: /* @__PURE__ */ e(
|
|
1953
1959
|
Q,
|
|
1954
1960
|
{
|
|
1955
1961
|
colSpan: z,
|
|
@@ -1964,7 +1970,7 @@ function Xr({
|
|
|
1964
1970
|
) })
|
|
1965
1971
|
}
|
|
1966
1972
|
),
|
|
1967
|
-
|
|
1973
|
+
ia && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1968
1974
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1969
1975
|
se + 1,
|
|
1970
1976
|
"–",
|
|
@@ -1973,9 +1979,9 @@ function Xr({
|
|
|
1973
1979
|
H.length
|
|
1974
1980
|
] }),
|
|
1975
1981
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1976
|
-
/* @__PURE__ */ s(
|
|
1977
|
-
/* @__PURE__ */ e(
|
|
1978
|
-
/* @__PURE__ */ e(
|
|
1982
|
+
/* @__PURE__ */ s(Bt, { value: String(B), onValueChange: (r) => Qt(Number(r)), children: [
|
|
1983
|
+
/* @__PURE__ */ e(Fe, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(At, {}) }),
|
|
1984
|
+
/* @__PURE__ */ e(qe, { children: $t.map((r) => /* @__PURE__ */ e(ve, { value: String(r), children: r }, r)) })
|
|
1979
1985
|
] }),
|
|
1980
1986
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
1981
1987
|
/* @__PURE__ */ e(
|
|
@@ -1986,7 +1992,7 @@ function Xr({
|
|
|
1986
1992
|
"aria-label": "Previous page",
|
|
1987
1993
|
disabled: X <= 0,
|
|
1988
1994
|
onClick: () => ie((r) => Math.max(0, r - 1)),
|
|
1989
|
-
children: /* @__PURE__ */ e(
|
|
1995
|
+
children: /* @__PURE__ */ e(Ia, {})
|
|
1990
1996
|
}
|
|
1991
1997
|
),
|
|
1992
1998
|
/* @__PURE__ */ e(
|
|
@@ -1997,7 +2003,7 @@ function Xr({
|
|
|
1997
2003
|
"aria-label": "Next page",
|
|
1998
2004
|
disabled: X >= J - 1,
|
|
1999
2005
|
onClick: () => ie((r) => Math.min(J - 1, r + 1)),
|
|
2000
|
-
children: /* @__PURE__ */ e(
|
|
2006
|
+
children: /* @__PURE__ */ e(gt, {})
|
|
2001
2007
|
}
|
|
2002
2008
|
)
|
|
2003
2009
|
] })
|
|
@@ -2005,8 +2011,8 @@ function Xr({
|
|
|
2005
2011
|
] })
|
|
2006
2012
|
] });
|
|
2007
2013
|
}
|
|
2008
|
-
function
|
|
2009
|
-
return /* @__PURE__ */ e(
|
|
2014
|
+
function Qr({ icon: t, title: a, description: n, action: l, className: o }) {
|
|
2015
|
+
return /* @__PURE__ */ e(xe, { className: o, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
2010
2016
|
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,
|
|
2011
2017
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
2012
2018
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
|
|
@@ -2015,7 +2021,7 @@ function Jr({ icon: t, title: a, description: n, action: l, className: o }) {
|
|
|
2015
2021
|
l
|
|
2016
2022
|
] }) });
|
|
2017
2023
|
}
|
|
2018
|
-
const
|
|
2024
|
+
const kr = f(
|
|
2019
2025
|
({
|
|
2020
2026
|
className: t,
|
|
2021
2027
|
inputClassName: a,
|
|
@@ -2031,7 +2037,7 @@ const Sr = f(
|
|
|
2031
2037
|
...y
|
|
2032
2038
|
}, k) => /* @__PURE__ */ s("div", { className: i("flex w-full items-stretch", t), children: [
|
|
2033
2039
|
/* @__PURE__ */ e(
|
|
2034
|
-
|
|
2040
|
+
Be,
|
|
2035
2041
|
{
|
|
2036
2042
|
...y,
|
|
2037
2043
|
ref: k,
|
|
@@ -2045,14 +2051,14 @@ const Sr = f(
|
|
|
2045
2051
|
}
|
|
2046
2052
|
),
|
|
2047
2053
|
/* @__PURE__ */ s(
|
|
2048
|
-
|
|
2054
|
+
Bt,
|
|
2049
2055
|
{
|
|
2050
2056
|
value: l,
|
|
2051
2057
|
onValueChange: o,
|
|
2052
2058
|
disabled: h,
|
|
2053
2059
|
children: [
|
|
2054
2060
|
/* @__PURE__ */ e(
|
|
2055
|
-
|
|
2061
|
+
Fe,
|
|
2056
2062
|
{
|
|
2057
2063
|
"aria-label": u,
|
|
2058
2064
|
variant: "ghost",
|
|
@@ -2060,17 +2066,17 @@ const Sr = f(
|
|
|
2060
2066
|
"min-w-28 shrink-0 rounded-l-none border border-(--input-border) border-l-0 px-3 text-[13px] font-normal",
|
|
2061
2067
|
n
|
|
2062
2068
|
),
|
|
2063
|
-
children: /* @__PURE__ */ e(
|
|
2069
|
+
children: /* @__PURE__ */ e(At, { placeholder: c })
|
|
2064
2070
|
}
|
|
2065
2071
|
),
|
|
2066
|
-
/* @__PURE__ */ e(
|
|
2072
|
+
/* @__PURE__ */ e(qe, { children: m.map((v) => /* @__PURE__ */ e(ve, { value: v.value, children: v.label }, v.value)) })
|
|
2067
2073
|
]
|
|
2068
2074
|
}
|
|
2069
2075
|
)
|
|
2070
2076
|
] })
|
|
2071
2077
|
);
|
|
2072
|
-
|
|
2073
|
-
function
|
|
2078
|
+
kr.displayName = "InputSelect";
|
|
2079
|
+
function Yr({ className: t, ...a }) {
|
|
2074
2080
|
return /* @__PURE__ */ e(
|
|
2075
2081
|
"kbd",
|
|
2076
2082
|
{
|
|
@@ -2082,8 +2088,8 @@ function Kr({ className: t, ...a }) {
|
|
|
2082
2088
|
}
|
|
2083
2089
|
);
|
|
2084
2090
|
}
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2091
|
+
const Dr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2092
|
+
Aa.Root,
|
|
2087
2093
|
{
|
|
2088
2094
|
ref: n,
|
|
2089
2095
|
className: i(
|
|
@@ -2093,8 +2099,8 @@ const zr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
2093
2099
|
...a
|
|
2094
2100
|
}
|
|
2095
2101
|
));
|
|
2096
|
-
|
|
2097
|
-
function
|
|
2102
|
+
Dr.displayName = "Label";
|
|
2103
|
+
function Zr({
|
|
2098
2104
|
value: t,
|
|
2099
2105
|
onValueChange: a,
|
|
2100
2106
|
options: n,
|
|
@@ -2102,7 +2108,7 @@ function Qr({
|
|
|
2102
2108
|
className: o,
|
|
2103
2109
|
...m
|
|
2104
2110
|
}) {
|
|
2105
|
-
const u =
|
|
2111
|
+
const u = ge();
|
|
2106
2112
|
return /* @__PURE__ */ e(
|
|
2107
2113
|
"div",
|
|
2108
2114
|
{
|
|
@@ -2146,8 +2152,8 @@ function Qr({
|
|
|
2146
2152
|
}
|
|
2147
2153
|
);
|
|
2148
2154
|
}
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2155
|
+
const Tr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, o) => /* @__PURE__ */ e(
|
|
2156
|
+
Ba.Root,
|
|
2151
2157
|
{
|
|
2152
2158
|
ref: o,
|
|
2153
2159
|
decorative: n,
|
|
@@ -2160,8 +2166,8 @@ const kr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0,
|
|
|
2160
2166
|
...l
|
|
2161
2167
|
}
|
|
2162
2168
|
));
|
|
2163
|
-
|
|
2164
|
-
function
|
|
2169
|
+
Tr.displayName = "Separator";
|
|
2170
|
+
function en({ className: t, ...a }) {
|
|
2165
2171
|
return /* @__PURE__ */ e(
|
|
2166
2172
|
"div",
|
|
2167
2173
|
{
|
|
@@ -2170,7 +2176,7 @@ function Yr({ className: t, ...a }) {
|
|
|
2170
2176
|
}
|
|
2171
2177
|
);
|
|
2172
2178
|
}
|
|
2173
|
-
const
|
|
2179
|
+
const tn = te.Provider, an = te.Root, rn = te.Trigger, Mr = f(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(te.Portal, { children: /* @__PURE__ */ e(
|
|
2174
2180
|
te.Content,
|
|
2175
2181
|
{
|
|
2176
2182
|
ref: l,
|
|
@@ -2188,83 +2194,83 @@ const Zr = te.Provider, en = te.Root, tn = te.Trigger, Dr = f(({ className: t, s
|
|
|
2188
2194
|
...n
|
|
2189
2195
|
}
|
|
2190
2196
|
) }));
|
|
2191
|
-
|
|
2197
|
+
Mr.displayName = "TooltipContent";
|
|
2192
2198
|
export {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2199
|
+
Ar as AgentPrompt,
|
|
2200
|
+
yt as Avatar,
|
|
2201
|
+
Ct as AvatarFallback,
|
|
2202
|
+
wt as AvatarImage,
|
|
2203
|
+
Wa as Badge,
|
|
2198
2204
|
M as Button,
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2205
|
+
Br as Callout,
|
|
2206
|
+
er as Card,
|
|
2207
|
+
rr as CardContent,
|
|
2208
|
+
ar as CardDescription,
|
|
2209
|
+
nr as CardFooter,
|
|
2210
|
+
St as CardHeader,
|
|
2211
|
+
tr as CardTitle,
|
|
2212
|
+
Pe as Checkbox,
|
|
2213
|
+
Hr as ChoiceDialog,
|
|
2214
|
+
Vr as CodeBlock,
|
|
2215
|
+
Kr as DataTable,
|
|
2216
|
+
Jr as DataTableIdentity,
|
|
2217
|
+
dr as Dialog,
|
|
2218
|
+
mr as DialogBody,
|
|
2219
|
+
Mt as DialogCancel,
|
|
2220
|
+
Gr as DialogClose,
|
|
2221
|
+
It as DialogContent,
|
|
2222
|
+
br as DialogDescription,
|
|
2223
|
+
fr as DialogFooter,
|
|
2224
|
+
pr as DialogHeader,
|
|
2225
|
+
ur as DialogPanel,
|
|
2226
|
+
Rt as DialogTitle,
|
|
2227
|
+
Tt as DialogTrigger,
|
|
2228
|
+
Me as DropdownMenu,
|
|
2223
2229
|
ee as DropdownMenuCheckboxItem,
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2230
|
+
Et as DropdownMenuChevron,
|
|
2231
|
+
pe as DropdownMenuContent,
|
|
2232
|
+
Wr as DropdownMenuGroup,
|
|
2233
|
+
he as DropdownMenuItem,
|
|
2234
|
+
fe as DropdownMenuLabel,
|
|
2235
|
+
Or as DropdownMenuPortal,
|
|
2236
|
+
Re as DropdownMenuSeparator,
|
|
2237
|
+
Ur as DropdownMenuSub,
|
|
2238
|
+
yr as DropdownMenuSubContent,
|
|
2239
|
+
Lt as DropdownMenuSubTrigger,
|
|
2240
|
+
me as DropdownMenuTrigger,
|
|
2241
|
+
Qr as EmptyState,
|
|
2242
|
+
Be as Input,
|
|
2243
|
+
kr as InputSelect,
|
|
2244
|
+
Yr as Kbd,
|
|
2245
|
+
Dr as Label,
|
|
2246
|
+
gr as RadioCard,
|
|
2247
|
+
hr as RadioGroup,
|
|
2248
|
+
Zr as Segmented,
|
|
2249
|
+
Bt as Select,
|
|
2250
|
+
qe as SelectContent,
|
|
2251
|
+
Xr as SelectGroup,
|
|
2252
|
+
ve as SelectItem,
|
|
2253
|
+
wr as SelectLabel,
|
|
2254
|
+
Fe as SelectTrigger,
|
|
2255
|
+
At as SelectValue,
|
|
2256
|
+
Tr as Separator,
|
|
2257
|
+
en as Skeleton,
|
|
2258
|
+
Fa as Spinner,
|
|
2259
|
+
$r as Table,
|
|
2260
|
+
Ja as TableBody,
|
|
2255
2261
|
Q as TableCell,
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2262
|
+
Ua as TableContainer,
|
|
2263
|
+
Cr as TableEmptyState,
|
|
2264
|
+
qr as TableHead,
|
|
2265
|
+
Fr as TableHeader,
|
|
2266
|
+
Xa as TablePanel,
|
|
2267
|
+
ut as TableRow,
|
|
2268
|
+
xe as TableSurface,
|
|
2269
|
+
an as Tooltip,
|
|
2270
|
+
Mr as TooltipContent,
|
|
2271
|
+
tn as TooltipProvider,
|
|
2272
|
+
rn as TooltipTrigger,
|
|
2273
|
+
Ha as badgeVariants,
|
|
2274
|
+
qa as buttonVariants
|
|
2269
2275
|
};
|
|
2270
2276
|
//# sourceMappingURL=index.js.map
|