@jinaan/uikit 0.1.4 → 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/index.js CHANGED
@@ -1,33 +1,33 @@
1
- import { jsx as e, jsxs as i, Fragment as Se } from "react/jsx-runtime";
2
- import { CircleNotch as et, Robot as tt, Terminal as at, Check as V, Copy as De, XCircle as rt, Warning as nt, CheckCircle as lt, Info as it, Minus as st, X as te, CaretDown as Q, MagnifyingGlass as ot, Columns as dt, Lock as ct, FunnelSimple as ye, WarningCircle as mt, CaretUp as ut, CaretUpDown as bt } from "@phosphor-icons/react";
3
- import { forwardRef as p, useState as T, useContext as pt, useId as ae, createContext as ht, useMemo as we, useEffect as Ce } from "react";
4
- import { Slot as ft } from "@radix-ui/react-slot";
5
- import { cva as pe } from "class-variance-authority";
6
- import { clsx as xt } 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";
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 z from "@radix-ui/react-dropdown-menu";
12
- import * as C from "@radix-ui/react-select";
13
- import * as vt from "@radix-ui/react-label";
14
- import * as Nt from "@radix-ui/react-separator";
15
- import * as q from "@radix-ui/react-tooltip";
16
- function l(...a) {
17
- return gt(xt(a));
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 yt({ className: a }) {
19
+ function At({ className: t }) {
20
20
  return /* @__PURE__ */ e(
21
- et,
21
+ ft,
22
22
  {
23
- className: l("size-4 animate-spin text-muted", a),
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 wt = 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-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:opacity-50",
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
- ), Ct = {
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
- }, y = p(
62
+ }, S = p(
63
63
  ({
64
- className: a,
64
+ className: t,
65
65
  variant: r,
66
66
  size: n = "md",
67
- asChild: s = !1,
68
- leadingIcon: o,
67
+ asChild: l = !1,
68
+ leadingIcon: i,
69
69
  trailingIcon: u,
70
70
  iconOnly: c = !1,
71
- loading: m = !1,
72
- fullWidth: h = !1,
73
- disabled: g,
74
- children: v,
75
- ...j
76
- }, k) => {
77
- const S = s ? ft : "button", w = Ct[n ?? "md"];
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
- S,
79
+ k,
80
80
  {
81
- ref: k,
82
- "aria-busy": m || void 0,
83
- disabled: s ? void 0 : g || m,
84
- className: l(
85
- wt({ variant: r, size: n }),
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
- h && "w-full",
88
- a
87
+ f && "w-full",
88
+ t
89
89
  ),
90
- ...j,
91
- children: s ? v : /* @__PURE__ */ i(Se, { children: [
92
- m ? /* @__PURE__ */ e(yt, { className: l("text-current", w), "aria-hidden": !0 }) : o ? /* @__PURE__ */ e("span", { className: l("inline-flex shrink-0", w), "aria-hidden": !0, children: o }) : null,
93
- v,
94
- !m && u ? /* @__PURE__ */ e("span", { className: l("inline-flex shrink-0", w), "aria-hidden": !0, children: u }) : null
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
- y.displayName = "Button";
101
- function fa({
102
- command: a,
100
+ S.displayName = "Button";
101
+ function _r({
102
+ command: t,
103
103
  tag: r = "Build with agents",
104
104
  icon: n,
105
- className: s
105
+ className: l
106
106
  }) {
107
- const [o, u] = T(!1), c = async () => {
107
+ const [i, u] = D(!1), c = async () => {
108
108
  try {
109
- await navigator.clipboard.writeText(a), u(!0), window.setTimeout(() => u(!1), 1500);
109
+ await navigator.clipboard.writeText(t), u(!0), window.setTimeout(() => u(!1), 1500);
110
110
  } catch {
111
111
  }
112
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(tt, { className: "size-3.5", weight: "fill" }),
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__ */ 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(at, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
120
- /* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children: a }),
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
- y,
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: o ? /* @__PURE__ */ e(V, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(De, {})
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 Te = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
137
- he.Root,
136
+ const Be = p(({ className: t, ...r }, n) => /* @__PURE__ */ e(
137
+ ye.Root,
138
138
  {
139
139
  ref: n,
140
- className: l(
140
+ className: o(
141
141
  "relative flex size-8 shrink-0 overflow-hidden rounded-full border border-line",
142
- a
142
+ t
143
143
  ),
144
144
  ...r
145
145
  }
146
146
  ));
147
- Te.displayName = "Avatar";
148
- const Ie = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
149
- he.Image,
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: l("aspect-square size-full object-cover", a),
152
+ className: o("aspect-square size-full object-cover", t),
153
153
  ...r
154
154
  }
155
155
  ));
156
- Ie.displayName = "AvatarImage";
157
- const je = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
158
- he.Fallback,
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: l(
161
+ className: o(
162
162
  "flex size-full items-center justify-center bg-elevated text-xs font-medium text-muted",
163
- a
163
+ t
164
164
  ),
165
165
  ...r
166
166
  }
167
167
  ));
168
- je.displayName = "AvatarFallback";
169
- const zt = pe(
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
- ), kt = pe("size-1.5 shrink-0 rounded-full", {
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 St({ className: a, variant: r, dot: n = !1, children: s, ...o }) {
200
- return /* @__PURE__ */ i("span", { className: l(zt({ variant: r }), a), ...o, children: [
201
- n ? /* @__PURE__ */ e("span", { className: l(kt({ variant: r })), "aria-hidden": !0 }) : null,
202
- s
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 Dt = {
205
+ const qt = {
206
206
  info: {
207
- Icon: it,
207
+ Icon: yt,
208
208
  className: "border-info/30 bg-info/10",
209
209
  iconClassName: "text-info"
210
210
  },
211
211
  success: {
212
- Icon: lt,
212
+ Icon: Nt,
213
213
  className: "border-success/30 bg-success/10",
214
214
  iconClassName: "text-success"
215
215
  },
216
216
  warning: {
217
- Icon: nt,
217
+ Icon: vt,
218
218
  className: "border-warning/30 bg-warning/10",
219
219
  iconClassName: "text-warning"
220
220
  },
221
221
  error: {
222
- Icon: rt,
222
+ Icon: xt,
223
223
  className: "border-error/30 bg-error/10",
224
224
  iconClassName: "text-error"
225
225
  }
226
226
  };
227
- function xa({
228
- variant: a = "info",
227
+ function Lr({
228
+ variant: t = "info",
229
229
  title: r,
230
230
  children: n,
231
- icon: s,
232
- className: o
231
+ icon: l,
232
+ className: i
233
233
  }) {
234
- const { Icon: u, className: c, iconClassName: m } = Dt[a];
235
- return /* @__PURE__ */ i(
234
+ const { Icon: u, className: c, iconClassName: d } = qt[t];
235
+ return /* @__PURE__ */ s(
236
236
  "div",
237
237
  {
238
- role: a === "error" ? "alert" : void 0,
239
- className: l(
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
- o
242
+ i
243
243
  ),
244
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: [
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
- const Tt = p(
255
- ({ className: a, ...r }, n) => /* @__PURE__ */ e(
254
+ function Vt({
255
+ className: t,
256
+ ...r
257
+ }) {
258
+ return /* @__PURE__ */ e(
256
259
  "div",
257
260
  {
258
- ref: n,
259
- className: l(
260
- "rounded-card border border-line bg-surface shadow-xs",
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
- Tt.displayName = "Card";
268
- const It = p(
269
- ({ className: a, ...r }, n) => /* @__PURE__ */ e(
267
+ );
268
+ }
269
+ function Ut({
270
+ className: t,
271
+ ...r
272
+ }) {
273
+ return /* @__PURE__ */ e(
270
274
  "div",
271
275
  {
272
- ref: n,
273
- className: l("flex flex-col gap-1 border-b border-line px-5 py-4", a),
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
- It.displayName = "CardHeader";
279
- const jt = p(
280
- ({ className: a, ...r }, n) => /* @__PURE__ */ e("h2", { ref: n, className: l("text-sm font-semibold text-fg", a), ...r })
281
- );
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
- ref: n,
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
- Mt.displayName = "CardFooter";
300
- const me = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
301
- ze.Root,
422
+ Zt.displayName = "Card";
423
+ const Ge = p(({ className: t, ...r }, n) => /* @__PURE__ */ e(
424
+ "div",
302
425
  {
303
426
  ref: n,
304
- className: l(
305
- "peer size-4 shrink-0 rounded border border-line-strong bg-surface transition-colors",
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 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
- a
479
+ "data-[state=checked]:border-primary",
480
+ "data-[state=indeterminate]:border-primary",
481
+ t
311
482
  ),
312
483
  ...r,
313
- children: /* @__PURE__ */ e(ze.Indicator, { className: "flex items-center justify-center text-current", children: r.checked === "indeterminate" ? /* @__PURE__ */ e(st, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(V, { className: "size-3", weight: "bold" }) })
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
- me.displayName = "Checkbox";
317
- const Et = I.Root, Lt = I.Trigger, ga = I.Close, _e = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(I.Portal, { children: [
318
- /* @__PURE__ */ e(I.Overlay, { className: "fixed inset-0 z-50 bg-overlay backdrop-blur-[1px] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0" }),
319
- /* @__PURE__ */ i(
320
- I.Content,
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
- 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
- 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
- _e.displayName = "DialogContent";
345
- function At({ className: a, ...r }) {
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: 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
- a
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 Rt({ className: a, ...r }) {
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: l("min-h-0 flex-1 overflow-y-auto px-5 py-4", a),
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 Bt({ className: a, ...r }) {
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: l(
374
- "flex shrink-0 flex-col gap-1.5 border-b border-[var(--dialog-panel-border)] px-5 py-4",
375
- a
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 Ft({ className: a, ...r }) {
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: l(
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
- a
727
+ t
389
728
  ),
390
729
  ...r
391
730
  }
392
731
  );
393
732
  }
394
- const Pe = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
733
+ const Xe = p(({ className: t, ...r }, n) => /* @__PURE__ */ e(
395
734
  I.Title,
396
735
  {
397
736
  ref: n,
398
- className: l("text-base font-semibold text-fg", a),
737
+ className: o("text-base font-semibold text-fg", t),
399
738
  ...r
400
739
  }
401
740
  ));
402
- Pe.displayName = "DialogTitle";
403
- const $t = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
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: l("text-sm text-muted", a),
746
+ className: o("text-sm text-muted", t),
408
747
  ...r
409
748
  }
410
749
  ));
411
- $t.displayName = "DialogDescription";
412
- const Me = ht(null);
413
- function Ht({
414
- label: a,
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: s = !1,
418
- name: o,
756
+ disabled: l = !1,
757
+ name: i,
419
758
  className: u,
420
759
  children: c,
421
- ...m
760
+ ...d
422
761
  }) {
423
- const h = ae(), g = o ?? h;
424
- return /* @__PURE__ */ e(Me.Provider, { value: { name: g, value: r, onChange: n, disabled: s }, children: /* @__PURE__ */ i("fieldset", { className: l("flex flex-col gap-6", u), ...m, children: [
425
- /* @__PURE__ */ e("legend", { className: "sr-only", children: a }),
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 Gt({
430
- value: a,
768
+ function pr({
769
+ value: t,
431
770
  title: r,
432
771
  description: n,
433
- badge: s,
434
- disabled: o = !1,
772
+ badge: l,
773
+ disabled: i = !1,
435
774
  className: u
436
775
  }) {
437
- const c = pt(Me), m = ae();
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 h = o || c.disabled, g = c.value === a;
441
- return /* @__PURE__ */ i(
779
+ const f = i || c.disabled, h = c.value === t;
780
+ return /* @__PURE__ */ s(
442
781
  "label",
443
782
  {
444
- className: l(
783
+ className: o(
445
784
  "group relative flex items-start gap-3",
446
- h ? "cursor-not-allowed opacity-50" : "cursor-pointer",
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: a,
456
- checked: g,
457
- disabled: h,
794
+ value: t,
795
+ checked: h,
796
+ disabled: f,
458
797
  onChange: () => {
459
- var v;
460
- return (v = c.onChange) == null ? void 0 : v.call(c, a);
798
+ var g;
799
+ return (g = c.onChange) == null ? void 0 : g.call(c, t);
461
800
  },
462
- "aria-describedby": n ? m : void 0,
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: 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",
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__ */ i("span", { className: "min-w-0 flex-1", children: [
478
- /* @__PURE__ */ i("span", { className: "flex flex-wrap items-center gap-2", children: [
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
- s ? /* @__PURE__ */ e(St, { variant: "primary", children: s }) : null
819
+ l ? /* @__PURE__ */ e(Ht, { variant: "primary", children: l }) : null
481
820
  ] }),
482
- n ? /* @__PURE__ */ e("span", { id: m, className: "mt-1 block text-sm text-muted", children: n }) : null
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 va({
489
- open: a,
827
+ function $r({
828
+ open: t,
490
829
  onOpenChange: r,
491
830
  trigger: n,
492
- title: s,
493
- options: o,
831
+ title: l,
832
+ options: i,
494
833
  defaultValue: u,
495
834
  value: c,
496
- onValueChange: m,
497
- cancelLabel: h = "Cancel",
498
- confirmLabel: g = "Continue",
499
- onConfirm: v
835
+ onValueChange: d,
836
+ cancelLabel: f = "Cancel",
837
+ confirmLabel: h = "Continue",
838
+ onConfirm: g
500
839
  }) {
501
- var M;
502
- const [j, k] = T(u ?? ((M = o[0]) == null ? void 0 : M.value) ?? ""), S = c ?? j;
503
- return /* @__PURE__ */ i(Et, { open: a, onOpenChange: r, children: [
504
- n ? /* @__PURE__ */ e(Lt, { asChild: !0, children: n }) : null,
505
- /* @__PURE__ */ i(
506
- _e,
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__ */ i(At, { children: [
512
- /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ e(Pe, { className: "text-xl", children: s }) }),
513
- /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Ht, { label: s, value: S, onChange: (N) => {
514
- c === void 0 && k(N), m == null || m(N);
515
- }, children: o.map((N) => /* @__PURE__ */ e(
516
- Gt,
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__ */ i(Ft, { className: "gap-3 pt-2.5", children: [
865
+ /* @__PURE__ */ s(ur, { className: "gap-3 pt-2.5", children: [
527
866
  /* @__PURE__ */ e(
528
- y,
867
+ S,
529
868
  {
530
869
  variant: "secondary",
531
870
  className: "flex-1",
532
871
  onClick: () => r == null ? void 0 : r(!1),
533
- children: h
872
+ children: f
534
873
  }
535
874
  ),
536
- /* @__PURE__ */ e(y, { className: "flex-1", onClick: () => v == null ? void 0 : v(S), children: g })
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 Na({ code: a, label: r, className: n }) {
544
- const [s, o] = T(!1), u = async () => {
545
- try {
546
- await navigator.clipboard.writeText(a), o(!0), window.setTimeout(() => o(!1), 1500);
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: 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
- y,
562
- {
563
- variant: "ghost",
564
- size: "sm",
565
- leadingIcon: s ? /* @__PURE__ */ e(V, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(De, {}),
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: 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 qt = {
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
- }, Vt = {
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
- }, Wt = {
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
- }, ke = {
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
- }, se = {
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
- }, Ee = p(
930
+ }, Je = p(
602
931
  ({
603
- className: a,
932
+ className: t,
604
933
  containerClassName: r,
605
934
  type: n = "text",
606
- size: s = "md",
607
- leadingIcon: o,
935
+ size: l = "md",
936
+ leadingIcon: i,
608
937
  trailingIcon: u,
609
938
  onClear: c,
610
- value: m,
611
- defaultValue: h,
612
- error: g = !1,
613
- helperText: v,
614
- id: j,
615
- "aria-describedby": k,
616
- disabled: S,
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
- ...M
947
+ ...E
619
948
  }, N) => {
620
- const R = ae(), W = j ?? R, B = !!v, E = !!(c && (m !== void 0 ? String(m).length > 0 : h !== void 0 && String(h).length > 0)), O = B ? `${W}-description` : void 0, re = [k, O].filter(Boolean).join(" ") || void 0, U = /* @__PURE__ */ e(
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: W,
953
+ id: X,
625
954
  type: n,
626
- disabled: S,
955
+ disabled: k,
627
956
  readOnly: w,
628
- "aria-invalid": g || void 0,
629
- "aria-describedby": re,
630
- style: o || u || E ? {
631
- paddingInlineStart: o ? `calc(var(--control-pad-x-${s}) + var(--control-icon-${s}) + var(--control-gap))` : void 0,
632
- paddingInlineEnd: u || E ? `calc(var(--control-pad-x-${s}) + var(--control-icon-${s}) + var(--control-gap))` : void 0
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: l(
963
+ className: o(
635
964
  "flex w-full rounded-(--control-radius) border bg-(--input-bg) text-(--input-fg) transition-colors",
636
- qt[s],
637
- Vt[s],
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
- g && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
642
- !g && "border-(--input-border)",
643
- S && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
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
- a
974
+ t
646
975
  ),
647
- value: m,
648
- defaultValue: h,
649
- ...M
976
+ value: d,
977
+ defaultValue: f,
978
+ ...E
650
979
  }
651
980
  );
652
- return !o && !u && !E && !B ? U : /* @__PURE__ */ i("div", { className: l("w-full", r), children: [
653
- /* @__PURE__ */ i("div", { className: "relative", children: [
654
- o ? /* @__PURE__ */ e(
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: l(
986
+ className: o(
658
987
  "pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
659
- Wt[s]
988
+ gr[l]
660
989
  ),
661
990
  "aria-hidden": !0,
662
- children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: o })
991
+ children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", ue[l]), children: i })
663
992
  }
664
993
  ) : null,
665
- U,
666
- E ? /* @__PURE__ */ e(
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: l(
1001
+ className: o(
673
1002
  "absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
674
- ke[s]
1003
+ _e[l]
675
1004
  ),
676
- children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: /* @__PURE__ */ e(te, {}) })
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: l(
1010
+ className: o(
682
1011
  "pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
683
- ke[s]
1012
+ _e[l]
684
1013
  ),
685
1014
  "aria-hidden": !0,
686
- children: /* @__PURE__ */ e("span", { className: l("inline-flex items-center justify-center", se[s]), children: u })
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
- B ? /* @__PURE__ */ e(
1019
+ F ? /* @__PURE__ */ e(
691
1020
  "p",
692
1021
  {
693
- id: O,
694
- className: l("mt-1.5 text-xs", g ? "text-error" : "text-muted"),
695
- children: v
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
- Ee.displayName = "Input";
702
- const oe = z.Root, de = z.Trigger, ya = z.Group, wa = z.Portal, Y = p(({ className: a, sideOffset: r = 6, ...n }, s) => /* @__PURE__ */ e(z.Portal, { children: /* @__PURE__ */ e(
703
- z.Content,
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: s,
1034
+ ref: l,
706
1035
  sideOffset: r,
707
- className: l(
708
- "z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-[var(--button-secondary-bg)] p-1 shadow-md",
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
- a
1044
+ t
716
1045
  ),
717
1046
  ...n
718
1047
  }
719
1048
  ) }));
720
- Y.displayName = "DropdownMenuContent";
721
- const ue = p(({ className: a, inset: r, ...n }, s) => /* @__PURE__ */ e(
722
- z.Item,
1049
+ ee.displayName = "DropdownMenuContent";
1050
+ const ge = p(({ className: t, inset: r, ...n }, l) => /* @__PURE__ */ e(
1051
+ T.Item,
723
1052
  {
724
- ref: s,
725
- className: l(
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
- a
1059
+ t
731
1060
  ),
732
1061
  ...n
733
1062
  }
734
1063
  ));
735
- ue.displayName = "DropdownMenuItem";
736
- const Z = p(({ className: a, children: r, checked: n, ...s }, o) => /* @__PURE__ */ i(
737
- z.CheckboxItem,
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: o,
740
- className: l(
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
- a
1071
+ t
743
1072
  ),
744
1073
  checked: n,
745
- ...s,
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(z.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(V, { className: "size-3", weight: "bold" }) }) }),
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
- Z.displayName = "DropdownMenuCheckboxItem";
753
- const ee = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
754
- z.Label,
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: l("px-2 py-1.5 text-xs font-medium text-subtle", a),
1086
+ className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
758
1087
  ...r
759
1088
  }
760
1089
  ));
761
- ee.displayName = "DropdownMenuLabel";
762
- const be = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
763
- z.Separator,
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: l("-mx-1 my-1 h-px bg-line", a),
1095
+ className: o("-mx-1 my-1 h-px bg-line", t),
767
1096
  ...r
768
1097
  }
769
1098
  ));
770
- be.displayName = "DropdownMenuSeparator";
771
- const Ot = C.Root, Ca = C.Group, Ut = C.Value, Le = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(
772
- C.Trigger,
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: 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",
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
- a
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
- ...n,
1112
+ ...l,
782
1113
  children: [
783
1114
  r,
784
- /* @__PURE__ */ e(C.Icon, { asChild: !0, children: /* @__PURE__ */ e(Q, { className: "size-3.5 text-subtle" }) })
1115
+ /* @__PURE__ */ e(z.Icon, { asChild: !0, children: /* @__PURE__ */ e(O, { className: "size-3.5 text-subtle" }) })
785
1116
  ]
786
1117
  }
787
1118
  ));
788
- Le.displayName = "SelectTrigger";
789
- const Ae = p(({ className: a, children: r, position: n = "popper", ...s }, o) => /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ e(
790
- C.Content,
791
- {
792
- ref: o,
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
- a
803
- ),
804
- ...s,
805
- children: /* @__PURE__ */ e(C.Viewport, { className: "p-0", children: r })
806
- }
807
- ) }));
808
- Ae.displayName = "SelectContent";
809
- const Re = p(({ className: a, children: r, ...n }, s) => /* @__PURE__ */ i(
810
- C.Item,
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: 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
- a
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(C.ItemIndicator, { children: /* @__PURE__ */ e(V, { className: "size-3.5" }) }) }),
820
- /* @__PURE__ */ e(C.ItemText, { children: r })
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
- Re.displayName = "SelectItem";
825
- const Xt = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
826
- C.Label,
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: l("px-2 py-1.5 text-xs font-medium text-subtle", a),
1163
+ className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
830
1164
  ...r
831
1165
  }
832
1166
  ));
833
- Xt.displayName = "SelectLabel";
834
- function Kt({
835
- className: a,
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: s,
920
- className: o
1172
+ action: l,
1173
+ className: i
921
1174
  }) {
922
- return /* @__PURE__ */ i(
1175
+ return /* @__PURE__ */ s(
923
1176
  "div",
924
1177
  {
925
- className: l(
1178
+ className: o(
926
1179
  "flex min-h-[22rem] flex-col items-center justify-center gap-5 px-6 py-16 text-center",
927
- o
1180
+ i
928
1181
  ),
929
1182
  children: [
930
- a ? /* @__PURE__ */ e("div", { className: "flex size-[var(--table-empty-icon)] items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-table-muted [&_svg]:size-8", children: a }) : null,
931
- /* @__PURE__ */ i("div", { className: "space-y-2", children: [
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
- s ? /* @__PURE__ */ e("div", { className: "text-sm font-medium text-table-accent", children: s }) : null
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 ea = {
941
- default: "bg-table-container",
942
- muted: "bg-surface border border-line",
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 Da({
1003
- name: a,
1200
+ function Ur({
1201
+ name: t,
1004
1202
  secondary: r,
1005
1203
  image: n
1006
1204
  }) {
1007
- return /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
1008
- /* @__PURE__ */ i(Te, { className: "size-8", children: [
1009
- n ? /* @__PURE__ */ e(Ie, { src: n, alt: "" }) : null,
1010
- /* @__PURE__ */ e(je, { children: la(a) })
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__ */ i("div", { className: "min-w-0", children: [
1013
- /* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: a }),
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 Ta({
1019
- rows: a,
1216
+ function Wr({
1217
+ rows: t,
1020
1218
  columns: r,
1021
1219
  getRowId: n,
1022
- loading: s = !1,
1023
- error: o,
1220
+ loading: l = !1,
1221
+ error: i,
1024
1222
  empty: u,
1025
1223
  search: c,
1026
- filters: m,
1027
- toolbarStart: h,
1028
- toolbarEnd: g,
1029
- tabs: v,
1030
- activeTab: j,
1031
- onTabChange: k,
1032
- infoBanner: S,
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: M,
1232
+ bulkActions: E,
1035
1233
  rowActions: N,
1036
- onRowClick: R,
1037
- defaultSort: W,
1038
- pageSize: B = 25,
1039
- pageSizeOptions: E = [10, 25, 50, 100],
1040
- tone: O,
1041
- headerAction: re,
1042
- headerClassName: U,
1043
- panelClassName: Be,
1044
- className: Fe
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 [fe, xe] = T(
1244
+ const [Ce, Se] = D(
1047
1245
  () => Object.fromEntries(
1048
- r.filter((t) => t.defaultHidden && !t.required).map((t) => [t.id, !0])
1246
+ r.filter((a) => a.defaultHidden && !a.required).map((a) => [a.id, !0])
1049
1247
  )
1050
- ), [f, $e] = T(
1051
- W ?? null
1052
- ), [F, X] = T(0), [L, He] = T(B), [A, ne] = T(/* @__PURE__ */ new Set()), [Ge, le] = T([]), _ = r.filter((t) => !fe[t.id]), ge = r.filter((t) => fe[t.id] && !t.required), ie = (m ?? []).filter((t) => Ge.includes(t.id)), qe = (m ?? []).map((t) => `${t.id}:${t.value.join(",")}`).join("|"), K = we(() => {
1053
- let t = a;
1054
- for (const b of m ?? [])
1055
- b.value.length > 0 && (t = t.filter((x) => b.match(x, b.value)));
1056
- if (!c || !c.value.trim()) return t;
1057
- const d = c.value.trim().toLowerCase();
1058
- return t.filter((b) => c.keys(b).toLowerCase().includes(d));
1059
- }, [a, c, m]), $ = we(() => {
1060
- if (!f) return K;
1061
- const t = r.find((b) => b.id === f.id);
1062
- if (!(t != null && t.sortValue)) return K;
1063
- const d = f.dir === "asc" ? 1 : -1;
1064
- return [...K].sort((b, x) => {
1065
- const D = t.sortValue(b), G = t.sortValue(x);
1066
- return D == null && G == null ? 0 : D == null ? 1 : G == null ? -1 : typeof D == "number" && typeof G == "number" ? (D - G) * d : String(D).localeCompare(String(G)) * d;
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
- }, [K, f, r]), H = Math.max(1, Math.ceil($.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, j, qe]), Ce(() => {
1072
- F > H - 1 && X(H - 1);
1073
- }, [F, H]);
1074
- const J = F * L, P = $.slice(J, J + L), Ve = (t) => {
1075
- t.sortable && $e(
1076
- (d) => (d == null ? void 0 : d.id) === t.id ? d.dir === "asc" ? { id: t.id, dir: "desc" } : null : { id: t.id, dir: "asc" }
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
- }, ve = P.length > 0 && P.every((t) => A.has(n(t))), We = P.some((t) => A.has(n(t))), Oe = a.filter((t) => A.has(n(t))), Ue = () => {
1079
- ne((t) => {
1080
- const d = new Set(t);
1081
- return ve ? P.forEach((b) => d.delete(n(b))) : P.forEach((b) => d.add(n(b))), d;
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
- }, Xe = (t) => {
1084
- ne((d) => {
1085
- const b = new Set(d);
1086
- return b.has(t) ? b.delete(t) : b.add(t), b;
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
- }, Ke = !!(c || m != null && m.length || h || g), Je = _.some((t) => t.width), Qe = _.length > 1 ? 70 / (_.length - 1) : 100, Ye = _.map((t, d) => t.width ? t.width : Je ? "auto" : `${d === 0 ? 30 : Qe}%`), Ne = [
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
- ...Ye,
1288
+ ...bt,
1091
1289
  ...N ? ["11rem"] : []
1092
- ], Ze = (t) => (f == null ? void 0 : f.id) === t.id ? f.dir === "asc" ? "ascending" : "descending" : void 0;
1093
- return /* @__PURE__ */ i("div", { className: l("space-y-4", Fe), children: [
1094
- v && v.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: v.map((t) => {
1095
- const d = t.id === j;
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": d,
1102
- onClick: () => k == null ? void 0 : k(t.id),
1103
- className: l(
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
- d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
1303
+ m ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
1106
1304
  ),
1107
- children: t.label
1305
+ children: a.label
1108
1306
  },
1109
- t.id
1307
+ a.id
1110
1308
  );
1111
1309
  }) }),
1112
- Ke && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
1310
+ ct && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1113
1311
  c && /* @__PURE__ */ e(
1114
- Ee,
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: (t) => c.onChange(t.target.value),
1318
+ onChange: (a) => c.onChange(a.target.value),
1121
1319
  onClear: () => c.onChange(""),
1122
- leadingIcon: /* @__PURE__ */ e(ot, {}),
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
- h,
1128
- /* @__PURE__ */ i(oe, { children: [
1129
- /* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ e(
1130
- y,
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(dt, {}),
1135
- trailingIcon: /* @__PURE__ */ e(Q, {}),
1332
+ leadingIcon: /* @__PURE__ */ e(St, {}),
1333
+ trailingIcon: /* @__PURE__ */ e(O, {}),
1136
1334
  children: "Columns"
1137
1335
  }
1138
1336
  ) }),
1139
- /* @__PURE__ */ i(Y, { align: "end", className: "w-54", children: [
1140
- /* @__PURE__ */ e(ee, { className: "text-[13px]", children: "Active columns" }),
1141
- _.map((t) => /* @__PURE__ */ i(
1142
- Z,
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: t.required,
1146
- onCheckedChange: () => xe((d) => ({ ...d, [t.id]: !0 })),
1147
- onSelect: (d) => d.preventDefault(),
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: t.header }),
1151
- t.required ? /* @__PURE__ */ e(ct, { className: "size-3.5 text-subtle", "aria-hidden": !0 }) : null
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
- t.id
1352
+ a.id
1155
1353
  )),
1156
- ge.length > 0 ? /* @__PURE__ */ i(Se, { children: [
1157
- /* @__PURE__ */ e(be, {}),
1158
- /* @__PURE__ */ e(ee, { className: "text-[13px]", children: "Available columns" }),
1159
- ge.map((t) => /* @__PURE__ */ e(
1160
- Z,
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: () => xe((d) => ({ ...d, [t.id]: !1 })),
1164
- onSelect: (d) => d.preventDefault(),
1165
- children: t.header
1361
+ onCheckedChange: () => Se((m) => ({ ...m, [a.id]: !1 })),
1362
+ onSelect: (m) => m.preventDefault(),
1363
+ children: a.header
1166
1364
  },
1167
- t.id
1365
+ a.id
1168
1366
  ))
1169
1367
  ] }) : null
1170
1368
  ] })
1171
1369
  ] }),
1172
- m && m.length > 0 ? /* @__PURE__ */ i(oe, { children: [
1173
- /* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ e(
1174
- y,
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(ye, {})
1378
+ children: /* @__PURE__ */ e(Te, {})
1181
1379
  }
1182
1380
  ) }),
1183
- /* @__PURE__ */ e(Y, { align: "start", className: "w-54", children: m.map((t) => /* @__PURE__ */ e(
1184
- ue,
1381
+ /* @__PURE__ */ e(ee, { align: "start", className: "w-54", children: d.map((a) => /* @__PURE__ */ e(
1382
+ ge,
1185
1383
  {
1186
- onSelect: () => le(
1187
- (d) => d.includes(t.id) ? d : [...d, t.id]
1384
+ onSelect: () => se(
1385
+ (m) => m.includes(a.id) ? m : [...m, a.id]
1188
1386
  ),
1189
- children: t.label
1387
+ children: a.label
1190
1388
  },
1191
- t.id
1389
+ a.id
1192
1390
  )) })
1193
1391
  ] }) : null,
1194
- g ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: g }) : null
1392
+ h ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: h }) : null
1195
1393
  ] }),
1196
- ie.length > 0 ? /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
1197
- ie.map((t) => {
1198
- const d = () => {
1199
- t.onChange([]), le((b) => b.filter((x) => x !== t.id));
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__ */ i("div", { className: "inline-flex items-center", children: [
1399
+ return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
1202
1400
  /* @__PURE__ */ e(
1203
- y,
1401
+ S,
1204
1402
  {
1205
1403
  variant: "secondary",
1206
1404
  size: "md",
1207
1405
  iconOnly: !0,
1208
- "aria-label": `Remove ${t.label} filter`,
1406
+ "aria-label": `Remove ${a.label} filter`,
1209
1407
  className: "rounded-r-none",
1210
- onClick: d,
1211
- children: /* @__PURE__ */ e(te, {})
1408
+ onClick: m,
1409
+ children: /* @__PURE__ */ e(ae, {})
1212
1410
  }
1213
1411
  ),
1214
- /* @__PURE__ */ i(oe, { children: [
1215
- /* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ i(y, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1216
- /* @__PURE__ */ e(ye, {}),
1217
- /* @__PURE__ */ e("span", { className: "font-medium", children: t.label }),
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: t.value.length > 0 ? `${t.value.length} selected` : "Enter value" }),
1220
- /* @__PURE__ */ e(Q, { className: "text-muted" })
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__ */ i(Y, { align: "start", className: "w-56", children: [
1223
- /* @__PURE__ */ i(ee, { className: "text-[13px]", children: [
1420
+ /* @__PURE__ */ s(ee, { align: "start", className: "w-56", children: [
1421
+ /* @__PURE__ */ s(re, { className: "text-[13px]", children: [
1224
1422
  "Filter by ",
1225
- t.label
1423
+ a.label
1226
1424
  ] }),
1227
- t.options.map((b) => {
1228
- const x = t.value.includes(b.value);
1425
+ a.options.map((b) => {
1426
+ const v = a.value.includes(b.value);
1229
1427
  return /* @__PURE__ */ e(
1230
- Z,
1428
+ te,
1231
1429
  {
1232
- checked: x,
1233
- onCheckedChange: () => t.onChange(
1234
- x ? t.value.filter((D) => D !== b.value) : [...t.value, b.value]
1430
+ checked: v,
1431
+ onCheckedChange: () => a.onChange(
1432
+ v ? a.value.filter((P) => P !== b.value) : [...a.value, b.value]
1235
1433
  ),
1236
- onSelect: (D) => D.preventDefault(),
1434
+ onSelect: (P) => P.preventDefault(),
1237
1435
  children: b.label
1238
1436
  },
1239
1437
  b.value
1240
1438
  );
1241
1439
  }),
1242
- /* @__PURE__ */ e(be, {}),
1243
- /* @__PURE__ */ e(ue, { onSelect: d, children: "Clear filter" })
1440
+ /* @__PURE__ */ e(xe, {}),
1441
+ /* @__PURE__ */ e(ge, { onSelect: m, children: "Clear filter" })
1244
1442
  ] })
1245
1443
  ] })
1246
- ] }, t.id);
1444
+ ] }, a.id);
1247
1445
  }),
1248
1446
  /* @__PURE__ */ e(
1249
1447
  "button",
1250
1448
  {
1251
1449
  type: "button",
1252
1450
  onClick: () => {
1253
- for (const t of ie) t.onChange([]);
1254
- le([]);
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
- S,
1262
- w && A.size > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
1263
- /* @__PURE__ */ i("span", { className: "font-medium text-fg", children: [
1264
- A.size,
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: (M ?? []).map((t) => /* @__PURE__ */ i(
1268
- y,
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: t.variant ?? "outline",
1272
- disabled: t.disabled,
1273
- onClick: () => void t.onRun(Oe),
1469
+ variant: a.variant ?? "outline",
1470
+ disabled: a.disabled,
1471
+ onClick: () => void a.onRun(ot),
1274
1472
  children: [
1275
- t.icon,
1276
- t.label
1473
+ a.icon,
1474
+ a.label
1277
1475
  ]
1278
1476
  },
1279
- t.label
1477
+ a.label
1280
1478
  )) }),
1281
- /* @__PURE__ */ i(
1479
+ /* @__PURE__ */ s(
1282
1480
  "button",
1283
1481
  {
1284
1482
  type: "button",
1285
- onClick: () => ne(/* @__PURE__ */ new Set()),
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(te, { className: "size-3.5" }),
1486
+ /* @__PURE__ */ e(ae, { className: "size-3.5" }),
1289
1487
  "Clear"
1290
1488
  ]
1291
1489
  }
1292
1490
  )
1293
1491
  ] }),
1294
1492
  /* @__PURE__ */ e(
1295
- ra,
1493
+ le,
1296
1494
  {
1297
- action: re,
1298
- tone: O,
1299
- headerClassName: U,
1300
- panelClassName: Be,
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__ */ i("table", { role: "presentation", className: "w-full table-fixed border-collapse", children: [
1305
- /* @__PURE__ */ e("colgroup", { children: Ne.map((t, d) => /* @__PURE__ */ e("col", { style: { width: t } }, d)) }),
1306
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
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
- me,
1506
+ fe,
1309
1507
  {
1310
1508
  "aria-label": "Select all rows",
1311
- checked: ve ? !0 : We ? "indeterminate" : !1,
1312
- onCheckedChange: Ue
1509
+ checked: ke ? !0 : it ? "indeterminate" : !1,
1510
+ onCheckedChange: st
1313
1511
  }
1314
1512
  ) }),
1315
- _.map((t) => /* @__PURE__ */ e(
1513
+ M.map((a) => /* @__PURE__ */ e(
1316
1514
  "th",
1317
1515
  {
1318
- className: l(na, t.align === "right" && "text-right", t.className),
1319
- children: t.sortable ? /* @__PURE__ */ i(
1320
- y,
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 ${t.header}`,
1326
- onClick: () => Ve(t),
1327
- className: l(
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
- (f == null ? void 0 : f.id) === t.id && "text-table-header-active"
1529
+ (x == null ? void 0 : x.id) === a.id && "text-table-header-active"
1332
1530
  ),
1333
1531
  children: [
1334
- t.header,
1335
- (f == null ? void 0 : f.id) === t.id ? f.dir === "asc" ? /* @__PURE__ */ e(ut, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Q, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(bt, { className: "size-3.5 opacity-50" })
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
- ) : t.header
1536
+ ) : a.header
1339
1537
  },
1340
- t.id
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: s ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((t) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, t)) }) : o ? /* @__PURE__ */ i("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
1347
- /* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(mt, { weight: "duotone" }) }),
1348
- /* @__PURE__ */ i("div", { className: "space-y-2", children: [
1349
- /* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: o.title }),
1350
- o.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: o.description }) : null
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
- o.action
1353
- ] }) : P.length === 0 ? /* @__PURE__ */ e(
1354
- Zt,
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__ */ i("table", { className: "w-full table-fixed border-collapse", children: [
1362
- /* @__PURE__ */ e("colgroup", { children: Ne.map((t, d) => /* @__PURE__ */ e("col", { style: { width: t } }, d)) }),
1363
- /* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ i("tr", { children: [
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
- _.map((t) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": Ze(t), children: t.header }, t.id)),
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(Qt, { children: P.map((t) => {
1369
- const d = n(t), b = A.has(d);
1370
- return /* @__PURE__ */ i(
1371
- Yt,
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: R ? () => R(t) : void 0,
1375
- className: R ? "cursor-pointer" : void 0,
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: (x) => x.stopPropagation(), children: /* @__PURE__ */ e(
1378
- me,
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: () => Xe(d)
1580
+ onCheckedChange: () => dt(m)
1383
1581
  }
1384
1582
  ) }),
1385
- _.map((x) => /* @__PURE__ */ e(
1583
+ M.map((v) => /* @__PURE__ */ e(
1386
1584
  ce,
1387
1585
  {
1388
- "data-numeric": x.numeric ? "" : void 0,
1389
- className: l(x.align === "right" && "text-right", x.className),
1390
- children: x.cell(t)
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
- x.id
1590
+ v.id
1393
1591
  )),
1394
- N && /* @__PURE__ */ e(ce, { className: "w-44 px-4 text-right", onClick: (x) => x.stopPropagation(), children: N(t) })
1592
+ N && /* @__PURE__ */ e(ce, { className: "w-44 px-4 text-right", onClick: (v) => v.stopPropagation(), children: N(a) })
1395
1593
  ]
1396
1594
  },
1397
- d
1595
+ m
1398
1596
  );
1399
1597
  }) })
1400
1598
  ] })
1401
1599
  }
1402
1600
  ),
1403
- !s && !o && $.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
1404
- /* @__PURE__ */ i("span", { className: "text-muted", children: [
1405
- J + 1,
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(J + L, $.length),
1605
+ Math.min(Z + L, G.length),
1408
1606
  " of ",
1409
- $.length
1607
+ G.length
1410
1608
  ] }),
1411
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1412
- /* @__PURE__ */ i(Ot, { value: String(L), onValueChange: (t) => He(Number(t)), children: [
1413
- /* @__PURE__ */ e(Le, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ e(Ut, {}) }),
1414
- /* @__PURE__ */ e(Ae, { children: E.map((t) => /* @__PURE__ */ i(Re, { value: String(t), children: [
1415
- t,
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
- ] }, t)) })
1615
+ ] }, a)) })
1418
1616
  ] }),
1419
1617
  /* @__PURE__ */ e(
1420
- y,
1618
+ S,
1421
1619
  {
1422
1620
  variant: "outline",
1423
1621
  size: "md",
1424
- disabled: F <= 0,
1425
- onClick: () => X((t) => Math.max(0, t - 1)),
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
- y,
1628
+ S,
1431
1629
  {
1432
1630
  variant: "outline",
1433
1631
  size: "md",
1434
- disabled: F >= H - 1,
1435
- onClick: () => X((t) => Math.min(H - 1, t + 1)),
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 Ia({ icon: a, title: r, description: n, action: s, className: o }) {
1444
- return /* @__PURE__ */ i(
1445
- "div",
1446
- {
1447
- className: l(
1448
- "flex flex-col items-center justify-center gap-4 rounded-card border border-line bg-surface px-6 py-16 text-center",
1449
- o
1450
- ),
1451
- children: [
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 ja({ className: a, ...r }) {
1651
+ function Kr({ className: t, ...r }) {
1463
1652
  return /* @__PURE__ */ e(
1464
1653
  "kbd",
1465
1654
  {
1466
- className: l(
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
- a
1657
+ t
1469
1658
  ),
1470
1659
  ...r
1471
1660
  }
1472
1661
  );
1473
1662
  }
1474
- const ia = p(({ className: a, ...r }, n) => /* @__PURE__ */ e(
1475
- vt.Root,
1663
+ const Sr = p(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1664
+ Lt.Root,
1476
1665
  {
1477
1666
  ref: n,
1478
- className: l(
1479
- "text-sm font-medium text-fg leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1480
- a
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
- ia.displayName = "Label";
1486
- function _a({
1487
- value: a,
1674
+ Sr.displayName = "Label";
1675
+ function Jr({
1676
+ value: t,
1488
1677
  onValueChange: r,
1489
1678
  options: n,
1490
- size: s = "sm",
1491
- className: o,
1679
+ size: l = "sm",
1680
+ className: i,
1492
1681
  ...u
1493
1682
  }) {
1494
- const c = ae();
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: l(
1689
+ className: o(
1501
1690
  "inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
1502
- s === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
1503
- o
1691
+ l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
1692
+ i
1504
1693
  ),
1505
- children: n.map((m) => {
1506
- const h = m.value === a;
1507
- return /* @__PURE__ */ i(
1694
+ children: n.map((d) => {
1695
+ const f = d.value === t;
1696
+ return /* @__PURE__ */ s(
1508
1697
  "label",
1509
1698
  {
1510
- className: l(
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
- s === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
1514
- h ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
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: m.value,
1523
- checked: h,
1524
- onChange: () => r(m.value),
1711
+ value: d.value,
1712
+ checked: f,
1713
+ onChange: () => r(d.value),
1525
1714
  className: "sr-only"
1526
1715
  }
1527
1716
  ),
1528
- m.icon,
1529
- m.label
1717
+ d.icon,
1718
+ d.label
1530
1719
  ]
1531
1720
  },
1532
- m.value
1721
+ d.value
1533
1722
  );
1534
1723
  })
1535
1724
  }
1536
1725
  );
1537
1726
  }
1538
- const sa = p(({ className: a, orientation: r = "horizontal", decorative: n = !0, ...s }, o) => /* @__PURE__ */ e(
1539
- Nt.Root,
1727
+ const zr = p(({ className: t, orientation: r = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
1728
+ Rt.Root,
1540
1729
  {
1541
- ref: o,
1730
+ ref: i,
1542
1731
  decorative: n,
1543
1732
  orientation: r,
1544
- className: l(
1733
+ className: o(
1545
1734
  "shrink-0 bg-line",
1546
1735
  r === "horizontal" ? "h-px w-full" : "h-full w-px",
1547
- a
1736
+ t
1548
1737
  ),
1549
- ...s
1738
+ ...l
1550
1739
  }
1551
1740
  ));
1552
- sa.displayName = "Separator";
1553
- function Pa({ className: a, ...r }) {
1741
+ zr.displayName = "Separator";
1742
+ function Qr({ className: t, ...r }) {
1554
1743
  return /* @__PURE__ */ e(
1555
1744
  "div",
1556
1745
  {
1557
- className: l("animate-pulse rounded-md bg-elevated", a),
1746
+ className: o("animate-pulse rounded-md bg-elevated", t),
1558
1747
  ...r
1559
1748
  }
1560
1749
  );
1561
1750
  }
1562
- const Ma = q.Provider, Ea = q.Root, La = q.Trigger, oa = p(({ className: a, sideOffset: r = 6, ...n }, s) => /* @__PURE__ */ e(q.Portal, { children: /* @__PURE__ */ e(
1563
- q.Content,
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: s,
1754
+ ref: l,
1566
1755
  sideOffset: r,
1567
- className: l(
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
- a
1764
+ t
1576
1765
  ),
1577
1766
  ...n
1578
1767
  }
1579
1768
  ) }));
1580
- oa.displayName = "TooltipContent";
1769
+ kr.displayName = "TooltipContent";
1581
1770
  export {
1582
- fa as AgentPrompt,
1583
- Te as Avatar,
1584
- je as AvatarFallback,
1585
- Ie as AvatarImage,
1586
- St as Badge,
1587
- y as Button,
1588
- xa as Callout,
1589
- Tt as Card,
1590
- Pt as CardContent,
1591
- _t as CardDescription,
1592
- Mt as CardFooter,
1593
- It as CardHeader,
1594
- jt as CardTitle,
1595
- me as Checkbox,
1596
- va as ChoiceDialog,
1597
- Na as CodeBlock,
1598
- Ta as DataTable,
1599
- Da as DataTableIdentity,
1600
- Et as Dialog,
1601
- Rt as DialogBody,
1602
- ga as DialogClose,
1603
- _e as DialogContent,
1604
- $t as DialogDescription,
1605
- Ft as DialogFooter,
1606
- Bt as DialogHeader,
1607
- At as DialogPanel,
1608
- Pe as DialogTitle,
1609
- Lt as DialogTrigger,
1610
- oe as DropdownMenu,
1611
- Z as DropdownMenuCheckboxItem,
1612
- Y as DropdownMenuContent,
1613
- ya as DropdownMenuGroup,
1614
- ue as DropdownMenuItem,
1615
- ee as DropdownMenuLabel,
1616
- wa as DropdownMenuPortal,
1617
- be as DropdownMenuSeparator,
1618
- de as DropdownMenuTrigger,
1619
- Ia as EmptyState,
1620
- Ee as Input,
1621
- ja as Kbd,
1622
- ia as Label,
1623
- Gt as RadioCard,
1624
- Ht as RadioGroup,
1625
- _a as Segmented,
1626
- Ot as Select,
1627
- Ae as SelectContent,
1628
- Ca as SelectGroup,
1629
- Re as SelectItem,
1630
- Xt as SelectLabel,
1631
- Le as SelectTrigger,
1632
- Ut as SelectValue,
1633
- sa as Separator,
1634
- Pa as Skeleton,
1635
- yt as Spinner,
1636
- za as Table,
1637
- Qt as TableBody,
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
- Kt as TableContainer,
1640
- Zt as TableEmptyState,
1641
- Sa as TableHead,
1642
- ka as TableHeader,
1643
- Jt as TablePanel,
1644
- Yt as TableRow,
1645
- ra as TableSurface,
1646
- Ea as Tooltip,
1647
- oa as TooltipContent,
1648
- Ma as TooltipProvider,
1649
- La as TooltipTrigger,
1650
- zt as badgeVariants,
1651
- wt as buttonVariants
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