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