@nivaro/react 0.3.123 → 0.3.124

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.
@@ -1,62 +1,62 @@
1
1
  import { jsxs as s, Fragment as U, jsx as t } from "react/jsx-runtime";
2
- import { Search as gt, Pin as kt, ChevronDown as vt, Inbox as Nt, ChevronsUpDown as be, ChevronUp as wt, X as pe, Check as _t, CalendarDays as Ot } from "lucide-react";
3
- import St, { useState as $, useMemo as Qe, useRef as oe, useEffect as re, useLayoutEffect as $t } from "react";
4
- import { parseDateFilter as Ye, describeDateFilter as zt, DATE_FILTER_OPS as Et, formatDateFilter as Ct } from "../lib/date-filter.js";
5
- import { useKeepRowCheckboxFocus as Mt } from "../lib/keep-row-focus.js";
6
- import { parseNumberFilter as Ze, describeNumberFilter as Tt, NUMBER_FILTER_OPS as At, formatNumberFilter as jt } from "../lib/number-filter.js";
7
- import { ROW_SURFACE_SELECTED as Vt, ROW_SURFACE as Wt, ROW_SURFACE_HOVER as Bt } from "../lib/row-surface.js";
8
- import { fitPins as Lt } from "../lib/table-pins.js";
9
- import { useBelowMd as Ft } from "../lib/use-below-md.js";
2
+ import { Search as vt, Pin as Nt, ChevronDown as wt, Inbox as _t, ChevronsUpDown as me, ChevronUp as Ot, X as he, Check as St, CalendarDays as $t } from "lucide-react";
3
+ import zt, { useState as $, useMemo as Ye, useRef as be, useEffect as re, useLayoutEffect as Et } from "react";
4
+ import { parseDateFilter as Ze, describeDateFilter as Ct, DATE_FILTER_OPS as Mt, formatDateFilter as Tt } from "../lib/date-filter.js";
5
+ import { useKeepRowCheckboxFocus as At } from "../lib/keep-row-focus.js";
6
+ import { parseNumberFilter as Ie, describeNumberFilter as jt, NUMBER_FILTER_OPS as Vt, formatNumberFilter as Wt } from "../lib/number-filter.js";
7
+ import { ROW_SURFACE_SELECTED as Bt, ROW_SURFACE as Ft, ROW_SURFACE_HOVER as Lt } from "../lib/row-surface.js";
8
+ import { fitPins as Rt } from "../lib/table-pins.js";
9
+ import { useBelowMd as qt } from "../lib/use-below-md.js";
10
10
  import { cn as h, formatNumber as Y } from "../lib/utils.js";
11
- import { CellCopyLayer as Rt } from "./CellCopyLayer.js";
12
- import { EmptyState as qt } from "./EmptyState.js";
13
- import { HScrollProxy as Ht } from "./HScrollProxy.js";
14
- import { PhonePager as Ut } from "./list/PhonePager.js";
15
- import { TableSkeletonRows as Dt } from "./Skeletons.js";
11
+ import { CellCopyLayer as Ht } from "./CellCopyLayer.js";
12
+ import { EmptyState as Ut } from "./EmptyState.js";
13
+ import { HScrollProxy as Dt } from "./HScrollProxy.js";
14
+ import { PhonePager as Jt } from "./list/PhonePager.js";
15
+ import { TableSkeletonRows as Xt } from "./Skeletons.js";
16
16
  import { Button as de } from "./ui/button.js";
17
- import { Checkbox as Ie } from "./ui/checkbox.js";
18
- import { Command as Jt, CommandInput as Xt, CommandList as Qt, CommandEmpty as Yt, CommandItem as Zt } from "./ui/command.js";
17
+ import { Checkbox as Ke } from "./ui/checkbox.js";
18
+ import { Command as Qt, CommandInput as Yt, CommandList as Zt, CommandEmpty as It, CommandItem as Kt } from "./ui/command.js";
19
19
  import { Input as q } from "./ui/input.js";
20
- import { Popover as me, PopoverTrigger as he, PopoverContent as ue } from "./ui/popover.js";
21
- import { Select as It, SelectTrigger as Kt, SelectValue as Pt, SelectContent as Gt, SelectItem as Ke } from "./ui/select.js";
22
- import { Table as Pe, TableHeader as Ge, TableRow as Z, TableHead as I, TableBody as et, TableCell as ce } from "./ui/table.js";
23
- const er = [1, 2, 3, 4, 5, 6, 7, 8];
24
- function ze(r) {
20
+ import { Popover as ue, PopoverTrigger as fe, PopoverContent as xe } from "./ui/popover.js";
21
+ import { Select as Pt, SelectTrigger as Gt, SelectValue as er, SelectContent as tr, SelectItem as Pe } from "./ui/select.js";
22
+ import { Table as Ge, TableHeader as et, TableRow as Z, TableHead as I, TableBody as tt, TableCell as ce } from "./ui/table.js";
23
+ const rr = [1, 2, 3, 4, 5, 6, 7, 8];
24
+ function pe(r) {
25
25
  var d;
26
- return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(ze).join("") : typeof r == "object" && "props" in r ? ze((d = r.props) == null ? void 0 : d.children) : "";
26
+ return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(pe).join("") : typeof r == "object" && "props" in r ? pe((d = r.props) == null ? void 0 : d.children) : "";
27
27
  }
28
- function tr(r) {
29
- const d = ze(r.header).replace(/\s+/g, " ").trim();
28
+ function oe(r) {
29
+ const d = pe(r.header).replace(/\s+/g, " ").trim();
30
30
  if (d) return d;
31
31
  const c = (r.key.split(".").pop() ?? r.key).replace(/_/g, " ").trim();
32
32
  return c ? c[0].toUpperCase() + c.slice(1) : r.key;
33
33
  }
34
- function Ee(r) {
34
+ function Ce(r) {
35
35
  return r.startsWith("-") ? r.slice(1) : r;
36
36
  }
37
- function Ce(r) {
37
+ function Me(r) {
38
38
  return r ? r.startsWith("-") ? "desc" : "asc" : null;
39
39
  }
40
- function rr(r, d) {
41
- const o = Ee(r), c = Ce(r);
40
+ function ar(r, d) {
41
+ const o = Ce(r), c = Me(r);
42
42
  return o !== d || !r ? d : c === "asc" ? `-${d}` : "";
43
43
  }
44
- function ar(r, d) {
44
+ function lr(r, d) {
45
45
  const o = d.trim().toLowerCase().split(/\s+/).filter(Boolean);
46
46
  if (o.length === 0) return 1;
47
47
  const c = r.toLowerCase();
48
48
  return o.every((b) => c.includes(b)) ? 1 : 0;
49
49
  }
50
- function lr(r, d) {
51
- return !r || Ee(r) !== d ? "none" : Ce(r) === "desc" ? "descending" : "ascending";
50
+ function nr(r, d) {
51
+ return !r || Ce(r) !== d ? "none" : Me(r) === "desc" ? "descending" : "ascending";
52
52
  }
53
- function $e(r) {
53
+ function Ee(r) {
54
54
  return typeof r == "string" || typeof r == "number";
55
55
  }
56
- function tt({ field: r, sort: d }) {
57
- const o = Ee(d), c = Ce(d);
58
- return o !== r || !d ? /* @__PURE__ */ t(be, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ t(
59
- wt,
56
+ function rt({ field: r, sort: d }) {
57
+ const o = Ce(d), c = Me(d);
58
+ return o !== r || !d ? /* @__PURE__ */ t(me, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ t(
59
+ Ot,
60
60
  {
61
61
  className: h(
62
62
  "ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
@@ -65,12 +65,12 @@ function tt({ field: r, sort: d }) {
65
65
  }
66
66
  );
67
67
  }
68
- function nr({
68
+ function sr({
69
69
  def: r,
70
70
  value: d,
71
71
  onChange: o
72
72
  }) {
73
- const [c, b] = $(!1), [n, p] = $(""), [k, v] = $([]), [N, f] = $(!1), [m, w] = $({}), a = oe(0), E = !!r.loadOptions, O = Array.isArray(d) ? d : d === "" ? [] : [d];
73
+ const [c, b] = $(!1), [n, p] = $(""), [k, v] = $([]), [N, f] = $(!1), [m, w] = $({}), a = be(0), E = !!r.loadOptions, O = Array.isArray(d) ? d : d === "" ? [] : [d];
74
74
  re(() => {
75
75
  if (!E || !c) return;
76
76
  const x = ++a.current;
@@ -78,8 +78,8 @@ function nr({
78
78
  const M = setTimeout(
79
79
  () => {
80
80
  var A;
81
- (A = r.loadOptions) == null || A.call(r, n).then((F) => {
82
- a.current === x && v(F);
81
+ (A = r.loadOptions) == null || A.call(r, n).then((L) => {
82
+ a.current === x && v(L);
83
83
  }).catch(() => {
84
84
  a.current === x && v([]);
85
85
  }).finally(() => {
@@ -92,17 +92,17 @@ function nr({
92
92
  }, [n, c, E]);
93
93
  const K = E ? k : r.options ?? [], ae = (x) => {
94
94
  var M, A;
95
- return ((M = K.find((F) => F.value === x)) == null ? void 0 : M.label) ?? ((A = (r.options ?? []).find((F) => F.value === x)) == null ? void 0 : A.label) ?? m[x] ?? x;
95
+ return ((M = K.find((L) => L.value === x)) == null ? void 0 : M.label) ?? ((A = (r.options ?? []).find((L) => L.value === x)) == null ? void 0 : A.label) ?? m[x] ?? x;
96
96
  }, T = O.length === 0 ? null : O.length === 1 ? ae(O[0]) : `${ae(O[0])} +${O.length - 1}`;
97
97
  return /* @__PURE__ */ s(
98
- me,
98
+ ue,
99
99
  {
100
100
  open: c,
101
101
  onOpenChange: (x) => {
102
102
  b(x), x || p("");
103
103
  },
104
104
  children: [
105
- /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
105
+ /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
106
106
  "button",
107
107
  {
108
108
  type: "button",
@@ -124,17 +124,17 @@ function nr({
124
124
  x.stopPropagation(), o(r.multi ? [] : "");
125
125
  },
126
126
  className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
127
- children: /* @__PURE__ */ t(pe, { className: "h-3 w-3" })
127
+ children: /* @__PURE__ */ t(he, { className: "h-3 w-3" })
128
128
  }
129
129
  ),
130
- /* @__PURE__ */ t(be, { className: "h-3 w-3 text-slate-400" })
130
+ /* @__PURE__ */ t(me, { className: "h-3 w-3 text-slate-400" })
131
131
  ] })
132
132
  ]
133
133
  }
134
134
  ) }),
135
- /* @__PURE__ */ t(ue, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(Jt, { shouldFilter: !E, filter: ar, children: [
135
+ /* @__PURE__ */ t(xe, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(Qt, { shouldFilter: !E, filter: lr, children: [
136
136
  /* @__PURE__ */ t(
137
- Xt,
137
+ Yt,
138
138
  {
139
139
  placeholder: "Search…",
140
140
  className: "h-8 text-[12px]",
@@ -142,12 +142,12 @@ function nr({
142
142
  onValueChange: p
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ s(Qt, { children: [
146
- /* @__PURE__ */ t(Yt, { className: "py-3 text-center text-[12px] text-slate-400", children: N ? "Searching…" : "No results" }),
145
+ /* @__PURE__ */ s(Zt, { children: [
146
+ /* @__PURE__ */ t(It, { className: "py-3 text-center text-[12px] text-slate-400", children: N ? "Searching…" : "No results" }),
147
147
  K.map((x) => {
148
148
  const M = O.includes(x.value);
149
149
  return /* @__PURE__ */ s(
150
- Zt,
150
+ Kt,
151
151
  {
152
152
  value: E ? x.value : x.label,
153
153
  onSelect: () => {
@@ -157,7 +157,7 @@ function nr({
157
157
  },
158
158
  className: "text-[12px]",
159
159
  children: [
160
- /* @__PURE__ */ t(_t, { className: h("mr-2 h-3 w-3", M ? "opacity-100" : "opacity-0") }),
160
+ /* @__PURE__ */ t(St, { className: h("mr-2 h-3 w-3", M ? "opacity-100" : "opacity-0") }),
161
161
  x.label
162
162
  ]
163
163
  },
@@ -170,43 +170,43 @@ function nr({
170
170
  }
171
171
  );
172
172
  }
173
- function sr({
173
+ function ir({
174
174
  value: r,
175
175
  placeholder: d,
176
176
  onChange: o
177
177
  }) {
178
- const [c, b] = $(!1), n = Ye(r), [p, k] = $((n == null ? void 0 : n.op) ?? "on"), [v, N] = $((n == null ? void 0 : n.from) ?? ""), [f, m] = $((n == null ? void 0 : n.to) ?? "");
178
+ const [c, b] = $(!1), n = Ze(r), [p, k] = $((n == null ? void 0 : n.op) ?? "on"), [v, N] = $((n == null ? void 0 : n.from) ?? ""), [f, m] = $((n == null ? void 0 : n.to) ?? "");
179
179
  re(() => {
180
180
  if (!c) return;
181
- const a = Ye(r);
181
+ const a = Ze(r);
182
182
  k((a == null ? void 0 : a.op) ?? "on"), N((a == null ? void 0 : a.from) ?? ""), m((a == null ? void 0 : a.to) ?? "");
183
183
  }, [c, r]);
184
184
  const w = (a, E, O) => {
185
- E && (o(Ct({ op: a, from: E, to: O || E })), (a !== "between" || O) && b(!1));
185
+ E && (o(Tt({ op: a, from: E, to: O || E })), (a !== "between" || O) && b(!1));
186
186
  };
187
- return /* @__PURE__ */ s(me, { open: c, onOpenChange: b, children: [
188
- /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
187
+ return /* @__PURE__ */ s(ue, { open: c, onOpenChange: b, children: [
188
+ /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
189
189
  "button",
190
190
  {
191
191
  type: "button",
192
192
  "data-date-filter": !0,
193
193
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
194
194
  children: [
195
- /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? zt(n) : d }),
195
+ /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Ct(n) : d }),
196
196
  n ? /* @__PURE__ */ t(
197
- pe,
197
+ he,
198
198
  {
199
199
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
200
200
  onClick: (a) => {
201
201
  a.stopPropagation(), o(null);
202
202
  }
203
203
  }
204
- ) : /* @__PURE__ */ t(Ot, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
204
+ ) : /* @__PURE__ */ t($t, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
205
205
  ]
206
206
  }
207
207
  ) }),
208
- /* @__PURE__ */ s(ue, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
209
- /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: Et.map((a) => /* @__PURE__ */ t(
208
+ /* @__PURE__ */ s(xe, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
209
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: Mt.map((a) => /* @__PURE__ */ t(
210
210
  "button",
211
211
  {
212
212
  type: "button",
@@ -253,15 +253,15 @@ function sr({
253
253
  ] })
254
254
  ] });
255
255
  }
256
- function ir({
256
+ function dr({
257
257
  value: r,
258
258
  placeholder: d,
259
259
  unit: o,
260
260
  onChange: c
261
261
  }) {
262
262
  const [b, n] = $(!1), [p, k] = r.split(":"), v = o ?? "", N = p && k ? `${p}–${k}${v}` : p ? `${p}${v}+` : k ? `≤ ${k}${v}` : d, f = (m, w) => c(m === "" && w === "" ? null : `${m}:${w}`);
263
- return /* @__PURE__ */ s(me, { open: b, onOpenChange: n, children: [
264
- /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
263
+ return /* @__PURE__ */ s(ue, { open: b, onOpenChange: n, children: [
264
+ /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
265
265
  "button",
266
266
  {
267
267
  type: "button",
@@ -276,18 +276,18 @@ function ir({
276
276
  }
277
277
  ),
278
278
  p || k ? /* @__PURE__ */ t(
279
- pe,
279
+ he,
280
280
  {
281
281
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
282
282
  onClick: (m) => {
283
283
  m.stopPropagation(), c(null);
284
284
  }
285
285
  }
286
- ) : /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
286
+ ) : /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
287
287
  ]
288
288
  }
289
289
  ) }),
290
- /* @__PURE__ */ s(ue, { align: "start", className: "w-[200px] p-2", children: [
290
+ /* @__PURE__ */ s(xe, { align: "start", className: "w-[200px] p-2", children: [
291
291
  /* @__PURE__ */ t("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: d }),
292
292
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
293
293
  /* @__PURE__ */ t(
@@ -317,43 +317,43 @@ function ir({
317
317
  ] })
318
318
  ] });
319
319
  }
320
- function dr({
320
+ function cr({
321
321
  value: r,
322
322
  placeholder: d,
323
323
  onChange: o
324
324
  }) {
325
- const [c, b] = $(!1), n = Ze(r), [p, k] = $((n == null ? void 0 : n.op) ?? "eq"), [v, N] = $(n ? String(n.a) : ""), [f, m] = $((n == null ? void 0 : n.b) != null ? String(n.b) : "");
325
+ const [c, b] = $(!1), n = Ie(r), [p, k] = $((n == null ? void 0 : n.op) ?? "eq"), [v, N] = $(n ? String(n.a) : ""), [f, m] = $((n == null ? void 0 : n.b) != null ? String(n.b) : "");
326
326
  re(() => {
327
327
  if (!c) return;
328
- const a = Ze(r);
328
+ const a = Ie(r);
329
329
  k((a == null ? void 0 : a.op) ?? "eq"), N(a ? String(a.a) : ""), m((a == null ? void 0 : a.b) != null ? String(a.b) : "");
330
330
  }, [c, r]);
331
331
  const w = (a, E, O) => {
332
- E === "" || Number.isNaN(Number(E)) || a === "between" && (O === "" || Number.isNaN(Number(O))) || o(jt({ op: a, a: Number(E), b: O === "" ? void 0 : Number(O) }));
332
+ E === "" || Number.isNaN(Number(E)) || a === "between" && (O === "" || Number.isNaN(Number(O))) || o(Wt({ op: a, a: Number(E), b: O === "" ? void 0 : Number(O) }));
333
333
  };
334
- return /* @__PURE__ */ s(me, { open: c, onOpenChange: b, children: [
335
- /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
334
+ return /* @__PURE__ */ s(ue, { open: c, onOpenChange: b, children: [
335
+ /* @__PURE__ */ t(fe, { asChild: !0, children: /* @__PURE__ */ s(
336
336
  "button",
337
337
  {
338
338
  type: "button",
339
339
  "data-number-filter": !0,
340
340
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
341
341
  children: [
342
- /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Tt(n) : d }),
342
+ /* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? jt(n) : d }),
343
343
  n ? /* @__PURE__ */ t(
344
- pe,
344
+ he,
345
345
  {
346
346
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
347
347
  onClick: (a) => {
348
348
  a.stopPropagation(), o(null);
349
349
  }
350
350
  }
351
- ) : /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
351
+ ) : /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
352
352
  ]
353
353
  }
354
354
  ) }),
355
- /* @__PURE__ */ s(ue, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
356
- /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: At.map((a) => /* @__PURE__ */ t(
355
+ /* @__PURE__ */ s(xe, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
356
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: Vt.map((a) => /* @__PURE__ */ t(
357
357
  "button",
358
358
  {
359
359
  type: "button",
@@ -400,7 +400,7 @@ function dr({
400
400
  ] })
401
401
  ] });
402
402
  }
403
- function rt({
403
+ function at({
404
404
  def: r,
405
405
  value: d,
406
406
  onChange: o,
@@ -426,12 +426,12 @@ function rt({
426
426
  (b || n) && "[&>button]:w-full",
427
427
  n && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
428
428
  ),
429
- children: /* @__PURE__ */ t(nr, { def: r, value: d, onChange: o })
429
+ children: /* @__PURE__ */ t(sr, { def: r, value: d, onChange: o })
430
430
  }
431
431
  );
432
432
  else if (r.type === "date")
433
433
  N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
434
- sr,
434
+ ir,
435
435
  {
436
436
  value: p,
437
437
  placeholder: r.placeholder,
@@ -440,7 +440,7 @@ function rt({
440
440
  ) });
441
441
  else if (r.type === "number")
442
442
  N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
443
- dr,
443
+ cr,
444
444
  {
445
445
  value: p,
446
446
  placeholder: r.placeholder,
@@ -449,7 +449,7 @@ function rt({
449
449
  ) });
450
450
  else if (r.type === "range" && n)
451
451
  N = /* @__PURE__ */ t("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ t(
452
- ir,
452
+ dr,
453
453
  {
454
454
  value: p,
455
455
  placeholder: r.placeholder,
@@ -491,16 +491,23 @@ function rt({
491
491
  )
492
492
  ] });
493
493
  } else
494
- N = /* @__PURE__ */ s(It, { value: p === "" ? "__all__" : p, onValueChange: (m) => o(m === "__all__" ? "" : m), children: [
495
- /* @__PURE__ */ t(Kt, { className: h("h-8 border-slate-200 bg-slate-50", v, k), children: /* @__PURE__ */ t(Pt, { placeholder: r.placeholder }) }),
496
- /* @__PURE__ */ s(Gt, { children: [
497
- /* @__PURE__ */ t(Ke, { value: "__all__", children: r.placeholder }),
498
- (r.options ?? []).filter((m) => m.value !== "").map((m) => /* @__PURE__ */ t(Ke, { value: m.value, children: m.label }, m.value))
494
+ N = /* @__PURE__ */ s(Pt, { value: p === "" ? "__all__" : p, onValueChange: (m) => o(m === "__all__" ? "" : m), children: [
495
+ /* @__PURE__ */ t(
496
+ Gt,
497
+ {
498
+ "aria-label": lt(r),
499
+ className: h("h-8 border-slate-200 bg-slate-50", v, k),
500
+ children: /* @__PURE__ */ t(er, { placeholder: r.placeholder })
501
+ }
502
+ ),
503
+ /* @__PURE__ */ s(tr, { children: [
504
+ /* @__PURE__ */ t(Pe, { value: "__all__", children: r.placeholder }),
505
+ (r.options ?? []).filter((m) => m.value !== "").map((m) => /* @__PURE__ */ t(Pe, { value: m.value, children: m.label }, m.value))
499
506
  ] })
500
507
  ] });
501
508
  return b ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
502
509
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
503
- cr(r),
510
+ lt(r),
504
511
  r.restricted && /* @__PURE__ */ t(
505
512
  "span",
506
513
  {
@@ -520,7 +527,7 @@ function rt({
520
527
  }
521
528
  ) : /* @__PURE__ */ t(U, { children: N });
522
529
  }
523
- function cr(r) {
530
+ function lt(r) {
524
531
  return r.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
525
532
  }
526
533
  function Tr(r, d) {
@@ -561,109 +568,109 @@ function Ar({
561
568
  filterValues: x = {},
562
569
  onFilterChange: M,
563
570
  toolbarRight: A,
564
- emptyMessage: F = "No records found.",
565
- minBodyHeight: at,
571
+ emptyMessage: L = "No records found.",
572
+ minBodyHeight: nt,
566
573
  fillHeight: le = !1,
567
- footer: lt,
568
- hideFilterRow: nt = !1,
569
- nowrapCells: st = !1,
570
- density: fe = "comfortable",
574
+ footer: st,
575
+ hideFilterRow: it = !1,
576
+ nowrapCells: dt = !1,
577
+ density: ye = "comfortable",
571
578
  pinFirstColumn: j = !1,
572
579
  columnPins: g,
573
- onColumnPinChange: xe,
574
- pinKeepRank: ye,
575
- pinRightShare: it,
576
- columnFilterRow: dt = !1,
577
- hScrollProxy: Me = !1,
580
+ onColumnPinChange: ge,
581
+ pinKeepRank: ke,
582
+ pinRightShare: ct,
583
+ columnFilterRow: ot = !1,
584
+ hScrollProxy: Te = !1,
578
585
  selectedIds: V,
579
586
  onSelectionChange: C,
580
- rowClassName: ge,
581
- rowDragProps: ke,
582
- rowTitle: ve,
583
- enterKey: ct,
587
+ rowClassName: ve,
588
+ rowDragProps: Ne,
589
+ rowTitle: we,
590
+ enterKey: bt,
584
591
  rowGroups: W,
585
592
  collapsedGroups: D,
586
- onToggleGroup: Ne,
593
+ onToggleGroup: _e,
587
594
  onRowFocus: J,
588
595
  activeRowKey: ne,
589
- rowAriaLabel: we,
596
+ rowAriaLabel: Oe,
590
597
  totalsRow: P
591
598
  }) {
592
- const G = Math.ceil(c / n), Te = (b - 1) * n + 1, Ae = Math.min(b * n, c), je = !nt && T && T.length > 0, ot = O !== void 0 || je || A !== void 0, Ve = (e) => {
593
- !e.sortable || !m || m(rr(f, e.key));
594
- }, _ = g !== void 0, [We, bt] = $([]), R = Qe(() => {
599
+ const G = Math.ceil(c / n), Ae = (b - 1) * n + 1, je = Math.min(b * n, c), Ve = !it && T && T.length > 0, pt = O !== void 0 || Ve || A !== void 0, We = (e) => {
600
+ !e.sortable || !m || m(ar(f, e.key));
601
+ }, _ = g !== void 0, [Be, mt] = $([]), R = Ye(() => {
595
602
  if (!_ || !g) return r;
596
- const e = new Set(We), l = (S) => g[S] === "right" && !e.has(S), i = r.filter((S) => g[S.key] === "left"), z = r.filter((S) => l(S.key)), B = r.filter((S) => g[S.key] !== "left" && !l(S.key));
603
+ const e = new Set(Be), l = (S) => g[S] === "right" && !e.has(S), i = r.filter((S) => g[S.key] === "left"), z = r.filter((S) => l(S.key)), B = r.filter((S) => g[S.key] !== "left" && !l(S.key));
597
604
  return [...i, ...B, ...z];
598
- }, [r, g, _, We]), Be = oe({}), H = oe(null);
599
- Mt(H);
600
- const Le = oe(null), Fe = !p && (W ? W.length === 0 : d.length === 0), [Re, pt] = $(null);
605
+ }, [r, g, _, Be]), Fe = be({}), H = be(null);
606
+ At(H);
607
+ const Le = be(null), Re = !p && (W ? W.length === 0 : d.length === 0), [qe, ht] = $(null);
601
608
  re(() => {
602
609
  const e = H.current;
603
- if (!Fe || !e) return;
604
- const l = () => pt(e.clientWidth);
610
+ if (!Re || !e) return;
611
+ const l = () => ht(e.clientWidth);
605
612
  if (l(), typeof ResizeObserver > "u") return;
606
613
  const i = new ResizeObserver(l);
607
614
  return i.observe(e), () => i.disconnect();
608
- }, [Fe]);
609
- const [ee, mt] = $({}), [, ht] = $(0), _e = Ft(), X = le && _e ? void 0 : at;
615
+ }, [Re]);
616
+ const [ee, ut] = $({}), [, ft] = $(0), Se = qt(), X = le && Se ? void 0 : nt;
610
617
  re(() => {
611
618
  const e = H.current;
612
619
  if (!_ || !e || typeof ResizeObserver > "u") return;
613
- const l = new ResizeObserver(() => ht(e.clientWidth));
620
+ const l = new ResizeObserver(() => ft(e.clientWidth));
614
621
  return l.observe(e), () => l.disconnect();
615
- }, [_, p]), $t(() => {
616
- var De, Je;
622
+ }, [_, p]), Et(() => {
623
+ var Je, Xe;
617
624
  if (!_ || !g) return;
618
625
  const e = (u) => {
619
- var L;
620
- return ((L = Be.current[u]) == null ? void 0 : L.getBoundingClientRect().width) ?? 120;
621
- }, l = C ? ((De = Le.current) == null ? void 0 : De.getBoundingClientRect().width) ?? 40 : 0;
626
+ var F;
627
+ return ((F = Fe.current[u]) == null ? void 0 : F.getBoundingClientRect().width) ?? 120;
628
+ }, l = C ? ((Je = Le.current) == null ? void 0 : Je.getBoundingClientRect().width) ?? 40 : 0;
622
629
  let i = null;
623
630
  const z = (u) => {
624
- var Xe;
631
+ var Qe;
625
632
  i ?? (i = [
626
- ...((Xe = H.current) == null ? void 0 : Xe.querySelectorAll("tbody td[data-dt-col]")) ?? []
633
+ ...((Qe = H.current) == null ? void 0 : Qe.querySelectorAll("tbody td[data-dt-col]")) ?? []
627
634
  ]);
628
- const L = i.filter((te) => te.dataset.dtCol === u);
629
- if (L.length === 0) return !1;
630
- for (const te of L) {
635
+ const F = i.filter((te) => te.dataset.dtCol === u);
636
+ if (F.length === 0) return !1;
637
+ for (const te of F) {
631
638
  if (te.querySelector("[data-cell-empty]")) continue;
632
639
  if (te.querySelector("img, svg, button, input, a")) return !1;
633
- const Se = (te.textContent ?? "").trim();
634
- if (Se !== "" && Se !== "—" && Se !== "-") return !1;
640
+ const ze = (te.textContent ?? "").trim();
641
+ if (ze !== "" && ze !== "—" && ze !== "-") return !1;
635
642
  }
636
643
  return !0;
637
- }, B = r.filter((u) => g[u.key] === "right").map((u) => u.key), { left: S, right: y } = Lt(
644
+ }, B = r.filter((u) => g[u.key] === "right").map((u) => u.key), { left: S, right: y } = Rt(
638
645
  R.filter((u) => g[u.key] === "left").map((u) => u.key),
639
646
  B,
640
647
  e,
641
648
  l,
642
- ((Je = H.current) == null ? void 0 : Je.clientWidth) ?? 0,
649
+ ((Xe = H.current) == null ? void 0 : Xe.clientWidth) ?? 0,
643
650
  {
644
- compact: _e,
645
- rightShare: it,
646
- rank: ye ? (u) => z(u) ? -1e6 : ye(u) : void 0
651
+ compact: Se,
652
+ rightShare: ct,
653
+ rank: ke ? (u) => z(u) ? -1e6 : ke(u) : void 0
647
654
  }
648
- ), Q = ye && !_e ? B.filter((u) => !y.includes(u)) : [];
649
- bt((u) => u.join("|") === Q.join("|") ? u : Q);
655
+ ), Q = ke && !Se ? B.filter((u) => !y.includes(u)) : [];
656
+ mt((u) => u.join("|") === Q.join("|") ? u : Q);
650
657
  const ie = {};
651
- let He = l;
652
- S.forEach((u, L) => {
653
- ie[u] = { side: "left", offset: Math.floor(He), seam: L === S.length - 1 }, He += e(u);
658
+ let Ue = l;
659
+ S.forEach((u, F) => {
660
+ ie[u] = { side: "left", offset: Math.floor(Ue), seam: F === S.length - 1 }, Ue += e(u);
654
661
  });
655
- let Ue = 0;
662
+ let De = 0;
656
663
  for (let u = y.length - 1; u >= 0; u--) {
657
- const L = y[u];
658
- ie[L] = { side: "right", offset: Math.floor(Ue), seam: u === 0 }, Ue += e(L);
664
+ const F = y[u];
665
+ ie[F] = { side: "right", offset: Math.floor(De), seam: u === 0 }, De += e(F);
659
666
  }
660
- mt((u) => JSON.stringify(u) === JSON.stringify(ie) ? u : ie);
667
+ ut((u) => JSON.stringify(u) === JSON.stringify(ie) ? u : ie);
661
668
  });
662
669
  const se = (e) => {
663
670
  const l = ee[e];
664
671
  if (!(!_ || !l))
665
672
  return l.side === "left" ? { left: l.offset } : { right: l.offset };
666
- }, Oe = (e, l) => {
673
+ }, $e = (e, l) => {
667
674
  const i = ee[e];
668
675
  if (!(!_ || !i))
669
676
  return h(
@@ -675,24 +682,24 @@ function Ar({
675
682
  i.side === "left" && i.seam && "border-r border-slate-200 dark:border-border",
676
683
  i.side === "right" && i.seam && "border-l border-slate-200 dark:border-border"
677
684
  );
678
- }, ut = (e) => {
679
- if (!xe) return;
685
+ }, xt = (e) => {
686
+ if (!ge) return;
680
687
  const l = (g == null ? void 0 : g[e]) ?? null;
681
- xe(e, l === null ? "left" : l === "left" ? "right" : null);
682
- }, ft = Qe(() => {
688
+ ge(e, l === null ? "left" : l === "left" ? "right" : null);
689
+ }, yt = Ye(() => {
683
690
  const e = /* @__PURE__ */ new Map();
684
691
  for (const l of T ?? []) e.set(l.key, l);
685
692
  return e;
686
- }, [T]), xt = dt && ((T == null ? void 0 : T.length) ?? 0) > 0, yt = (() => {
693
+ }, [T]), gt = ot && ((T == null ? void 0 : T.length) ?? 0) > 0, kt = (() => {
687
694
  if (!J) return null;
688
695
  const e = W ? W.flatMap((i) => D != null && D.has(i.key) ? [] : i.rows) : d, l = (i, z) => o ? o(i, z) : String(z);
689
696
  return ne && e.some((i, z) => l(i, z) === ne) ? ne : e.length > 0 ? l(e[0], 0) : null;
690
- })(), qe = (e, l) => {
691
- const i = o ? o(e, l) : String(l), z = (V == null ? void 0 : V.includes(i)) ?? !1, B = !!J, S = B && i === yt;
697
+ })(), He = (e, l) => {
698
+ const i = o ? o(e, l) : String(l), z = (V == null ? void 0 : V.includes(i)) ?? !1, B = !!J, S = B && i === kt;
692
699
  return /* @__PURE__ */ s(
693
700
  Z,
694
701
  {
695
- ...ke == null ? void 0 : ke(e),
702
+ ...Ne == null ? void 0 : Ne(e),
696
703
  className: h(
697
704
  // NAMED group: queue cells already use bare `group-hover:` against
698
705
  // their own local group, and claiming the unnamed one here would
@@ -701,23 +708,23 @@ function Ar({
701
708
  J && "focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-nvr-cyan",
702
709
  // Pinned: opaque surface AND opaque hover (the base row's hover:bg-muted/50 is
703
710
  // translucent, so the pinned cells would go see-through under the pointer).
704
- (j || _) && `${Wt} ${Bt}`,
711
+ (j || _) && `${Ft} ${Lt}`,
705
712
  a && (j || _ ? "cursor-pointer" : "cursor-pointer hover:bg-slate-50/80"),
706
- ge == null ? void 0 : ge(e),
713
+ ve == null ? void 0 : ve(e),
707
714
  // Pinned sticky cells use bg-inherit, so a selected row's bg must be
708
715
  // OPAQUE or horizontally-scrolled content bleeds through the pinned
709
716
  // column (lib/row-surface.ts: the accent mixed over the card).
710
- z && (j || _ ? Vt : "bg-nvr-cyan/5")
717
+ z && (j || _ ? Bt : "bg-nvr-cyan/5")
711
718
  ),
712
719
  style: { animationDelay: `${Math.min(l, 14) * 16}ms` },
713
720
  "data-row-key": i,
714
- title: ve == null ? void 0 : ve(e),
721
+ title: we == null ? void 0 : we(e),
715
722
  onClick: () => a == null ? void 0 : a(e),
716
723
  onContextMenu: E ? (y) => E(e, y) : void 0,
717
724
  ...B ? {
718
725
  tabIndex: S ? 0 : -1,
719
726
  "aria-current": S && ne === i ? "true" : void 0,
720
- "aria-label": we == null ? void 0 : we(e),
727
+ "aria-label": Oe == null ? void 0 : Oe(e),
721
728
  onFocus: (y) => {
722
729
  y.target === y.currentTarget && (J == null || J(e));
723
730
  },
@@ -731,13 +738,13 @@ function Ar({
731
738
  {
732
739
  className: h(
733
740
  "w-9 px-3",
734
- fe === "compact" ? "py-1" : "py-2",
741
+ ye === "compact" ? "py-1" : "py-2",
735
742
  (j || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
736
743
  ),
737
744
  onClick: (y) => {
738
745
  y.stopPropagation(), C(z ? (V == null ? void 0 : V.filter((Q) => Q !== i)) ?? [] : [...V ?? [], i]);
739
746
  },
740
- children: /* @__PURE__ */ t(Ie, { checked: z, "aria-label": "Select row" })
747
+ children: /* @__PURE__ */ t(Ke, { checked: z, "aria-label": "Select row" })
741
748
  }
742
749
  ),
743
750
  R.map((y, Q) => /* @__PURE__ */ t(
@@ -747,13 +754,13 @@ function Ar({
747
754
  style: se(y.key),
748
755
  className: h(
749
756
  "px-3",
750
- fe === "compact" ? "py-1" : "py-2",
751
- st && "whitespace-nowrap",
757
+ ye === "compact" ? "py-1" : "py-2",
758
+ dt && "whitespace-nowrap",
752
759
  !_ && j && Q === 0 && h(
753
760
  "sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
754
761
  C ? "left-[39px]" : "left-0"
755
762
  ),
756
- Oe(y.key, !1),
763
+ $e(y.key, !1),
757
764
  y.className
758
765
  ),
759
766
  children: y.render ? y.render(e, l) : String(e[y.key] ?? "—")
@@ -766,7 +773,7 @@ function Ar({
766
773
  );
767
774
  };
768
775
  return /* @__PURE__ */ s(U, { children: [
769
- /* @__PURE__ */ t(Rt, {}),
776
+ /* @__PURE__ */ t(Ht, {}),
770
777
  k && v && /* @__PURE__ */ s(
771
778
  "div",
772
779
  {
@@ -797,9 +804,9 @@ function Ar({
797
804
  le && "flex h-full min-h-0 flex-col"
798
805
  ),
799
806
  children: [
800
- ot && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
807
+ pt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
801
808
  K !== void 0 && /* @__PURE__ */ s("div", { className: "relative min-w-0 max-w-full", children: [
802
- /* @__PURE__ */ t(gt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
809
+ /* @__PURE__ */ t(vt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
803
810
  /* @__PURE__ */ t(
804
811
  q,
805
812
  {
@@ -810,8 +817,8 @@ function Ar({
810
817
  }
811
818
  )
812
819
  ] }),
813
- je && (T == null ? void 0 : T.map((e) => /* @__PURE__ */ t(
814
- rt,
820
+ Ve && (T == null ? void 0 : T.map((e) => /* @__PURE__ */ t(
821
+ at,
815
822
  {
816
823
  def: e,
817
824
  value: x[e.key] ?? "",
@@ -833,8 +840,8 @@ function Ar({
833
840
  "aria-busy": "true",
834
841
  className: h(le && "min-h-0 flex-1 overflow-hidden"),
835
842
  style: X ? { minHeight: X } : void 0,
836
- children: /* @__PURE__ */ s(Pe, { className: "border-separate border-spacing-0", children: [
837
- /* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
843
+ children: /* @__PURE__ */ s(Ge, { className: "border-separate border-spacing-0", children: [
844
+ /* @__PURE__ */ t(et, { children: /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
838
845
  C && /* @__PURE__ */ t(I, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
839
846
  R.map((e) => /* @__PURE__ */ t(
840
847
  I,
@@ -848,13 +855,13 @@ function Ar({
848
855
  e.key
849
856
  ))
850
857
  ] }) }),
851
- /* @__PURE__ */ t(et, { children: /* @__PURE__ */ t(
852
- Dt,
858
+ /* @__PURE__ */ t(tt, { children: /* @__PURE__ */ t(
859
+ Xt,
853
860
  {
854
861
  columns: R.map((e) => ({ key: e.key })),
855
- rows: Math.min(Math.max(n ?? er.length, 1), 15),
862
+ rows: Math.min(Math.max(n ?? rr.length, 1), 15),
856
863
  rowClassName: "",
857
- cellClassName: h("px-3", fe === "compact" ? "py-1" : "py-2"),
864
+ cellClassName: h("px-3", ye === "compact" ? "py-1" : "py-2"),
858
865
  leadingCells: C ? 1 : 0
859
866
  }
860
867
  ) })
@@ -867,7 +874,7 @@ function Ar({
867
874
  {
868
875
  ref: H,
869
876
  className: h(
870
- Me && "overflow-x-hidden [&>div]:overflow-visible",
877
+ Te && "overflow-x-hidden [&>div]:overflow-visible",
871
878
  // Bounded mode: rows scroll here under a sticky header. Header
872
879
  // cells sit above pinned body cells (z-[1/2]); the pinned
873
880
  // header corner (left-0) tops the other header cells so
@@ -876,12 +883,12 @@ function Ar({
876
883
  ),
877
884
  style: X ? { minHeight: X } : void 0,
878
885
  children: /* @__PURE__ */ s(
879
- Pe,
886
+ Ge,
880
887
  {
881
888
  "data-copy-cells": "",
882
889
  className: "border-separate border-spacing-0 [&>tbody>tr.border-b:not(:last-child)>td]:border-b [&>tbody>tr.border-b:not(:last-child)>td]:[border-bottom-color:inherit] [&>thead>tr.border-b>th]:border-b [&>thead>tr.border-b>th]:[border-bottom-color:inherit]",
883
890
  children: [
884
- /* @__PURE__ */ s(Ge, { children: [
891
+ /* @__PURE__ */ s(et, { children: [
885
892
  /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
886
893
  C && /* @__PURE__ */ t(
887
894
  I,
@@ -892,7 +899,7 @@ function Ar({
892
899
  (j || _) && "sticky left-0 z-[2] min-w-[40px]"
893
900
  ),
894
901
  children: /* @__PURE__ */ t(
895
- Ie,
902
+ Ke,
896
903
  {
897
904
  checked: d.length > 0 && d.every((e, l) => {
898
905
  const i = o ? o(e, l) : String(l);
@@ -912,7 +919,7 @@ function Ar({
912
919
  I,
913
920
  {
914
921
  ref: (i) => {
915
- Be.current[e.key] = i;
922
+ Fe.current[e.key] = i;
916
923
  },
917
924
  style: se(e.key),
918
925
  className: h(
@@ -923,17 +930,17 @@ function Ar({
923
930
  C ? "left-[39px]" : "left-0"
924
931
  ),
925
932
  _ && "bg-slate-50 dark:bg-muted",
926
- Oe(e.key, !0),
933
+ $e(e.key, !0),
927
934
  e.headerClassName
928
935
  ),
929
- onClick: () => Ve(e),
930
- "aria-sort": e.sortable && m ? lr(f, e.key) : void 0,
931
- tabIndex: e.sortable && m && !$e(e.header) ? 0 : void 0,
932
- onKeyDown: e.sortable && m && !$e(e.header) ? (i) => {
933
- i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), Ve(e));
936
+ onClick: () => We(e),
937
+ "aria-sort": e.sortable && m ? nr(f, e.key) : void 0,
938
+ tabIndex: e.sortable && m && !Ee(e.header) ? 0 : void 0,
939
+ onKeyDown: e.sortable && m && !Ee(e.header) ? (i) => {
940
+ i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), We(e));
934
941
  } : void 0,
935
942
  children: /* @__PURE__ */ s("span", { className: "inline-flex items-center", children: [
936
- e.sortable && m && $e(e.header) ? /* @__PURE__ */ s(
943
+ e.sortable && m && Ee(e.header) ? /* @__PURE__ */ s(
937
944
  "button",
938
945
  {
939
946
  type: "button",
@@ -941,28 +948,29 @@ function Ar({
941
948
  "data-dt-sort": e.key,
942
949
  children: [
943
950
  e.header,
944
- /* @__PURE__ */ t(tt, { field: e.key, sort: f })
951
+ /* @__PURE__ */ t(rt, { field: e.key, sort: f })
945
952
  ]
946
953
  }
947
954
  ) : /* @__PURE__ */ s(U, { children: [
948
955
  e.header,
949
- e.sortable && m && /* @__PURE__ */ t(tt, { field: e.key, sort: f })
956
+ !pe(e.header).trim() && /* @__PURE__ */ t("span", { className: "sr-only", children: oe(e) }),
957
+ e.sortable && m && /* @__PURE__ */ t(rt, { field: e.key, sort: f })
950
958
  ] }),
951
- _ && xe && e.key !== "claim" && /* @__PURE__ */ t(
959
+ _ && ge && e.key !== "claim" && /* @__PURE__ */ t(
952
960
  "button",
953
961
  {
954
962
  type: "button",
955
963
  onClick: (i) => {
956
- i.stopPropagation(), ut(e.key);
964
+ i.stopPropagation(), xt(e.key);
957
965
  },
958
- "aria-label": `Pin column ${tr(e)}`,
966
+ "aria-label": `Pin column ${oe(e)}`,
959
967
  title: (g == null ? void 0 : g[e.key]) === "left" ? "Pinned left — click to pin right" : (g == null ? void 0 : g[e.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
960
968
  className: h(
961
969
  "ml-1 rounded p-0.5 transition-opacity",
962
970
  g != null && g[e.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
963
971
  ),
964
972
  children: /* @__PURE__ */ t(
965
- kt,
973
+ Nt,
966
974
  {
967
975
  className: h(
968
976
  "h-3 w-3",
@@ -978,52 +986,56 @@ function Ar({
978
986
  e.key
979
987
  ))
980
988
  ] }),
981
- xt && /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
989
+ gt && /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
982
990
  C && /* @__PURE__ */ t(
983
991
  I,
984
992
  {
985
993
  className: h(
986
994
  "h-9 w-9 bg-slate-50 px-3 py-1",
987
995
  (j || _) && "sticky left-0 z-[2] min-w-[40px]"
988
- )
996
+ ),
997
+ children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Filters" })
989
998
  }
990
999
  ),
991
1000
  R.map((e) => {
992
- const l = ft.get(e.key);
993
- return /* @__PURE__ */ t(
1001
+ const l = yt.get(e.key);
1002
+ return /* @__PURE__ */ s(
994
1003
  I,
995
1004
  {
996
1005
  style: se(e.key),
997
1006
  className: h(
998
1007
  "h-9 bg-slate-50 px-1.5 py-1 align-middle",
999
1008
  _ && "bg-slate-50 dark:bg-muted",
1000
- Oe(e.key, !0)
1009
+ $e(e.key, !0)
1001
1010
  ),
1002
- children: l && M ? /* @__PURE__ */ t(
1003
- rt,
1004
- {
1005
- def: l,
1006
- value: x[l.key] ?? "",
1007
- onChange: (i) => M(l.key, i),
1008
- layout: "cell"
1009
- }
1010
- ) : null
1011
+ children: [
1012
+ /* @__PURE__ */ t("span", { className: "sr-only", children: l && M ? `Filter ${oe(e)}` : `${oe(e)}: no filter` }),
1013
+ l && M ? /* @__PURE__ */ t(
1014
+ at,
1015
+ {
1016
+ def: l,
1017
+ value: x[l.key] ?? "",
1018
+ onChange: (i) => M(l.key, i),
1019
+ layout: "cell"
1020
+ }
1021
+ ) : null
1022
+ ]
1011
1023
  },
1012
1024
  e.key
1013
1025
  );
1014
1026
  })
1015
1027
  ] })
1016
1028
  ] }),
1017
- /* @__PURE__ */ s(et, { className: "tabular-nums", children: [
1029
+ /* @__PURE__ */ s(tt, { className: "tabular-nums", children: [
1018
1030
  W ? W.map((e) => {
1019
1031
  const l = (D == null ? void 0 : D.has(e.key)) ?? !1;
1020
- return /* @__PURE__ */ s(St.Fragment, { children: [
1032
+ return /* @__PURE__ */ s(zt.Fragment, { children: [
1021
1033
  /* @__PURE__ */ t(
1022
1034
  Z,
1023
1035
  {
1024
1036
  "data-group-key": e.key,
1025
1037
  className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
1026
- onClick: () => Ne == null ? void 0 : Ne(e.key),
1038
+ onClick: () => _e == null ? void 0 : _e(e.key),
1027
1039
  children: /* @__PURE__ */ t(
1028
1040
  ce,
1029
1041
  {
@@ -1031,7 +1043,7 @@ function Ar({
1031
1043
  className: "px-3 py-1.5",
1032
1044
  children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
1033
1045
  /* @__PURE__ */ t(
1034
- vt,
1046
+ wt,
1035
1047
  {
1036
1048
  className: h(
1037
1049
  "h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
@@ -1045,9 +1057,9 @@ function Ar({
1045
1057
  )
1046
1058
  }
1047
1059
  ),
1048
- !l && e.rows.map((i, z) => qe(i, z))
1060
+ !l && e.rows.map((i, z) => He(i, z))
1049
1061
  ] }, e.key);
1050
- }) : d.map((e, l) => qe(e, l)),
1062
+ }) : d.map((e, l) => He(e, l)),
1051
1063
  (W ? W.length === 0 : d.length === 0) && /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(
1052
1064
  ce,
1053
1065
  {
@@ -1058,14 +1070,14 @@ function Ar({
1058
1070
  "div",
1059
1071
  {
1060
1072
  className: "sticky left-0 py-12",
1061
- style: Re ? { width: Re } : void 0,
1073
+ style: qe ? { width: qe } : void 0,
1062
1074
  "data-table-empty": !0,
1063
- children: typeof F == "string" ? /* @__PURE__ */ t(qt, { icon: Nt, title: F }) : F
1075
+ children: typeof L == "string" ? /* @__PURE__ */ t(Ut, { icon: _t, title: L }) : L
1064
1076
  }
1065
1077
  )
1066
1078
  }
1067
1079
  ) })
1068
- ] }, ct),
1080
+ ] }, bt),
1069
1081
  P && !W && d.length > 0 && // Sticky per cell (not per row): a pinned cell sticks left/right AND bottom.
1070
1082
  /* @__PURE__ */ t("tfoot", { className: "text-[12px] tabular-nums", "data-dt-totals": !0, children: /* @__PURE__ */ s("tr", { children: [
1071
1083
  C && /* @__PURE__ */ t(
@@ -1108,8 +1120,8 @@ function Ar({
1108
1120
  )
1109
1121
  }
1110
1122
  ),
1111
- Me && /* @__PURE__ */ t(Ht, { scrollerRef: H }),
1112
- lt,
1123
+ Te && /* @__PURE__ */ t(Dt, { scrollerRef: H }),
1124
+ st,
1113
1125
  !W && c > n && /* @__PURE__ */ s(
1114
1126
  "div",
1115
1127
  {
@@ -1117,14 +1129,14 @@ function Ar({
1117
1129
  style: { paddingRight: "calc(0.5rem + var(--nvr-corner-float, 0px))" },
1118
1130
  children: [
1119
1131
  /* @__PURE__ */ t(
1120
- Ut,
1132
+ Jt,
1121
1133
  {
1122
1134
  className: "w-full",
1123
1135
  range: /* @__PURE__ */ s(U, { children: [
1124
1136
  /* @__PURE__ */ s("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: [
1125
- Y(Te),
1137
+ Y(Ae),
1126
1138
  "–",
1127
- Y(Ae)
1139
+ Y(je)
1128
1140
  ] }),
1129
1141
  " ",
1130
1142
  "of ",
@@ -1137,9 +1149,9 @@ function Ar({
1137
1149
  }
1138
1150
  ),
1139
1151
  /* @__PURE__ */ s("p", { className: "hidden text-[12px] text-slate-400 md:block", children: [
1140
- Y(Te),
1141
- "–",
1142
1152
  Y(Ae),
1153
+ "–",
1154
+ Y(je),
1143
1155
  " of ",
1144
1156
  Y(c),
1145
1157
  " records"
@@ -1210,10 +1222,10 @@ function Ar({
1210
1222
  }
1211
1223
  export {
1212
1224
  Ar as DataTable,
1213
- rt as FilterControl,
1214
- lr as ariaSortFor,
1215
- ar as containsFilter,
1216
- cr as filterDefLabel,
1225
+ at as FilterControl,
1226
+ nr as ariaSortFor,
1227
+ lr as containsFilter,
1228
+ lt as filterDefLabel,
1217
1229
  Tr as filterValueDisplay,
1218
- tr as pinColumnName
1230
+ oe as pinColumnName
1219
1231
  };