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