@jinaan/uikit 0.1.39 → 0.1.40
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 +690 -651
- package/dist/index.js.map +1 -1
- package/dist/table-surface.d.ts +11 -2
- package/dist/table-surface.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +110 -41
- package/src/table-surface.tsx +64 -28
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
|
|
4
|
-
import { Slot as
|
|
5
|
-
import { cva as
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
+
import { CircleNotch as ea, Robot as ta, Terminal as aa, Check as Y, Copy as ct, XCircle as ra, Warning as na, CheckCircle as la, Info as ia, Minus as oa, X as ue, CaretDown as me, CaretRight as ut, MagnifyingGlass as sa, Columns as da, Lock as ca, DotsSixVertical as ua, FunnelSimple as rt, WarningCircle as ma, CaretUp as pa, CaretUpDown as fa, CaretLeft as ba } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as b, useState as z, Children as mt, isValidElement as pt, useRef as j, useEffect as J, useContext as G, useCallback as ft, createContext as Z, useId as fe, useMemo as nt, useLayoutEffect as ha } from "react";
|
|
4
|
+
import { Slot as ga } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as Ie } from "class-variance-authority";
|
|
6
|
+
import { clsx as xa } from "clsx";
|
|
7
|
+
import { twMerge as va } from "tailwind-merge";
|
|
8
|
+
import * as Re from "@radix-ui/react-avatar";
|
|
9
|
+
import * as lt from "@radix-ui/react-checkbox";
|
|
10
10
|
import * as I from "@radix-ui/react-dialog";
|
|
11
11
|
import * as D from "@radix-ui/react-dropdown-menu";
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
12
|
+
import * as P from "@radix-ui/react-select";
|
|
13
|
+
import * as ya from "@radix-ui/react-label";
|
|
14
|
+
import * as Na from "@radix-ui/react-separator";
|
|
15
|
+
import * as Q from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return va(xa(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function wa(t, a, n) {
|
|
20
20
|
if (a === n || a < 0 || n < 0 || a >= t.length || n >= t.length)
|
|
21
21
|
return t;
|
|
22
22
|
const l = [...t], [i] = l.splice(a, 1);
|
|
23
23
|
return l.splice(n, 0, i), l;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ca({ className: t }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
27
|
+
ea,
|
|
28
28
|
{
|
|
29
29
|
className: o("size-4 animate-spin text-muted", t),
|
|
30
30
|
weight: "bold",
|
|
@@ -32,7 +32,7 @@ function ha({ className: t }) {
|
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const Sa = Ie(
|
|
36
36
|
"relative inline-flex select-none items-center justify-center gap-[var(--control-gap)] whitespace-nowrap rounded-[var(--control-radius)] border border-transparent font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-[120ms] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong disabled:pointer-events-none disabled:opacity-50",
|
|
37
37
|
{
|
|
38
38
|
variants: {
|
|
@@ -58,14 +58,14 @@ const ga = De(
|
|
|
58
58
|
size: "md"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), ka = {
|
|
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)]",
|
|
65
65
|
lg: "[&_svg]:size-[var(--control-icon-lg)]",
|
|
66
66
|
xl: "[&_svg]:size-[var(--control-icon-xl)]",
|
|
67
67
|
icon: "[&_svg]:size-[var(--control-icon-md)]"
|
|
68
|
-
},
|
|
68
|
+
}, M = b(
|
|
69
69
|
({
|
|
70
70
|
className: t,
|
|
71
71
|
variant: a,
|
|
@@ -75,27 +75,27 @@ const ga = De(
|
|
|
75
75
|
trailingIcon: u,
|
|
76
76
|
iconOnly: m = !1,
|
|
77
77
|
loading: c = !1,
|
|
78
|
-
fullWidth:
|
|
79
|
-
disabled:
|
|
80
|
-
children:
|
|
81
|
-
...
|
|
82
|
-
},
|
|
83
|
-
const
|
|
78
|
+
fullWidth: v = !1,
|
|
79
|
+
disabled: h,
|
|
80
|
+
children: g,
|
|
81
|
+
...C
|
|
82
|
+
}, S) => {
|
|
83
|
+
const w = l ? ga : "button", y = ka[n ?? "md"];
|
|
84
84
|
return /* @__PURE__ */ e(
|
|
85
|
-
|
|
85
|
+
w,
|
|
86
86
|
{
|
|
87
|
-
ref:
|
|
87
|
+
ref: S,
|
|
88
88
|
"aria-busy": c || void 0,
|
|
89
|
-
disabled: l ? void 0 :
|
|
89
|
+
disabled: l ? void 0 : h || c,
|
|
90
90
|
className: o(
|
|
91
|
-
|
|
91
|
+
Sa({ variant: a, size: n }),
|
|
92
92
|
m && "aspect-square px-0",
|
|
93
|
-
|
|
93
|
+
v && "w-full",
|
|
94
94
|
c && "disabled:opacity-100",
|
|
95
95
|
t
|
|
96
96
|
),
|
|
97
|
-
...
|
|
98
|
-
children: l ?
|
|
97
|
+
...C,
|
|
98
|
+
children: l ? g : /* @__PURE__ */ s("span", { className: "relative inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap)", children: [
|
|
99
99
|
/* @__PURE__ */ s(
|
|
100
100
|
"span",
|
|
101
101
|
{
|
|
@@ -105,9 +105,9 @@ const ga = De(
|
|
|
105
105
|
),
|
|
106
106
|
"aria-hidden": c || void 0,
|
|
107
107
|
children: [
|
|
108
|
-
!c && i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0",
|
|
109
|
-
|
|
110
|
-
!c && u ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0",
|
|
108
|
+
!c && i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", y), "aria-hidden": !0, children: i }) : null,
|
|
109
|
+
g,
|
|
110
|
+
!c && u ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", y), "aria-hidden": !0, children: u }) : null
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
),
|
|
@@ -120,7 +120,7 @@ const ga = De(
|
|
|
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(Ca, { className: o("text-current", y) })
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
@@ -128,8 +128,8 @@ const ga = De(
|
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
M.displayName = "Button";
|
|
132
|
+
function wr({
|
|
133
133
|
command: t,
|
|
134
134
|
tag: a = "Build with agents",
|
|
135
135
|
icon: n,
|
|
@@ -143,14 +143,14 @@ function br({
|
|
|
143
143
|
};
|
|
144
144
|
return /* @__PURE__ */ s("div", { className: o("relative inline-flex max-w-full", l), children: [
|
|
145
145
|
/* @__PURE__ */ s("span", { className: "absolute -top-2.5 left-4 z-10 inline-flex items-center gap-1.5 rounded-md bg-fg px-2 py-1 text-[11px] font-medium text-canvas shadow-sm", children: [
|
|
146
|
-
n ?? /* @__PURE__ */ e(
|
|
146
|
+
n ?? /* @__PURE__ */ e(ta, { 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(aa, { 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,
|
|
154
154
|
{
|
|
155
155
|
variant: "ghost",
|
|
156
156
|
size: "sm",
|
|
@@ -158,14 +158,14 @@ function br({
|
|
|
158
158
|
"aria-label": "Copy prompt",
|
|
159
159
|
className: "ml-auto",
|
|
160
160
|
onClick: m,
|
|
161
|
-
children: i ? /* @__PURE__ */ e(
|
|
161
|
+
children: i ? /* @__PURE__ */ e(Y, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ct, {})
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const bt = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
168
|
+
Re.Root,
|
|
169
169
|
{
|
|
170
170
|
ref: n,
|
|
171
171
|
className: o(
|
|
@@ -175,18 +175,18 @@ const st = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
175
175
|
...a
|
|
176
176
|
}
|
|
177
177
|
));
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
178
|
+
bt.displayName = "Avatar";
|
|
179
|
+
const ht = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
180
|
+
Re.Image,
|
|
181
181
|
{
|
|
182
182
|
ref: n,
|
|
183
183
|
className: o("aspect-square size-full object-cover", t),
|
|
184
184
|
...a
|
|
185
185
|
}
|
|
186
186
|
));
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
187
|
+
ht.displayName = "AvatarImage";
|
|
188
|
+
const gt = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
189
|
+
Re.Fallback,
|
|
190
190
|
{
|
|
191
191
|
ref: n,
|
|
192
192
|
className: o(
|
|
@@ -196,8 +196,8 @@ const ct = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
196
196
|
...a
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
|
-
|
|
200
|
-
const
|
|
199
|
+
gt.displayName = "AvatarFallback";
|
|
200
|
+
const za = Ie(
|
|
201
201
|
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
|
|
202
202
|
{
|
|
203
203
|
variants: {
|
|
@@ -213,7 +213,7 @@ const va = De(
|
|
|
213
213
|
},
|
|
214
214
|
defaultVariants: { variant: "neutral" }
|
|
215
215
|
}
|
|
216
|
-
),
|
|
216
|
+
), Da = Ie("size-1.5 shrink-0 rounded-full", {
|
|
217
217
|
variants: {
|
|
218
218
|
variant: {
|
|
219
219
|
neutral: "bg-subtle",
|
|
@@ -227,42 +227,42 @@ const va = De(
|
|
|
227
227
|
},
|
|
228
228
|
defaultVariants: { variant: "neutral" }
|
|
229
229
|
});
|
|
230
|
-
function
|
|
231
|
-
return /* @__PURE__ */ s("span", { className: o(
|
|
232
|
-
n ? /* @__PURE__ */ e("span", { className: o(
|
|
230
|
+
function Ta({ className: t, variant: a, dot: n = !1, children: l, ...i }) {
|
|
231
|
+
return /* @__PURE__ */ s("span", { className: o(za({ variant: a }), t), ...i, children: [
|
|
232
|
+
n ? /* @__PURE__ */ e("span", { className: o(Da({ variant: a })), "aria-hidden": !0 }) : null,
|
|
233
233
|
l
|
|
234
234
|
] });
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Ma = {
|
|
237
237
|
info: {
|
|
238
|
-
Icon:
|
|
238
|
+
Icon: ia,
|
|
239
239
|
className: "border-info/30 bg-info/10",
|
|
240
240
|
iconClassName: "text-info"
|
|
241
241
|
},
|
|
242
242
|
success: {
|
|
243
|
-
Icon:
|
|
243
|
+
Icon: la,
|
|
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: ra,
|
|
254
254
|
className: "border-error/30 bg-error/10",
|
|
255
255
|
iconClassName: "text-error"
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Cr({
|
|
259
259
|
variant: t = "info",
|
|
260
260
|
title: a,
|
|
261
261
|
children: n,
|
|
262
262
|
icon: l,
|
|
263
263
|
className: i
|
|
264
264
|
}) {
|
|
265
|
-
const { Icon: u, className: m, iconClassName: c } =
|
|
265
|
+
const { Icon: u, className: m, iconClassName: c } = Ma[t];
|
|
266
266
|
return /* @__PURE__ */ s(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
@@ -283,7 +283,7 @@ function hr({
|
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Pa({
|
|
287
287
|
className: t,
|
|
288
288
|
...a
|
|
289
289
|
}) {
|
|
@@ -298,7 +298,7 @@ function Ca({
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Ia({
|
|
302
302
|
className: t,
|
|
303
303
|
...a
|
|
304
304
|
}) {
|
|
@@ -313,7 +313,7 @@ function Sa({
|
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Sr({ className: t, ...a }) {
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"table",
|
|
319
319
|
{
|
|
@@ -322,13 +322,13 @@ function gr({ className: t, ...a }) {
|
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function kr({ className: t, ...a }) {
|
|
326
326
|
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ra({ className: t, ...a }) {
|
|
329
329
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function ja({ className: t, ...a }) {
|
|
332
332
|
return /* @__PURE__ */ e(
|
|
333
333
|
"tr",
|
|
334
334
|
{
|
|
@@ -340,7 +340,7 @@ function za({ className: t, ...a }) {
|
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function zr({ className: t, ...a }) {
|
|
344
344
|
return /* @__PURE__ */ e(
|
|
345
345
|
"th",
|
|
346
346
|
{
|
|
@@ -352,7 +352,7 @@ function vr({ className: t, ...a }) {
|
|
|
352
352
|
}
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Se({ className: t, ...a }) {
|
|
356
356
|
return /* @__PURE__ */ e(
|
|
357
357
|
"td",
|
|
358
358
|
{
|
|
@@ -364,19 +364,19 @@ function ye({ className: t, ...a }) {
|
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const Ea = {
|
|
368
368
|
default: "bg-table-container",
|
|
369
369
|
muted: "bg-surface border border-line",
|
|
370
370
|
transparent: "bg-transparent"
|
|
371
|
-
},
|
|
371
|
+
}, _a = {
|
|
372
372
|
default: "bg-table-panel border-table-panel-border",
|
|
373
373
|
muted: "bg-elevated border-line",
|
|
374
374
|
transparent: "bg-transparent border-line"
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function La(t) {
|
|
377
377
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function be({
|
|
380
380
|
title: t,
|
|
381
381
|
description: a,
|
|
382
382
|
header: n,
|
|
@@ -385,11 +385,13 @@ function fe({
|
|
|
385
385
|
tone: u = "default",
|
|
386
386
|
className: m,
|
|
387
387
|
headerClassName: c,
|
|
388
|
-
panelClassName:
|
|
389
|
-
minHeight:
|
|
388
|
+
panelClassName: v,
|
|
389
|
+
minHeight: h,
|
|
390
|
+
scrollMode: g = "surface",
|
|
391
|
+
headerContentRef: C
|
|
390
392
|
}) {
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
+
const S = !!(t || a), w = g === "panel", y = La(i) ? /* @__PURE__ */ e(
|
|
394
|
+
M,
|
|
393
395
|
{
|
|
394
396
|
variant: i.variant ?? "primary",
|
|
395
397
|
size: "xs",
|
|
@@ -402,18 +404,27 @@ function fe({
|
|
|
402
404
|
i.label
|
|
403
405
|
] }) : i.label
|
|
404
406
|
}
|
|
405
|
-
) : i
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
407
|
+
) : i, T = n || S ? (
|
|
408
|
+
// Header rows must not inherit the body row hover surface. Panel mode
|
|
409
|
+
// clips the band instead of scrolling it; the caller translates the
|
|
410
|
+
// inner wrapper so titles track the row content. px-px mirrors the
|
|
411
|
+
// panel's 1px border so band and body share the same width context —
|
|
412
|
+
// identical fixed-layout distribution keeps every column aligned.
|
|
413
|
+
/* @__PURE__ */ s(
|
|
414
|
+
"div",
|
|
415
|
+
{
|
|
416
|
+
className: o(
|
|
417
|
+
"[--table-row-hover:transparent] text-table-header",
|
|
418
|
+
w && "overflow-hidden px-px",
|
|
419
|
+
c
|
|
420
|
+
),
|
|
421
|
+
children: [
|
|
422
|
+
S ? /* @__PURE__ */ s(
|
|
412
423
|
"div",
|
|
413
424
|
{
|
|
414
425
|
className: o(
|
|
415
426
|
"px-(--table-pad-x) pb-3 pt-4",
|
|
416
|
-
|
|
427
|
+
y && "pr-28"
|
|
417
428
|
),
|
|
418
429
|
children: [
|
|
419
430
|
t ? /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-fg", children: t }) : null,
|
|
@@ -421,38 +432,46 @@ function fe({
|
|
|
421
432
|
]
|
|
422
433
|
}
|
|
423
434
|
) : null,
|
|
424
|
-
n
|
|
425
|
-
]
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
w ? /* @__PURE__ */ e("div", { ref: C, children: n }) : n
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
) : null, f = /* @__PURE__ */ e(
|
|
440
|
+
Ia,
|
|
441
|
+
{
|
|
442
|
+
className: o(_a[u], v),
|
|
443
|
+
style: h ? { minHeight: h } : void 0,
|
|
444
|
+
children: l
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
return /* @__PURE__ */ s(Pa, { className: o("relative", Ea[u], m), children: [
|
|
448
|
+
w ? /* @__PURE__ */ s(Pe, { children: [
|
|
449
|
+
T,
|
|
450
|
+
f
|
|
451
|
+
] }) : /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
452
|
+
T,
|
|
453
|
+
f
|
|
435
454
|
] }),
|
|
436
|
-
|
|
455
|
+
y ? /* @__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: y }) }) : null
|
|
437
456
|
] });
|
|
438
457
|
}
|
|
439
|
-
function
|
|
440
|
-
const a =
|
|
441
|
-
(l) =>
|
|
458
|
+
function Aa(t) {
|
|
459
|
+
const a = mt.toArray(t), n = a.filter(
|
|
460
|
+
(l) => pt(l) && l.type === xt
|
|
442
461
|
);
|
|
443
462
|
return {
|
|
444
|
-
header: n.length > 0 ? /* @__PURE__ */ e(
|
|
463
|
+
header: n.length > 0 ? /* @__PURE__ */ e(Pe, { children: n }) : void 0,
|
|
445
464
|
body: a.filter((l) => !n.includes(l))
|
|
446
465
|
};
|
|
447
466
|
}
|
|
448
|
-
const
|
|
467
|
+
const Ba = b(
|
|
449
468
|
({ className: t, children: a, ...n }, l) => {
|
|
450
|
-
const { header: i, body: u } =
|
|
451
|
-
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(
|
|
469
|
+
const { header: i, body: u } = Aa(a);
|
|
470
|
+
return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(be, { className: o("shadow-xs", t), header: i, children: u }) });
|
|
452
471
|
}
|
|
453
472
|
);
|
|
454
|
-
|
|
455
|
-
const
|
|
473
|
+
Ba.displayName = "Card";
|
|
474
|
+
const xt = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
456
475
|
"div",
|
|
457
476
|
{
|
|
458
477
|
ref: n,
|
|
@@ -463,8 +482,8 @@ const ut = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
463
482
|
...a
|
|
464
483
|
}
|
|
465
484
|
));
|
|
466
|
-
|
|
467
|
-
const
|
|
485
|
+
xt.displayName = "CardHeader";
|
|
486
|
+
const Fa = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
468
487
|
"h2",
|
|
469
488
|
{
|
|
470
489
|
ref: n,
|
|
@@ -472,8 +491,8 @@ const ja = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
472
491
|
...a
|
|
473
492
|
}
|
|
474
493
|
));
|
|
475
|
-
|
|
476
|
-
const
|
|
494
|
+
Fa.displayName = "CardTitle";
|
|
495
|
+
const $a = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
477
496
|
"p",
|
|
478
497
|
{
|
|
479
498
|
ref: n,
|
|
@@ -485,10 +504,10 @@ const Ea = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
485
504
|
...a
|
|
486
505
|
}
|
|
487
506
|
));
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
const
|
|
507
|
+
$a.displayName = "CardDescription";
|
|
508
|
+
const qa = b(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...a }));
|
|
509
|
+
qa.displayName = "CardContent";
|
|
510
|
+
const Ga = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
492
511
|
"div",
|
|
493
512
|
{
|
|
494
513
|
ref: n,
|
|
@@ -499,9 +518,9 @@ const La = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
499
518
|
...a
|
|
500
519
|
}
|
|
501
520
|
));
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
521
|
+
Ga.displayName = "CardFooter";
|
|
522
|
+
const De = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
523
|
+
lt.Root,
|
|
505
524
|
{
|
|
506
525
|
ref: n,
|
|
507
526
|
className: o(
|
|
@@ -513,27 +532,27 @@ const Se = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
513
532
|
t
|
|
514
533
|
),
|
|
515
534
|
...a,
|
|
516
|
-
children: /* @__PURE__ */ e(
|
|
535
|
+
children: /* @__PURE__ */ e(lt.Indicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: a.checked === "indeterminate" ? /* @__PURE__ */ e(oa, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(Y, { className: "size-3", weight: "bold" }) })
|
|
517
536
|
}
|
|
518
537
|
));
|
|
519
|
-
|
|
520
|
-
function
|
|
538
|
+
De.displayName = "Checkbox";
|
|
539
|
+
function it(t) {
|
|
521
540
|
return t.width > 0 && t.height > 0;
|
|
522
541
|
}
|
|
523
|
-
function
|
|
542
|
+
function ot(t) {
|
|
524
543
|
return Math.min(1, Math.max(0.1, t));
|
|
525
544
|
}
|
|
526
|
-
function
|
|
527
|
-
return !
|
|
545
|
+
function Ha(t, a) {
|
|
546
|
+
return !it(t) || !it(a) ? null : {
|
|
528
547
|
dx: t.left + t.width / 2 - (a.left + a.width / 2),
|
|
529
548
|
dy: t.top + t.height / 2 - (a.top + a.height / 2),
|
|
530
|
-
sx:
|
|
531
|
-
sy:
|
|
549
|
+
sx: ot(t.width / a.width),
|
|
550
|
+
sy: ot(t.height / a.height)
|
|
532
551
|
};
|
|
533
552
|
}
|
|
534
|
-
const
|
|
535
|
-
let
|
|
536
|
-
function
|
|
553
|
+
const vt = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
|
|
554
|
+
let q = null, st = !1;
|
|
555
|
+
function je(t) {
|
|
537
556
|
const a = t.getBoundingClientRect();
|
|
538
557
|
return a.width <= 0 || a.height <= 0 ? null : {
|
|
539
558
|
left: a.left,
|
|
@@ -542,38 +561,38 @@ function Me(t) {
|
|
|
542
561
|
height: a.height
|
|
543
562
|
};
|
|
544
563
|
}
|
|
545
|
-
function
|
|
564
|
+
function Te(t) {
|
|
546
565
|
if (!(t instanceof Element)) return;
|
|
547
|
-
const a = t.closest(
|
|
566
|
+
const a = t.closest(vt);
|
|
548
567
|
if (!a) return;
|
|
549
|
-
const n =
|
|
550
|
-
n && (
|
|
568
|
+
const n = je(a);
|
|
569
|
+
n && (q = { rect: n, at: Date.now() });
|
|
551
570
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
571
|
+
function Va() {
|
|
572
|
+
st || typeof document > "u" || (st = !0, document.addEventListener(
|
|
554
573
|
"pointerdown",
|
|
555
|
-
(t) =>
|
|
574
|
+
(t) => Te(t.target),
|
|
556
575
|
!0
|
|
557
576
|
), document.addEventListener(
|
|
558
577
|
"keydown",
|
|
559
578
|
(t) => {
|
|
560
|
-
t.key !== "Enter" && t.key !== " " ||
|
|
579
|
+
t.key !== "Enter" && t.key !== " " || Te(document.activeElement);
|
|
561
580
|
},
|
|
562
581
|
!0
|
|
563
582
|
));
|
|
564
583
|
}
|
|
565
|
-
function
|
|
566
|
-
if (
|
|
567
|
-
const n =
|
|
568
|
-
return
|
|
584
|
+
function Wa(t) {
|
|
585
|
+
if (q && Date.now() - q.at < 2e3) {
|
|
586
|
+
const n = q.rect;
|
|
587
|
+
return q = null, n;
|
|
569
588
|
}
|
|
570
|
-
|
|
589
|
+
q = null;
|
|
571
590
|
const a = document.activeElement;
|
|
572
|
-
return a instanceof Element && a !== t && !t.contains(a) && a.matches(
|
|
591
|
+
return a instanceof Element && a !== t && !t.contains(a) && a.matches(vt) ? je(a) : null;
|
|
573
592
|
}
|
|
574
|
-
const
|
|
575
|
-
}),
|
|
576
|
-
function
|
|
593
|
+
const Oa = 250, yt = Z(!1), Nt = Z(() => {
|
|
594
|
+
}), Ee = Z(!1);
|
|
595
|
+
function Ua({
|
|
577
596
|
open: t,
|
|
578
597
|
defaultOpen: a,
|
|
579
598
|
onOpenChange: n,
|
|
@@ -582,68 +601,68 @@ function $a({
|
|
|
582
601
|
}) {
|
|
583
602
|
const [u, m] = z(
|
|
584
603
|
a ?? !1
|
|
585
|
-
), [c,
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
J(() =>
|
|
589
|
-
t && (
|
|
604
|
+
), [c, v] = z(!1), h = j(!1), g = j(null), C = t ?? u, S = j(C);
|
|
605
|
+
S.current = C;
|
|
606
|
+
const w = t !== void 0;
|
|
607
|
+
J(() => Va(), []), J(() => {
|
|
608
|
+
t && (g.current && clearTimeout(g.current), h.current = !1, v(!1));
|
|
590
609
|
}, [t]), J(
|
|
591
610
|
() => () => {
|
|
592
|
-
|
|
611
|
+
g.current && clearTimeout(g.current);
|
|
593
612
|
},
|
|
594
613
|
[]
|
|
595
614
|
);
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
|
|
615
|
+
const y = (T) => {
|
|
616
|
+
if (T) {
|
|
617
|
+
g.current && clearTimeout(g.current), h.current = !1, v(!1), w || m(!0), n == null || n(!0);
|
|
599
618
|
return;
|
|
600
619
|
}
|
|
601
|
-
if (!
|
|
620
|
+
if (!C || h.current) return;
|
|
602
621
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
603
|
-
|
|
622
|
+
w || m(!1), n == null || n(!1);
|
|
604
623
|
return;
|
|
605
624
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
625
|
+
h.current = !0, v(!0), g.current = setTimeout(() => {
|
|
626
|
+
w || m(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
627
|
+
S.current && (h.current = !1, v(!1));
|
|
609
628
|
});
|
|
610
|
-
},
|
|
629
|
+
}, Oa);
|
|
611
630
|
};
|
|
612
|
-
return /* @__PURE__ */ e(
|
|
631
|
+
return /* @__PURE__ */ e(Nt.Provider, { value: () => y(!1), children: /* @__PURE__ */ e(yt.Provider, { value: c, children: /* @__PURE__ */ e(Ee.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
613
632
|
I.Root,
|
|
614
633
|
{
|
|
615
|
-
open:
|
|
616
|
-
onOpenChange:
|
|
634
|
+
open: C,
|
|
635
|
+
onOpenChange: y,
|
|
617
636
|
...i,
|
|
618
637
|
children: l
|
|
619
638
|
}
|
|
620
639
|
) }) }) });
|
|
621
640
|
}
|
|
622
|
-
const
|
|
641
|
+
const wt = b(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
|
|
623
642
|
I.Trigger,
|
|
624
643
|
{
|
|
625
644
|
ref: n,
|
|
626
645
|
onClick: (l) => {
|
|
627
|
-
|
|
646
|
+
Te(l.currentTarget), t == null || t(l);
|
|
628
647
|
},
|
|
629
648
|
...a
|
|
630
649
|
}
|
|
631
650
|
));
|
|
632
|
-
|
|
633
|
-
const
|
|
634
|
-
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(I.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
651
|
+
wt.displayName = "DialogTrigger";
|
|
652
|
+
const Dr = I.Close, Ct = b(
|
|
653
|
+
({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(I.Close, { asChild: !0, children: /* @__PURE__ */ e(M, { ref: l, type: "button", variant: t, ...n, children: a }) })
|
|
635
654
|
);
|
|
636
|
-
|
|
637
|
-
function
|
|
655
|
+
Ct.displayName = "DialogCancel";
|
|
656
|
+
function St(t, a = !0) {
|
|
638
657
|
if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
639
658
|
return;
|
|
640
|
-
const n =
|
|
659
|
+
const n = je(t);
|
|
641
660
|
if (!n) {
|
|
642
|
-
a && window.requestAnimationFrame(() =>
|
|
661
|
+
a && window.requestAnimationFrame(() => St(t, !1));
|
|
643
662
|
return;
|
|
644
663
|
}
|
|
645
664
|
t.dataset.dialogMotionStarted = "true";
|
|
646
|
-
const l =
|
|
665
|
+
const l = Wa(t), i = l ? Ha(l, n) : null;
|
|
647
666
|
i ? (t.style.setProperty("--dialog-dx", `${i.dx}px`), t.style.setProperty("--dialog-dy", `${i.dy}px`), t.style.setProperty("--dialog-sx", String(i.sx)), t.style.setProperty("--dialog-sy", String(i.sy)), t.classList.add("dialog-fly-in")) : (t.style.removeProperty("--dialog-dx"), t.style.removeProperty("--dialog-dy"), t.style.removeProperty("--dialog-sx"), t.style.removeProperty("--dialog-sy"), t.classList.add("dialog-pop-in"));
|
|
648
667
|
const u = () => {
|
|
649
668
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
@@ -652,10 +671,10 @@ function gt(t, a = !0) {
|
|
|
652
671
|
};
|
|
653
672
|
t.addEventListener("animationend", m);
|
|
654
673
|
}
|
|
655
|
-
function
|
|
674
|
+
function Xa(t) {
|
|
656
675
|
return t.replace(/dvh\b/g, "vh");
|
|
657
676
|
}
|
|
658
|
-
const
|
|
677
|
+
const kt = b(
|
|
659
678
|
({
|
|
660
679
|
className: t,
|
|
661
680
|
children: a,
|
|
@@ -665,20 +684,20 @@ const xt = f(
|
|
|
665
684
|
style: u,
|
|
666
685
|
onEscapeKeyDown: m,
|
|
667
686
|
onPointerDownOutside: c,
|
|
668
|
-
...
|
|
669
|
-
},
|
|
670
|
-
const
|
|
687
|
+
...v
|
|
688
|
+
}, h) => {
|
|
689
|
+
const g = G(yt), C = n === "top", S = C ? {
|
|
671
690
|
"--dialog-top-offset": l,
|
|
672
|
-
"--dialog-top-offset-fallback":
|
|
673
|
-
} : void 0,
|
|
674
|
-
(
|
|
675
|
-
if (
|
|
676
|
-
|
|
691
|
+
"--dialog-top-offset-fallback": Xa(l)
|
|
692
|
+
} : void 0, w = G(Nt), y = j(null), T = ft(
|
|
693
|
+
(f) => {
|
|
694
|
+
if (y.current = f, f && i === "auto" && St(f), typeof h == "function") {
|
|
695
|
+
h(f);
|
|
677
696
|
return;
|
|
678
697
|
}
|
|
679
|
-
|
|
698
|
+
h && (h.current = f);
|
|
680
699
|
},
|
|
681
|
-
[i,
|
|
700
|
+
[i, h]
|
|
682
701
|
);
|
|
683
702
|
return /* @__PURE__ */ s(I.Portal, { children: [
|
|
684
703
|
/* @__PURE__ */ e(
|
|
@@ -686,8 +705,8 @@ const xt = f(
|
|
|
686
705
|
{
|
|
687
706
|
className: o(
|
|
688
707
|
"fixed inset-0 z-50 overflow-hidden bg-overlay backdrop-blur-[3px] data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
689
|
-
!
|
|
690
|
-
|
|
708
|
+
!g && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
709
|
+
g && "opacity-0 transition-opacity duration-200"
|
|
691
710
|
),
|
|
692
711
|
children: /* @__PURE__ */ e(
|
|
693
712
|
"span",
|
|
@@ -703,33 +722,33 @@ const xt = f(
|
|
|
703
722
|
{
|
|
704
723
|
className: o(
|
|
705
724
|
"pointer-events-none fixed inset-0 z-50 flex justify-center overflow-y-auto p-4",
|
|
706
|
-
|
|
725
|
+
C ? "items-start" : "items-center"
|
|
707
726
|
),
|
|
708
727
|
children: /* @__PURE__ */ s(
|
|
709
728
|
I.Content,
|
|
710
729
|
{
|
|
711
|
-
ref:
|
|
712
|
-
style:
|
|
730
|
+
ref: T,
|
|
731
|
+
style: S ? { ...S, ...u } : u,
|
|
713
732
|
className: o(
|
|
714
733
|
"dialog-content pointer-events-auto relative flex max-h-[min(85vh,44rem)] w-full max-w-[22.4rem] flex-col gap-0 overflow-hidden will-change-[transform,opacity]",
|
|
715
734
|
"rounded-2xl border border-(--dialog-shell-border) bg-(--dialog-shell-bg) pb-3 shadow-(--dialog-shell-shadow) sm:pb-4",
|
|
716
|
-
|
|
735
|
+
C && "dialog-anchor-top",
|
|
717
736
|
i === "command" && "dialog-command-motion",
|
|
718
|
-
|
|
737
|
+
g && "dialog-closing",
|
|
719
738
|
"focus:outline-none",
|
|
720
739
|
t
|
|
721
740
|
),
|
|
722
|
-
onEscapeKeyDown: (
|
|
723
|
-
m == null || m(
|
|
741
|
+
onEscapeKeyDown: (f) => {
|
|
742
|
+
m == null || m(f), !f.defaultPrevented && (f.preventDefault(), w());
|
|
724
743
|
},
|
|
725
|
-
onPointerDownOutside: (
|
|
726
|
-
c == null || c(
|
|
744
|
+
onPointerDownOutside: (f) => {
|
|
745
|
+
c == null || c(f), !f.defaultPrevented && (f.preventDefault(), w());
|
|
727
746
|
},
|
|
728
|
-
...
|
|
747
|
+
...v,
|
|
729
748
|
children: [
|
|
730
749
|
a,
|
|
731
750
|
/* @__PURE__ */ s(I.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: [
|
|
732
|
-
/* @__PURE__ */ e(
|
|
751
|
+
/* @__PURE__ */ e(ue, { className: "size-4" }),
|
|
733
752
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
734
753
|
] })
|
|
735
754
|
]
|
|
@@ -740,8 +759,8 @@ const xt = f(
|
|
|
740
759
|
] });
|
|
741
760
|
}
|
|
742
761
|
);
|
|
743
|
-
|
|
744
|
-
function
|
|
762
|
+
kt.displayName = "DialogContent";
|
|
763
|
+
function Ja({
|
|
745
764
|
className: t,
|
|
746
765
|
...a
|
|
747
766
|
}) {
|
|
@@ -757,7 +776,7 @@ function Ga({
|
|
|
757
776
|
}
|
|
758
777
|
);
|
|
759
778
|
}
|
|
760
|
-
function
|
|
779
|
+
function Ka({
|
|
761
780
|
className: t,
|
|
762
781
|
...a
|
|
763
782
|
}) {
|
|
@@ -770,7 +789,7 @@ function Ha({
|
|
|
770
789
|
}
|
|
771
790
|
);
|
|
772
791
|
}
|
|
773
|
-
function
|
|
792
|
+
function Qa({
|
|
774
793
|
className: t,
|
|
775
794
|
...a
|
|
776
795
|
}) {
|
|
@@ -786,7 +805,7 @@ function Va({
|
|
|
786
805
|
}
|
|
787
806
|
);
|
|
788
807
|
}
|
|
789
|
-
function
|
|
808
|
+
function Ya({
|
|
790
809
|
className: t,
|
|
791
810
|
...a
|
|
792
811
|
}) {
|
|
@@ -802,8 +821,8 @@ function Wa({
|
|
|
802
821
|
}
|
|
803
822
|
);
|
|
804
823
|
}
|
|
805
|
-
const
|
|
806
|
-
const l =
|
|
824
|
+
const zt = b(({ className: t, ...a }, n) => {
|
|
825
|
+
const l = G(Ee) ? I.Title : "h2";
|
|
807
826
|
return /* @__PURE__ */ e(
|
|
808
827
|
l,
|
|
809
828
|
{
|
|
@@ -813,9 +832,9 @@ const vt = f(({ className: t, ...a }, n) => {
|
|
|
813
832
|
}
|
|
814
833
|
);
|
|
815
834
|
});
|
|
816
|
-
|
|
817
|
-
const
|
|
818
|
-
const l =
|
|
835
|
+
zt.displayName = "DialogTitle";
|
|
836
|
+
const Za = b(({ className: t, ...a }, n) => {
|
|
837
|
+
const l = G(Ee) ? I.Description : "p";
|
|
819
838
|
return /* @__PURE__ */ e(
|
|
820
839
|
l,
|
|
821
840
|
{
|
|
@@ -825,9 +844,9 @@ const Oa = f(({ className: t, ...a }, n) => {
|
|
|
825
844
|
}
|
|
826
845
|
);
|
|
827
846
|
});
|
|
828
|
-
|
|
829
|
-
const
|
|
830
|
-
function
|
|
847
|
+
Za.displayName = "DialogDescription";
|
|
848
|
+
const Dt = Z(null);
|
|
849
|
+
function er({
|
|
831
850
|
label: t,
|
|
832
851
|
value: a,
|
|
833
852
|
onChange: n,
|
|
@@ -837,13 +856,13 @@ function Ua({
|
|
|
837
856
|
children: m,
|
|
838
857
|
...c
|
|
839
858
|
}) {
|
|
840
|
-
const
|
|
841
|
-
return /* @__PURE__ */ e(
|
|
859
|
+
const v = fe(), h = i ?? v;
|
|
860
|
+
return /* @__PURE__ */ e(Dt.Provider, { value: { name: h, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", u), ...c, children: [
|
|
842
861
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
843
862
|
m
|
|
844
863
|
] }) });
|
|
845
864
|
}
|
|
846
|
-
function
|
|
865
|
+
function tr({
|
|
847
866
|
value: t,
|
|
848
867
|
title: a,
|
|
849
868
|
description: n,
|
|
@@ -851,16 +870,16 @@ function Xa({
|
|
|
851
870
|
disabled: i = !1,
|
|
852
871
|
className: u
|
|
853
872
|
}) {
|
|
854
|
-
const m =
|
|
873
|
+
const m = G(Dt), c = fe();
|
|
855
874
|
if (!m)
|
|
856
875
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
857
|
-
const
|
|
876
|
+
const v = i || m.disabled, h = m.value === t;
|
|
858
877
|
return /* @__PURE__ */ s(
|
|
859
878
|
"label",
|
|
860
879
|
{
|
|
861
880
|
className: o(
|
|
862
881
|
"group relative flex items-start gap-3",
|
|
863
|
-
|
|
882
|
+
v ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
864
883
|
u
|
|
865
884
|
),
|
|
866
885
|
children: [
|
|
@@ -870,11 +889,11 @@ function Xa({
|
|
|
870
889
|
type: "radio",
|
|
871
890
|
name: m.name,
|
|
872
891
|
value: t,
|
|
873
|
-
checked:
|
|
874
|
-
disabled:
|
|
892
|
+
checked: h,
|
|
893
|
+
disabled: v,
|
|
875
894
|
onChange: () => {
|
|
876
|
-
var
|
|
877
|
-
return (
|
|
895
|
+
var g;
|
|
896
|
+
return (g = m.onChange) == null ? void 0 : g.call(m, t);
|
|
878
897
|
},
|
|
879
898
|
"aria-describedby": n ? c : void 0,
|
|
880
899
|
className: "peer sr-only"
|
|
@@ -894,7 +913,7 @@ function Xa({
|
|
|
894
913
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
895
914
|
/* @__PURE__ */ s("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
896
915
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: a }),
|
|
897
|
-
l ? /* @__PURE__ */ e(
|
|
916
|
+
l ? /* @__PURE__ */ e(Ta, { variant: "primary", children: l }) : null
|
|
898
917
|
] }),
|
|
899
918
|
n ? /* @__PURE__ */ e("span", { id: c, className: "mt-1 block text-sm text-muted", children: n }) : null
|
|
900
919
|
] })
|
|
@@ -902,7 +921,7 @@ function Xa({
|
|
|
902
921
|
}
|
|
903
922
|
);
|
|
904
923
|
}
|
|
905
|
-
function
|
|
924
|
+
function Tr({
|
|
906
925
|
open: t,
|
|
907
926
|
onOpenChange: a,
|
|
908
927
|
trigger: n,
|
|
@@ -911,54 +930,54 @@ function yr({
|
|
|
911
930
|
defaultValue: u,
|
|
912
931
|
value: m,
|
|
913
932
|
onValueChange: c,
|
|
914
|
-
cancelLabel:
|
|
915
|
-
confirmLabel:
|
|
916
|
-
onConfirm:
|
|
933
|
+
cancelLabel: v = "Cancel",
|
|
934
|
+
confirmLabel: h = "Continue",
|
|
935
|
+
onConfirm: g
|
|
917
936
|
}) {
|
|
918
|
-
var
|
|
919
|
-
const [
|
|
920
|
-
return /* @__PURE__ */ s(
|
|
921
|
-
n ? /* @__PURE__ */ e(
|
|
937
|
+
var T;
|
|
938
|
+
const [C, S] = z(u ?? ((T = i[0]) == null ? void 0 : T.value) ?? ""), w = m ?? C;
|
|
939
|
+
return /* @__PURE__ */ s(Ua, { open: t, onOpenChange: a, children: [
|
|
940
|
+
n ? /* @__PURE__ */ e(wt, { asChild: !0, children: n }) : null,
|
|
922
941
|
/* @__PURE__ */ s(
|
|
923
|
-
|
|
942
|
+
kt,
|
|
924
943
|
{
|
|
925
944
|
"aria-describedby": void 0,
|
|
926
945
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
927
946
|
children: [
|
|
928
|
-
/* @__PURE__ */ s(
|
|
929
|
-
/* @__PURE__ */ e(
|
|
930
|
-
/* @__PURE__ */ e(
|
|
931
|
-
m === void 0 &&
|
|
932
|
-
}, children: i.map((
|
|
933
|
-
|
|
947
|
+
/* @__PURE__ */ s(Ja, { children: [
|
|
948
|
+
/* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ e(zt, { className: "text-xl", children: l }) }),
|
|
949
|
+
/* @__PURE__ */ e(Ka, { children: /* @__PURE__ */ e(er, { label: l, value: w, onChange: (f) => {
|
|
950
|
+
m === void 0 && S(f), c == null || c(f);
|
|
951
|
+
}, children: i.map((f) => /* @__PURE__ */ e(
|
|
952
|
+
tr,
|
|
934
953
|
{
|
|
935
|
-
value:
|
|
936
|
-
title:
|
|
937
|
-
description:
|
|
938
|
-
badge:
|
|
954
|
+
value: f.value,
|
|
955
|
+
title: f.title,
|
|
956
|
+
description: f.description,
|
|
957
|
+
badge: f.badge
|
|
939
958
|
},
|
|
940
|
-
|
|
959
|
+
f.value
|
|
941
960
|
)) }) })
|
|
942
961
|
] }),
|
|
943
|
-
/* @__PURE__ */ s(
|
|
944
|
-
/* @__PURE__ */ e(
|
|
945
|
-
/* @__PURE__ */ e(
|
|
962
|
+
/* @__PURE__ */ s(Ya, { className: "gap-3 pt-2.5", children: [
|
|
963
|
+
/* @__PURE__ */ e(Ct, { className: "flex-1", children: v }),
|
|
964
|
+
/* @__PURE__ */ e(M, { className: "flex-1", onClick: () => g == null ? void 0 : g(w), children: h })
|
|
946
965
|
] })
|
|
947
966
|
]
|
|
948
967
|
}
|
|
949
968
|
)
|
|
950
969
|
] });
|
|
951
970
|
}
|
|
952
|
-
function
|
|
971
|
+
function Mr({ code: t, label: a, className: n }) {
|
|
953
972
|
const [l, i] = z(!1);
|
|
954
973
|
return /* @__PURE__ */ e(
|
|
955
|
-
|
|
974
|
+
be,
|
|
956
975
|
{
|
|
957
976
|
className: n,
|
|
958
977
|
header: /* @__PURE__ */ e("div", { className: "flex h-(--table-header-h) items-center px-(--table-pad-x) pr-28", children: /* @__PURE__ */ e("span", { className: "truncate text-[13px] font-medium text-table-header", children: a }) }),
|
|
959
978
|
action: {
|
|
960
979
|
label: l ? "Copied" : "Copy",
|
|
961
|
-
icon: l ? /* @__PURE__ */ e(
|
|
980
|
+
icon: l ? /* @__PURE__ */ e(Y, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ct, {}),
|
|
962
981
|
variant: "ghost",
|
|
963
982
|
onClick: async () => {
|
|
964
983
|
try {
|
|
@@ -972,32 +991,32 @@ function wr({ code: t, label: a, className: n }) {
|
|
|
972
991
|
}
|
|
973
992
|
);
|
|
974
993
|
}
|
|
975
|
-
const
|
|
994
|
+
const ar = {
|
|
976
995
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
977
996
|
md: "h-[var(--control-h-md)] text-sm",
|
|
978
997
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
979
998
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
980
|
-
},
|
|
999
|
+
}, rr = {
|
|
981
1000
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
982
1001
|
md: "px-[var(--control-pad-x-md)]",
|
|
983
1002
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
984
1003
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
985
|
-
},
|
|
1004
|
+
}, nr = {
|
|
986
1005
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
987
1006
|
md: "left-[var(--control-pad-x-md)]",
|
|
988
1007
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
989
1008
|
xl: "left-[var(--control-pad-x-xl)]"
|
|
990
|
-
},
|
|
1009
|
+
}, dt = {
|
|
991
1010
|
sm: "right-[var(--control-pad-x-sm)]",
|
|
992
1011
|
md: "right-[var(--control-pad-x-md)]",
|
|
993
1012
|
lg: "right-[var(--control-pad-x-lg)]",
|
|
994
1013
|
xl: "right-[var(--control-pad-x-xl)]"
|
|
995
|
-
},
|
|
1014
|
+
}, ke = {
|
|
996
1015
|
sm: "size-[var(--control-icon-sm)]",
|
|
997
1016
|
md: "size-[var(--control-icon-md)]",
|
|
998
1017
|
lg: "size-[var(--control-icon-lg)]",
|
|
999
1018
|
xl: "size-[var(--control-icon-xl)]"
|
|
1000
|
-
},
|
|
1019
|
+
}, Tt = b(
|
|
1001
1020
|
({
|
|
1002
1021
|
className: t,
|
|
1003
1022
|
containerClassName: a,
|
|
@@ -1007,63 +1026,63 @@ const Ja = {
|
|
|
1007
1026
|
trailingIcon: u,
|
|
1008
1027
|
onClear: m,
|
|
1009
1028
|
value: c,
|
|
1010
|
-
defaultValue:
|
|
1011
|
-
error:
|
|
1012
|
-
helperText:
|
|
1013
|
-
id:
|
|
1014
|
-
"aria-describedby":
|
|
1015
|
-
disabled:
|
|
1016
|
-
readOnly:
|
|
1017
|
-
...
|
|
1018
|
-
},
|
|
1019
|
-
const
|
|
1029
|
+
defaultValue: v,
|
|
1030
|
+
error: h = !1,
|
|
1031
|
+
helperText: g,
|
|
1032
|
+
id: C,
|
|
1033
|
+
"aria-describedby": S,
|
|
1034
|
+
disabled: w,
|
|
1035
|
+
readOnly: y,
|
|
1036
|
+
...T
|
|
1037
|
+
}, f) => {
|
|
1038
|
+
const H = fe(), ee = C ?? H, V = !!g, A = !!(m && (c !== void 0 ? String(c).length > 0 : v !== void 0 && String(v).length > 0)), te = V ? `${ee}-description` : void 0, he = [S, te].filter(Boolean).join(" ") || void 0, ae = /* @__PURE__ */ e(
|
|
1020
1039
|
"input",
|
|
1021
1040
|
{
|
|
1022
|
-
ref:
|
|
1041
|
+
ref: f,
|
|
1023
1042
|
id: ee,
|
|
1024
1043
|
type: n,
|
|
1025
|
-
disabled:
|
|
1026
|
-
readOnly:
|
|
1027
|
-
"aria-invalid":
|
|
1028
|
-
"aria-describedby":
|
|
1029
|
-
style: i || u ||
|
|
1044
|
+
disabled: w,
|
|
1045
|
+
readOnly: y,
|
|
1046
|
+
"aria-invalid": h || void 0,
|
|
1047
|
+
"aria-describedby": he,
|
|
1048
|
+
style: i || u || A ? {
|
|
1030
1049
|
paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
|
|
1031
|
-
paddingInlineEnd: u ||
|
|
1050
|
+
paddingInlineEnd: u || A ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
|
|
1032
1051
|
} : void 0,
|
|
1033
1052
|
className: o(
|
|
1034
1053
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
1035
|
-
|
|
1036
|
-
|
|
1054
|
+
ar[l],
|
|
1055
|
+
rr[l],
|
|
1037
1056
|
"placeholder:text-(--input-placeholder)",
|
|
1038
1057
|
"hover:border-(--input-border-hover)",
|
|
1039
1058
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
1040
|
-
|
|
1041
|
-
!
|
|
1059
|
+
h && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
1060
|
+
!h && "border-(--input-border)",
|
|
1042
1061
|
n === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
|
|
1043
|
-
|
|
1044
|
-
|
|
1062
|
+
w && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
1063
|
+
y && "cursor-default focus-visible:ring-0",
|
|
1045
1064
|
t
|
|
1046
1065
|
),
|
|
1047
1066
|
value: c,
|
|
1048
|
-
defaultValue:
|
|
1049
|
-
...
|
|
1067
|
+
defaultValue: v,
|
|
1068
|
+
...T
|
|
1050
1069
|
}
|
|
1051
1070
|
);
|
|
1052
|
-
return !i && !u && !
|
|
1071
|
+
return !i && !u && !A && !V ? ae : /* @__PURE__ */ s("div", { className: o("w-full", a), children: [
|
|
1053
1072
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
1054
1073
|
i ? /* @__PURE__ */ e(
|
|
1055
1074
|
"span",
|
|
1056
1075
|
{
|
|
1057
1076
|
className: o(
|
|
1058
1077
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1059
|
-
|
|
1078
|
+
nr[l]
|
|
1060
1079
|
),
|
|
1061
1080
|
"aria-hidden": !0,
|
|
1062
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
1081
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ke[l]), children: i })
|
|
1063
1082
|
}
|
|
1064
1083
|
) : null,
|
|
1065
1084
|
ae,
|
|
1066
|
-
|
|
1085
|
+
A ? /* @__PURE__ */ e(
|
|
1067
1086
|
"button",
|
|
1068
1087
|
{
|
|
1069
1088
|
type: "button",
|
|
@@ -1071,60 +1090,60 @@ const Ja = {
|
|
|
1071
1090
|
onClick: m,
|
|
1072
1091
|
className: o(
|
|
1073
1092
|
"absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
|
|
1074
|
-
|
|
1093
|
+
dt[l]
|
|
1075
1094
|
),
|
|
1076
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
1095
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ke[l]), children: /* @__PURE__ */ e(ue, {}) })
|
|
1077
1096
|
}
|
|
1078
1097
|
) : u ? /* @__PURE__ */ e(
|
|
1079
1098
|
"span",
|
|
1080
1099
|
{
|
|
1081
1100
|
className: o(
|
|
1082
1101
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
1083
|
-
|
|
1102
|
+
dt[l]
|
|
1084
1103
|
),
|
|
1085
1104
|
"aria-hidden": !0,
|
|
1086
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
1105
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ke[l]), children: u })
|
|
1087
1106
|
}
|
|
1088
1107
|
) : null
|
|
1089
1108
|
] }),
|
|
1090
|
-
|
|
1109
|
+
V ? /* @__PURE__ */ e(
|
|
1091
1110
|
"p",
|
|
1092
1111
|
{
|
|
1093
1112
|
id: te,
|
|
1094
|
-
className: o("mt-1.5 text-xs",
|
|
1095
|
-
children:
|
|
1113
|
+
className: o("mt-1.5 text-xs", h ? "text-error" : "text-muted"),
|
|
1114
|
+
children: g
|
|
1096
1115
|
}
|
|
1097
1116
|
) : null
|
|
1098
1117
|
] });
|
|
1099
1118
|
}
|
|
1100
1119
|
);
|
|
1101
|
-
|
|
1102
|
-
function
|
|
1120
|
+
Tt.displayName = "Input";
|
|
1121
|
+
function _e(t, a) {
|
|
1103
1122
|
let n = 0;
|
|
1104
|
-
return
|
|
1105
|
-
if (!
|
|
1123
|
+
return mt.forEach(t, (l) => {
|
|
1124
|
+
if (!pt(l)) return;
|
|
1106
1125
|
if (a.some((u) => u === l.type)) {
|
|
1107
1126
|
n += 1;
|
|
1108
1127
|
return;
|
|
1109
1128
|
}
|
|
1110
1129
|
const i = l.props.children;
|
|
1111
|
-
i && (n +=
|
|
1130
|
+
i && (n += _e(i, a));
|
|
1112
1131
|
}), n;
|
|
1113
1132
|
}
|
|
1114
|
-
const
|
|
1115
|
-
function
|
|
1133
|
+
const Mt = Z(!1);
|
|
1134
|
+
function ze({
|
|
1116
1135
|
children: t,
|
|
1117
1136
|
...a
|
|
1118
1137
|
}) {
|
|
1119
|
-
const n =
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1138
|
+
const n = _e(t, [
|
|
1139
|
+
pe,
|
|
1140
|
+
K,
|
|
1141
|
+
It
|
|
1123
1142
|
]) === 0;
|
|
1124
|
-
return /* @__PURE__ */ e(
|
|
1143
|
+
return /* @__PURE__ */ e(Mt.Provider, { value: n, children: /* @__PURE__ */ e(D.Root, { ...a, children: t }) });
|
|
1125
1144
|
}
|
|
1126
|
-
const
|
|
1127
|
-
const i =
|
|
1145
|
+
const se = b(({ className: t, disabled: a, ...n }, l) => {
|
|
1146
|
+
const i = G(Mt);
|
|
1128
1147
|
return /* @__PURE__ */ e(
|
|
1129
1148
|
D.Trigger,
|
|
1130
1149
|
{
|
|
@@ -1135,9 +1154,9 @@ const oe = f(({ className: t, disabled: a, ...n }, l) => {
|
|
|
1135
1154
|
}
|
|
1136
1155
|
);
|
|
1137
1156
|
});
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1157
|
+
se.displayName = "DropdownMenuTrigger";
|
|
1158
|
+
const Pt = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1159
|
+
me,
|
|
1141
1160
|
{
|
|
1142
1161
|
ref: n,
|
|
1143
1162
|
"aria-hidden": !0,
|
|
@@ -1148,8 +1167,8 @@ const Ct = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1148
1167
|
...a
|
|
1149
1168
|
}
|
|
1150
1169
|
));
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1170
|
+
Pt.displayName = "DropdownMenuChevron";
|
|
1171
|
+
const Pr = D.Group, Ir = D.Portal, de = b(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(D.Portal, { children: /* @__PURE__ */ e(
|
|
1153
1172
|
D.Content,
|
|
1154
1173
|
{
|
|
1155
1174
|
ref: l,
|
|
@@ -1167,8 +1186,8 @@ const Cr = D.Group, Sr = D.Portal, se = f(({ className: t, sideOffset: a = 8, ..
|
|
|
1167
1186
|
...n
|
|
1168
1187
|
}
|
|
1169
1188
|
) }));
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1189
|
+
de.displayName = "DropdownMenuContent";
|
|
1190
|
+
const pe = b(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
1172
1191
|
D.Item,
|
|
1173
1192
|
{
|
|
1174
1193
|
ref: l,
|
|
@@ -1182,8 +1201,8 @@ const me = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
|
1182
1201
|
...n
|
|
1183
1202
|
}
|
|
1184
1203
|
));
|
|
1185
|
-
|
|
1186
|
-
const
|
|
1204
|
+
pe.displayName = "DropdownMenuItem";
|
|
1205
|
+
const K = b(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1187
1206
|
D.CheckboxItem,
|
|
1188
1207
|
{
|
|
1189
1208
|
ref: i,
|
|
@@ -1194,13 +1213,13 @@ const Q = f(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__
|
|
|
1194
1213
|
checked: n,
|
|
1195
1214
|
...l,
|
|
1196
1215
|
children: [
|
|
1197
|
-
/* @__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(D.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(
|
|
1216
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(D.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(Y, { className: "size-3", weight: "bold" }) }) }),
|
|
1198
1217
|
a
|
|
1199
1218
|
]
|
|
1200
1219
|
}
|
|
1201
1220
|
));
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1221
|
+
K.displayName = "DropdownMenuCheckboxItem";
|
|
1222
|
+
const ce = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1204
1223
|
D.Label,
|
|
1205
1224
|
{
|
|
1206
1225
|
ref: n,
|
|
@@ -1208,8 +1227,8 @@ const de = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1208
1227
|
...a
|
|
1209
1228
|
}
|
|
1210
1229
|
));
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1230
|
+
ce.displayName = "DropdownMenuLabel";
|
|
1231
|
+
const Rr = D.Sub, It = b(({ className: t, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1213
1232
|
D.SubTrigger,
|
|
1214
1233
|
{
|
|
1215
1234
|
ref: i,
|
|
@@ -1223,12 +1242,12 @@ const kr = D.Sub, St = f(({ className: t, inset: a, children: n, ...l }, i) => /
|
|
|
1223
1242
|
...l,
|
|
1224
1243
|
children: [
|
|
1225
1244
|
n,
|
|
1226
|
-
/* @__PURE__ */ e(
|
|
1245
|
+
/* @__PURE__ */ e(ut, { className: "ml-auto shrink-0" })
|
|
1227
1246
|
]
|
|
1228
1247
|
}
|
|
1229
1248
|
));
|
|
1230
|
-
|
|
1231
|
-
const
|
|
1249
|
+
It.displayName = "DropdownMenuSubTrigger";
|
|
1250
|
+
const lr = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1232
1251
|
D.SubContent,
|
|
1233
1252
|
{
|
|
1234
1253
|
ref: n,
|
|
@@ -1246,8 +1265,8 @@ const Za = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1246
1265
|
...a
|
|
1247
1266
|
}
|
|
1248
1267
|
));
|
|
1249
|
-
|
|
1250
|
-
const
|
|
1268
|
+
lr.displayName = "DropdownMenuSubContent";
|
|
1269
|
+
const Me = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1251
1270
|
D.Separator,
|
|
1252
1271
|
{
|
|
1253
1272
|
ref: n,
|
|
@@ -1255,18 +1274,18 @@ const ze = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1255
1274
|
...a
|
|
1256
1275
|
}
|
|
1257
1276
|
));
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1260
|
-
function
|
|
1277
|
+
Me.displayName = "DropdownMenuSeparator";
|
|
1278
|
+
const jr = P.Group, ir = P.Value;
|
|
1279
|
+
function or({
|
|
1261
1280
|
children: t,
|
|
1262
1281
|
disabled: a,
|
|
1263
1282
|
...n
|
|
1264
1283
|
}) {
|
|
1265
|
-
const l =
|
|
1266
|
-
return /* @__PURE__ */ e(
|
|
1284
|
+
const l = _e(t, [Le]) === 0;
|
|
1285
|
+
return /* @__PURE__ */ e(P.Root, { disabled: a || l, ...n, children: t });
|
|
1267
1286
|
}
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1287
|
+
const Rt = b(({ className: t, children: a, variant: n = "field", ...l }, i) => /* @__PURE__ */ s(
|
|
1288
|
+
P.Trigger,
|
|
1270
1289
|
{
|
|
1271
1290
|
ref: i,
|
|
1272
1291
|
className: o(
|
|
@@ -1280,14 +1299,14 @@ const kt = f(({ className: t, children: a, variant: n = "field", ...l }, i) => /
|
|
|
1280
1299
|
...l,
|
|
1281
1300
|
children: [
|
|
1282
1301
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: a }),
|
|
1283
|
-
/* @__PURE__ */ e(
|
|
1302
|
+
/* @__PURE__ */ e(P.Icon, { asChild: !0, children: /* @__PURE__ */ e(me, { className: "ml-auto size-3.5 shrink-0 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) })
|
|
1284
1303
|
]
|
|
1285
1304
|
}
|
|
1286
1305
|
));
|
|
1287
|
-
|
|
1288
|
-
const
|
|
1289
|
-
({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...i }, u) => /* @__PURE__ */ e(
|
|
1290
|
-
|
|
1306
|
+
Rt.displayName = "SelectTrigger";
|
|
1307
|
+
const jt = b(
|
|
1308
|
+
({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...i }, u) => /* @__PURE__ */ e(P.Portal, { children: /* @__PURE__ */ e(
|
|
1309
|
+
P.Content,
|
|
1291
1310
|
{
|
|
1292
1311
|
ref: u,
|
|
1293
1312
|
position: n,
|
|
@@ -1303,13 +1322,13 @@ const zt = f(
|
|
|
1303
1322
|
t
|
|
1304
1323
|
),
|
|
1305
1324
|
...i,
|
|
1306
|
-
children: /* @__PURE__ */ e(
|
|
1325
|
+
children: /* @__PURE__ */ e(P.Viewport, { className: "p-0", children: a })
|
|
1307
1326
|
}
|
|
1308
1327
|
) })
|
|
1309
1328
|
);
|
|
1310
|
-
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1329
|
+
jt.displayName = "SelectContent";
|
|
1330
|
+
const Le = b(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
1331
|
+
P.Item,
|
|
1313
1332
|
{
|
|
1314
1333
|
ref: l,
|
|
1315
1334
|
className: o(
|
|
@@ -1318,22 +1337,22 @@ const je = f(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
|
|
|
1318
1337
|
),
|
|
1319
1338
|
...n,
|
|
1320
1339
|
children: [
|
|
1321
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1322
|
-
/* @__PURE__ */ e(
|
|
1340
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(P.ItemIndicator, { children: /* @__PURE__ */ e(Y, { className: "size-3.5" }) }) }),
|
|
1341
|
+
/* @__PURE__ */ e(P.ItemText, { children: a })
|
|
1323
1342
|
]
|
|
1324
1343
|
}
|
|
1325
1344
|
));
|
|
1326
|
-
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1345
|
+
Le.displayName = "SelectItem";
|
|
1346
|
+
const sr = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1347
|
+
P.Label,
|
|
1329
1348
|
{
|
|
1330
1349
|
ref: n,
|
|
1331
1350
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1332
1351
|
...a
|
|
1333
1352
|
}
|
|
1334
1353
|
));
|
|
1335
|
-
|
|
1336
|
-
function
|
|
1354
|
+
sr.displayName = "SelectLabel";
|
|
1355
|
+
function dr({
|
|
1337
1356
|
icon: t,
|
|
1338
1357
|
title: a,
|
|
1339
1358
|
description: n,
|
|
@@ -1358,22 +1377,22 @@ function ar({
|
|
|
1358
1377
|
}
|
|
1359
1378
|
);
|
|
1360
1379
|
}
|
|
1361
|
-
const
|
|
1362
|
-
function
|
|
1380
|
+
const cr = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1381
|
+
function ur(t) {
|
|
1363
1382
|
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1364
1383
|
var n;
|
|
1365
1384
|
return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1366
1385
|
}).join("");
|
|
1367
1386
|
}
|
|
1368
|
-
function
|
|
1387
|
+
function Er({
|
|
1369
1388
|
name: t,
|
|
1370
1389
|
secondary: a,
|
|
1371
1390
|
image: n
|
|
1372
1391
|
}) {
|
|
1373
1392
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1374
|
-
/* @__PURE__ */ s(
|
|
1375
|
-
n ? /* @__PURE__ */ e(
|
|
1376
|
-
/* @__PURE__ */ e(
|
|
1393
|
+
/* @__PURE__ */ s(bt, { className: "size-8", children: [
|
|
1394
|
+
n ? /* @__PURE__ */ e(ht, { src: n, alt: "" }) : null,
|
|
1395
|
+
/* @__PURE__ */ e(gt, { children: ur(t) })
|
|
1377
1396
|
] }),
|
|
1378
1397
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1379
1398
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1381,7 +1400,7 @@ function Dr({
|
|
|
1381
1400
|
] })
|
|
1382
1401
|
] });
|
|
1383
1402
|
}
|
|
1384
|
-
function
|
|
1403
|
+
function _r({
|
|
1385
1404
|
rows: t,
|
|
1386
1405
|
columns: a,
|
|
1387
1406
|
getRowId: n,
|
|
@@ -1390,116 +1409,123 @@ function Tr({
|
|
|
1390
1409
|
empty: u,
|
|
1391
1410
|
search: m,
|
|
1392
1411
|
filters: c,
|
|
1393
|
-
toolbarStart:
|
|
1394
|
-
toolbarEnd:
|
|
1395
|
-
tabs:
|
|
1396
|
-
activeTab:
|
|
1397
|
-
onTabChange:
|
|
1398
|
-
infoBanner:
|
|
1399
|
-
selectable:
|
|
1400
|
-
bulkActions:
|
|
1401
|
-
rowActions:
|
|
1402
|
-
onRowClick:
|
|
1412
|
+
toolbarStart: v,
|
|
1413
|
+
toolbarEnd: h,
|
|
1414
|
+
tabs: g,
|
|
1415
|
+
activeTab: C,
|
|
1416
|
+
onTabChange: S,
|
|
1417
|
+
infoBanner: w,
|
|
1418
|
+
selectable: y = !1,
|
|
1419
|
+
bulkActions: T,
|
|
1420
|
+
rowActions: f,
|
|
1421
|
+
onRowClick: H,
|
|
1403
1422
|
defaultSort: ee,
|
|
1404
|
-
pageSize:
|
|
1405
|
-
pageSizeOptions:
|
|
1423
|
+
pageSize: V = 25,
|
|
1424
|
+
pageSizeOptions: A = [10, 25, 50, 100],
|
|
1406
1425
|
pagination: te = "auto",
|
|
1407
|
-
tone:
|
|
1426
|
+
tone: he,
|
|
1408
1427
|
headerAction: ae,
|
|
1409
|
-
headerClassName:
|
|
1410
|
-
panelClassName:
|
|
1411
|
-
className:
|
|
1428
|
+
headerClassName: Et,
|
|
1429
|
+
panelClassName: _t,
|
|
1430
|
+
className: Lt
|
|
1412
1431
|
}) {
|
|
1413
|
-
const [
|
|
1432
|
+
const [Ae, Be] = z(
|
|
1414
1433
|
() => Object.fromEntries(
|
|
1415
1434
|
a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
|
|
1416
1435
|
)
|
|
1417
|
-
), [
|
|
1436
|
+
), [Fe, $e] = z(null), [ge, qe] = z(null), [N, At] = z(
|
|
1418
1437
|
ee ?? null
|
|
1419
|
-
), [
|
|
1420
|
-
const p = d ?
|
|
1421
|
-
!p ||
|
|
1422
|
-
const
|
|
1423
|
-
return
|
|
1438
|
+
), [W, re] = z(0), [_, Bt] = z(V), [B, xe] = z(/* @__PURE__ */ new Set()), [Ft, ve] = z([]), Ge = a.map((r) => r.id), He = new Map(a.map((r) => [r.id, r])), Ve = Fe ? Fe.map((r) => He.get(r)).filter((r) => !!r) : a, O = Ve.filter((r) => !Ae[r.id]), We = Ve.filter((r) => Ae[r.id] && !r.required), Oe = (r) => !!r.required, $t = (r) => He.get(r), qt = (r, d) => {
|
|
1439
|
+
const p = d ? $t(d) : void 0;
|
|
1440
|
+
!p || Oe(p) || r === d || $e((x) => {
|
|
1441
|
+
const k = x ?? Ge;
|
|
1442
|
+
return wa(k, k.indexOf(r), k.indexOf(d));
|
|
1424
1443
|
});
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1444
|
+
}, Gt = (r) => {
|
|
1445
|
+
Be((d) => ({ ...d, [r]: !1 })), $e((d) => d && d.includes(r) ? d : [...d ?? Ge, r]);
|
|
1446
|
+
}, ye = (c ?? []).filter((r) => Ft.includes(r.id)), Ht = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ne = nt(() => {
|
|
1428
1447
|
let r = t;
|
|
1429
1448
|
for (const p of c ?? [])
|
|
1430
|
-
p.value.length > 0 && (r = r.filter((
|
|
1449
|
+
p.value.length > 0 && (r = r.filter((x) => p.match(x, p.value)));
|
|
1431
1450
|
if (!m || !m.value.trim()) return r;
|
|
1432
1451
|
const d = m.value.trim().toLowerCase();
|
|
1433
1452
|
return r.filter((p) => m.keys(p).toLowerCase().includes(d));
|
|
1434
|
-
}, [t, m, c]),
|
|
1435
|
-
if (!
|
|
1436
|
-
const r = a.find((p) => p.id ===
|
|
1453
|
+
}, [t, m, c]), F = nt(() => {
|
|
1454
|
+
if (!N) return ne;
|
|
1455
|
+
const r = a.find((p) => p.id === N.id);
|
|
1437
1456
|
if (!(r != null && r.sortValue)) return ne;
|
|
1438
|
-
const d =
|
|
1439
|
-
return [...ne].sort((p,
|
|
1440
|
-
const
|
|
1441
|
-
return
|
|
1457
|
+
const d = N.dir === "asc" ? 1 : -1;
|
|
1458
|
+
return [...ne].sort((p, x) => {
|
|
1459
|
+
const k = r.sortValue(p), R = r.sortValue(x);
|
|
1460
|
+
return k == null && R == null ? 0 : k == null ? 1 : R == null ? -1 : typeof k == "number" && typeof R == "number" ? (k - R) * d : String(k).localeCompare(String(R)) * d;
|
|
1442
1461
|
});
|
|
1443
|
-
}, [ne,
|
|
1462
|
+
}, [ne, N, a]), U = Math.max(1, Math.ceil(F.length / _)), Vt = !l && !i && F.length > 0 && (te === "always" || F.length > _);
|
|
1444
1463
|
J(() => {
|
|
1445
1464
|
re(0);
|
|
1446
|
-
}, [m == null ? void 0 : m.value, _,
|
|
1447
|
-
|
|
1448
|
-
}, [
|
|
1449
|
-
const le =
|
|
1450
|
-
r.sortable &&
|
|
1465
|
+
}, [m == null ? void 0 : m.value, _, N == null ? void 0 : N.id, N == null ? void 0 : N.dir, C, Ht]), J(() => {
|
|
1466
|
+
W > U - 1 && re(U - 1);
|
|
1467
|
+
}, [W, U]);
|
|
1468
|
+
const le = W * _, L = F.slice(le, le + _), Wt = (r) => {
|
|
1469
|
+
r.sortable && At(
|
|
1451
1470
|
(d) => (d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
|
|
1452
1471
|
);
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1472
|
+
}, Ue = L.length > 0 && L.every((r) => B.has(n(r))), Ot = L.some((r) => B.has(n(r))), Ut = t.filter((r) => B.has(n(r))), Xt = () => {
|
|
1473
|
+
xe((r) => {
|
|
1455
1474
|
const d = new Set(r);
|
|
1456
|
-
return
|
|
1475
|
+
return Ue ? L.forEach((p) => d.delete(n(p))) : L.forEach((p) => d.add(n(p))), d;
|
|
1457
1476
|
});
|
|
1458
|
-
},
|
|
1459
|
-
|
|
1477
|
+
}, Jt = (r) => {
|
|
1478
|
+
xe((d) => {
|
|
1460
1479
|
const p = new Set(d);
|
|
1461
1480
|
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1462
1481
|
});
|
|
1463
|
-
},
|
|
1464
|
-
|
|
1465
|
-
|
|
1482
|
+
}, Kt = !!(m || c != null && c.length || v || h), Qt = (r) => (N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? "ascending" : "descending" : void 0, Xe = j(null), Je = j(null), Ke = j(null), Qe = j(null), [$, Ne] = z([]), Yt = O.map((r) => r.id).join("\0"), ie = `${y ? "s" : "-"}|${f ? "a" : "-"}|${Yt}`, Ye = j(ie), Zt = $.length > 0, we = ft(() => {
|
|
1483
|
+
const r = Ke.current, d = Qe.current;
|
|
1484
|
+
r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1485
|
+
}, []);
|
|
1486
|
+
ha(() => {
|
|
1487
|
+
const r = Xe.current;
|
|
1466
1488
|
if (!r) return;
|
|
1489
|
+
if (Ye.current !== ie) {
|
|
1490
|
+
Ye.current = ie, Ne((x) => x.length === 0 ? x : []);
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1467
1493
|
const d = () => {
|
|
1468
|
-
var
|
|
1469
|
-
const
|
|
1470
|
-
if (!
|
|
1471
|
-
|
|
1494
|
+
var Ze, et, tt;
|
|
1495
|
+
const x = (et = (Ze = r.tBodies[0]) == null ? void 0 : Ze.rows.item(0)) == null ? void 0 : et.cells;
|
|
1496
|
+
if (!x || x.length === 0) {
|
|
1497
|
+
Ne((E) => E.length === 0 ? E : []);
|
|
1472
1498
|
return;
|
|
1473
1499
|
}
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1476
|
-
(E,
|
|
1477
|
-
var
|
|
1500
|
+
const k = (tt = Je.current) == null ? void 0 : tt.querySelectorAll("thead th"), R = Array.from(
|
|
1501
|
+
x,
|
|
1502
|
+
(E, Ce) => {
|
|
1503
|
+
var oe, at;
|
|
1478
1504
|
return Math.max(
|
|
1479
|
-
|
|
1480
|
-
|
|
1505
|
+
E.getBoundingClientRect().width,
|
|
1506
|
+
((at = (oe = k == null ? void 0 : k.item(Ce)) == null ? void 0 : oe.querySelector("[data-col-sizer]")) == null ? void 0 : at.getBoundingClientRect().width) ?? 0
|
|
1481
1507
|
);
|
|
1482
1508
|
}
|
|
1483
1509
|
);
|
|
1484
|
-
|
|
1485
|
-
(E) => E.length ===
|
|
1510
|
+
Ne(
|
|
1511
|
+
(E) => E.length === R.length && E.every((Ce, oe) => Ce === R[oe]) ? E : R
|
|
1486
1512
|
);
|
|
1487
1513
|
};
|
|
1488
|
-
if (d(), typeof ResizeObserver > "u") return;
|
|
1514
|
+
if (d(), we(), typeof ResizeObserver > "u") return;
|
|
1489
1515
|
const p = new ResizeObserver(d);
|
|
1490
1516
|
return p.observe(r), () => p.disconnect();
|
|
1491
|
-
}, [
|
|
1492
|
-
const X =
|
|
1493
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1494
|
-
|
|
1495
|
-
const d = r.id ===
|
|
1517
|
+
}, [ie, Zt, l, i, we]);
|
|
1518
|
+
const X = $.reduce((r, d) => r + d, 0);
|
|
1519
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", Lt), children: [
|
|
1520
|
+
g && g.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: g.map((r) => {
|
|
1521
|
+
const d = r.id === C;
|
|
1496
1522
|
return /* @__PURE__ */ e(
|
|
1497
1523
|
"button",
|
|
1498
1524
|
{
|
|
1499
1525
|
type: "button",
|
|
1500
1526
|
role: "tab",
|
|
1501
1527
|
"aria-selected": d,
|
|
1502
|
-
onClick: () =>
|
|
1528
|
+
onClick: () => S == null ? void 0 : S(r.id),
|
|
1503
1529
|
className: o(
|
|
1504
1530
|
"-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
|
|
1505
1531
|
d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
|
|
@@ -1509,9 +1535,9 @@ function Tr({
|
|
|
1509
1535
|
r.id
|
|
1510
1536
|
);
|
|
1511
1537
|
}) }),
|
|
1512
|
-
|
|
1538
|
+
Kt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1513
1539
|
m && /* @__PURE__ */ e(
|
|
1514
|
-
|
|
1540
|
+
Tt,
|
|
1515
1541
|
{
|
|
1516
1542
|
type: "search",
|
|
1517
1543
|
"aria-label": m.placeholder ?? "Search",
|
|
@@ -1519,29 +1545,29 @@ function Tr({
|
|
|
1519
1545
|
value: m.value,
|
|
1520
1546
|
onChange: (r) => m.onChange(r.target.value),
|
|
1521
1547
|
onClear: () => m.onChange(""),
|
|
1522
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1548
|
+
leadingIcon: /* @__PURE__ */ e(sa, {}),
|
|
1523
1549
|
containerClassName: "w-full sm:w-[280px]",
|
|
1524
1550
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1525
1551
|
}
|
|
1526
1552
|
),
|
|
1527
|
-
|
|
1528
|
-
/* @__PURE__ */ s(
|
|
1529
|
-
/* @__PURE__ */ e(
|
|
1530
|
-
|
|
1553
|
+
v,
|
|
1554
|
+
/* @__PURE__ */ s(ze, { children: [
|
|
1555
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1556
|
+
M,
|
|
1531
1557
|
{
|
|
1532
1558
|
variant: "secondary",
|
|
1533
1559
|
size: "md",
|
|
1534
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1535
|
-
trailingIcon: /* @__PURE__ */ e(
|
|
1560
|
+
leadingIcon: /* @__PURE__ */ e(da, {}),
|
|
1561
|
+
trailingIcon: /* @__PURE__ */ e(Pt, {}),
|
|
1536
1562
|
children: "Columns"
|
|
1537
1563
|
}
|
|
1538
1564
|
) }),
|
|
1539
|
-
/* @__PURE__ */ s(
|
|
1540
|
-
/* @__PURE__ */ e(
|
|
1541
|
-
|
|
1542
|
-
const d =
|
|
1565
|
+
/* @__PURE__ */ s(de, { align: "end", className: "w-54", children: [
|
|
1566
|
+
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Active columns" }),
|
|
1567
|
+
O.map((r) => {
|
|
1568
|
+
const d = Oe(r);
|
|
1543
1569
|
return /* @__PURE__ */ s(
|
|
1544
|
-
|
|
1570
|
+
K,
|
|
1545
1571
|
{
|
|
1546
1572
|
checked: !0,
|
|
1547
1573
|
draggable: !d,
|
|
@@ -1550,27 +1576,27 @@ function Tr({
|
|
|
1550
1576
|
p.preventDefault();
|
|
1551
1577
|
return;
|
|
1552
1578
|
}
|
|
1553
|
-
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id),
|
|
1579
|
+
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), qe(r.id);
|
|
1554
1580
|
},
|
|
1555
1581
|
onDragOver: (p) => {
|
|
1556
|
-
|
|
1582
|
+
ge && (p.preventDefault(), qt(ge, r.id));
|
|
1557
1583
|
},
|
|
1558
1584
|
onDrop: (p) => p.preventDefault(),
|
|
1559
|
-
onDragEnd: () =>
|
|
1585
|
+
onDragEnd: () => qe(null),
|
|
1560
1586
|
onCheckedChange: (p) => {
|
|
1561
|
-
!p && !d &&
|
|
1587
|
+
!p && !d && Be((x) => ({ ...x, [r.id]: !0 }));
|
|
1562
1588
|
},
|
|
1563
1589
|
onSelect: (p) => p.preventDefault(),
|
|
1564
1590
|
className: "justify-between",
|
|
1565
1591
|
children: [
|
|
1566
1592
|
/* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
|
|
1567
|
-
d ? /* @__PURE__ */ e(
|
|
1568
|
-
|
|
1593
|
+
d ? /* @__PURE__ */ e(ca, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1594
|
+
ua,
|
|
1569
1595
|
{
|
|
1570
1596
|
"aria-hidden": !0,
|
|
1571
1597
|
className: o(
|
|
1572
1598
|
"size-3.5 shrink-0",
|
|
1573
|
-
|
|
1599
|
+
ge === r.id ? "text-primary" : "text-subtle"
|
|
1574
1600
|
)
|
|
1575
1601
|
}
|
|
1576
1602
|
)
|
|
@@ -1579,14 +1605,14 @@ function Tr({
|
|
|
1579
1605
|
r.id
|
|
1580
1606
|
);
|
|
1581
1607
|
}),
|
|
1582
|
-
|
|
1583
|
-
/* @__PURE__ */ e(
|
|
1584
|
-
/* @__PURE__ */ e(
|
|
1585
|
-
|
|
1586
|
-
|
|
1608
|
+
We.length > 0 ? /* @__PURE__ */ s(Pe, { children: [
|
|
1609
|
+
/* @__PURE__ */ e(Me, {}),
|
|
1610
|
+
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Available columns" }),
|
|
1611
|
+
We.map((r) => /* @__PURE__ */ e(
|
|
1612
|
+
K,
|
|
1587
1613
|
{
|
|
1588
1614
|
checked: !1,
|
|
1589
|
-
onCheckedChange: () =>
|
|
1615
|
+
onCheckedChange: () => Gt(r.id),
|
|
1590
1616
|
onSelect: (d) => d.preventDefault(),
|
|
1591
1617
|
children: r.header
|
|
1592
1618
|
},
|
|
@@ -1595,21 +1621,21 @@ function Tr({
|
|
|
1595
1621
|
] }) : null
|
|
1596
1622
|
] })
|
|
1597
1623
|
] }),
|
|
1598
|
-
c && c.length > 0 ? /* @__PURE__ */ s(
|
|
1599
|
-
/* @__PURE__ */ e(
|
|
1600
|
-
|
|
1624
|
+
c && c.length > 0 ? /* @__PURE__ */ s(ze, { children: [
|
|
1625
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1626
|
+
M,
|
|
1601
1627
|
{
|
|
1602
1628
|
variant: "secondary",
|
|
1603
1629
|
size: "md",
|
|
1604
1630
|
iconOnly: !0,
|
|
1605
1631
|
"aria-label": "Add filter",
|
|
1606
|
-
children: /* @__PURE__ */ e(
|
|
1632
|
+
children: /* @__PURE__ */ e(rt, {})
|
|
1607
1633
|
}
|
|
1608
1634
|
) }),
|
|
1609
|
-
/* @__PURE__ */ e(
|
|
1610
|
-
|
|
1635
|
+
/* @__PURE__ */ e(de, { align: "start", className: "w-54", children: c.map((r) => /* @__PURE__ */ e(
|
|
1636
|
+
pe,
|
|
1611
1637
|
{
|
|
1612
|
-
onSelect: () =>
|
|
1638
|
+
onSelect: () => ve(
|
|
1613
1639
|
(d) => d.includes(r.id) ? d : [...d, r.id]
|
|
1614
1640
|
),
|
|
1615
1641
|
children: r.label
|
|
@@ -1617,16 +1643,16 @@ function Tr({
|
|
|
1617
1643
|
r.id
|
|
1618
1644
|
)) })
|
|
1619
1645
|
] }) : null,
|
|
1620
|
-
|
|
1646
|
+
h ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: h }) : null
|
|
1621
1647
|
] }),
|
|
1622
|
-
|
|
1623
|
-
|
|
1648
|
+
ye.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1649
|
+
ye.map((r) => {
|
|
1624
1650
|
const d = () => {
|
|
1625
|
-
r.onChange([]),
|
|
1651
|
+
r.onChange([]), ve((p) => p.filter((x) => x !== r.id));
|
|
1626
1652
|
};
|
|
1627
1653
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1628
1654
|
/* @__PURE__ */ e(
|
|
1629
|
-
|
|
1655
|
+
M,
|
|
1630
1656
|
{
|
|
1631
1657
|
variant: "secondary",
|
|
1632
1658
|
size: "md",
|
|
@@ -1634,39 +1660,39 @@ function Tr({
|
|
|
1634
1660
|
"aria-label": `Remove ${r.label} filter`,
|
|
1635
1661
|
className: "rounded-r-none",
|
|
1636
1662
|
onClick: d,
|
|
1637
|
-
children: /* @__PURE__ */ e(
|
|
1663
|
+
children: /* @__PURE__ */ e(ue, {})
|
|
1638
1664
|
}
|
|
1639
1665
|
),
|
|
1640
|
-
/* @__PURE__ */ s(
|
|
1641
|
-
/* @__PURE__ */ e(
|
|
1642
|
-
/* @__PURE__ */ e(
|
|
1666
|
+
/* @__PURE__ */ s(ze, { children: [
|
|
1667
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ s(M, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1668
|
+
/* @__PURE__ */ e(rt, {}),
|
|
1643
1669
|
/* @__PURE__ */ e("span", { className: "font-medium", children: r.label }),
|
|
1644
1670
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1645
1671
|
/* @__PURE__ */ e("span", { className: "text-muted", children: r.value.length > 0 ? `${r.value.length} selected` : "Enter value" }),
|
|
1646
|
-
/* @__PURE__ */ e(
|
|
1672
|
+
/* @__PURE__ */ e(me, { className: "text-muted" })
|
|
1647
1673
|
] }) }),
|
|
1648
|
-
/* @__PURE__ */ s(
|
|
1649
|
-
/* @__PURE__ */ s(
|
|
1674
|
+
/* @__PURE__ */ s(de, { align: "start", className: "w-56", children: [
|
|
1675
|
+
/* @__PURE__ */ s(ce, { className: "text-[13px]", children: [
|
|
1650
1676
|
"Filter by ",
|
|
1651
1677
|
r.label
|
|
1652
1678
|
] }),
|
|
1653
1679
|
r.options.map((p) => {
|
|
1654
|
-
const
|
|
1680
|
+
const x = r.value.includes(p.value);
|
|
1655
1681
|
return /* @__PURE__ */ e(
|
|
1656
|
-
|
|
1682
|
+
K,
|
|
1657
1683
|
{
|
|
1658
|
-
checked:
|
|
1684
|
+
checked: x,
|
|
1659
1685
|
onCheckedChange: () => r.onChange(
|
|
1660
|
-
|
|
1686
|
+
x ? r.value.filter((k) => k !== p.value) : [...r.value, p.value]
|
|
1661
1687
|
),
|
|
1662
|
-
onSelect: (
|
|
1688
|
+
onSelect: (k) => k.preventDefault(),
|
|
1663
1689
|
children: p.label
|
|
1664
1690
|
},
|
|
1665
1691
|
p.value
|
|
1666
1692
|
);
|
|
1667
1693
|
}),
|
|
1668
|
-
/* @__PURE__ */ e(
|
|
1669
|
-
/* @__PURE__ */ e(
|
|
1694
|
+
/* @__PURE__ */ e(Me, {}),
|
|
1695
|
+
/* @__PURE__ */ e(pe, { onSelect: d, children: "Clear filter" })
|
|
1670
1696
|
] })
|
|
1671
1697
|
] })
|
|
1672
1698
|
] }, r.id);
|
|
@@ -1676,27 +1702,27 @@ function Tr({
|
|
|
1676
1702
|
{
|
|
1677
1703
|
type: "button",
|
|
1678
1704
|
onClick: () => {
|
|
1679
|
-
for (const r of
|
|
1680
|
-
|
|
1705
|
+
for (const r of ye) r.onChange([]);
|
|
1706
|
+
ve([]);
|
|
1681
1707
|
},
|
|
1682
1708
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1683
1709
|
children: "Clear filters"
|
|
1684
1710
|
}
|
|
1685
1711
|
)
|
|
1686
1712
|
] }) : null,
|
|
1687
|
-
|
|
1688
|
-
|
|
1713
|
+
w,
|
|
1714
|
+
y && B.size > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
|
|
1689
1715
|
/* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
|
|
1690
|
-
|
|
1716
|
+
B.size,
|
|
1691
1717
|
" selected"
|
|
1692
1718
|
] }),
|
|
1693
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (
|
|
1694
|
-
|
|
1719
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (T ?? []).map((r) => /* @__PURE__ */ s(
|
|
1720
|
+
M,
|
|
1695
1721
|
{
|
|
1696
1722
|
size: "md",
|
|
1697
1723
|
variant: r.variant ?? "outline",
|
|
1698
1724
|
disabled: r.disabled,
|
|
1699
|
-
onClick: () => void r.onRun(
|
|
1725
|
+
onClick: () => void r.onRun(Ut),
|
|
1700
1726
|
children: [
|
|
1701
1727
|
r.icon,
|
|
1702
1728
|
r.label
|
|
@@ -1708,22 +1734,24 @@ function Tr({
|
|
|
1708
1734
|
"button",
|
|
1709
1735
|
{
|
|
1710
1736
|
type: "button",
|
|
1711
|
-
onClick: () =>
|
|
1737
|
+
onClick: () => xe(/* @__PURE__ */ new Set()),
|
|
1712
1738
|
className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
|
|
1713
1739
|
children: [
|
|
1714
|
-
/* @__PURE__ */ e(
|
|
1740
|
+
/* @__PURE__ */ e(ue, { className: "size-3.5" }),
|
|
1715
1741
|
"Clear"
|
|
1716
1742
|
]
|
|
1717
1743
|
}
|
|
1718
1744
|
)
|
|
1719
1745
|
] }),
|
|
1720
1746
|
/* @__PURE__ */ e(
|
|
1721
|
-
|
|
1747
|
+
be,
|
|
1722
1748
|
{
|
|
1749
|
+
scrollMode: "panel",
|
|
1750
|
+
headerContentRef: Ke,
|
|
1723
1751
|
action: ae,
|
|
1724
|
-
tone:
|
|
1725
|
-
headerClassName:
|
|
1726
|
-
panelClassName:
|
|
1752
|
+
tone: he,
|
|
1753
|
+
headerClassName: Et,
|
|
1754
|
+
panelClassName: _t,
|
|
1727
1755
|
header: (
|
|
1728
1756
|
// Visible header band. Presentational (aria-sort lives on the body's
|
|
1729
1757
|
// sr-only thead); widths are pinned to the measured body columns and
|
|
@@ -1731,66 +1759,75 @@ function Tr({
|
|
|
1731
1759
|
/* @__PURE__ */ s(
|
|
1732
1760
|
"table",
|
|
1733
1761
|
{
|
|
1734
|
-
ref:
|
|
1762
|
+
ref: Je,
|
|
1735
1763
|
role: "presentation",
|
|
1736
1764
|
className: "w-full table-fixed border-collapse",
|
|
1737
1765
|
style: {
|
|
1738
|
-
|
|
1766
|
+
// Fill the container when it fits; force totalWidth (and the
|
|
1767
|
+
// shared scroller) only when the columns need more room.
|
|
1768
|
+
minWidth: X > 0 ? X : void 0,
|
|
1739
1769
|
visibility: X > 0 ? void 0 : "hidden"
|
|
1740
1770
|
},
|
|
1741
1771
|
children: [
|
|
1742
|
-
/* @__PURE__ */ e("colgroup", { children:
|
|
1772
|
+
/* @__PURE__ */ e("colgroup", { children: $.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1743
1773
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1744
|
-
|
|
1745
|
-
|
|
1774
|
+
y && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
|
|
1775
|
+
De,
|
|
1746
1776
|
{
|
|
1747
1777
|
"aria-label": "Select all rows",
|
|
1748
|
-
checked:
|
|
1749
|
-
onCheckedChange:
|
|
1778
|
+
checked: Ue ? !0 : Ot ? "indeterminate" : !1,
|
|
1779
|
+
onCheckedChange: Xt
|
|
1750
1780
|
}
|
|
1751
1781
|
) }),
|
|
1752
|
-
|
|
1782
|
+
O.map((r) => /* @__PURE__ */ e(
|
|
1753
1783
|
"th",
|
|
1754
1784
|
{
|
|
1755
|
-
className: o(
|
|
1756
|
-
children:
|
|
1757
|
-
|
|
1785
|
+
className: o(cr, r.align === "right" && "text-right", r.className),
|
|
1786
|
+
children: /* @__PURE__ */ e(
|
|
1787
|
+
"span",
|
|
1758
1788
|
{
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1789
|
+
"data-col-sizer": !0,
|
|
1790
|
+
className: "inline-block whitespace-nowrap px-(--table-pad-x) -mx-(--table-pad-x)",
|
|
1791
|
+
children: r.sortable ? /* @__PURE__ */ s(
|
|
1792
|
+
M,
|
|
1793
|
+
{
|
|
1794
|
+
type: "button",
|
|
1795
|
+
variant: "ghost",
|
|
1796
|
+
size: "xs",
|
|
1797
|
+
"aria-label": `Sort by ${r.header}`,
|
|
1798
|
+
onClick: () => Wt(r),
|
|
1799
|
+
className: o(
|
|
1800
|
+
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1801
|
+
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
1802
|
+
"active:scale-100 active:bg-transparent active:shadow-none",
|
|
1803
|
+
(N == null ? void 0 : N.id) === r.id && "text-table-header-active"
|
|
1804
|
+
),
|
|
1805
|
+
children: [
|
|
1806
|
+
r.header,
|
|
1807
|
+
(N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? /* @__PURE__ */ e(pa, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(me, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(fa, { className: "size-3.5 opacity-50" })
|
|
1808
|
+
]
|
|
1809
|
+
}
|
|
1810
|
+
) : r.header
|
|
1774
1811
|
}
|
|
1775
|
-
)
|
|
1812
|
+
)
|
|
1776
1813
|
},
|
|
1777
1814
|
r.id
|
|
1778
1815
|
)),
|
|
1779
|
-
|
|
1816
|
+
f && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1780
1817
|
] }) })
|
|
1781
1818
|
]
|
|
1782
1819
|
}
|
|
1783
1820
|
)
|
|
1784
1821
|
),
|
|
1785
|
-
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: [
|
|
1786
|
-
/* @__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(
|
|
1822
|
+
children: /* @__PURE__ */ e("div", { ref: Qe, className: "overflow-x-auto", onScroll: we, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((r) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, r)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1823
|
+
/* @__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(ma, { weight: "duotone" }) }),
|
|
1787
1824
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1788
1825
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1789
1826
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1790
1827
|
] }),
|
|
1791
1828
|
i.action
|
|
1792
1829
|
] }) : L.length === 0 ? /* @__PURE__ */ e(
|
|
1793
|
-
|
|
1830
|
+
dr,
|
|
1794
1831
|
{
|
|
1795
1832
|
icon: u == null ? void 0 : u.icon,
|
|
1796
1833
|
title: (u == null ? void 0 : u.title) ?? "No results",
|
|
@@ -1800,49 +1837,51 @@ function Tr({
|
|
|
1800
1837
|
) : /* @__PURE__ */ s(
|
|
1801
1838
|
"table",
|
|
1802
1839
|
{
|
|
1803
|
-
ref:
|
|
1840
|
+
ref: Xe,
|
|
1804
1841
|
className: o(
|
|
1805
1842
|
"border-collapse text-left",
|
|
1806
1843
|
// Unmeasured: content-sized so intrinsic column widths can be
|
|
1807
1844
|
// measured (w-full would squeeze columns into the container).
|
|
1808
|
-
// Measured: pinned to the band's colgroup
|
|
1809
|
-
|
|
1845
|
+
// Measured: fill the container, pinned to the band's colgroup
|
|
1846
|
+
// pixel widths; minWidth forces the shared scroller open only
|
|
1847
|
+
// when the columns need more room than the container has.
|
|
1848
|
+
$.length > 0 ? "w-full table-fixed" : "table-auto"
|
|
1810
1849
|
),
|
|
1811
|
-
style: {
|
|
1850
|
+
style: { minWidth: X > 0 ? X : void 0 },
|
|
1812
1851
|
children: [
|
|
1813
|
-
|
|
1852
|
+
$.length > 0 && /* @__PURE__ */ e("colgroup", { children: $.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1814
1853
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1854
|
+
y && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1855
|
+
O.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": Qt(r), children: r.header }, r.id)),
|
|
1856
|
+
f && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1818
1857
|
] }) }),
|
|
1819
|
-
/* @__PURE__ */ e(
|
|
1820
|
-
const d = n(r), p =
|
|
1858
|
+
/* @__PURE__ */ e(Ra, { children: L.map((r) => {
|
|
1859
|
+
const d = n(r), p = B.has(d);
|
|
1821
1860
|
return /* @__PURE__ */ s(
|
|
1822
|
-
|
|
1861
|
+
ja,
|
|
1823
1862
|
{
|
|
1824
1863
|
"data-state": p ? "selected" : void 0,
|
|
1825
|
-
onClick:
|
|
1826
|
-
className:
|
|
1864
|
+
onClick: H ? () => H(r) : void 0,
|
|
1865
|
+
className: H ? "cursor-pointer" : void 0,
|
|
1827
1866
|
children: [
|
|
1828
|
-
|
|
1829
|
-
|
|
1867
|
+
y && /* @__PURE__ */ e(Se, { className: "w-11", onClick: (x) => x.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1868
|
+
De,
|
|
1830
1869
|
{
|
|
1831
1870
|
"aria-label": "Select row",
|
|
1832
1871
|
checked: p,
|
|
1833
|
-
onCheckedChange: () =>
|
|
1872
|
+
onCheckedChange: () => Jt(d)
|
|
1834
1873
|
}
|
|
1835
1874
|
) }),
|
|
1836
|
-
|
|
1837
|
-
|
|
1875
|
+
O.map((x) => /* @__PURE__ */ e(
|
|
1876
|
+
Se,
|
|
1838
1877
|
{
|
|
1839
|
-
"data-numeric":
|
|
1840
|
-
className: o(
|
|
1841
|
-
children:
|
|
1878
|
+
"data-numeric": x.numeric ? "" : void 0,
|
|
1879
|
+
className: o(x.align === "right" && "text-right", x.className),
|
|
1880
|
+
children: x.cell(r)
|
|
1842
1881
|
},
|
|
1843
|
-
|
|
1882
|
+
x.id
|
|
1844
1883
|
)),
|
|
1845
|
-
|
|
1884
|
+
f && /* @__PURE__ */ e(Se, { className: "w-44 px-4 text-right", onClick: (x) => x.stopPropagation(), children: f(r) })
|
|
1846
1885
|
]
|
|
1847
1886
|
},
|
|
1848
1887
|
d
|
|
@@ -1850,43 +1889,43 @@ function Tr({
|
|
|
1850
1889
|
}) })
|
|
1851
1890
|
]
|
|
1852
1891
|
}
|
|
1853
|
-
)
|
|
1892
|
+
) })
|
|
1854
1893
|
}
|
|
1855
1894
|
),
|
|
1856
|
-
|
|
1895
|
+
Vt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1857
1896
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1858
1897
|
le + 1,
|
|
1859
1898
|
"–",
|
|
1860
|
-
Math.min(le + _,
|
|
1899
|
+
Math.min(le + _, F.length),
|
|
1861
1900
|
" of ",
|
|
1862
|
-
|
|
1901
|
+
F.length
|
|
1863
1902
|
] }),
|
|
1864
1903
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1865
|
-
/* @__PURE__ */ s(
|
|
1866
|
-
/* @__PURE__ */ e(
|
|
1867
|
-
/* @__PURE__ */ e(
|
|
1904
|
+
/* @__PURE__ */ s(or, { value: String(_), onValueChange: (r) => Bt(Number(r)), children: [
|
|
1905
|
+
/* @__PURE__ */ e(Rt, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(ir, {}) }),
|
|
1906
|
+
/* @__PURE__ */ e(jt, { children: A.map((r) => /* @__PURE__ */ e(Le, { value: String(r), children: r }, r)) })
|
|
1868
1907
|
] }),
|
|
1869
1908
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
1870
1909
|
/* @__PURE__ */ e(
|
|
1871
|
-
|
|
1910
|
+
M,
|
|
1872
1911
|
{
|
|
1873
1912
|
variant: "secondary",
|
|
1874
1913
|
size: "icon",
|
|
1875
1914
|
"aria-label": "Previous page",
|
|
1876
|
-
disabled:
|
|
1915
|
+
disabled: W <= 0,
|
|
1877
1916
|
onClick: () => re((r) => Math.max(0, r - 1)),
|
|
1878
|
-
children: /* @__PURE__ */ e(
|
|
1917
|
+
children: /* @__PURE__ */ e(ba, {})
|
|
1879
1918
|
}
|
|
1880
1919
|
),
|
|
1881
1920
|
/* @__PURE__ */ e(
|
|
1882
|
-
|
|
1921
|
+
M,
|
|
1883
1922
|
{
|
|
1884
1923
|
variant: "secondary",
|
|
1885
1924
|
size: "icon",
|
|
1886
1925
|
"aria-label": "Next page",
|
|
1887
|
-
disabled:
|
|
1888
|
-
onClick: () => re((r) => Math.min(
|
|
1889
|
-
children: /* @__PURE__ */ e(
|
|
1926
|
+
disabled: W >= U - 1,
|
|
1927
|
+
onClick: () => re((r) => Math.min(U - 1, r + 1)),
|
|
1928
|
+
children: /* @__PURE__ */ e(ut, {})
|
|
1890
1929
|
}
|
|
1891
1930
|
)
|
|
1892
1931
|
] })
|
|
@@ -1894,8 +1933,8 @@ function Tr({
|
|
|
1894
1933
|
] })
|
|
1895
1934
|
] });
|
|
1896
1935
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return /* @__PURE__ */ e(
|
|
1936
|
+
function Lr({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
1937
|
+
return /* @__PURE__ */ e(be, { className: i, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1899
1938
|
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,
|
|
1900
1939
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1901
1940
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
|
|
@@ -1904,7 +1943,7 @@ function Mr({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
|
1904
1943
|
l
|
|
1905
1944
|
] }) });
|
|
1906
1945
|
}
|
|
1907
|
-
function
|
|
1946
|
+
function Ar({ className: t, ...a }) {
|
|
1908
1947
|
return /* @__PURE__ */ e(
|
|
1909
1948
|
"kbd",
|
|
1910
1949
|
{
|
|
@@ -1916,8 +1955,8 @@ function Pr({ className: t, ...a }) {
|
|
|
1916
1955
|
}
|
|
1917
1956
|
);
|
|
1918
1957
|
}
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1958
|
+
const mr = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1959
|
+
ya.Root,
|
|
1921
1960
|
{
|
|
1922
1961
|
ref: n,
|
|
1923
1962
|
className: o(
|
|
@@ -1927,8 +1966,8 @@ const lr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1927
1966
|
...a
|
|
1928
1967
|
}
|
|
1929
1968
|
));
|
|
1930
|
-
|
|
1931
|
-
function
|
|
1969
|
+
mr.displayName = "Label";
|
|
1970
|
+
function Br({
|
|
1932
1971
|
value: t,
|
|
1933
1972
|
onValueChange: a,
|
|
1934
1973
|
options: n,
|
|
@@ -1936,7 +1975,7 @@ function Ir({
|
|
|
1936
1975
|
className: i,
|
|
1937
1976
|
...u
|
|
1938
1977
|
}) {
|
|
1939
|
-
const m =
|
|
1978
|
+
const m = fe();
|
|
1940
1979
|
return /* @__PURE__ */ e(
|
|
1941
1980
|
"div",
|
|
1942
1981
|
{
|
|
@@ -1948,7 +1987,7 @@ function Ir({
|
|
|
1948
1987
|
i
|
|
1949
1988
|
),
|
|
1950
1989
|
children: n.map((c) => {
|
|
1951
|
-
const
|
|
1990
|
+
const v = c.value === t;
|
|
1952
1991
|
return /* @__PURE__ */ s(
|
|
1953
1992
|
"label",
|
|
1954
1993
|
{
|
|
@@ -1956,7 +1995,7 @@ function Ir({
|
|
|
1956
1995
|
"inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
|
|
1957
1996
|
"has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
|
|
1958
1997
|
l === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
|
|
1959
|
-
|
|
1998
|
+
v ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
|
|
1960
1999
|
),
|
|
1961
2000
|
children: [
|
|
1962
2001
|
/* @__PURE__ */ e(
|
|
@@ -1965,7 +2004,7 @@ function Ir({
|
|
|
1965
2004
|
type: "radio",
|
|
1966
2005
|
name: m,
|
|
1967
2006
|
value: c.value,
|
|
1968
|
-
checked:
|
|
2007
|
+
checked: v,
|
|
1969
2008
|
onChange: () => a(c.value),
|
|
1970
2009
|
className: "sr-only"
|
|
1971
2010
|
}
|
|
@@ -1980,8 +2019,8 @@ function Ir({
|
|
|
1980
2019
|
}
|
|
1981
2020
|
);
|
|
1982
2021
|
}
|
|
1983
|
-
const
|
|
1984
|
-
|
|
2022
|
+
const pr = b(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
2023
|
+
Na.Root,
|
|
1985
2024
|
{
|
|
1986
2025
|
ref: i,
|
|
1987
2026
|
decorative: n,
|
|
@@ -1994,8 +2033,8 @@ const ir = f(({ className: t, orientation: a = "horizontal", decorative: n = !0,
|
|
|
1994
2033
|
...l
|
|
1995
2034
|
}
|
|
1996
2035
|
));
|
|
1997
|
-
|
|
1998
|
-
function
|
|
2036
|
+
pr.displayName = "Separator";
|
|
2037
|
+
function Fr({ className: t, ...a }) {
|
|
1999
2038
|
return /* @__PURE__ */ e(
|
|
2000
2039
|
"div",
|
|
2001
2040
|
{
|
|
@@ -2004,8 +2043,8 @@ function jr({ className: t, ...a }) {
|
|
|
2004
2043
|
}
|
|
2005
2044
|
);
|
|
2006
2045
|
}
|
|
2007
|
-
const
|
|
2008
|
-
|
|
2046
|
+
const $r = Q.Provider, qr = Q.Root, Gr = Q.Trigger, fr = b(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(Q.Portal, { children: /* @__PURE__ */ e(
|
|
2047
|
+
Q.Content,
|
|
2009
2048
|
{
|
|
2010
2049
|
ref: l,
|
|
2011
2050
|
sideOffset: a,
|
|
@@ -2022,82 +2061,82 @@ const Er = Y.Provider, _r = Y.Root, Lr = Y.Trigger, or = f(({ className: t, side
|
|
|
2022
2061
|
...n
|
|
2023
2062
|
}
|
|
2024
2063
|
) }));
|
|
2025
|
-
|
|
2064
|
+
fr.displayName = "TooltipContent";
|
|
2026
2065
|
export {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2066
|
+
wr as AgentPrompt,
|
|
2067
|
+
bt as Avatar,
|
|
2068
|
+
gt as AvatarFallback,
|
|
2069
|
+
ht as AvatarImage,
|
|
2070
|
+
Ta as Badge,
|
|
2071
|
+
M as Button,
|
|
2072
|
+
Cr as Callout,
|
|
2073
|
+
Ba as Card,
|
|
2074
|
+
qa as CardContent,
|
|
2075
|
+
$a as CardDescription,
|
|
2076
|
+
Ga as CardFooter,
|
|
2077
|
+
xt as CardHeader,
|
|
2078
|
+
Fa as CardTitle,
|
|
2079
|
+
De as Checkbox,
|
|
2080
|
+
Tr as ChoiceDialog,
|
|
2081
|
+
Mr as CodeBlock,
|
|
2082
|
+
_r as DataTable,
|
|
2083
|
+
Er as DataTableIdentity,
|
|
2084
|
+
Ua as Dialog,
|
|
2085
|
+
Ka as DialogBody,
|
|
2086
|
+
Ct as DialogCancel,
|
|
2087
|
+
Dr as DialogClose,
|
|
2088
|
+
kt as DialogContent,
|
|
2089
|
+
Za as DialogDescription,
|
|
2090
|
+
Ya as DialogFooter,
|
|
2091
|
+
Qa as DialogHeader,
|
|
2092
|
+
Ja as DialogPanel,
|
|
2093
|
+
zt as DialogTitle,
|
|
2094
|
+
wt as DialogTrigger,
|
|
2095
|
+
ze as DropdownMenu,
|
|
2096
|
+
K as DropdownMenuCheckboxItem,
|
|
2097
|
+
Pt as DropdownMenuChevron,
|
|
2098
|
+
de as DropdownMenuContent,
|
|
2099
|
+
Pr as DropdownMenuGroup,
|
|
2100
|
+
pe as DropdownMenuItem,
|
|
2101
|
+
ce as DropdownMenuLabel,
|
|
2102
|
+
Ir as DropdownMenuPortal,
|
|
2103
|
+
Me as DropdownMenuSeparator,
|
|
2104
|
+
Rr as DropdownMenuSub,
|
|
2105
|
+
lr as DropdownMenuSubContent,
|
|
2106
|
+
It as DropdownMenuSubTrigger,
|
|
2107
|
+
se as DropdownMenuTrigger,
|
|
2108
|
+
Lr as EmptyState,
|
|
2109
|
+
Tt as Input,
|
|
2110
|
+
Ar as Kbd,
|
|
2111
|
+
mr as Label,
|
|
2112
|
+
tr as RadioCard,
|
|
2113
|
+
er as RadioGroup,
|
|
2114
|
+
Br as Segmented,
|
|
2115
|
+
or as Select,
|
|
2116
|
+
jt as SelectContent,
|
|
2117
|
+
jr as SelectGroup,
|
|
2118
|
+
Le as SelectItem,
|
|
2119
|
+
sr as SelectLabel,
|
|
2120
|
+
Rt as SelectTrigger,
|
|
2121
|
+
ir as SelectValue,
|
|
2122
|
+
pr as Separator,
|
|
2123
|
+
Fr as Skeleton,
|
|
2124
|
+
Ca as Spinner,
|
|
2125
|
+
Sr as Table,
|
|
2126
|
+
Ra as TableBody,
|
|
2127
|
+
Se as TableCell,
|
|
2128
|
+
Pa as TableContainer,
|
|
2129
|
+
dr as TableEmptyState,
|
|
2130
|
+
zr as TableHead,
|
|
2131
|
+
kr as TableHeader,
|
|
2132
|
+
Ia as TablePanel,
|
|
2133
|
+
ja as TableRow,
|
|
2134
|
+
be as TableSurface,
|
|
2135
|
+
qr as Tooltip,
|
|
2136
|
+
fr as TooltipContent,
|
|
2137
|
+
$r as TooltipProvider,
|
|
2138
|
+
Gr as TooltipTrigger,
|
|
2139
|
+
za as badgeVariants,
|
|
2140
|
+
Sa as buttonVariants
|
|
2102
2141
|
};
|
|
2103
2142
|
//# sourceMappingURL=index.js.map
|