@jinaan/uikit 0.1.9 → 0.1.11
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/choice-dialog.d.ts.map +1 -1
- package/dist/dialog.d.ts +3 -0
- package/dist/dialog.d.ts.map +1 -1
- package/dist/index.js +561 -557
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/choice-dialog.tsx +2 -7
- package/src/dialog.tsx +48 -13
- package/src/input.tsx +2 -0
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Slot as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { CircleNotch as yt, Robot as wt, Terminal as Ct, Check as X, Copy as Fe, XCircle as St, Warning as kt, CheckCircle as zt, Info as Dt, Minus as Tt, X as le, CaretDown as ee, MagnifyingGlass as Mt, Columns as Pt, Lock as It, FunnelSimple as Ee, WarningCircle as Et, CaretUp as jt, CaretUpDown as _t } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as b, useState as D, Children as $e, isValidElement as qe, useRef as te, useEffect as V, useContext as ie, useCallback as Lt, createContext as se, useId as de, useMemo as je } from "react";
|
|
4
|
+
import { Slot as Rt } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as we } from "class-variance-authority";
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
6
|
+
import { clsx as At } from "clsx";
|
|
7
|
+
import { twMerge as Bt } from "tailwind-merge";
|
|
8
8
|
import * as Ce from "@radix-ui/react-avatar";
|
|
9
9
|
import * as _e from "@radix-ui/react-checkbox";
|
|
10
|
-
import * as
|
|
10
|
+
import * as M from "@radix-ui/react-dialog";
|
|
11
11
|
import * as T from "@radix-ui/react-dropdown-menu";
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
12
|
+
import * as z from "@radix-ui/react-select";
|
|
13
|
+
import * as Ft from "@radix-ui/react-label";
|
|
14
|
+
import * as $t from "@radix-ui/react-separator";
|
|
15
15
|
import * as W from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return Bt(At(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function qt({ className: t }) {
|
|
20
20
|
return /* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
yt,
|
|
22
22
|
{
|
|
23
23
|
className: o("size-4 animate-spin text-muted", t),
|
|
24
24
|
weight: "bold",
|
|
@@ -26,7 +26,7 @@ function Ft({ className: t }) {
|
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const Gt = we(
|
|
30
30
|
"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",
|
|
31
31
|
{
|
|
32
32
|
variants: {
|
|
@@ -52,71 +52,71 @@ const $t = we(
|
|
|
52
52
|
size: "md"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), Ht = {
|
|
56
56
|
xs: "[&_svg]:size-[var(--control-icon-xs)]",
|
|
57
57
|
sm: "[&_svg]:size-[var(--control-icon-sm)]",
|
|
58
58
|
md: "[&_svg]:size-[var(--control-icon-md)]",
|
|
59
59
|
lg: "[&_svg]:size-[var(--control-icon-lg)]",
|
|
60
60
|
xl: "[&_svg]:size-[var(--control-icon-xl)]",
|
|
61
61
|
icon: "[&_svg]:size-[var(--control-icon-md)]"
|
|
62
|
-
}, S =
|
|
62
|
+
}, S = b(
|
|
63
63
|
({
|
|
64
64
|
className: t,
|
|
65
65
|
variant: r,
|
|
66
66
|
size: a = "md",
|
|
67
67
|
asChild: l = !1,
|
|
68
68
|
leadingIcon: i,
|
|
69
|
-
trailingIcon:
|
|
70
|
-
iconOnly:
|
|
71
|
-
loading:
|
|
72
|
-
fullWidth:
|
|
73
|
-
disabled:
|
|
74
|
-
children:
|
|
75
|
-
...
|
|
76
|
-
},
|
|
77
|
-
const
|
|
69
|
+
trailingIcon: d,
|
|
70
|
+
iconOnly: c = !1,
|
|
71
|
+
loading: u = !1,
|
|
72
|
+
fullWidth: h = !1,
|
|
73
|
+
disabled: g,
|
|
74
|
+
children: p,
|
|
75
|
+
...N
|
|
76
|
+
}, k) => {
|
|
77
|
+
const C = l ? Rt : "button", w = Ht[a ?? "md"];
|
|
78
78
|
return /* @__PURE__ */ e(
|
|
79
|
-
|
|
79
|
+
C,
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
82
|
-
"aria-busy":
|
|
83
|
-
disabled: l ? void 0 :
|
|
81
|
+
ref: k,
|
|
82
|
+
"aria-busy": u || void 0,
|
|
83
|
+
disabled: l ? void 0 : g || u,
|
|
84
84
|
className: o(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
Gt({ variant: r, size: a }),
|
|
86
|
+
c && "aspect-square px-0",
|
|
87
|
+
h && "w-full",
|
|
88
88
|
t
|
|
89
89
|
),
|
|
90
|
-
...
|
|
91
|
-
children: l ?
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
!
|
|
90
|
+
...N,
|
|
91
|
+
children: l ? p : /* @__PURE__ */ s(ye, { children: [
|
|
92
|
+
u ? /* @__PURE__ */ e(qt, { className: o("text-current", w), "aria-hidden": !0 }) : i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: i }) : null,
|
|
93
|
+
p,
|
|
94
|
+
!u && d ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: d }) : null
|
|
95
95
|
] })
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
S.displayName = "Button";
|
|
101
|
-
function
|
|
101
|
+
function Br({
|
|
102
102
|
command: t,
|
|
103
103
|
tag: r = "Build with agents",
|
|
104
104
|
icon: a,
|
|
105
105
|
className: l
|
|
106
106
|
}) {
|
|
107
|
-
const [i,
|
|
107
|
+
const [i, d] = D(!1), c = async () => {
|
|
108
108
|
try {
|
|
109
|
-
await navigator.clipboard.writeText(t),
|
|
109
|
+
await navigator.clipboard.writeText(t), d(!0), window.setTimeout(() => d(!1), 1500);
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
return /* @__PURE__ */ s("div", { className: o("relative inline-flex max-w-full", l), children: [
|
|
114
114
|
/* @__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: [
|
|
115
|
-
a ?? /* @__PURE__ */ e(
|
|
115
|
+
a ?? /* @__PURE__ */ e(wt, { className: "size-3.5", weight: "fill" }),
|
|
116
116
|
r
|
|
117
117
|
] }),
|
|
118
118
|
/* @__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: [
|
|
119
|
-
/* @__PURE__ */ e(
|
|
119
|
+
/* @__PURE__ */ e(Ct, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
|
|
120
120
|
/* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children: t }),
|
|
121
121
|
/* @__PURE__ */ e(
|
|
122
122
|
S,
|
|
@@ -126,14 +126,14 @@ function Rr({
|
|
|
126
126
|
iconOnly: !0,
|
|
127
127
|
"aria-label": "Copy prompt",
|
|
128
128
|
className: "ml-auto",
|
|
129
|
-
onClick:
|
|
129
|
+
onClick: c,
|
|
130
130
|
children: i ? /* @__PURE__ */ e(X, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(Fe, {})
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
] })
|
|
134
134
|
] });
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const Ge = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
137
137
|
Ce.Root,
|
|
138
138
|
{
|
|
139
139
|
ref: a,
|
|
@@ -144,8 +144,8 @@ const He = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
144
144
|
...r
|
|
145
145
|
}
|
|
146
146
|
));
|
|
147
|
-
|
|
148
|
-
const
|
|
147
|
+
Ge.displayName = "Avatar";
|
|
148
|
+
const He = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
149
149
|
Ce.Image,
|
|
150
150
|
{
|
|
151
151
|
ref: a,
|
|
@@ -153,8 +153,8 @@ const qe = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
153
153
|
...r
|
|
154
154
|
}
|
|
155
155
|
));
|
|
156
|
-
|
|
157
|
-
const Ve =
|
|
156
|
+
He.displayName = "AvatarImage";
|
|
157
|
+
const Ve = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
158
158
|
Ce.Fallback,
|
|
159
159
|
{
|
|
160
160
|
ref: a,
|
|
@@ -166,7 +166,7 @@ const Ve = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
166
166
|
}
|
|
167
167
|
));
|
|
168
168
|
Ve.displayName = "AvatarFallback";
|
|
169
|
-
const
|
|
169
|
+
const Vt = we(
|
|
170
170
|
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
|
|
171
171
|
{
|
|
172
172
|
variants: {
|
|
@@ -182,7 +182,7 @@ const Ht = we(
|
|
|
182
182
|
},
|
|
183
183
|
defaultVariants: { variant: "neutral" }
|
|
184
184
|
}
|
|
185
|
-
),
|
|
185
|
+
), Ut = we("size-1.5 shrink-0 rounded-full", {
|
|
186
186
|
variants: {
|
|
187
187
|
variant: {
|
|
188
188
|
neutral: "bg-subtle",
|
|
@@ -196,42 +196,42 @@ const Ht = we(
|
|
|
196
196
|
},
|
|
197
197
|
defaultVariants: { variant: "neutral" }
|
|
198
198
|
});
|
|
199
|
-
function
|
|
200
|
-
return /* @__PURE__ */ s("span", { className: o(
|
|
201
|
-
a ? /* @__PURE__ */ e("span", { className: o(
|
|
199
|
+
function Wt({ className: t, variant: r, dot: a = !1, children: l, ...i }) {
|
|
200
|
+
return /* @__PURE__ */ s("span", { className: o(Vt({ variant: r }), t), ...i, children: [
|
|
201
|
+
a ? /* @__PURE__ */ e("span", { className: o(Ut({ variant: r })), "aria-hidden": !0 }) : null,
|
|
202
202
|
l
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const Xt = {
|
|
206
206
|
info: {
|
|
207
|
-
Icon:
|
|
207
|
+
Icon: Dt,
|
|
208
208
|
className: "border-info/30 bg-info/10",
|
|
209
209
|
iconClassName: "text-info"
|
|
210
210
|
},
|
|
211
211
|
success: {
|
|
212
|
-
Icon:
|
|
212
|
+
Icon: zt,
|
|
213
213
|
className: "border-success/30 bg-success/10",
|
|
214
214
|
iconClassName: "text-success"
|
|
215
215
|
},
|
|
216
216
|
warning: {
|
|
217
|
-
Icon:
|
|
217
|
+
Icon: kt,
|
|
218
218
|
className: "border-warning/30 bg-warning/10",
|
|
219
219
|
iconClassName: "text-warning"
|
|
220
220
|
},
|
|
221
221
|
error: {
|
|
222
|
-
Icon:
|
|
222
|
+
Icon: St,
|
|
223
223
|
className: "border-error/30 bg-error/10",
|
|
224
224
|
iconClassName: "text-error"
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
|
-
function
|
|
227
|
+
function Fr({
|
|
228
228
|
variant: t = "info",
|
|
229
229
|
title: r,
|
|
230
230
|
children: a,
|
|
231
231
|
icon: l,
|
|
232
232
|
className: i
|
|
233
233
|
}) {
|
|
234
|
-
const { Icon:
|
|
234
|
+
const { Icon: d, className: c, iconClassName: u } = Xt[t];
|
|
235
235
|
return /* @__PURE__ */ s(
|
|
236
236
|
"div",
|
|
237
237
|
{
|
|
@@ -239,11 +239,11 @@ function Ar({
|
|
|
239
239
|
className: o(
|
|
240
240
|
"flex items-start gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
|
|
241
241
|
"animate-in fade-in-0 slide-in-from-top-1 duration-200 motion-reduce:animate-none",
|
|
242
|
-
|
|
242
|
+
c,
|
|
243
243
|
i
|
|
244
244
|
),
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4",
|
|
246
|
+
/* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", u), children: l ?? /* @__PURE__ */ e(d, { weight: "fill" }) }),
|
|
247
247
|
/* @__PURE__ */ s("div", { className: "min-w-0 space-y-0.5", children: [
|
|
248
248
|
r ? /* @__PURE__ */ e("p", { className: "font-medium text-fg", children: r }) : null,
|
|
249
249
|
a ? /* @__PURE__ */ e("div", { className: "text-muted", children: a }) : null
|
|
@@ -252,7 +252,7 @@ function Ar({
|
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Jt({
|
|
256
256
|
className: t,
|
|
257
257
|
...r
|
|
258
258
|
}) {
|
|
@@ -267,7 +267,7 @@ function Wt({
|
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Qt({
|
|
271
271
|
className: t,
|
|
272
272
|
...r
|
|
273
273
|
}) {
|
|
@@ -282,7 +282,7 @@ function Xt({
|
|
|
282
282
|
}
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function $r({ className: t, ...r }) {
|
|
286
286
|
return /* @__PURE__ */ e(
|
|
287
287
|
"table",
|
|
288
288
|
{
|
|
@@ -291,13 +291,13 @@ function Br({ className: t, ...r }) {
|
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function qr({ className: t, ...r }) {
|
|
295
295
|
return /* @__PURE__ */ e("thead", { className: t, ...r });
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Yt({ className: t, ...r }) {
|
|
298
298
|
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...r });
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Zt({ className: t, ...r }) {
|
|
301
301
|
return /* @__PURE__ */ e(
|
|
302
302
|
"tr",
|
|
303
303
|
{
|
|
@@ -309,7 +309,7 @@ function Jt({ className: t, ...r }) {
|
|
|
309
309
|
}
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Gr({ className: t, ...r }) {
|
|
313
313
|
return /* @__PURE__ */ e(
|
|
314
314
|
"th",
|
|
315
315
|
{
|
|
@@ -321,7 +321,7 @@ function $r({ className: t, ...r }) {
|
|
|
321
321
|
}
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function fe({ className: t, ...r }) {
|
|
325
325
|
return /* @__PURE__ */ e(
|
|
326
326
|
"td",
|
|
327
327
|
{
|
|
@@ -333,31 +333,31 @@ function me({ className: t, ...r }) {
|
|
|
333
333
|
}
|
|
334
334
|
);
|
|
335
335
|
}
|
|
336
|
-
const
|
|
336
|
+
const Kt = {
|
|
337
337
|
default: "bg-table-container",
|
|
338
338
|
muted: "bg-surface border border-line",
|
|
339
339
|
transparent: "bg-transparent"
|
|
340
|
-
},
|
|
340
|
+
}, Ot = {
|
|
341
341
|
default: "bg-table-panel border-table-panel-border",
|
|
342
342
|
muted: "bg-elevated border-line",
|
|
343
343
|
transparent: "bg-transparent border-line"
|
|
344
344
|
};
|
|
345
|
-
function
|
|
345
|
+
function er(t) {
|
|
346
346
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function ce({
|
|
349
349
|
title: t,
|
|
350
350
|
description: r,
|
|
351
351
|
header: a,
|
|
352
352
|
children: l,
|
|
353
353
|
action: i,
|
|
354
|
-
tone:
|
|
355
|
-
className:
|
|
356
|
-
headerClassName:
|
|
357
|
-
panelClassName:
|
|
358
|
-
minHeight:
|
|
354
|
+
tone: d = "default",
|
|
355
|
+
className: c,
|
|
356
|
+
headerClassName: u,
|
|
357
|
+
panelClassName: h,
|
|
358
|
+
minHeight: g
|
|
359
359
|
}) {
|
|
360
|
-
const
|
|
360
|
+
const p = !!(t || r), N = er(i) ? /* @__PURE__ */ e(
|
|
361
361
|
S,
|
|
362
362
|
{
|
|
363
363
|
variant: i.variant ?? "primary",
|
|
@@ -372,17 +372,17 @@ function oe({
|
|
|
372
372
|
] }) : i.label
|
|
373
373
|
}
|
|
374
374
|
) : i;
|
|
375
|
-
return /* @__PURE__ */ s(
|
|
375
|
+
return /* @__PURE__ */ s(Jt, { className: o("relative", Kt[d], c), children: [
|
|
376
376
|
/* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
377
|
-
a ||
|
|
377
|
+
a || p ? (
|
|
378
378
|
// Header rows must not inherit the body row hover surface.
|
|
379
|
-
/* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent]",
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent]", u), children: [
|
|
380
|
+
p ? /* @__PURE__ */ s(
|
|
381
381
|
"div",
|
|
382
382
|
{
|
|
383
383
|
className: o(
|
|
384
384
|
"px-(--table-pad-x) pb-3 pt-4",
|
|
385
|
-
|
|
385
|
+
N && "pr-28"
|
|
386
386
|
),
|
|
387
387
|
children: [
|
|
388
388
|
t ? /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-fg", children: t }) : null,
|
|
@@ -394,34 +394,34 @@ function oe({
|
|
|
394
394
|
] })
|
|
395
395
|
) : null,
|
|
396
396
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
397
|
+
Qt,
|
|
398
398
|
{
|
|
399
|
-
className: o(
|
|
400
|
-
style:
|
|
399
|
+
className: o(Ot[d], h),
|
|
400
|
+
style: g ? { minHeight: g } : void 0,
|
|
401
401
|
children: l
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
] }),
|
|
405
|
-
|
|
405
|
+
N ? /* @__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: N }) }) : null
|
|
406
406
|
] });
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function tr(t) {
|
|
409
409
|
const r = $e.toArray(t), a = r.filter(
|
|
410
|
-
(l) =>
|
|
410
|
+
(l) => qe(l) && l.type === Ue
|
|
411
411
|
);
|
|
412
412
|
return {
|
|
413
|
-
header: a.length > 0 ? /* @__PURE__ */ e(
|
|
413
|
+
header: a.length > 0 ? /* @__PURE__ */ e(ye, { children: a }) : void 0,
|
|
414
414
|
body: r.filter((l) => !a.includes(l))
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const rr = b(
|
|
418
418
|
({ className: t, children: r, ...a }, l) => {
|
|
419
|
-
const { header: i, body:
|
|
420
|
-
return /* @__PURE__ */ e("div", { ref: l, ...a, children: /* @__PURE__ */ e(
|
|
419
|
+
const { header: i, body: d } = tr(r);
|
|
420
|
+
return /* @__PURE__ */ e("div", { ref: l, ...a, children: /* @__PURE__ */ e(ce, { className: o("shadow-xs", t), header: i, children: d }) });
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
|
|
424
|
-
const Ue =
|
|
423
|
+
rr.displayName = "Card";
|
|
424
|
+
const Ue = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
427
427
|
ref: a,
|
|
@@ -433,7 +433,7 @@ const Ue = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
433
433
|
}
|
|
434
434
|
));
|
|
435
435
|
Ue.displayName = "CardHeader";
|
|
436
|
-
const
|
|
436
|
+
const ar = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
437
437
|
"h2",
|
|
438
438
|
{
|
|
439
439
|
ref: a,
|
|
@@ -441,8 +441,8 @@ const tr = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
441
441
|
...r
|
|
442
442
|
}
|
|
443
443
|
));
|
|
444
|
-
|
|
445
|
-
const
|
|
444
|
+
ar.displayName = "CardTitle";
|
|
445
|
+
const nr = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
446
446
|
"p",
|
|
447
447
|
{
|
|
448
448
|
ref: a,
|
|
@@ -454,10 +454,10 @@ const rr = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
454
454
|
...r
|
|
455
455
|
}
|
|
456
456
|
));
|
|
457
|
-
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
const
|
|
457
|
+
nr.displayName = "CardDescription";
|
|
458
|
+
const lr = b(({ className: t, ...r }, a) => /* @__PURE__ */ e("div", { ref: a, className: o("px-5 py-4", t), ...r }));
|
|
459
|
+
lr.displayName = "CardContent";
|
|
460
|
+
const ir = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
461
461
|
"div",
|
|
462
462
|
{
|
|
463
463
|
ref: a,
|
|
@@ -468,8 +468,8 @@ const nr = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
468
468
|
...r
|
|
469
469
|
}
|
|
470
470
|
));
|
|
471
|
-
|
|
472
|
-
const
|
|
471
|
+
ir.displayName = "CardFooter";
|
|
472
|
+
const xe = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
473
473
|
_e.Root,
|
|
474
474
|
{
|
|
475
475
|
ref: a,
|
|
@@ -482,17 +482,17 @@ const he = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
482
482
|
t
|
|
483
483
|
),
|
|
484
484
|
...r,
|
|
485
|
-
children: /* @__PURE__ */ e(_e.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: r.checked === "indeterminate" ? /* @__PURE__ */ e(
|
|
485
|
+
children: /* @__PURE__ */ e(_e.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: r.checked === "indeterminate" ? /* @__PURE__ */ e(Tt, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(X, { className: "size-3", weight: "bold" }) })
|
|
486
486
|
}
|
|
487
487
|
));
|
|
488
|
-
|
|
488
|
+
xe.displayName = "Checkbox";
|
|
489
489
|
function Le(t) {
|
|
490
490
|
return t.width > 0 && t.height > 0;
|
|
491
491
|
}
|
|
492
492
|
function Re(t) {
|
|
493
493
|
return Math.min(1, Math.max(0.1, t));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function or(t, r) {
|
|
496
496
|
return !Le(t) || !Le(r) ? null : {
|
|
497
497
|
dx: t.left + t.width / 2 - (r.left + r.width / 2),
|
|
498
498
|
dy: t.top + t.height / 2 - (r.top + r.height / 2),
|
|
@@ -511,27 +511,27 @@ function Se(t) {
|
|
|
511
511
|
height: r.height
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function ve(t) {
|
|
515
515
|
if (!(t instanceof Element)) return;
|
|
516
516
|
const r = t.closest(We);
|
|
517
517
|
if (!r) return;
|
|
518
518
|
const a = Se(r);
|
|
519
519
|
a && (A = { rect: a, at: Date.now() });
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function sr() {
|
|
522
522
|
Ae || typeof document > "u" || (Ae = !0, document.addEventListener(
|
|
523
523
|
"pointerdown",
|
|
524
|
-
(t) =>
|
|
524
|
+
(t) => ve(t.target),
|
|
525
525
|
!0
|
|
526
526
|
), document.addEventListener(
|
|
527
527
|
"keydown",
|
|
528
528
|
(t) => {
|
|
529
|
-
t.key !== "Enter" && t.key !== " " ||
|
|
529
|
+
t.key !== "Enter" && t.key !== " " || ve(document.activeElement);
|
|
530
530
|
},
|
|
531
531
|
!0
|
|
532
532
|
));
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function dr(t) {
|
|
535
535
|
if (A && Date.now() - A.at < 2e3) {
|
|
536
536
|
const a = A.rect;
|
|
537
537
|
return A = null, a;
|
|
@@ -540,102 +540,106 @@ function or(t) {
|
|
|
540
540
|
const r = document.activeElement;
|
|
541
541
|
return r instanceof Element && r !== t && !t.contains(r) && r.matches(We) ? Se(r) : null;
|
|
542
542
|
}
|
|
543
|
-
const
|
|
544
|
-
|
|
543
|
+
const cr = 250, Xe = se(!1), Je = se(() => {
|
|
544
|
+
});
|
|
545
|
+
function ur({
|
|
545
546
|
open: t,
|
|
546
547
|
defaultOpen: r,
|
|
547
548
|
onOpenChange: a,
|
|
548
549
|
children: l,
|
|
549
550
|
...i
|
|
550
551
|
}) {
|
|
551
|
-
const [
|
|
552
|
+
const [d, c] = D(
|
|
552
553
|
r ?? !1
|
|
553
|
-
), [
|
|
554
|
-
|
|
554
|
+
), [u, h] = D(!1), g = te(!1), p = te(null), N = t ?? d, k = te(N);
|
|
555
|
+
k.current = N;
|
|
555
556
|
const C = t !== void 0;
|
|
556
|
-
V(() =>
|
|
557
|
-
t &&
|
|
557
|
+
V(() => sr(), []), V(() => {
|
|
558
|
+
t && h(!1);
|
|
558
559
|
}, [t]), V(
|
|
559
560
|
() => () => {
|
|
560
|
-
|
|
561
|
+
p.current && clearTimeout(p.current);
|
|
561
562
|
},
|
|
562
563
|
[]
|
|
563
564
|
);
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
566
|
-
|
|
565
|
+
const w = (I) => {
|
|
566
|
+
if (I) {
|
|
567
|
+
p.current && clearTimeout(p.current), g.current = !1, h(!1), C || c(!0), a == null || a(!0);
|
|
567
568
|
return;
|
|
568
569
|
}
|
|
569
|
-
if (!
|
|
570
|
+
if (!N || g.current) return;
|
|
570
571
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
571
|
-
C ||
|
|
572
|
+
C || c(!1), a == null || a(!1);
|
|
572
573
|
return;
|
|
573
574
|
}
|
|
574
|
-
|
|
575
|
-
C ||
|
|
576
|
-
|
|
575
|
+
g.current = !0, h(!0), p.current = setTimeout(() => {
|
|
576
|
+
C || c(!1), a == null || a(!1), requestAnimationFrame(() => {
|
|
577
|
+
k.current && (g.current = !1, h(!1));
|
|
577
578
|
});
|
|
578
|
-
},
|
|
579
|
+
}, cr);
|
|
579
580
|
};
|
|
580
|
-
return /* @__PURE__ */ e(Xe.Provider, { value:
|
|
581
|
-
|
|
581
|
+
return /* @__PURE__ */ e(Je.Provider, { value: () => w(!1), children: /* @__PURE__ */ e(Xe.Provider, { value: u, children: /* @__PURE__ */ e(
|
|
582
|
+
M.Root,
|
|
582
583
|
{
|
|
583
|
-
open:
|
|
584
|
-
onOpenChange:
|
|
584
|
+
open: N,
|
|
585
|
+
onOpenChange: w,
|
|
585
586
|
...i,
|
|
586
587
|
children: l
|
|
587
588
|
}
|
|
588
|
-
) });
|
|
589
|
+
) }) });
|
|
589
590
|
}
|
|
590
|
-
const
|
|
591
|
-
|
|
591
|
+
const Qe = b(({ onClick: t, ...r }, a) => /* @__PURE__ */ e(
|
|
592
|
+
M.Trigger,
|
|
592
593
|
{
|
|
593
594
|
ref: a,
|
|
594
595
|
onClick: (l) => {
|
|
595
|
-
|
|
596
|
+
ve(l.currentTarget), t == null || t(l);
|
|
596
597
|
},
|
|
597
598
|
...r
|
|
598
599
|
}
|
|
599
600
|
));
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
601
|
+
Qe.displayName = "DialogTrigger";
|
|
602
|
+
const Hr = M.Close, Ye = b(
|
|
603
|
+
({ variant: t = "secondary", children: r = "Cancel", ...a }, l) => /* @__PURE__ */ e(M.Close, { asChild: !0, children: /* @__PURE__ */ e(S, { ref: l, type: "button", variant: t, ...a, children: r }) })
|
|
604
|
+
);
|
|
605
|
+
Ye.displayName = "DialogCancel";
|
|
606
|
+
function Ze(t, r = !0) {
|
|
603
607
|
if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
604
608
|
return;
|
|
605
609
|
const a = Se(t);
|
|
606
610
|
if (!a) {
|
|
607
|
-
r && window.requestAnimationFrame(() =>
|
|
611
|
+
r && window.requestAnimationFrame(() => Ze(t, !1));
|
|
608
612
|
return;
|
|
609
613
|
}
|
|
610
614
|
t.dataset.dialogMotionStarted = "true";
|
|
611
|
-
const l =
|
|
615
|
+
const l = dr(t), i = l ? or(l, a) : null;
|
|
612
616
|
i ? (t.style.setProperty("--dialog-dx", `${i.dx}px`), t.style.setProperty("--dialog-dy", `${i.dy}px`), t.style.setProperty("--dialog-sx", String(i.sx)), t.style.setProperty("--dialog-sy", String(i.sy)), t.classList.add("dialog-fly-in")) : t.classList.add("dialog-pop-in");
|
|
613
|
-
const
|
|
617
|
+
const d = () => {
|
|
614
618
|
t.classList.remove("dialog-fly-in", "dialog-pop-in"), t.style.removeProperty("--dialog-dx"), t.style.removeProperty("--dialog-dy"), t.style.removeProperty("--dialog-sx"), t.style.removeProperty("--dialog-sy");
|
|
615
|
-
},
|
|
616
|
-
|
|
619
|
+
}, c = (u) => {
|
|
620
|
+
u.target === t && (u.animationName !== "dialog-fly-in" && u.animationName !== "dialog-pop-in" || (t.removeEventListener("animationend", c), d()));
|
|
617
621
|
};
|
|
618
|
-
t.addEventListener("animationend",
|
|
622
|
+
t.addEventListener("animationend", c);
|
|
619
623
|
}
|
|
620
|
-
const
|
|
621
|
-
const
|
|
622
|
-
(
|
|
623
|
-
if (
|
|
624
|
-
|
|
624
|
+
const Ke = b(({ className: t, children: r, onEscapeKeyDown: a, onPointerDownOutside: l, ...i }, d) => {
|
|
625
|
+
const c = ie(Xe), u = ie(Je), h = te(null), g = Lt(
|
|
626
|
+
(p) => {
|
|
627
|
+
if (h.current = p, p && Ze(p), typeof d == "function") {
|
|
628
|
+
d(p);
|
|
625
629
|
return;
|
|
626
630
|
}
|
|
627
|
-
|
|
631
|
+
d && (d.current = p);
|
|
628
632
|
},
|
|
629
|
-
[
|
|
633
|
+
[d]
|
|
630
634
|
);
|
|
631
|
-
return /* @__PURE__ */ s(
|
|
635
|
+
return /* @__PURE__ */ s(M.Portal, { children: [
|
|
632
636
|
/* @__PURE__ */ e(
|
|
633
|
-
|
|
637
|
+
M.Overlay,
|
|
634
638
|
{
|
|
635
639
|
className: o(
|
|
636
|
-
"fixed inset-0 z-50 overflow-hidden bg-overlay data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
637
|
-
!
|
|
638
|
-
|
|
640
|
+
"fixed inset-0 z-50 overflow-hidden bg-overlay backdrop-blur-[3px] data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
641
|
+
!c && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
642
|
+
c && "opacity-0 transition-opacity duration-200"
|
|
639
643
|
),
|
|
640
644
|
children: /* @__PURE__ */ e(
|
|
641
645
|
"span",
|
|
@@ -647,21 +651,27 @@ const Qe = p(({ className: t, children: r, ...a }, l) => {
|
|
|
647
651
|
}
|
|
648
652
|
),
|
|
649
653
|
/* @__PURE__ */ e("div", { className: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center overflow-y-auto p-4", children: /* @__PURE__ */ s(
|
|
650
|
-
|
|
654
|
+
M.Content,
|
|
651
655
|
{
|
|
652
|
-
ref:
|
|
656
|
+
ref: g,
|
|
653
657
|
className: o(
|
|
654
658
|
"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]",
|
|
655
659
|
"rounded-2xl border border-(--dialog-shell-border) bg-(--dialog-shell-bg) pb-3 shadow-(--dialog-shell-shadow) sm:pb-4",
|
|
656
|
-
|
|
660
|
+
c && "dialog-closing",
|
|
657
661
|
"focus:outline-none",
|
|
658
662
|
t
|
|
659
663
|
),
|
|
660
|
-
|
|
664
|
+
onEscapeKeyDown: (p) => {
|
|
665
|
+
a == null || a(p), !p.defaultPrevented && (p.preventDefault(), u());
|
|
666
|
+
},
|
|
667
|
+
onPointerDownOutside: (p) => {
|
|
668
|
+
l == null || l(p), !p.defaultPrevented && (p.preventDefault(), u());
|
|
669
|
+
},
|
|
670
|
+
...i,
|
|
661
671
|
children: [
|
|
662
672
|
r,
|
|
663
|
-
/* @__PURE__ */ s(
|
|
664
|
-
/* @__PURE__ */ e(
|
|
673
|
+
/* @__PURE__ */ s(M.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: [
|
|
674
|
+
/* @__PURE__ */ e(le, { className: "size-4" }),
|
|
665
675
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
666
676
|
] })
|
|
667
677
|
]
|
|
@@ -669,8 +679,8 @@ const Qe = p(({ className: t, children: r, ...a }, l) => {
|
|
|
669
679
|
) })
|
|
670
680
|
] });
|
|
671
681
|
});
|
|
672
|
-
|
|
673
|
-
function
|
|
682
|
+
Ke.displayName = "DialogContent";
|
|
683
|
+
function mr({
|
|
674
684
|
className: t,
|
|
675
685
|
...r
|
|
676
686
|
}) {
|
|
@@ -686,7 +696,7 @@ function cr({
|
|
|
686
696
|
}
|
|
687
697
|
);
|
|
688
698
|
}
|
|
689
|
-
function
|
|
699
|
+
function pr({
|
|
690
700
|
className: t,
|
|
691
701
|
...r
|
|
692
702
|
}) {
|
|
@@ -699,7 +709,7 @@ function ur({
|
|
|
699
709
|
}
|
|
700
710
|
);
|
|
701
711
|
}
|
|
702
|
-
function
|
|
712
|
+
function br({
|
|
703
713
|
className: t,
|
|
704
714
|
...r
|
|
705
715
|
}) {
|
|
@@ -715,7 +725,7 @@ function mr({
|
|
|
715
725
|
}
|
|
716
726
|
);
|
|
717
727
|
}
|
|
718
|
-
function
|
|
728
|
+
function fr({
|
|
719
729
|
className: t,
|
|
720
730
|
...r
|
|
721
731
|
}) {
|
|
@@ -731,75 +741,75 @@ function br({
|
|
|
731
741
|
}
|
|
732
742
|
);
|
|
733
743
|
}
|
|
734
|
-
const
|
|
735
|
-
|
|
744
|
+
const Oe = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
745
|
+
M.Title,
|
|
736
746
|
{
|
|
737
747
|
ref: a,
|
|
738
748
|
className: o("text-base font-semibold text-fg", t),
|
|
739
749
|
...r
|
|
740
750
|
}
|
|
741
751
|
));
|
|
742
|
-
|
|
743
|
-
const
|
|
744
|
-
|
|
752
|
+
Oe.displayName = "DialogTitle";
|
|
753
|
+
const hr = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
754
|
+
M.Description,
|
|
745
755
|
{
|
|
746
756
|
ref: a,
|
|
747
757
|
className: o("text-sm text-muted", t),
|
|
748
758
|
...r
|
|
749
759
|
}
|
|
750
760
|
));
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
function
|
|
761
|
+
hr.displayName = "DialogDescription";
|
|
762
|
+
const et = se(null);
|
|
763
|
+
function gr({
|
|
754
764
|
label: t,
|
|
755
765
|
value: r,
|
|
756
766
|
onChange: a,
|
|
757
767
|
disabled: l = !1,
|
|
758
768
|
name: i,
|
|
759
|
-
className:
|
|
760
|
-
children:
|
|
761
|
-
...
|
|
769
|
+
className: d,
|
|
770
|
+
children: c,
|
|
771
|
+
...u
|
|
762
772
|
}) {
|
|
763
|
-
const
|
|
764
|
-
return /* @__PURE__ */ e(
|
|
773
|
+
const h = de(), g = i ?? h;
|
|
774
|
+
return /* @__PURE__ */ e(et.Provider, { value: { name: g, value: r, onChange: a, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", d), ...u, children: [
|
|
765
775
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
766
|
-
|
|
776
|
+
c
|
|
767
777
|
] }) });
|
|
768
778
|
}
|
|
769
|
-
function
|
|
779
|
+
function xr({
|
|
770
780
|
value: t,
|
|
771
781
|
title: r,
|
|
772
782
|
description: a,
|
|
773
783
|
badge: l,
|
|
774
784
|
disabled: i = !1,
|
|
775
|
-
className:
|
|
785
|
+
className: d
|
|
776
786
|
}) {
|
|
777
|
-
const
|
|
778
|
-
if (!
|
|
787
|
+
const c = ie(et), u = de();
|
|
788
|
+
if (!c)
|
|
779
789
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
780
|
-
const
|
|
790
|
+
const h = i || c.disabled, g = c.value === t;
|
|
781
791
|
return /* @__PURE__ */ s(
|
|
782
792
|
"label",
|
|
783
793
|
{
|
|
784
794
|
className: o(
|
|
785
795
|
"group relative flex items-start gap-3",
|
|
786
|
-
|
|
787
|
-
|
|
796
|
+
h ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
797
|
+
d
|
|
788
798
|
),
|
|
789
799
|
children: [
|
|
790
800
|
/* @__PURE__ */ e(
|
|
791
801
|
"input",
|
|
792
802
|
{
|
|
793
803
|
type: "radio",
|
|
794
|
-
name:
|
|
804
|
+
name: c.name,
|
|
795
805
|
value: t,
|
|
796
|
-
checked:
|
|
797
|
-
disabled:
|
|
806
|
+
checked: g,
|
|
807
|
+
disabled: h,
|
|
798
808
|
onChange: () => {
|
|
799
|
-
var
|
|
800
|
-
return (
|
|
809
|
+
var p;
|
|
810
|
+
return (p = c.onChange) == null ? void 0 : p.call(c, t);
|
|
801
811
|
},
|
|
802
|
-
"aria-describedby": a ?
|
|
812
|
+
"aria-describedby": a ? u : void 0,
|
|
803
813
|
className: "peer sr-only"
|
|
804
814
|
}
|
|
805
815
|
),
|
|
@@ -817,73 +827,65 @@ function hr({
|
|
|
817
827
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
818
828
|
/* @__PURE__ */ s("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
819
829
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: r }),
|
|
820
|
-
l ? /* @__PURE__ */ e(
|
|
830
|
+
l ? /* @__PURE__ */ e(Wt, { variant: "primary", children: l }) : null
|
|
821
831
|
] }),
|
|
822
|
-
a ? /* @__PURE__ */ e("span", { id:
|
|
832
|
+
a ? /* @__PURE__ */ e("span", { id: u, className: "mt-1 block text-sm text-muted", children: a }) : null
|
|
823
833
|
] })
|
|
824
834
|
]
|
|
825
835
|
}
|
|
826
836
|
);
|
|
827
837
|
}
|
|
828
|
-
function
|
|
838
|
+
function Vr({
|
|
829
839
|
open: t,
|
|
830
840
|
onOpenChange: r,
|
|
831
841
|
trigger: a,
|
|
832
842
|
title: l,
|
|
833
843
|
options: i,
|
|
834
|
-
defaultValue:
|
|
835
|
-
value:
|
|
836
|
-
onValueChange:
|
|
837
|
-
cancelLabel:
|
|
838
|
-
confirmLabel:
|
|
839
|
-
onConfirm:
|
|
844
|
+
defaultValue: d,
|
|
845
|
+
value: c,
|
|
846
|
+
onValueChange: u,
|
|
847
|
+
cancelLabel: h = "Cancel",
|
|
848
|
+
confirmLabel: g = "Continue",
|
|
849
|
+
onConfirm: p
|
|
840
850
|
}) {
|
|
841
851
|
var I;
|
|
842
|
-
const [
|
|
843
|
-
return /* @__PURE__ */ s(
|
|
844
|
-
a ? /* @__PURE__ */ e(
|
|
852
|
+
const [N, k] = D(d ?? ((I = i[0]) == null ? void 0 : I.value) ?? ""), C = c ?? N;
|
|
853
|
+
return /* @__PURE__ */ s(ur, { open: t, onOpenChange: r, children: [
|
|
854
|
+
a ? /* @__PURE__ */ e(Qe, { asChild: !0, children: a }) : null,
|
|
845
855
|
/* @__PURE__ */ s(
|
|
846
|
-
|
|
856
|
+
Ke,
|
|
847
857
|
{
|
|
848
858
|
"aria-describedby": void 0,
|
|
849
859
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
850
860
|
children: [
|
|
851
|
-
/* @__PURE__ */ s(
|
|
852
|
-
/* @__PURE__ */ e(
|
|
853
|
-
/* @__PURE__ */ e(
|
|
854
|
-
|
|
855
|
-
}, children: i.map((
|
|
856
|
-
|
|
861
|
+
/* @__PURE__ */ s(mr, { children: [
|
|
862
|
+
/* @__PURE__ */ e(br, { children: /* @__PURE__ */ e(Oe, { className: "text-xl", children: l }) }),
|
|
863
|
+
/* @__PURE__ */ e(pr, { children: /* @__PURE__ */ e(gr, { label: l, value: C, onChange: (y) => {
|
|
864
|
+
c === void 0 && k(y), u == null || u(y);
|
|
865
|
+
}, children: i.map((y) => /* @__PURE__ */ e(
|
|
866
|
+
xr,
|
|
857
867
|
{
|
|
858
|
-
value:
|
|
859
|
-
title:
|
|
860
|
-
description:
|
|
861
|
-
badge:
|
|
868
|
+
value: y.value,
|
|
869
|
+
title: y.title,
|
|
870
|
+
description: y.description,
|
|
871
|
+
badge: y.badge
|
|
862
872
|
},
|
|
863
|
-
|
|
873
|
+
y.value
|
|
864
874
|
)) }) })
|
|
865
875
|
] }),
|
|
866
|
-
/* @__PURE__ */ s(
|
|
867
|
-
/* @__PURE__ */ e(
|
|
868
|
-
|
|
869
|
-
{
|
|
870
|
-
variant: "secondary",
|
|
871
|
-
className: "flex-1",
|
|
872
|
-
onClick: () => r == null ? void 0 : r(!1),
|
|
873
|
-
children: f
|
|
874
|
-
}
|
|
875
|
-
),
|
|
876
|
-
/* @__PURE__ */ e(S, { className: "flex-1", onClick: () => g == null ? void 0 : g(z), children: h })
|
|
876
|
+
/* @__PURE__ */ s(fr, { className: "gap-3 pt-2.5", children: [
|
|
877
|
+
/* @__PURE__ */ e(Ye, { className: "flex-1", children: h }),
|
|
878
|
+
/* @__PURE__ */ e(S, { className: "flex-1", onClick: () => p == null ? void 0 : p(C), children: g })
|
|
877
879
|
] })
|
|
878
880
|
]
|
|
879
881
|
}
|
|
880
882
|
)
|
|
881
883
|
] });
|
|
882
884
|
}
|
|
883
|
-
function
|
|
885
|
+
function Ur({ code: t, label: r, className: a }) {
|
|
884
886
|
const [l, i] = D(!1);
|
|
885
887
|
return /* @__PURE__ */ e(
|
|
886
|
-
|
|
888
|
+
ce,
|
|
887
889
|
{
|
|
888
890
|
className: a,
|
|
889
891
|
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: r }) }),
|
|
@@ -903,17 +905,17 @@ function qr({ code: t, label: r, className: a }) {
|
|
|
903
905
|
}
|
|
904
906
|
);
|
|
905
907
|
}
|
|
906
|
-
const
|
|
908
|
+
const vr = {
|
|
907
909
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
908
910
|
md: "h-[var(--control-h-md)] text-sm",
|
|
909
911
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
910
912
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
911
|
-
},
|
|
913
|
+
}, Nr = {
|
|
912
914
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
913
915
|
md: "px-[var(--control-pad-x-md)]",
|
|
914
916
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
915
917
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
916
|
-
},
|
|
918
|
+
}, yr = {
|
|
917
919
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
918
920
|
md: "left-[var(--control-pad-x-md)]",
|
|
919
921
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
@@ -923,89 +925,90 @@ const gr = {
|
|
|
923
925
|
md: "right-[var(--control-pad-x-md)]",
|
|
924
926
|
lg: "right-[var(--control-pad-x-lg)]",
|
|
925
927
|
xl: "right-[var(--control-pad-x-xl)]"
|
|
926
|
-
},
|
|
928
|
+
}, he = {
|
|
927
929
|
sm: "size-[var(--control-icon-sm)]",
|
|
928
930
|
md: "size-[var(--control-icon-md)]",
|
|
929
931
|
lg: "size-[var(--control-icon-lg)]",
|
|
930
932
|
xl: "size-[var(--control-icon-xl)]"
|
|
931
|
-
},
|
|
933
|
+
}, tt = b(
|
|
932
934
|
({
|
|
933
935
|
className: t,
|
|
934
936
|
containerClassName: r,
|
|
935
937
|
type: a = "text",
|
|
936
938
|
size: l = "md",
|
|
937
939
|
leadingIcon: i,
|
|
938
|
-
trailingIcon:
|
|
939
|
-
onClear:
|
|
940
|
-
value:
|
|
941
|
-
defaultValue:
|
|
942
|
-
error:
|
|
943
|
-
helperText:
|
|
944
|
-
id:
|
|
945
|
-
"aria-describedby":
|
|
946
|
-
disabled:
|
|
940
|
+
trailingIcon: d,
|
|
941
|
+
onClear: c,
|
|
942
|
+
value: u,
|
|
943
|
+
defaultValue: h,
|
|
944
|
+
error: g = !1,
|
|
945
|
+
helperText: p,
|
|
946
|
+
id: N,
|
|
947
|
+
"aria-describedby": k,
|
|
948
|
+
disabled: C,
|
|
947
949
|
readOnly: w,
|
|
948
950
|
...I
|
|
949
|
-
},
|
|
950
|
-
const B =
|
|
951
|
+
}, y) => {
|
|
952
|
+
const B = de(), J = N ?? B, F = !!p, _ = !!(c && (u !== void 0 ? String(u).length > 0 : h !== void 0 && String(h).length > 0)), Q = F ? `${J}-description` : void 0, ue = [k, Q].filter(Boolean).join(" ") || void 0, Y = /* @__PURE__ */ e(
|
|
951
953
|
"input",
|
|
952
954
|
{
|
|
953
|
-
ref:
|
|
954
|
-
id:
|
|
955
|
+
ref: y,
|
|
956
|
+
id: J,
|
|
955
957
|
type: a,
|
|
956
|
-
disabled:
|
|
958
|
+
disabled: C,
|
|
957
959
|
readOnly: w,
|
|
958
|
-
"aria-invalid":
|
|
959
|
-
"aria-describedby":
|
|
960
|
-
style: i ||
|
|
960
|
+
"aria-invalid": g || void 0,
|
|
961
|
+
"aria-describedby": ue,
|
|
962
|
+
style: i || d || _ ? {
|
|
961
963
|
paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
|
|
962
|
-
paddingInlineEnd:
|
|
964
|
+
paddingInlineEnd: d || _ ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
|
|
963
965
|
} : void 0,
|
|
964
966
|
className: o(
|
|
965
967
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
966
|
-
|
|
967
|
-
|
|
968
|
+
vr[l],
|
|
969
|
+
Nr[l],
|
|
968
970
|
"placeholder:text-(--input-placeholder)",
|
|
969
971
|
"hover:border-(--input-border-hover)",
|
|
970
972
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
971
|
-
|
|
972
|
-
!
|
|
973
|
-
|
|
973
|
+
g && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
974
|
+
!g && "border-(--input-border)",
|
|
975
|
+
a === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
|
|
976
|
+
C && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
974
977
|
w && "cursor-default focus-visible:ring-0",
|
|
975
978
|
t
|
|
976
979
|
),
|
|
977
|
-
value:
|
|
978
|
-
defaultValue:
|
|
980
|
+
value: u,
|
|
981
|
+
defaultValue: h,
|
|
979
982
|
...I
|
|
980
983
|
}
|
|
981
984
|
);
|
|
982
|
-
return !i && !
|
|
985
|
+
return !i && !d && !_ && !F ? Y : /* @__PURE__ */ s("div", { className: o("w-full", r), children: [
|
|
983
986
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
984
987
|
i ? /* @__PURE__ */ e(
|
|
985
988
|
"span",
|
|
986
989
|
{
|
|
987
990
|
className: o(
|
|
988
991
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
989
|
-
|
|
992
|
+
yr[l]
|
|
990
993
|
),
|
|
991
994
|
"aria-hidden": !0,
|
|
992
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
995
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", he[l]), children: i })
|
|
993
996
|
}
|
|
994
997
|
) : null,
|
|
995
|
-
|
|
998
|
+
Y,
|
|
996
999
|
_ ? /* @__PURE__ */ e(
|
|
997
1000
|
"button",
|
|
998
1001
|
{
|
|
999
1002
|
type: "button",
|
|
1000
1003
|
"aria-label": "Clear search",
|
|
1001
|
-
onClick:
|
|
1004
|
+
onClick: c,
|
|
1002
1005
|
className: o(
|
|
1003
1006
|
"absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
|
|
1004
1007
|
Be[l]
|
|
1005
1008
|
),
|
|
1006
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
1009
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", he[l]), children: /* @__PURE__ */ e(le, {}) })
|
|
1007
1010
|
}
|
|
1008
|
-
) :
|
|
1011
|
+
) : d ? /* @__PURE__ */ e(
|
|
1009
1012
|
"span",
|
|
1010
1013
|
{
|
|
1011
1014
|
className: o(
|
|
@@ -1013,27 +1016,27 @@ const gr = {
|
|
|
1013
1016
|
Be[l]
|
|
1014
1017
|
),
|
|
1015
1018
|
"aria-hidden": !0,
|
|
1016
|
-
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center",
|
|
1019
|
+
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", he[l]), children: d })
|
|
1017
1020
|
}
|
|
1018
1021
|
) : null
|
|
1019
1022
|
] }),
|
|
1020
1023
|
F ? /* @__PURE__ */ e(
|
|
1021
1024
|
"p",
|
|
1022
1025
|
{
|
|
1023
|
-
id:
|
|
1024
|
-
className: o("mt-1.5 text-xs",
|
|
1025
|
-
children:
|
|
1026
|
+
id: Q,
|
|
1027
|
+
className: o("mt-1.5 text-xs", g ? "text-error" : "text-muted"),
|
|
1028
|
+
children: p
|
|
1026
1029
|
}
|
|
1027
1030
|
) : null
|
|
1028
1031
|
] });
|
|
1029
1032
|
}
|
|
1030
1033
|
);
|
|
1031
|
-
|
|
1034
|
+
tt.displayName = "Input";
|
|
1032
1035
|
function ke(t, r) {
|
|
1033
1036
|
let a = 0;
|
|
1034
1037
|
return $e.forEach(t, (l) => {
|
|
1035
|
-
if (!
|
|
1036
|
-
if (r.some((
|
|
1038
|
+
if (!qe(l)) return;
|
|
1039
|
+
if (r.some((d) => d === l.type)) {
|
|
1037
1040
|
a += 1;
|
|
1038
1041
|
return;
|
|
1039
1042
|
}
|
|
@@ -1041,19 +1044,19 @@ function ke(t, r) {
|
|
|
1041
1044
|
i && (a += ke(i, r));
|
|
1042
1045
|
}), a;
|
|
1043
1046
|
}
|
|
1044
|
-
const
|
|
1045
|
-
function
|
|
1047
|
+
const rt = se(!1);
|
|
1048
|
+
function ge({
|
|
1046
1049
|
children: t,
|
|
1047
1050
|
...r
|
|
1048
1051
|
}) {
|
|
1049
1052
|
const a = ke(t, [
|
|
1050
|
-
|
|
1053
|
+
oe,
|
|
1051
1054
|
U
|
|
1052
1055
|
]) === 0;
|
|
1053
|
-
return /* @__PURE__ */ e(
|
|
1056
|
+
return /* @__PURE__ */ e(rt.Provider, { value: a, children: /* @__PURE__ */ e(T.Root, { ...r, children: t }) });
|
|
1054
1057
|
}
|
|
1055
|
-
const
|
|
1056
|
-
const l =
|
|
1058
|
+
const re = b(({ disabled: t, ...r }, a) => {
|
|
1059
|
+
const l = ie(rt);
|
|
1057
1060
|
return /* @__PURE__ */ e(
|
|
1058
1061
|
T.Trigger,
|
|
1059
1062
|
{
|
|
@@ -1063,8 +1066,8 @@ const te = p(({ disabled: t, ...r }, a) => {
|
|
|
1063
1066
|
}
|
|
1064
1067
|
);
|
|
1065
1068
|
});
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1069
|
+
re.displayName = "DropdownMenuTrigger";
|
|
1070
|
+
const Wr = T.Group, Xr = T.Portal, ae = b(({ className: t, sideOffset: r = 8, ...a }, l) => /* @__PURE__ */ e(T.Portal, { children: /* @__PURE__ */ e(
|
|
1068
1071
|
T.Content,
|
|
1069
1072
|
{
|
|
1070
1073
|
ref: l,
|
|
@@ -1082,8 +1085,8 @@ const Vr = T.Group, Ur = T.Portal, re = p(({ className: t, sideOffset: r = 8, ..
|
|
|
1082
1085
|
...a
|
|
1083
1086
|
}
|
|
1084
1087
|
) }));
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1088
|
+
ae.displayName = "DropdownMenuContent";
|
|
1089
|
+
const oe = b(({ className: t, inset: r, ...a }, l) => /* @__PURE__ */ e(
|
|
1087
1090
|
T.Item,
|
|
1088
1091
|
{
|
|
1089
1092
|
ref: l,
|
|
@@ -1097,8 +1100,8 @@ const le = p(({ className: t, inset: r, ...a }, l) => /* @__PURE__ */ e(
|
|
|
1097
1100
|
...a
|
|
1098
1101
|
}
|
|
1099
1102
|
));
|
|
1100
|
-
|
|
1101
|
-
const U =
|
|
1103
|
+
oe.displayName = "DropdownMenuItem";
|
|
1104
|
+
const U = b(({ className: t, children: r, checked: a, ...l }, i) => /* @__PURE__ */ s(
|
|
1102
1105
|
T.CheckboxItem,
|
|
1103
1106
|
{
|
|
1104
1107
|
ref: i,
|
|
@@ -1115,7 +1118,7 @@ const U = p(({ className: t, children: r, checked: a, ...l }, i) => /* @__PURE__
|
|
|
1115
1118
|
}
|
|
1116
1119
|
));
|
|
1117
1120
|
U.displayName = "DropdownMenuCheckboxItem";
|
|
1118
|
-
const
|
|
1121
|
+
const ne = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
1119
1122
|
T.Label,
|
|
1120
1123
|
{
|
|
1121
1124
|
ref: a,
|
|
@@ -1123,8 +1126,8 @@ const ae = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
1123
1126
|
...r
|
|
1124
1127
|
}
|
|
1125
1128
|
));
|
|
1126
|
-
|
|
1127
|
-
const
|
|
1129
|
+
ne.displayName = "DropdownMenuLabel";
|
|
1130
|
+
const Ne = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
1128
1131
|
T.Separator,
|
|
1129
1132
|
{
|
|
1130
1133
|
ref: a,
|
|
@@ -1132,18 +1135,18 @@ const xe = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
1132
1135
|
...r
|
|
1133
1136
|
}
|
|
1134
1137
|
));
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
function
|
|
1138
|
+
Ne.displayName = "DropdownMenuSeparator";
|
|
1139
|
+
const Jr = z.Group, wr = z.Value;
|
|
1140
|
+
function Cr({
|
|
1138
1141
|
children: t,
|
|
1139
1142
|
disabled: r,
|
|
1140
1143
|
...a
|
|
1141
1144
|
}) {
|
|
1142
1145
|
const l = ke(t, [ze]) === 0;
|
|
1143
|
-
return /* @__PURE__ */ e(
|
|
1146
|
+
return /* @__PURE__ */ e(z.Root, { disabled: r || l, ...a, children: t });
|
|
1144
1147
|
}
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1148
|
+
const at = b(({ className: t, children: r, variant: a = "field", ...l }, i) => /* @__PURE__ */ s(
|
|
1149
|
+
z.Trigger,
|
|
1147
1150
|
{
|
|
1148
1151
|
ref: i,
|
|
1149
1152
|
className: o(
|
|
@@ -1158,16 +1161,16 @@ const tt = p(({ className: t, children: r, variant: a = "field", ...l }, i) => /
|
|
|
1158
1161
|
...l,
|
|
1159
1162
|
children: [
|
|
1160
1163
|
r,
|
|
1161
|
-
/* @__PURE__ */ e(
|
|
1164
|
+
/* @__PURE__ */ e(z.Icon, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "size-3.5 text-subtle" }) })
|
|
1162
1165
|
]
|
|
1163
1166
|
}
|
|
1164
1167
|
));
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
({ className: t, children: r, position: a = "popper", sideOffset: l = 8, ...i },
|
|
1168
|
-
|
|
1168
|
+
at.displayName = "SelectTrigger";
|
|
1169
|
+
const nt = b(
|
|
1170
|
+
({ className: t, children: r, position: a = "popper", sideOffset: l = 8, ...i }, d) => /* @__PURE__ */ e(z.Portal, { children: /* @__PURE__ */ e(
|
|
1171
|
+
z.Content,
|
|
1169
1172
|
{
|
|
1170
|
-
ref:
|
|
1173
|
+
ref: d,
|
|
1171
1174
|
position: a,
|
|
1172
1175
|
sideOffset: l,
|
|
1173
1176
|
className: o(
|
|
@@ -1181,13 +1184,13 @@ const rt = p(
|
|
|
1181
1184
|
t
|
|
1182
1185
|
),
|
|
1183
1186
|
...i,
|
|
1184
|
-
children: /* @__PURE__ */ e(
|
|
1187
|
+
children: /* @__PURE__ */ e(z.Viewport, { className: "p-0", children: r })
|
|
1185
1188
|
}
|
|
1186
1189
|
) })
|
|
1187
1190
|
);
|
|
1188
|
-
|
|
1189
|
-
const ze =
|
|
1190
|
-
|
|
1191
|
+
nt.displayName = "SelectContent";
|
|
1192
|
+
const ze = b(({ className: t, children: r, ...a }, l) => /* @__PURE__ */ s(
|
|
1193
|
+
z.Item,
|
|
1191
1194
|
{
|
|
1192
1195
|
ref: l,
|
|
1193
1196
|
className: o(
|
|
@@ -1196,22 +1199,22 @@ const ze = p(({ className: t, children: r, ...a }, l) => /* @__PURE__ */ s(
|
|
|
1196
1199
|
),
|
|
1197
1200
|
...a,
|
|
1198
1201
|
children: [
|
|
1199
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1200
|
-
/* @__PURE__ */ e(
|
|
1202
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(z.ItemIndicator, { children: /* @__PURE__ */ e(X, { className: "size-3.5" }) }) }),
|
|
1203
|
+
/* @__PURE__ */ e(z.ItemText, { children: r })
|
|
1201
1204
|
]
|
|
1202
1205
|
}
|
|
1203
1206
|
));
|
|
1204
1207
|
ze.displayName = "SelectItem";
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1208
|
+
const Sr = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
1209
|
+
z.Label,
|
|
1207
1210
|
{
|
|
1208
1211
|
ref: a,
|
|
1209
1212
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1210
1213
|
...r
|
|
1211
1214
|
}
|
|
1212
1215
|
));
|
|
1213
|
-
|
|
1214
|
-
function
|
|
1216
|
+
Sr.displayName = "SelectLabel";
|
|
1217
|
+
function kr({
|
|
1215
1218
|
icon: t,
|
|
1216
1219
|
title: r,
|
|
1217
1220
|
description: a,
|
|
@@ -1236,22 +1239,22 @@ function Cr({
|
|
|
1236
1239
|
}
|
|
1237
1240
|
);
|
|
1238
1241
|
}
|
|
1239
|
-
const
|
|
1240
|
-
function
|
|
1242
|
+
const zr = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium";
|
|
1243
|
+
function Dr(t) {
|
|
1241
1244
|
return t.split(/\s+/).slice(0, 2).map((r) => {
|
|
1242
1245
|
var a;
|
|
1243
1246
|
return ((a = r[0]) == null ? void 0 : a.toUpperCase()) ?? "";
|
|
1244
1247
|
}).join("");
|
|
1245
1248
|
}
|
|
1246
|
-
function
|
|
1249
|
+
function Qr({
|
|
1247
1250
|
name: t,
|
|
1248
1251
|
secondary: r,
|
|
1249
1252
|
image: a
|
|
1250
1253
|
}) {
|
|
1251
1254
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1252
|
-
/* @__PURE__ */ s(
|
|
1253
|
-
a ? /* @__PURE__ */ e(
|
|
1254
|
-
/* @__PURE__ */ e(Ve, { children:
|
|
1255
|
+
/* @__PURE__ */ s(Ge, { className: "size-8", children: [
|
|
1256
|
+
a ? /* @__PURE__ */ e(He, { src: a, alt: "" }) : null,
|
|
1257
|
+
/* @__PURE__ */ e(Ve, { children: Dr(t) })
|
|
1255
1258
|
] }),
|
|
1256
1259
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1257
1260
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
@@ -1259,91 +1262,91 @@ function Xr({
|
|
|
1259
1262
|
] })
|
|
1260
1263
|
] });
|
|
1261
1264
|
}
|
|
1262
|
-
function
|
|
1265
|
+
function Yr({
|
|
1263
1266
|
rows: t,
|
|
1264
1267
|
columns: r,
|
|
1265
1268
|
getRowId: a,
|
|
1266
1269
|
loading: l = !1,
|
|
1267
1270
|
error: i,
|
|
1268
|
-
empty:
|
|
1269
|
-
search:
|
|
1270
|
-
filters:
|
|
1271
|
-
toolbarStart:
|
|
1272
|
-
toolbarEnd:
|
|
1273
|
-
tabs:
|
|
1274
|
-
activeTab:
|
|
1275
|
-
onTabChange:
|
|
1276
|
-
infoBanner:
|
|
1271
|
+
empty: d,
|
|
1272
|
+
search: c,
|
|
1273
|
+
filters: u,
|
|
1274
|
+
toolbarStart: h,
|
|
1275
|
+
toolbarEnd: g,
|
|
1276
|
+
tabs: p,
|
|
1277
|
+
activeTab: N,
|
|
1278
|
+
onTabChange: k,
|
|
1279
|
+
infoBanner: C,
|
|
1277
1280
|
selectable: w = !1,
|
|
1278
1281
|
bulkActions: I,
|
|
1279
|
-
rowActions:
|
|
1282
|
+
rowActions: y,
|
|
1280
1283
|
onRowClick: B,
|
|
1281
|
-
defaultSort:
|
|
1284
|
+
defaultSort: J,
|
|
1282
1285
|
pageSize: F = 25,
|
|
1283
1286
|
pageSizeOptions: _ = [10, 25, 50, 100],
|
|
1284
|
-
tone:
|
|
1285
|
-
headerAction:
|
|
1286
|
-
headerClassName:
|
|
1287
|
-
panelClassName:
|
|
1288
|
-
className:
|
|
1287
|
+
tone: Q,
|
|
1288
|
+
headerAction: ue,
|
|
1289
|
+
headerClassName: Y,
|
|
1290
|
+
panelClassName: lt,
|
|
1291
|
+
className: it
|
|
1289
1292
|
}) {
|
|
1290
1293
|
const [De, Te] = D(
|
|
1291
1294
|
() => Object.fromEntries(
|
|
1292
1295
|
r.filter((n) => n.defaultHidden && !n.required).map((n) => [n.id, !0])
|
|
1293
1296
|
)
|
|
1294
|
-
), [x,
|
|
1295
|
-
|
|
1296
|
-
), [$,
|
|
1297
|
+
), [x, ot] = D(
|
|
1298
|
+
J ?? null
|
|
1299
|
+
), [$, Z] = D(0), [L, st] = D(F), [R, me] = D(/* @__PURE__ */ new Set()), [dt, pe] = D([]), E = r.filter((n) => !De[n.id]), Me = r.filter((n) => De[n.id] && !n.required), be = (u ?? []).filter((n) => dt.includes(n.id)), ct = (u ?? []).map((n) => `${n.id}:${n.value.join(",")}`).join("|"), K = je(() => {
|
|
1297
1300
|
let n = t;
|
|
1298
|
-
for (const
|
|
1299
|
-
|
|
1300
|
-
if (!
|
|
1301
|
-
const m =
|
|
1302
|
-
return n.filter((
|
|
1303
|
-
}, [t,
|
|
1304
|
-
if (!x) return
|
|
1305
|
-
const n = r.find((
|
|
1306
|
-
if (!(n != null && n.sortValue)) return
|
|
1301
|
+
for (const f of u ?? [])
|
|
1302
|
+
f.value.length > 0 && (n = n.filter((v) => f.match(v, f.value)));
|
|
1303
|
+
if (!c || !c.value.trim()) return n;
|
|
1304
|
+
const m = c.value.trim().toLowerCase();
|
|
1305
|
+
return n.filter((f) => c.keys(f).toLowerCase().includes(m));
|
|
1306
|
+
}, [t, c, u]), q = je(() => {
|
|
1307
|
+
if (!x) return K;
|
|
1308
|
+
const n = r.find((f) => f.id === x.id);
|
|
1309
|
+
if (!(n != null && n.sortValue)) return K;
|
|
1307
1310
|
const m = x.dir === "asc" ? 1 : -1;
|
|
1308
|
-
return [...
|
|
1309
|
-
const
|
|
1310
|
-
return
|
|
1311
|
+
return [...K].sort((f, v) => {
|
|
1312
|
+
const P = n.sortValue(f), H = n.sortValue(v);
|
|
1313
|
+
return P == null && H == null ? 0 : P == null ? 1 : H == null ? -1 : typeof P == "number" && typeof H == "number" ? (P - H) * m : String(P).localeCompare(String(H)) * m;
|
|
1311
1314
|
});
|
|
1312
|
-
}, [
|
|
1315
|
+
}, [K, x, r]), G = Math.max(1, Math.ceil(q.length / L));
|
|
1313
1316
|
V(() => {
|
|
1314
|
-
|
|
1315
|
-
}, [
|
|
1316
|
-
$ >
|
|
1317
|
-
}, [$,
|
|
1318
|
-
const O = $ * L, j =
|
|
1319
|
-
n.sortable &&
|
|
1317
|
+
Z(0);
|
|
1318
|
+
}, [c == null ? void 0 : c.value, L, x == null ? void 0 : x.id, x == null ? void 0 : x.dir, N, ct]), V(() => {
|
|
1319
|
+
$ > G - 1 && Z(G - 1);
|
|
1320
|
+
}, [$, G]);
|
|
1321
|
+
const O = $ * L, j = q.slice(O, O + L), ut = (n) => {
|
|
1322
|
+
n.sortable && ot(
|
|
1320
1323
|
(m) => (m == null ? void 0 : m.id) === n.id ? m.dir === "asc" ? { id: n.id, dir: "desc" } : null : { id: n.id, dir: "asc" }
|
|
1321
1324
|
);
|
|
1322
|
-
}, Pe = j.length > 0 && j.every((n) => R.has(a(n))),
|
|
1323
|
-
|
|
1325
|
+
}, Pe = j.length > 0 && j.every((n) => R.has(a(n))), mt = j.some((n) => R.has(a(n))), pt = t.filter((n) => R.has(a(n))), bt = () => {
|
|
1326
|
+
me((n) => {
|
|
1324
1327
|
const m = new Set(n);
|
|
1325
|
-
return Pe ? j.forEach((
|
|
1328
|
+
return Pe ? j.forEach((f) => m.delete(a(f))) : j.forEach((f) => m.add(a(f))), m;
|
|
1326
1329
|
});
|
|
1327
|
-
},
|
|
1328
|
-
|
|
1329
|
-
const
|
|
1330
|
-
return
|
|
1330
|
+
}, ft = (n) => {
|
|
1331
|
+
me((m) => {
|
|
1332
|
+
const f = new Set(m);
|
|
1333
|
+
return f.has(n) ? f.delete(n) : f.add(n), f;
|
|
1331
1334
|
});
|
|
1332
|
-
},
|
|
1335
|
+
}, ht = !!(c || u != null && u.length || h || g), gt = E.some((n) => n.width), xt = E.length > 1 ? 70 / (E.length - 1) : 100, vt = E.map((n, m) => n.width ? n.width : gt ? "auto" : `${m === 0 ? 30 : xt}%`), Ie = [
|
|
1333
1336
|
...w ? ["2.75rem"] : [],
|
|
1334
|
-
...
|
|
1335
|
-
...
|
|
1336
|
-
],
|
|
1337
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1338
|
-
|
|
1339
|
-
const m = n.id ===
|
|
1337
|
+
...vt,
|
|
1338
|
+
...y ? ["11rem"] : []
|
|
1339
|
+
], Nt = (n) => (x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? "ascending" : "descending" : void 0;
|
|
1340
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", it), children: [
|
|
1341
|
+
p && p.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: p.map((n) => {
|
|
1342
|
+
const m = n.id === N;
|
|
1340
1343
|
return /* @__PURE__ */ e(
|
|
1341
1344
|
"button",
|
|
1342
1345
|
{
|
|
1343
1346
|
type: "button",
|
|
1344
1347
|
role: "tab",
|
|
1345
1348
|
"aria-selected": m,
|
|
1346
|
-
onClick: () =>
|
|
1349
|
+
onClick: () => k == null ? void 0 : k(n.id),
|
|
1347
1350
|
className: o(
|
|
1348
1351
|
"-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
|
|
1349
1352
|
m ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
|
|
@@ -1353,35 +1356,35 @@ function Kr({
|
|
|
1353
1356
|
n.id
|
|
1354
1357
|
);
|
|
1355
1358
|
}) }),
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
+
ht && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1360
|
+
c && /* @__PURE__ */ e(
|
|
1361
|
+
tt,
|
|
1359
1362
|
{
|
|
1360
1363
|
type: "search",
|
|
1361
|
-
"aria-label":
|
|
1362
|
-
placeholder:
|
|
1363
|
-
value:
|
|
1364
|
-
onChange: (n) =>
|
|
1365
|
-
onClear: () =>
|
|
1366
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1364
|
+
"aria-label": c.placeholder ?? "Search",
|
|
1365
|
+
placeholder: c.placeholder ?? "Search...",
|
|
1366
|
+
value: c.value,
|
|
1367
|
+
onChange: (n) => c.onChange(n.target.value),
|
|
1368
|
+
onClear: () => c.onChange(""),
|
|
1369
|
+
leadingIcon: /* @__PURE__ */ e(Mt, {}),
|
|
1367
1370
|
containerClassName: "w-full sm:w-[280px]",
|
|
1368
1371
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1369
1372
|
}
|
|
1370
1373
|
),
|
|
1371
|
-
|
|
1372
|
-
/* @__PURE__ */ s(
|
|
1373
|
-
/* @__PURE__ */ e(
|
|
1374
|
+
h,
|
|
1375
|
+
/* @__PURE__ */ s(ge, { children: [
|
|
1376
|
+
/* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1374
1377
|
S,
|
|
1375
1378
|
{
|
|
1376
1379
|
variant: "secondary",
|
|
1377
1380
|
size: "md",
|
|
1378
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1381
|
+
leadingIcon: /* @__PURE__ */ e(Pt, {}),
|
|
1379
1382
|
trailingIcon: /* @__PURE__ */ e(ee, {}),
|
|
1380
1383
|
children: "Columns"
|
|
1381
1384
|
}
|
|
1382
1385
|
) }),
|
|
1383
|
-
/* @__PURE__ */ s(
|
|
1384
|
-
/* @__PURE__ */ e(
|
|
1386
|
+
/* @__PURE__ */ s(ae, { align: "end", className: "w-54", children: [
|
|
1387
|
+
/* @__PURE__ */ e(ne, { className: "text-[13px]", children: "Active columns" }),
|
|
1385
1388
|
E.map((n) => /* @__PURE__ */ s(
|
|
1386
1389
|
U,
|
|
1387
1390
|
{
|
|
@@ -1392,14 +1395,14 @@ function Kr({
|
|
|
1392
1395
|
className: "justify-between",
|
|
1393
1396
|
children: [
|
|
1394
1397
|
/* @__PURE__ */ e("span", { children: n.header }),
|
|
1395
|
-
n.required ? /* @__PURE__ */ e(
|
|
1398
|
+
n.required ? /* @__PURE__ */ e(It, { className: "size-3.5 text-subtle", "aria-hidden": !0 }) : null
|
|
1396
1399
|
]
|
|
1397
1400
|
},
|
|
1398
1401
|
n.id
|
|
1399
1402
|
)),
|
|
1400
|
-
Me.length > 0 ? /* @__PURE__ */ s(
|
|
1401
|
-
/* @__PURE__ */ e(
|
|
1402
|
-
/* @__PURE__ */ e(
|
|
1403
|
+
Me.length > 0 ? /* @__PURE__ */ s(ye, { children: [
|
|
1404
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
1405
|
+
/* @__PURE__ */ e(ne, { className: "text-[13px]", children: "Available columns" }),
|
|
1403
1406
|
Me.map((n) => /* @__PURE__ */ e(
|
|
1404
1407
|
U,
|
|
1405
1408
|
{
|
|
@@ -1413,21 +1416,21 @@ function Kr({
|
|
|
1413
1416
|
] }) : null
|
|
1414
1417
|
] })
|
|
1415
1418
|
] }),
|
|
1416
|
-
|
|
1417
|
-
/* @__PURE__ */ e(
|
|
1419
|
+
u && u.length > 0 ? /* @__PURE__ */ s(ge, { children: [
|
|
1420
|
+
/* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1418
1421
|
S,
|
|
1419
1422
|
{
|
|
1420
1423
|
variant: "secondary",
|
|
1421
1424
|
size: "md",
|
|
1422
1425
|
iconOnly: !0,
|
|
1423
1426
|
"aria-label": "Add filter",
|
|
1424
|
-
children: /* @__PURE__ */ e(
|
|
1427
|
+
children: /* @__PURE__ */ e(Ee, {})
|
|
1425
1428
|
}
|
|
1426
1429
|
) }),
|
|
1427
|
-
/* @__PURE__ */ e(
|
|
1428
|
-
|
|
1430
|
+
/* @__PURE__ */ e(ae, { align: "start", className: "w-54", children: u.map((n) => /* @__PURE__ */ e(
|
|
1431
|
+
oe,
|
|
1429
1432
|
{
|
|
1430
|
-
onSelect: () =>
|
|
1433
|
+
onSelect: () => pe(
|
|
1431
1434
|
(m) => m.includes(n.id) ? m : [...m, n.id]
|
|
1432
1435
|
),
|
|
1433
1436
|
children: n.label
|
|
@@ -1435,12 +1438,12 @@ function Kr({
|
|
|
1435
1438
|
n.id
|
|
1436
1439
|
)) })
|
|
1437
1440
|
] }) : null,
|
|
1438
|
-
|
|
1441
|
+
g ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: g }) : null
|
|
1439
1442
|
] }),
|
|
1440
|
-
|
|
1441
|
-
|
|
1443
|
+
be.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1444
|
+
be.map((n) => {
|
|
1442
1445
|
const m = () => {
|
|
1443
|
-
n.onChange([]),
|
|
1446
|
+
n.onChange([]), pe((f) => f.filter((v) => v !== n.id));
|
|
1444
1447
|
};
|
|
1445
1448
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1446
1449
|
/* @__PURE__ */ e(
|
|
@@ -1452,39 +1455,39 @@ function Kr({
|
|
|
1452
1455
|
"aria-label": `Remove ${n.label} filter`,
|
|
1453
1456
|
className: "rounded-r-none",
|
|
1454
1457
|
onClick: m,
|
|
1455
|
-
children: /* @__PURE__ */ e(
|
|
1458
|
+
children: /* @__PURE__ */ e(le, {})
|
|
1456
1459
|
}
|
|
1457
1460
|
),
|
|
1458
|
-
/* @__PURE__ */ s(
|
|
1459
|
-
/* @__PURE__ */ e(
|
|
1460
|
-
/* @__PURE__ */ e(
|
|
1461
|
+
/* @__PURE__ */ s(ge, { children: [
|
|
1462
|
+
/* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ s(S, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1463
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
1461
1464
|
/* @__PURE__ */ e("span", { className: "font-medium", children: n.label }),
|
|
1462
1465
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1463
1466
|
/* @__PURE__ */ e("span", { className: "text-muted", children: n.value.length > 0 ? `${n.value.length} selected` : "Enter value" }),
|
|
1464
1467
|
/* @__PURE__ */ e(ee, { className: "text-muted" })
|
|
1465
1468
|
] }) }),
|
|
1466
|
-
/* @__PURE__ */ s(
|
|
1467
|
-
/* @__PURE__ */ s(
|
|
1469
|
+
/* @__PURE__ */ s(ae, { align: "start", className: "w-56", children: [
|
|
1470
|
+
/* @__PURE__ */ s(ne, { className: "text-[13px]", children: [
|
|
1468
1471
|
"Filter by ",
|
|
1469
1472
|
n.label
|
|
1470
1473
|
] }),
|
|
1471
|
-
n.options.map((
|
|
1472
|
-
const v = n.value.includes(
|
|
1474
|
+
n.options.map((f) => {
|
|
1475
|
+
const v = n.value.includes(f.value);
|
|
1473
1476
|
return /* @__PURE__ */ e(
|
|
1474
1477
|
U,
|
|
1475
1478
|
{
|
|
1476
1479
|
checked: v,
|
|
1477
1480
|
onCheckedChange: () => n.onChange(
|
|
1478
|
-
v ? n.value.filter((
|
|
1481
|
+
v ? n.value.filter((P) => P !== f.value) : [...n.value, f.value]
|
|
1479
1482
|
),
|
|
1480
|
-
onSelect: (
|
|
1481
|
-
children:
|
|
1483
|
+
onSelect: (P) => P.preventDefault(),
|
|
1484
|
+
children: f.label
|
|
1482
1485
|
},
|
|
1483
|
-
|
|
1486
|
+
f.value
|
|
1484
1487
|
);
|
|
1485
1488
|
}),
|
|
1486
|
-
/* @__PURE__ */ e(
|
|
1487
|
-
/* @__PURE__ */ e(
|
|
1489
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
1490
|
+
/* @__PURE__ */ e(oe, { onSelect: m, children: "Clear filter" })
|
|
1488
1491
|
] })
|
|
1489
1492
|
] })
|
|
1490
1493
|
] }, n.id);
|
|
@@ -1494,15 +1497,15 @@ function Kr({
|
|
|
1494
1497
|
{
|
|
1495
1498
|
type: "button",
|
|
1496
1499
|
onClick: () => {
|
|
1497
|
-
for (const n of
|
|
1498
|
-
|
|
1500
|
+
for (const n of be) n.onChange([]);
|
|
1501
|
+
pe([]);
|
|
1499
1502
|
},
|
|
1500
1503
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1501
1504
|
children: "Clear filters"
|
|
1502
1505
|
}
|
|
1503
1506
|
)
|
|
1504
1507
|
] }) : null,
|
|
1505
|
-
|
|
1508
|
+
C,
|
|
1506
1509
|
w && R.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: [
|
|
1507
1510
|
/* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
|
|
1508
1511
|
R.size,
|
|
@@ -1514,7 +1517,7 @@ function Kr({
|
|
|
1514
1517
|
size: "md",
|
|
1515
1518
|
variant: n.variant ?? "outline",
|
|
1516
1519
|
disabled: n.disabled,
|
|
1517
|
-
onClick: () => void n.onRun(
|
|
1520
|
+
onClick: () => void n.onRun(pt),
|
|
1518
1521
|
children: [
|
|
1519
1522
|
n.icon,
|
|
1520
1523
|
n.label
|
|
@@ -1526,40 +1529,40 @@ function Kr({
|
|
|
1526
1529
|
"button",
|
|
1527
1530
|
{
|
|
1528
1531
|
type: "button",
|
|
1529
|
-
onClick: () =>
|
|
1532
|
+
onClick: () => me(/* @__PURE__ */ new Set()),
|
|
1530
1533
|
className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
|
|
1531
1534
|
children: [
|
|
1532
|
-
/* @__PURE__ */ e(
|
|
1535
|
+
/* @__PURE__ */ e(le, { className: "size-3.5" }),
|
|
1533
1536
|
"Clear"
|
|
1534
1537
|
]
|
|
1535
1538
|
}
|
|
1536
1539
|
)
|
|
1537
1540
|
] }),
|
|
1538
1541
|
/* @__PURE__ */ e(
|
|
1539
|
-
|
|
1542
|
+
ce,
|
|
1540
1543
|
{
|
|
1541
|
-
action:
|
|
1542
|
-
tone:
|
|
1543
|
-
headerClassName:
|
|
1544
|
-
panelClassName:
|
|
1544
|
+
action: ue,
|
|
1545
|
+
tone: Q,
|
|
1546
|
+
headerClassName: Y,
|
|
1547
|
+
panelClassName: lt,
|
|
1545
1548
|
header: (
|
|
1546
1549
|
// Visible header: presentational so its controls stay focusable while
|
|
1547
1550
|
// the body table carries the semantic column headers (sr-only).
|
|
1548
1551
|
/* @__PURE__ */ s("table", { role: "presentation", className: "w-full table-fixed border-collapse", children: [
|
|
1549
|
-
/* @__PURE__ */ e("colgroup", { children:
|
|
1552
|
+
/* @__PURE__ */ e("colgroup", { children: Ie.map((n, m) => /* @__PURE__ */ e("col", { style: { width: n } }, m)) }),
|
|
1550
1553
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
1551
1554
|
w && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-4 align-middle", children: /* @__PURE__ */ e(
|
|
1552
|
-
|
|
1555
|
+
xe,
|
|
1553
1556
|
{
|
|
1554
1557
|
"aria-label": "Select all rows",
|
|
1555
|
-
checked: Pe ? !0 :
|
|
1556
|
-
onCheckedChange:
|
|
1558
|
+
checked: Pe ? !0 : mt ? "indeterminate" : !1,
|
|
1559
|
+
onCheckedChange: bt
|
|
1557
1560
|
}
|
|
1558
1561
|
) }),
|
|
1559
1562
|
E.map((n) => /* @__PURE__ */ e(
|
|
1560
1563
|
"th",
|
|
1561
1564
|
{
|
|
1562
|
-
className: o(
|
|
1565
|
+
className: o(zr, n.align === "right" && "text-right", n.className),
|
|
1563
1566
|
children: n.sortable ? /* @__PURE__ */ s(
|
|
1564
1567
|
S,
|
|
1565
1568
|
{
|
|
@@ -1567,7 +1570,7 @@ function Kr({
|
|
|
1567
1570
|
variant: "ghost",
|
|
1568
1571
|
size: "xs",
|
|
1569
1572
|
"aria-label": `Sort by ${n.header}`,
|
|
1570
|
-
onClick: () =>
|
|
1573
|
+
onClick: () => ut(n),
|
|
1571
1574
|
className: o(
|
|
1572
1575
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1573
1576
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
@@ -1576,58 +1579,58 @@ function Kr({
|
|
|
1576
1579
|
),
|
|
1577
1580
|
children: [
|
|
1578
1581
|
n.header,
|
|
1579
|
-
(x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? /* @__PURE__ */ e(
|
|
1582
|
+
(x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? /* @__PURE__ */ e(jt, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(ee, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(_t, { className: "size-3.5 opacity-50" })
|
|
1580
1583
|
]
|
|
1581
1584
|
}
|
|
1582
1585
|
) : n.header
|
|
1583
1586
|
},
|
|
1584
1587
|
n.id
|
|
1585
1588
|
)),
|
|
1586
|
-
|
|
1589
|
+
y && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1587
1590
|
] }) })
|
|
1588
1591
|
] })
|
|
1589
1592
|
),
|
|
1590
1593
|
children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((n) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, n)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1591
|
-
/* @__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(
|
|
1594
|
+
/* @__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(Et, { weight: "duotone" }) }),
|
|
1592
1595
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1593
1596
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1594
1597
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1595
1598
|
] }),
|
|
1596
1599
|
i.action
|
|
1597
1600
|
] }) : j.length === 0 ? /* @__PURE__ */ e(
|
|
1598
|
-
|
|
1601
|
+
kr,
|
|
1599
1602
|
{
|
|
1600
|
-
icon:
|
|
1601
|
-
title: (
|
|
1602
|
-
description: typeof (
|
|
1603
|
-
action:
|
|
1603
|
+
icon: d == null ? void 0 : d.icon,
|
|
1604
|
+
title: (d == null ? void 0 : d.title) ?? "No results",
|
|
1605
|
+
description: typeof (d == null ? void 0 : d.description) == "string" ? d.description : void 0,
|
|
1606
|
+
action: d == null ? void 0 : d.action
|
|
1604
1607
|
}
|
|
1605
1608
|
) : /* @__PURE__ */ s("table", { className: "w-full table-fixed border-collapse", children: [
|
|
1606
|
-
/* @__PURE__ */ e("colgroup", { children:
|
|
1609
|
+
/* @__PURE__ */ e("colgroup", { children: Ie.map((n, m) => /* @__PURE__ */ e("col", { style: { width: n } }, m)) }),
|
|
1607
1610
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1608
1611
|
w && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1609
|
-
E.map((n) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort":
|
|
1610
|
-
|
|
1612
|
+
E.map((n) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": Nt(n), children: n.header }, n.id)),
|
|
1613
|
+
y && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1611
1614
|
] }) }),
|
|
1612
|
-
/* @__PURE__ */ e(
|
|
1613
|
-
const m = a(n),
|
|
1615
|
+
/* @__PURE__ */ e(Yt, { children: j.map((n) => {
|
|
1616
|
+
const m = a(n), f = R.has(m);
|
|
1614
1617
|
return /* @__PURE__ */ s(
|
|
1615
|
-
|
|
1618
|
+
Zt,
|
|
1616
1619
|
{
|
|
1617
|
-
"data-state":
|
|
1620
|
+
"data-state": f ? "selected" : void 0,
|
|
1618
1621
|
onClick: B ? () => B(n) : void 0,
|
|
1619
1622
|
className: B ? "cursor-pointer" : void 0,
|
|
1620
1623
|
children: [
|
|
1621
|
-
w && /* @__PURE__ */ e(
|
|
1622
|
-
|
|
1624
|
+
w && /* @__PURE__ */ e(fe, { className: "w-11 px-4", onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1625
|
+
xe,
|
|
1623
1626
|
{
|
|
1624
1627
|
"aria-label": "Select row",
|
|
1625
|
-
checked:
|
|
1626
|
-
onCheckedChange: () =>
|
|
1628
|
+
checked: f,
|
|
1629
|
+
onCheckedChange: () => ft(m)
|
|
1627
1630
|
}
|
|
1628
1631
|
) }),
|
|
1629
1632
|
E.map((v) => /* @__PURE__ */ e(
|
|
1630
|
-
|
|
1633
|
+
fe,
|
|
1631
1634
|
{
|
|
1632
1635
|
"data-numeric": v.numeric ? "" : void 0,
|
|
1633
1636
|
className: o(v.align === "right" && "text-right", v.className),
|
|
@@ -1635,7 +1638,7 @@ function Kr({
|
|
|
1635
1638
|
},
|
|
1636
1639
|
v.id
|
|
1637
1640
|
)),
|
|
1638
|
-
|
|
1641
|
+
y && /* @__PURE__ */ e(fe, { className: "w-44 px-4 text-right", onClick: (v) => v.stopPropagation(), children: y(n) })
|
|
1639
1642
|
]
|
|
1640
1643
|
},
|
|
1641
1644
|
m
|
|
@@ -1644,18 +1647,18 @@ function Kr({
|
|
|
1644
1647
|
] })
|
|
1645
1648
|
}
|
|
1646
1649
|
),
|
|
1647
|
-
!l && !i &&
|
|
1650
|
+
!l && !i && q.length > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1648
1651
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1649
1652
|
O + 1,
|
|
1650
1653
|
"–",
|
|
1651
|
-
Math.min(O + L,
|
|
1654
|
+
Math.min(O + L, q.length),
|
|
1652
1655
|
" of ",
|
|
1653
|
-
|
|
1656
|
+
q.length
|
|
1654
1657
|
] }),
|
|
1655
1658
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1656
|
-
/* @__PURE__ */ s(
|
|
1657
|
-
/* @__PURE__ */ e(
|
|
1658
|
-
/* @__PURE__ */ e(
|
|
1659
|
+
/* @__PURE__ */ s(Cr, { value: String(L), onValueChange: (n) => st(Number(n)), children: [
|
|
1660
|
+
/* @__PURE__ */ e(at, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ e(wr, {}) }),
|
|
1661
|
+
/* @__PURE__ */ e(nt, { children: _.map((n) => /* @__PURE__ */ s(ze, { value: String(n), children: [
|
|
1659
1662
|
n,
|
|
1660
1663
|
" / page"
|
|
1661
1664
|
] }, n)) })
|
|
@@ -1666,7 +1669,7 @@ function Kr({
|
|
|
1666
1669
|
variant: "outline",
|
|
1667
1670
|
size: "md",
|
|
1668
1671
|
disabled: $ <= 0,
|
|
1669
|
-
onClick: () =>
|
|
1672
|
+
onClick: () => Z((n) => Math.max(0, n - 1)),
|
|
1670
1673
|
children: "Previous"
|
|
1671
1674
|
}
|
|
1672
1675
|
),
|
|
@@ -1675,8 +1678,8 @@ function Kr({
|
|
|
1675
1678
|
{
|
|
1676
1679
|
variant: "outline",
|
|
1677
1680
|
size: "md",
|
|
1678
|
-
disabled: $ >=
|
|
1679
|
-
onClick: () =>
|
|
1681
|
+
disabled: $ >= G - 1,
|
|
1682
|
+
onClick: () => Z((n) => Math.min(G - 1, n + 1)),
|
|
1680
1683
|
children: "Next"
|
|
1681
1684
|
}
|
|
1682
1685
|
)
|
|
@@ -1684,8 +1687,8 @@ function Kr({
|
|
|
1684
1687
|
] })
|
|
1685
1688
|
] });
|
|
1686
1689
|
}
|
|
1687
|
-
function
|
|
1688
|
-
return /* @__PURE__ */ e(
|
|
1690
|
+
function Zr({ icon: t, title: r, description: a, action: l, className: i }) {
|
|
1691
|
+
return /* @__PURE__ */ e(ce, { className: i, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1689
1692
|
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,
|
|
1690
1693
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1691
1694
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: r }),
|
|
@@ -1694,7 +1697,7 @@ function Jr({ icon: t, title: r, description: a, action: l, className: i }) {
|
|
|
1694
1697
|
l
|
|
1695
1698
|
] }) });
|
|
1696
1699
|
}
|
|
1697
|
-
function
|
|
1700
|
+
function Kr({ className: t, ...r }) {
|
|
1698
1701
|
return /* @__PURE__ */ e(
|
|
1699
1702
|
"kbd",
|
|
1700
1703
|
{
|
|
@@ -1706,8 +1709,8 @@ function Qr({ className: t, ...r }) {
|
|
|
1706
1709
|
}
|
|
1707
1710
|
);
|
|
1708
1711
|
}
|
|
1709
|
-
const
|
|
1710
|
-
|
|
1712
|
+
const Tr = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
1713
|
+
Ft.Root,
|
|
1711
1714
|
{
|
|
1712
1715
|
ref: a,
|
|
1713
1716
|
className: o(
|
|
@@ -1717,28 +1720,28 @@ const zr = p(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
1717
1720
|
...r
|
|
1718
1721
|
}
|
|
1719
1722
|
));
|
|
1720
|
-
|
|
1721
|
-
function
|
|
1723
|
+
Tr.displayName = "Label";
|
|
1724
|
+
function Or({
|
|
1722
1725
|
value: t,
|
|
1723
1726
|
onValueChange: r,
|
|
1724
1727
|
options: a,
|
|
1725
1728
|
size: l = "sm",
|
|
1726
1729
|
className: i,
|
|
1727
|
-
...
|
|
1730
|
+
...d
|
|
1728
1731
|
}) {
|
|
1729
|
-
const
|
|
1732
|
+
const c = de();
|
|
1730
1733
|
return /* @__PURE__ */ e(
|
|
1731
1734
|
"div",
|
|
1732
1735
|
{
|
|
1733
1736
|
role: "radiogroup",
|
|
1734
|
-
"aria-label":
|
|
1737
|
+
"aria-label": d["aria-label"],
|
|
1735
1738
|
className: o(
|
|
1736
1739
|
"inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
|
|
1737
1740
|
l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
|
|
1738
1741
|
i
|
|
1739
1742
|
),
|
|
1740
|
-
children: a.map((
|
|
1741
|
-
const
|
|
1743
|
+
children: a.map((u) => {
|
|
1744
|
+
const h = u.value === t;
|
|
1742
1745
|
return /* @__PURE__ */ s(
|
|
1743
1746
|
"label",
|
|
1744
1747
|
{
|
|
@@ -1746,32 +1749,32 @@ function Yr({
|
|
|
1746
1749
|
"inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
|
|
1747
1750
|
"has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
|
|
1748
1751
|
l === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
|
|
1749
|
-
|
|
1752
|
+
h ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
|
|
1750
1753
|
),
|
|
1751
1754
|
children: [
|
|
1752
1755
|
/* @__PURE__ */ e(
|
|
1753
1756
|
"input",
|
|
1754
1757
|
{
|
|
1755
1758
|
type: "radio",
|
|
1756
|
-
name:
|
|
1757
|
-
value:
|
|
1758
|
-
checked:
|
|
1759
|
-
onChange: () => r(
|
|
1759
|
+
name: c,
|
|
1760
|
+
value: u.value,
|
|
1761
|
+
checked: h,
|
|
1762
|
+
onChange: () => r(u.value),
|
|
1760
1763
|
className: "sr-only"
|
|
1761
1764
|
}
|
|
1762
1765
|
),
|
|
1763
|
-
|
|
1764
|
-
|
|
1766
|
+
u.icon,
|
|
1767
|
+
u.label
|
|
1765
1768
|
]
|
|
1766
1769
|
},
|
|
1767
|
-
|
|
1770
|
+
u.value
|
|
1768
1771
|
);
|
|
1769
1772
|
})
|
|
1770
1773
|
}
|
|
1771
1774
|
);
|
|
1772
1775
|
}
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1776
|
+
const Mr = b(({ className: t, orientation: r = "horizontal", decorative: a = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
1777
|
+
$t.Root,
|
|
1775
1778
|
{
|
|
1776
1779
|
ref: i,
|
|
1777
1780
|
decorative: a,
|
|
@@ -1784,8 +1787,8 @@ const Dr = p(({ className: t, orientation: r = "horizontal", decorative: a = !0,
|
|
|
1784
1787
|
...l
|
|
1785
1788
|
}
|
|
1786
1789
|
));
|
|
1787
|
-
|
|
1788
|
-
function
|
|
1790
|
+
Mr.displayName = "Separator";
|
|
1791
|
+
function ea({ className: t, ...r }) {
|
|
1789
1792
|
return /* @__PURE__ */ e(
|
|
1790
1793
|
"div",
|
|
1791
1794
|
{
|
|
@@ -1794,7 +1797,7 @@ function Zr({ className: t, ...r }) {
|
|
|
1794
1797
|
}
|
|
1795
1798
|
);
|
|
1796
1799
|
}
|
|
1797
|
-
const
|
|
1800
|
+
const ta = W.Provider, ra = W.Root, aa = W.Trigger, Pr = b(({ className: t, sideOffset: r = 6, ...a }, l) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
|
|
1798
1801
|
W.Content,
|
|
1799
1802
|
{
|
|
1800
1803
|
ref: l,
|
|
@@ -1812,77 +1815,78 @@ const Or = W.Provider, ea = W.Root, ta = W.Trigger, Tr = p(({ className: t, side
|
|
|
1812
1815
|
...a
|
|
1813
1816
|
}
|
|
1814
1817
|
) }));
|
|
1815
|
-
|
|
1818
|
+
Pr.displayName = "TooltipContent";
|
|
1816
1819
|
export {
|
|
1817
|
-
|
|
1818
|
-
|
|
1820
|
+
Br as AgentPrompt,
|
|
1821
|
+
Ge as Avatar,
|
|
1819
1822
|
Ve as AvatarFallback,
|
|
1820
|
-
|
|
1821
|
-
|
|
1823
|
+
He as AvatarImage,
|
|
1824
|
+
Wt as Badge,
|
|
1822
1825
|
S as Button,
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1826
|
+
Fr as Callout,
|
|
1827
|
+
rr as Card,
|
|
1828
|
+
lr as CardContent,
|
|
1829
|
+
nr as CardDescription,
|
|
1830
|
+
ir as CardFooter,
|
|
1828
1831
|
Ue as CardHeader,
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1832
|
+
ar as CardTitle,
|
|
1833
|
+
xe as Checkbox,
|
|
1834
|
+
Vr as ChoiceDialog,
|
|
1835
|
+
Ur as CodeBlock,
|
|
1836
|
+
Yr as DataTable,
|
|
1837
|
+
Qr as DataTableIdentity,
|
|
1838
|
+
ur as Dialog,
|
|
1839
|
+
pr as DialogBody,
|
|
1840
|
+
Ye as DialogCancel,
|
|
1841
|
+
Hr as DialogClose,
|
|
1842
|
+
Ke as DialogContent,
|
|
1843
|
+
hr as DialogDescription,
|
|
1844
|
+
fr as DialogFooter,
|
|
1845
|
+
br as DialogHeader,
|
|
1846
|
+
mr as DialogPanel,
|
|
1847
|
+
Oe as DialogTitle,
|
|
1848
|
+
Qe as DialogTrigger,
|
|
1849
|
+
ge as DropdownMenu,
|
|
1846
1850
|
U as DropdownMenuCheckboxItem,
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1851
|
+
ae as DropdownMenuContent,
|
|
1852
|
+
Wr as DropdownMenuGroup,
|
|
1853
|
+
oe as DropdownMenuItem,
|
|
1854
|
+
ne as DropdownMenuLabel,
|
|
1855
|
+
Xr as DropdownMenuPortal,
|
|
1856
|
+
Ne as DropdownMenuSeparator,
|
|
1857
|
+
re as DropdownMenuTrigger,
|
|
1858
|
+
Zr as EmptyState,
|
|
1859
|
+
tt as Input,
|
|
1860
|
+
Kr as Kbd,
|
|
1861
|
+
Tr as Label,
|
|
1862
|
+
xr as RadioCard,
|
|
1863
|
+
gr as RadioGroup,
|
|
1864
|
+
Or as Segmented,
|
|
1865
|
+
Cr as Select,
|
|
1866
|
+
nt as SelectContent,
|
|
1867
|
+
Jr as SelectGroup,
|
|
1864
1868
|
ze as SelectItem,
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1869
|
+
Sr as SelectLabel,
|
|
1870
|
+
at as SelectTrigger,
|
|
1871
|
+
wr as SelectValue,
|
|
1872
|
+
Mr as Separator,
|
|
1873
|
+
ea as Skeleton,
|
|
1874
|
+
qt as Spinner,
|
|
1875
|
+
$r as Table,
|
|
1876
|
+
Yt as TableBody,
|
|
1877
|
+
fe as TableCell,
|
|
1878
|
+
Jt as TableContainer,
|
|
1879
|
+
kr as TableEmptyState,
|
|
1880
|
+
Gr as TableHead,
|
|
1881
|
+
qr as TableHeader,
|
|
1882
|
+
Qt as TablePanel,
|
|
1883
|
+
Zt as TableRow,
|
|
1884
|
+
ce as TableSurface,
|
|
1885
|
+
ra as Tooltip,
|
|
1886
|
+
Pr as TooltipContent,
|
|
1887
|
+
ta as TooltipProvider,
|
|
1888
|
+
aa as TooltipTrigger,
|
|
1889
|
+
Vt as badgeVariants,
|
|
1890
|
+
Gt as buttonVariants
|
|
1887
1891
|
};
|
|
1888
1892
|
//# sourceMappingURL=index.js.map
|