@jinaan/uikit 0.1.0 → 0.1.1

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