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