@jinaan/uikit 0.1.21 → 0.1.23

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