@jinaan/uikit 0.1.20 → 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 X, Copy as Fe, XCircle as zt, Warning as kt, CheckCircle as Dt, Info as Tt, Minus as Mt, X as le, CaretRight as Pt, CaretDown as ee, 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 V, 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 W 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
- }, z = 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
- }, k) => {
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: k,
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
- z.displayName = "Button";
126
- function qa({
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
- z,
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(X, { 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: kt,
248
+ Icon: Gt,
243
249
  className: "border-warning/30 bg-warning/10",
244
250
  iconClassName: "text-warning"
245
251
  },
246
252
  error: {
247
- Icon: zt,
253
+ Icon: qt,
248
254
  className: "border-error/30 bg-error/10",
249
255
  iconClassName: "text-error"
250
256
  }
251
257
  };
252
- function Ga({
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 Ha({ 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 Va({ 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 Ua({ 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 Ua({ 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
- z,
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(X, { 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, k = te(N);
580
- k.current = N;
581
- const S = t !== void 0;
582
- V(() => ca(), []), V(() => {
583
- t && (p.current && clearTimeout(p.current), g.current = !1, h(!1));
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));
584
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
- k.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 Wa = M.Close, Ye = b(
628
- ({ variant: t = "secondary", children: a = "Cancel", ...r }, l) => /* @__PURE__ */ e(M.Close, { asChild: !0, children: /* @__PURE__ */ e(z, { 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 Xa({
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, k] = 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 && k(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 Xa({
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(z, { 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 Ja({ 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(X, { 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,175 +936,189 @@ function Ja({ 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": k,
973
- disabled: S,
978
+ "aria-describedby": T,
979
+ disabled: k,
974
980
  readOnly: w,
975
981
  ...I
976
982
  }, y) => {
977
- const B = de(), J = N ?? B, F = !!p, _ = !!(c && (u !== void 0 ? String(u).length > 0 : h !== void 0 && String(h).length > 0)), Q = F ? `${J}-description` : void 0, ue = [k, Q].filter(Boolean).join(" ") || void 0, Y = /* @__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: J,
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 ? Y : /* @__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
- Y,
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: Q,
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
1085
  U,
1080
- rt
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 Qa = C.Group, Ya = C.Portal, re = b(({ className: t, sideOffset: a = 8, ...r }, l) => /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ e(
1097
- C.Content,
1102
+ te.displayName = "DropdownMenuTrigger";
1103
+ const mt = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1104
+ ie,
1098
1105
  {
1099
- ref: l,
1106
+ ref: n,
1107
+ "aria-hidden": !0,
1108
+ className: o(
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",
1110
+ t
1111
+ ),
1112
+ ...a
1113
+ }
1114
+ ));
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,
1118
+ {
1119
+ ref: i,
1100
1120
  sideOffset: a,
1101
- className: i(
1121
+ className: o(
1102
1122
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1103
1123
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1104
1124
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1108,76 +1128,76 @@ const Qa = C.Group, Ya = C.Portal, re = b(({ className: t, sideOffset: a = 8, ..
1108
1128
  "duration-150 ease-out",
1109
1129
  t
1110
1130
  ),
1111
- ...r
1131
+ ...n
1112
1132
  }
1113
1133
  ) }));
1114
- re.displayName = "DropdownMenuContent";
1115
- const oe = b(({ className: t, inset: a, ...r }, l) => /* @__PURE__ */ e(
1116
- C.Item,
1134
+ ae.displayName = "DropdownMenuContent";
1135
+ const oe = b(({ className: t, inset: a, ...n }, i) => /* @__PURE__ */ e(
1136
+ S.Item,
1117
1137
  {
1118
- ref: l,
1119
- className: i(
1138
+ ref: i,
1139
+ className: o(
1120
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",
1121
1141
  "focus:bg-(--menu-highlight) data-disabled:pointer-events-none data-disabled:opacity-50",
1122
1142
  "[&_svg]:size-4 [&_svg]:text-muted",
1123
1143
  a && "pl-8",
1124
1144
  t
1125
1145
  ),
1126
- ...r
1146
+ ...n
1127
1147
  }
1128
1148
  ));
1129
1149
  oe.displayName = "DropdownMenuItem";
1130
- const U = b(({ className: t, children: a, checked: r, ...l }, o) => /* @__PURE__ */ s(
1131
- C.CheckboxItem,
1150
+ const U = b(({ className: t, children: a, checked: n, ...i }, l) => /* @__PURE__ */ s(
1151
+ S.CheckboxItem,
1132
1152
  {
1133
- ref: o,
1134
- className: i(
1153
+ ref: l,
1154
+ className: o(
1135
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)",
1136
1156
  t
1137
1157
  ),
1138
- checked: r,
1139
- ...l,
1158
+ checked: n,
1159
+ ...i,
1140
1160
  children: [
1141
- /* @__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(X, { 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" }) }) }),
1142
1162
  a
1143
1163
  ]
1144
1164
  }
1145
1165
  ));
1146
1166
  U.displayName = "DropdownMenuCheckboxItem";
1147
- const ne = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1148
- C.Label,
1167
+ const re = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1168
+ S.Label,
1149
1169
  {
1150
- ref: r,
1151
- 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),
1152
1172
  ...a
1153
1173
  }
1154
1174
  ));
1155
- ne.displayName = "DropdownMenuLabel";
1156
- const Za = C.Sub, rt = b(({ className: t, inset: a, children: r, ...l }, o) => /* @__PURE__ */ s(
1157
- 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,
1158
1178
  {
1159
- ref: o,
1160
- className: i(
1179
+ ref: l,
1180
+ className: o(
1161
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",
1162
1182
  "focus:bg-(--menu-highlight) data-[state=open]:bg-(--menu-highlight)",
1163
1183
  "[&_svg]:size-4 [&_svg]:text-muted",
1164
1184
  a && "pl-8",
1165
1185
  t
1166
1186
  ),
1167
- ...l,
1187
+ ...i,
1168
1188
  children: [
1169
- r,
1170
- /* @__PURE__ */ e(Pt, { className: "ml-auto shrink-0" })
1189
+ n,
1190
+ /* @__PURE__ */ e(Ot, { className: "ml-auto shrink-0" })
1171
1191
  ]
1172
1192
  }
1173
1193
  ));
1174
- rt.displayName = "DropdownMenuSubTrigger";
1175
- const Sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1176
- C.SubContent,
1194
+ pt.displayName = "DropdownMenuSubTrigger";
1195
+ const Ga = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1196
+ S.SubContent,
1177
1197
  {
1178
- ref: r,
1198
+ ref: n,
1179
1199
  sideOffset: 8,
1180
- className: i(
1200
+ className: o(
1181
1201
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1182
1202
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1183
1203
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1190,54 +1210,53 @@ const Sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1190
1210
  ...a
1191
1211
  }
1192
1212
  ));
1193
- Sa.displayName = "DropdownMenuSubContent";
1194
- const Ne = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1195
- C.Separator,
1213
+ Ga.displayName = "DropdownMenuSubContent";
1214
+ const ye = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1215
+ S.Separator,
1196
1216
  {
1197
- ref: r,
1198
- 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),
1199
1219
  ...a
1200
1220
  }
1201
1221
  ));
1202
- Ne.displayName = "DropdownMenuSeparator";
1203
- const Oa = D.Group, za = D.Value;
1204
- function ka({
1222
+ ye.displayName = "DropdownMenuSeparator";
1223
+ const hr = M.Group, Ha = M.Value;
1224
+ function Va({
1205
1225
  children: t,
1206
1226
  disabled: a,
1207
- ...r
1227
+ ...n
1208
1228
  }) {
1209
- const l = Se(t, [ze]) === 0;
1210
- 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 });
1211
1231
  }
1212
- const nt = b(({ className: t, children: a, variant: r = "field", ...l }, o) => /* @__PURE__ */ s(
1213
- D.Trigger,
1232
+ const ft = b(({ className: t, children: a, variant: n = "field", ...i }, l) => /* @__PURE__ */ s(
1233
+ M.Trigger,
1214
1234
  {
1215
- ref: o,
1216
- className: i(
1217
- "flex items-center justify-between gap-2 text-sm text-fg",
1235
+ ref: l,
1236
+ className: o(
1237
+ "group flex items-center justify-between gap-2 text-sm text-fg",
1218
1238
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
1219
1239
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1220
- "[&>span]:truncate",
1221
- 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",
1222
- 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",
1223
1242
  t
1224
1243
  ),
1225
- ...l,
1244
+ ...i,
1226
1245
  children: [
1227
- a,
1228
- /* @__PURE__ */ e(D.Icon, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "size-3.5 text-subtle" }) })
1246
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: a }),
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" }) })
1229
1248
  ]
1230
1249
  }
1231
1250
  ));
1232
- nt.displayName = "SelectTrigger";
1233
- const lt = b(
1234
- ({ className: t, children: a, position: r = "popper", sideOffset: l = 8, ...o }, d) => /* @__PURE__ */ e(D.Portal, { children: /* @__PURE__ */ e(
1235
- 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,
1236
1255
  {
1237
- ref: d,
1238
- position: r,
1239
- sideOffset: l,
1240
- className: i(
1256
+ ref: c,
1257
+ position: n,
1258
+ sideOffset: i,
1259
+ className: o(
1241
1260
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1242
1261
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1243
1262
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1247,78 +1266,78 @@ const lt = b(
1247
1266
  "duration-150 ease-out",
1248
1267
  t
1249
1268
  ),
1250
- ...o,
1251
- children: /* @__PURE__ */ e(D.Viewport, { className: "p-0", children: a })
1269
+ ...l,
1270
+ children: /* @__PURE__ */ e(M.Viewport, { className: "p-0", children: a })
1252
1271
  }
1253
1272
  ) })
1254
1273
  );
1255
- lt.displayName = "SelectContent";
1256
- const ze = b(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
1257
- D.Item,
1274
+ bt.displayName = "SelectContent";
1275
+ const ze = b(({ className: t, children: a, ...n }, i) => /* @__PURE__ */ s(
1276
+ M.Item,
1258
1277
  {
1259
- ref: l,
1260
- className: i(
1278
+ ref: i,
1279
+ className: o(
1261
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",
1262
1281
  t
1263
1282
  ),
1264
- ...r,
1283
+ ...n,
1265
1284
  children: [
1266
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(D.ItemIndicator, { children: /* @__PURE__ */ e(X, { className: "size-3.5" }) }) }),
1267
- /* @__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 })
1268
1287
  ]
1269
1288
  }
1270
1289
  ));
1271
1290
  ze.displayName = "SelectItem";
1272
- const Da = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1273
- D.Label,
1291
+ const Ua = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1292
+ M.Label,
1274
1293
  {
1275
- ref: r,
1276
- 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),
1277
1296
  ...a
1278
1297
  }
1279
1298
  ));
1280
- Da.displayName = "SelectLabel";
1281
- function Ta({
1299
+ Ua.displayName = "SelectLabel";
1300
+ function Oa({
1282
1301
  icon: t,
1283
1302
  title: a,
1284
- description: r,
1285
- action: l,
1286
- className: o
1303
+ description: n,
1304
+ action: i,
1305
+ className: l
1287
1306
  }) {
1288
1307
  return /* @__PURE__ */ s(
1289
1308
  "div",
1290
1309
  {
1291
- className: i(
1310
+ className: o(
1292
1311
  "flex min-h-[22rem] flex-col items-center justify-center gap-5 px-6 py-16 text-center",
1293
- o
1312
+ l
1294
1313
  ),
1295
1314
  children: [
1296
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,
1297
1316
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
1298
1317
  /* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold leading-tight text-table-header-active", children: a }),
1299
- 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
1300
1319
  ] }),
1301
- 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
1302
1321
  ]
1303
1322
  }
1304
1323
  );
1305
1324
  }
1306
- const Ma = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
1307
- function Pa(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) {
1308
1327
  return t.split(/\s+/).slice(0, 2).map((a) => {
1309
- var r;
1310
- return ((r = a[0]) == null ? void 0 : r.toUpperCase()) ?? "";
1328
+ var n;
1329
+ return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
1311
1330
  }).join("");
1312
1331
  }
1313
- function Ka({
1332
+ function gr({
1314
1333
  name: t,
1315
1334
  secondary: a,
1316
- image: r
1335
+ image: n
1317
1336
  }) {
1318
1337
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
1319
- /* @__PURE__ */ s(Ge, { className: "size-8", children: [
1320
- r ? /* @__PURE__ */ e(He, { src: r, alt: "" }) : null,
1321
- /* @__PURE__ */ e(Ve, { children: Pa(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) })
1322
1341
  ] }),
1323
1342
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
1324
1343
  /* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
@@ -1326,277 +1345,324 @@ function Ka({
1326
1345
  ] })
1327
1346
  ] });
1328
1347
  }
1329
- function er({
1348
+ function xr({
1330
1349
  rows: t,
1331
1350
  columns: a,
1332
- getRowId: r,
1333
- loading: l = !1,
1334
- error: o,
1335
- empty: d,
1336
- search: c,
1337
- filters: u,
1351
+ getRowId: n,
1352
+ loading: i = !1,
1353
+ error: l,
1354
+ empty: c,
1355
+ search: u,
1356
+ filters: m,
1338
1357
  toolbarStart: h,
1339
1358
  toolbarEnd: g,
1340
- tabs: p,
1359
+ tabs: f,
1341
1360
  activeTab: N,
1342
- onTabChange: k,
1343
- infoBanner: S,
1361
+ onTabChange: T,
1362
+ infoBanner: k,
1344
1363
  selectable: w = !1,
1345
1364
  bulkActions: I,
1346
1365
  rowActions: y,
1347
1366
  onRowClick: B,
1348
- defaultSort: J,
1367
+ defaultSort: X,
1349
1368
  pageSize: F = 25,
1350
1369
  pageSizeOptions: _ = [10, 25, 50, 100],
1351
- tone: Q,
1370
+ tone: J,
1352
1371
  headerAction: ue,
1353
- headerClassName: Y,
1354
- panelClassName: it,
1355
- className: ot
1372
+ headerClassName: Q,
1373
+ panelClassName: ht,
1374
+ className: gt
1356
1375
  }) {
1357
- const [ke, De] = T(
1376
+ const [De, Te] = C(
1358
1377
  () => Object.fromEntries(
1359
- 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])
1360
1379
  )
1361
- ), [x, st] = T(
1362
- J ?? null
1363
- ), [$, Z] = T(0), [L, dt] = T(F), [R, me] = T(/* @__PURE__ */ new Set()), [ct, pe] = T([]), j = a.filter((n) => !ke[n.id]), Te = a.filter((n) => ke[n.id] && !n.required), be = (u ?? []).filter((n) => ct.includes(n.id)), ut = (u ?? []).map((n) => `${n.id}:${n.value.join(",")}`).join("|"), O = je(() => {
1364
- let n = t;
1365
- for (const f of u ?? [])
1366
- f.value.length > 0 && (n = n.filter((v) => f.match(v, f.value)));
1367
- if (!c || !c.value.trim()) return n;
1368
- const m = c.value.trim().toLowerCase();
1369
- return n.filter((f) => c.keys(f).toLowerCase().includes(m));
1370
- }, [t, c, u]), q = je(() => {
1371
- if (!x) return O;
1372
- const n = a.find((f) => f.id === x.id);
1373
- if (!(n != null && n.sortValue)) return O;
1374
- const m = x.dir === "asc" ? 1 : -1;
1375
- return [...O].sort((f, v) => {
1376
- const P = n.sortValue(f), H = n.sortValue(v);
1377
- 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));
1378
1387
  });
1379
- }, [O, x, a]), G = Math.max(1, Math.ceil(q.length / L));
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;
1407
+ });
1408
+ }, [Z, v, a]), G = Math.max(1, Math.ceil(q.length / L));
1380
1409
  V(() => {
1381
- Z(0);
1382
- }, [c == null ? void 0 : c.value, L, x == null ? void 0 : x.id, x == null ? void 0 : x.dir, N, ut]), V(() => {
1383
- $ > G - 1 && Z(G - 1);
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);
1384
1413
  }, [$, G]);
1385
- const K = $ * L, E = q.slice(K, K + L), mt = (n) => {
1386
- n.sortable && st(
1387
- (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" }
1388
1417
  );
1389
- }, 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 = () => {
1390
- me((n) => {
1391
- const m = new Set(n);
1392
- 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;
1393
1422
  });
1394
- }, ht = (n) => {
1395
- me((m) => {
1396
- const f = new Set(m);
1397
- 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;
1398
1427
  });
1399
- }, 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 = [
1400
1429
  ...w ? ["2.75rem"] : [],
1401
- ...Nt,
1430
+ ...Rt,
1402
1431
  ...y ? ["11rem"] : []
1403
- ], yt = (n) => (x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? "ascending" : "descending" : void 0;
1404
- return /* @__PURE__ */ s("div", { className: i("space-y-4", ot), children: [
1405
- p && p.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: p.map((n) => {
1406
- 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;
1407
1436
  return /* @__PURE__ */ e(
1408
1437
  "button",
1409
1438
  {
1410
1439
  type: "button",
1411
1440
  role: "tab",
1412
- "aria-selected": m,
1413
- onClick: () => k == null ? void 0 : k(n.id),
1414
- className: i(
1441
+ "aria-selected": d,
1442
+ onClick: () => T == null ? void 0 : T(r.id),
1443
+ className: o(
1415
1444
  "-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
1416
- 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"
1417
1446
  ),
1418
- children: n.label
1447
+ children: r.label
1419
1448
  },
1420
- n.id
1449
+ r.id
1421
1450
  );
1422
1451
  }) }),
1423
- gt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1424
- c && /* @__PURE__ */ e(
1425
- tt,
1452
+ jt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1453
+ u && /* @__PURE__ */ e(
1454
+ ct,
1426
1455
  {
1427
1456
  type: "search",
1428
- "aria-label": c.placeholder ?? "Search",
1429
- placeholder: c.placeholder ?? "Search...",
1430
- value: c.value,
1431
- onChange: (n) => c.onChange(n.target.value),
1432
- onClear: () => c.onChange(""),
1433
- 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, {}),
1434
1463
  containerClassName: "w-full sm:w-[280px]",
1435
1464
  className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
1436
1465
  }
1437
1466
  ),
1438
1467
  h,
1439
- /* @__PURE__ */ s(ge, { children: [
1440
- /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
1441
- z,
1468
+ /* @__PURE__ */ s(xe, { children: [
1469
+ /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
1470
+ D,
1442
1471
  {
1443
1472
  variant: "secondary",
1444
1473
  size: "md",
1445
- leadingIcon: /* @__PURE__ */ e(jt, {}),
1446
- trailingIcon: /* @__PURE__ */ e(ee, {}),
1474
+ leadingIcon: /* @__PURE__ */ e(Xt, {}),
1475
+ trailingIcon: /* @__PURE__ */ e(mt, {}),
1447
1476
  children: "Columns"
1448
1477
  }
1449
1478
  ) }),
1450
- /* @__PURE__ */ s(re, { align: "end", className: "w-54", children: [
1451
- /* @__PURE__ */ e(ne, { className: "text-[13px]", children: "Active columns" }),
1452
- j.map((n) => /* @__PURE__ */ s(
1453
- U,
1454
- {
1455
- checked: !0,
1456
- disabled: n.required,
1457
- onCheckedChange: () => De((m) => ({ ...m, [n.id]: !0 })),
1458
- onSelect: (m) => m.preventDefault(),
1459
- className: "justify-between",
1460
- children: [
1461
- /* @__PURE__ */ e("span", { children: n.header }),
1462
- n.required ? /* @__PURE__ */ e(Et, { className: "size-3.5 text-subtle", "aria-hidden": !0 }) : null
1463
- ]
1464
- },
1465
- n.id
1466
- )),
1467
- Te.length > 0 ? /* @__PURE__ */ s(Be, { children: [
1468
- /* @__PURE__ */ e(Ne, {}),
1469
- /* @__PURE__ */ e(ne, { className: "text-[13px]", children: "Available columns" }),
1470
- Te.map((n) => /* @__PURE__ */ e(
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(
1471
1537
  U,
1472
1538
  {
1473
1539
  checked: !1,
1474
- onCheckedChange: () => De((m) => ({ ...m, [n.id]: !1 })),
1475
- onSelect: (m) => m.preventDefault(),
1476
- children: n.header
1540
+ onCheckedChange: () => kt(r.id),
1541
+ onSelect: (d) => d.preventDefault(),
1542
+ children: r.header
1477
1543
  },
1478
- n.id
1544
+ r.id
1479
1545
  ))
1480
1546
  ] }) : null
1481
1547
  ] })
1482
1548
  ] }),
1483
- u && u.length > 0 ? /* @__PURE__ */ s(ge, { children: [
1484
- /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
1485
- z,
1549
+ m && m.length > 0 ? /* @__PURE__ */ s(xe, { children: [
1550
+ /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
1551
+ D,
1486
1552
  {
1487
1553
  variant: "secondary",
1488
1554
  size: "md",
1489
1555
  iconOnly: !0,
1490
1556
  "aria-label": "Add filter",
1491
- children: /* @__PURE__ */ e(Ie, {})
1557
+ children: /* @__PURE__ */ e($e, {})
1492
1558
  }
1493
1559
  ) }),
1494
- /* @__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(
1495
1561
  oe,
1496
1562
  {
1497
- onSelect: () => pe(
1498
- (m) => m.includes(n.id) ? m : [...m, n.id]
1563
+ onSelect: () => fe(
1564
+ (d) => d.includes(r.id) ? d : [...d, r.id]
1499
1565
  ),
1500
- children: n.label
1566
+ children: r.label
1501
1567
  },
1502
- n.id
1568
+ r.id
1503
1569
  )) })
1504
1570
  ] }) : null,
1505
1571
  g ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: g }) : null
1506
1572
  ] }),
1507
1573
  be.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1508
- be.map((n) => {
1509
- const m = () => {
1510
- 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));
1511
1577
  };
1512
1578
  return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
1513
1579
  /* @__PURE__ */ e(
1514
- z,
1580
+ D,
1515
1581
  {
1516
1582
  variant: "secondary",
1517
1583
  size: "md",
1518
1584
  iconOnly: !0,
1519
- "aria-label": `Remove ${n.label} filter`,
1585
+ "aria-label": `Remove ${r.label} filter`,
1520
1586
  className: "rounded-r-none",
1521
- onClick: m,
1522
- children: /* @__PURE__ */ e(le, {})
1587
+ onClick: d,
1588
+ children: /* @__PURE__ */ e(ne, {})
1523
1589
  }
1524
1590
  ),
1525
- /* @__PURE__ */ s(ge, { children: [
1526
- /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ s(z, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1527
- /* @__PURE__ */ e(Ie, {}),
1528
- /* @__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 }),
1529
1595
  /* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
1530
- /* @__PURE__ */ e("span", { className: "text-muted", children: n.value.length > 0 ? `${n.value.length} selected` : "Enter value" }),
1531
- /* @__PURE__ */ e(ee, { 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" })
1532
1598
  ] }) }),
1533
- /* @__PURE__ */ s(re, { align: "start", className: "w-56", children: [
1534
- /* @__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: [
1535
1601
  "Filter by ",
1536
- n.label
1602
+ r.label
1537
1603
  ] }),
1538
- n.options.map((f) => {
1539
- const v = n.value.includes(f.value);
1604
+ r.options.map((p) => {
1605
+ const x = r.value.includes(p.value);
1540
1606
  return /* @__PURE__ */ e(
1541
1607
  U,
1542
1608
  {
1543
- checked: v,
1544
- onCheckedChange: () => n.onChange(
1545
- 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]
1546
1612
  ),
1547
- onSelect: (P) => P.preventDefault(),
1548
- children: f.label
1613
+ onSelect: (z) => z.preventDefault(),
1614
+ children: p.label
1549
1615
  },
1550
- f.value
1616
+ p.value
1551
1617
  );
1552
1618
  }),
1553
- /* @__PURE__ */ e(Ne, {}),
1554
- /* @__PURE__ */ e(oe, { onSelect: m, children: "Clear filter" })
1619
+ /* @__PURE__ */ e(ye, {}),
1620
+ /* @__PURE__ */ e(oe, { onSelect: d, children: "Clear filter" })
1555
1621
  ] })
1556
1622
  ] })
1557
- ] }, n.id);
1623
+ ] }, r.id);
1558
1624
  }),
1559
1625
  /* @__PURE__ */ e(
1560
1626
  "button",
1561
1627
  {
1562
1628
  type: "button",
1563
1629
  onClick: () => {
1564
- for (const n of be) n.onChange([]);
1565
- pe([]);
1630
+ for (const r of be) r.onChange([]);
1631
+ fe([]);
1566
1632
  },
1567
1633
  className: "text-sm text-muted transition-colors hover:text-fg",
1568
1634
  children: "Clear filters"
1569
1635
  }
1570
1636
  )
1571
1637
  ] }) : null,
1572
- S,
1638
+ k,
1573
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: [
1574
1640
  /* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
1575
1641
  R.size,
1576
1642
  " selected"
1577
1643
  ] }),
1578
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (I ?? []).map((n) => /* @__PURE__ */ s(
1579
- z,
1644
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (I ?? []).map((r) => /* @__PURE__ */ s(
1645
+ D,
1580
1646
  {
1581
1647
  size: "md",
1582
- variant: n.variant ?? "outline",
1583
- disabled: n.disabled,
1584
- onClick: () => void n.onRun(bt),
1648
+ variant: r.variant ?? "outline",
1649
+ disabled: r.disabled,
1650
+ onClick: () => void r.onRun(Pt),
1585
1651
  children: [
1586
- n.icon,
1587
- n.label
1652
+ r.icon,
1653
+ r.label
1588
1654
  ]
1589
1655
  },
1590
- n.label
1656
+ r.label
1591
1657
  )) }),
1592
1658
  /* @__PURE__ */ s(
1593
1659
  "button",
1594
1660
  {
1595
1661
  type: "button",
1596
- onClick: () => me(/* @__PURE__ */ new Set()),
1662
+ onClick: () => pe(/* @__PURE__ */ new Set()),
1597
1663
  className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
1598
1664
  children: [
1599
- /* @__PURE__ */ e(le, { className: "size-3.5" }),
1665
+ /* @__PURE__ */ e(ne, { className: "size-3.5" }),
1600
1666
  "Clear"
1601
1667
  ]
1602
1668
  }
@@ -1606,112 +1672,112 @@ function er({
1606
1672
  ce,
1607
1673
  {
1608
1674
  action: ue,
1609
- tone: Q,
1610
- headerClassName: Y,
1611
- panelClassName: it,
1675
+ tone: J,
1676
+ headerClassName: Q,
1677
+ panelClassName: ht,
1612
1678
  header: (
1613
1679
  // Visible header: presentational so its controls stay focusable while
1614
1680
  // the body table carries the semantic column headers (sr-only).
1615
1681
  /* @__PURE__ */ s("table", { role: "presentation", className: "w-full table-fixed border-collapse", children: [
1616
- /* @__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)) }),
1617
1683
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
1618
1684
  w && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-4 align-middle", children: /* @__PURE__ */ e(
1619
- xe,
1685
+ ve,
1620
1686
  {
1621
1687
  "aria-label": "Select all rows",
1622
- checked: Me ? !0 : pt ? "indeterminate" : !1,
1623
- onCheckedChange: ft
1688
+ checked: Ae ? !0 : Mt ? "indeterminate" : !1,
1689
+ onCheckedChange: It
1624
1690
  }
1625
1691
  ) }),
1626
- j.map((n) => /* @__PURE__ */ e(
1692
+ E.map((r) => /* @__PURE__ */ e(
1627
1693
  "th",
1628
1694
  {
1629
- className: i(Ma, n.align === "right" && "text-right", n.className),
1630
- children: n.sortable ? /* @__PURE__ */ s(
1631
- z,
1695
+ className: o(Wa, r.align === "right" && "text-right", r.className),
1696
+ children: r.sortable ? /* @__PURE__ */ s(
1697
+ D,
1632
1698
  {
1633
1699
  type: "button",
1634
1700
  variant: "ghost",
1635
1701
  size: "xs",
1636
- "aria-label": `Sort by ${n.header}`,
1637
- onClick: () => mt(n),
1638
- className: i(
1702
+ "aria-label": `Sort by ${r.header}`,
1703
+ onClick: () => Tt(r),
1704
+ className: o(
1639
1705
  "h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
1640
1706
  "hover:bg-transparent hover:text-table-header-active hover:shadow-none",
1641
1707
  "active:scale-100 active:bg-transparent active:shadow-none",
1642
- (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"
1643
1709
  ),
1644
1710
  children: [
1645
- n.header,
1646
- (x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? /* @__PURE__ */ e(Lt, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(ee, { 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" })
1647
1713
  ]
1648
1714
  }
1649
- ) : n.header
1715
+ ) : r.header
1650
1716
  },
1651
- n.id
1717
+ r.id
1652
1718
  )),
1653
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" }) })
1654
1720
  ] }) })
1655
1721
  ] })
1656
1722
  ),
1657
- 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: [
1658
- /* @__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" }) }),
1659
1725
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
1660
- /* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: o.title }),
1661
- 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
1662
1728
  ] }),
1663
- o.action
1664
- ] }) : E.length === 0 ? /* @__PURE__ */ e(
1665
- Ta,
1729
+ l.action
1730
+ ] }) : j.length === 0 ? /* @__PURE__ */ e(
1731
+ Oa,
1666
1732
  {
1667
- icon: d == null ? void 0 : d.icon,
1668
- title: (d == null ? void 0 : d.title) ?? "No results",
1669
- description: typeof (d == null ? void 0 : d.description) == "string" ? d.description : void 0,
1670
- 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
1671
1737
  }
1672
1738
  ) : /* @__PURE__ */ s("table", { className: "w-full table-fixed border-collapse", children: [
1673
- /* @__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)) }),
1674
1740
  /* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
1675
1741
  w && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
1676
- 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)),
1677
1743
  y && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
1678
1744
  ] }) }),
1679
- /* @__PURE__ */ e(Ot, { children: E.map((n) => {
1680
- 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);
1681
1747
  return /* @__PURE__ */ s(
1682
- Kt,
1748
+ ga,
1683
1749
  {
1684
- "data-state": f ? "selected" : void 0,
1685
- onClick: B ? () => B(n) : void 0,
1750
+ "data-state": p ? "selected" : void 0,
1751
+ onClick: B ? () => B(r) : void 0,
1686
1752
  className: B ? "cursor-pointer" : void 0,
1687
1753
  children: [
1688
- w && /* @__PURE__ */ e(fe, { className: "w-11 px-4", onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
1689
- xe,
1754
+ w && /* @__PURE__ */ e(he, { className: "w-11 px-4", onClick: (x) => x.stopPropagation(), children: /* @__PURE__ */ e(
1755
+ ve,
1690
1756
  {
1691
1757
  "aria-label": "Select row",
1692
- checked: f,
1693
- onCheckedChange: () => ht(m)
1758
+ checked: p,
1759
+ onCheckedChange: () => Et(d)
1694
1760
  }
1695
1761
  ) }),
1696
- j.map((v) => /* @__PURE__ */ e(
1697
- fe,
1762
+ E.map((x) => /* @__PURE__ */ e(
1763
+ he,
1698
1764
  {
1699
- "data-numeric": v.numeric ? "" : void 0,
1700
- className: i(v.align === "right" && "text-right", v.className),
1701
- 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)
1702
1768
  },
1703
- v.id
1769
+ x.id
1704
1770
  )),
1705
- 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) })
1706
1772
  ]
1707
1773
  },
1708
- m
1774
+ d
1709
1775
  );
1710
1776
  }) })
1711
1777
  ] })
1712
1778
  }
1713
1779
  ),
1714
- !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: [
1715
1781
  /* @__PURE__ */ s("span", { className: "text-muted", children: [
1716
1782
  K + 1,
1717
1783
  "–",
@@ -1720,30 +1786,30 @@ function er({
1720
1786
  q.length
1721
1787
  ] }),
1722
1788
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1723
- /* @__PURE__ */ s(ka, { value: String(L), onValueChange: (n) => dt(Number(n)), children: [
1724
- /* @__PURE__ */ e(nt, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ e(za, {}) }),
1725
- /* @__PURE__ */ e(lt, { children: _.map((n) => /* @__PURE__ */ s(ze, { value: String(n), children: [
1726
- 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,
1727
1793
  " / page"
1728
- ] }, n)) })
1794
+ ] }, r)) })
1729
1795
  ] }),
1730
1796
  /* @__PURE__ */ e(
1731
- z,
1797
+ D,
1732
1798
  {
1733
1799
  variant: "outline",
1734
1800
  size: "md",
1735
1801
  disabled: $ <= 0,
1736
- onClick: () => Z((n) => Math.max(0, n - 1)),
1802
+ onClick: () => Y((r) => Math.max(0, r - 1)),
1737
1803
  children: "Previous"
1738
1804
  }
1739
1805
  ),
1740
1806
  /* @__PURE__ */ e(
1741
- z,
1807
+ D,
1742
1808
  {
1743
1809
  variant: "outline",
1744
1810
  size: "md",
1745
1811
  disabled: $ >= G - 1,
1746
- onClick: () => Z((n) => Math.min(G - 1, n + 1)),
1812
+ onClick: () => Y((r) => Math.min(G - 1, r + 1)),
1747
1813
  children: "Next"
1748
1814
  }
1749
1815
  )
@@ -1751,21 +1817,21 @@ function er({
1751
1817
  ] })
1752
1818
  ] });
1753
1819
  }
1754
- function tr({ icon: t, title: a, description: r, action: l, className: o }) {
1755
- 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: [
1756
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,
1757
1823
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
1758
1824
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
1759
- 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
1760
1826
  ] }),
1761
- l
1827
+ i
1762
1828
  ] }) });
1763
1829
  }
1764
- function ar({ className: t, ...a }) {
1830
+ function Nr({ className: t, ...a }) {
1765
1831
  return /* @__PURE__ */ e(
1766
1832
  "kbd",
1767
1833
  {
1768
- className: i(
1834
+ className: o(
1769
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",
1770
1836
  t
1771
1837
  ),
@@ -1773,46 +1839,46 @@ function ar({ className: t, ...a }) {
1773
1839
  }
1774
1840
  );
1775
1841
  }
1776
- const Ia = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
1777
- qt.Root,
1842
+ const Ja = b(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1843
+ na.Root,
1778
1844
  {
1779
- ref: r,
1780
- className: i(
1845
+ ref: n,
1846
+ className: o(
1781
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",
1782
1848
  t
1783
1849
  ),
1784
1850
  ...a
1785
1851
  }
1786
1852
  ));
1787
- Ia.displayName = "Label";
1788
- function rr({
1853
+ Ja.displayName = "Label";
1854
+ function yr({
1789
1855
  value: t,
1790
1856
  onValueChange: a,
1791
- options: r,
1792
- size: l = "sm",
1793
- className: o,
1794
- ...d
1857
+ options: n,
1858
+ size: i = "sm",
1859
+ className: l,
1860
+ ...c
1795
1861
  }) {
1796
- const c = de();
1862
+ const u = de();
1797
1863
  return /* @__PURE__ */ e(
1798
1864
  "div",
1799
1865
  {
1800
1866
  role: "radiogroup",
1801
- "aria-label": d["aria-label"],
1802
- className: i(
1867
+ "aria-label": c["aria-label"],
1868
+ className: o(
1803
1869
  "inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
1804
- l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
1805
- o
1870
+ i === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
1871
+ l
1806
1872
  ),
1807
- children: r.map((u) => {
1808
- const h = u.value === t;
1873
+ children: n.map((m) => {
1874
+ const h = m.value === t;
1809
1875
  return /* @__PURE__ */ s(
1810
1876
  "label",
1811
1877
  {
1812
- className: i(
1878
+ className: o(
1813
1879
  "inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
1814
1880
  "has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
1815
- 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)",
1816
1882
  h ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
1817
1883
  ),
1818
1884
  children: [
@@ -1820,53 +1886,53 @@ function rr({
1820
1886
  "input",
1821
1887
  {
1822
1888
  type: "radio",
1823
- name: c,
1824
- value: u.value,
1889
+ name: u,
1890
+ value: m.value,
1825
1891
  checked: h,
1826
- onChange: () => a(u.value),
1892
+ onChange: () => a(m.value),
1827
1893
  className: "sr-only"
1828
1894
  }
1829
1895
  ),
1830
- u.icon,
1831
- u.label
1896
+ m.icon,
1897
+ m.label
1832
1898
  ]
1833
1899
  },
1834
- u.value
1900
+ m.value
1835
1901
  );
1836
1902
  })
1837
1903
  }
1838
1904
  );
1839
1905
  }
1840
- const ja = b(({ className: t, orientation: a = "horizontal", decorative: r = !0, ...l }, o) => /* @__PURE__ */ e(
1841
- Gt.Root,
1906
+ const Qa = b(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...i }, l) => /* @__PURE__ */ e(
1907
+ ia.Root,
1842
1908
  {
1843
- ref: o,
1844
- decorative: r,
1909
+ ref: l,
1910
+ decorative: n,
1845
1911
  orientation: a,
1846
- className: i(
1912
+ className: o(
1847
1913
  "shrink-0 bg-line",
1848
1914
  a === "horizontal" ? "h-px w-full" : "h-full w-px",
1849
1915
  t
1850
1916
  ),
1851
- ...l
1917
+ ...i
1852
1918
  }
1853
1919
  ));
1854
- ja.displayName = "Separator";
1855
- function nr({ className: t, ...a }) {
1920
+ Qa.displayName = "Separator";
1921
+ function wr({ className: t, ...a }) {
1856
1922
  return /* @__PURE__ */ e(
1857
1923
  "div",
1858
1924
  {
1859
- className: i("animate-pulse rounded-md bg-elevated", t),
1925
+ className: o("animate-pulse rounded-md bg-elevated", t),
1860
1926
  ...a
1861
1927
  }
1862
1928
  );
1863
1929
  }
1864
- const lr = W.Provider, ir = W.Root, or = W.Trigger, Ea = b(({ className: t, sideOffset: a = 6, ...r }, l) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
1865
- W.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,
1866
1932
  {
1867
- ref: l,
1933
+ ref: i,
1868
1934
  sideOffset: a,
1869
- className: i(
1935
+ className: o(
1870
1936
  "z-50 overflow-hidden rounded-md border border-line bg-elevated px-2 py-1 text-xs text-fg shadow-md",
1871
1937
  "data-[state=delayed-open]:animate-in data-[state=closed]:animate-out",
1872
1938
  "data-[state=delayed-open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1876,84 +1942,85 @@ const lr = W.Provider, ir = W.Root, or = W.Trigger, Ea = b(({ className: t, side
1876
1942
  "duration-150 ease-out",
1877
1943
  t
1878
1944
  ),
1879
- ...r
1945
+ ...n
1880
1946
  }
1881
1947
  ) }));
1882
- Ea.displayName = "TooltipContent";
1948
+ Ya.displayName = "TooltipContent";
1883
1949
  export {
1884
- qa as AgentPrompt,
1885
- Ge as Avatar,
1886
- Ve as AvatarFallback,
1887
- He as AvatarImage,
1888
- Jt as Badge,
1889
- z as Button,
1890
- Ga as Callout,
1891
- na as Card,
1892
- oa as CardContent,
1893
- ia as CardDescription,
1894
- sa as CardFooter,
1895
- Ue as CardHeader,
1896
- la as CardTitle,
1897
- xe as Checkbox,
1898
- Xa as ChoiceDialog,
1899
- Ja as CodeBlock,
1900
- er as DataTable,
1901
- Ka as DataTableIdentity,
1902
- pa as Dialog,
1903
- fa as DialogBody,
1904
- Ye as DialogCancel,
1905
- Wa as DialogClose,
1906
- Oe as DialogContent,
1907
- xa as DialogDescription,
1908
- ga as DialogFooter,
1909
- ha as DialogHeader,
1910
- ba as DialogPanel,
1911
- Ke as DialogTitle,
1912
- Qe as DialogTrigger,
1913
- ge as DropdownMenu,
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,
1914
1980
  U as DropdownMenuCheckboxItem,
1915
- re as DropdownMenuContent,
1916
- Qa as DropdownMenuGroup,
1981
+ mt as DropdownMenuChevron,
1982
+ ae as DropdownMenuContent,
1983
+ pr as DropdownMenuGroup,
1917
1984
  oe as DropdownMenuItem,
1918
- ne as DropdownMenuLabel,
1919
- Ya as DropdownMenuPortal,
1920
- Ne as DropdownMenuSeparator,
1921
- Za as DropdownMenuSub,
1922
- Sa as DropdownMenuSubContent,
1923
- rt as DropdownMenuSubTrigger,
1924
- ae as DropdownMenuTrigger,
1925
- tr as EmptyState,
1926
- tt as Input,
1927
- ar as Kbd,
1928
- Ia as Label,
1929
- Na as RadioCard,
1930
- va as RadioGroup,
1931
- rr as Segmented,
1932
- ka as Select,
1933
- lt as SelectContent,
1934
- Oa as SelectGroup,
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,
1935
2002
  ze as SelectItem,
1936
- Da as SelectLabel,
1937
- nt as SelectTrigger,
1938
- za as SelectValue,
1939
- ja as Separator,
1940
- nr as Skeleton,
1941
- Ht as Spinner,
1942
- Ha as Table,
1943
- Ot as TableBody,
1944
- fe as TableCell,
1945
- Yt as TableContainer,
1946
- Ta as TableEmptyState,
1947
- Ua as TableHead,
1948
- Va as TableHeader,
1949
- Zt as TablePanel,
1950
- Kt as TableRow,
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,
1951
2018
  ce as TableSurface,
1952
- ir as Tooltip,
1953
- Ea as TooltipContent,
1954
- lr as TooltipProvider,
1955
- or as TooltipTrigger,
1956
- Wt as badgeVariants,
1957
- 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
1958
2025
  };
1959
2026
  //# sourceMappingURL=index.js.map