@jinaan/uikit 0.1.2 → 0.1.3
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/README.md +0 -28
- package/dist/data-table.d.ts.map +1 -1
- package/dist/index.js +563 -563
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +70 -72
- package/src/dropdown-menu.tsx +6 -6
- package/src/input.tsx +9 -9
- package/styles.css +2 -1
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
2
|
-
import { CircleNotch as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Slot as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as Se } from "react/jsx-runtime";
|
|
2
|
+
import { CircleNotch as et, Robot as tt, Terminal as at, Check as V, Copy as De, XCircle as rt, Warning as nt, CheckCircle as lt, Info as it, Minus as st, X as te, CaretDown as Q, MagnifyingGlass as ot, Columns as dt, Lock as ct, FunnelSimple as ye, WarningCircle as mt, CaretUp as ut, CaretUpDown as bt } from "@phosphor-icons/react";
|
|
3
|
+
import { forwardRef as p, useState as T, useContext as pt, useId as ae, createContext as ht, useMemo as we, useEffect as Ce } from "react";
|
|
4
|
+
import { Slot as ft } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as pe } from "class-variance-authority";
|
|
6
6
|
import { clsx as xt } from "clsx";
|
|
7
7
|
import { twMerge as gt } from "tailwind-merge";
|
|
8
8
|
import * as he from "@radix-ui/react-avatar";
|
|
9
9
|
import * as ze from "@radix-ui/react-checkbox";
|
|
10
|
-
import * as
|
|
10
|
+
import * as I from "@radix-ui/react-dialog";
|
|
11
11
|
import * as z from "@radix-ui/react-dropdown-menu";
|
|
12
12
|
import * as C from "@radix-ui/react-select";
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
13
|
+
import * as vt from "@radix-ui/react-label";
|
|
14
|
+
import * as Nt from "@radix-ui/react-separator";
|
|
15
15
|
import * as q from "@radix-ui/react-tooltip";
|
|
16
|
-
function l(...
|
|
17
|
-
return gt(xt(
|
|
16
|
+
function l(...a) {
|
|
17
|
+
return gt(xt(a));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function yt({ className: a }) {
|
|
20
20
|
return /* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
et,
|
|
22
22
|
{
|
|
23
|
-
className: l("size-4 animate-spin text-muted",
|
|
23
|
+
className: l("size-4 animate-spin text-muted", a),
|
|
24
24
|
weight: "bold",
|
|
25
25
|
"aria-hidden": !0
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const wt = pe(
|
|
30
30
|
"relative inline-flex select-none items-center justify-center gap-[var(--control-gap)] whitespace-nowrap rounded-[var(--control-radius)] border border-transparent font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-[120ms] active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/40 focus-visible:ring-offset-1 focus-visible:ring-offset-canvas disabled:pointer-events-none disabled:opacity-50",
|
|
31
31
|
{
|
|
32
32
|
variants: {
|
|
@@ -52,74 +52,74 @@ const Ct = pe(
|
|
|
52
52
|
size: "md"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), Ct = {
|
|
56
56
|
xs: "[&_svg]:size-[var(--control-icon-xs)]",
|
|
57
57
|
sm: "[&_svg]:size-[var(--control-icon-sm)]",
|
|
58
58
|
md: "[&_svg]:size-[var(--control-icon-md)]",
|
|
59
59
|
lg: "[&_svg]:size-[var(--control-icon-lg)]",
|
|
60
60
|
xl: "[&_svg]:size-[var(--control-icon-xl)]",
|
|
61
61
|
icon: "[&_svg]:size-[var(--control-icon-md)]"
|
|
62
|
-
},
|
|
62
|
+
}, y = p(
|
|
63
63
|
({
|
|
64
|
-
className:
|
|
64
|
+
className: a,
|
|
65
65
|
variant: r,
|
|
66
66
|
size: n = "md",
|
|
67
67
|
asChild: s = !1,
|
|
68
|
-
leadingIcon:
|
|
68
|
+
leadingIcon: o,
|
|
69
69
|
trailingIcon: u,
|
|
70
70
|
iconOnly: c = !1,
|
|
71
71
|
loading: m = !1,
|
|
72
72
|
fullWidth: h = !1,
|
|
73
|
-
disabled:
|
|
74
|
-
children:
|
|
75
|
-
...
|
|
73
|
+
disabled: g,
|
|
74
|
+
children: v,
|
|
75
|
+
...j
|
|
76
76
|
}, k) => {
|
|
77
|
-
const S = s ?
|
|
77
|
+
const S = s ? ft : "button", w = Ct[n ?? "md"];
|
|
78
78
|
return /* @__PURE__ */ e(
|
|
79
79
|
S,
|
|
80
80
|
{
|
|
81
81
|
ref: k,
|
|
82
82
|
"aria-busy": m || void 0,
|
|
83
|
-
disabled: s ? void 0 :
|
|
83
|
+
disabled: s ? void 0 : g || m,
|
|
84
84
|
className: l(
|
|
85
|
-
|
|
85
|
+
wt({ variant: r, size: n }),
|
|
86
86
|
c && "aspect-square px-0",
|
|
87
87
|
h && "w-full",
|
|
88
|
-
|
|
88
|
+
a
|
|
89
89
|
),
|
|
90
|
-
...
|
|
91
|
-
children: s ?
|
|
92
|
-
m ? /* @__PURE__ */ e(
|
|
93
|
-
|
|
94
|
-
!m && u ? /* @__PURE__ */ e("span", { className: l("inline-flex shrink-0",
|
|
90
|
+
...j,
|
|
91
|
+
children: s ? v : /* @__PURE__ */ i(Se, { children: [
|
|
92
|
+
m ? /* @__PURE__ */ e(yt, { className: l("text-current", w), "aria-hidden": !0 }) : o ? /* @__PURE__ */ e("span", { className: l("inline-flex shrink-0", w), "aria-hidden": !0, children: o }) : null,
|
|
93
|
+
v,
|
|
94
|
+
!m && u ? /* @__PURE__ */ e("span", { className: l("inline-flex shrink-0", w), "aria-hidden": !0, children: u }) : null
|
|
95
95
|
] })
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
command:
|
|
100
|
+
y.displayName = "Button";
|
|
101
|
+
function fa({
|
|
102
|
+
command: a,
|
|
103
103
|
tag: r = "Build with agents",
|
|
104
104
|
icon: n,
|
|
105
105
|
className: s
|
|
106
106
|
}) {
|
|
107
|
-
const [
|
|
107
|
+
const [o, u] = T(!1), c = async () => {
|
|
108
108
|
try {
|
|
109
|
-
await navigator.clipboard.writeText(
|
|
109
|
+
await navigator.clipboard.writeText(a), u(!0), window.setTimeout(() => u(!1), 1500);
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
return /* @__PURE__ */ i("div", { className: l("relative inline-flex max-w-full", s), children: [
|
|
114
114
|
/* @__PURE__ */ i("span", { className: "absolute -top-2.5 left-4 z-10 inline-flex items-center gap-1.5 rounded-md bg-fg px-2 py-1 text-[11px] font-medium text-canvas shadow-sm", children: [
|
|
115
|
-
n ?? /* @__PURE__ */ e(
|
|
115
|
+
n ?? /* @__PURE__ */ e(tt, { className: "size-3.5", weight: "fill" }),
|
|
116
116
|
r
|
|
117
117
|
] }),
|
|
118
118
|
/* @__PURE__ */ i("div", { className: "flex w-full items-center gap-2 rounded-xl border border-line bg-surface py-2 pl-3 pr-2 shadow-sm", children: [
|
|
119
|
-
/* @__PURE__ */ e(
|
|
120
|
-
/* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children:
|
|
119
|
+
/* @__PURE__ */ e(at, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
|
|
120
|
+
/* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children: a }),
|
|
121
121
|
/* @__PURE__ */ e(
|
|
122
|
-
|
|
122
|
+
y,
|
|
123
123
|
{
|
|
124
124
|
variant: "ghost",
|
|
125
125
|
size: "sm",
|
|
@@ -127,46 +127,46 @@ function va({
|
|
|
127
127
|
"aria-label": "Copy prompt",
|
|
128
128
|
className: "ml-auto",
|
|
129
129
|
onClick: c,
|
|
130
|
-
children:
|
|
130
|
+
children: o ? /* @__PURE__ */ e(V, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(De, {})
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
] })
|
|
134
134
|
] });
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const Te = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
137
137
|
he.Root,
|
|
138
138
|
{
|
|
139
139
|
ref: n,
|
|
140
140
|
className: l(
|
|
141
141
|
"relative flex size-8 shrink-0 overflow-hidden rounded-full border border-line",
|
|
142
|
-
|
|
142
|
+
a
|
|
143
143
|
),
|
|
144
144
|
...r
|
|
145
145
|
}
|
|
146
146
|
));
|
|
147
|
-
|
|
148
|
-
const
|
|
147
|
+
Te.displayName = "Avatar";
|
|
148
|
+
const Ie = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
149
149
|
he.Image,
|
|
150
150
|
{
|
|
151
151
|
ref: n,
|
|
152
|
-
className: l("aspect-square size-full object-cover",
|
|
152
|
+
className: l("aspect-square size-full object-cover", a),
|
|
153
153
|
...r
|
|
154
154
|
}
|
|
155
155
|
));
|
|
156
|
-
|
|
157
|
-
const je =
|
|
156
|
+
Ie.displayName = "AvatarImage";
|
|
157
|
+
const je = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
158
158
|
he.Fallback,
|
|
159
159
|
{
|
|
160
160
|
ref: n,
|
|
161
161
|
className: l(
|
|
162
162
|
"flex size-full items-center justify-center bg-elevated text-xs font-medium text-muted",
|
|
163
|
-
|
|
163
|
+
a
|
|
164
164
|
),
|
|
165
165
|
...r
|
|
166
166
|
}
|
|
167
167
|
));
|
|
168
168
|
je.displayName = "AvatarFallback";
|
|
169
|
-
const
|
|
169
|
+
const zt = pe(
|
|
170
170
|
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
|
|
171
171
|
{
|
|
172
172
|
variants: {
|
|
@@ -182,7 +182,7 @@ const kt = pe(
|
|
|
182
182
|
},
|
|
183
183
|
defaultVariants: { variant: "neutral" }
|
|
184
184
|
}
|
|
185
|
-
),
|
|
185
|
+
), kt = pe("size-1.5 shrink-0 rounded-full", {
|
|
186
186
|
variants: {
|
|
187
187
|
variant: {
|
|
188
188
|
neutral: "bg-subtle",
|
|
@@ -196,50 +196,50 @@ const kt = pe(
|
|
|
196
196
|
},
|
|
197
197
|
defaultVariants: { variant: "neutral" }
|
|
198
198
|
});
|
|
199
|
-
function
|
|
200
|
-
return /* @__PURE__ */ i("span", { className: l(
|
|
201
|
-
n ? /* @__PURE__ */ e("span", { className: l(
|
|
199
|
+
function St({ className: a, variant: r, dot: n = !1, children: s, ...o }) {
|
|
200
|
+
return /* @__PURE__ */ i("span", { className: l(zt({ variant: r }), a), ...o, children: [
|
|
201
|
+
n ? /* @__PURE__ */ e("span", { className: l(kt({ variant: r })), "aria-hidden": !0 }) : null,
|
|
202
202
|
s
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const Dt = {
|
|
206
206
|
info: {
|
|
207
207
|
Icon: it,
|
|
208
208
|
className: "border-info/30 bg-info/10",
|
|
209
209
|
iconClassName: "text-info"
|
|
210
210
|
},
|
|
211
211
|
success: {
|
|
212
|
-
Icon:
|
|
212
|
+
Icon: lt,
|
|
213
213
|
className: "border-success/30 bg-success/10",
|
|
214
214
|
iconClassName: "text-success"
|
|
215
215
|
},
|
|
216
216
|
warning: {
|
|
217
|
-
Icon:
|
|
217
|
+
Icon: nt,
|
|
218
218
|
className: "border-warning/30 bg-warning/10",
|
|
219
219
|
iconClassName: "text-warning"
|
|
220
220
|
},
|
|
221
221
|
error: {
|
|
222
|
-
Icon:
|
|
222
|
+
Icon: rt,
|
|
223
223
|
className: "border-error/30 bg-error/10",
|
|
224
224
|
iconClassName: "text-error"
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
function xa({
|
|
228
|
-
variant:
|
|
228
|
+
variant: a = "info",
|
|
229
229
|
title: r,
|
|
230
230
|
children: n,
|
|
231
231
|
icon: s,
|
|
232
|
-
className:
|
|
232
|
+
className: o
|
|
233
233
|
}) {
|
|
234
|
-
const { Icon: u, className: c, iconClassName: m } =
|
|
234
|
+
const { Icon: u, className: c, iconClassName: m } = Dt[a];
|
|
235
235
|
return /* @__PURE__ */ i(
|
|
236
236
|
"div",
|
|
237
237
|
{
|
|
238
|
-
role:
|
|
238
|
+
role: a === "error" ? "alert" : void 0,
|
|
239
239
|
className: l(
|
|
240
240
|
"flex items-start gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
|
|
241
241
|
c,
|
|
242
|
-
|
|
242
|
+
o
|
|
243
243
|
),
|
|
244
244
|
children: [
|
|
245
245
|
/* @__PURE__ */ e("span", { className: l("mt-0.5 shrink-0 [&_svg]:size-4", m), children: s ?? /* @__PURE__ */ e(u, { weight: "fill" }) }),
|
|
@@ -251,53 +251,53 @@ function xa({
|
|
|
251
251
|
}
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
({ className:
|
|
254
|
+
const Tt = p(
|
|
255
|
+
({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
256
256
|
"div",
|
|
257
257
|
{
|
|
258
258
|
ref: n,
|
|
259
259
|
className: l(
|
|
260
260
|
"rounded-card border border-line bg-surface shadow-xs",
|
|
261
|
-
|
|
261
|
+
a
|
|
262
262
|
),
|
|
263
263
|
...r
|
|
264
264
|
}
|
|
265
265
|
)
|
|
266
266
|
);
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
({ className:
|
|
267
|
+
Tt.displayName = "Card";
|
|
268
|
+
const It = p(
|
|
269
|
+
({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
272
|
ref: n,
|
|
273
|
-
className: l("flex flex-col gap-1 border-b border-line px-5 py-4",
|
|
273
|
+
className: l("flex flex-col gap-1 border-b border-line px-5 py-4", a),
|
|
274
274
|
...r
|
|
275
275
|
}
|
|
276
276
|
)
|
|
277
277
|
);
|
|
278
|
-
|
|
279
|
-
const jt =
|
|
280
|
-
({ className:
|
|
278
|
+
It.displayName = "CardHeader";
|
|
279
|
+
const jt = p(
|
|
280
|
+
({ className: a, ...r }, n) => /* @__PURE__ */ e("h2", { ref: n, className: l("text-sm font-semibold text-fg", a), ...r })
|
|
281
281
|
);
|
|
282
282
|
jt.displayName = "CardTitle";
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
({ className:
|
|
283
|
+
const _t = p(({ className: a, ...r }, n) => /* @__PURE__ */ e("p", { ref: n, className: l("text-sm text-muted", a), ...r }));
|
|
284
|
+
_t.displayName = "CardDescription";
|
|
285
|
+
const Pt = p(
|
|
286
|
+
({ className: a, ...r }, n) => /* @__PURE__ */ e("div", { ref: n, className: l("px-5 py-4", a), ...r })
|
|
287
287
|
);
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
({ className:
|
|
288
|
+
Pt.displayName = "CardContent";
|
|
289
|
+
const Mt = p(
|
|
290
|
+
({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
291
291
|
"div",
|
|
292
292
|
{
|
|
293
293
|
ref: n,
|
|
294
|
-
className: l("flex items-center gap-3 border-t border-line px-5 py-3",
|
|
294
|
+
className: l("flex items-center gap-3 border-t border-line px-5 py-3", a),
|
|
295
295
|
...r
|
|
296
296
|
}
|
|
297
297
|
)
|
|
298
298
|
);
|
|
299
|
-
|
|
300
|
-
const
|
|
299
|
+
Mt.displayName = "CardFooter";
|
|
300
|
+
const me = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
301
301
|
ze.Root,
|
|
302
302
|
{
|
|
303
303
|
ref: n,
|
|
@@ -307,17 +307,17 @@ const ce = b(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
307
307
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
308
308
|
"data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-fg",
|
|
309
309
|
"data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-fg",
|
|
310
|
-
|
|
310
|
+
a
|
|
311
311
|
),
|
|
312
312
|
...r,
|
|
313
|
-
children: /* @__PURE__ */ e(ze.Indicator, { className: "flex items-center justify-center text-current", children: r.checked === "indeterminate" ? /* @__PURE__ */ e(
|
|
313
|
+
children: /* @__PURE__ */ e(ze.Indicator, { className: "flex items-center justify-center text-current", children: r.checked === "indeterminate" ? /* @__PURE__ */ e(st, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(V, { className: "size-3", weight: "bold" }) })
|
|
314
314
|
}
|
|
315
315
|
));
|
|
316
|
-
|
|
317
|
-
const Et =
|
|
318
|
-
/* @__PURE__ */ e(
|
|
316
|
+
me.displayName = "Checkbox";
|
|
317
|
+
const Et = I.Root, Lt = I.Trigger, ga = I.Close, _e = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(I.Portal, { children: [
|
|
318
|
+
/* @__PURE__ */ e(I.Overlay, { className: "fixed inset-0 z-50 bg-overlay backdrop-blur-[1px] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0" }),
|
|
319
319
|
/* @__PURE__ */ i(
|
|
320
|
-
|
|
320
|
+
I.Content,
|
|
321
321
|
{
|
|
322
322
|
ref: s,
|
|
323
323
|
className: l(
|
|
@@ -328,116 +328,116 @@ const Et = T.Root, At = T.Trigger, ga = T.Close, Pe = b(({ className: t, childre
|
|
|
328
328
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
329
329
|
"data-[state=open]:slide-in-from-top-2 duration-200 ease-out",
|
|
330
330
|
"focus:outline-none",
|
|
331
|
-
|
|
331
|
+
a
|
|
332
332
|
),
|
|
333
333
|
...n,
|
|
334
334
|
children: [
|
|
335
335
|
r,
|
|
336
|
-
/* @__PURE__ */ i(
|
|
337
|
-
/* @__PURE__ */ e(
|
|
336
|
+
/* @__PURE__ */ i(I.Close, { className: "absolute right-3.5 top-3.5 z-10 rounded-sm text-subtle transition-colors hover:text-fg focus-visible:outline-none", children: [
|
|
337
|
+
/* @__PURE__ */ e(te, { className: "size-4" }),
|
|
338
338
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
339
339
|
] })
|
|
340
340
|
]
|
|
341
341
|
}
|
|
342
342
|
)
|
|
343
343
|
] }));
|
|
344
|
-
|
|
345
|
-
function
|
|
344
|
+
_e.displayName = "DialogContent";
|
|
345
|
+
function At({ className: a, ...r }) {
|
|
346
346
|
return /* @__PURE__ */ e(
|
|
347
347
|
"div",
|
|
348
348
|
{
|
|
349
349
|
"data-slot": "panel",
|
|
350
350
|
className: l(
|
|
351
351
|
"flex min-h-0 flex-1 flex-col overflow-hidden rounded-b-2xl border-x-0 border-t-0 border-b border-[var(--dialog-panel-border)] bg-[var(--dialog-panel-bg)] shadow-[var(--dialog-panel-shadow)]",
|
|
352
|
-
|
|
352
|
+
a
|
|
353
353
|
),
|
|
354
354
|
...r
|
|
355
355
|
}
|
|
356
356
|
);
|
|
357
357
|
}
|
|
358
|
-
function Rt({ className:
|
|
358
|
+
function Rt({ className: a, ...r }) {
|
|
359
359
|
return /* @__PURE__ */ e(
|
|
360
360
|
"div",
|
|
361
361
|
{
|
|
362
362
|
"data-slot": "body",
|
|
363
|
-
className: l("min-h-0 flex-1 overflow-y-auto px-5 py-4",
|
|
363
|
+
className: l("min-h-0 flex-1 overflow-y-auto px-5 py-4", a),
|
|
364
364
|
...r
|
|
365
365
|
}
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Bt({ className: a, ...r }) {
|
|
369
369
|
return /* @__PURE__ */ e(
|
|
370
370
|
"div",
|
|
371
371
|
{
|
|
372
372
|
"data-slot": "header",
|
|
373
373
|
className: l(
|
|
374
374
|
"flex shrink-0 flex-col gap-1.5 border-b border-[var(--dialog-panel-border)] px-5 py-4",
|
|
375
|
-
|
|
375
|
+
a
|
|
376
376
|
),
|
|
377
377
|
...r
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Ft({ className: a, ...r }) {
|
|
382
382
|
return /* @__PURE__ */ e(
|
|
383
383
|
"div",
|
|
384
384
|
{
|
|
385
385
|
"data-slot": "footer",
|
|
386
386
|
className: l(
|
|
387
387
|
"flex shrink-0 flex-col-reverse gap-2 px-3 pt-3 sm:flex-row sm:justify-end sm:px-4 sm:pt-3.5",
|
|
388
|
-
|
|
388
|
+
a
|
|
389
389
|
),
|
|
390
390
|
...r
|
|
391
391
|
}
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
|
|
394
|
+
const Pe = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
395
|
+
I.Title,
|
|
396
396
|
{
|
|
397
397
|
ref: n,
|
|
398
|
-
className: l("text-base font-semibold text-fg",
|
|
398
|
+
className: l("text-base font-semibold text-fg", a),
|
|
399
399
|
...r
|
|
400
400
|
}
|
|
401
401
|
));
|
|
402
|
-
|
|
403
|
-
const $t =
|
|
404
|
-
|
|
402
|
+
Pe.displayName = "DialogTitle";
|
|
403
|
+
const $t = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
404
|
+
I.Description,
|
|
405
405
|
{
|
|
406
406
|
ref: n,
|
|
407
|
-
className: l("text-sm text-muted",
|
|
407
|
+
className: l("text-sm text-muted", a),
|
|
408
408
|
...r
|
|
409
409
|
}
|
|
410
410
|
));
|
|
411
411
|
$t.displayName = "DialogDescription";
|
|
412
|
-
const
|
|
413
|
-
function
|
|
414
|
-
label:
|
|
412
|
+
const Me = ht(null);
|
|
413
|
+
function Ht({
|
|
414
|
+
label: a,
|
|
415
415
|
value: r,
|
|
416
416
|
onChange: n,
|
|
417
417
|
disabled: s = !1,
|
|
418
|
-
name:
|
|
418
|
+
name: o,
|
|
419
419
|
className: u,
|
|
420
420
|
children: c,
|
|
421
421
|
...m
|
|
422
422
|
}) {
|
|
423
|
-
const h =
|
|
424
|
-
return /* @__PURE__ */ e(
|
|
425
|
-
/* @__PURE__ */ e("legend", { className: "sr-only", children:
|
|
423
|
+
const h = ae(), g = o ?? h;
|
|
424
|
+
return /* @__PURE__ */ e(Me.Provider, { value: { name: g, value: r, onChange: n, disabled: s }, children: /* @__PURE__ */ i("fieldset", { className: l("flex flex-col gap-6", u), ...m, children: [
|
|
425
|
+
/* @__PURE__ */ e("legend", { className: "sr-only", children: a }),
|
|
426
426
|
c
|
|
427
427
|
] }) });
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
value:
|
|
429
|
+
function Gt({
|
|
430
|
+
value: a,
|
|
431
431
|
title: r,
|
|
432
432
|
description: n,
|
|
433
433
|
badge: s,
|
|
434
|
-
disabled:
|
|
434
|
+
disabled: o = !1,
|
|
435
435
|
className: u
|
|
436
436
|
}) {
|
|
437
|
-
const c =
|
|
437
|
+
const c = pt(Me), m = ae();
|
|
438
438
|
if (!c)
|
|
439
439
|
throw new Error("RadioCard must be rendered inside a RadioGroup");
|
|
440
|
-
const h =
|
|
440
|
+
const h = o || c.disabled, g = c.value === a;
|
|
441
441
|
return /* @__PURE__ */ i(
|
|
442
442
|
"label",
|
|
443
443
|
{
|
|
@@ -452,12 +452,12 @@ function qt({
|
|
|
452
452
|
{
|
|
453
453
|
type: "radio",
|
|
454
454
|
name: c.name,
|
|
455
|
-
value:
|
|
456
|
-
checked:
|
|
455
|
+
value: a,
|
|
456
|
+
checked: g,
|
|
457
457
|
disabled: h,
|
|
458
458
|
onChange: () => {
|
|
459
|
-
var
|
|
460
|
-
return (
|
|
459
|
+
var v;
|
|
460
|
+
return (v = c.onChange) == null ? void 0 : v.call(c, a);
|
|
461
461
|
},
|
|
462
462
|
"aria-describedby": n ? m : void 0,
|
|
463
463
|
className: "peer sr-only"
|
|
@@ -477,7 +477,7 @@ function qt({
|
|
|
477
477
|
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
|
|
478
478
|
/* @__PURE__ */ i("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
479
479
|
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: r }),
|
|
480
|
-
s ? /* @__PURE__ */ e(
|
|
480
|
+
s ? /* @__PURE__ */ e(St, { variant: "primary", children: s }) : null
|
|
481
481
|
] }),
|
|
482
482
|
n ? /* @__PURE__ */ e("span", { id: m, className: "mt-1 block text-sm text-muted", children: n }) : null
|
|
483
483
|
] })
|
|
@@ -485,35 +485,35 @@ function qt({
|
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
open:
|
|
488
|
+
function va({
|
|
489
|
+
open: a,
|
|
490
490
|
onOpenChange: r,
|
|
491
491
|
trigger: n,
|
|
492
492
|
title: s,
|
|
493
|
-
options:
|
|
493
|
+
options: o,
|
|
494
494
|
defaultValue: u,
|
|
495
495
|
value: c,
|
|
496
496
|
onValueChange: m,
|
|
497
497
|
cancelLabel: h = "Cancel",
|
|
498
|
-
confirmLabel:
|
|
499
|
-
onConfirm:
|
|
498
|
+
confirmLabel: g = "Continue",
|
|
499
|
+
onConfirm: v
|
|
500
500
|
}) {
|
|
501
|
-
var
|
|
502
|
-
const [
|
|
503
|
-
return /* @__PURE__ */ i(Et, { open:
|
|
504
|
-
n ? /* @__PURE__ */ e(
|
|
501
|
+
var M;
|
|
502
|
+
const [j, k] = T(u ?? ((M = o[0]) == null ? void 0 : M.value) ?? ""), S = c ?? j;
|
|
503
|
+
return /* @__PURE__ */ i(Et, { open: a, onOpenChange: r, children: [
|
|
504
|
+
n ? /* @__PURE__ */ e(Lt, { asChild: !0, children: n }) : null,
|
|
505
505
|
/* @__PURE__ */ i(
|
|
506
|
-
|
|
506
|
+
_e,
|
|
507
507
|
{
|
|
508
508
|
"aria-describedby": void 0,
|
|
509
509
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
510
510
|
children: [
|
|
511
|
-
/* @__PURE__ */ i(
|
|
512
|
-
/* @__PURE__ */ e(
|
|
513
|
-
/* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
|
|
511
|
+
/* @__PURE__ */ i(At, { children: [
|
|
512
|
+
/* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ e(Pe, { className: "text-xl", children: s }) }),
|
|
513
|
+
/* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Ht, { label: s, value: S, onChange: (N) => {
|
|
514
514
|
c === void 0 && k(N), m == null || m(N);
|
|
515
|
-
}, children:
|
|
516
|
-
|
|
515
|
+
}, children: o.map((N) => /* @__PURE__ */ e(
|
|
516
|
+
Gt,
|
|
517
517
|
{
|
|
518
518
|
value: N.value,
|
|
519
519
|
title: N.title,
|
|
@@ -523,9 +523,9 @@ function Na({
|
|
|
523
523
|
N.value
|
|
524
524
|
)) }) })
|
|
525
525
|
] }),
|
|
526
|
-
/* @__PURE__ */ i(
|
|
526
|
+
/* @__PURE__ */ i(Ft, { className: "gap-3 pt-2.5", children: [
|
|
527
527
|
/* @__PURE__ */ e(
|
|
528
|
-
|
|
528
|
+
y,
|
|
529
529
|
{
|
|
530
530
|
variant: "secondary",
|
|
531
531
|
className: "flex-1",
|
|
@@ -533,17 +533,17 @@ function Na({
|
|
|
533
533
|
children: h
|
|
534
534
|
}
|
|
535
535
|
),
|
|
536
|
-
/* @__PURE__ */ e(
|
|
536
|
+
/* @__PURE__ */ e(y, { className: "flex-1", onClick: () => v == null ? void 0 : v(S), children: g })
|
|
537
537
|
] })
|
|
538
538
|
]
|
|
539
539
|
}
|
|
540
540
|
)
|
|
541
541
|
] });
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
const [s,
|
|
543
|
+
function Na({ code: a, label: r, className: n }) {
|
|
544
|
+
const [s, o] = T(!1), u = async () => {
|
|
545
545
|
try {
|
|
546
|
-
await navigator.clipboard.writeText(
|
|
546
|
+
await navigator.clipboard.writeText(a), o(!0), window.setTimeout(() => o(!1), 1500);
|
|
547
547
|
} catch {
|
|
548
548
|
}
|
|
549
549
|
};
|
|
@@ -558,27 +558,27 @@ function ya({ code: t, label: r, className: n }) {
|
|
|
558
558
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 border-b border-line px-3 py-2", children: [
|
|
559
559
|
/* @__PURE__ */ e("span", { className: "truncate text-xs font-medium text-subtle", children: r }),
|
|
560
560
|
/* @__PURE__ */ e(
|
|
561
|
-
|
|
561
|
+
y,
|
|
562
562
|
{
|
|
563
563
|
variant: "ghost",
|
|
564
564
|
size: "sm",
|
|
565
|
-
leadingIcon: s ? /* @__PURE__ */ e(V, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(
|
|
565
|
+
leadingIcon: s ? /* @__PURE__ */ e(V, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(De, {}),
|
|
566
566
|
onClick: u,
|
|
567
567
|
children: s ? "Copied" : "Copy"
|
|
568
568
|
}
|
|
569
569
|
)
|
|
570
570
|
] }),
|
|
571
|
-
/* @__PURE__ */ e("pre", { className: "overflow-x-auto p-4 font-mono text-xs leading-relaxed text-fg", children: /* @__PURE__ */ e("code", { children:
|
|
571
|
+
/* @__PURE__ */ e("pre", { className: "overflow-x-auto p-4 font-mono text-xs leading-relaxed text-fg", children: /* @__PURE__ */ e("code", { children: a }) })
|
|
572
572
|
]
|
|
573
573
|
}
|
|
574
574
|
);
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const qt = {
|
|
577
577
|
sm: "h-[var(--control-h-sm)] text-sm",
|
|
578
578
|
md: "h-[var(--control-h-md)] text-sm",
|
|
579
579
|
lg: "h-[var(--control-h-lg)] text-sm",
|
|
580
580
|
xl: "h-[var(--control-h-xl)] rounded-[var(--control-radius-xl)] text-base"
|
|
581
|
-
},
|
|
581
|
+
}, Vt = {
|
|
582
582
|
sm: "px-[var(--control-pad-x-sm)]",
|
|
583
583
|
md: "px-[var(--control-pad-x-md)]",
|
|
584
584
|
lg: "px-[var(--control-pad-x-lg)]",
|
|
@@ -598,88 +598,88 @@ const Vt = {
|
|
|
598
598
|
md: "size-[var(--control-icon-md)]",
|
|
599
599
|
lg: "size-[var(--control-icon-lg)]",
|
|
600
600
|
xl: "size-[var(--control-icon-xl)]"
|
|
601
|
-
}, Ee =
|
|
601
|
+
}, Ee = p(
|
|
602
602
|
({
|
|
603
|
-
className:
|
|
603
|
+
className: a,
|
|
604
604
|
containerClassName: r,
|
|
605
605
|
type: n = "text",
|
|
606
606
|
size: s = "md",
|
|
607
|
-
leadingIcon:
|
|
607
|
+
leadingIcon: o,
|
|
608
608
|
trailingIcon: u,
|
|
609
609
|
onClear: c,
|
|
610
610
|
value: m,
|
|
611
611
|
defaultValue: h,
|
|
612
|
-
error:
|
|
613
|
-
helperText:
|
|
614
|
-
id:
|
|
612
|
+
error: g = !1,
|
|
613
|
+
helperText: v,
|
|
614
|
+
id: j,
|
|
615
615
|
"aria-describedby": k,
|
|
616
616
|
disabled: S,
|
|
617
|
-
readOnly:
|
|
618
|
-
...
|
|
617
|
+
readOnly: w,
|
|
618
|
+
...M
|
|
619
619
|
}, N) => {
|
|
620
|
-
const
|
|
620
|
+
const R = ae(), W = j ?? R, B = !!v, E = !!(c && (m !== void 0 ? String(m).length > 0 : h !== void 0 && String(h).length > 0)), O = B ? `${W}-description` : void 0, re = [k, O].filter(Boolean).join(" ") || void 0, U = /* @__PURE__ */ e(
|
|
621
621
|
"input",
|
|
622
622
|
{
|
|
623
623
|
ref: N,
|
|
624
|
-
id:
|
|
624
|
+
id: W,
|
|
625
625
|
type: n,
|
|
626
626
|
disabled: S,
|
|
627
|
-
readOnly:
|
|
628
|
-
"aria-invalid":
|
|
629
|
-
"aria-describedby":
|
|
630
|
-
style:
|
|
631
|
-
paddingInlineStart:
|
|
632
|
-
paddingInlineEnd: u ||
|
|
627
|
+
readOnly: w,
|
|
628
|
+
"aria-invalid": g || void 0,
|
|
629
|
+
"aria-describedby": re,
|
|
630
|
+
style: o || u || E ? {
|
|
631
|
+
paddingInlineStart: o ? `calc(var(--control-pad-x-${s}) + var(--control-icon-${s}) + var(--control-gap))` : void 0,
|
|
632
|
+
paddingInlineEnd: u || E ? `calc(var(--control-pad-x-${s}) + var(--control-icon-${s}) + var(--control-gap))` : void 0
|
|
633
633
|
} : void 0,
|
|
634
634
|
className: l(
|
|
635
|
-
"flex w-full rounded-
|
|
635
|
+
"flex w-full rounded-(--control-radius) border bg-(--input-bg) text-(--input-fg) transition-colors",
|
|
636
|
+
qt[s],
|
|
636
637
|
Vt[s],
|
|
637
|
-
|
|
638
|
-
"
|
|
639
|
-
"
|
|
640
|
-
"
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
t
|
|
638
|
+
"placeholder:text-(--input-placeholder)",
|
|
639
|
+
"hover:border-(--input-border-hover)",
|
|
640
|
+
"focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
|
|
641
|
+
g && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
|
|
642
|
+
!g && "border-(--input-border)",
|
|
643
|
+
S && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
|
|
644
|
+
w && "cursor-default focus-visible:ring-0",
|
|
645
|
+
a
|
|
646
646
|
),
|
|
647
647
|
value: m,
|
|
648
648
|
defaultValue: h,
|
|
649
|
-
...
|
|
649
|
+
...M
|
|
650
650
|
}
|
|
651
651
|
);
|
|
652
|
-
return !
|
|
652
|
+
return !o && !u && !E && !B ? U : /* @__PURE__ */ i("div", { className: l("w-full", r), children: [
|
|
653
653
|
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
654
|
-
|
|
654
|
+
o ? /* @__PURE__ */ e(
|
|
655
655
|
"span",
|
|
656
656
|
{
|
|
657
657
|
className: l(
|
|
658
|
-
"pointer-events-none absolute inset-y-0 flex items-center text-
|
|
658
|
+
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
659
659
|
Wt[s]
|
|
660
660
|
),
|
|
661
661
|
"aria-hidden": !0,
|
|
662
|
-
children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children:
|
|
662
|
+
children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: o })
|
|
663
663
|
}
|
|
664
664
|
) : null,
|
|
665
665
|
U,
|
|
666
|
-
|
|
666
|
+
E ? /* @__PURE__ */ e(
|
|
667
667
|
"button",
|
|
668
668
|
{
|
|
669
669
|
type: "button",
|
|
670
670
|
"aria-label": "Clear search",
|
|
671
671
|
onClick: c,
|
|
672
672
|
className: l(
|
|
673
|
-
"absolute inset-y-0 flex items-center text-
|
|
673
|
+
"absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
|
|
674
674
|
ke[s]
|
|
675
675
|
),
|
|
676
|
-
children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: /* @__PURE__ */ e(
|
|
676
|
+
children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: /* @__PURE__ */ e(te, {}) })
|
|
677
677
|
}
|
|
678
678
|
) : u ? /* @__PURE__ */ e(
|
|
679
679
|
"span",
|
|
680
680
|
{
|
|
681
681
|
className: l(
|
|
682
|
-
"pointer-events-none absolute inset-y-0 flex items-center text-
|
|
682
|
+
"pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
|
|
683
683
|
ke[s]
|
|
684
684
|
),
|
|
685
685
|
"aria-hidden": !0,
|
|
@@ -690,85 +690,85 @@ const Vt = {
|
|
|
690
690
|
B ? /* @__PURE__ */ e(
|
|
691
691
|
"p",
|
|
692
692
|
{
|
|
693
|
-
id:
|
|
694
|
-
className: l("mt-1.5 text-xs",
|
|
695
|
-
children:
|
|
693
|
+
id: O,
|
|
694
|
+
className: l("mt-1.5 text-xs", g ? "text-error" : "text-muted"),
|
|
695
|
+
children: v
|
|
696
696
|
}
|
|
697
697
|
) : null
|
|
698
698
|
] });
|
|
699
699
|
}
|
|
700
700
|
);
|
|
701
701
|
Ee.displayName = "Input";
|
|
702
|
-
const
|
|
702
|
+
const oe = z.Root, de = z.Trigger, ya = z.Group, wa = z.Portal, Y = p(({ className: a, sideOffset: r = 6, ...n }, s) => /* @__PURE__ */ e(z.Portal, { children: /* @__PURE__ */ e(
|
|
703
703
|
z.Content,
|
|
704
704
|
{
|
|
705
705
|
ref: s,
|
|
706
706
|
sideOffset: r,
|
|
707
707
|
className: l(
|
|
708
|
-
"z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-
|
|
708
|
+
"z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-[var(--button-secondary-bg)] p-1 shadow-md",
|
|
709
709
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
710
710
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
711
711
|
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
712
712
|
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
713
713
|
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
714
714
|
"duration-150 ease-out",
|
|
715
|
-
|
|
715
|
+
a
|
|
716
716
|
),
|
|
717
717
|
...n
|
|
718
718
|
}
|
|
719
719
|
) }));
|
|
720
720
|
Y.displayName = "DropdownMenuContent";
|
|
721
|
-
const
|
|
721
|
+
const ue = p(({ className: a, inset: r, ...n }, s) => /* @__PURE__ */ e(
|
|
722
722
|
z.Item,
|
|
723
723
|
{
|
|
724
724
|
ref: s,
|
|
725
725
|
className: l(
|
|
726
726
|
"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",
|
|
727
|
-
"focus:bg-
|
|
727
|
+
"focus:bg-[var(--menu-highlight)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
728
728
|
"[&_svg]:size-4 [&_svg]:text-muted",
|
|
729
729
|
r && "pl-8",
|
|
730
|
-
|
|
730
|
+
a
|
|
731
731
|
),
|
|
732
732
|
...n
|
|
733
733
|
}
|
|
734
734
|
));
|
|
735
|
-
|
|
736
|
-
const Z =
|
|
735
|
+
ue.displayName = "DropdownMenuItem";
|
|
736
|
+
const Z = p(({ className: a, children: r, checked: n, ...s }, o) => /* @__PURE__ */ i(
|
|
737
737
|
z.CheckboxItem,
|
|
738
738
|
{
|
|
739
|
-
ref:
|
|
739
|
+
ref: o,
|
|
740
740
|
className: l(
|
|
741
|
-
"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-
|
|
742
|
-
|
|
741
|
+
"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-[var(--menu-highlight)]",
|
|
742
|
+
a
|
|
743
743
|
),
|
|
744
744
|
checked: n,
|
|
745
745
|
...s,
|
|
746
746
|
children: [
|
|
747
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(z.ItemIndicator, { children: /* @__PURE__ */ e(V, { className: "size-3
|
|
747
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(z.ItemIndicator, { 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: /* @__PURE__ */ e(V, { className: "size-3", weight: "bold" }) }) }),
|
|
748
748
|
r
|
|
749
749
|
]
|
|
750
750
|
}
|
|
751
751
|
));
|
|
752
752
|
Z.displayName = "DropdownMenuCheckboxItem";
|
|
753
|
-
const ee =
|
|
753
|
+
const ee = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
754
754
|
z.Label,
|
|
755
755
|
{
|
|
756
756
|
ref: n,
|
|
757
|
-
className: l("px-2 py-1.5 text-xs font-medium text-subtle",
|
|
757
|
+
className: l("px-2 py-1.5 text-xs font-medium text-subtle", a),
|
|
758
758
|
...r
|
|
759
759
|
}
|
|
760
760
|
));
|
|
761
761
|
ee.displayName = "DropdownMenuLabel";
|
|
762
|
-
const
|
|
762
|
+
const be = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
763
763
|
z.Separator,
|
|
764
764
|
{
|
|
765
765
|
ref: n,
|
|
766
|
-
className: l("-mx-1 my-1 h-px bg-line",
|
|
766
|
+
className: l("-mx-1 my-1 h-px bg-line", a),
|
|
767
767
|
...r
|
|
768
768
|
}
|
|
769
769
|
));
|
|
770
|
-
|
|
771
|
-
const
|
|
770
|
+
be.displayName = "DropdownMenuSeparator";
|
|
771
|
+
const Ot = C.Root, Ca = C.Group, Ut = C.Value, Le = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(
|
|
772
772
|
C.Trigger,
|
|
773
773
|
{
|
|
774
774
|
ref: s,
|
|
@@ -776,7 +776,7 @@ const Ut = C.Root, za = C.Group, Xt = C.Value, Ae = b(({ className: t, children:
|
|
|
776
776
|
"flex h-9 w-full items-center justify-between gap-2 rounded-md border border-line bg-surface px-3 text-sm text-fg",
|
|
777
777
|
"focus:outline-none focus:border-primary focus:ring-2 focus:ring-focus/30 disabled:cursor-not-allowed disabled:opacity-50",
|
|
778
778
|
"[&>span]:truncate",
|
|
779
|
-
|
|
779
|
+
a
|
|
780
780
|
),
|
|
781
781
|
...n,
|
|
782
782
|
children: [
|
|
@@ -785,11 +785,11 @@ const Ut = C.Root, za = C.Group, Xt = C.Value, Ae = b(({ className: t, children:
|
|
|
785
785
|
]
|
|
786
786
|
}
|
|
787
787
|
));
|
|
788
|
-
|
|
789
|
-
const
|
|
788
|
+
Le.displayName = "SelectTrigger";
|
|
789
|
+
const Ae = p(({ className: a, children: r, position: n = "popper", ...s }, o) => /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ e(
|
|
790
790
|
C.Content,
|
|
791
791
|
{
|
|
792
|
-
ref:
|
|
792
|
+
ref: o,
|
|
793
793
|
position: n,
|
|
794
794
|
className: l(
|
|
795
795
|
"z-50 min-w-[8rem] overflow-hidden rounded-lg border border-line bg-surface p-1 shadow-md",
|
|
@@ -799,20 +799,20 @@ const Be = b(({ className: t, children: r, position: n = "popper", ...s }, d) =>
|
|
|
799
799
|
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
800
800
|
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
801
801
|
"duration-150 ease-out",
|
|
802
|
-
|
|
802
|
+
a
|
|
803
803
|
),
|
|
804
804
|
...s,
|
|
805
805
|
children: /* @__PURE__ */ e(C.Viewport, { className: "p-0", children: r })
|
|
806
806
|
}
|
|
807
807
|
) }));
|
|
808
|
-
|
|
809
|
-
const Re =
|
|
808
|
+
Ae.displayName = "SelectContent";
|
|
809
|
+
const Re = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(
|
|
810
810
|
C.Item,
|
|
811
811
|
{
|
|
812
812
|
ref: s,
|
|
813
813
|
className: l(
|
|
814
814
|
"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-elevated data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
815
|
-
|
|
815
|
+
a
|
|
816
816
|
),
|
|
817
817
|
...n,
|
|
818
818
|
children: [
|
|
@@ -822,17 +822,17 @@ const Re = b(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ i(
|
|
|
822
822
|
}
|
|
823
823
|
));
|
|
824
824
|
Re.displayName = "SelectItem";
|
|
825
|
-
const
|
|
825
|
+
const Xt = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
826
826
|
C.Label,
|
|
827
827
|
{
|
|
828
828
|
ref: n,
|
|
829
|
-
className: l("px-2 py-1.5 text-xs font-medium text-subtle",
|
|
829
|
+
className: l("px-2 py-1.5 text-xs font-medium text-subtle", a),
|
|
830
830
|
...r
|
|
831
831
|
}
|
|
832
832
|
));
|
|
833
|
-
|
|
834
|
-
function
|
|
835
|
-
className:
|
|
833
|
+
Xt.displayName = "SelectLabel";
|
|
834
|
+
function Kt({
|
|
835
|
+
className: a,
|
|
836
836
|
...r
|
|
837
837
|
}) {
|
|
838
838
|
return /* @__PURE__ */ e(
|
|
@@ -840,14 +840,14 @@ function Jt({
|
|
|
840
840
|
{
|
|
841
841
|
className: l(
|
|
842
842
|
"w-full overflow-hidden rounded-(--table-radius-outer) bg-table-container p-(--table-inset)",
|
|
843
|
-
|
|
843
|
+
a
|
|
844
844
|
),
|
|
845
845
|
...r
|
|
846
846
|
}
|
|
847
847
|
);
|
|
848
848
|
}
|
|
849
|
-
function
|
|
850
|
-
className:
|
|
849
|
+
function Jt({
|
|
850
|
+
className: a,
|
|
851
851
|
...r
|
|
852
852
|
}) {
|
|
853
853
|
return /* @__PURE__ */ e(
|
|
@@ -855,79 +855,79 @@ function Qt({
|
|
|
855
855
|
{
|
|
856
856
|
className: l(
|
|
857
857
|
"overflow-hidden rounded-(--table-radius-panel) border border-table-panel-border bg-table-panel",
|
|
858
|
-
|
|
858
|
+
a
|
|
859
859
|
),
|
|
860
860
|
...r
|
|
861
861
|
}
|
|
862
862
|
);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function za({ className: a, ...r }) {
|
|
865
865
|
return /* @__PURE__ */ e(
|
|
866
866
|
"table",
|
|
867
867
|
{
|
|
868
|
-
className: l("w-full table-fixed border-collapse caption-bottom text-sm",
|
|
868
|
+
className: l("w-full table-fixed border-collapse caption-bottom text-sm", a),
|
|
869
869
|
...r
|
|
870
870
|
}
|
|
871
871
|
);
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
return /* @__PURE__ */ e("thead", { className:
|
|
873
|
+
function ka({ className: a, ...r }) {
|
|
874
|
+
return /* @__PURE__ */ e("thead", { className: a, ...r });
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
return /* @__PURE__ */ e("tbody", { className: l("[&_tr:last-child]:border-0",
|
|
876
|
+
function Qt({ className: a, ...r }) {
|
|
877
|
+
return /* @__PURE__ */ e("tbody", { className: l("[&_tr:last-child]:border-0", a), ...r });
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Yt({ className: a, ...r }) {
|
|
880
880
|
return /* @__PURE__ */ e(
|
|
881
881
|
"tr",
|
|
882
882
|
{
|
|
883
883
|
className: l(
|
|
884
884
|
"border-b border-table-panel-border transition-colors last:border-0 hover:bg-table-row-hover data-[state=selected]:bg-table-row-selected",
|
|
885
|
-
|
|
885
|
+
a
|
|
886
886
|
),
|
|
887
887
|
...r
|
|
888
888
|
}
|
|
889
889
|
);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Sa({ className: a, ...r }) {
|
|
892
892
|
return /* @__PURE__ */ e(
|
|
893
893
|
"th",
|
|
894
894
|
{
|
|
895
895
|
className: l(
|
|
896
896
|
"h-(--table-header-h) whitespace-nowrap px-(--table-pad-x) text-left align-middle text-[0.8125rem] font-medium text-table-header",
|
|
897
|
-
|
|
897
|
+
a
|
|
898
898
|
),
|
|
899
899
|
...r
|
|
900
900
|
}
|
|
901
901
|
);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function ce({ className: a, ...r }) {
|
|
904
904
|
return /* @__PURE__ */ e(
|
|
905
905
|
"td",
|
|
906
906
|
{
|
|
907
907
|
className: l(
|
|
908
908
|
"px-(--table-pad-x) py-3 align-middle text-sm text-table-row data-numeric:font-numeric data-numeric:tabular-nums",
|
|
909
|
-
|
|
909
|
+
a
|
|
910
910
|
),
|
|
911
911
|
...r
|
|
912
912
|
}
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
icon:
|
|
915
|
+
function Zt({
|
|
916
|
+
icon: a,
|
|
917
917
|
title: r,
|
|
918
918
|
description: n,
|
|
919
919
|
action: s,
|
|
920
|
-
className:
|
|
920
|
+
className: o
|
|
921
921
|
}) {
|
|
922
922
|
return /* @__PURE__ */ i(
|
|
923
923
|
"div",
|
|
924
924
|
{
|
|
925
925
|
className: l(
|
|
926
926
|
"flex min-h-[22rem] flex-col items-center justify-center gap-5 px-6 py-16 text-center",
|
|
927
|
-
|
|
927
|
+
o
|
|
928
928
|
),
|
|
929
929
|
children: [
|
|
930
|
-
|
|
930
|
+
a ? /* @__PURE__ */ e("div", { className: "flex size-[var(--table-empty-icon)] items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-table-muted [&_svg]:size-8", children: a }) : null,
|
|
931
931
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
932
932
|
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold leading-tight text-table-header-active", children: r }),
|
|
933
933
|
n ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: n }) : null
|
|
@@ -937,30 +937,30 @@ function ea({
|
|
|
937
937
|
}
|
|
938
938
|
);
|
|
939
939
|
}
|
|
940
|
-
const
|
|
940
|
+
const ea = {
|
|
941
941
|
default: "bg-table-container",
|
|
942
942
|
muted: "bg-surface border border-line",
|
|
943
943
|
transparent: "bg-transparent"
|
|
944
|
-
},
|
|
944
|
+
}, ta = {
|
|
945
945
|
default: "bg-table-panel border-table-panel-border",
|
|
946
946
|
muted: "bg-elevated border-line",
|
|
947
947
|
transparent: "bg-transparent border-line"
|
|
948
948
|
};
|
|
949
|
-
function
|
|
950
|
-
return typeof
|
|
949
|
+
function aa(a) {
|
|
950
|
+
return typeof a == "object" && a !== null && "label" in a && typeof a.label == "string";
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
header:
|
|
952
|
+
function ra({
|
|
953
|
+
header: a,
|
|
954
954
|
children: r,
|
|
955
955
|
action: n,
|
|
956
956
|
tone: s = "default",
|
|
957
|
-
className:
|
|
957
|
+
className: o,
|
|
958
958
|
headerClassName: u,
|
|
959
959
|
panelClassName: c,
|
|
960
960
|
minHeight: m
|
|
961
961
|
}) {
|
|
962
|
-
const h =
|
|
963
|
-
|
|
962
|
+
const h = aa(n) ? /* @__PURE__ */ e(
|
|
963
|
+
y,
|
|
964
964
|
{
|
|
965
965
|
variant: n.variant ?? "primary",
|
|
966
966
|
size: "xs",
|
|
@@ -974,16 +974,16 @@ function na({
|
|
|
974
974
|
] }) : n.label
|
|
975
975
|
}
|
|
976
976
|
) : n;
|
|
977
|
-
return /* @__PURE__ */ i(
|
|
977
|
+
return /* @__PURE__ */ i(Kt, { className: l("relative", ea[s], o), children: [
|
|
978
978
|
/* @__PURE__ */ i("div", { className: "overflow-x-auto", children: [
|
|
979
|
-
|
|
979
|
+
a ? (
|
|
980
980
|
// Header rows must not inherit the body row hover surface.
|
|
981
|
-
/* @__PURE__ */ e("div", { className: l("[--table-row-hover:transparent]", u), children:
|
|
981
|
+
/* @__PURE__ */ e("div", { className: l("[--table-row-hover:transparent]", u), children: a })
|
|
982
982
|
) : null,
|
|
983
983
|
/* @__PURE__ */ e(
|
|
984
|
-
|
|
984
|
+
Jt,
|
|
985
985
|
{
|
|
986
|
-
className: l(
|
|
986
|
+
className: l(ta[s], c),
|
|
987
987
|
style: m ? { minHeight: m } : void 0,
|
|
988
988
|
children: r
|
|
989
989
|
}
|
|
@@ -992,266 +992,266 @@ function na({
|
|
|
992
992
|
h ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: h }) }) : null
|
|
993
993
|
] });
|
|
994
994
|
}
|
|
995
|
-
const
|
|
996
|
-
function
|
|
997
|
-
return
|
|
995
|
+
const na = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium";
|
|
996
|
+
function la(a) {
|
|
997
|
+
return a.split(/\s+/).slice(0, 2).map((r) => {
|
|
998
998
|
var n;
|
|
999
999
|
return ((n = r[0]) == null ? void 0 : n.toUpperCase()) ?? "";
|
|
1000
1000
|
}).join("");
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
name:
|
|
1002
|
+
function Da({
|
|
1003
|
+
name: a,
|
|
1004
1004
|
secondary: r,
|
|
1005
1005
|
image: n
|
|
1006
1006
|
}) {
|
|
1007
1007
|
return /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
|
|
1008
|
-
/* @__PURE__ */ i(
|
|
1009
|
-
n ? /* @__PURE__ */ e(
|
|
1010
|
-
/* @__PURE__ */ e(je, { children:
|
|
1008
|
+
/* @__PURE__ */ i(Te, { className: "size-8", children: [
|
|
1009
|
+
n ? /* @__PURE__ */ e(Ie, { src: n, alt: "" }) : null,
|
|
1010
|
+
/* @__PURE__ */ e(je, { children: la(a) })
|
|
1011
1011
|
] }),
|
|
1012
1012
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
1013
|
-
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children:
|
|
1013
|
+
/* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: a }),
|
|
1014
1014
|
r ? /* @__PURE__ */ e("div", { className: "truncate text-xs text-table-muted", children: r }) : null
|
|
1015
1015
|
] })
|
|
1016
1016
|
] });
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1019
|
-
rows:
|
|
1018
|
+
function Ta({
|
|
1019
|
+
rows: a,
|
|
1020
1020
|
columns: r,
|
|
1021
1021
|
getRowId: n,
|
|
1022
1022
|
loading: s = !1,
|
|
1023
|
-
error:
|
|
1023
|
+
error: o,
|
|
1024
1024
|
empty: u,
|
|
1025
1025
|
search: c,
|
|
1026
1026
|
filters: m,
|
|
1027
1027
|
toolbarStart: h,
|
|
1028
|
-
toolbarEnd:
|
|
1029
|
-
tabs:
|
|
1030
|
-
activeTab:
|
|
1028
|
+
toolbarEnd: g,
|
|
1029
|
+
tabs: v,
|
|
1030
|
+
activeTab: j,
|
|
1031
1031
|
onTabChange: k,
|
|
1032
1032
|
infoBanner: S,
|
|
1033
|
-
selectable:
|
|
1034
|
-
bulkActions:
|
|
1033
|
+
selectable: w = !1,
|
|
1034
|
+
bulkActions: M,
|
|
1035
1035
|
rowActions: N,
|
|
1036
|
-
onRowClick:
|
|
1037
|
-
defaultSort:
|
|
1036
|
+
onRowClick: R,
|
|
1037
|
+
defaultSort: W,
|
|
1038
1038
|
pageSize: B = 25,
|
|
1039
|
-
pageSizeOptions:
|
|
1040
|
-
tone:
|
|
1041
|
-
headerAction:
|
|
1039
|
+
pageSizeOptions: E = [10, 25, 50, 100],
|
|
1040
|
+
tone: O,
|
|
1041
|
+
headerAction: re,
|
|
1042
1042
|
headerClassName: U,
|
|
1043
|
-
panelClassName:
|
|
1044
|
-
className:
|
|
1043
|
+
panelClassName: Be,
|
|
1044
|
+
className: Fe
|
|
1045
1045
|
}) {
|
|
1046
|
-
const [fe,
|
|
1046
|
+
const [fe, xe] = T(
|
|
1047
1047
|
() => Object.fromEntries(
|
|
1048
|
-
r.filter((
|
|
1048
|
+
r.filter((t) => t.defaultHidden && !t.required).map((t) => [t.id, !0])
|
|
1049
1049
|
)
|
|
1050
|
-
), [f, $e] =
|
|
1051
|
-
|
|
1052
|
-
), [
|
|
1053
|
-
let
|
|
1054
|
-
for (const
|
|
1055
|
-
|
|
1056
|
-
if (!c || !c.value.trim()) return
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1059
|
-
}, [
|
|
1050
|
+
), [f, $e] = T(
|
|
1051
|
+
W ?? null
|
|
1052
|
+
), [F, X] = T(0), [L, He] = T(B), [A, ne] = T(/* @__PURE__ */ new Set()), [Ge, le] = T([]), _ = r.filter((t) => !fe[t.id]), ge = r.filter((t) => fe[t.id] && !t.required), ie = (m ?? []).filter((t) => Ge.includes(t.id)), qe = (m ?? []).map((t) => `${t.id}:${t.value.join(",")}`).join("|"), K = we(() => {
|
|
1053
|
+
let t = a;
|
|
1054
|
+
for (const b of m ?? [])
|
|
1055
|
+
b.value.length > 0 && (t = t.filter((x) => b.match(x, b.value)));
|
|
1056
|
+
if (!c || !c.value.trim()) return t;
|
|
1057
|
+
const d = c.value.trim().toLowerCase();
|
|
1058
|
+
return t.filter((b) => c.keys(b).toLowerCase().includes(d));
|
|
1059
|
+
}, [a, c, m]), $ = we(() => {
|
|
1060
1060
|
if (!f) return K;
|
|
1061
|
-
const
|
|
1062
|
-
if (!(
|
|
1063
|
-
const
|
|
1064
|
-
return [...K].sort((
|
|
1065
|
-
const
|
|
1066
|
-
return
|
|
1061
|
+
const t = r.find((b) => b.id === f.id);
|
|
1062
|
+
if (!(t != null && t.sortValue)) return K;
|
|
1063
|
+
const d = f.dir === "asc" ? 1 : -1;
|
|
1064
|
+
return [...K].sort((b, x) => {
|
|
1065
|
+
const D = t.sortValue(b), G = t.sortValue(x);
|
|
1066
|
+
return D == null && G == null ? 0 : D == null ? 1 : G == null ? -1 : typeof D == "number" && typeof G == "number" ? (D - G) * d : String(D).localeCompare(String(G)) * d;
|
|
1067
1067
|
});
|
|
1068
|
-
}, [K, f, r]), H = Math.max(1, Math.ceil(
|
|
1068
|
+
}, [K, f, r]), H = Math.max(1, Math.ceil($.length / L));
|
|
1069
1069
|
Ce(() => {
|
|
1070
1070
|
X(0);
|
|
1071
|
-
}, [c == null ? void 0 : c.value, L, f == null ? void 0 : f.id, f == null ? void 0 : f.dir,
|
|
1072
|
-
|
|
1073
|
-
}, [
|
|
1074
|
-
const J =
|
|
1075
|
-
|
|
1076
|
-
(
|
|
1071
|
+
}, [c == null ? void 0 : c.value, L, f == null ? void 0 : f.id, f == null ? void 0 : f.dir, j, qe]), Ce(() => {
|
|
1072
|
+
F > H - 1 && X(H - 1);
|
|
1073
|
+
}, [F, H]);
|
|
1074
|
+
const J = F * L, P = $.slice(J, J + L), Ve = (t) => {
|
|
1075
|
+
t.sortable && $e(
|
|
1076
|
+
(d) => (d == null ? void 0 : d.id) === t.id ? d.dir === "asc" ? { id: t.id, dir: "desc" } : null : { id: t.id, dir: "asc" }
|
|
1077
1077
|
);
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1081
|
-
return
|
|
1078
|
+
}, ve = P.length > 0 && P.every((t) => A.has(n(t))), We = P.some((t) => A.has(n(t))), Oe = a.filter((t) => A.has(n(t))), Ue = () => {
|
|
1079
|
+
ne((t) => {
|
|
1080
|
+
const d = new Set(t);
|
|
1081
|
+
return ve ? P.forEach((b) => d.delete(n(b))) : P.forEach((b) => d.add(n(b))), d;
|
|
1082
1082
|
});
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
return
|
|
1083
|
+
}, Xe = (t) => {
|
|
1084
|
+
ne((d) => {
|
|
1085
|
+
const b = new Set(d);
|
|
1086
|
+
return b.has(t) ? b.delete(t) : b.add(t), b;
|
|
1087
1087
|
});
|
|
1088
|
-
},
|
|
1089
|
-
...
|
|
1090
|
-
...
|
|
1088
|
+
}, Ke = !!(c || m != null && m.length || h || g), Je = _.some((t) => t.width), Qe = _.length > 1 ? 70 / (_.length - 1) : 100, Ye = _.map((t, d) => t.width ? t.width : Je ? "auto" : `${d === 0 ? 30 : Qe}%`), Ne = [
|
|
1089
|
+
...w ? ["2.75rem"] : [],
|
|
1090
|
+
...Ye,
|
|
1091
1091
|
...N ? ["11rem"] : []
|
|
1092
|
-
],
|
|
1093
|
-
return /* @__PURE__ */ i("div", { className: l("space-y-4",
|
|
1094
|
-
|
|
1095
|
-
const
|
|
1092
|
+
], Ze = (t) => (f == null ? void 0 : f.id) === t.id ? f.dir === "asc" ? "ascending" : "descending" : void 0;
|
|
1093
|
+
return /* @__PURE__ */ i("div", { className: l("space-y-4", Fe), children: [
|
|
1094
|
+
v && v.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: v.map((t) => {
|
|
1095
|
+
const d = t.id === j;
|
|
1096
1096
|
return /* @__PURE__ */ e(
|
|
1097
1097
|
"button",
|
|
1098
1098
|
{
|
|
1099
1099
|
type: "button",
|
|
1100
1100
|
role: "tab",
|
|
1101
|
-
"aria-selected":
|
|
1102
|
-
onClick: () => k == null ? void 0 : k(
|
|
1101
|
+
"aria-selected": d,
|
|
1102
|
+
onClick: () => k == null ? void 0 : k(t.id),
|
|
1103
1103
|
className: l(
|
|
1104
1104
|
"-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
|
|
1105
|
-
|
|
1105
|
+
d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
|
|
1106
1106
|
),
|
|
1107
|
-
children:
|
|
1107
|
+
children: t.label
|
|
1108
1108
|
},
|
|
1109
|
-
|
|
1109
|
+
t.id
|
|
1110
1110
|
);
|
|
1111
1111
|
}) }),
|
|
1112
|
-
|
|
1112
|
+
Ke && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1113
1113
|
c && /* @__PURE__ */ e(
|
|
1114
1114
|
Ee,
|
|
1115
1115
|
{
|
|
1116
|
-
size: "sm",
|
|
1117
1116
|
type: "search",
|
|
1118
1117
|
"aria-label": c.placeholder ?? "Search",
|
|
1119
1118
|
placeholder: c.placeholder ?? "Search...",
|
|
1120
1119
|
value: c.value,
|
|
1121
|
-
onChange: (
|
|
1120
|
+
onChange: (t) => c.onChange(t.target.value),
|
|
1122
1121
|
onClear: () => c.onChange(""),
|
|
1123
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1122
|
+
leadingIcon: /* @__PURE__ */ e(ot, {}),
|
|
1124
1123
|
containerClassName: "w-full sm:w-[280px]",
|
|
1125
1124
|
className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
|
|
1126
1125
|
}
|
|
1127
1126
|
),
|
|
1128
1127
|
h,
|
|
1129
|
-
/* @__PURE__ */ i(
|
|
1130
|
-
/* @__PURE__ */ e(
|
|
1131
|
-
|
|
1128
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
1129
|
+
/* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1130
|
+
y,
|
|
1132
1131
|
{
|
|
1133
1132
|
variant: "secondary",
|
|
1134
|
-
size: "
|
|
1135
|
-
leadingIcon: /* @__PURE__ */ e(
|
|
1133
|
+
size: "md",
|
|
1134
|
+
leadingIcon: /* @__PURE__ */ e(dt, {}),
|
|
1136
1135
|
trailingIcon: /* @__PURE__ */ e(Q, {}),
|
|
1137
|
-
className: Se,
|
|
1138
1136
|
children: "Columns"
|
|
1139
1137
|
}
|
|
1140
1138
|
) }),
|
|
1141
1139
|
/* @__PURE__ */ i(Y, { align: "end", className: "w-54", children: [
|
|
1142
1140
|
/* @__PURE__ */ e(ee, { className: "text-[13px]", children: "Active columns" }),
|
|
1143
|
-
_.map((
|
|
1141
|
+
_.map((t) => /* @__PURE__ */ i(
|
|
1144
1142
|
Z,
|
|
1145
1143
|
{
|
|
1146
1144
|
checked: !0,
|
|
1147
|
-
disabled:
|
|
1148
|
-
onCheckedChange: () =>
|
|
1149
|
-
onSelect: (
|
|
1145
|
+
disabled: t.required,
|
|
1146
|
+
onCheckedChange: () => xe((d) => ({ ...d, [t.id]: !0 })),
|
|
1147
|
+
onSelect: (d) => d.preventDefault(),
|
|
1150
1148
|
className: "justify-between",
|
|
1151
1149
|
children: [
|
|
1152
|
-
/* @__PURE__ */ e("span", { children:
|
|
1153
|
-
|
|
1150
|
+
/* @__PURE__ */ e("span", { children: t.header }),
|
|
1151
|
+
t.required ? /* @__PURE__ */ e(ct, { className: "size-3.5 text-subtle", "aria-hidden": !0 }) : null
|
|
1154
1152
|
]
|
|
1155
1153
|
},
|
|
1156
|
-
|
|
1154
|
+
t.id
|
|
1157
1155
|
)),
|
|
1158
|
-
|
|
1159
|
-
/* @__PURE__ */ e(
|
|
1156
|
+
ge.length > 0 ? /* @__PURE__ */ i(Se, { children: [
|
|
1157
|
+
/* @__PURE__ */ e(be, {}),
|
|
1160
1158
|
/* @__PURE__ */ e(ee, { className: "text-[13px]", children: "Available columns" }),
|
|
1161
|
-
|
|
1159
|
+
ge.map((t) => /* @__PURE__ */ e(
|
|
1162
1160
|
Z,
|
|
1163
1161
|
{
|
|
1164
1162
|
checked: !1,
|
|
1165
|
-
onCheckedChange: () =>
|
|
1166
|
-
onSelect: (
|
|
1167
|
-
children:
|
|
1163
|
+
onCheckedChange: () => xe((d) => ({ ...d, [t.id]: !1 })),
|
|
1164
|
+
onSelect: (d) => d.preventDefault(),
|
|
1165
|
+
children: t.header
|
|
1168
1166
|
},
|
|
1169
|
-
|
|
1167
|
+
t.id
|
|
1170
1168
|
))
|
|
1171
1169
|
] }) : null
|
|
1172
1170
|
] })
|
|
1173
1171
|
] }),
|
|
1174
|
-
m && m.length > 0 ? /* @__PURE__ */ i(
|
|
1175
|
-
/* @__PURE__ */ e(
|
|
1176
|
-
|
|
1172
|
+
m && m.length > 0 ? /* @__PURE__ */ i(oe, { children: [
|
|
1173
|
+
/* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1174
|
+
y,
|
|
1177
1175
|
{
|
|
1178
1176
|
variant: "secondary",
|
|
1179
|
-
size: "
|
|
1177
|
+
size: "md",
|
|
1180
1178
|
iconOnly: !0,
|
|
1181
1179
|
"aria-label": "Add filter",
|
|
1182
|
-
className: Se,
|
|
1183
1180
|
children: /* @__PURE__ */ e(ye, {})
|
|
1184
1181
|
}
|
|
1185
1182
|
) }),
|
|
1186
|
-
/* @__PURE__ */ e(Y, { align: "start", className: "w-54", children: m.map((
|
|
1187
|
-
|
|
1183
|
+
/* @__PURE__ */ e(Y, { align: "start", className: "w-54", children: m.map((t) => /* @__PURE__ */ e(
|
|
1184
|
+
ue,
|
|
1188
1185
|
{
|
|
1189
|
-
onSelect: () =>
|
|
1190
|
-
(
|
|
1186
|
+
onSelect: () => le(
|
|
1187
|
+
(d) => d.includes(t.id) ? d : [...d, t.id]
|
|
1191
1188
|
),
|
|
1192
|
-
children:
|
|
1189
|
+
children: t.label
|
|
1193
1190
|
},
|
|
1194
|
-
|
|
1191
|
+
t.id
|
|
1195
1192
|
)) })
|
|
1196
1193
|
] }) : null,
|
|
1197
|
-
|
|
1194
|
+
g ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: g }) : null
|
|
1198
1195
|
] }),
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
size: "sm",
|
|
1206
|
-
className: "rounded-[6px] bg-surface shadow-xs",
|
|
1207
|
-
children: [
|
|
1208
|
-
/* @__PURE__ */ e(ye, {}),
|
|
1209
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children: a.label }),
|
|
1210
|
-
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1211
|
-
/* @__PURE__ */ e("span", { className: "text-muted", children: a.value.length > 0 ? `${a.value.length} selected` : "Enter value" }),
|
|
1212
|
-
/* @__PURE__ */ e(Q, { className: "text-muted" })
|
|
1213
|
-
]
|
|
1214
|
-
}
|
|
1215
|
-
) }),
|
|
1216
|
-
/* @__PURE__ */ i(Y, { align: "start", className: "w-56", children: [
|
|
1217
|
-
/* @__PURE__ */ i(ee, { className: "text-[13px]", children: [
|
|
1218
|
-
"Filter by ",
|
|
1219
|
-
a.label
|
|
1220
|
-
] }),
|
|
1221
|
-
a.options.map((o) => {
|
|
1222
|
-
const p = a.value.includes(o.value);
|
|
1223
|
-
return /* @__PURE__ */ e(
|
|
1224
|
-
Z,
|
|
1225
|
-
{
|
|
1226
|
-
checked: p,
|
|
1227
|
-
onCheckedChange: () => a.onChange(
|
|
1228
|
-
p ? a.value.filter((v) => v !== o.value) : [...a.value, o.value]
|
|
1229
|
-
),
|
|
1230
|
-
onSelect: (v) => v.preventDefault(),
|
|
1231
|
-
children: o.label
|
|
1232
|
-
},
|
|
1233
|
-
o.value
|
|
1234
|
-
);
|
|
1235
|
-
}),
|
|
1236
|
-
/* @__PURE__ */ e(ue, {}),
|
|
1196
|
+
ie.length > 0 ? /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1197
|
+
ie.map((t) => {
|
|
1198
|
+
const d = () => {
|
|
1199
|
+
t.onChange([]), le((b) => b.filter((x) => x !== t.id));
|
|
1200
|
+
};
|
|
1201
|
+
return /* @__PURE__ */ i("div", { className: "inline-flex items-center", children: [
|
|
1237
1202
|
/* @__PURE__ */ e(
|
|
1238
|
-
|
|
1203
|
+
y,
|
|
1239
1204
|
{
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1205
|
+
variant: "secondary",
|
|
1206
|
+
size: "md",
|
|
1207
|
+
iconOnly: !0,
|
|
1208
|
+
"aria-label": `Remove ${t.label} filter`,
|
|
1209
|
+
className: "rounded-r-none",
|
|
1210
|
+
onClick: d,
|
|
1211
|
+
children: /* @__PURE__ */ e(te, {})
|
|
1244
1212
|
}
|
|
1245
|
-
)
|
|
1246
|
-
|
|
1247
|
-
|
|
1213
|
+
),
|
|
1214
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
1215
|
+
/* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ i(y, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
|
|
1216
|
+
/* @__PURE__ */ e(ye, {}),
|
|
1217
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: t.label }),
|
|
1218
|
+
/* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
|
|
1219
|
+
/* @__PURE__ */ e("span", { className: "text-muted", children: t.value.length > 0 ? `${t.value.length} selected` : "Enter value" }),
|
|
1220
|
+
/* @__PURE__ */ e(Q, { className: "text-muted" })
|
|
1221
|
+
] }) }),
|
|
1222
|
+
/* @__PURE__ */ i(Y, { align: "start", className: "w-56", children: [
|
|
1223
|
+
/* @__PURE__ */ i(ee, { className: "text-[13px]", children: [
|
|
1224
|
+
"Filter by ",
|
|
1225
|
+
t.label
|
|
1226
|
+
] }),
|
|
1227
|
+
t.options.map((b) => {
|
|
1228
|
+
const x = t.value.includes(b.value);
|
|
1229
|
+
return /* @__PURE__ */ e(
|
|
1230
|
+
Z,
|
|
1231
|
+
{
|
|
1232
|
+
checked: x,
|
|
1233
|
+
onCheckedChange: () => t.onChange(
|
|
1234
|
+
x ? t.value.filter((D) => D !== b.value) : [...t.value, b.value]
|
|
1235
|
+
),
|
|
1236
|
+
onSelect: (D) => D.preventDefault(),
|
|
1237
|
+
children: b.label
|
|
1238
|
+
},
|
|
1239
|
+
b.value
|
|
1240
|
+
);
|
|
1241
|
+
}),
|
|
1242
|
+
/* @__PURE__ */ e(be, {}),
|
|
1243
|
+
/* @__PURE__ */ e(ue, { onSelect: d, children: "Clear filter" })
|
|
1244
|
+
] })
|
|
1245
|
+
] })
|
|
1246
|
+
] }, t.id);
|
|
1247
|
+
}),
|
|
1248
1248
|
/* @__PURE__ */ e(
|
|
1249
1249
|
"button",
|
|
1250
1250
|
{
|
|
1251
1251
|
type: "button",
|
|
1252
1252
|
onClick: () => {
|
|
1253
|
-
for (const
|
|
1254
|
-
|
|
1253
|
+
for (const t of ie) t.onChange([]);
|
|
1254
|
+
le([]);
|
|
1255
1255
|
},
|
|
1256
1256
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1257
1257
|
children: "Clear filters"
|
|
@@ -1259,99 +1259,99 @@ function Ia({
|
|
|
1259
1259
|
)
|
|
1260
1260
|
] }) : null,
|
|
1261
1261
|
S,
|
|
1262
|
-
|
|
1262
|
+
w && A.size > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
|
|
1263
1263
|
/* @__PURE__ */ i("span", { className: "font-medium text-fg", children: [
|
|
1264
|
-
|
|
1264
|
+
A.size,
|
|
1265
1265
|
" selected"
|
|
1266
1266
|
] }),
|
|
1267
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (
|
|
1268
|
-
|
|
1267
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (M ?? []).map((t) => /* @__PURE__ */ i(
|
|
1268
|
+
y,
|
|
1269
1269
|
{
|
|
1270
|
-
size: "
|
|
1271
|
-
variant:
|
|
1272
|
-
disabled:
|
|
1273
|
-
onClick: () => void
|
|
1270
|
+
size: "md",
|
|
1271
|
+
variant: t.variant ?? "outline",
|
|
1272
|
+
disabled: t.disabled,
|
|
1273
|
+
onClick: () => void t.onRun(Oe),
|
|
1274
1274
|
children: [
|
|
1275
|
-
|
|
1276
|
-
|
|
1275
|
+
t.icon,
|
|
1276
|
+
t.label
|
|
1277
1277
|
]
|
|
1278
1278
|
},
|
|
1279
|
-
|
|
1279
|
+
t.label
|
|
1280
1280
|
)) }),
|
|
1281
1281
|
/* @__PURE__ */ i(
|
|
1282
1282
|
"button",
|
|
1283
1283
|
{
|
|
1284
1284
|
type: "button",
|
|
1285
|
-
onClick: () =>
|
|
1285
|
+
onClick: () => ne(/* @__PURE__ */ new Set()),
|
|
1286
1286
|
className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
|
|
1287
1287
|
children: [
|
|
1288
|
-
/* @__PURE__ */ e(
|
|
1288
|
+
/* @__PURE__ */ e(te, { className: "size-3.5" }),
|
|
1289
1289
|
"Clear"
|
|
1290
1290
|
]
|
|
1291
1291
|
}
|
|
1292
1292
|
)
|
|
1293
1293
|
] }),
|
|
1294
1294
|
/* @__PURE__ */ e(
|
|
1295
|
-
|
|
1295
|
+
ra,
|
|
1296
1296
|
{
|
|
1297
|
-
action:
|
|
1298
|
-
tone:
|
|
1297
|
+
action: re,
|
|
1298
|
+
tone: O,
|
|
1299
1299
|
headerClassName: U,
|
|
1300
|
-
panelClassName:
|
|
1300
|
+
panelClassName: Be,
|
|
1301
1301
|
header: (
|
|
1302
1302
|
// Visible header: presentational so its controls stay focusable while
|
|
1303
1303
|
// the body table carries the semantic column headers (sr-only).
|
|
1304
1304
|
/* @__PURE__ */ i("table", { role: "presentation", className: "w-full table-fixed border-collapse", children: [
|
|
1305
|
-
/* @__PURE__ */ e("colgroup", { children: Ne.map((
|
|
1305
|
+
/* @__PURE__ */ e("colgroup", { children: Ne.map((t, d) => /* @__PURE__ */ e("col", { style: { width: t } }, d)) }),
|
|
1306
1306
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
1307
|
-
|
|
1308
|
-
|
|
1307
|
+
w && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-4 align-middle", children: /* @__PURE__ */ e(
|
|
1308
|
+
me,
|
|
1309
1309
|
{
|
|
1310
1310
|
"aria-label": "Select all rows",
|
|
1311
|
-
checked:
|
|
1312
|
-
onCheckedChange:
|
|
1311
|
+
checked: ve ? !0 : We ? "indeterminate" : !1,
|
|
1312
|
+
onCheckedChange: Ue
|
|
1313
1313
|
}
|
|
1314
1314
|
) }),
|
|
1315
|
-
_.map((
|
|
1315
|
+
_.map((t) => /* @__PURE__ */ e(
|
|
1316
1316
|
"th",
|
|
1317
1317
|
{
|
|
1318
|
-
className: l(
|
|
1319
|
-
children:
|
|
1320
|
-
|
|
1318
|
+
className: l(na, t.align === "right" && "text-right", t.className),
|
|
1319
|
+
children: t.sortable ? /* @__PURE__ */ i(
|
|
1320
|
+
y,
|
|
1321
1321
|
{
|
|
1322
1322
|
type: "button",
|
|
1323
1323
|
variant: "ghost",
|
|
1324
1324
|
size: "xs",
|
|
1325
|
-
"aria-label": `Sort by ${
|
|
1326
|
-
onClick: () =>
|
|
1325
|
+
"aria-label": `Sort by ${t.header}`,
|
|
1326
|
+
onClick: () => Ve(t),
|
|
1327
1327
|
className: l(
|
|
1328
1328
|
"h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
|
|
1329
1329
|
"hover:bg-transparent hover:text-table-header-active hover:shadow-none",
|
|
1330
1330
|
"active:scale-100 active:bg-transparent active:shadow-none",
|
|
1331
|
-
(f == null ? void 0 : f.id) ===
|
|
1331
|
+
(f == null ? void 0 : f.id) === t.id && "text-table-header-active"
|
|
1332
1332
|
),
|
|
1333
1333
|
children: [
|
|
1334
|
-
|
|
1335
|
-
(f == null ? void 0 : f.id) ===
|
|
1334
|
+
t.header,
|
|
1335
|
+
(f == null ? void 0 : f.id) === t.id ? f.dir === "asc" ? /* @__PURE__ */ e(ut, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Q, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(bt, { className: "size-3.5 opacity-50" })
|
|
1336
1336
|
]
|
|
1337
1337
|
}
|
|
1338
|
-
) :
|
|
1338
|
+
) : t.header
|
|
1339
1339
|
},
|
|
1340
|
-
|
|
1340
|
+
t.id
|
|
1341
1341
|
)),
|
|
1342
|
-
N && /* @__PURE__ */ e("th", { className: "h-
|
|
1342
|
+
N && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1343
1343
|
] }) })
|
|
1344
1344
|
] })
|
|
1345
1345
|
),
|
|
1346
|
-
children: s ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((
|
|
1347
|
-
/* @__PURE__ */ e("div", { className: "flex size-
|
|
1346
|
+
children: s ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((t) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, t)) }) : o ? /* @__PURE__ */ i("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
|
|
1347
|
+
/* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(mt, { weight: "duotone" }) }),
|
|
1348
1348
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
1349
|
-
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children:
|
|
1350
|
-
|
|
1349
|
+
/* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: o.title }),
|
|
1350
|
+
o.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: o.description }) : null
|
|
1351
1351
|
] }),
|
|
1352
|
-
|
|
1353
|
-
] }) :
|
|
1354
|
-
|
|
1352
|
+
o.action
|
|
1353
|
+
] }) : P.length === 0 ? /* @__PURE__ */ e(
|
|
1354
|
+
Zt,
|
|
1355
1355
|
{
|
|
1356
1356
|
icon: u == null ? void 0 : u.icon,
|
|
1357
1357
|
title: (u == null ? void 0 : u.title) ?? "No results",
|
|
@@ -1359,80 +1359,80 @@ function Ia({
|
|
|
1359
1359
|
action: u == null ? void 0 : u.action
|
|
1360
1360
|
}
|
|
1361
1361
|
) : /* @__PURE__ */ i("table", { className: "w-full table-fixed border-collapse", children: [
|
|
1362
|
-
/* @__PURE__ */ e("colgroup", { children: Ne.map((
|
|
1362
|
+
/* @__PURE__ */ e("colgroup", { children: Ne.map((t, d) => /* @__PURE__ */ e("col", { style: { width: t } }, d)) }),
|
|
1363
1363
|
/* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ i("tr", { children: [
|
|
1364
|
-
|
|
1365
|
-
_.map((
|
|
1364
|
+
w && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
|
|
1365
|
+
_.map((t) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": Ze(t), children: t.header }, t.id)),
|
|
1366
1366
|
N && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
|
|
1367
1367
|
] }) }),
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1369
|
-
const
|
|
1368
|
+
/* @__PURE__ */ e(Qt, { children: P.map((t) => {
|
|
1369
|
+
const d = n(t), b = A.has(d);
|
|
1370
1370
|
return /* @__PURE__ */ i(
|
|
1371
|
-
|
|
1371
|
+
Yt,
|
|
1372
1372
|
{
|
|
1373
|
-
"data-state":
|
|
1374
|
-
onClick:
|
|
1375
|
-
className:
|
|
1373
|
+
"data-state": b ? "selected" : void 0,
|
|
1374
|
+
onClick: R ? () => R(t) : void 0,
|
|
1375
|
+
className: R ? "cursor-pointer" : void 0,
|
|
1376
1376
|
children: [
|
|
1377
|
-
|
|
1378
|
-
|
|
1377
|
+
w && /* @__PURE__ */ e(ce, { className: "w-11 px-4", onClick: (x) => x.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1378
|
+
me,
|
|
1379
1379
|
{
|
|
1380
1380
|
"aria-label": "Select row",
|
|
1381
|
-
checked:
|
|
1382
|
-
onCheckedChange: () =>
|
|
1381
|
+
checked: b,
|
|
1382
|
+
onCheckedChange: () => Xe(d)
|
|
1383
1383
|
}
|
|
1384
1384
|
) }),
|
|
1385
|
-
_.map((
|
|
1386
|
-
|
|
1385
|
+
_.map((x) => /* @__PURE__ */ e(
|
|
1386
|
+
ce,
|
|
1387
1387
|
{
|
|
1388
|
-
"data-numeric":
|
|
1389
|
-
className: l(
|
|
1390
|
-
children:
|
|
1388
|
+
"data-numeric": x.numeric ? "" : void 0,
|
|
1389
|
+
className: l(x.align === "right" && "text-right", x.className),
|
|
1390
|
+
children: x.cell(t)
|
|
1391
1391
|
},
|
|
1392
|
-
|
|
1392
|
+
x.id
|
|
1393
1393
|
)),
|
|
1394
|
-
N && /* @__PURE__ */ e(
|
|
1394
|
+
N && /* @__PURE__ */ e(ce, { className: "w-44 px-4 text-right", onClick: (x) => x.stopPropagation(), children: N(t) })
|
|
1395
1395
|
]
|
|
1396
1396
|
},
|
|
1397
|
-
|
|
1397
|
+
d
|
|
1398
1398
|
);
|
|
1399
1399
|
}) })
|
|
1400
1400
|
] })
|
|
1401
1401
|
}
|
|
1402
1402
|
),
|
|
1403
|
-
!s && !
|
|
1403
|
+
!s && !o && $.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
|
|
1404
1404
|
/* @__PURE__ */ i("span", { className: "text-muted", children: [
|
|
1405
1405
|
J + 1,
|
|
1406
1406
|
"–",
|
|
1407
|
-
Math.min(J + L,
|
|
1407
|
+
Math.min(J + L, $.length),
|
|
1408
1408
|
" of ",
|
|
1409
|
-
|
|
1409
|
+
$.length
|
|
1410
1410
|
] }),
|
|
1411
1411
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
1412
|
-
/* @__PURE__ */ i(
|
|
1413
|
-
/* @__PURE__ */ e(
|
|
1414
|
-
/* @__PURE__ */ e(
|
|
1415
|
-
|
|
1412
|
+
/* @__PURE__ */ i(Ot, { value: String(L), onValueChange: (t) => He(Number(t)), children: [
|
|
1413
|
+
/* @__PURE__ */ e(Le, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ e(Ut, {}) }),
|
|
1414
|
+
/* @__PURE__ */ e(Ae, { children: E.map((t) => /* @__PURE__ */ i(Re, { value: String(t), children: [
|
|
1415
|
+
t,
|
|
1416
1416
|
" / page"
|
|
1417
|
-
] },
|
|
1417
|
+
] }, t)) })
|
|
1418
1418
|
] }),
|
|
1419
1419
|
/* @__PURE__ */ e(
|
|
1420
|
-
|
|
1420
|
+
y,
|
|
1421
1421
|
{
|
|
1422
1422
|
variant: "outline",
|
|
1423
|
-
size: "
|
|
1424
|
-
disabled:
|
|
1425
|
-
onClick: () => X((
|
|
1423
|
+
size: "md",
|
|
1424
|
+
disabled: F <= 0,
|
|
1425
|
+
onClick: () => X((t) => Math.max(0, t - 1)),
|
|
1426
1426
|
children: "Previous"
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
1429
|
/* @__PURE__ */ e(
|
|
1430
|
-
|
|
1430
|
+
y,
|
|
1431
1431
|
{
|
|
1432
1432
|
variant: "outline",
|
|
1433
|
-
size: "
|
|
1434
|
-
disabled:
|
|
1435
|
-
onClick: () => X((
|
|
1433
|
+
size: "md",
|
|
1434
|
+
disabled: F >= H - 1,
|
|
1435
|
+
onClick: () => X((t) => Math.min(H - 1, t + 1)),
|
|
1436
1436
|
children: "Next"
|
|
1437
1437
|
}
|
|
1438
1438
|
)
|
|
@@ -1440,16 +1440,16 @@ function Ia({
|
|
|
1440
1440
|
] })
|
|
1441
1441
|
] });
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function Ia({ icon: a, title: r, description: n, action: s, className: o }) {
|
|
1444
1444
|
return /* @__PURE__ */ i(
|
|
1445
1445
|
"div",
|
|
1446
1446
|
{
|
|
1447
1447
|
className: l(
|
|
1448
1448
|
"flex flex-col items-center justify-center gap-4 rounded-card border border-line bg-surface px-6 py-16 text-center",
|
|
1449
|
-
|
|
1449
|
+
o
|
|
1450
1450
|
),
|
|
1451
1451
|
children: [
|
|
1452
|
-
|
|
1452
|
+
a ? /* @__PURE__ */ e("div", { className: "flex size-11 items-center justify-center rounded-xl border border-line bg-elevated text-subtle [&_svg]:size-6", children: a }) : null,
|
|
1453
1453
|
/* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
1454
1454
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: r }),
|
|
1455
1455
|
n ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-sm text-sm text-muted", children: n }) : null
|
|
@@ -1459,39 +1459,39 @@ function _a({ icon: t, title: r, description: n, action: s, className: d }) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
);
|
|
1461
1461
|
}
|
|
1462
|
-
function ja({ className:
|
|
1462
|
+
function ja({ className: a, ...r }) {
|
|
1463
1463
|
return /* @__PURE__ */ e(
|
|
1464
1464
|
"kbd",
|
|
1465
1465
|
{
|
|
1466
1466
|
className: l(
|
|
1467
1467
|
"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",
|
|
1468
|
-
|
|
1468
|
+
a
|
|
1469
1469
|
),
|
|
1470
1470
|
...r
|
|
1471
1471
|
}
|
|
1472
1472
|
);
|
|
1473
1473
|
}
|
|
1474
|
-
const ia =
|
|
1475
|
-
|
|
1474
|
+
const ia = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
|
|
1475
|
+
vt.Root,
|
|
1476
1476
|
{
|
|
1477
1477
|
ref: n,
|
|
1478
1478
|
className: l(
|
|
1479
1479
|
"text-sm font-medium text-fg leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1480
|
-
|
|
1480
|
+
a
|
|
1481
1481
|
),
|
|
1482
1482
|
...r
|
|
1483
1483
|
}
|
|
1484
1484
|
));
|
|
1485
1485
|
ia.displayName = "Label";
|
|
1486
|
-
function
|
|
1487
|
-
value:
|
|
1486
|
+
function _a({
|
|
1487
|
+
value: a,
|
|
1488
1488
|
onValueChange: r,
|
|
1489
1489
|
options: n,
|
|
1490
1490
|
size: s = "sm",
|
|
1491
|
-
className:
|
|
1491
|
+
className: o,
|
|
1492
1492
|
...u
|
|
1493
1493
|
}) {
|
|
1494
|
-
const c =
|
|
1494
|
+
const c = ae();
|
|
1495
1495
|
return /* @__PURE__ */ e(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
@@ -1500,10 +1500,10 @@ function Pa({
|
|
|
1500
1500
|
className: l(
|
|
1501
1501
|
"inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
|
|
1502
1502
|
s === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
|
|
1503
|
-
|
|
1503
|
+
o
|
|
1504
1504
|
),
|
|
1505
1505
|
children: n.map((m) => {
|
|
1506
|
-
const h = m.value ===
|
|
1506
|
+
const h = m.value === a;
|
|
1507
1507
|
return /* @__PURE__ */ i(
|
|
1508
1508
|
"label",
|
|
1509
1509
|
{
|
|
@@ -1535,31 +1535,31 @@ function Pa({
|
|
|
1535
1535
|
}
|
|
1536
1536
|
);
|
|
1537
1537
|
}
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1538
|
+
const sa = p(({ className: a, orientation: r = "horizontal", decorative: n = !0, ...s }, o) => /* @__PURE__ */ e(
|
|
1539
|
+
Nt.Root,
|
|
1540
1540
|
{
|
|
1541
|
-
ref:
|
|
1541
|
+
ref: o,
|
|
1542
1542
|
decorative: n,
|
|
1543
1543
|
orientation: r,
|
|
1544
1544
|
className: l(
|
|
1545
1545
|
"shrink-0 bg-line",
|
|
1546
1546
|
r === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
1547
|
-
|
|
1547
|
+
a
|
|
1548
1548
|
),
|
|
1549
1549
|
...s
|
|
1550
1550
|
}
|
|
1551
1551
|
));
|
|
1552
|
-
|
|
1553
|
-
function
|
|
1552
|
+
sa.displayName = "Separator";
|
|
1553
|
+
function Pa({ className: a, ...r }) {
|
|
1554
1554
|
return /* @__PURE__ */ e(
|
|
1555
1555
|
"div",
|
|
1556
1556
|
{
|
|
1557
|
-
className: l("animate-pulse rounded-md bg-elevated",
|
|
1557
|
+
className: l("animate-pulse rounded-md bg-elevated", a),
|
|
1558
1558
|
...r
|
|
1559
1559
|
}
|
|
1560
1560
|
);
|
|
1561
1561
|
}
|
|
1562
|
-
const
|
|
1562
|
+
const Ma = q.Provider, Ea = q.Root, La = q.Trigger, oa = p(({ className: a, sideOffset: r = 6, ...n }, s) => /* @__PURE__ */ e(q.Portal, { children: /* @__PURE__ */ e(
|
|
1563
1563
|
q.Content,
|
|
1564
1564
|
{
|
|
1565
1565
|
ref: s,
|
|
@@ -1572,82 +1572,82 @@ const La = q.Provider, Ea = q.Root, Aa = q.Trigger, da = b(({ className: t, side
|
|
|
1572
1572
|
"data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",
|
|
1573
1573
|
"data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",
|
|
1574
1574
|
"duration-150 ease-out",
|
|
1575
|
-
|
|
1575
|
+
a
|
|
1576
1576
|
),
|
|
1577
1577
|
...n
|
|
1578
1578
|
}
|
|
1579
1579
|
) }));
|
|
1580
|
-
|
|
1580
|
+
oa.displayName = "TooltipContent";
|
|
1581
1581
|
export {
|
|
1582
|
-
|
|
1583
|
-
|
|
1582
|
+
fa as AgentPrompt,
|
|
1583
|
+
Te as Avatar,
|
|
1584
1584
|
je as AvatarFallback,
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1585
|
+
Ie as AvatarImage,
|
|
1586
|
+
St as Badge,
|
|
1587
|
+
y as Button,
|
|
1588
1588
|
xa as Callout,
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1589
|
+
Tt as Card,
|
|
1590
|
+
Pt as CardContent,
|
|
1591
|
+
_t as CardDescription,
|
|
1592
|
+
Mt as CardFooter,
|
|
1593
|
+
It as CardHeader,
|
|
1594
1594
|
jt as CardTitle,
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1595
|
+
me as Checkbox,
|
|
1596
|
+
va as ChoiceDialog,
|
|
1597
|
+
Na as CodeBlock,
|
|
1598
|
+
Ta as DataTable,
|
|
1599
|
+
Da as DataTableIdentity,
|
|
1600
1600
|
Et as Dialog,
|
|
1601
1601
|
Rt as DialogBody,
|
|
1602
1602
|
ga as DialogClose,
|
|
1603
|
-
|
|
1603
|
+
_e as DialogContent,
|
|
1604
1604
|
$t as DialogDescription,
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1605
|
+
Ft as DialogFooter,
|
|
1606
|
+
Bt as DialogHeader,
|
|
1607
|
+
At as DialogPanel,
|
|
1608
|
+
Pe as DialogTitle,
|
|
1609
|
+
Lt as DialogTrigger,
|
|
1610
|
+
oe as DropdownMenu,
|
|
1611
1611
|
Z as DropdownMenuCheckboxItem,
|
|
1612
1612
|
Y as DropdownMenuContent,
|
|
1613
|
-
|
|
1614
|
-
|
|
1613
|
+
ya as DropdownMenuGroup,
|
|
1614
|
+
ue as DropdownMenuItem,
|
|
1615
1615
|
ee as DropdownMenuLabel,
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1616
|
+
wa as DropdownMenuPortal,
|
|
1617
|
+
be as DropdownMenuSeparator,
|
|
1618
|
+
de as DropdownMenuTrigger,
|
|
1619
|
+
Ia as EmptyState,
|
|
1620
1620
|
Ee as Input,
|
|
1621
1621
|
ja as Kbd,
|
|
1622
1622
|
ia as Label,
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1623
|
+
Gt as RadioCard,
|
|
1624
|
+
Ht as RadioGroup,
|
|
1625
|
+
_a as Segmented,
|
|
1626
|
+
Ot as Select,
|
|
1627
|
+
Ae as SelectContent,
|
|
1628
|
+
Ca as SelectGroup,
|
|
1629
1629
|
Re as SelectItem,
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1630
|
+
Xt as SelectLabel,
|
|
1631
|
+
Le as SelectTrigger,
|
|
1632
|
+
Ut as SelectValue,
|
|
1633
|
+
sa as Separator,
|
|
1634
|
+
Pa as Skeleton,
|
|
1635
|
+
yt as Spinner,
|
|
1636
|
+
za as Table,
|
|
1637
|
+
Qt as TableBody,
|
|
1638
|
+
ce as TableCell,
|
|
1639
|
+
Kt as TableContainer,
|
|
1640
|
+
Zt as TableEmptyState,
|
|
1641
|
+
Sa as TableHead,
|
|
1642
|
+
ka as TableHeader,
|
|
1643
|
+
Jt as TablePanel,
|
|
1644
|
+
Yt as TableRow,
|
|
1645
|
+
ra as TableSurface,
|
|
1646
1646
|
Ea as Tooltip,
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1647
|
+
oa as TooltipContent,
|
|
1648
|
+
Ma as TooltipProvider,
|
|
1649
|
+
La as TooltipTrigger,
|
|
1650
|
+
zt as badgeVariants,
|
|
1651
|
+
wt as buttonVariants
|
|
1652
1652
|
};
|
|
1653
1653
|
//# sourceMappingURL=index.js.map
|