@brightlocal/ui-components 3.0.0 → 3.1.0

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.
Files changed (105) hide show
  1. package/README.md +2 -1
  2. package/component-meta.json +90 -19
  3. package/deprecations.json +113 -3
  4. package/dist/accordion.cjs +1 -1
  5. package/dist/accordion.d.ts +36 -0
  6. package/dist/accordion.d.ts.map +1 -1
  7. package/dist/accordion.js +74 -61
  8. package/dist/blocks/empty-state.cjs +1 -1
  9. package/dist/blocks/empty-state.d.ts.map +1 -1
  10. package/dist/blocks/empty-state.js +41 -49
  11. package/dist/button-group.cjs +1 -0
  12. package/dist/button-group.d.ts +36 -0
  13. package/dist/button-group.d.ts.map +1 -0
  14. package/dist/button-group.js +47 -0
  15. package/dist/button.cjs +1 -1
  16. package/dist/button.js +1 -1
  17. package/dist/card.cjs +1 -1
  18. package/dist/card.d.ts +20 -2
  19. package/dist/card.d.ts.map +1 -1
  20. package/dist/card.js +83 -75
  21. package/dist/chart.cjs +2 -2
  22. package/dist/chart.d.ts +40 -12
  23. package/dist/chart.d.ts.map +1 -1
  24. package/dist/chart.js +86 -71
  25. package/dist/chip.cjs +1 -1
  26. package/dist/chip.d.ts +38 -4
  27. package/dist/chip.d.ts.map +1 -1
  28. package/dist/chip.js +95 -81
  29. package/dist/command.cjs +1 -1
  30. package/dist/command.d.ts +23 -1
  31. package/dist/command.d.ts.map +1 -1
  32. package/dist/command.js +250 -224
  33. package/dist/data-table.cjs +1 -1
  34. package/dist/data-table.d.ts +32 -1
  35. package/dist/data-table.d.ts.map +1 -1
  36. package/dist/data-table.js +340 -330
  37. package/dist/date-picker.cjs +1 -1
  38. package/dist/date-picker.d.ts +13 -5
  39. package/dist/date-picker.d.ts.map +1 -1
  40. package/dist/date-picker.js +54 -53
  41. package/dist/field.cjs +1 -1
  42. package/dist/field.d.ts +8 -1
  43. package/dist/field.d.ts.map +1 -1
  44. package/dist/field.js +79 -52
  45. package/dist/global-layout.cjs +1 -1
  46. package/dist/global-layout.d.ts +105 -13
  47. package/dist/global-layout.d.ts.map +1 -1
  48. package/dist/global-layout.js +146 -129
  49. package/dist/grid.d.ts +2 -2
  50. package/dist/hooks/use-mobile.cjs +1 -0
  51. package/dist/hooks/use-mobile.js +8 -0
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.d.ts +1 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +547 -538
  56. package/dist/input-password.cjs +1 -1
  57. package/dist/input-password.d.ts +17 -9
  58. package/dist/input-password.d.ts.map +1 -1
  59. package/dist/input-password.js +26 -25
  60. package/dist/lib/empty-chip.cjs +1 -0
  61. package/dist/lib/empty-chip.d.ts +4 -0
  62. package/dist/lib/empty-chip.d.ts.map +1 -0
  63. package/dist/lib/empty-chip.js +13 -0
  64. package/dist/pagination.cjs +1 -1
  65. package/dist/pagination.d.ts +3 -0
  66. package/dist/pagination.d.ts.map +1 -1
  67. package/dist/pagination.js +57 -57
  68. package/dist/scroll-area.cjs +1 -1
  69. package/dist/scroll-area.d.ts +15 -6
  70. package/dist/scroll-area.d.ts.map +1 -1
  71. package/dist/scroll-area.js +38 -36
  72. package/dist/select.cjs +2 -2
  73. package/dist/select.d.ts +13 -2
  74. package/dist/select.d.ts.map +1 -1
  75. package/dist/select.js +87 -83
  76. package/dist/typography-heading.cjs +1 -1
  77. package/dist/typography-heading.d.ts +13 -0
  78. package/dist/typography-heading.d.ts.map +1 -1
  79. package/dist/typography-heading.js +32 -21
  80. package/dist/typography-text.cjs +1 -1
  81. package/dist/typography-text.d.ts +14 -0
  82. package/dist/typography-text.d.ts.map +1 -1
  83. package/dist/typography-text.js +35 -24
  84. package/package.json +1 -1
  85. package/src/blocks/empty-state.tsx +9 -21
  86. package/src/components/accordion.tsx +82 -27
  87. package/src/components/button-group.tsx +112 -0
  88. package/src/components/button.tsx +1 -1
  89. package/src/components/card.tsx +38 -3
  90. package/src/components/chart.tsx +63 -18
  91. package/src/components/chip.tsx +83 -10
  92. package/src/components/command.tsx +55 -3
  93. package/src/components/data-table.tsx +67 -7
  94. package/src/components/date-picker.tsx +18 -7
  95. package/src/components/field.tsx +81 -12
  96. package/src/components/global-layout.tsx +176 -38
  97. package/src/components/grid.tsx +2 -2
  98. package/src/components/input-password.tsx +23 -11
  99. package/src/components/pagination.tsx +10 -3
  100. package/src/components/scroll-area.tsx +23 -10
  101. package/src/components/select.tsx +30 -6
  102. package/src/components/typography-heading.tsx +24 -0
  103. package/src/components/typography-text.tsx +26 -1
  104. package/src/index.ts +1 -0
  105. package/src/lib/empty-chip.ts +24 -0
@@ -1,93 +1,94 @@
1
- import { jsx as a, jsxs as f, Fragment as T } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as x, Fragment as T } from "react/jsx-runtime";
2
2
  import * as p from "react";
3
- import { useReactTable as re, getExpandedRowModel as se, getFilteredRowModel as de, getSortedRowModel as ce, getPaginationRowModel as ue, getCoreRowModel as ge, flexRender as G } from "@tanstack/react-table";
4
- import { useVirtualizer as pe } from "@tanstack/react-virtual";
5
- import { ArrowDown as me, ArrowUp as he, ArrowUpDown as be, ChevronRight as fe, Search as xe, X as Se } from "@brightlocal/icons";
3
+ import { useReactTable as se, getExpandedRowModel as ce, getFilteredRowModel as de, getSortedRowModel as ue, getPaginationRowModel as ge, getCoreRowModel as pe, flexRender as L } from "@tanstack/react-table";
4
+ import { useVirtualizer as me } from "@tanstack/react-virtual";
5
+ import { ArrowDown as he, ArrowUp as be, ArrowUpDown as fe, ChevronRight as xe, Search as we, X as Se } from "@brightlocal/icons";
6
6
  import { cn as g } from "@brightlocal/ui-components/lib/utils";
7
- import { Button as V } from "./button.js";
8
- import { Checkbox as L } from "./checkbox.js";
9
- import { InputGroup as we, InputGroupAddon as j, InputGroupInput as Ce } from "./input-group.js";
10
- import { usePagination as ke, Pagination as ve, PaginationContent as Te, PaginationItem as E, PaginationPrevious as Pe, PaginationNext as Re, PaginationEllipsis as ye, PaginationLink as De } from "./pagination.js";
7
+ import { useIsBelowBreakpoint as V } from "@brightlocal/ui-components/hooks/use-breakpoint";
8
+ import { Button as j } from "./button.js";
9
+ import { Checkbox as _ } from "./checkbox.js";
10
+ import { InputGroup as Ce, InputGroupAddon as G, InputGroupInput as ke } from "./input-group.js";
11
+ import { usePagination as ve, Pagination as Te, PaginationContent as Pe, PaginationItem as $, PaginationPrevious as ye, PaginationNext as Re, PaginationEllipsis as De, PaginationLink as Ne } from "./pagination.js";
11
12
  import { Skeleton as B } from "./skeleton.js";
12
- import { Table as _, TableBody as U, TableRow as k, TableCell as v, TableHeader as Ne, TableHead as ze } from "./table.js";
13
- import { TypographyMuted as Ae } from "./typography.js";
14
- function y(e, n, l) {
15
- const [t, i] = p.useState(n), o = e !== void 0 ? e : t, r = p.useRef(o);
13
+ import { Table as U, TableBody as W, TableRow as k, TableCell as v, TableHeader as ze, TableHead as Ae } from "./table.js";
14
+ import { TypographyMuted as Ie } from "./typography.js";
15
+ function R(e, n, o) {
16
+ const [t, r] = p.useState(n), l = e !== void 0 ? e : t, i = p.useRef(l);
16
17
  p.useEffect(() => {
17
- r.current = o;
18
+ i.current = l;
18
19
  });
19
20
  const s = e !== void 0, d = p.useCallback(
20
21
  (c) => {
21
- const u = typeof c == "function" ? c(r.current) : c;
22
- s || i(u), l?.(u);
22
+ const u = typeof c == "function" ? c(i.current) : c;
23
+ s || r(u), o?.(u);
23
24
  },
24
- [s, l]
25
+ [s, o]
25
26
  );
26
- return [o, d];
27
+ return [l, d];
27
28
  }
28
- function sa(e) {
29
+ function da(e) {
29
30
  const {
30
31
  columns: n,
31
- data: l,
32
+ data: o,
32
33
  enableSorting: t = !0,
33
- enableGlobalFiltering: i = !1,
34
- enableRowSelection: o = !1,
35
- enablePagination: r = !1,
34
+ enableGlobalFiltering: r = !1,
35
+ enableRowSelection: l = !1,
36
+ enablePagination: i = !1,
36
37
  pageSize: s = 10,
37
38
  manualSorting: d = !1,
38
39
  manualFiltering: c = !1,
39
40
  manualPagination: u = !1,
40
41
  rowCount: h,
41
- pageCount: m,
42
- enableExpanding: S = !1,
43
- getSubRows: x,
44
- getRowCanExpand: w,
42
+ pageCount: b,
43
+ enableExpanding: m = !1,
44
+ getSubRows: w,
45
+ getRowCanExpand: S,
45
46
  paginateExpandedRows: P = !1,
46
- getRowId: b,
47
- pagination: I,
47
+ getRowId: f,
48
+ pagination: E,
48
49
  onPaginationChange: D,
49
- sorting: R,
50
+ sorting: y,
50
51
  onSortingChange: N,
51
52
  globalFilter: C,
52
- onGlobalFilterChange: F,
53
+ onGlobalFilterChange: M,
53
54
  rowSelection: z,
54
55
  onRowSelectionChange: A,
55
- expanded: M,
56
- onExpandedChange: $
57
- } = e, [Q, Y] = y(
58
- I,
56
+ expanded: F,
57
+ onExpandedChange: I
58
+ } = e, [Y, Z] = R(
59
+ E,
59
60
  { pageIndex: 0, pageSize: s },
60
61
  D
61
- ), [Z, ee] = y(
62
- R,
62
+ ), [ee, ae] = R(
63
+ y,
63
64
  [],
64
65
  N
65
- ), [ae, te] = y(
66
+ ), [te, ne] = R(
66
67
  C,
67
68
  "",
68
- F
69
- ), [ne, oe] = y(z, {}, A), [le, ie] = y(
70
- M,
69
+ M
70
+ ), [oe, le] = R(z, {}, A), [ie, re] = R(
71
+ F,
71
72
  {},
72
- $
73
+ I
73
74
  );
74
- return re({
75
- data: l,
75
+ return se({
76
+ data: o,
76
77
  columns: n,
77
- getCoreRowModel: ge(),
78
- ...b && { getRowId: b },
79
- ...(r || u) && {
80
- onPaginationChange: Y
78
+ getCoreRowModel: pe(),
79
+ ...f && { getRowId: f },
80
+ ...(i || u) && {
81
+ onPaginationChange: Z
81
82
  },
82
- ...r && {
83
+ ...i && {
83
84
  ...!u && {
84
- getPaginationRowModel: ue()
85
+ getPaginationRowModel: ge()
85
86
  }
86
87
  },
87
88
  ...u && {
88
89
  manualPagination: !0,
89
90
  ...h != null && { rowCount: h },
90
- ...m != null && { pageCount: m }
91
+ ...b != null && { pageCount: b }
91
92
  },
92
93
  // Always forward the flag — TanStack defaults `enableSorting` to true,
93
94
  // so omitting it would leave `column.getCanSort()` returning true even
@@ -95,107 +96,107 @@ function sa(e) {
95
96
  enableSorting: t,
96
97
  ...t && {
97
98
  ...!d && {
98
- getSortedRowModel: ce()
99
+ getSortedRowModel: ue()
99
100
  },
100
- onSortingChange: ee,
101
+ onSortingChange: ae,
101
102
  ...d && { manualSorting: !0 }
102
103
  },
103
- ...i && {
104
+ ...r && {
104
105
  ...!c && {
105
106
  getFilteredRowModel: de()
106
107
  },
107
108
  ...c && { manualFiltering: !0 },
108
- onGlobalFilterChange: te,
109
+ onGlobalFilterChange: ne,
109
110
  globalFilterFn: "includesString"
110
111
  },
111
112
  // Always forward — TanStack defaults `enableRowSelection` to true, so
112
113
  // omitting it would leave `row.getCanSelect()` returning true and
113
114
  // `DataTableSelectRowCheckbox` enabled on tables without selection.
114
- enableRowSelection: o,
115
+ enableRowSelection: l,
115
116
  // A predicate turns selection on for the table as a whole; individual rows
116
117
  // opt out through `row.getCanSelect()`, so the state wiring is still needed.
117
- ...o !== !1 && {
118
- onRowSelectionChange: oe
118
+ ...l !== !1 && {
119
+ onRowSelectionChange: le
119
120
  },
120
121
  // Always forward the flag — TanStack defaults `enableExpanding` to true,
121
122
  // so omitting it would leave `row.getCanExpand()` returning true and
122
123
  // `DataTableExpandRowButton` interactive on tables without expanding.
123
- enableExpanding: S,
124
- ...S && {
125
- getExpandedRowModel: se(),
126
- onExpandedChange: ie,
127
- getSubRows: x,
128
- ...w && { getRowCanExpand: w },
124
+ enableExpanding: m,
125
+ ...m && {
126
+ getExpandedRowModel: ce(),
127
+ onExpandedChange: re,
128
+ getSubRows: w,
129
+ ...S && { getRowCanExpand: S },
129
130
  // Forward only with client-side pagination: `paginateExpandedRows:
130
131
  // false` defers expansion to the pagination row model, so without one
131
132
  // it would suppress row expansion entirely.
132
- ...r && !u && { paginateExpandedRows: P }
133
+ ...i && !u && { paginateExpandedRows: P }
133
134
  },
134
135
  state: {
135
- pagination: Q,
136
- sorting: Z,
137
- globalFilter: ae,
138
- rowSelection: ne,
139
- expanded: le
136
+ pagination: Y,
137
+ sorting: ee,
138
+ globalFilter: te,
139
+ rowSelection: oe,
140
+ expanded: ie
140
141
  }
141
142
  });
142
143
  }
143
144
  function $e({
144
145
  table: e,
145
146
  dataHook: n,
146
- trackingEl: l,
147
+ trackingEl: o,
147
148
  trackingLabel: t,
148
- isLoading: i = !1,
149
- skeletonRowCount: o,
150
- noResultsMessage: r = "No results.",
149
+ isLoading: r = !1,
150
+ skeletonRowCount: l,
151
+ noResultsMessage: i = "No results.",
151
152
  stickyHeader: s = !1,
152
153
  className: d,
153
154
  layout: c,
154
155
  minWidth: u,
155
156
  scrollRegionLabel: h,
156
- footer: m,
157
- getRowClassName: S,
158
- renderExpandedContent: x
157
+ footer: b,
158
+ getRowClassName: m,
159
+ renderExpandedContent: w
159
160
  }) {
160
- const w = e.getVisibleLeafColumns().length, P = o ?? e.getState().pagination.pageSize ?? 10;
161
+ const S = e.getVisibleLeafColumns().length, P = l ?? e.getState().pagination.pageSize ?? 10;
161
162
  return /* @__PURE__ */ a(
162
163
  "div",
163
164
  {
164
- "aria-busy": i || void 0,
165
+ "aria-busy": r || void 0,
165
166
  className: g("border-border overflow-auto rounded-md border", d),
166
167
  "data-hook": n,
167
168
  "data-slot": "data-table-view",
168
- "data-tracking-el": l,
169
+ "data-tracking-el": o,
169
170
  "data-tracking-label": t,
170
- children: /* @__PURE__ */ f(
171
- _,
171
+ children: /* @__PURE__ */ x(
172
+ U,
172
173
  {
173
174
  dataHook: `${n}-table`,
174
175
  layout: c,
175
176
  minWidth: u,
176
177
  scrollRegionLabel: h,
177
178
  children: [
178
- /* @__PURE__ */ a(W, { stickyHeader: s, table: e }),
179
- /* @__PURE__ */ a(U, { children: i ? /* @__PURE__ */ f(T, { children: [
179
+ /* @__PURE__ */ a(O, { stickyHeader: s, table: e }),
180
+ /* @__PURE__ */ a(W, { children: r ? /* @__PURE__ */ x(T, { children: [
180
181
  /* @__PURE__ */ a(
181
- X,
182
+ q,
182
183
  {
183
- colCount: w,
184
+ colCount: S,
184
185
  rowCount: P
185
186
  }
186
187
  ),
187
- /* @__PURE__ */ a(k, { className: "sr-only", children: /* @__PURE__ */ a(v, { colSpan: w, children: /* @__PURE__ */ a("div", { "aria-live": "polite", role: "status", children: "Loading data…" }) }) })
188
- ] }) : /* @__PURE__ */ a(T, { children: e.getRowModel().rows.length > 0 ? e.getRowModel().rows.map((b) => /* @__PURE__ */ a(
189
- O,
188
+ /* @__PURE__ */ a(k, { className: "sr-only", children: /* @__PURE__ */ a(v, { colSpan: S, children: /* @__PURE__ */ a("div", { "aria-live": "polite", role: "status", children: "Loading data…" }) }) })
189
+ ] }) : /* @__PURE__ */ a(T, { children: e.getRowModel().rows.length > 0 ? e.getRowModel().rows.map((f) => /* @__PURE__ */ a(
190
+ X,
190
191
  {
191
- columnCount: w,
192
- getRowClassName: S,
193
- renderExpandedContent: x,
194
- row: b
192
+ columnCount: S,
193
+ getRowClassName: m,
194
+ renderExpandedContent: w,
195
+ row: f
195
196
  },
196
- b.id
197
- )) : /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(v, { align: "center", colSpan: w, size: "lg", children: /* @__PURE__ */ a("div", { "aria-live": "polite", className: "py-6", role: "status", children: r }) }) }) }) }),
198
- m
197
+ f.id
198
+ )) : /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(v, { align: "center", colSpan: S, size: "lg", children: /* @__PURE__ */ a("div", { "aria-live": "polite", className: "py-6", role: "status", children: i }) }) }) }) }),
199
+ b
199
200
  ]
200
201
  }
201
202
  )
@@ -203,36 +204,36 @@ function $e({
203
204
  );
204
205
  }
205
206
  $e.displayName = "DataTable";
206
- function W({
207
+ function O({
207
208
  table: e,
208
209
  stickyHeader: n
209
210
  }) {
210
- return /* @__PURE__ */ a(Ne, { className: g(n && "sticky top-0 z-10"), children: e.getHeaderGroups().map((l) => /* @__PURE__ */ a(k, { children: l.headers.map((t) => {
211
- const i = t.column.getCanSort() ? t.column.getIsSorted() : !1, o = i === "asc" ? "ascending" : i === "desc" ? "descending" : t.column.getCanSort() ? "none" : void 0, r = t.column.columnDef.meta;
211
+ return /* @__PURE__ */ a(ze, { className: g(n && "sticky top-0 z-10"), children: e.getHeaderGroups().map((o) => /* @__PURE__ */ a(k, { children: o.headers.map((t) => {
212
+ const r = t.column.getCanSort() ? t.column.getIsSorted() : !1, l = r === "asc" ? "ascending" : r === "desc" ? "descending" : t.column.getCanSort() ? "none" : void 0, i = t.column.columnDef.meta;
212
213
  return /* @__PURE__ */ a(
213
- ze,
214
+ Ae,
214
215
  {
215
- "aria-sort": o,
216
+ "aria-sort": l,
216
217
  colSpan: t.colSpan,
217
- minWidth: r?.minWidth,
218
- width: r?.width,
219
- children: t.isPlaceholder ? null : G(
218
+ minWidth: i?.minWidth,
219
+ width: i?.width,
220
+ children: t.isPlaceholder ? null : L(
220
221
  t.column.columnDef.header,
221
222
  t.getContext()
222
223
  )
223
224
  },
224
225
  t.id
225
226
  );
226
- }) }, l.id)) });
227
+ }) }, o.id)) });
227
228
  }
228
- function O({
229
+ function X({
229
230
  row: e,
230
231
  columnCount: n,
231
- getRowClassName: l,
232
+ getRowClassName: o,
232
233
  renderExpandedContent: t
233
234
  }) {
234
- const i = e.getCanExpand(), o = e.getIsExpanded(), r = t && i && o ? t(e) : null;
235
- return /* @__PURE__ */ f(T, { children: [
235
+ const r = e.getCanExpand(), l = e.getIsExpanded(), i = t && r && l ? t(e) : null;
236
+ return /* @__PURE__ */ x(T, { children: [
236
237
  /* @__PURE__ */ a(
237
238
  k,
238
239
  {
@@ -247,104 +248,104 @@ function O({
247
248
  // Surfaces are mutually exclusive: an expanded parent shares the
248
249
  // table head's bg-muted at ANY depth; other expanded-zone rows
249
250
  // (sub-rows) get the lighter accent wash.
250
- i && o ? "bg-muted" : e.depth > 0 && "bg-accent/50",
251
- l?.(e)
251
+ r && l ? "bg-muted" : e.depth > 0 && "bg-accent/50",
252
+ o?.(e)
252
253
  ),
253
254
  "data-depth": e.depth,
254
- "data-expanded": i ? String(o) : void 0,
255
+ "data-expanded": r ? String(l) : void 0,
255
256
  "data-state": e.getIsSelected() ? "selected" : void 0,
256
- children: e.getVisibleCells().map((s) => /* @__PURE__ */ a(v, { children: G(s.column.columnDef.cell, s.getContext()) }, s.id))
257
+ children: e.getVisibleCells().map((s) => /* @__PURE__ */ a(v, { children: L(s.column.columnDef.cell, s.getContext()) }, s.id))
257
258
  }
258
259
  ),
259
- r != null && // No data-depth here: panels are not data rows, and sharing the
260
+ i != null && // No data-depth here: panels are not data rows, and sharing the
260
261
  // parent's depth would break depth-based selectors and counts.
261
262
  /* @__PURE__ */ a(
262
263
  k,
263
264
  {
264
265
  className: "bg-accent/50 [&_[data-slot=button].bg-transparent:hover]:bg-secondary",
265
266
  "data-slot": "data-table-expanded-row",
266
- children: /* @__PURE__ */ a(v, { colSpan: n, children: r })
267
+ children: /* @__PURE__ */ a(v, { colSpan: n, children: i })
267
268
  }
268
269
  )
269
270
  ] });
270
271
  }
271
- function X({
272
+ function q({
272
273
  rowCount: e,
273
274
  colCount: n
274
275
  }) {
275
- return /* @__PURE__ */ a(T, { children: Array.from({ length: e }).map((l, t) => /* @__PURE__ */ a(k, { children: Array.from({ length: n }).map((i, o) => /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(B, { className: "h-4 w-full" }) }, `skeleton-${t}-${o}`)) }, `skeleton-${t}`)) });
276
+ return /* @__PURE__ */ a(T, { children: Array.from({ length: e }).map((o, t) => /* @__PURE__ */ a(k, { children: Array.from({ length: n }).map((r, l) => /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(B, { className: "h-4 w-full" }) }, `skeleton-${t}-${l}`)) }, `skeleton-${t}`)) });
276
277
  }
277
278
  function Ee({
278
279
  table: e,
279
280
  dataHook: n,
280
- trackingEl: l,
281
+ trackingEl: o,
281
282
  trackingLabel: t,
282
- isLoading: i = !1,
283
- skeletonRowCount: o,
284
- noResultsMessage: r = "No results.",
283
+ isLoading: r = !1,
284
+ skeletonRowCount: l,
285
+ noResultsMessage: i = "No results.",
285
286
  stickyHeader: s = !1,
286
287
  className: d,
287
288
  layout: c,
288
289
  minWidth: u,
289
290
  scrollRegionLabel: h,
290
- footer: m,
291
- getRowClassName: S,
292
- height: x,
293
- estimateSize: w = 48,
291
+ footer: b,
292
+ getRowClassName: m,
293
+ height: w,
294
+ estimateSize: S = 48,
294
295
  overscan: P = 5
295
296
  }) {
296
- const b = e.getVisibleLeafColumns().length, I = o ?? e.getState().pagination.pageSize ?? 10, D = p.useRef(null), R = e.getRowModel().rows, N = pe({
297
- count: R.length,
297
+ const f = e.getVisibleLeafColumns().length, E = l ?? e.getState().pagination.pageSize ?? 10, D = p.useRef(null), y = e.getRowModel().rows, N = me({
298
+ count: y.length,
298
299
  getScrollElement: () => D.current,
299
- estimateSize: () => w,
300
+ estimateSize: () => S,
300
301
  overscan: P
301
- }), C = N.getVirtualItems(), F = N.getTotalSize(), z = C.length > 0 ? C[0].start : 0, A = C.length > 0 ? F - C[C.length - 1].end : 0;
302
+ }), C = N.getVirtualItems(), M = N.getTotalSize(), z = C.length > 0 ? C[0].start : 0, A = C.length > 0 ? M - C[C.length - 1].end : 0;
302
303
  return /* @__PURE__ */ a(
303
304
  "div",
304
305
  {
305
306
  ref: D,
306
- "aria-busy": i || void 0,
307
+ "aria-busy": r || void 0,
307
308
  className: g("border-border overflow-auto rounded-md border", d),
308
309
  "data-hook": n,
309
310
  "data-slot": "data-table-view",
310
- "data-tracking-el": l,
311
+ "data-tracking-el": o,
311
312
  "data-tracking-label": t,
312
- style: x != null ? { height: x } : void 0,
313
- children: /* @__PURE__ */ f(
314
- _,
313
+ style: w != null ? { height: w } : void 0,
314
+ children: /* @__PURE__ */ x(
315
+ U,
315
316
  {
316
317
  dataHook: `${n}-table`,
317
318
  layout: c,
318
319
  minWidth: u,
319
320
  scrollRegionLabel: h,
320
321
  children: [
321
- /* @__PURE__ */ a(W, { stickyHeader: s, table: e }),
322
- /* @__PURE__ */ a(U, { children: i ? /* @__PURE__ */ f(T, { children: [
322
+ /* @__PURE__ */ a(O, { stickyHeader: s, table: e }),
323
+ /* @__PURE__ */ a(W, { children: r ? /* @__PURE__ */ x(T, { children: [
323
324
  /* @__PURE__ */ a(
324
- X,
325
+ q,
325
326
  {
326
- colCount: b,
327
- rowCount: I
327
+ colCount: f,
328
+ rowCount: E
328
329
  }
329
330
  ),
330
- /* @__PURE__ */ a(k, { className: "sr-only", children: /* @__PURE__ */ a(v, { colSpan: b, children: /* @__PURE__ */ a("div", { "aria-live": "polite", role: "status", children: "Loading data…" }) }) })
331
- ] }) : R.length > 0 ? /* @__PURE__ */ f(T, { children: [
332
- z > 0 && /* @__PURE__ */ a("tr", { "aria-hidden": "true", children: /* @__PURE__ */ a("td", { colSpan: b, style: { height: z } }) }),
333
- C.map((M) => {
334
- const $ = R[M.index];
331
+ /* @__PURE__ */ a(k, { className: "sr-only", children: /* @__PURE__ */ a(v, { colSpan: f, children: /* @__PURE__ */ a("div", { "aria-live": "polite", role: "status", children: "Loading data…" }) }) })
332
+ ] }) : y.length > 0 ? /* @__PURE__ */ x(T, { children: [
333
+ z > 0 && /* @__PURE__ */ a("tr", { "aria-hidden": "true", children: /* @__PURE__ */ a("td", { colSpan: f, style: { height: z } }) }),
334
+ C.map((F) => {
335
+ const I = y[F.index];
335
336
  return /* @__PURE__ */ a(
336
- O,
337
+ X,
337
338
  {
338
- columnCount: b,
339
- getRowClassName: S,
340
- row: $
339
+ columnCount: f,
340
+ getRowClassName: m,
341
+ row: I
341
342
  },
342
- $.id
343
+ I.id
343
344
  );
344
345
  }),
345
- A > 0 && /* @__PURE__ */ a("tr", { "aria-hidden": "true", children: /* @__PURE__ */ a("td", { colSpan: b, style: { height: A } }) })
346
- ] }) : /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(v, { align: "center", colSpan: b, size: "lg", children: /* @__PURE__ */ a("div", { "aria-live": "polite", className: "py-6", role: "status", children: r }) }) }) }),
347
- m
346
+ A > 0 && /* @__PURE__ */ a("tr", { "aria-hidden": "true", children: /* @__PURE__ */ a("td", { colSpan: f, style: { height: A } }) })
347
+ ] }) : /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(v, { align: "center", colSpan: f, size: "lg", children: /* @__PURE__ */ a("div", { "aria-live": "polite", className: "py-6", role: "status", children: i }) }) }) }),
348
+ b
348
349
  ]
349
350
  }
350
351
  )
@@ -352,14 +353,14 @@ function Ee({
352
353
  );
353
354
  }
354
355
  Ee.displayName = "VirtualizedDataTable";
355
- function Ie({
356
+ function Me({
356
357
  column: e,
357
358
  title: n,
358
- className: l,
359
+ className: o,
359
360
  dataHook: t,
360
- trackingEl: i,
361
- trackingLabel: o,
362
- align: r = "left",
361
+ trackingEl: r,
362
+ trackingLabel: l,
363
+ align: i = "left",
363
364
  getSortLabel: s
364
365
  }) {
365
366
  if (!e.getCanSort())
@@ -368,39 +369,39 @@ function Ie({
368
369
  {
369
370
  className: g(
370
371
  "text-muted-foreground text-label text-left font-semibold",
371
- r === "right" && "text-right",
372
- r === "center" && "text-center",
373
- l
372
+ i === "right" && "text-right",
373
+ i === "center" && "text-center",
374
+ o
374
375
  ),
375
376
  "data-hook": t,
376
377
  "data-slot": "data-table-column-header",
377
- "data-tracking-el": i,
378
- "data-tracking-label": o,
378
+ "data-tracking-el": r,
379
+ "data-tracking-label": l,
379
380
  children: n
380
381
  }
381
382
  );
382
- const d = e.getIsSorted(), c = s ? s(n, d) : d === "desc" ? `Sort by ${n}, currently descending` : d === "asc" ? `Sort by ${n}, currently ascending` : `Sort by ${n}`;
383
+ const d = e.getIsSorted(), c = d === !1 ? e.columnDef.sortDescFirst === !0 : d === "asc", u = s ? s(n, d) : d === "desc" ? `Sort by ${n}, currently descending` : d === "asc" ? `Sort by ${n}, currently ascending` : `Sort by ${n}`;
383
384
  return /* @__PURE__ */ a(
384
385
  "div",
385
386
  {
386
387
  className: g(
387
388
  "flex items-center",
388
- r === "right" && "justify-end",
389
- r === "center" && "justify-center",
390
- l
389
+ i === "right" && "justify-end",
390
+ i === "center" && "justify-center",
391
+ o
391
392
  ),
392
393
  "data-slot": "data-table-column-header",
393
- "data-tracking-el": i,
394
- "data-tracking-label": o,
395
- children: /* @__PURE__ */ f(
396
- V,
394
+ "data-tracking-el": r,
395
+ "data-tracking-label": l,
396
+ children: /* @__PURE__ */ x(
397
+ j,
397
398
  {
398
- "aria-label": c,
399
+ "aria-label": u,
399
400
  className: "text-muted-foreground text-label h-auto p-0 font-semibold",
400
401
  dataHook: t || `column-header-${e.id}`,
401
402
  size: "sm",
402
403
  variant: "ghost",
403
- onClick: () => e.toggleSorting(d === "asc"),
404
+ onClick: () => e.toggleSorting(c),
404
405
  children: [
405
406
  /* @__PURE__ */ a("span", { "aria-hidden": "true", children: n }),
406
407
  /* @__PURE__ */ a(
@@ -408,7 +409,7 @@ function Ie({
408
409
  {
409
410
  "aria-hidden": "true",
410
411
  className: "flex size-3 items-center justify-center",
411
- children: d === "desc" ? /* @__PURE__ */ a(me, { size: 12 }) : d === "asc" ? /* @__PURE__ */ a(he, { size: 12 }) : /* @__PURE__ */ a(be, { size: 12 })
412
+ children: d === "desc" ? /* @__PURE__ */ a(he, { size: 12 }) : d === "asc" ? /* @__PURE__ */ a(be, { size: 12 }) : /* @__PURE__ */ a(fe, { size: 12 })
412
413
  }
413
414
  )
414
415
  ]
@@ -417,87 +418,87 @@ function Ie({
417
418
  }
418
419
  );
419
420
  }
420
- Ie.displayName = "DataTableColumnHeader";
421
+ Me.displayName = "DataTableColumnHeader";
421
422
  function Fe({
422
423
  table: e,
423
424
  ariaLabel: n,
424
- placeholder: l,
425
+ placeholder: o,
425
426
  clearSearchAriaLabel: t,
426
- ...i
427
+ ...r
427
428
  }) {
428
- const o = e.getState().globalFilter ?? "", r = (s) => {
429
+ const l = e.getState().globalFilter ?? "", i = (s) => {
429
430
  e.setGlobalFilter(s);
430
431
  };
431
- return /* @__PURE__ */ f(we, { "data-slot": "data-table-search", ...i, children: [
432
- /* @__PURE__ */ a(j, { className: "pl-3", children: /* @__PURE__ */ a(xe, {}) }),
432
+ return /* @__PURE__ */ x(Ce, { "data-slot": "data-table-search", ...r, children: [
433
+ /* @__PURE__ */ a(G, { className: "pl-3", children: /* @__PURE__ */ a(we, {}) }),
433
434
  /* @__PURE__ */ a(
434
- Ce,
435
+ ke,
435
436
  {
436
437
  "aria-label": n ?? "Search table",
437
- placeholder: l ?? "Search...",
438
+ placeholder: o ?? "Search...",
438
439
  type: "text",
439
- value: o,
440
- onChange: (s) => r(s.target.value)
440
+ value: l,
441
+ onChange: (s) => i(s.target.value)
441
442
  }
442
443
  ),
443
- o && /* @__PURE__ */ a(j, { className: "pr-1", children: /* @__PURE__ */ a(
444
- V,
444
+ l && /* @__PURE__ */ a(G, { className: "pr-1", children: /* @__PURE__ */ a(
445
+ j,
445
446
  {
446
447
  "aria-label": t ?? "Clear search",
447
448
  className: "size-6 p-0",
448
449
  "data-slot": "data-table-search-clear",
449
- dataHook: `${i.dataHook}-clear`,
450
+ dataHook: `${r.dataHook}-clear`,
450
451
  variant: "ghost",
451
- onClick: () => r(""),
452
+ onClick: () => i(""),
452
453
  children: /* @__PURE__ */ a(Se, { size: 14 })
453
454
  }
454
455
  ) })
455
456
  ] });
456
457
  }
457
458
  Fe.displayName = "DataTableSearch";
458
- function Me(e) {
459
- const { pageIndex: n, pageSize: l } = e.getState().pagination, t = e.getRowCount(), i = e.getPageCount(), o = e.getCanPreviousPage(), r = e.getCanNextPage(), s = n + 1, d = t === 0 ? 0 : n * l + 1, c = Math.min(s * l, t), u = p.useCallback(
460
- (x) => e.setPageIndex(x - 1),
459
+ function Be(e) {
460
+ const { pageIndex: n, pageSize: o } = e.getState().pagination, t = e.getRowCount(), r = e.getPageCount(), l = e.getCanPreviousPage(), i = e.getCanNextPage(), s = n + 1, d = t === 0 ? 0 : n * o + 1, c = Math.min(s * o, t), u = p.useCallback(
461
+ (w) => e.setPageIndex(w - 1),
461
462
  [e]
462
- ), h = p.useCallback(() => e.nextPage(), [e]), m = p.useCallback(() => e.previousPage(), [e]), S = p.useCallback(
463
- (x) => e.setPageSize(x),
463
+ ), h = p.useCallback(() => e.nextPage(), [e]), b = p.useCallback(() => e.previousPage(), [e]), m = p.useCallback(
464
+ (w) => e.setPageSize(w),
464
465
  [e]
465
466
  );
466
467
  return p.useMemo(
467
468
  () => ({
468
469
  pageIndex: n,
469
- pageSize: l,
470
+ pageSize: o,
470
471
  totalRows: t,
471
- totalPages: i,
472
+ totalPages: r,
472
473
  startRow: d,
473
474
  endRow: c,
474
475
  currentPage: s,
475
- canPrev: o,
476
- canNext: r,
476
+ canPrev: l,
477
+ canNext: i,
477
478
  goToPage: u,
478
479
  nextPage: h,
479
- previousPage: m,
480
- setPageSize: S
480
+ previousPage: b,
481
+ setPageSize: m
481
482
  }),
482
483
  [
483
484
  n,
484
- l,
485
+ o,
485
486
  t,
486
- i,
487
+ r,
487
488
  d,
488
489
  c,
489
490
  s,
490
- o,
491
- r,
491
+ l,
492
+ i,
492
493
  u,
493
494
  h,
494
- m,
495
- S
495
+ b,
496
+ m
496
497
  ]
497
498
  );
498
499
  }
499
500
  const H = p.createContext(null);
500
- function q() {
501
+ function J() {
501
502
  const e = p.useContext(H);
502
503
  if (!e)
503
504
  throw new Error(
@@ -505,111 +506,120 @@ function q() {
505
506
  );
506
507
  return e;
507
508
  }
508
- function Be({
509
+ function He({
509
510
  renderText: e,
510
511
  className: n
511
512
  }) {
512
- const { info: l } = q(), { startRow: t, endRow: i, totalRows: o, pageIndex: r, pageSize: s } = l, d = e ? e({ startRow: t, endRow: i, totalRows: o, pageIndex: r, pageSize: s }) : o === 0 ? null : `${t}-${i} of ${o}`;
513
- return d == null ? null : /* @__PURE__ */ a(
513
+ const { info: o } = J(), t = V("sm"), { startRow: r, endRow: l, totalRows: i, pageIndex: s, pageSize: d } = o;
514
+ if (t) return null;
515
+ const c = e ? e({ startRow: r, endRow: l, totalRows: i, pageIndex: s, pageSize: d }) : i === 0 ? null : `${r}-${l} of ${i}`;
516
+ return c == null ? null : /* @__PURE__ */ a(
514
517
  "span",
515
518
  {
516
- className: g("text-body-sm text-muted-foreground", n),
519
+ className: g(
520
+ "text-body-sm text-muted-foreground whitespace-nowrap",
521
+ n
522
+ ),
517
523
  "data-slot": "data-table-pagination-row-count",
518
- children: d
524
+ children: c
519
525
  }
520
526
  );
521
527
  }
522
- Be.displayName = "DataTablePaginationRowCount";
523
- function J({
528
+ He.displayName = "DataTablePaginationRowCount";
529
+ function K({
524
530
  ariaLabel: e = "Table pagination",
525
531
  dataHook: n,
526
- className: l
532
+ className: o
527
533
  }) {
528
- const { info: t } = q(), i = ke({
534
+ const { info: t } = J(), r = V("sm"), l = ve({
529
535
  page: t.currentPage,
530
536
  totalPages: t.totalPages
531
537
  });
532
538
  return t.totalPages <= 1 ? null : /* @__PURE__ */ a(
533
- ve,
539
+ Te,
534
540
  {
535
541
  ariaLabel: e,
536
- className: g("mx-0 w-auto justify-end", l),
542
+ className: g(!r && "mx-0 w-auto justify-end", o),
537
543
  dataHook: n ?? "pagination-nav",
538
- children: /* @__PURE__ */ a(Te, { children: i.map((o, r) => o === "previous" ? /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
539
- Pe,
544
+ children: /* @__PURE__ */ a(Pe, { children: l.map((i, s) => i === "previous" ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
545
+ ye,
540
546
  {
541
547
  disabled: !t.canPrev,
542
548
  onClick: () => t.previousPage()
543
549
  }
544
- ) }, "previous") : o === "next" ? /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
550
+ ) }, "previous") : i === "next" ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
545
551
  Re,
546
552
  {
547
553
  disabled: !t.canNext,
548
554
  onClick: () => t.nextPage()
549
555
  }
550
- ) }, "next") : o === "ellipsis" ? /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(ye, {}) }, `ellipsis-${r}`) : /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
551
- De,
556
+ ) }, "next") : i === "ellipsis" ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(De, {}) }, `ellipsis-${s}`) : /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
557
+ Ne,
552
558
  {
553
- isActive: o === t.currentPage,
554
- page: o,
555
- onClick: () => t.goToPage(o)
559
+ isActive: i === t.currentPage,
560
+ page: i,
561
+ onClick: () => t.goToPage(i)
556
562
  }
557
- ) }, o)) })
563
+ ) }, i)) })
558
564
  }
559
565
  );
560
566
  }
561
- J.displayName = "DataTablePaginationNav";
562
- function He({
567
+ K.displayName = "DataTablePaginationNav";
568
+ function Ve({
563
569
  table: e,
564
570
  dataHook: n,
565
- showRowCount: l = !0,
571
+ showRowCount: o = !0,
566
572
  renderRowCount: t,
567
- trackingEl: i,
568
- trackingLabel: o,
569
- className: r,
573
+ trackingEl: r,
574
+ trackingLabel: l,
575
+ className: i,
570
576
  ariaLabel: s = "Table pagination",
571
577
  children: d
572
578
  }) {
573
- const c = Me(e), u = p.useMemo(
579
+ const c = Be(e), u = V("sm"), h = p.useMemo(
574
580
  () => ({ info: c }),
575
581
  [c]
576
- ), h = {
582
+ ), b = {
577
583
  "data-hook": n,
578
584
  "data-slot": "data-table-pagination",
579
- "data-tracking-el": i,
580
- "data-tracking-label": o
585
+ "data-tracking-el": r,
586
+ "data-tracking-label": l
581
587
  };
582
588
  if (d)
583
- return /* @__PURE__ */ a(H.Provider, { value: u, children: /* @__PURE__ */ a(
589
+ return /* @__PURE__ */ a(H.Provider, { value: h, children: /* @__PURE__ */ a(
584
590
  "div",
585
591
  {
586
- className: g("flex w-full items-center gap-4", r),
587
- ...h,
592
+ className: g(
593
+ "flex w-full flex-wrap items-center gap-x-4 gap-y-2",
594
+ i
595
+ ),
596
+ ...b,
588
597
  children: d
589
598
  }
590
599
  ) });
591
- const m = !l || t === null ? null : t ? t({
600
+ const m = u || !o || t === null ? null : t ? t({
592
601
  startRow: c.startRow,
593
602
  endRow: c.endRow,
594
603
  totalRows: c.totalRows,
595
604
  pageIndex: c.pageIndex,
596
605
  pageSize: c.pageSize
597
606
  }) : c.totalRows === 0 ? null : `${c.startRow}-${c.endRow} of ${c.totalRows}`;
598
- return m == null && c.totalPages <= 1 ? null : /* @__PURE__ */ a(H.Provider, { value: u, children: /* @__PURE__ */ f(
607
+ return m == null && c.totalPages <= 1 ? null : /* @__PURE__ */ a(H.Provider, { value: h, children: /* @__PURE__ */ x(
599
608
  "div",
600
609
  {
601
610
  className: g(
602
- "flex min-h-9 w-full items-center gap-4",
611
+ "flex min-h-9 w-full flex-wrap items-center gap-x-4 gap-y-2",
603
612
  m != null ? "justify-between" : "justify-end",
604
- r
613
+ i
605
614
  ),
606
- ...h,
615
+ ...b,
607
616
  children: [
608
- m != null && /* @__PURE__ */ a("span", { className: "text-body-sm text-muted-foreground", children: m }),
617
+ m != null && /* @__PURE__ */ a("span", { className: "text-body-sm text-muted-foreground whitespace-nowrap", children: m }),
609
618
  /* @__PURE__ */ a(
610
- J,
619
+ K,
611
620
  {
612
621
  ariaLabel: s,
622
+ className: "grow",
613
623
  dataHook: `${n}-nav`
614
624
  }
615
625
  )
@@ -617,56 +627,56 @@ function He({
617
627
  }
618
628
  ) });
619
629
  }
620
- He.displayName = "DataTablePagination";
621
- function Ve({
630
+ Ve.displayName = "DataTablePagination";
631
+ function je({
622
632
  table: e,
623
633
  dataHook: n,
624
- trackingEl: l,
634
+ trackingEl: o,
625
635
  trackingLabel: t,
626
- selectAllAriaLabel: i
636
+ selectAllAriaLabel: r
627
637
  }) {
628
638
  return /* @__PURE__ */ a(
629
- L,
639
+ _,
630
640
  {
631
- "aria-label": i ?? "Select all",
641
+ "aria-label": r ?? "Select all",
632
642
  checked: e.getIsAllPageRowsSelected() || e.getIsSomePageRowsSelected() && "indeterminate",
633
643
  dataHook: n || "select-all-checkbox",
634
- trackingEl: l,
644
+ trackingEl: o,
635
645
  trackingLabel: t,
636
- onCheckedChange: (o) => e.toggleAllPageRowsSelected(!!o)
646
+ onCheckedChange: (l) => e.toggleAllPageRowsSelected(!!l)
637
647
  }
638
648
  );
639
649
  }
640
- Ve.displayName = "DataTableSelectAllCheckbox";
641
- function je({
650
+ je.displayName = "DataTableSelectAllCheckbox";
651
+ function Ge({
642
652
  row: e,
643
653
  dataHook: n,
644
- trackingEl: l,
654
+ trackingEl: o,
645
655
  trackingLabel: t,
646
- selectRowAriaLabel: i
656
+ selectRowAriaLabel: r
647
657
  }) {
648
658
  return /* @__PURE__ */ a(
649
- L,
659
+ _,
650
660
  {
651
- "aria-label": i ?? "Select row",
661
+ "aria-label": r ?? "Select row",
652
662
  checked: e.getIsSelected(),
653
663
  dataHook: n || `select-row-${e.id}`,
654
664
  disabled: !e.getCanSelect(),
655
- trackingEl: l,
665
+ trackingEl: o,
656
666
  trackingLabel: t,
657
- onCheckedChange: (o) => e.toggleSelected(!!o)
667
+ onCheckedChange: (l) => e.toggleSelected(!!l)
658
668
  }
659
669
  );
660
670
  }
661
- je.displayName = "DataTableSelectRowCheckbox";
662
- function Ge({
671
+ Ge.displayName = "DataTableSelectRowCheckbox";
672
+ function Le({
663
673
  row: e,
664
674
  rowName: n,
665
- dataHook: l,
675
+ dataHook: o,
666
676
  trackingEl: t,
667
- trackingLabel: i,
668
- expandLabel: o,
669
- collapseLabel: r,
677
+ trackingLabel: r,
678
+ expandLabel: l,
679
+ collapseLabel: i,
670
680
  className: s
671
681
  }) {
672
682
  if (!e.getCanExpand())
@@ -678,24 +688,24 @@ function Ge({
678
688
  "data-slot": "data-table-expand-row-spacer"
679
689
  }
680
690
  );
681
- const d = e.getIsExpanded(), c = d ? r : o;
691
+ const d = e.getIsExpanded(), c = d ? i : l;
682
692
  let u;
683
693
  return c && (n !== void 0 || !c.includes("{name}")) ? u = c.replaceAll("{name}", n ?? "") : n !== void 0 ? u = d ? `Collapse details for ${n}` : `Expand details for ${n}` : u = d ? "Collapse row" : "Expand row", /* @__PURE__ */ a(
684
- V,
694
+ j,
685
695
  {
686
696
  iconOnly: !0,
687
697
  "aria-expanded": d,
688
698
  "aria-label": u,
689
699
  className: s,
690
700
  "data-state": d ? "open" : "closed",
691
- dataHook: l || `expand-row-${e.id}`,
701
+ dataHook: o || `expand-row-${e.id}`,
692
702
  size: "sm",
693
703
  trackingEl: t,
694
- trackingLabel: i,
704
+ trackingLabel: r,
695
705
  variant: "ghost",
696
706
  onClick: e.getToggleExpandedHandler(),
697
707
  children: /* @__PURE__ */ a(
698
- fe,
708
+ xe,
699
709
  {
700
710
  "aria-hidden": "true",
701
711
  className: g(
@@ -707,87 +717,87 @@ function Ge({
707
717
  }
708
718
  );
709
719
  }
710
- Ge.displayName = "DataTableExpandRowButton";
711
- function Le({
720
+ Le.displayName = "DataTableExpandRowButton";
721
+ function _e({
712
722
  fields: e = 3,
713
723
  loadingLabel: n,
714
- dataHook: l,
724
+ dataHook: o,
715
725
  className: t
716
726
  }) {
717
- return /* @__PURE__ */ f(
727
+ return /* @__PURE__ */ x(
718
728
  "div",
719
729
  {
720
730
  className: g("relative flex flex-col gap-2 py-1", t),
721
- "data-hook": l || "data-table-expanded-skeleton",
731
+ "data-hook": o || "data-table-expanded-skeleton",
722
732
  "data-slot": "data-table-expanded-skeleton",
723
733
  role: "status",
724
734
  children: [
725
735
  /* @__PURE__ */ a("span", { className: "sr-only", children: n ?? "Loading details" }),
726
- Array.from({ length: e }, (i, o) => /* @__PURE__ */ f("div", { "aria-hidden": "true", className: "flex items-center gap-4", children: [
736
+ Array.from({ length: e }, (r, l) => /* @__PURE__ */ x("div", { "aria-hidden": "true", className: "flex items-center gap-4", children: [
727
737
  /* @__PURE__ */ a(B, { className: "h-4 w-24 shrink-0" }),
728
738
  /* @__PURE__ */ a(B, { className: "h-4 w-48 max-w-full" })
729
- ] }, o))
739
+ ] }, l))
730
740
  ]
731
741
  }
732
742
  );
733
743
  }
734
- Le.displayName = "DataTableExpandedSkeleton";
735
- const K = p.createContext(null);
736
- function _e() {
737
- const e = p.useContext(K);
744
+ _e.displayName = "DataTableExpandedSkeleton";
745
+ const Q = p.createContext(null);
746
+ function Ue() {
747
+ const e = p.useContext(Q);
738
748
  if (!e)
739
749
  throw new Error(
740
750
  "DataTableBulkActions components must be used within <DataTableBulkActions>"
741
751
  );
742
752
  return e;
743
753
  }
744
- function Ue({
754
+ function We({
745
755
  table: e,
746
756
  dataHook: n,
747
- trackingEl: l,
757
+ trackingEl: o,
748
758
  trackingLabel: t,
749
- className: i,
750
- children: o
759
+ className: r,
760
+ children: l
751
761
  }) {
752
- const r = e.getFilteredSelectedRowModel().rows.length, s = e.getRowCount(), d = p.useMemo(
753
- () => ({ selectedCount: r, totalCount: s }),
754
- [r, s]
762
+ const i = e.getFilteredSelectedRowModel().rows.length, s = e.getRowCount(), d = p.useMemo(
763
+ () => ({ selectedCount: i, totalCount: s }),
764
+ [i, s]
755
765
  );
756
- return r === 0 ? null : /* @__PURE__ */ a(K.Provider, { value: d, children: /* @__PURE__ */ a(
766
+ return i === 0 ? null : /* @__PURE__ */ a(Q.Provider, { value: d, children: /* @__PURE__ */ a(
757
767
  "div",
758
768
  {
759
- className: g("flex items-center gap-2.5", i),
769
+ className: g("flex items-center gap-2.5", r),
760
770
  "data-hook": n,
761
771
  "data-slot": "data-table-bulk-actions",
762
- "data-tracking-el": l ?? "data-table-bulk-actions",
772
+ "data-tracking-el": o ?? "data-table-bulk-actions",
763
773
  "data-tracking-label": t,
764
- children: o
774
+ children: l
765
775
  }
766
776
  ) });
767
777
  }
768
- Ue.displayName = "DataTableBulkActions";
769
- function We({
778
+ We.displayName = "DataTableBulkActions";
779
+ function Oe({
770
780
  dataHook: e = "data-table-bulk-actions-summary",
771
781
  className: n,
772
- children: l
782
+ children: o
773
783
  }) {
774
- const { selectedCount: t, totalCount: i } = _e();
775
- let o;
776
- return typeof l == "function" ? o = l({ selectedCount: t, totalCount: i }) : l != null ? o = l : o = `${t} of ${i} row(s) selected.`, /* @__PURE__ */ a(
777
- Ae,
784
+ const { selectedCount: t, totalCount: r } = Ue();
785
+ let l;
786
+ return typeof o == "function" ? l = o({ selectedCount: t, totalCount: r }) : o != null ? l = o : l = `${t} of ${r} row(s) selected.`, /* @__PURE__ */ a(
787
+ Ie,
778
788
  {
779
789
  asChild: !0,
780
790
  className: g("min-w-0", n),
781
791
  dataHook: e,
782
- children: /* @__PURE__ */ a("span", { "data-slot": "data-table-bulk-actions-summary", role: "status", children: o })
792
+ children: /* @__PURE__ */ a("span", { "data-slot": "data-table-bulk-actions-summary", role: "status", children: l })
783
793
  }
784
794
  );
785
795
  }
786
- We.displayName = "DataTableBulkActionsSummary";
787
- function Oe({
796
+ Oe.displayName = "DataTableBulkActionsSummary";
797
+ function Xe({
788
798
  dataHook: e = "data-table-bulk-actions-actions",
789
799
  className: n,
790
- children: l
800
+ children: o
791
801
  }) {
792
802
  return /* @__PURE__ */ a(
793
803
  "div",
@@ -795,15 +805,15 @@ function Oe({
795
805
  className: g("flex shrink-0 items-center gap-2", n),
796
806
  "data-hook": e,
797
807
  "data-slot": "data-table-bulk-actions-actions",
798
- children: l
808
+ children: o
799
809
  }
800
810
  );
801
811
  }
802
- Oe.displayName = "DataTableBulkActionsActions";
803
- function Xe({
812
+ Xe.displayName = "DataTableBulkActionsActions";
813
+ function qe({
804
814
  dataHook: e,
805
815
  className: n,
806
- children: l
816
+ children: o
807
817
  }) {
808
818
  return /* @__PURE__ */ a(
809
819
  "div",
@@ -814,12 +824,12 @@ function Xe({
814
824
  ),
815
825
  "data-hook": e,
816
826
  "data-slot": "data-table-toolbar",
817
- children: l
827
+ children: o
818
828
  }
819
829
  );
820
830
  }
821
- Xe.displayName = "DataTableToolbar";
822
- function qe({
831
+ qe.displayName = "DataTableToolbar";
832
+ function Je({
823
833
  className: e,
824
834
  children: n
825
835
  }) {
@@ -835,8 +845,8 @@ function qe({
835
845
  }
836
846
  );
837
847
  }
838
- qe.displayName = "DataTableToolbarLeft";
839
- function Je({
848
+ Je.displayName = "DataTableToolbarLeft";
849
+ function Ke({
840
850
  className: e,
841
851
  children: n
842
852
  }) {
@@ -852,25 +862,25 @@ function Je({
852
862
  }
853
863
  );
854
864
  }
855
- Je.displayName = "DataTableToolbarRight";
865
+ Ke.displayName = "DataTableToolbarRight";
856
866
  export {
857
867
  $e as DataTable,
858
- Ue as DataTableBulkActions,
859
- Oe as DataTableBulkActionsActions,
860
- We as DataTableBulkActionsSummary,
861
- Ie as DataTableColumnHeader,
862
- Ge as DataTableExpandRowButton,
863
- Le as DataTableExpandedSkeleton,
864
- He as DataTablePagination,
865
- J as DataTablePaginationNav,
866
- Be as DataTablePaginationRowCount,
868
+ We as DataTableBulkActions,
869
+ Xe as DataTableBulkActionsActions,
870
+ Oe as DataTableBulkActionsSummary,
871
+ Me as DataTableColumnHeader,
872
+ Le as DataTableExpandRowButton,
873
+ _e as DataTableExpandedSkeleton,
874
+ Ve as DataTablePagination,
875
+ K as DataTablePaginationNav,
876
+ He as DataTablePaginationRowCount,
867
877
  Fe as DataTableSearch,
868
- Ve as DataTableSelectAllCheckbox,
869
- je as DataTableSelectRowCheckbox,
870
- Xe as DataTableToolbar,
871
- qe as DataTableToolbarLeft,
872
- Je as DataTableToolbarRight,
878
+ je as DataTableSelectAllCheckbox,
879
+ Ge as DataTableSelectRowCheckbox,
880
+ qe as DataTableToolbar,
881
+ Je as DataTableToolbarLeft,
882
+ Ke as DataTableToolbarRight,
873
883
  Ee as VirtualizedDataTable,
874
- sa as useDataTable,
875
- _e as useDataTableBulkActionsContext
884
+ da as useDataTable,
885
+ Ue as useDataTableBulkActionsContext
876
886
  };