@jinaan/uikit 0.1.13 → 0.1.15
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/dialog.d.ts.map +1 -1
- package/dist/dropdown-menu.d.ts +5 -0
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/index.js +509 -467
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/dialog.tsx +4 -1
- package/src/dropdown-menu.tsx +49 -1
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as b, useState as
|
|
4
|
-
import { Slot as
|
|
2
|
+
import { CircleNotch as wt, Robot as Ct, Terminal as St, Check as X, Copy as Fe, XCircle as zt, Warning as kt, CheckCircle as Dt, Info as Tt, Minus as Mt, X as le, CaretRight as Pt, CaretDown as ee, MagnifyingGlass as It, Columns as Et, Lock as _t, FunnelSimple as Ee, WarningCircle as jt, CaretUp as Lt, CaretUpDown as Rt } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as b, useState as T, Children as $e, isValidElement as qe, useRef as te, useEffect as V, useContext as ie, useCallback as At, createContext as se, useId as de, useMemo as _e } from "react";
|
|
4
|
+
import { Slot as Bt } 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 Ft } from "clsx";
|
|
7
|
+
import { twMerge as $t } from "tailwind-merge";
|
|
8
8
|
import * as Ce from "@radix-ui/react-avatar";
|
|
9
|
-
import * as
|
|
9
|
+
import * as je from "@radix-ui/react-checkbox";
|
|
10
10
|
import * as M from "@radix-ui/react-dialog";
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
11
|
+
import * as C from "@radix-ui/react-dropdown-menu";
|
|
12
|
+
import * as D from "@radix-ui/react-select";
|
|
13
|
+
import * as qt from "@radix-ui/react-label";
|
|
14
|
+
import * as Gt from "@radix-ui/react-separator";
|
|
15
15
|
import * as W from "@radix-ui/react-tooltip";
|
|
16
16
|
function o(...t) {
|
|
17
|
-
return
|
|
17
|
+
return $t(Ft(t));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ht({ className: t }) {
|
|
20
20
|
return /* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
wt,
|
|
22
22
|
{
|
|
23
23
|
className: o("size-4 animate-spin text-muted", t),
|
|
24
24
|
weight: "bold",
|
|
@@ -26,7 +26,7 @@ function qt({ className: t }) {
|
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const Vt = 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,18 +52,18 @@ const Gt = we(
|
|
|
52
52
|
size: "md"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), Ut = {
|
|
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
|
-
},
|
|
62
|
+
}, z = b(
|
|
63
63
|
({
|
|
64
64
|
className: t,
|
|
65
|
-
variant:
|
|
66
|
-
size:
|
|
65
|
+
variant: a,
|
|
66
|
+
size: r = "md",
|
|
67
67
|
asChild: l = !1,
|
|
68
68
|
leadingIcon: i,
|
|
69
69
|
trailingIcon: d,
|
|
@@ -74,22 +74,22 @@ const Gt = we(
|
|
|
74
74
|
children: p,
|
|
75
75
|
...N
|
|
76
76
|
}, k) => {
|
|
77
|
-
const
|
|
77
|
+
const S = l ? Bt : "button", w = Ut[r ?? "md"];
|
|
78
78
|
return /* @__PURE__ */ e(
|
|
79
|
-
|
|
79
|
+
S,
|
|
80
80
|
{
|
|
81
81
|
ref: k,
|
|
82
82
|
"aria-busy": u || void 0,
|
|
83
83
|
disabled: l ? void 0 : g || u,
|
|
84
84
|
className: o(
|
|
85
|
-
|
|
85
|
+
Vt({ variant: a, size: r }),
|
|
86
86
|
c && "aspect-square px-0",
|
|
87
87
|
h && "w-full",
|
|
88
88
|
t
|
|
89
89
|
),
|
|
90
90
|
...N,
|
|
91
91
|
children: l ? p : /* @__PURE__ */ s(ye, { children: [
|
|
92
|
-
u ? /* @__PURE__ */ e(
|
|
92
|
+
u ? /* @__PURE__ */ e(Ht, { 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
93
|
p,
|
|
94
94
|
!u && d ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: d }) : null
|
|
95
95
|
] })
|
|
@@ -97,14 +97,14 @@ const Gt = we(
|
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
|
|
101
|
-
function
|
|
100
|
+
z.displayName = "Button";
|
|
101
|
+
function qa({
|
|
102
102
|
command: t,
|
|
103
|
-
tag:
|
|
104
|
-
icon:
|
|
103
|
+
tag: a = "Build with agents",
|
|
104
|
+
icon: r,
|
|
105
105
|
className: l
|
|
106
106
|
}) {
|
|
107
|
-
const [i, d] =
|
|
107
|
+
const [i, d] = T(!1), c = async () => {
|
|
108
108
|
try {
|
|
109
109
|
await navigator.clipboard.writeText(t), d(!0), window.setTimeout(() => d(!1), 1500);
|
|
110
110
|
} catch {
|
|
@@ -112,14 +112,14 @@ function Br({
|
|
|
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
|
-
|
|
116
|
-
|
|
115
|
+
r ?? /* @__PURE__ */ e(Ct, { className: "size-3.5", weight: "fill" }),
|
|
116
|
+
a
|
|
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(St, { 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
|
+
z,
|
|
123
123
|
{
|
|
124
124
|
variant: "ghost",
|
|
125
125
|
size: "sm",
|
|
@@ -133,40 +133,40 @@ function Br({
|
|
|
133
133
|
] })
|
|
134
134
|
] });
|
|
135
135
|
}
|
|
136
|
-
const Ge = b(({ className: t, ...
|
|
136
|
+
const Ge = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
137
137
|
Ce.Root,
|
|
138
138
|
{
|
|
139
|
-
ref:
|
|
139
|
+
ref: r,
|
|
140
140
|
className: o(
|
|
141
141
|
"relative flex size-8 shrink-0 overflow-hidden rounded-full border border-line",
|
|
142
142
|
t
|
|
143
143
|
),
|
|
144
|
-
...
|
|
144
|
+
...a
|
|
145
145
|
}
|
|
146
146
|
));
|
|
147
147
|
Ge.displayName = "Avatar";
|
|
148
|
-
const He = b(({ className: t, ...
|
|
148
|
+
const He = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
149
149
|
Ce.Image,
|
|
150
150
|
{
|
|
151
|
-
ref:
|
|
151
|
+
ref: r,
|
|
152
152
|
className: o("aspect-square size-full object-cover", t),
|
|
153
|
-
...
|
|
153
|
+
...a
|
|
154
154
|
}
|
|
155
155
|
));
|
|
156
156
|
He.displayName = "AvatarImage";
|
|
157
|
-
const Ve = b(({ className: t, ...
|
|
157
|
+
const Ve = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
158
158
|
Ce.Fallback,
|
|
159
159
|
{
|
|
160
|
-
ref:
|
|
160
|
+
ref: r,
|
|
161
161
|
className: o(
|
|
162
162
|
"flex size-full items-center justify-center bg-elevated text-xs font-medium text-muted",
|
|
163
163
|
t
|
|
164
164
|
),
|
|
165
|
-
...
|
|
165
|
+
...a
|
|
166
166
|
}
|
|
167
167
|
));
|
|
168
168
|
Ve.displayName = "AvatarFallback";
|
|
169
|
-
const
|
|
169
|
+
const Wt = 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 Vt = we(
|
|
|
182
182
|
},
|
|
183
183
|
defaultVariants: { variant: "neutral" }
|
|
184
184
|
}
|
|
185
|
-
),
|
|
185
|
+
), Xt = we("size-1.5 shrink-0 rounded-full", {
|
|
186
186
|
variants: {
|
|
187
187
|
variant: {
|
|
188
188
|
neutral: "bg-subtle",
|
|
@@ -196,20 +196,20 @@ const Vt = we(
|
|
|
196
196
|
},
|
|
197
197
|
defaultVariants: { variant: "neutral" }
|
|
198
198
|
});
|
|
199
|
-
function
|
|
200
|
-
return /* @__PURE__ */ s("span", { className: o(
|
|
201
|
-
|
|
199
|
+
function Jt({ className: t, variant: a, dot: r = !1, children: l, ...i }) {
|
|
200
|
+
return /* @__PURE__ */ s("span", { className: o(Wt({ variant: a }), t), ...i, children: [
|
|
201
|
+
r ? /* @__PURE__ */ e("span", { className: o(Xt({ variant: a })), "aria-hidden": !0 }) : null,
|
|
202
202
|
l
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const Qt = {
|
|
206
206
|
info: {
|
|
207
|
-
Icon:
|
|
207
|
+
Icon: Tt,
|
|
208
208
|
className: "border-info/30 bg-info/10",
|
|
209
209
|
iconClassName: "text-info"
|
|
210
210
|
},
|
|
211
211
|
success: {
|
|
212
|
-
Icon:
|
|
212
|
+
Icon: Dt,
|
|
213
213
|
className: "border-success/30 bg-success/10",
|
|
214
214
|
iconClassName: "text-success"
|
|
215
215
|
},
|
|
@@ -219,19 +219,19 @@ const Xt = {
|
|
|
219
219
|
iconClassName: "text-warning"
|
|
220
220
|
},
|
|
221
221
|
error: {
|
|
222
|
-
Icon:
|
|
222
|
+
Icon: zt,
|
|
223
223
|
className: "border-error/30 bg-error/10",
|
|
224
224
|
iconClassName: "text-error"
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
|
-
function
|
|
227
|
+
function Ga({
|
|
228
228
|
variant: t = "info",
|
|
229
|
-
title:
|
|
230
|
-
children:
|
|
229
|
+
title: a,
|
|
230
|
+
children: r,
|
|
231
231
|
icon: l,
|
|
232
232
|
className: i
|
|
233
233
|
}) {
|
|
234
|
-
const { Icon: d, className: c, iconClassName: u } =
|
|
234
|
+
const { Icon: d, className: c, iconClassName: u } = Qt[t];
|
|
235
235
|
return /* @__PURE__ */ s(
|
|
236
236
|
"div",
|
|
237
237
|
{
|
|
@@ -245,16 +245,16 @@ function Fr({
|
|
|
245
245
|
children: [
|
|
246
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
|
-
|
|
249
|
-
|
|
248
|
+
a ? /* @__PURE__ */ e("p", { className: "font-medium text-fg", children: a }) : null,
|
|
249
|
+
r ? /* @__PURE__ */ e("div", { className: "text-muted", children: r }) : null
|
|
250
250
|
] })
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Yt({
|
|
256
256
|
className: t,
|
|
257
|
-
...
|
|
257
|
+
...a
|
|
258
258
|
}) {
|
|
259
259
|
return /* @__PURE__ */ e(
|
|
260
260
|
"div",
|
|
@@ -263,13 +263,13 @@ function Jt({
|
|
|
263
263
|
"w-full overflow-hidden rounded-(--table-radius-outer) bg-table-container p-(--table-inset)",
|
|
264
264
|
t
|
|
265
265
|
),
|
|
266
|
-
...
|
|
266
|
+
...a
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Zt({
|
|
271
271
|
className: t,
|
|
272
|
-
...
|
|
272
|
+
...a
|
|
273
273
|
}) {
|
|
274
274
|
return /* @__PURE__ */ e(
|
|
275
275
|
"div",
|
|
@@ -278,26 +278,26 @@ function Qt({
|
|
|
278
278
|
"overflow-hidden rounded-(--table-radius-panel) border border-table-panel-border bg-table-panel",
|
|
279
279
|
t
|
|
280
280
|
),
|
|
281
|
-
...
|
|
281
|
+
...a
|
|
282
282
|
}
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Ha({ className: t, ...a }) {
|
|
286
286
|
return /* @__PURE__ */ e(
|
|
287
287
|
"table",
|
|
288
288
|
{
|
|
289
289
|
className: o("w-full table-fixed border-collapse caption-bottom text-sm", t),
|
|
290
|
-
...
|
|
290
|
+
...a
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
return /* @__PURE__ */ e("thead", { className: t, ...
|
|
294
|
+
function Va({ className: t, ...a }) {
|
|
295
|
+
return /* @__PURE__ */ e("thead", { className: t, ...a });
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...
|
|
297
|
+
function Ot({ className: t, ...a }) {
|
|
298
|
+
return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Kt({ className: t, ...a }) {
|
|
301
301
|
return /* @__PURE__ */ e(
|
|
302
302
|
"tr",
|
|
303
303
|
{
|
|
@@ -305,11 +305,11 @@ function Zt({ className: t, ...r }) {
|
|
|
305
305
|
"border-b border-table-panel-border transition-colors last:border-0 hover:bg-table-row-hover data-[state=selected]:bg-table-row-selected",
|
|
306
306
|
t
|
|
307
307
|
),
|
|
308
|
-
...
|
|
308
|
+
...a
|
|
309
309
|
}
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Ua({ className: t, ...a }) {
|
|
313
313
|
return /* @__PURE__ */ e(
|
|
314
314
|
"th",
|
|
315
315
|
{
|
|
@@ -317,11 +317,11 @@ function Gr({ className: t, ...r }) {
|
|
|
317
317
|
"h-(--table-header-h) whitespace-nowrap px-(--table-pad-x) text-left align-middle text-[0.8125rem] font-medium text-table-header",
|
|
318
318
|
t
|
|
319
319
|
),
|
|
320
|
-
...
|
|
320
|
+
...a
|
|
321
321
|
}
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
|
-
function fe({ className: t, ...
|
|
324
|
+
function fe({ className: t, ...a }) {
|
|
325
325
|
return /* @__PURE__ */ e(
|
|
326
326
|
"td",
|
|
327
327
|
{
|
|
@@ -329,26 +329,26 @@ function fe({ className: t, ...r }) {
|
|
|
329
329
|
"px-(--table-pad-x) py-3 align-middle text-sm text-table-row data-numeric:font-numeric data-numeric:tabular-nums",
|
|
330
330
|
t
|
|
331
331
|
),
|
|
332
|
-
...
|
|
332
|
+
...a
|
|
333
333
|
}
|
|
334
334
|
);
|
|
335
335
|
}
|
|
336
|
-
const
|
|
336
|
+
const ea = {
|
|
337
337
|
default: "bg-table-container",
|
|
338
338
|
muted: "bg-surface border border-line",
|
|
339
339
|
transparent: "bg-transparent"
|
|
340
|
-
},
|
|
340
|
+
}, ta = {
|
|
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 aa(t) {
|
|
346
346
|
return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
|
|
347
347
|
}
|
|
348
348
|
function ce({
|
|
349
349
|
title: t,
|
|
350
|
-
description:
|
|
351
|
-
header:
|
|
350
|
+
description: a,
|
|
351
|
+
header: r,
|
|
352
352
|
children: l,
|
|
353
353
|
action: i,
|
|
354
354
|
tone: d = "default",
|
|
@@ -357,8 +357,8 @@ function ce({
|
|
|
357
357
|
panelClassName: h,
|
|
358
358
|
minHeight: g
|
|
359
359
|
}) {
|
|
360
|
-
const p = !!(t ||
|
|
361
|
-
|
|
360
|
+
const p = !!(t || a), N = aa(i) ? /* @__PURE__ */ e(
|
|
361
|
+
z,
|
|
362
362
|
{
|
|
363
363
|
variant: i.variant ?? "primary",
|
|
364
364
|
size: "xs",
|
|
@@ -372,9 +372,9 @@ function ce({
|
|
|
372
372
|
] }) : i.label
|
|
373
373
|
}
|
|
374
374
|
) : i;
|
|
375
|
-
return /* @__PURE__ */ s(
|
|
375
|
+
return /* @__PURE__ */ s(Yt, { className: o("relative", ea[d], c), children: [
|
|
376
376
|
/* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
377
|
-
|
|
377
|
+
r || p ? (
|
|
378
378
|
// Header rows must not inherit the body row hover surface.
|
|
379
379
|
/* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent]", u), children: [
|
|
380
380
|
p ? /* @__PURE__ */ s(
|
|
@@ -386,17 +386,17 @@ function ce({
|
|
|
386
386
|
),
|
|
387
387
|
children: [
|
|
388
388
|
t ? /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-fg", children: t }) : null,
|
|
389
|
-
|
|
389
|
+
a ? /* @__PURE__ */ e("div", { className: "mt-0.5 text-sm text-muted", children: a }) : null
|
|
390
390
|
]
|
|
391
391
|
}
|
|
392
392
|
) : null,
|
|
393
|
-
|
|
393
|
+
r
|
|
394
394
|
] })
|
|
395
395
|
) : null,
|
|
396
396
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
397
|
+
Zt,
|
|
398
398
|
{
|
|
399
|
-
className: o(
|
|
399
|
+
className: o(ta[d], h),
|
|
400
400
|
style: g ? { minHeight: g } : void 0,
|
|
401
401
|
children: l
|
|
402
402
|
}
|
|
@@ -405,74 +405,74 @@ function ce({
|
|
|
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
|
|
409
|
-
const
|
|
408
|
+
function ra(t) {
|
|
409
|
+
const a = $e.toArray(t), r = a.filter(
|
|
410
410
|
(l) => qe(l) && l.type === Ue
|
|
411
411
|
);
|
|
412
412
|
return {
|
|
413
|
-
header:
|
|
414
|
-
body:
|
|
413
|
+
header: r.length > 0 ? /* @__PURE__ */ e(ye, { children: r }) : void 0,
|
|
414
|
+
body: a.filter((l) => !r.includes(l))
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const
|
|
418
|
-
({ className: t, children:
|
|
419
|
-
const { header: i, body: d } =
|
|
420
|
-
return /* @__PURE__ */ e("div", { ref: l, ...
|
|
417
|
+
const na = b(
|
|
418
|
+
({ className: t, children: a, ...r }, l) => {
|
|
419
|
+
const { header: i, body: d } = ra(a);
|
|
420
|
+
return /* @__PURE__ */ e("div", { ref: l, ...r, children: /* @__PURE__ */ e(ce, { className: o("shadow-xs", t), header: i, children: d }) });
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
|
|
424
|
-
const Ue = b(({ className: t, ...
|
|
423
|
+
na.displayName = "Card";
|
|
424
|
+
const Ue = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
427
|
-
ref:
|
|
427
|
+
ref: r,
|
|
428
428
|
className: o(
|
|
429
429
|
"flex flex-col gap-1 px-5 py-4",
|
|
430
430
|
t
|
|
431
431
|
),
|
|
432
|
-
...
|
|
432
|
+
...a
|
|
433
433
|
}
|
|
434
434
|
));
|
|
435
435
|
Ue.displayName = "CardHeader";
|
|
436
|
-
const
|
|
436
|
+
const la = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
437
437
|
"h2",
|
|
438
438
|
{
|
|
439
|
-
ref:
|
|
439
|
+
ref: r,
|
|
440
440
|
className: o("text-sm font-semibold text-fg", t),
|
|
441
|
-
...
|
|
441
|
+
...a
|
|
442
442
|
}
|
|
443
443
|
));
|
|
444
|
-
|
|
445
|
-
const
|
|
444
|
+
la.displayName = "CardTitle";
|
|
445
|
+
const ia = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
446
446
|
"p",
|
|
447
447
|
{
|
|
448
|
-
ref:
|
|
448
|
+
ref: r,
|
|
449
449
|
className: o(
|
|
450
450
|
"mt-1 border-t border-card-divider pt-2 text-sm text-muted",
|
|
451
451
|
"first:mt-0 first:border-t-0 first:pt-0",
|
|
452
452
|
t
|
|
453
453
|
),
|
|
454
|
-
...
|
|
454
|
+
...a
|
|
455
455
|
}
|
|
456
456
|
));
|
|
457
|
-
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
const
|
|
457
|
+
ia.displayName = "CardDescription";
|
|
458
|
+
const oa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e("div", { ref: r, className: o("px-5 py-4", t), ...a }));
|
|
459
|
+
oa.displayName = "CardContent";
|
|
460
|
+
const sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
461
461
|
"div",
|
|
462
462
|
{
|
|
463
|
-
ref:
|
|
463
|
+
ref: r,
|
|
464
464
|
className: o(
|
|
465
465
|
"flex items-center gap-3 border-t border-line px-5 py-3",
|
|
466
466
|
t
|
|
467
467
|
),
|
|
468
|
-
...
|
|
468
|
+
...a
|
|
469
469
|
}
|
|
470
470
|
));
|
|
471
|
-
|
|
472
|
-
const xe = b(({ className: t, ...
|
|
473
|
-
|
|
471
|
+
sa.displayName = "CardFooter";
|
|
472
|
+
const xe = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
473
|
+
je.Root,
|
|
474
474
|
{
|
|
475
|
-
ref:
|
|
475
|
+
ref: r,
|
|
476
476
|
className: o(
|
|
477
477
|
"peer size-4 shrink-0 rounded border border-line-strong bg-transparent transition-colors",
|
|
478
478
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/40",
|
|
@@ -481,8 +481,8 @@ const xe = b(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
481
481
|
"data-[state=indeterminate]:border-primary",
|
|
482
482
|
t
|
|
483
483
|
),
|
|
484
|
-
...
|
|
485
|
-
children: /* @__PURE__ */ e(
|
|
484
|
+
...a,
|
|
485
|
+
children: /* @__PURE__ */ e(je.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(Mt, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(X, { className: "size-3", weight: "bold" }) })
|
|
486
486
|
}
|
|
487
487
|
));
|
|
488
488
|
xe.displayName = "Checkbox";
|
|
@@ -492,33 +492,33 @@ function Le(t) {
|
|
|
492
492
|
function Re(t) {
|
|
493
493
|
return Math.min(1, Math.max(0.1, t));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
return !Le(t) || !Le(
|
|
497
|
-
dx: t.left + t.width / 2 - (
|
|
498
|
-
dy: t.top + t.height / 2 - (
|
|
499
|
-
sx: Re(t.width /
|
|
500
|
-
sy: Re(t.height /
|
|
495
|
+
function da(t, a) {
|
|
496
|
+
return !Le(t) || !Le(a) ? null : {
|
|
497
|
+
dx: t.left + t.width / 2 - (a.left + a.width / 2),
|
|
498
|
+
dy: t.top + t.height / 2 - (a.top + a.height / 2),
|
|
499
|
+
sx: Re(t.width / a.width),
|
|
500
|
+
sy: Re(t.height / a.height)
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
const We = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
|
|
504
504
|
let A = null, Ae = !1;
|
|
505
505
|
function Se(t) {
|
|
506
|
-
const
|
|
507
|
-
return
|
|
508
|
-
left:
|
|
509
|
-
top:
|
|
510
|
-
width:
|
|
511
|
-
height:
|
|
506
|
+
const a = t.getBoundingClientRect();
|
|
507
|
+
return a.width <= 0 || a.height <= 0 ? null : {
|
|
508
|
+
left: a.left,
|
|
509
|
+
top: a.top,
|
|
510
|
+
width: a.width,
|
|
511
|
+
height: a.height
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
function ve(t) {
|
|
515
515
|
if (!(t instanceof Element)) return;
|
|
516
|
-
const
|
|
517
|
-
if (!
|
|
518
|
-
const
|
|
519
|
-
|
|
516
|
+
const a = t.closest(We);
|
|
517
|
+
if (!a) return;
|
|
518
|
+
const r = Se(a);
|
|
519
|
+
r && (A = { rect: r, at: Date.now() });
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ca() {
|
|
522
522
|
Ae || typeof document > "u" || (Ae = !0, document.addEventListener(
|
|
523
523
|
"pointerdown",
|
|
524
524
|
(t) => ve(t.target),
|
|
@@ -531,31 +531,31 @@ function sr() {
|
|
|
531
531
|
!0
|
|
532
532
|
));
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function ua(t) {
|
|
535
535
|
if (A && Date.now() - A.at < 2e3) {
|
|
536
|
-
const
|
|
537
|
-
return A = null,
|
|
536
|
+
const r = A.rect;
|
|
537
|
+
return A = null, r;
|
|
538
538
|
}
|
|
539
539
|
A = null;
|
|
540
|
-
const
|
|
541
|
-
return
|
|
540
|
+
const a = document.activeElement;
|
|
541
|
+
return a instanceof Element && a !== t && !t.contains(a) && a.matches(We) ? Se(a) : null;
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const ma = 250, Xe = se(!1), Je = se(() => {
|
|
544
544
|
});
|
|
545
|
-
function
|
|
545
|
+
function pa({
|
|
546
546
|
open: t,
|
|
547
|
-
defaultOpen:
|
|
548
|
-
onOpenChange:
|
|
547
|
+
defaultOpen: a,
|
|
548
|
+
onOpenChange: r,
|
|
549
549
|
children: l,
|
|
550
550
|
...i
|
|
551
551
|
}) {
|
|
552
|
-
const [d, c] =
|
|
553
|
-
|
|
554
|
-
), [u, h] =
|
|
552
|
+
const [d, c] = T(
|
|
553
|
+
a ?? !1
|
|
554
|
+
), [u, h] = T(!1), g = te(!1), p = te(null), N = t ?? d, k = te(N);
|
|
555
555
|
k.current = N;
|
|
556
|
-
const
|
|
557
|
-
V(() =>
|
|
558
|
-
t && h(!1);
|
|
556
|
+
const S = t !== void 0;
|
|
557
|
+
V(() => ca(), []), V(() => {
|
|
558
|
+
t && (p.current && clearTimeout(p.current), g.current = !1, h(!1));
|
|
559
559
|
}, [t]), V(
|
|
560
560
|
() => () => {
|
|
561
561
|
p.current && clearTimeout(p.current);
|
|
@@ -564,19 +564,19 @@ function ur({
|
|
|
564
564
|
);
|
|
565
565
|
const w = (I) => {
|
|
566
566
|
if (I) {
|
|
567
|
-
p.current && clearTimeout(p.current), g.current = !1, h(!1),
|
|
567
|
+
p.current && clearTimeout(p.current), g.current = !1, h(!1), S || c(!0), r == null || r(!0);
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
570
|
if (!N || g.current) return;
|
|
571
571
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
572
|
-
|
|
572
|
+
S || c(!1), r == null || r(!1);
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
575
|
g.current = !0, h(!0), p.current = setTimeout(() => {
|
|
576
|
-
|
|
576
|
+
S || c(!1), r == null || r(!1), requestAnimationFrame(() => {
|
|
577
577
|
k.current && (g.current = !1, h(!1));
|
|
578
578
|
});
|
|
579
|
-
},
|
|
579
|
+
}, ma);
|
|
580
580
|
};
|
|
581
581
|
return /* @__PURE__ */ e(Je.Provider, { value: () => w(!1), children: /* @__PURE__ */ e(Xe.Provider, { value: u, children: /* @__PURE__ */ e(
|
|
582
582
|
M.Root,
|
|
@@ -588,31 +588,31 @@ function ur({
|
|
|
588
588
|
}
|
|
589
589
|
) }) });
|
|
590
590
|
}
|
|
591
|
-
const Qe = b(({ onClick: t, ...
|
|
591
|
+
const Qe = b(({ onClick: t, ...a }, r) => /* @__PURE__ */ e(
|
|
592
592
|
M.Trigger,
|
|
593
593
|
{
|
|
594
|
-
ref:
|
|
594
|
+
ref: r,
|
|
595
595
|
onClick: (l) => {
|
|
596
596
|
ve(l.currentTarget), t == null || t(l);
|
|
597
597
|
},
|
|
598
|
-
...
|
|
598
|
+
...a
|
|
599
599
|
}
|
|
600
600
|
));
|
|
601
601
|
Qe.displayName = "DialogTrigger";
|
|
602
|
-
const
|
|
603
|
-
({ variant: t = "secondary", children:
|
|
602
|
+
const Wa = M.Close, Ye = b(
|
|
603
|
+
({ variant: t = "secondary", children: a = "Cancel", ...r }, l) => /* @__PURE__ */ e(M.Close, { asChild: !0, children: /* @__PURE__ */ e(z, { ref: l, type: "button", variant: t, ...r, children: a }) })
|
|
604
604
|
);
|
|
605
605
|
Ye.displayName = "DialogCancel";
|
|
606
|
-
function Ze(t,
|
|
606
|
+
function Ze(t, a = !0) {
|
|
607
607
|
if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
608
608
|
return;
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
|
|
609
|
+
const r = Se(t);
|
|
610
|
+
if (!r) {
|
|
611
|
+
a && window.requestAnimationFrame(() => Ze(t, !1));
|
|
612
612
|
return;
|
|
613
613
|
}
|
|
614
614
|
t.dataset.dialogMotionStarted = "true";
|
|
615
|
-
const l =
|
|
615
|
+
const l = ua(t), i = l ? da(l, r) : null;
|
|
616
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.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"));
|
|
617
617
|
const d = () => {
|
|
618
618
|
t.classList.remove("dialog-fly-in", "dialog-pop-in");
|
|
@@ -621,8 +621,8 @@ function Ze(t, r = !0) {
|
|
|
621
621
|
};
|
|
622
622
|
t.addEventListener("animationend", c);
|
|
623
623
|
}
|
|
624
|
-
const
|
|
625
|
-
const c = ie(Xe), u = ie(Je), h = te(null), g =
|
|
624
|
+
const Oe = b(({ className: t, children: a, onEscapeKeyDown: r, onPointerDownOutside: l, ...i }, d) => {
|
|
625
|
+
const c = ie(Xe), u = ie(Je), h = te(null), g = At(
|
|
626
626
|
(p) => {
|
|
627
627
|
if (h.current = p, p && Ze(p), typeof d == "function") {
|
|
628
628
|
d(p);
|
|
@@ -662,14 +662,14 @@ const Ke = b(({ className: t, children: r, onEscapeKeyDown: a, onPointerDownOuts
|
|
|
662
662
|
t
|
|
663
663
|
),
|
|
664
664
|
onEscapeKeyDown: (p) => {
|
|
665
|
-
|
|
665
|
+
r == null || r(p), !p.defaultPrevented && (p.preventDefault(), u());
|
|
666
666
|
},
|
|
667
667
|
onPointerDownOutside: (p) => {
|
|
668
668
|
l == null || l(p), !p.defaultPrevented && (p.preventDefault(), u());
|
|
669
669
|
},
|
|
670
670
|
...i,
|
|
671
671
|
children: [
|
|
672
|
-
|
|
672
|
+
a,
|
|
673
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
674
|
/* @__PURE__ */ e(le, { className: "size-4" }),
|
|
675
675
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
@@ -679,10 +679,10 @@ const Ke = b(({ className: t, children: r, onEscapeKeyDown: a, onPointerDownOuts
|
|
|
679
679
|
) })
|
|
680
680
|
] });
|
|
681
681
|
});
|
|
682
|
-
|
|
683
|
-
function
|
|
682
|
+
Oe.displayName = "DialogContent";
|
|
683
|
+
function ba({
|
|
684
684
|
className: t,
|
|
685
|
-
...
|
|
685
|
+
...a
|
|
686
686
|
}) {
|
|
687
687
|
return /* @__PURE__ */ e(
|
|
688
688
|
"div",
|
|
@@ -692,26 +692,26 @@ function mr({
|
|
|
692
692
|
"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)",
|
|
693
693
|
t
|
|
694
694
|
),
|
|
695
|
-
...
|
|
695
|
+
...a
|
|
696
696
|
}
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function fa({
|
|
700
700
|
className: t,
|
|
701
|
-
...
|
|
701
|
+
...a
|
|
702
702
|
}) {
|
|
703
703
|
return /* @__PURE__ */ e(
|
|
704
704
|
"div",
|
|
705
705
|
{
|
|
706
706
|
"data-slot": "body",
|
|
707
707
|
className: o("min-h-0 flex-1 overflow-y-auto px-5 py-4", t),
|
|
708
|
-
...
|
|
708
|
+
...a
|
|
709
709
|
}
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function ha({
|
|
713
713
|
className: t,
|
|
714
|
-
...
|
|
714
|
+
...a
|
|
715
715
|
}) {
|
|
716
716
|
return /* @__PURE__ */ e(
|
|
717
717
|
"div",
|
|
@@ -721,13 +721,13 @@ function br({
|
|
|
721
721
|
"flex shrink-0 flex-col gap-1.5 border-b border-(--dialog-panel-border) px-5 py-4",
|
|
722
722
|
t
|
|
723
723
|
),
|
|
724
|
-
...
|
|
724
|
+
...a
|
|
725
725
|
}
|
|
726
726
|
);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function ga({
|
|
729
729
|
className: t,
|
|
730
|
-
...
|
|
730
|
+
...a
|
|
731
731
|
}) {
|
|
732
732
|
return /* @__PURE__ */ e(
|
|
733
733
|
"div",
|
|
@@ -737,33 +737,33 @@ function fr({
|
|
|
737
737
|
"flex shrink-0 flex-col-reverse gap-2 px-3 pt-3 sm:flex-row sm:justify-end sm:px-4 sm:pt-3.5",
|
|
738
738
|
t
|
|
739
739
|
),
|
|
740
|
-
...
|
|
740
|
+
...a
|
|
741
741
|
}
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
const
|
|
744
|
+
const Ke = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
745
745
|
M.Title,
|
|
746
746
|
{
|
|
747
|
-
ref:
|
|
747
|
+
ref: r,
|
|
748
748
|
className: o("text-base font-semibold text-fg", t),
|
|
749
|
-
...
|
|
749
|
+
...a
|
|
750
750
|
}
|
|
751
751
|
));
|
|
752
|
-
|
|
753
|
-
const
|
|
752
|
+
Ke.displayName = "DialogTitle";
|
|
753
|
+
const xa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
754
754
|
M.Description,
|
|
755
755
|
{
|
|
756
|
-
ref:
|
|
756
|
+
ref: r,
|
|
757
757
|
className: o("text-sm text-muted", t),
|
|
758
|
-
...
|
|
758
|
+
...a
|
|
759
759
|
}
|
|
760
760
|
));
|
|
761
|
-
|
|
761
|
+
xa.displayName = "DialogDescription";
|
|
762
762
|
const et = se(null);
|
|
763
|
-
function
|
|
763
|
+
function va({
|
|
764
764
|
label: t,
|
|
765
|
-
value:
|
|
766
|
-
onChange:
|
|
765
|
+
value: a,
|
|
766
|
+
onChange: r,
|
|
767
767
|
disabled: l = !1,
|
|
768
768
|
name: i,
|
|
769
769
|
className: d,
|
|
@@ -771,15 +771,15 @@ function gr({
|
|
|
771
771
|
...u
|
|
772
772
|
}) {
|
|
773
773
|
const h = de(), g = i ?? h;
|
|
774
|
-
return /* @__PURE__ */ e(et.Provider, { value: { name: g, value:
|
|
774
|
+
return /* @__PURE__ */ e(et.Provider, { value: { name: g, value: a, onChange: r, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", d), ...u, children: [
|
|
775
775
|
/* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
|
|
776
776
|
c
|
|
777
777
|
] }) });
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function Na({
|
|
780
780
|
value: t,
|
|
781
|
-
title:
|
|
782
|
-
description:
|
|
781
|
+
title: a,
|
|
782
|
+
description: r,
|
|
783
783
|
badge: l,
|
|
784
784
|
disabled: i = !1,
|
|
785
785
|
className: d
|
|
@@ -809,7 +809,7 @@ function xr({
|
|
|
809
809
|
var p;
|
|
810
810
|
return (p = c.onChange) == null ? void 0 : p.call(c, t);
|
|
811
811
|
},
|
|
812
|
-
"aria-describedby":
|
|
812
|
+
"aria-describedby": r ? u : void 0,
|
|
813
813
|
className: "peer sr-only"
|
|
814
814
|
}
|
|
815
815
|
),
|
|
@@ -826,19 +826,19 @@ function xr({
|
|
|
826
826
|
),
|
|
827
827
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
828
828
|
/* @__PURE__ */ s("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
829
|
-
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children:
|
|
830
|
-
l ? /* @__PURE__ */ e(
|
|
829
|
+
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: a }),
|
|
830
|
+
l ? /* @__PURE__ */ e(Jt, { variant: "primary", children: l }) : null
|
|
831
831
|
] }),
|
|
832
|
-
|
|
832
|
+
r ? /* @__PURE__ */ e("span", { id: u, className: "mt-1 block text-sm text-muted", children: r }) : null
|
|
833
833
|
] })
|
|
834
834
|
]
|
|
835
835
|
}
|
|
836
836
|
);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function Xa({
|
|
839
839
|
open: t,
|
|
840
|
-
onOpenChange:
|
|
841
|
-
trigger:
|
|
840
|
+
onOpenChange: a,
|
|
841
|
+
trigger: r,
|
|
842
842
|
title: l,
|
|
843
843
|
options: i,
|
|
844
844
|
defaultValue: d,
|
|
@@ -849,21 +849,21 @@ function Vr({
|
|
|
849
849
|
onConfirm: p
|
|
850
850
|
}) {
|
|
851
851
|
var I;
|
|
852
|
-
const [N, k] =
|
|
853
|
-
return /* @__PURE__ */ s(
|
|
854
|
-
|
|
852
|
+
const [N, k] = T(d ?? ((I = i[0]) == null ? void 0 : I.value) ?? ""), S = c ?? N;
|
|
853
|
+
return /* @__PURE__ */ s(pa, { open: t, onOpenChange: a, children: [
|
|
854
|
+
r ? /* @__PURE__ */ e(Qe, { asChild: !0, children: r }) : null,
|
|
855
855
|
/* @__PURE__ */ s(
|
|
856
|
-
|
|
856
|
+
Oe,
|
|
857
857
|
{
|
|
858
858
|
"aria-describedby": void 0,
|
|
859
859
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
860
860
|
children: [
|
|
861
|
-
/* @__PURE__ */ s(
|
|
862
|
-
/* @__PURE__ */ e(
|
|
863
|
-
/* @__PURE__ */ e(
|
|
861
|
+
/* @__PURE__ */ s(ba, { children: [
|
|
862
|
+
/* @__PURE__ */ e(ha, { children: /* @__PURE__ */ e(Ke, { className: "text-xl", children: l }) }),
|
|
863
|
+
/* @__PURE__ */ e(fa, { children: /* @__PURE__ */ e(va, { label: l, value: S, onChange: (y) => {
|
|
864
864
|
c === void 0 && k(y), u == null || u(y);
|
|
865
865
|
}, children: i.map((y) => /* @__PURE__ */ e(
|
|
866
|
-
|
|
866
|
+
Na,
|
|
867
867
|
{
|
|
868
868
|
value: y.value,
|
|
869
869
|
title: y.title,
|
|
@@ -873,22 +873,22 @@ function Vr({
|
|
|
873
873
|
y.value
|
|
874
874
|
)) }) })
|
|
875
875
|
] }),
|
|
876
|
-
/* @__PURE__ */ s(
|
|
876
|
+
/* @__PURE__ */ s(ga, { className: "gap-3 pt-2.5", children: [
|
|
877
877
|
/* @__PURE__ */ e(Ye, { className: "flex-1", children: h }),
|
|
878
|
-
/* @__PURE__ */ e(
|
|
878
|
+
/* @__PURE__ */ e(z, { className: "flex-1", onClick: () => p == null ? void 0 : p(S), children: g })
|
|
879
879
|
] })
|
|
880
880
|
]
|
|
881
881
|
}
|
|
882
882
|
)
|
|
883
883
|
] });
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
const [l, i] =
|
|
885
|
+
function Ja({ code: t, label: a, className: r }) {
|
|
886
|
+
const [l, i] = T(!1);
|
|
887
887
|
return /* @__PURE__ */ e(
|
|
888
888
|
ce,
|
|
889
889
|
{
|
|
890
|
-
className:
|
|
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:
|
|
890
|
+
className: r,
|
|
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: a }) }),
|
|
892
892
|
action: {
|
|
893
893
|
label: l ? "Copied" : "Copy",
|
|
894
894
|
icon: l ? /* @__PURE__ */ e(X, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(Fe, {}),
|
|
@@ -905,17 +905,17 @@ function Ur({ code: t, label: r, className: a }) {
|
|
|
905
905
|
}
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
|
-
const
|
|
908
|
+
const ya = {
|
|
909
909
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
910
910
|
md: "h-[var(--control-h-md)] text-sm",
|
|
911
911
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
912
912
|
xl: "h-[var(--control-h-xl)] rounded-lg text-base"
|
|
913
|
-
},
|
|
913
|
+
}, wa = {
|
|
914
914
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
915
915
|
md: "px-[var(--control-pad-x-md)]",
|
|
916
916
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
917
917
|
xl: "px-[var(--control-pad-x-xl)]"
|
|
918
|
-
},
|
|
918
|
+
}, Ca = {
|
|
919
919
|
sm: "left-[var(--control-pad-x-sm)]",
|
|
920
920
|
md: "left-[var(--control-pad-x-md)]",
|
|
921
921
|
lg: "left-[var(--control-pad-x-lg)]",
|
|
@@ -933,8 +933,8 @@ const vr = {
|
|
|
933
933
|
}, tt = b(
|
|
934
934
|
({
|
|
935
935
|
className: t,
|
|
936
|
-
containerClassName:
|
|
937
|
-
type:
|
|
936
|
+
containerClassName: a,
|
|
937
|
+
type: r = "text",
|
|
938
938
|
size: l = "md",
|
|
939
939
|
leadingIcon: i,
|
|
940
940
|
trailingIcon: d,
|
|
@@ -945,35 +945,35 @@ const vr = {
|
|
|
945
945
|
helperText: p,
|
|
946
946
|
id: N,
|
|
947
947
|
"aria-describedby": k,
|
|
948
|
-
disabled:
|
|
948
|
+
disabled: S,
|
|
949
949
|
readOnly: w,
|
|
950
950
|
...I
|
|
951
951
|
}, y) => {
|
|
952
|
-
const B = de(), J = N ?? B, F = !!p,
|
|
952
|
+
const B = de(), J = N ?? B, F = !!p, j = !!(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(
|
|
953
953
|
"input",
|
|
954
954
|
{
|
|
955
955
|
ref: y,
|
|
956
956
|
id: J,
|
|
957
|
-
type:
|
|
958
|
-
disabled:
|
|
957
|
+
type: r,
|
|
958
|
+
disabled: S,
|
|
959
959
|
readOnly: w,
|
|
960
960
|
"aria-invalid": g || void 0,
|
|
961
961
|
"aria-describedby": ue,
|
|
962
|
-
style: i || d ||
|
|
962
|
+
style: i || d || j ? {
|
|
963
963
|
paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
|
|
964
|
-
paddingInlineEnd: d ||
|
|
964
|
+
paddingInlineEnd: d || j ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
|
|
965
965
|
} : void 0,
|
|
966
966
|
className: o(
|
|
967
967
|
"flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
968
|
-
|
|
969
|
-
|
|
968
|
+
ya[l],
|
|
969
|
+
wa[l],
|
|
970
970
|
"placeholder:text-(--input-placeholder)",
|
|
971
971
|
"hover:border-(--input-border-hover)",
|
|
972
972
|
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
973
973
|
g && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
974
974
|
!g && "border-(--input-border)",
|
|
975
|
-
|
|
976
|
-
|
|
975
|
+
r === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
|
|
976
|
+
S && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
977
977
|
w && "cursor-default focus-visible:ring-0",
|
|
978
978
|
t
|
|
979
979
|
),
|
|
@@ -982,21 +982,21 @@ const vr = {
|
|
|
982
982
|
...I
|
|
983
983
|
}
|
|
984
984
|
);
|
|
985
|
-
return !i && !d && !
|
|
985
|
+
return !i && !d && !j && !F ? Y : /* @__PURE__ */ s("div", { className: o("w-full", a), children: [
|
|
986
986
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
987
987
|
i ? /* @__PURE__ */ e(
|
|
988
988
|
"span",
|
|
989
989
|
{
|
|
990
990
|
className: o(
|
|
991
991
|
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
992
|
-
|
|
992
|
+
Ca[l]
|
|
993
993
|
),
|
|
994
994
|
"aria-hidden": !0,
|
|
995
995
|
children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", he[l]), children: i })
|
|
996
996
|
}
|
|
997
997
|
) : null,
|
|
998
998
|
Y,
|
|
999
|
-
|
|
999
|
+
j ? /* @__PURE__ */ e(
|
|
1000
1000
|
"button",
|
|
1001
1001
|
{
|
|
1002
1002
|
type: "button",
|
|
@@ -1032,46 +1032,47 @@ const vr = {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
);
|
|
1034
1034
|
tt.displayName = "Input";
|
|
1035
|
-
function
|
|
1036
|
-
let
|
|
1035
|
+
function ze(t, a) {
|
|
1036
|
+
let r = 0;
|
|
1037
1037
|
return $e.forEach(t, (l) => {
|
|
1038
1038
|
if (!qe(l)) return;
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1039
|
+
if (a.some((d) => d === l.type)) {
|
|
1040
|
+
r += 1;
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
1043
1043
|
const i = l.props.children;
|
|
1044
|
-
i && (
|
|
1045
|
-
}),
|
|
1044
|
+
i && (r += ze(i, a));
|
|
1045
|
+
}), r;
|
|
1046
1046
|
}
|
|
1047
|
-
const
|
|
1047
|
+
const at = se(!1);
|
|
1048
1048
|
function ge({
|
|
1049
1049
|
children: t,
|
|
1050
|
-
...
|
|
1050
|
+
...a
|
|
1051
1051
|
}) {
|
|
1052
|
-
const
|
|
1052
|
+
const r = ze(t, [
|
|
1053
1053
|
oe,
|
|
1054
|
-
U
|
|
1054
|
+
U,
|
|
1055
|
+
rt
|
|
1055
1056
|
]) === 0;
|
|
1056
|
-
return /* @__PURE__ */ e(
|
|
1057
|
+
return /* @__PURE__ */ e(at.Provider, { value: r, children: /* @__PURE__ */ e(C.Root, { ...a, children: t }) });
|
|
1057
1058
|
}
|
|
1058
|
-
const
|
|
1059
|
-
const l = ie(
|
|
1059
|
+
const ae = b(({ disabled: t, ...a }, r) => {
|
|
1060
|
+
const l = ie(at);
|
|
1060
1061
|
return /* @__PURE__ */ e(
|
|
1061
|
-
|
|
1062
|
+
C.Trigger,
|
|
1062
1063
|
{
|
|
1063
|
-
ref:
|
|
1064
|
+
ref: r,
|
|
1064
1065
|
disabled: t || l,
|
|
1065
|
-
...
|
|
1066
|
+
...a
|
|
1066
1067
|
}
|
|
1067
1068
|
);
|
|
1068
1069
|
});
|
|
1069
|
-
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1070
|
+
ae.displayName = "DropdownMenuTrigger";
|
|
1071
|
+
const Qa = C.Group, Ya = C.Portal, re = b(({ className: t, sideOffset: a = 8, ...r }, l) => /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ e(
|
|
1072
|
+
C.Content,
|
|
1072
1073
|
{
|
|
1073
1074
|
ref: l,
|
|
1074
|
-
sideOffset:
|
|
1075
|
+
sideOffset: a,
|
|
1075
1076
|
className: o(
|
|
1076
1077
|
"menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
1077
1078
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -1082,71 +1083,109 @@ const Wr = T.Group, Xr = T.Portal, ae = b(({ className: t, sideOffset: r = 8, ..
|
|
|
1082
1083
|
"duration-150 ease-out",
|
|
1083
1084
|
t
|
|
1084
1085
|
),
|
|
1085
|
-
...
|
|
1086
|
+
...r
|
|
1086
1087
|
}
|
|
1087
1088
|
) }));
|
|
1088
|
-
|
|
1089
|
-
const oe = b(({ className: t, inset:
|
|
1090
|
-
|
|
1089
|
+
re.displayName = "DropdownMenuContent";
|
|
1090
|
+
const oe = b(({ className: t, inset: a, ...r }, l) => /* @__PURE__ */ e(
|
|
1091
|
+
C.Item,
|
|
1091
1092
|
{
|
|
1092
1093
|
ref: l,
|
|
1093
1094
|
className: o(
|
|
1094
1095
|
"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",
|
|
1095
1096
|
"focus:bg-(--menu-highlight) data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1096
1097
|
"[&_svg]:size-4 [&_svg]:text-muted",
|
|
1097
|
-
|
|
1098
|
+
a && "pl-8",
|
|
1098
1099
|
t
|
|
1099
1100
|
),
|
|
1100
|
-
...
|
|
1101
|
+
...r
|
|
1101
1102
|
}
|
|
1102
1103
|
));
|
|
1103
1104
|
oe.displayName = "DropdownMenuItem";
|
|
1104
|
-
const U = b(({ className: t, children:
|
|
1105
|
-
|
|
1105
|
+
const U = b(({ className: t, children: a, checked: r, ...l }, i) => /* @__PURE__ */ s(
|
|
1106
|
+
C.CheckboxItem,
|
|
1106
1107
|
{
|
|
1107
1108
|
ref: i,
|
|
1108
1109
|
className: o(
|
|
1109
1110
|
"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)",
|
|
1110
1111
|
t
|
|
1111
1112
|
),
|
|
1112
|
-
checked:
|
|
1113
|
+
checked: r,
|
|
1113
1114
|
...l,
|
|
1114
1115
|
children: [
|
|
1115
|
-
/* @__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(
|
|
1116
|
-
|
|
1116
|
+
/* @__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(C.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(X, { className: "size-3", weight: "bold" }) }) }),
|
|
1117
|
+
a
|
|
1117
1118
|
]
|
|
1118
1119
|
}
|
|
1119
1120
|
));
|
|
1120
1121
|
U.displayName = "DropdownMenuCheckboxItem";
|
|
1121
|
-
const ne = b(({ className: t, ...
|
|
1122
|
-
|
|
1122
|
+
const ne = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1123
|
+
C.Label,
|
|
1123
1124
|
{
|
|
1124
|
-
ref:
|
|
1125
|
+
ref: r,
|
|
1125
1126
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1126
|
-
...
|
|
1127
|
+
...a
|
|
1127
1128
|
}
|
|
1128
1129
|
));
|
|
1129
1130
|
ne.displayName = "DropdownMenuLabel";
|
|
1130
|
-
const
|
|
1131
|
-
|
|
1131
|
+
const Za = C.Sub, rt = b(({ className: t, inset: a, children: r, ...l }, i) => /* @__PURE__ */ s(
|
|
1132
|
+
C.SubTrigger,
|
|
1133
|
+
{
|
|
1134
|
+
ref: i,
|
|
1135
|
+
className: o(
|
|
1136
|
+
"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",
|
|
1137
|
+
"focus:bg-(--menu-highlight) data-[state=open]:bg-(--menu-highlight)",
|
|
1138
|
+
"[&_svg]:size-4 [&_svg]:text-muted",
|
|
1139
|
+
a && "pl-8",
|
|
1140
|
+
t
|
|
1141
|
+
),
|
|
1142
|
+
...l,
|
|
1143
|
+
children: [
|
|
1144
|
+
r,
|
|
1145
|
+
/* @__PURE__ */ e(Pt, { className: "ml-auto shrink-0" })
|
|
1146
|
+
]
|
|
1147
|
+
}
|
|
1148
|
+
));
|
|
1149
|
+
rt.displayName = "DropdownMenuSubTrigger";
|
|
1150
|
+
const Sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1151
|
+
C.SubContent,
|
|
1152
|
+
{
|
|
1153
|
+
ref: r,
|
|
1154
|
+
sideOffset: 8,
|
|
1155
|
+
className: o(
|
|
1156
|
+
"menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
1157
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1158
|
+
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
1159
|
+
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
1160
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1161
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
1162
|
+
"duration-150 ease-out",
|
|
1163
|
+
t
|
|
1164
|
+
),
|
|
1165
|
+
...a
|
|
1166
|
+
}
|
|
1167
|
+
));
|
|
1168
|
+
Sa.displayName = "DropdownMenuSubContent";
|
|
1169
|
+
const Ne = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1170
|
+
C.Separator,
|
|
1132
1171
|
{
|
|
1133
|
-
ref:
|
|
1172
|
+
ref: r,
|
|
1134
1173
|
className: o("-mx-1 my-1 h-px bg-line", t),
|
|
1135
|
-
...
|
|
1174
|
+
...a
|
|
1136
1175
|
}
|
|
1137
1176
|
));
|
|
1138
1177
|
Ne.displayName = "DropdownMenuSeparator";
|
|
1139
|
-
const
|
|
1140
|
-
function
|
|
1178
|
+
const Oa = D.Group, za = D.Value;
|
|
1179
|
+
function ka({
|
|
1141
1180
|
children: t,
|
|
1142
|
-
disabled:
|
|
1143
|
-
...
|
|
1181
|
+
disabled: a,
|
|
1182
|
+
...r
|
|
1144
1183
|
}) {
|
|
1145
|
-
const l =
|
|
1146
|
-
return /* @__PURE__ */ e(
|
|
1184
|
+
const l = ze(t, [ke]) === 0;
|
|
1185
|
+
return /* @__PURE__ */ e(D.Root, { disabled: a || l, ...r, children: t });
|
|
1147
1186
|
}
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1187
|
+
const nt = b(({ className: t, children: a, variant: r = "field", ...l }, i) => /* @__PURE__ */ s(
|
|
1188
|
+
D.Trigger,
|
|
1150
1189
|
{
|
|
1151
1190
|
ref: i,
|
|
1152
1191
|
className: o(
|
|
@@ -1154,24 +1193,24 @@ const at = b(({ className: t, children: r, variant: a = "field", ...l }, i) => /
|
|
|
1154
1193
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1155
1194
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1156
1195
|
"[&>span]:truncate",
|
|
1157
|
-
|
|
1158
|
-
|
|
1196
|
+
r === "field" && "h-(--control-h-md) w-full rounded-md border border-line bg-surface px-3 focus:border-primary focus:ring-2 focus:ring-focus/30",
|
|
1197
|
+
r === "inline" && "btn-fill btn-inner-border btn-interactive h-(--control-h-md) w-auto rounded-(--control-radius) border-0 bg-(--button-secondary-bg) px-(--control-pad-x-sm) font-medium text-fg hover:bg-(--button-surface-hover) active:bg-(--button-surface-active) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong",
|
|
1159
1198
|
t
|
|
1160
1199
|
),
|
|
1161
1200
|
...l,
|
|
1162
1201
|
children: [
|
|
1163
|
-
|
|
1164
|
-
/* @__PURE__ */ e(
|
|
1202
|
+
a,
|
|
1203
|
+
/* @__PURE__ */ e(D.Icon, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "size-3.5 text-subtle" }) })
|
|
1165
1204
|
]
|
|
1166
1205
|
}
|
|
1167
1206
|
));
|
|
1168
|
-
|
|
1169
|
-
const
|
|
1170
|
-
({ className: t, children:
|
|
1171
|
-
|
|
1207
|
+
nt.displayName = "SelectTrigger";
|
|
1208
|
+
const lt = b(
|
|
1209
|
+
({ className: t, children: a, position: r = "popper", sideOffset: l = 8, ...i }, d) => /* @__PURE__ */ e(D.Portal, { children: /* @__PURE__ */ e(
|
|
1210
|
+
D.Content,
|
|
1172
1211
|
{
|
|
1173
1212
|
ref: d,
|
|
1174
|
-
position:
|
|
1213
|
+
position: r,
|
|
1175
1214
|
sideOffset: l,
|
|
1176
1215
|
className: o(
|
|
1177
1216
|
"menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
|
|
@@ -1184,40 +1223,40 @@ const nt = b(
|
|
|
1184
1223
|
t
|
|
1185
1224
|
),
|
|
1186
1225
|
...i,
|
|
1187
|
-
children: /* @__PURE__ */ e(
|
|
1226
|
+
children: /* @__PURE__ */ e(D.Viewport, { className: "p-0", children: a })
|
|
1188
1227
|
}
|
|
1189
1228
|
) })
|
|
1190
1229
|
);
|
|
1191
|
-
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1230
|
+
lt.displayName = "SelectContent";
|
|
1231
|
+
const ke = b(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
|
|
1232
|
+
D.Item,
|
|
1194
1233
|
{
|
|
1195
1234
|
ref: l,
|
|
1196
1235
|
className: o(
|
|
1197
1236
|
"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",
|
|
1198
1237
|
t
|
|
1199
1238
|
),
|
|
1200
|
-
...
|
|
1239
|
+
...r,
|
|
1201
1240
|
children: [
|
|
1202
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1203
|
-
/* @__PURE__ */ e(
|
|
1241
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(D.ItemIndicator, { children: /* @__PURE__ */ e(X, { className: "size-3.5" }) }) }),
|
|
1242
|
+
/* @__PURE__ */ e(D.ItemText, { children: a })
|
|
1204
1243
|
]
|
|
1205
1244
|
}
|
|
1206
1245
|
));
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1246
|
+
ke.displayName = "SelectItem";
|
|
1247
|
+
const Da = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1248
|
+
D.Label,
|
|
1210
1249
|
{
|
|
1211
|
-
ref:
|
|
1250
|
+
ref: r,
|
|
1212
1251
|
className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
|
|
1213
|
-
...
|
|
1252
|
+
...a
|
|
1214
1253
|
}
|
|
1215
1254
|
));
|
|
1216
|
-
|
|
1217
|
-
function
|
|
1255
|
+
Da.displayName = "SelectLabel";
|
|
1256
|
+
function Ta({
|
|
1218
1257
|
icon: t,
|
|
1219
|
-
title:
|
|
1220
|
-
description:
|
|
1258
|
+
title: a,
|
|
1259
|
+
description: r,
|
|
1221
1260
|
action: l,
|
|
1222
1261
|
className: i
|
|
1223
1262
|
}) {
|
|
@@ -1231,41 +1270,41 @@ function kr({
|
|
|
1231
1270
|
children: [
|
|
1232
1271
|
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,
|
|
1233
1272
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1234
|
-
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold leading-tight text-table-header-active", children:
|
|
1235
|
-
|
|
1273
|
+
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold leading-tight text-table-header-active", children: a }),
|
|
1274
|
+
r ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: r }) : null
|
|
1236
1275
|
] }),
|
|
1237
1276
|
l ? /* @__PURE__ */ e("div", { className: "text-sm font-medium text-table-accent", children: l }) : null
|
|
1238
1277
|
]
|
|
1239
1278
|
}
|
|
1240
1279
|
);
|
|
1241
1280
|
}
|
|
1242
|
-
const
|
|
1243
|
-
function
|
|
1244
|
-
return t.split(/\s+/).slice(0, 2).map((
|
|
1245
|
-
var
|
|
1246
|
-
return ((
|
|
1281
|
+
const Ma = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium";
|
|
1282
|
+
function Pa(t) {
|
|
1283
|
+
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1284
|
+
var r;
|
|
1285
|
+
return ((r = a[0]) == null ? void 0 : r.toUpperCase()) ?? "";
|
|
1247
1286
|
}).join("");
|
|
1248
1287
|
}
|
|
1249
|
-
function
|
|
1288
|
+
function Ka({
|
|
1250
1289
|
name: t,
|
|
1251
|
-
secondary:
|
|
1252
|
-
image:
|
|
1290
|
+
secondary: a,
|
|
1291
|
+
image: r
|
|
1253
1292
|
}) {
|
|
1254
1293
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
1255
1294
|
/* @__PURE__ */ s(Ge, { className: "size-8", children: [
|
|
1256
|
-
|
|
1257
|
-
/* @__PURE__ */ e(Ve, { children:
|
|
1295
|
+
r ? /* @__PURE__ */ e(He, { src: r, alt: "" }) : null,
|
|
1296
|
+
/* @__PURE__ */ e(Ve, { children: Pa(t) })
|
|
1258
1297
|
] }),
|
|
1259
1298
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1260
1299
|
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
|
|
1261
|
-
|
|
1300
|
+
a ? /* @__PURE__ */ e("div", { className: "truncate text-xs text-table-muted", children: a }) : null
|
|
1262
1301
|
] })
|
|
1263
1302
|
] });
|
|
1264
1303
|
}
|
|
1265
|
-
function
|
|
1304
|
+
function er({
|
|
1266
1305
|
rows: t,
|
|
1267
|
-
columns:
|
|
1268
|
-
getRowId:
|
|
1306
|
+
columns: a,
|
|
1307
|
+
getRowId: r,
|
|
1269
1308
|
loading: l = !1,
|
|
1270
1309
|
error: i,
|
|
1271
1310
|
empty: d,
|
|
@@ -1276,68 +1315,68 @@ function Yr({
|
|
|
1276
1315
|
tabs: p,
|
|
1277
1316
|
activeTab: N,
|
|
1278
1317
|
onTabChange: k,
|
|
1279
|
-
infoBanner:
|
|
1318
|
+
infoBanner: S,
|
|
1280
1319
|
selectable: w = !1,
|
|
1281
1320
|
bulkActions: I,
|
|
1282
1321
|
rowActions: y,
|
|
1283
1322
|
onRowClick: B,
|
|
1284
1323
|
defaultSort: J,
|
|
1285
1324
|
pageSize: F = 25,
|
|
1286
|
-
pageSizeOptions:
|
|
1325
|
+
pageSizeOptions: j = [10, 25, 50, 100],
|
|
1287
1326
|
tone: Q,
|
|
1288
1327
|
headerAction: ue,
|
|
1289
1328
|
headerClassName: Y,
|
|
1290
|
-
panelClassName:
|
|
1291
|
-
className:
|
|
1329
|
+
panelClassName: it,
|
|
1330
|
+
className: ot
|
|
1292
1331
|
}) {
|
|
1293
|
-
const [De, Te] =
|
|
1332
|
+
const [De, Te] = T(
|
|
1294
1333
|
() => Object.fromEntries(
|
|
1295
|
-
|
|
1334
|
+
a.filter((n) => n.defaultHidden && !n.required).map((n) => [n.id, !0])
|
|
1296
1335
|
)
|
|
1297
|
-
), [x,
|
|
1336
|
+
), [x, st] = T(
|
|
1298
1337
|
J ?? null
|
|
1299
|
-
), [$, Z] =
|
|
1338
|
+
), [$, Z] = T(0), [L, dt] = T(F), [R, me] = T(/* @__PURE__ */ new Set()), [ct, pe] = T([]), E = a.filter((n) => !De[n.id]), Me = a.filter((n) => De[n.id] && !n.required), be = (u ?? []).filter((n) => ct.includes(n.id)), ut = (u ?? []).map((n) => `${n.id}:${n.value.join(",")}`).join("|"), O = _e(() => {
|
|
1300
1339
|
let n = t;
|
|
1301
1340
|
for (const f of u ?? [])
|
|
1302
1341
|
f.value.length > 0 && (n = n.filter((v) => f.match(v, f.value)));
|
|
1303
1342
|
if (!c || !c.value.trim()) return n;
|
|
1304
1343
|
const m = c.value.trim().toLowerCase();
|
|
1305
1344
|
return n.filter((f) => c.keys(f).toLowerCase().includes(m));
|
|
1306
|
-
}, [t, c, u]), q =
|
|
1307
|
-
if (!x) return
|
|
1308
|
-
const n =
|
|
1309
|
-
if (!(n != null && n.sortValue)) return
|
|
1345
|
+
}, [t, c, u]), q = _e(() => {
|
|
1346
|
+
if (!x) return O;
|
|
1347
|
+
const n = a.find((f) => f.id === x.id);
|
|
1348
|
+
if (!(n != null && n.sortValue)) return O;
|
|
1310
1349
|
const m = x.dir === "asc" ? 1 : -1;
|
|
1311
|
-
return [...
|
|
1350
|
+
return [...O].sort((f, v) => {
|
|
1312
1351
|
const P = n.sortValue(f), H = n.sortValue(v);
|
|
1313
1352
|
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;
|
|
1314
1353
|
});
|
|
1315
|
-
}, [
|
|
1354
|
+
}, [O, x, a]), G = Math.max(1, Math.ceil(q.length / L));
|
|
1316
1355
|
V(() => {
|
|
1317
1356
|
Z(0);
|
|
1318
|
-
}, [c == null ? void 0 : c.value, L, x == null ? void 0 : x.id, x == null ? void 0 : x.dir, N,
|
|
1357
|
+
}, [c == null ? void 0 : c.value, L, x == null ? void 0 : x.id, x == null ? void 0 : x.dir, N, ut]), V(() => {
|
|
1319
1358
|
$ > G - 1 && Z(G - 1);
|
|
1320
1359
|
}, [$, G]);
|
|
1321
|
-
const
|
|
1322
|
-
n.sortable &&
|
|
1360
|
+
const K = $ * L, _ = q.slice(K, K + L), mt = (n) => {
|
|
1361
|
+
n.sortable && st(
|
|
1323
1362
|
(m) => (m == null ? void 0 : m.id) === n.id ? m.dir === "asc" ? { id: n.id, dir: "desc" } : null : { id: n.id, dir: "asc" }
|
|
1324
1363
|
);
|
|
1325
|
-
}, Pe =
|
|
1364
|
+
}, Pe = _.length > 0 && _.every((n) => R.has(r(n))), pt = _.some((n) => R.has(r(n))), bt = t.filter((n) => R.has(r(n))), ft = () => {
|
|
1326
1365
|
me((n) => {
|
|
1327
1366
|
const m = new Set(n);
|
|
1328
|
-
return Pe ?
|
|
1367
|
+
return Pe ? _.forEach((f) => m.delete(r(f))) : _.forEach((f) => m.add(r(f))), m;
|
|
1329
1368
|
});
|
|
1330
|
-
},
|
|
1369
|
+
}, ht = (n) => {
|
|
1331
1370
|
me((m) => {
|
|
1332
1371
|
const f = new Set(m);
|
|
1333
1372
|
return f.has(n) ? f.delete(n) : f.add(n), f;
|
|
1334
1373
|
});
|
|
1335
|
-
},
|
|
1374
|
+
}, gt = !!(c || u != null && u.length || h || g), xt = E.some((n) => n.width), vt = E.length > 1 ? 70 / (E.length - 1) : 100, Nt = E.map((n, m) => n.width ? n.width : xt ? "auto" : `${m === 0 ? 30 : vt}%`), Ie = [
|
|
1336
1375
|
...w ? ["2.75rem"] : [],
|
|
1337
|
-
...
|
|
1376
|
+
...Nt,
|
|
1338
1377
|
...y ? ["11rem"] : []
|
|
1339
|
-
],
|
|
1340
|
-
return /* @__PURE__ */ s("div", { className: o("space-y-4",
|
|
1378
|
+
], yt = (n) => (x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? "ascending" : "descending" : void 0;
|
|
1379
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-4", ot), children: [
|
|
1341
1380
|
p && p.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: p.map((n) => {
|
|
1342
1381
|
const m = n.id === N;
|
|
1343
1382
|
return /* @__PURE__ */ e(
|
|
@@ -1356,7 +1395,7 @@ function Yr({
|
|
|
1356
1395
|
n.id
|
|
1357
1396
|
);
|
|
1358
1397
|
}) }),
|
|
1359
|
-
|
|
1398
|
+
gt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1360
1399
|
c && /* @__PURE__ */ e(
|
|
1361
1400
|
tt,
|
|
1362
1401
|
{
|
|
@@ -1366,24 +1405,24 @@ function Yr({
|
|
|
1366
1405
|
value: c.value,
|
|
1367
1406
|
onChange: (n) => c.onChange(n.target.value),
|
|
1368
1407
|
onClear: () => c.onChange(""),
|
|
1369
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1408
|
+
leadingIcon: /* @__PURE__ */ e(It, {}),
|
|
1370
1409
|
containerClassName: "w-full sm:w-[280px]",
|
|
1371
1410
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1372
1411
|
}
|
|
1373
1412
|
),
|
|
1374
1413
|
h,
|
|
1375
1414
|
/* @__PURE__ */ s(ge, { children: [
|
|
1376
|
-
/* @__PURE__ */ e(
|
|
1377
|
-
|
|
1415
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1416
|
+
z,
|
|
1378
1417
|
{
|
|
1379
1418
|
variant: "secondary",
|
|
1380
1419
|
size: "md",
|
|
1381
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1420
|
+
leadingIcon: /* @__PURE__ */ e(Et, {}),
|
|
1382
1421
|
trailingIcon: /* @__PURE__ */ e(ee, {}),
|
|
1383
1422
|
children: "Columns"
|
|
1384
1423
|
}
|
|
1385
1424
|
) }),
|
|
1386
|
-
/* @__PURE__ */ s(
|
|
1425
|
+
/* @__PURE__ */ s(re, { align: "end", className: "w-54", children: [
|
|
1387
1426
|
/* @__PURE__ */ e(ne, { className: "text-[13px]", children: "Active columns" }),
|
|
1388
1427
|
E.map((n) => /* @__PURE__ */ s(
|
|
1389
1428
|
U,
|
|
@@ -1395,7 +1434,7 @@ function Yr({
|
|
|
1395
1434
|
className: "justify-between",
|
|
1396
1435
|
children: [
|
|
1397
1436
|
/* @__PURE__ */ e("span", { children: n.header }),
|
|
1398
|
-
n.required ? /* @__PURE__ */ e(
|
|
1437
|
+
n.required ? /* @__PURE__ */ e(_t, { className: "size-3.5 text-subtle", "aria-hidden": !0 }) : null
|
|
1399
1438
|
]
|
|
1400
1439
|
},
|
|
1401
1440
|
n.id
|
|
@@ -1417,8 +1456,8 @@ function Yr({
|
|
|
1417
1456
|
] })
|
|
1418
1457
|
] }),
|
|
1419
1458
|
u && u.length > 0 ? /* @__PURE__ */ s(ge, { children: [
|
|
1420
|
-
/* @__PURE__ */ e(
|
|
1421
|
-
|
|
1459
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1460
|
+
z,
|
|
1422
1461
|
{
|
|
1423
1462
|
variant: "secondary",
|
|
1424
1463
|
size: "md",
|
|
@@ -1427,7 +1466,7 @@ function Yr({
|
|
|
1427
1466
|
children: /* @__PURE__ */ e(Ee, {})
|
|
1428
1467
|
}
|
|
1429
1468
|
) }),
|
|
1430
|
-
/* @__PURE__ */ e(
|
|
1469
|
+
/* @__PURE__ */ e(re, { align: "start", className: "w-54", children: u.map((n) => /* @__PURE__ */ e(
|
|
1431
1470
|
oe,
|
|
1432
1471
|
{
|
|
1433
1472
|
onSelect: () => pe(
|
|
@@ -1447,7 +1486,7 @@ function Yr({
|
|
|
1447
1486
|
};
|
|
1448
1487
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1449
1488
|
/* @__PURE__ */ e(
|
|
1450
|
-
|
|
1489
|
+
z,
|
|
1451
1490
|
{
|
|
1452
1491
|
variant: "secondary",
|
|
1453
1492
|
size: "md",
|
|
@@ -1459,14 +1498,14 @@ function Yr({
|
|
|
1459
1498
|
}
|
|
1460
1499
|
),
|
|
1461
1500
|
/* @__PURE__ */ s(ge, { children: [
|
|
1462
|
-
/* @__PURE__ */ e(
|
|
1501
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ s(z, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1463
1502
|
/* @__PURE__ */ e(Ee, {}),
|
|
1464
1503
|
/* @__PURE__ */ e("span", { className: "font-medium", children: n.label }),
|
|
1465
1504
|
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1466
1505
|
/* @__PURE__ */ e("span", { className: "text-muted", children: n.value.length > 0 ? `${n.value.length} selected` : "Enter value" }),
|
|
1467
1506
|
/* @__PURE__ */ e(ee, { className: "text-muted" })
|
|
1468
1507
|
] }) }),
|
|
1469
|
-
/* @__PURE__ */ s(
|
|
1508
|
+
/* @__PURE__ */ s(re, { align: "start", className: "w-56", children: [
|
|
1470
1509
|
/* @__PURE__ */ s(ne, { className: "text-[13px]", children: [
|
|
1471
1510
|
"Filter by ",
|
|
1472
1511
|
n.label
|
|
@@ -1505,19 +1544,19 @@ function Yr({
|
|
|
1505
1544
|
}
|
|
1506
1545
|
)
|
|
1507
1546
|
] }) : null,
|
|
1508
|
-
|
|
1547
|
+
S,
|
|
1509
1548
|
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: [
|
|
1510
1549
|
/* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
|
|
1511
1550
|
R.size,
|
|
1512
1551
|
" selected"
|
|
1513
1552
|
] }),
|
|
1514
1553
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (I ?? []).map((n) => /* @__PURE__ */ s(
|
|
1515
|
-
|
|
1554
|
+
z,
|
|
1516
1555
|
{
|
|
1517
1556
|
size: "md",
|
|
1518
1557
|
variant: n.variant ?? "outline",
|
|
1519
1558
|
disabled: n.disabled,
|
|
1520
|
-
onClick: () => void n.onRun(
|
|
1559
|
+
onClick: () => void n.onRun(bt),
|
|
1521
1560
|
children: [
|
|
1522
1561
|
n.icon,
|
|
1523
1562
|
n.label
|
|
@@ -1544,7 +1583,7 @@ function Yr({
|
|
|
1544
1583
|
action: ue,
|
|
1545
1584
|
tone: Q,
|
|
1546
1585
|
headerClassName: Y,
|
|
1547
|
-
panelClassName:
|
|
1586
|
+
panelClassName: it,
|
|
1548
1587
|
header: (
|
|
1549
1588
|
// Visible header: presentational so its controls stay focusable while
|
|
1550
1589
|
// the body table carries the semantic column headers (sr-only).
|
|
@@ -1555,22 +1594,22 @@ function Yr({
|
|
|
1555
1594
|
xe,
|
|
1556
1595
|
{
|
|
1557
1596
|
"aria-label": "Select all rows",
|
|
1558
|
-
checked: Pe ? !0 :
|
|
1559
|
-
onCheckedChange:
|
|
1597
|
+
checked: Pe ? !0 : pt ? "indeterminate" : !1,
|
|
1598
|
+
onCheckedChange: ft
|
|
1560
1599
|
}
|
|
1561
1600
|
) }),
|
|
1562
1601
|
E.map((n) => /* @__PURE__ */ e(
|
|
1563
1602
|
"th",
|
|
1564
1603
|
{
|
|
1565
|
-
className: o(
|
|
1604
|
+
className: o(Ma, n.align === "right" && "text-right", n.className),
|
|
1566
1605
|
children: n.sortable ? /* @__PURE__ */ s(
|
|
1567
|
-
|
|
1606
|
+
z,
|
|
1568
1607
|
{
|
|
1569
1608
|
type: "button",
|
|
1570
1609
|
variant: "ghost",
|
|
1571
1610
|
size: "xs",
|
|
1572
1611
|
"aria-label": `Sort by ${n.header}`,
|
|
1573
|
-
onClick: () =>
|
|
1612
|
+
onClick: () => mt(n),
|
|
1574
1613
|
className: o(
|
|
1575
1614
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1576
1615
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
@@ -1579,7 +1618,7 @@ function Yr({
|
|
|
1579
1618
|
),
|
|
1580
1619
|
children: [
|
|
1581
1620
|
n.header,
|
|
1582
|
-
(x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? /* @__PURE__ */ e(
|
|
1621
|
+
(x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? /* @__PURE__ */ e(Lt, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(ee, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Rt, { className: "size-3.5 opacity-50" })
|
|
1583
1622
|
]
|
|
1584
1623
|
}
|
|
1585
1624
|
) : n.header
|
|
@@ -1591,14 +1630,14 @@ function Yr({
|
|
|
1591
1630
|
] })
|
|
1592
1631
|
),
|
|
1593
1632
|
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: [
|
|
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(
|
|
1633
|
+
/* @__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(jt, { weight: "duotone" }) }),
|
|
1595
1634
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1596
1635
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
|
|
1597
1636
|
i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
|
|
1598
1637
|
] }),
|
|
1599
1638
|
i.action
|
|
1600
|
-
] }) :
|
|
1601
|
-
|
|
1639
|
+
] }) : _.length === 0 ? /* @__PURE__ */ e(
|
|
1640
|
+
Ta,
|
|
1602
1641
|
{
|
|
1603
1642
|
icon: d == null ? void 0 : d.icon,
|
|
1604
1643
|
title: (d == null ? void 0 : d.title) ?? "No results",
|
|
@@ -1609,13 +1648,13 @@ function Yr({
|
|
|
1609
1648
|
/* @__PURE__ */ e("colgroup", { children: Ie.map((n, m) => /* @__PURE__ */ e("col", { style: { width: n } }, m)) }),
|
|
1610
1649
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
|
|
1611
1650
|
w && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1612
|
-
E.map((n) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort":
|
|
1651
|
+
E.map((n) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": yt(n), children: n.header }, n.id)),
|
|
1613
1652
|
y && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1614
1653
|
] }) }),
|
|
1615
|
-
/* @__PURE__ */ e(
|
|
1616
|
-
const m =
|
|
1654
|
+
/* @__PURE__ */ e(Ot, { children: _.map((n) => {
|
|
1655
|
+
const m = r(n), f = R.has(m);
|
|
1617
1656
|
return /* @__PURE__ */ s(
|
|
1618
|
-
|
|
1657
|
+
Kt,
|
|
1619
1658
|
{
|
|
1620
1659
|
"data-state": f ? "selected" : void 0,
|
|
1621
1660
|
onClick: B ? () => B(n) : void 0,
|
|
@@ -1626,7 +1665,7 @@ function Yr({
|
|
|
1626
1665
|
{
|
|
1627
1666
|
"aria-label": "Select row",
|
|
1628
1667
|
checked: f,
|
|
1629
|
-
onCheckedChange: () =>
|
|
1668
|
+
onCheckedChange: () => ht(m)
|
|
1630
1669
|
}
|
|
1631
1670
|
) }),
|
|
1632
1671
|
E.map((v) => /* @__PURE__ */ e(
|
|
@@ -1649,22 +1688,22 @@ function Yr({
|
|
|
1649
1688
|
),
|
|
1650
1689
|
!l && !i && q.length > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1651
1690
|
/* @__PURE__ */ s("span", { className: "text-muted", children: [
|
|
1652
|
-
|
|
1691
|
+
K + 1,
|
|
1653
1692
|
"–",
|
|
1654
|
-
Math.min(
|
|
1693
|
+
Math.min(K + L, q.length),
|
|
1655
1694
|
" of ",
|
|
1656
1695
|
q.length
|
|
1657
1696
|
] }),
|
|
1658
1697
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1659
|
-
/* @__PURE__ */ s(
|
|
1660
|
-
/* @__PURE__ */ e(
|
|
1661
|
-
/* @__PURE__ */ e(
|
|
1698
|
+
/* @__PURE__ */ s(ka, { value: String(L), onValueChange: (n) => dt(Number(n)), children: [
|
|
1699
|
+
/* @__PURE__ */ e(nt, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ e(za, {}) }),
|
|
1700
|
+
/* @__PURE__ */ e(lt, { children: j.map((n) => /* @__PURE__ */ s(ke, { value: String(n), children: [
|
|
1662
1701
|
n,
|
|
1663
1702
|
" / page"
|
|
1664
1703
|
] }, n)) })
|
|
1665
1704
|
] }),
|
|
1666
1705
|
/* @__PURE__ */ e(
|
|
1667
|
-
|
|
1706
|
+
z,
|
|
1668
1707
|
{
|
|
1669
1708
|
variant: "outline",
|
|
1670
1709
|
size: "md",
|
|
@@ -1674,7 +1713,7 @@ function Yr({
|
|
|
1674
1713
|
}
|
|
1675
1714
|
),
|
|
1676
1715
|
/* @__PURE__ */ e(
|
|
1677
|
-
|
|
1716
|
+
z,
|
|
1678
1717
|
{
|
|
1679
1718
|
variant: "outline",
|
|
1680
1719
|
size: "md",
|
|
@@ -1687,17 +1726,17 @@ function Yr({
|
|
|
1687
1726
|
] })
|
|
1688
1727
|
] });
|
|
1689
1728
|
}
|
|
1690
|
-
function
|
|
1729
|
+
function tr({ icon: t, title: a, description: r, action: l, className: i }) {
|
|
1691
1730
|
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: [
|
|
1692
1731
|
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,
|
|
1693
1732
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1694
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children:
|
|
1695
|
-
|
|
1733
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
|
|
1734
|
+
r ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-sm text-sm text-muted", children: r }) : null
|
|
1696
1735
|
] }),
|
|
1697
1736
|
l
|
|
1698
1737
|
] }) });
|
|
1699
1738
|
}
|
|
1700
|
-
function
|
|
1739
|
+
function ar({ className: t, ...a }) {
|
|
1701
1740
|
return /* @__PURE__ */ e(
|
|
1702
1741
|
"kbd",
|
|
1703
1742
|
{
|
|
@@ -1705,26 +1744,26 @@ function Kr({ className: t, ...r }) {
|
|
|
1705
1744
|
"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",
|
|
1706
1745
|
t
|
|
1707
1746
|
),
|
|
1708
|
-
...
|
|
1747
|
+
...a
|
|
1709
1748
|
}
|
|
1710
1749
|
);
|
|
1711
1750
|
}
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1751
|
+
const Ia = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1752
|
+
qt.Root,
|
|
1714
1753
|
{
|
|
1715
|
-
ref:
|
|
1754
|
+
ref: r,
|
|
1716
1755
|
className: o(
|
|
1717
1756
|
"mb-2.5 block text-sm font-medium text-fg leading-none last:mb-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1718
1757
|
t
|
|
1719
1758
|
),
|
|
1720
|
-
...
|
|
1759
|
+
...a
|
|
1721
1760
|
}
|
|
1722
1761
|
));
|
|
1723
|
-
|
|
1724
|
-
function
|
|
1762
|
+
Ia.displayName = "Label";
|
|
1763
|
+
function rr({
|
|
1725
1764
|
value: t,
|
|
1726
|
-
onValueChange:
|
|
1727
|
-
options:
|
|
1765
|
+
onValueChange: a,
|
|
1766
|
+
options: r,
|
|
1728
1767
|
size: l = "sm",
|
|
1729
1768
|
className: i,
|
|
1730
1769
|
...d
|
|
@@ -1740,7 +1779,7 @@ function Or({
|
|
|
1740
1779
|
l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
|
|
1741
1780
|
i
|
|
1742
1781
|
),
|
|
1743
|
-
children:
|
|
1782
|
+
children: r.map((u) => {
|
|
1744
1783
|
const h = u.value === t;
|
|
1745
1784
|
return /* @__PURE__ */ s(
|
|
1746
1785
|
"label",
|
|
@@ -1759,7 +1798,7 @@ function Or({
|
|
|
1759
1798
|
name: c,
|
|
1760
1799
|
value: u.value,
|
|
1761
1800
|
checked: h,
|
|
1762
|
-
onChange: () =>
|
|
1801
|
+
onChange: () => a(u.value),
|
|
1763
1802
|
className: "sr-only"
|
|
1764
1803
|
}
|
|
1765
1804
|
),
|
|
@@ -1773,35 +1812,35 @@ function Or({
|
|
|
1773
1812
|
}
|
|
1774
1813
|
);
|
|
1775
1814
|
}
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1815
|
+
const Ea = b(({ className: t, orientation: a = "horizontal", decorative: r = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
1816
|
+
Gt.Root,
|
|
1778
1817
|
{
|
|
1779
1818
|
ref: i,
|
|
1780
|
-
decorative:
|
|
1781
|
-
orientation:
|
|
1819
|
+
decorative: r,
|
|
1820
|
+
orientation: a,
|
|
1782
1821
|
className: o(
|
|
1783
1822
|
"shrink-0 bg-line",
|
|
1784
|
-
|
|
1823
|
+
a === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
1785
1824
|
t
|
|
1786
1825
|
),
|
|
1787
1826
|
...l
|
|
1788
1827
|
}
|
|
1789
1828
|
));
|
|
1790
|
-
|
|
1791
|
-
function
|
|
1829
|
+
Ea.displayName = "Separator";
|
|
1830
|
+
function nr({ className: t, ...a }) {
|
|
1792
1831
|
return /* @__PURE__ */ e(
|
|
1793
1832
|
"div",
|
|
1794
1833
|
{
|
|
1795
1834
|
className: o("animate-pulse rounded-md bg-elevated", t),
|
|
1796
|
-
...
|
|
1835
|
+
...a
|
|
1797
1836
|
}
|
|
1798
1837
|
);
|
|
1799
1838
|
}
|
|
1800
|
-
const
|
|
1839
|
+
const lr = W.Provider, ir = W.Root, or = W.Trigger, _a = b(({ className: t, sideOffset: a = 6, ...r }, l) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
|
|
1801
1840
|
W.Content,
|
|
1802
1841
|
{
|
|
1803
1842
|
ref: l,
|
|
1804
|
-
sideOffset:
|
|
1843
|
+
sideOffset: a,
|
|
1805
1844
|
className: o(
|
|
1806
1845
|
"z-50 overflow-hidden rounded-md border border-line bg-elevated px-2 py-1 text-xs text-fg shadow-md",
|
|
1807
1846
|
"data-[state=delayed-open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -1812,81 +1851,84 @@ const ta = W.Provider, ra = W.Root, aa = W.Trigger, Pr = b(({ className: t, side
|
|
|
1812
1851
|
"duration-150 ease-out",
|
|
1813
1852
|
t
|
|
1814
1853
|
),
|
|
1815
|
-
...
|
|
1854
|
+
...r
|
|
1816
1855
|
}
|
|
1817
1856
|
) }));
|
|
1818
|
-
|
|
1857
|
+
_a.displayName = "TooltipContent";
|
|
1819
1858
|
export {
|
|
1820
|
-
|
|
1859
|
+
qa as AgentPrompt,
|
|
1821
1860
|
Ge as Avatar,
|
|
1822
1861
|
Ve as AvatarFallback,
|
|
1823
1862
|
He as AvatarImage,
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1863
|
+
Jt as Badge,
|
|
1864
|
+
z as Button,
|
|
1865
|
+
Ga as Callout,
|
|
1866
|
+
na as Card,
|
|
1867
|
+
oa as CardContent,
|
|
1868
|
+
ia as CardDescription,
|
|
1869
|
+
sa as CardFooter,
|
|
1831
1870
|
Ue as CardHeader,
|
|
1832
|
-
|
|
1871
|
+
la as CardTitle,
|
|
1833
1872
|
xe as Checkbox,
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1873
|
+
Xa as ChoiceDialog,
|
|
1874
|
+
Ja as CodeBlock,
|
|
1875
|
+
er as DataTable,
|
|
1876
|
+
Ka as DataTableIdentity,
|
|
1877
|
+
pa as Dialog,
|
|
1878
|
+
fa as DialogBody,
|
|
1840
1879
|
Ye as DialogCancel,
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1880
|
+
Wa as DialogClose,
|
|
1881
|
+
Oe as DialogContent,
|
|
1882
|
+
xa as DialogDescription,
|
|
1883
|
+
ga as DialogFooter,
|
|
1884
|
+
ha as DialogHeader,
|
|
1885
|
+
ba as DialogPanel,
|
|
1886
|
+
Ke as DialogTitle,
|
|
1848
1887
|
Qe as DialogTrigger,
|
|
1849
1888
|
ge as DropdownMenu,
|
|
1850
1889
|
U as DropdownMenuCheckboxItem,
|
|
1851
|
-
|
|
1852
|
-
|
|
1890
|
+
re as DropdownMenuContent,
|
|
1891
|
+
Qa as DropdownMenuGroup,
|
|
1853
1892
|
oe as DropdownMenuItem,
|
|
1854
1893
|
ne as DropdownMenuLabel,
|
|
1855
|
-
|
|
1894
|
+
Ya as DropdownMenuPortal,
|
|
1856
1895
|
Ne as DropdownMenuSeparator,
|
|
1857
|
-
|
|
1858
|
-
|
|
1896
|
+
Za as DropdownMenuSub,
|
|
1897
|
+
Sa as DropdownMenuSubContent,
|
|
1898
|
+
rt as DropdownMenuSubTrigger,
|
|
1899
|
+
ae as DropdownMenuTrigger,
|
|
1900
|
+
tr as EmptyState,
|
|
1859
1901
|
tt as Input,
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1902
|
+
ar as Kbd,
|
|
1903
|
+
Ia as Label,
|
|
1904
|
+
Na as RadioCard,
|
|
1905
|
+
va as RadioGroup,
|
|
1906
|
+
rr as Segmented,
|
|
1907
|
+
ka as Select,
|
|
1908
|
+
lt as SelectContent,
|
|
1909
|
+
Oa as SelectGroup,
|
|
1910
|
+
ke as SelectItem,
|
|
1911
|
+
Da as SelectLabel,
|
|
1912
|
+
nt as SelectTrigger,
|
|
1913
|
+
za as SelectValue,
|
|
1914
|
+
Ea as Separator,
|
|
1915
|
+
nr as Skeleton,
|
|
1916
|
+
Ht as Spinner,
|
|
1917
|
+
Ha as Table,
|
|
1918
|
+
Ot as TableBody,
|
|
1877
1919
|
fe as TableCell,
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1920
|
+
Yt as TableContainer,
|
|
1921
|
+
Ta as TableEmptyState,
|
|
1922
|
+
Ua as TableHead,
|
|
1923
|
+
Va as TableHeader,
|
|
1924
|
+
Zt as TablePanel,
|
|
1925
|
+
Kt as TableRow,
|
|
1884
1926
|
ce as TableSurface,
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1927
|
+
ir as Tooltip,
|
|
1928
|
+
_a as TooltipContent,
|
|
1929
|
+
lr as TooltipProvider,
|
|
1930
|
+
or as TooltipTrigger,
|
|
1931
|
+
Wt as badgeVariants,
|
|
1932
|
+
Vt as buttonVariants
|
|
1891
1933
|
};
|
|
1892
1934
|
//# sourceMappingURL=index.js.map
|