@jinaan/uikit 0.1.39 → 0.1.41
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 +3 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/index.js +691 -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 +188 -114
- 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 f, useState 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 ta, Robot as aa, Terminal as ra, Check as Z, Copy as ct, XCircle as na, Warning as la, CheckCircle as ia, Info as oa, Minus as sa, X as ue, CaretDown as me, CaretRight as ut, MagnifyingGlass as da, Columns as ca, Lock as ua, DotsSixVertical as ma, FunnelSimple as rt, WarningCircle as pa, CaretUp as fa, CaretUpDown as ba, CaretLeft as ha } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as f, useState as D, Children as mt, isValidElement as pt, useRef as j, useEffect as K, useContext as V, useCallback as ft, createContext as ee, useId as fe, useMemo as nt, useLayoutEffect as ga } from "react";
|
|
4
|
+
import { Slot as xa } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as Ie } from "class-variance-authority";
|
|
6
|
+
import { clsx as va } from "clsx";
|
|
7
|
+
import { twMerge as ya } 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
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
11
|
+
import * as T from "@radix-ui/react-dropdown-menu";
|
|
12
|
+
import * as P from "@radix-ui/react-select";
|
|
13
|
+
import * as Na from "@radix-ui/react-label";
|
|
14
|
+
import * as wa from "@radix-ui/react-separator";
|
|
15
15
|
import * as Y from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return ya(va(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ca(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 Sa({ className: t }) {
|
|
26
26
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
27
|
+
ta,
|
|
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 ka = 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
|
+
), za = {
|
|
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 = f(
|
|
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:
|
|
78
|
+
fullWidth: v = !1,
|
|
79
79
|
disabled: b,
|
|
80
|
-
children:
|
|
81
|
-
...
|
|
82
|
-
},
|
|
83
|
-
const
|
|
80
|
+
children: x,
|
|
81
|
+
...w
|
|
82
|
+
}, S) => {
|
|
83
|
+
const y = l ? xa : "button", C = za[n ?? "md"];
|
|
84
84
|
return /* @__PURE__ */ e(
|
|
85
|
-
|
|
85
|
+
y,
|
|
86
86
|
{
|
|
87
|
-
ref:
|
|
87
|
+
ref: S,
|
|
88
88
|
"aria-busy": c || void 0,
|
|
89
89
|
disabled: l ? void 0 : b || c,
|
|
90
90
|
className: o(
|
|
91
|
-
|
|
91
|
+
ka({ 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
|
+
...w,
|
|
98
|
+
children: l ? x : /* @__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", C), "aria-hidden": !0, children: i }) : null,
|
|
109
|
+
x,
|
|
110
|
+
!c && u ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", C), "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(Sa, { className: o("text-current", C) })
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
@@ -128,14 +128,14 @@ const ga = De(
|
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
M.displayName = "Button";
|
|
132
|
+
function Cr({
|
|
133
133
|
command: t,
|
|
134
134
|
tag: a = "Build with agents",
|
|
135
135
|
icon: n,
|
|
136
136
|
className: l
|
|
137
137
|
}) {
|
|
138
|
-
const [i, u] =
|
|
138
|
+
const [i, u] = D(!1), m = async () => {
|
|
139
139
|
try {
|
|
140
140
|
await navigator.clipboard.writeText(t), u(!0), window.setTimeout(() => u(!1), 1500);
|
|
141
141
|
} catch {
|
|
@@ -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(aa, { 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(ra, { 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(Z, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(
|
|
161
|
+
children: i ? /* @__PURE__ */ e(Z, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(ct, {})
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const bt = f(({ 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 = f(({ 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 = f(({ 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 Da = 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
|
+
), Ta = 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 Ma({ className: t, variant: a, dot: n = !1, children: l, ...i }) {
|
|
231
|
+
return /* @__PURE__ */ s("span", { className: o(Da({ variant: a }), t), ...i, children: [
|
|
232
|
+
n ? /* @__PURE__ */ e("span", { className: o(Ta({ variant: a })), "aria-hidden": !0 }) : null,
|
|
233
233
|
l
|
|
234
234
|
] });
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Pa = {
|
|
237
237
|
info: {
|
|
238
|
-
Icon:
|
|
238
|
+
Icon: oa,
|
|
239
239
|
className: "border-info/30 bg-info/10",
|
|
240
240
|
iconClassName: "text-info"
|
|
241
241
|
},
|
|
242
242
|
success: {
|
|
243
|
-
Icon:
|
|
243
|
+
Icon: ia,
|
|
244
244
|
className: "border-success/30 bg-success/10",
|
|
245
245
|
iconClassName: "text-success"
|
|
246
246
|
},
|
|
247
247
|
warning: {
|
|
248
|
-
Icon:
|
|
248
|
+
Icon: la,
|
|
249
249
|
className: "border-warning/30 bg-warning/10",
|
|
250
250
|
iconClassName: "text-warning"
|
|
251
251
|
},
|
|
252
252
|
error: {
|
|
253
|
-
Icon:
|
|
253
|
+
Icon: na,
|
|
254
254
|
className: "border-error/30 bg-error/10",
|
|
255
255
|
iconClassName: "text-error"
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Sr({
|
|
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 } = Pa[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 Ia({
|
|
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 Ra({
|
|
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 kr({ 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 zr({ className: t, ...a }) {
|
|
326
326
|
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function ja({ className: t, ...a }) {
|
|
329
329
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Ea({ 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 Dr({ 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 _a = {
|
|
368
368
|
default: "bg-table-container",
|
|
369
369
|
muted: "bg-surface border border-line",
|
|
370
370
|
transparent: "bg-transparent"
|
|
371
|
-
},
|
|
371
|
+
}, La = {
|
|
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 Aa(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: b
|
|
388
|
+
panelClassName: v,
|
|
389
|
+
minHeight: b,
|
|
390
|
+
scrollMode: x = "surface",
|
|
391
|
+
headerContentRef: w
|
|
390
392
|
}) {
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
+
const S = !!(t || a), y = x === "panel", C = Aa(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, k = 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
|
+
y && "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
|
+
C && "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
|
+
y ? /* @__PURE__ */ e("div", { ref: w, children: n }) : n
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
) : null, h = /* @__PURE__ */ e(
|
|
440
|
+
Ra,
|
|
441
|
+
{
|
|
442
|
+
className: o(La[u], v),
|
|
443
|
+
style: b ? { minHeight: b } : void 0,
|
|
444
|
+
children: l
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
return /* @__PURE__ */ s(Ia, { className: o("relative", _a[u], m), children: [
|
|
448
|
+
y ? /* @__PURE__ */ s(Pe, { children: [
|
|
449
|
+
k,
|
|
450
|
+
h
|
|
451
|
+
] }) : /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
452
|
+
k,
|
|
453
|
+
h
|
|
435
454
|
] }),
|
|
436
|
-
|
|
455
|
+
C ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: C }) }) : null
|
|
437
456
|
] });
|
|
438
457
|
}
|
|
439
|
-
function
|
|
440
|
-
const a =
|
|
441
|
-
(l) =>
|
|
458
|
+
function Ba(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 Fa = f(
|
|
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 } = Ba(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
|
+
Fa.displayName = "Card";
|
|
474
|
+
const xt = f(({ 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 $a = f(({ 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
|
+
$a.displayName = "CardTitle";
|
|
495
|
+
const qa = f(({ 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
|
+
qa.displayName = "CardDescription";
|
|
508
|
+
const Ga = f(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...a }));
|
|
509
|
+
Ga.displayName = "CardContent";
|
|
510
|
+
const Ha = f(({ 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
|
+
Ha.displayName = "CardFooter";
|
|
522
|
+
const De = f(({ 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(sa, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(Z, { 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 Va(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 H = 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,108 +561,108 @@ 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 && (H = { rect: n, at: Date.now() });
|
|
551
570
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
571
|
+
function Wa() {
|
|
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 Oa(t) {
|
|
585
|
+
if (H && Date.now() - H.at < 2e3) {
|
|
586
|
+
const n = H.rect;
|
|
587
|
+
return H = null, n;
|
|
569
588
|
}
|
|
570
|
-
|
|
589
|
+
H = 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 Ua = 250, yt = ee(!1), Nt = ee(() => {
|
|
594
|
+
}), Ee = ee(!1);
|
|
595
|
+
function Xa({
|
|
577
596
|
open: t,
|
|
578
597
|
defaultOpen: a,
|
|
579
598
|
onOpenChange: n,
|
|
580
599
|
children: l,
|
|
581
600
|
...i
|
|
582
601
|
}) {
|
|
583
|
-
const [u, m] =
|
|
602
|
+
const [u, m] = D(
|
|
584
603
|
a ?? !1
|
|
585
|
-
), [c,
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
t && (
|
|
590
|
-
}, [t]),
|
|
604
|
+
), [c, v] = D(!1), b = j(!1), x = j(null), w = t ?? u, S = j(w);
|
|
605
|
+
S.current = w;
|
|
606
|
+
const y = t !== void 0;
|
|
607
|
+
K(() => Wa(), []), K(() => {
|
|
608
|
+
t && (x.current && clearTimeout(x.current), b.current = !1, v(!1));
|
|
609
|
+
}, [t]), K(
|
|
591
610
|
() => () => {
|
|
592
|
-
|
|
611
|
+
x.current && clearTimeout(x.current);
|
|
593
612
|
},
|
|
594
613
|
[]
|
|
595
614
|
);
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
|
|
615
|
+
const C = (k) => {
|
|
616
|
+
if (k) {
|
|
617
|
+
x.current && clearTimeout(x.current), b.current = !1, v(!1), y || m(!0), n == null || n(!0);
|
|
599
618
|
return;
|
|
600
619
|
}
|
|
601
|
-
if (!
|
|
620
|
+
if (!w || b.current) return;
|
|
602
621
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
603
|
-
|
|
622
|
+
y || m(!1), n == null || n(!1);
|
|
604
623
|
return;
|
|
605
624
|
}
|
|
606
|
-
b.current = !0,
|
|
607
|
-
|
|
608
|
-
|
|
625
|
+
b.current = !0, v(!0), x.current = setTimeout(() => {
|
|
626
|
+
y || m(!1), n == null || n(!1), requestAnimationFrame(() => {
|
|
627
|
+
S.current && (b.current = !1, v(!1));
|
|
609
628
|
});
|
|
610
|
-
},
|
|
629
|
+
}, Ua);
|
|
611
630
|
};
|
|
612
|
-
return /* @__PURE__ */ e(
|
|
631
|
+
return /* @__PURE__ */ e(Nt.Provider, { value: () => C(!1), children: /* @__PURE__ */ e(yt.Provider, { value: c, children: /* @__PURE__ */ e(Ee.Provider, { value: !0, children: /* @__PURE__ */ e(
|
|
613
632
|
I.Root,
|
|
614
633
|
{
|
|
615
|
-
open:
|
|
616
|
-
onOpenChange:
|
|
634
|
+
open: w,
|
|
635
|
+
onOpenChange: C,
|
|
617
636
|
...i,
|
|
618
637
|
children: l
|
|
619
638
|
}
|
|
620
639
|
) }) }) });
|
|
621
640
|
}
|
|
622
|
-
const
|
|
641
|
+
const wt = f(({ 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 Tr = I.Close, Ct = f(
|
|
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 = Oa(t), i = l ? Va(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 Ja(t) {
|
|
656
675
|
return t.replace(/dvh\b/g, "vh");
|
|
657
676
|
}
|
|
658
|
-
const
|
|
677
|
+
const kt = f(
|
|
659
678
|
({
|
|
660
679
|
className: t,
|
|
661
680
|
children: a,
|
|
@@ -665,18 +684,18 @@ const xt = f(
|
|
|
665
684
|
style: u,
|
|
666
685
|
onEscapeKeyDown: m,
|
|
667
686
|
onPointerDownOutside: c,
|
|
668
|
-
...
|
|
687
|
+
...v
|
|
669
688
|
}, b) => {
|
|
670
|
-
const
|
|
689
|
+
const x = V(yt), w = n === "top", S = w ? {
|
|
671
690
|
"--dialog-top-offset": l,
|
|
672
|
-
"--dialog-top-offset-fallback":
|
|
673
|
-
} : void 0,
|
|
674
|
-
(
|
|
675
|
-
if (
|
|
676
|
-
b(
|
|
691
|
+
"--dialog-top-offset-fallback": Ja(l)
|
|
692
|
+
} : void 0, y = V(Nt), C = j(null), k = ft(
|
|
693
|
+
(h) => {
|
|
694
|
+
if (C.current = h, h && i === "auto" && St(h), typeof b == "function") {
|
|
695
|
+
b(h);
|
|
677
696
|
return;
|
|
678
697
|
}
|
|
679
|
-
b && (b.current =
|
|
698
|
+
b && (b.current = h);
|
|
680
699
|
},
|
|
681
700
|
[i, b]
|
|
682
701
|
);
|
|
@@ -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
|
+
!x && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
709
|
+
x && "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
|
+
w ? "items-start" : "items-center"
|
|
707
726
|
),
|
|
708
727
|
children: /* @__PURE__ */ s(
|
|
709
728
|
I.Content,
|
|
710
729
|
{
|
|
711
|
-
ref:
|
|
712
|
-
style:
|
|
730
|
+
ref: k,
|
|
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
|
+
w && "dialog-anchor-top",
|
|
717
736
|
i === "command" && "dialog-command-motion",
|
|
718
|
-
|
|
737
|
+
x && "dialog-closing",
|
|
719
738
|
"focus:outline-none",
|
|
720
739
|
t
|
|
721
740
|
),
|
|
722
|
-
onEscapeKeyDown: (
|
|
723
|
-
m == null || m(
|
|
741
|
+
onEscapeKeyDown: (h) => {
|
|
742
|
+
m == null || m(h), !h.defaultPrevented && (h.preventDefault(), y());
|
|
724
743
|
},
|
|
725
|
-
onPointerDownOutside: (
|
|
726
|
-
c == null || c(
|
|
744
|
+
onPointerDownOutside: (h) => {
|
|
745
|
+
c == null || c(h), !h.defaultPrevented && (h.preventDefault(), y());
|
|
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 Ka({
|
|
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 Qa({
|
|
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 Ya({
|
|
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 Za({
|
|
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 = f(({ className: t, ...a }, n) => {
|
|
825
|
+
const l = V(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 er = f(({ className: t, ...a }, n) => {
|
|
837
|
+
const l = V(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
|
+
er.displayName = "DialogDescription";
|
|
848
|
+
const Dt = ee(null);
|
|
849
|
+
function tr({
|
|
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(), b = i ?? v;
|
|
860
|
+
return /* @__PURE__ */ e(Dt.Provider, { value: { name: b, 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 ar({
|
|
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 = V(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, b = 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: [
|
|
@@ -871,10 +890,10 @@ function Xa({
|
|
|
871
890
|
name: m.name,
|
|
872
891
|
value: t,
|
|
873
892
|
checked: b,
|
|
874
|
-
disabled:
|
|
893
|
+
disabled: v,
|
|
875
894
|
onChange: () => {
|
|
876
|
-
var
|
|
877
|
-
return (
|
|
895
|
+
var x;
|
|
896
|
+
return (x = m.onChange) == null ? void 0 : x.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(Ma, { 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 Mr({
|
|
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:
|
|
933
|
+
cancelLabel: v = "Cancel",
|
|
915
934
|
confirmLabel: b = "Continue",
|
|
916
|
-
onConfirm:
|
|
935
|
+
onConfirm: x
|
|
917
936
|
}) {
|
|
918
|
-
var
|
|
919
|
-
const [
|
|
920
|
-
return /* @__PURE__ */ s(
|
|
921
|
-
n ? /* @__PURE__ */ e(
|
|
937
|
+
var k;
|
|
938
|
+
const [w, S] = D(u ?? ((k = i[0]) == null ? void 0 : k.value) ?? ""), y = m ?? w;
|
|
939
|
+
return /* @__PURE__ */ s(Xa, { 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(Ka, { children: [
|
|
948
|
+
/* @__PURE__ */ e(Ya, { children: /* @__PURE__ */ e(zt, { className: "text-xl", children: l }) }),
|
|
949
|
+
/* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ e(tr, { label: l, value: y, onChange: (h) => {
|
|
950
|
+
m === void 0 && S(h), c == null || c(h);
|
|
951
|
+
}, children: i.map((h) => /* @__PURE__ */ e(
|
|
952
|
+
ar,
|
|
934
953
|
{
|
|
935
|
-
value:
|
|
936
|
-
title:
|
|
937
|
-
description:
|
|
938
|
-
badge:
|
|
954
|
+
value: h.value,
|
|
955
|
+
title: h.title,
|
|
956
|
+
description: h.description,
|
|
957
|
+
badge: h.badge
|
|
939
958
|
},
|
|
940
|
-
|
|
959
|
+
h.value
|
|
941
960
|
)) }) })
|
|
942
961
|
] }),
|
|
943
|
-
/* @__PURE__ */ s(
|
|
944
|
-
/* @__PURE__ */ e(
|
|
945
|
-
/* @__PURE__ */ e(
|
|
962
|
+
/* @__PURE__ */ s(Za, { className: "gap-3 pt-2.5", children: [
|
|
963
|
+
/* @__PURE__ */ e(Ct, { className: "flex-1", children: v }),
|
|
964
|
+
/* @__PURE__ */ e(M, { className: "flex-1", onClick: () => x == null ? void 0 : x(y), children: b })
|
|
946
965
|
] })
|
|
947
966
|
]
|
|
948
967
|
}
|
|
949
968
|
)
|
|
950
969
|
] });
|
|
951
970
|
}
|
|
952
|
-
function
|
|
953
|
-
const [l, i] =
|
|
971
|
+
function Pr({ code: t, label: a, className: n }) {
|
|
972
|
+
const [l, i] = D(!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(Z, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(
|
|
980
|
+
icon: l ? /* @__PURE__ */ e(Z, { 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 rr = {
|
|
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
|
+
}, nr = {
|
|
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
|
+
}, lr = {
|
|
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 = f(
|
|
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:
|
|
1029
|
+
defaultValue: v,
|
|
1011
1030
|
error: b = !1,
|
|
1012
|
-
helperText:
|
|
1013
|
-
id:
|
|
1014
|
-
"aria-describedby":
|
|
1015
|
-
disabled:
|
|
1016
|
-
readOnly:
|
|
1017
|
-
...
|
|
1018
|
-
},
|
|
1019
|
-
const
|
|
1031
|
+
helperText: x,
|
|
1032
|
+
id: w,
|
|
1033
|
+
"aria-describedby": S,
|
|
1034
|
+
disabled: y,
|
|
1035
|
+
readOnly: C,
|
|
1036
|
+
...k
|
|
1037
|
+
}, h) => {
|
|
1038
|
+
const _ = fe(), B = w ?? _, W = !!x, F = !!(m && (c !== void 0 ? String(c).length > 0 : v !== void 0 && String(v).length > 0)), te = W ? `${B}-description` : void 0, he = [S, te].filter(Boolean).join(" ") || void 0, ae = /* @__PURE__ */ e(
|
|
1020
1039
|
"input",
|
|
1021
1040
|
{
|
|
1022
|
-
ref:
|
|
1023
|
-
id:
|
|
1041
|
+
ref: h,
|
|
1042
|
+
id: B,
|
|
1024
1043
|
type: n,
|
|
1025
|
-
disabled:
|
|
1026
|
-
readOnly:
|
|
1044
|
+
disabled: y,
|
|
1045
|
+
readOnly: C,
|
|
1027
1046
|
"aria-invalid": b || void 0,
|
|
1028
|
-
"aria-describedby":
|
|
1029
|
-
style: i || u ||
|
|
1047
|
+
"aria-describedby": he,
|
|
1048
|
+
style: i || u || F ? {
|
|
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 || F ? `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
|
+
rr[l],
|
|
1055
|
+
nr[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
1059
|
b && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
1041
1060
|
!b && "border-(--input-border)",
|
|
1042
1061
|
n === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
|
|
1043
|
-
|
|
1044
|
-
|
|
1062
|
+
y && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
1063
|
+
C && "cursor-default focus-visible:ring-0",
|
|
1045
1064
|
t
|
|
1046
1065
|
),
|
|
1047
1066
|
value: c,
|
|
1048
|
-
defaultValue:
|
|
1049
|
-
...
|
|
1067
|
+
defaultValue: v,
|
|
1068
|
+
...k
|
|
1050
1069
|
}
|
|
1051
1070
|
);
|
|
1052
|
-
return !i && !u && !
|
|
1071
|
+
return !i && !u && !F && !W ? 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
|
+
lr[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
|
+
F ? /* @__PURE__ */ e(
|
|
1067
1086
|
"button",
|
|
1068
1087
|
{
|
|
1069
1088
|
type: "button",
|
|
@@ -1071,62 +1090,62 @@ 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
|
+
W ? /* @__PURE__ */ e(
|
|
1091
1110
|
"p",
|
|
1092
1111
|
{
|
|
1093
1112
|
id: te,
|
|
1094
1113
|
className: o("mt-1.5 text-xs", b ? "text-error" : "text-muted"),
|
|
1095
|
-
children:
|
|
1114
|
+
children: x
|
|
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 = ee(!1);
|
|
1134
|
+
function ze({
|
|
1116
1135
|
children: t,
|
|
1117
1136
|
...a
|
|
1118
1137
|
}) {
|
|
1119
|
-
const n =
|
|
1120
|
-
|
|
1138
|
+
const n = _e(t, [
|
|
1139
|
+
pe,
|
|
1121
1140
|
Q,
|
|
1122
|
-
|
|
1141
|
+
It
|
|
1123
1142
|
]) === 0;
|
|
1124
|
-
return /* @__PURE__ */ e(
|
|
1143
|
+
return /* @__PURE__ */ e(Mt.Provider, { value: n, children: /* @__PURE__ */ e(T.Root, { ...a, children: t }) });
|
|
1125
1144
|
}
|
|
1126
|
-
const
|
|
1127
|
-
const i =
|
|
1145
|
+
const se = f(({ className: t, disabled: a, ...n }, l) => {
|
|
1146
|
+
const i = V(Mt);
|
|
1128
1147
|
return /* @__PURE__ */ e(
|
|
1129
|
-
|
|
1148
|
+
T.Trigger,
|
|
1130
1149
|
{
|
|
1131
1150
|
ref: l,
|
|
1132
1151
|
className: o("group", t),
|
|
@@ -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 = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1159
|
+
me,
|
|
1141
1160
|
{
|
|
1142
1161
|
ref: n,
|
|
1143
1162
|
"aria-hidden": !0,
|
|
@@ -1148,9 +1167,9 @@ const Ct = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1148
1167
|
...a
|
|
1149
1168
|
}
|
|
1150
1169
|
));
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1170
|
+
Pt.displayName = "DropdownMenuChevron";
|
|
1171
|
+
const Ir = T.Group, Rr = T.Portal, de = f(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(T.Portal, { children: /* @__PURE__ */ e(
|
|
1172
|
+
T.Content,
|
|
1154
1173
|
{
|
|
1155
1174
|
ref: l,
|
|
1156
1175
|
sideOffset: a,
|
|
@@ -1167,9 +1186,9 @@ const Cr = D.Group, Sr = D.Portal, se = f(({ className: t, sideOffset: a = 8, ..
|
|
|
1167
1186
|
...n
|
|
1168
1187
|
}
|
|
1169
1188
|
) }));
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1189
|
+
de.displayName = "DropdownMenuContent";
|
|
1190
|
+
const pe = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
1191
|
+
T.Item,
|
|
1173
1192
|
{
|
|
1174
1193
|
ref: l,
|
|
1175
1194
|
className: o(
|
|
@@ -1182,9 +1201,9 @@ const me = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
|
|
|
1182
1201
|
...n
|
|
1183
1202
|
}
|
|
1184
1203
|
));
|
|
1185
|
-
|
|
1204
|
+
pe.displayName = "DropdownMenuItem";
|
|
1186
1205
|
const Q = f(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1187
|
-
|
|
1206
|
+
T.CheckboxItem,
|
|
1188
1207
|
{
|
|
1189
1208
|
ref: i,
|
|
1190
1209
|
className: o(
|
|
@@ -1194,23 +1213,23 @@ 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(
|
|
1216
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(T.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(Z, { className: "size-3", weight: "bold" }) }) }),
|
|
1198
1217
|
a
|
|
1199
1218
|
]
|
|
1200
1219
|
}
|
|
1201
1220
|
));
|
|
1202
1221
|
Q.displayName = "DropdownMenuCheckboxItem";
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1222
|
+
const ce = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1223
|
+
T.Label,
|
|
1205
1224
|
{
|
|
1206
1225
|
ref: n,
|
|
1207
1226
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1208
1227
|
...a
|
|
1209
1228
|
}
|
|
1210
1229
|
));
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1230
|
+
ce.displayName = "DropdownMenuLabel";
|
|
1231
|
+
const jr = T.Sub, It = f(({ className: t, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
|
|
1232
|
+
T.SubTrigger,
|
|
1214
1233
|
{
|
|
1215
1234
|
ref: i,
|
|
1216
1235
|
className: o(
|
|
@@ -1223,13 +1242,13 @@ 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
|
|
1232
|
-
|
|
1249
|
+
It.displayName = "DropdownMenuSubTrigger";
|
|
1250
|
+
const ir = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1251
|
+
T.SubContent,
|
|
1233
1252
|
{
|
|
1234
1253
|
ref: n,
|
|
1235
1254
|
sideOffset: 8,
|
|
@@ -1246,27 +1265,27 @@ const Za = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1246
1265
|
...a
|
|
1247
1266
|
}
|
|
1248
1267
|
));
|
|
1249
|
-
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1268
|
+
ir.displayName = "DropdownMenuSubContent";
|
|
1269
|
+
const Me = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1270
|
+
T.Separator,
|
|
1252
1271
|
{
|
|
1253
1272
|
ref: n,
|
|
1254
1273
|
className: o("-mx-1 my-1 h-px bg-line-strong", t),
|
|
1255
1274
|
...a
|
|
1256
1275
|
}
|
|
1257
1276
|
));
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1260
|
-
function
|
|
1277
|
+
Me.displayName = "DropdownMenuSeparator";
|
|
1278
|
+
const Er = P.Group, or = P.Value;
|
|
1279
|
+
function sr({
|
|
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 = f(({ 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 = f(
|
|
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 = f(({ 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(Z, { 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 dr = f(({ 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
|
+
dr.displayName = "SelectLabel";
|
|
1355
|
+
function cr({
|
|
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 ur = "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 mr(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 _r({
|
|
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: mr(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 Lr({
|
|
1385
1404
|
rows: t,
|
|
1386
1405
|
columns: a,
|
|
1387
1406
|
getRowId: n,
|
|
@@ -1390,116 +1409,124 @@ function Tr({
|
|
|
1390
1409
|
empty: u,
|
|
1391
1410
|
search: m,
|
|
1392
1411
|
filters: c,
|
|
1393
|
-
toolbarStart:
|
|
1412
|
+
toolbarStart: v,
|
|
1394
1413
|
toolbarEnd: b,
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1414
|
+
columnPicker: x = !0,
|
|
1415
|
+
tabs: w,
|
|
1416
|
+
activeTab: S,
|
|
1417
|
+
onTabChange: y,
|
|
1418
|
+
infoBanner: C,
|
|
1419
|
+
selectable: k = !1,
|
|
1420
|
+
bulkActions: h,
|
|
1421
|
+
rowActions: _,
|
|
1422
|
+
onRowClick: B,
|
|
1423
|
+
defaultSort: W,
|
|
1424
|
+
pageSize: F = 25,
|
|
1425
|
+
pageSizeOptions: te = [10, 25, 50, 100],
|
|
1426
|
+
pagination: he = "auto",
|
|
1427
|
+
tone: ae,
|
|
1428
|
+
headerAction: Et,
|
|
1429
|
+
headerClassName: _t,
|
|
1430
|
+
panelClassName: Lt,
|
|
1431
|
+
className: At
|
|
1412
1432
|
}) {
|
|
1413
|
-
const [
|
|
1433
|
+
const [Ae, Be] = D(
|
|
1414
1434
|
() => Object.fromEntries(
|
|
1415
1435
|
a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
|
|
1416
1436
|
)
|
|
1417
|
-
), [
|
|
1418
|
-
|
|
1419
|
-
), [
|
|
1420
|
-
const p = d ?
|
|
1421
|
-
!p ||
|
|
1422
|
-
const
|
|
1423
|
-
return
|
|
1437
|
+
), [Fe, $e] = D(null), [ge, qe] = D(null), [N, Bt] = D(
|
|
1438
|
+
W ?? null
|
|
1439
|
+
), [O, re] = D(0), [L, Ft] = D(F), [$, xe] = D(/* @__PURE__ */ new Set()), [$t, ve] = D([]), Ge = a.map((r) => r.id), He = new Map(a.map((r) => [r.id, r])), Ve = Fe ? Fe.map((r) => He.get(r)).filter((r) => !!r) : a, U = Ve.filter((r) => !Ae[r.id]), We = Ve.filter((r) => Ae[r.id] && !r.required), Oe = (r) => !!r.required, qt = (r) => He.get(r), Gt = (r, d) => {
|
|
1440
|
+
const p = d ? qt(d) : void 0;
|
|
1441
|
+
!p || Oe(p) || r === d || $e((g) => {
|
|
1442
|
+
const z = g ?? Ge;
|
|
1443
|
+
return Ca(z, z.indexOf(r), z.indexOf(d));
|
|
1424
1444
|
});
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1445
|
+
}, Ht = (r) => {
|
|
1446
|
+
Be((d) => ({ ...d, [r]: !1 })), $e((d) => d && d.includes(r) ? d : [...d ?? Ge, r]);
|
|
1447
|
+
}, ye = (c ?? []).filter((r) => $t.includes(r.id)), Vt = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ne = nt(() => {
|
|
1428
1448
|
let r = t;
|
|
1429
1449
|
for (const p of c ?? [])
|
|
1430
|
-
p.value.length > 0 && (r = r.filter((
|
|
1450
|
+
p.value.length > 0 && (r = r.filter((g) => p.match(g, p.value)));
|
|
1431
1451
|
if (!m || !m.value.trim()) return r;
|
|
1432
1452
|
const d = m.value.trim().toLowerCase();
|
|
1433
1453
|
return r.filter((p) => m.keys(p).toLowerCase().includes(d));
|
|
1434
|
-
}, [t, m, c]),
|
|
1435
|
-
if (!
|
|
1436
|
-
const r = a.find((p) => p.id ===
|
|
1454
|
+
}, [t, m, c]), q = nt(() => {
|
|
1455
|
+
if (!N) return ne;
|
|
1456
|
+
const r = a.find((p) => p.id === N.id);
|
|
1437
1457
|
if (!(r != null && r.sortValue)) return ne;
|
|
1438
|
-
const d =
|
|
1439
|
-
return [...ne].sort((p,
|
|
1440
|
-
const
|
|
1441
|
-
return
|
|
1458
|
+
const d = N.dir === "asc" ? 1 : -1;
|
|
1459
|
+
return [...ne].sort((p, g) => {
|
|
1460
|
+
const z = r.sortValue(p), R = r.sortValue(g);
|
|
1461
|
+
return z == null && R == null ? 0 : z == null ? 1 : R == null ? -1 : typeof z == "number" && typeof R == "number" ? (z - R) * d : String(z).localeCompare(String(R)) * d;
|
|
1442
1462
|
});
|
|
1443
|
-
}, [ne,
|
|
1444
|
-
|
|
1463
|
+
}, [ne, N, a]), X = Math.max(1, Math.ceil(q.length / L)), Wt = !l && !i && q.length > 0 && (he === "always" || q.length > L);
|
|
1464
|
+
K(() => {
|
|
1445
1465
|
re(0);
|
|
1446
|
-
}, [m == null ? void 0 : m.value,
|
|
1447
|
-
|
|
1448
|
-
}, [
|
|
1449
|
-
const le =
|
|
1450
|
-
r.sortable &&
|
|
1466
|
+
}, [m == null ? void 0 : m.value, L, N == null ? void 0 : N.id, N == null ? void 0 : N.dir, S, Vt]), K(() => {
|
|
1467
|
+
O > X - 1 && re(X - 1);
|
|
1468
|
+
}, [O, X]);
|
|
1469
|
+
const le = O * L, A = q.slice(le, le + L), Ot = (r) => {
|
|
1470
|
+
r.sortable && Bt(
|
|
1451
1471
|
(d) => (d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
|
|
1452
1472
|
);
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1473
|
+
}, Ue = A.length > 0 && A.every((r) => $.has(n(r))), Ut = A.some((r) => $.has(n(r))), Xt = t.filter((r) => $.has(n(r))), Jt = () => {
|
|
1474
|
+
xe((r) => {
|
|
1455
1475
|
const d = new Set(r);
|
|
1456
|
-
return
|
|
1476
|
+
return Ue ? A.forEach((p) => d.delete(n(p))) : A.forEach((p) => d.add(n(p))), d;
|
|
1457
1477
|
});
|
|
1458
|
-
},
|
|
1459
|
-
|
|
1478
|
+
}, Kt = (r) => {
|
|
1479
|
+
xe((d) => {
|
|
1460
1480
|
const p = new Set(d);
|
|
1461
1481
|
return p.has(r) ? p.delete(r) : p.add(r), p;
|
|
1462
1482
|
});
|
|
1463
|
-
},
|
|
1464
|
-
|
|
1465
|
-
|
|
1483
|
+
}, Qt = !!(m || c != null && c.length || v || b), Yt = (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), [G, Ne] = D([]), Zt = U.map((r) => r.id).join("\0"), ie = `${k ? "s" : "-"}|${_ ? "a" : "-"}|${Zt}`, Ye = j(ie), ea = G.length > 0, we = ft(() => {
|
|
1484
|
+
const r = Ke.current, d = Qe.current;
|
|
1485
|
+
r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
|
|
1486
|
+
}, []);
|
|
1487
|
+
ga(() => {
|
|
1488
|
+
const r = Xe.current;
|
|
1466
1489
|
if (!r) return;
|
|
1490
|
+
if (Ye.current !== ie) {
|
|
1491
|
+
Ye.current = ie, Ne((g) => g.length === 0 ? g : []);
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1467
1494
|
const d = () => {
|
|
1468
|
-
var
|
|
1469
|
-
const
|
|
1470
|
-
if (!
|
|
1471
|
-
|
|
1495
|
+
var Ze, et, tt;
|
|
1496
|
+
const g = (et = (Ze = r.tBodies[0]) == null ? void 0 : Ze.rows.item(0)) == null ? void 0 : et.cells;
|
|
1497
|
+
if (!g || g.length === 0) {
|
|
1498
|
+
Ne((E) => E.length === 0 ? E : []);
|
|
1472
1499
|
return;
|
|
1473
1500
|
}
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1476
|
-
(E,
|
|
1477
|
-
var
|
|
1501
|
+
const z = (tt = Je.current) == null ? void 0 : tt.querySelectorAll("thead th"), R = Array.from(
|
|
1502
|
+
g,
|
|
1503
|
+
(E, Ce) => {
|
|
1504
|
+
var oe, at;
|
|
1478
1505
|
return Math.max(
|
|
1479
|
-
|
|
1480
|
-
|
|
1506
|
+
E.getBoundingClientRect().width,
|
|
1507
|
+
((at = (oe = z == null ? void 0 : z.item(Ce)) == null ? void 0 : oe.querySelector("[data-col-sizer]")) == null ? void 0 : at.getBoundingClientRect().width) ?? 0
|
|
1481
1508
|
);
|
|
1482
1509
|
}
|
|
1483
1510
|
);
|
|
1484
|
-
|
|
1485
|
-
(E) => E.length ===
|
|
1511
|
+
Ne(
|
|
1512
|
+
(E) => E.length === R.length && E.every((Ce, oe) => Ce === R[oe]) ? E : R
|
|
1486
1513
|
);
|
|
1487
1514
|
};
|
|
1488
|
-
if (d(), typeof ResizeObserver > "u") return;
|
|
1515
|
+
if (d(), we(), typeof ResizeObserver > "u") return;
|
|
1489
1516
|
const p = new ResizeObserver(d);
|
|
1490
1517
|
return p.observe(r), () => p.disconnect();
|
|
1491
|
-
}, [
|
|
1492
|
-
const
|
|
1493
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1494
|
-
|
|
1495
|
-
const d = r.id ===
|
|
1518
|
+
}, [ie, ea, l, i, we]);
|
|
1519
|
+
const J = G.reduce((r, d) => r + d, 0);
|
|
1520
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", At), children: [
|
|
1521
|
+
w && w.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: w.map((r) => {
|
|
1522
|
+
const d = r.id === S;
|
|
1496
1523
|
return /* @__PURE__ */ e(
|
|
1497
1524
|
"button",
|
|
1498
1525
|
{
|
|
1499
1526
|
type: "button",
|
|
1500
1527
|
role: "tab",
|
|
1501
1528
|
"aria-selected": d,
|
|
1502
|
-
onClick: () =>
|
|
1529
|
+
onClick: () => y == null ? void 0 : y(r.id),
|
|
1503
1530
|
className: o(
|
|
1504
1531
|
"-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
|
|
1505
1532
|
d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
|
|
@@ -1509,9 +1536,9 @@ function Tr({
|
|
|
1509
1536
|
r.id
|
|
1510
1537
|
);
|
|
1511
1538
|
}) }),
|
|
1512
|
-
|
|
1539
|
+
Qt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1513
1540
|
m && /* @__PURE__ */ e(
|
|
1514
|
-
|
|
1541
|
+
Tt,
|
|
1515
1542
|
{
|
|
1516
1543
|
type: "search",
|
|
1517
1544
|
"aria-label": m.placeholder ?? "Search",
|
|
@@ -1519,27 +1546,27 @@ function Tr({
|
|
|
1519
1546
|
value: m.value,
|
|
1520
1547
|
onChange: (r) => m.onChange(r.target.value),
|
|
1521
1548
|
onClear: () => m.onChange(""),
|
|
1522
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1549
|
+
leadingIcon: /* @__PURE__ */ e(da, {}),
|
|
1523
1550
|
containerClassName: "w-full sm:w-[280px]",
|
|
1524
1551
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1525
1552
|
}
|
|
1526
1553
|
),
|
|
1527
|
-
|
|
1528
|
-
/* @__PURE__ */ s(
|
|
1529
|
-
/* @__PURE__ */ e(
|
|
1530
|
-
|
|
1554
|
+
v,
|
|
1555
|
+
x && /* @__PURE__ */ s(ze, { children: [
|
|
1556
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1557
|
+
M,
|
|
1531
1558
|
{
|
|
1532
1559
|
variant: "secondary",
|
|
1533
1560
|
size: "md",
|
|
1534
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1535
|
-
trailingIcon: /* @__PURE__ */ e(
|
|
1561
|
+
leadingIcon: /* @__PURE__ */ e(ca, {}),
|
|
1562
|
+
trailingIcon: /* @__PURE__ */ e(Pt, {}),
|
|
1536
1563
|
children: "Columns"
|
|
1537
1564
|
}
|
|
1538
1565
|
) }),
|
|
1539
|
-
/* @__PURE__ */ s(
|
|
1540
|
-
/* @__PURE__ */ e(
|
|
1541
|
-
|
|
1542
|
-
const d =
|
|
1566
|
+
/* @__PURE__ */ s(de, { align: "end", className: "w-54", children: [
|
|
1567
|
+
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Active columns" }),
|
|
1568
|
+
U.map((r) => {
|
|
1569
|
+
const d = Oe(r);
|
|
1543
1570
|
return /* @__PURE__ */ s(
|
|
1544
1571
|
Q,
|
|
1545
1572
|
{
|
|
@@ -1550,27 +1577,27 @@ function Tr({
|
|
|
1550
1577
|
p.preventDefault();
|
|
1551
1578
|
return;
|
|
1552
1579
|
}
|
|
1553
|
-
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id),
|
|
1580
|
+
p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), qe(r.id);
|
|
1554
1581
|
},
|
|
1555
1582
|
onDragOver: (p) => {
|
|
1556
|
-
|
|
1583
|
+
ge && (p.preventDefault(), Gt(ge, r.id));
|
|
1557
1584
|
},
|
|
1558
1585
|
onDrop: (p) => p.preventDefault(),
|
|
1559
|
-
onDragEnd: () =>
|
|
1586
|
+
onDragEnd: () => qe(null),
|
|
1560
1587
|
onCheckedChange: (p) => {
|
|
1561
|
-
!p && !d &&
|
|
1588
|
+
!p && !d && Be((g) => ({ ...g, [r.id]: !0 }));
|
|
1562
1589
|
},
|
|
1563
1590
|
onSelect: (p) => p.preventDefault(),
|
|
1564
1591
|
className: "justify-between",
|
|
1565
1592
|
children: [
|
|
1566
1593
|
/* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
|
|
1567
|
-
d ? /* @__PURE__ */ e(
|
|
1568
|
-
|
|
1594
|
+
d ? /* @__PURE__ */ e(ua, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
|
|
1595
|
+
ma,
|
|
1569
1596
|
{
|
|
1570
1597
|
"aria-hidden": !0,
|
|
1571
1598
|
className: o(
|
|
1572
1599
|
"size-3.5 shrink-0",
|
|
1573
|
-
|
|
1600
|
+
ge === r.id ? "text-primary" : "text-subtle"
|
|
1574
1601
|
)
|
|
1575
1602
|
}
|
|
1576
1603
|
)
|
|
@@ -1579,14 +1606,14 @@ function Tr({
|
|
|
1579
1606
|
r.id
|
|
1580
1607
|
);
|
|
1581
1608
|
}),
|
|
1582
|
-
|
|
1583
|
-
/* @__PURE__ */ e(
|
|
1584
|
-
/* @__PURE__ */ e(
|
|
1585
|
-
|
|
1609
|
+
We.length > 0 ? /* @__PURE__ */ s(Pe, { children: [
|
|
1610
|
+
/* @__PURE__ */ e(Me, {}),
|
|
1611
|
+
/* @__PURE__ */ e(ce, { className: "text-[13px]", children: "Available columns" }),
|
|
1612
|
+
We.map((r) => /* @__PURE__ */ e(
|
|
1586
1613
|
Q,
|
|
1587
1614
|
{
|
|
1588
1615
|
checked: !1,
|
|
1589
|
-
onCheckedChange: () =>
|
|
1616
|
+
onCheckedChange: () => Ht(r.id),
|
|
1590
1617
|
onSelect: (d) => d.preventDefault(),
|
|
1591
1618
|
children: r.header
|
|
1592
1619
|
},
|
|
@@ -1595,21 +1622,21 @@ function Tr({
|
|
|
1595
1622
|
] }) : null
|
|
1596
1623
|
] })
|
|
1597
1624
|
] }),
|
|
1598
|
-
c && c.length > 0 ? /* @__PURE__ */ s(
|
|
1599
|
-
/* @__PURE__ */ e(
|
|
1600
|
-
|
|
1625
|
+
c && c.length > 0 ? /* @__PURE__ */ s(ze, { children: [
|
|
1626
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1627
|
+
M,
|
|
1601
1628
|
{
|
|
1602
1629
|
variant: "secondary",
|
|
1603
1630
|
size: "md",
|
|
1604
1631
|
iconOnly: !0,
|
|
1605
1632
|
"aria-label": "Add filter",
|
|
1606
|
-
children: /* @__PURE__ */ e(
|
|
1633
|
+
children: /* @__PURE__ */ e(rt, {})
|
|
1607
1634
|
}
|
|
1608
1635
|
) }),
|
|
1609
|
-
/* @__PURE__ */ e(
|
|
1610
|
-
|
|
1636
|
+
/* @__PURE__ */ e(de, { align: "start", className: "w-54", children: c.map((r) => /* @__PURE__ */ e(
|
|
1637
|
+
pe,
|
|
1611
1638
|
{
|
|
1612
|
-
onSelect: () =>
|
|
1639
|
+
onSelect: () => ve(
|
|
1613
1640
|
(d) => d.includes(r.id) ? d : [...d, r.id]
|
|
1614
1641
|
),
|
|
1615
1642
|
children: r.label
|
|
@@ -1619,14 +1646,14 @@ function Tr({
|
|
|
1619
1646
|
] }) : null,
|
|
1620
1647
|
b ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: b }) : null
|
|
1621
1648
|
] }),
|
|
1622
|
-
|
|
1623
|
-
|
|
1649
|
+
ye.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1650
|
+
ye.map((r) => {
|
|
1624
1651
|
const d = () => {
|
|
1625
|
-
r.onChange([]),
|
|
1652
|
+
r.onChange([]), ve((p) => p.filter((g) => g !== r.id));
|
|
1626
1653
|
};
|
|
1627
1654
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1628
1655
|
/* @__PURE__ */ e(
|
|
1629
|
-
|
|
1656
|
+
M,
|
|
1630
1657
|
{
|
|
1631
1658
|
variant: "secondary",
|
|
1632
1659
|
size: "md",
|
|
@@ -1634,39 +1661,39 @@ function Tr({
|
|
|
1634
1661
|
"aria-label": `Remove ${r.label} filter`,
|
|
1635
1662
|
className: "rounded-r-none",
|
|
1636
1663
|
onClick: d,
|
|
1637
|
-
children: /* @__PURE__ */ e(
|
|
1664
|
+
children: /* @__PURE__ */ e(ue, {})
|
|
1638
1665
|
}
|
|
1639
1666
|
),
|
|
1640
|
-
/* @__PURE__ */ s(
|
|
1641
|
-
/* @__PURE__ */ e(
|
|
1642
|
-
/* @__PURE__ */ e(
|
|
1667
|
+
/* @__PURE__ */ s(ze, { children: [
|
|
1668
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ s(M, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1669
|
+
/* @__PURE__ */ e(rt, {}),
|
|
1643
1670
|
/* @__PURE__ */ e("span", { className: "font-medium", children: r.label }),
|
|
1644
1671
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1645
1672
|
/* @__PURE__ */ e("span", { className: "text-muted", children: r.value.length > 0 ? `${r.value.length} selected` : "Enter value" }),
|
|
1646
|
-
/* @__PURE__ */ e(
|
|
1673
|
+
/* @__PURE__ */ e(me, { className: "text-muted" })
|
|
1647
1674
|
] }) }),
|
|
1648
|
-
/* @__PURE__ */ s(
|
|
1649
|
-
/* @__PURE__ */ s(
|
|
1675
|
+
/* @__PURE__ */ s(de, { align: "start", className: "w-56", children: [
|
|
1676
|
+
/* @__PURE__ */ s(ce, { className: "text-[13px]", children: [
|
|
1650
1677
|
"Filter by ",
|
|
1651
1678
|
r.label
|
|
1652
1679
|
] }),
|
|
1653
1680
|
r.options.map((p) => {
|
|
1654
|
-
const
|
|
1681
|
+
const g = r.value.includes(p.value);
|
|
1655
1682
|
return /* @__PURE__ */ e(
|
|
1656
1683
|
Q,
|
|
1657
1684
|
{
|
|
1658
|
-
checked:
|
|
1685
|
+
checked: g,
|
|
1659
1686
|
onCheckedChange: () => r.onChange(
|
|
1660
|
-
|
|
1687
|
+
g ? r.value.filter((z) => z !== p.value) : [...r.value, p.value]
|
|
1661
1688
|
),
|
|
1662
|
-
onSelect: (
|
|
1689
|
+
onSelect: (z) => z.preventDefault(),
|
|
1663
1690
|
children: p.label
|
|
1664
1691
|
},
|
|
1665
1692
|
p.value
|
|
1666
1693
|
);
|
|
1667
1694
|
}),
|
|
1668
|
-
/* @__PURE__ */ e(
|
|
1669
|
-
/* @__PURE__ */ e(
|
|
1695
|
+
/* @__PURE__ */ e(Me, {}),
|
|
1696
|
+
/* @__PURE__ */ e(pe, { onSelect: d, children: "Clear filter" })
|
|
1670
1697
|
] })
|
|
1671
1698
|
] })
|
|
1672
1699
|
] }, r.id);
|
|
@@ -1676,27 +1703,27 @@ function Tr({
|
|
|
1676
1703
|
{
|
|
1677
1704
|
type: "button",
|
|
1678
1705
|
onClick: () => {
|
|
1679
|
-
for (const r of
|
|
1680
|
-
|
|
1706
|
+
for (const r of ye) r.onChange([]);
|
|
1707
|
+
ve([]);
|
|
1681
1708
|
},
|
|
1682
1709
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1683
1710
|
children: "Clear filters"
|
|
1684
1711
|
}
|
|
1685
1712
|
)
|
|
1686
1713
|
] }) : null,
|
|
1687
|
-
|
|
1688
|
-
|
|
1714
|
+
C,
|
|
1715
|
+
k && $.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
1716
|
/* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
|
|
1690
|
-
|
|
1717
|
+
$.size,
|
|
1691
1718
|
" selected"
|
|
1692
1719
|
] }),
|
|
1693
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (
|
|
1694
|
-
|
|
1720
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (h ?? []).map((r) => /* @__PURE__ */ s(
|
|
1721
|
+
M,
|
|
1695
1722
|
{
|
|
1696
1723
|
size: "md",
|
|
1697
1724
|
variant: r.variant ?? "outline",
|
|
1698
1725
|
disabled: r.disabled,
|
|
1699
|
-
onClick: () => void r.onRun(
|
|
1726
|
+
onClick: () => void r.onRun(Xt),
|
|
1700
1727
|
children: [
|
|
1701
1728
|
r.icon,
|
|
1702
1729
|
r.label
|
|
@@ -1708,22 +1735,24 @@ function Tr({
|
|
|
1708
1735
|
"button",
|
|
1709
1736
|
{
|
|
1710
1737
|
type: "button",
|
|
1711
|
-
onClick: () =>
|
|
1738
|
+
onClick: () => xe(/* @__PURE__ */ new Set()),
|
|
1712
1739
|
className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
|
|
1713
1740
|
children: [
|
|
1714
|
-
/* @__PURE__ */ e(
|
|
1741
|
+
/* @__PURE__ */ e(ue, { className: "size-3.5" }),
|
|
1715
1742
|
"Clear"
|
|
1716
1743
|
]
|
|
1717
1744
|
}
|
|
1718
1745
|
)
|
|
1719
1746
|
] }),
|
|
1720
1747
|
/* @__PURE__ */ e(
|
|
1721
|
-
|
|
1748
|
+
be,
|
|
1722
1749
|
{
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1750
|
+
scrollMode: "panel",
|
|
1751
|
+
headerContentRef: Ke,
|
|
1752
|
+
action: Et,
|
|
1753
|
+
tone: ae,
|
|
1754
|
+
headerClassName: _t,
|
|
1755
|
+
panelClassName: Lt,
|
|
1727
1756
|
header: (
|
|
1728
1757
|
// Visible header band. Presentational (aria-sort lives on the body's
|
|
1729
1758
|
// sr-only thead); widths are pinned to the measured body columns and
|
|
@@ -1731,66 +1760,75 @@ function Tr({
|
|
|
1731
1760
|
/* @__PURE__ */ s(
|
|
1732
1761
|
"table",
|
|
1733
1762
|
{
|
|
1734
|
-
ref:
|
|
1763
|
+
ref: Je,
|
|
1735
1764
|
role: "presentation",
|
|
1736
1765
|
className: "w-full table-fixed border-collapse",
|
|
1737
1766
|
style: {
|
|
1738
|
-
|
|
1739
|
-
|
|
1767
|
+
// Fill the container when it fits; force totalWidth (and the
|
|
1768
|
+
// shared scroller) only when the columns need more room.
|
|
1769
|
+
minWidth: J > 0 ? J : void 0,
|
|
1770
|
+
visibility: J > 0 ? void 0 : "hidden"
|
|
1740
1771
|
},
|
|
1741
1772
|
children: [
|
|
1742
|
-
/* @__PURE__ */ e("colgroup", { children:
|
|
1773
|
+
/* @__PURE__ */ e("colgroup", { children: G.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1743
1774
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1744
|
-
|
|
1745
|
-
|
|
1775
|
+
k && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
|
|
1776
|
+
De,
|
|
1746
1777
|
{
|
|
1747
1778
|
"aria-label": "Select all rows",
|
|
1748
|
-
checked:
|
|
1749
|
-
onCheckedChange:
|
|
1779
|
+
checked: Ue ? !0 : Ut ? "indeterminate" : !1,
|
|
1780
|
+
onCheckedChange: Jt
|
|
1750
1781
|
}
|
|
1751
1782
|
) }),
|
|
1752
|
-
|
|
1783
|
+
U.map((r) => /* @__PURE__ */ e(
|
|
1753
1784
|
"th",
|
|
1754
1785
|
{
|
|
1755
|
-
className: o(
|
|
1756
|
-
children:
|
|
1757
|
-
|
|
1786
|
+
className: o(ur, r.align === "right" && "text-right", r.className),
|
|
1787
|
+
children: /* @__PURE__ */ e(
|
|
1788
|
+
"span",
|
|
1758
1789
|
{
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1790
|
+
"data-col-sizer": !0,
|
|
1791
|
+
className: "inline-block whitespace-nowrap px-(--table-pad-x) -mx-(--table-pad-x)",
|
|
1792
|
+
children: r.sortable ? /* @__PURE__ */ s(
|
|
1793
|
+
M,
|
|
1794
|
+
{
|
|
1795
|
+
type: "button",
|
|
1796
|
+
variant: "ghost",
|
|
1797
|
+
size: "xs",
|
|
1798
|
+
"aria-label": `Sort by ${r.header}`,
|
|
1799
|
+
onClick: () => Ot(r),
|
|
1800
|
+
className: o(
|
|
1801
|
+
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1802
|
+
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
1803
|
+
"active:scale-100 active:bg-transparent active:shadow-none",
|
|
1804
|
+
(N == null ? void 0 : N.id) === r.id && "text-table-header-active"
|
|
1805
|
+
),
|
|
1806
|
+
children: [
|
|
1807
|
+
r.header,
|
|
1808
|
+
(N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? /* @__PURE__ */ e(fa, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(me, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(ba, { className: "size-3.5 opacity-50" })
|
|
1809
|
+
]
|
|
1810
|
+
}
|
|
1811
|
+
) : r.header
|
|
1774
1812
|
}
|
|
1775
|
-
)
|
|
1813
|
+
)
|
|
1776
1814
|
},
|
|
1777
1815
|
r.id
|
|
1778
1816
|
)),
|
|
1779
|
-
|
|
1817
|
+
_ && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1780
1818
|
] }) })
|
|
1781
1819
|
]
|
|
1782
1820
|
}
|
|
1783
1821
|
)
|
|
1784
1822
|
),
|
|
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(
|
|
1823
|
+
children: /* @__PURE__ */ e("div", { ref: Qe, className: "overflow-x-auto", onScroll: we, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((r) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, r)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1824
|
+
/* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(pa, { weight: "duotone" }) }),
|
|
1787
1825
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1788
1826
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1789
1827
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1790
1828
|
] }),
|
|
1791
1829
|
i.action
|
|
1792
|
-
] }) :
|
|
1793
|
-
|
|
1830
|
+
] }) : A.length === 0 ? /* @__PURE__ */ e(
|
|
1831
|
+
cr,
|
|
1794
1832
|
{
|
|
1795
1833
|
icon: u == null ? void 0 : u.icon,
|
|
1796
1834
|
title: (u == null ? void 0 : u.title) ?? "No results",
|
|
@@ -1800,49 +1838,51 @@ function Tr({
|
|
|
1800
1838
|
) : /* @__PURE__ */ s(
|
|
1801
1839
|
"table",
|
|
1802
1840
|
{
|
|
1803
|
-
ref:
|
|
1841
|
+
ref: Xe,
|
|
1804
1842
|
className: o(
|
|
1805
1843
|
"border-collapse text-left",
|
|
1806
1844
|
// Unmeasured: content-sized so intrinsic column widths can be
|
|
1807
1845
|
// measured (w-full would squeeze columns into the container).
|
|
1808
|
-
// Measured: pinned to the band's colgroup
|
|
1809
|
-
|
|
1846
|
+
// Measured: fill the container, pinned to the band's colgroup
|
|
1847
|
+
// pixel widths; minWidth forces the shared scroller open only
|
|
1848
|
+
// when the columns need more room than the container has.
|
|
1849
|
+
G.length > 0 ? "w-full table-fixed" : "table-auto"
|
|
1810
1850
|
),
|
|
1811
|
-
style: {
|
|
1851
|
+
style: { minWidth: J > 0 ? J : void 0 },
|
|
1812
1852
|
children: [
|
|
1813
|
-
|
|
1853
|
+
G.length > 0 && /* @__PURE__ */ e("colgroup", { children: G.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
|
|
1814
1854
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1855
|
+
k && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1856
|
+
U.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": Yt(r), children: r.header }, r.id)),
|
|
1857
|
+
_ && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1818
1858
|
] }) }),
|
|
1819
|
-
/* @__PURE__ */ e(
|
|
1820
|
-
const d = n(r), p =
|
|
1859
|
+
/* @__PURE__ */ e(ja, { children: A.map((r) => {
|
|
1860
|
+
const d = n(r), p = $.has(d);
|
|
1821
1861
|
return /* @__PURE__ */ s(
|
|
1822
|
-
|
|
1862
|
+
Ea,
|
|
1823
1863
|
{
|
|
1824
1864
|
"data-state": p ? "selected" : void 0,
|
|
1825
|
-
onClick:
|
|
1826
|
-
className:
|
|
1865
|
+
onClick: B ? () => B(r) : void 0,
|
|
1866
|
+
className: B ? "cursor-pointer" : void 0,
|
|
1827
1867
|
children: [
|
|
1828
|
-
|
|
1829
|
-
|
|
1868
|
+
k && /* @__PURE__ */ e(Se, { className: "w-11", onClick: (g) => g.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1869
|
+
De,
|
|
1830
1870
|
{
|
|
1831
1871
|
"aria-label": "Select row",
|
|
1832
1872
|
checked: p,
|
|
1833
|
-
onCheckedChange: () =>
|
|
1873
|
+
onCheckedChange: () => Kt(d)
|
|
1834
1874
|
}
|
|
1835
1875
|
) }),
|
|
1836
|
-
|
|
1837
|
-
|
|
1876
|
+
U.map((g) => /* @__PURE__ */ e(
|
|
1877
|
+
Se,
|
|
1838
1878
|
{
|
|
1839
|
-
"data-numeric":
|
|
1840
|
-
className: o(
|
|
1841
|
-
children:
|
|
1879
|
+
"data-numeric": g.numeric ? "" : void 0,
|
|
1880
|
+
className: o(g.align === "right" && "text-right", g.className),
|
|
1881
|
+
children: g.cell(r)
|
|
1842
1882
|
},
|
|
1843
|
-
|
|
1883
|
+
g.id
|
|
1844
1884
|
)),
|
|
1845
|
-
|
|
1885
|
+
_ && /* @__PURE__ */ e(Se, { className: "w-44 px-4 text-right", onClick: (g) => g.stopPropagation(), children: _(r) })
|
|
1846
1886
|
]
|
|
1847
1887
|
},
|
|
1848
1888
|
d
|
|
@@ -1850,43 +1890,43 @@ function Tr({
|
|
|
1850
1890
|
}) })
|
|
1851
1891
|
]
|
|
1852
1892
|
}
|
|
1853
|
-
)
|
|
1893
|
+
) })
|
|
1854
1894
|
}
|
|
1855
1895
|
),
|
|
1856
|
-
|
|
1896
|
+
Wt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1857
1897
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1858
1898
|
le + 1,
|
|
1859
1899
|
"–",
|
|
1860
|
-
Math.min(le +
|
|
1900
|
+
Math.min(le + L, q.length),
|
|
1861
1901
|
" of ",
|
|
1862
|
-
|
|
1902
|
+
q.length
|
|
1863
1903
|
] }),
|
|
1864
1904
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1865
|
-
/* @__PURE__ */ s(
|
|
1866
|
-
/* @__PURE__ */ e(
|
|
1867
|
-
/* @__PURE__ */ e(
|
|
1905
|
+
/* @__PURE__ */ s(sr, { value: String(L), onValueChange: (r) => Ft(Number(r)), children: [
|
|
1906
|
+
/* @__PURE__ */ e(Rt, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(or, {}) }),
|
|
1907
|
+
/* @__PURE__ */ e(jt, { children: te.map((r) => /* @__PURE__ */ e(Le, { value: String(r), children: r }, r)) })
|
|
1868
1908
|
] }),
|
|
1869
1909
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
1870
1910
|
/* @__PURE__ */ e(
|
|
1871
|
-
|
|
1911
|
+
M,
|
|
1872
1912
|
{
|
|
1873
1913
|
variant: "secondary",
|
|
1874
1914
|
size: "icon",
|
|
1875
1915
|
"aria-label": "Previous page",
|
|
1876
|
-
disabled:
|
|
1916
|
+
disabled: O <= 0,
|
|
1877
1917
|
onClick: () => re((r) => Math.max(0, r - 1)),
|
|
1878
|
-
children: /* @__PURE__ */ e(
|
|
1918
|
+
children: /* @__PURE__ */ e(ha, {})
|
|
1879
1919
|
}
|
|
1880
1920
|
),
|
|
1881
1921
|
/* @__PURE__ */ e(
|
|
1882
|
-
|
|
1922
|
+
M,
|
|
1883
1923
|
{
|
|
1884
1924
|
variant: "secondary",
|
|
1885
1925
|
size: "icon",
|
|
1886
1926
|
"aria-label": "Next page",
|
|
1887
|
-
disabled:
|
|
1888
|
-
onClick: () => re((r) => Math.min(
|
|
1889
|
-
children: /* @__PURE__ */ e(
|
|
1927
|
+
disabled: O >= X - 1,
|
|
1928
|
+
onClick: () => re((r) => Math.min(X - 1, r + 1)),
|
|
1929
|
+
children: /* @__PURE__ */ e(ut, {})
|
|
1890
1930
|
}
|
|
1891
1931
|
)
|
|
1892
1932
|
] })
|
|
@@ -1894,8 +1934,8 @@ function Tr({
|
|
|
1894
1934
|
] })
|
|
1895
1935
|
] });
|
|
1896
1936
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return /* @__PURE__ */ e(
|
|
1937
|
+
function Ar({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
1938
|
+
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
1939
|
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
1940
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1901
1941
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
|
|
@@ -1904,7 +1944,7 @@ function Mr({ icon: t, title: a, description: n, action: l, className: i }) {
|
|
|
1904
1944
|
l
|
|
1905
1945
|
] }) });
|
|
1906
1946
|
}
|
|
1907
|
-
function
|
|
1947
|
+
function Br({ className: t, ...a }) {
|
|
1908
1948
|
return /* @__PURE__ */ e(
|
|
1909
1949
|
"kbd",
|
|
1910
1950
|
{
|
|
@@ -1916,8 +1956,8 @@ function Pr({ className: t, ...a }) {
|
|
|
1916
1956
|
}
|
|
1917
1957
|
);
|
|
1918
1958
|
}
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1959
|
+
const pr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1960
|
+
Na.Root,
|
|
1921
1961
|
{
|
|
1922
1962
|
ref: n,
|
|
1923
1963
|
className: o(
|
|
@@ -1927,8 +1967,8 @@ const lr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
1927
1967
|
...a
|
|
1928
1968
|
}
|
|
1929
1969
|
));
|
|
1930
|
-
|
|
1931
|
-
function
|
|
1970
|
+
pr.displayName = "Label";
|
|
1971
|
+
function Fr({
|
|
1932
1972
|
value: t,
|
|
1933
1973
|
onValueChange: a,
|
|
1934
1974
|
options: n,
|
|
@@ -1936,7 +1976,7 @@ function Ir({
|
|
|
1936
1976
|
className: i,
|
|
1937
1977
|
...u
|
|
1938
1978
|
}) {
|
|
1939
|
-
const m =
|
|
1979
|
+
const m = fe();
|
|
1940
1980
|
return /* @__PURE__ */ e(
|
|
1941
1981
|
"div",
|
|
1942
1982
|
{
|
|
@@ -1948,7 +1988,7 @@ function Ir({
|
|
|
1948
1988
|
i
|
|
1949
1989
|
),
|
|
1950
1990
|
children: n.map((c) => {
|
|
1951
|
-
const
|
|
1991
|
+
const v = c.value === t;
|
|
1952
1992
|
return /* @__PURE__ */ s(
|
|
1953
1993
|
"label",
|
|
1954
1994
|
{
|
|
@@ -1956,7 +1996,7 @@ function Ir({
|
|
|
1956
1996
|
"inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
|
|
1957
1997
|
"has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
|
|
1958
1998
|
l === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
|
|
1959
|
-
|
|
1999
|
+
v ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
|
|
1960
2000
|
),
|
|
1961
2001
|
children: [
|
|
1962
2002
|
/* @__PURE__ */ e(
|
|
@@ -1965,7 +2005,7 @@ function Ir({
|
|
|
1965
2005
|
type: "radio",
|
|
1966
2006
|
name: m,
|
|
1967
2007
|
value: c.value,
|
|
1968
|
-
checked:
|
|
2008
|
+
checked: v,
|
|
1969
2009
|
onChange: () => a(c.value),
|
|
1970
2010
|
className: "sr-only"
|
|
1971
2011
|
}
|
|
@@ -1980,8 +2020,8 @@ function Ir({
|
|
|
1980
2020
|
}
|
|
1981
2021
|
);
|
|
1982
2022
|
}
|
|
1983
|
-
const
|
|
1984
|
-
|
|
2023
|
+
const fr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
2024
|
+
wa.Root,
|
|
1985
2025
|
{
|
|
1986
2026
|
ref: i,
|
|
1987
2027
|
decorative: n,
|
|
@@ -1994,8 +2034,8 @@ const ir = f(({ className: t, orientation: a = "horizontal", decorative: n = !0,
|
|
|
1994
2034
|
...l
|
|
1995
2035
|
}
|
|
1996
2036
|
));
|
|
1997
|
-
|
|
1998
|
-
function
|
|
2037
|
+
fr.displayName = "Separator";
|
|
2038
|
+
function $r({ className: t, ...a }) {
|
|
1999
2039
|
return /* @__PURE__ */ e(
|
|
2000
2040
|
"div",
|
|
2001
2041
|
{
|
|
@@ -2004,7 +2044,7 @@ function jr({ className: t, ...a }) {
|
|
|
2004
2044
|
}
|
|
2005
2045
|
);
|
|
2006
2046
|
}
|
|
2007
|
-
const
|
|
2047
|
+
const qr = Y.Provider, Gr = Y.Root, Hr = Y.Trigger, br = f(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(Y.Portal, { children: /* @__PURE__ */ e(
|
|
2008
2048
|
Y.Content,
|
|
2009
2049
|
{
|
|
2010
2050
|
ref: l,
|
|
@@ -2022,82 +2062,82 @@ const Er = Y.Provider, _r = Y.Root, Lr = Y.Trigger, or = f(({ className: t, side
|
|
|
2022
2062
|
...n
|
|
2023
2063
|
}
|
|
2024
2064
|
) }));
|
|
2025
|
-
|
|
2065
|
+
br.displayName = "TooltipContent";
|
|
2026
2066
|
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
|
-
|
|
2067
|
+
Cr as AgentPrompt,
|
|
2068
|
+
bt as Avatar,
|
|
2069
|
+
gt as AvatarFallback,
|
|
2070
|
+
ht as AvatarImage,
|
|
2071
|
+
Ma as Badge,
|
|
2072
|
+
M as Button,
|
|
2073
|
+
Sr as Callout,
|
|
2074
|
+
Fa as Card,
|
|
2075
|
+
Ga as CardContent,
|
|
2076
|
+
qa as CardDescription,
|
|
2077
|
+
Ha as CardFooter,
|
|
2078
|
+
xt as CardHeader,
|
|
2079
|
+
$a as CardTitle,
|
|
2080
|
+
De as Checkbox,
|
|
2081
|
+
Mr as ChoiceDialog,
|
|
2082
|
+
Pr as CodeBlock,
|
|
2083
|
+
Lr as DataTable,
|
|
2084
|
+
_r as DataTableIdentity,
|
|
2085
|
+
Xa as Dialog,
|
|
2086
|
+
Qa as DialogBody,
|
|
2087
|
+
Ct as DialogCancel,
|
|
2088
|
+
Tr as DialogClose,
|
|
2089
|
+
kt as DialogContent,
|
|
2090
|
+
er as DialogDescription,
|
|
2091
|
+
Za as DialogFooter,
|
|
2092
|
+
Ya as DialogHeader,
|
|
2093
|
+
Ka as DialogPanel,
|
|
2094
|
+
zt as DialogTitle,
|
|
2095
|
+
wt as DialogTrigger,
|
|
2096
|
+
ze as DropdownMenu,
|
|
2057
2097
|
Q as DropdownMenuCheckboxItem,
|
|
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
|
-
|
|
2098
|
+
Pt as DropdownMenuChevron,
|
|
2099
|
+
de as DropdownMenuContent,
|
|
2100
|
+
Ir as DropdownMenuGroup,
|
|
2101
|
+
pe as DropdownMenuItem,
|
|
2102
|
+
ce as DropdownMenuLabel,
|
|
2103
|
+
Rr as DropdownMenuPortal,
|
|
2104
|
+
Me as DropdownMenuSeparator,
|
|
2105
|
+
jr as DropdownMenuSub,
|
|
2106
|
+
ir as DropdownMenuSubContent,
|
|
2107
|
+
It as DropdownMenuSubTrigger,
|
|
2108
|
+
se as DropdownMenuTrigger,
|
|
2109
|
+
Ar as EmptyState,
|
|
2110
|
+
Tt as Input,
|
|
2111
|
+
Br as Kbd,
|
|
2112
|
+
pr as Label,
|
|
2113
|
+
ar as RadioCard,
|
|
2114
|
+
tr as RadioGroup,
|
|
2115
|
+
Fr as Segmented,
|
|
2116
|
+
sr as Select,
|
|
2117
|
+
jt as SelectContent,
|
|
2118
|
+
Er as SelectGroup,
|
|
2119
|
+
Le as SelectItem,
|
|
2120
|
+
dr as SelectLabel,
|
|
2121
|
+
Rt as SelectTrigger,
|
|
2122
|
+
or as SelectValue,
|
|
2123
|
+
fr as Separator,
|
|
2124
|
+
$r as Skeleton,
|
|
2125
|
+
Sa as Spinner,
|
|
2126
|
+
kr as Table,
|
|
2127
|
+
ja as TableBody,
|
|
2128
|
+
Se as TableCell,
|
|
2129
|
+
Ia as TableContainer,
|
|
2130
|
+
cr as TableEmptyState,
|
|
2131
|
+
Dr as TableHead,
|
|
2132
|
+
zr as TableHeader,
|
|
2133
|
+
Ra as TablePanel,
|
|
2134
|
+
Ea as TableRow,
|
|
2135
|
+
be as TableSurface,
|
|
2136
|
+
Gr as Tooltip,
|
|
2137
|
+
br as TooltipContent,
|
|
2138
|
+
qr as TooltipProvider,
|
|
2139
|
+
Hr as TooltipTrigger,
|
|
2140
|
+
Da as badgeVariants,
|
|
2141
|
+
ka as buttonVariants
|
|
2102
2142
|
};
|
|
2103
2143
|
//# sourceMappingURL=index.js.map
|