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