@jinaan/uikit 0.1.21 → 0.1.24

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