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