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