@cascivo/react 0.16.1 → 0.17.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 (50) hide show
  1. package/dist/accordion/accordion.js +5 -4
  2. package/dist/app-shell/app-shell.css +1 -1
  3. package/dist/app-shell/app-shell.js +28 -26
  4. package/dist/app-shell/app-shell.module.js +8 -8
  5. package/dist/button/button.css +1 -1
  6. package/dist/button/button.js +4 -1
  7. package/dist/button/button.module.js +4 -1
  8. package/dist/calendar/calendar.js +67 -63
  9. package/dist/card/card.css +1 -1
  10. package/dist/card/card.module.js +8 -8
  11. package/dist/checkbox/checkbox.css +1 -1
  12. package/dist/checkbox/checkbox.module.js +4 -4
  13. package/dist/combobox/combobox.js +55 -54
  14. package/dist/data-table/data-table.css +1 -1
  15. package/dist/data-table/data-table.js +155 -160
  16. package/dist/data-table/data-table.module.js +29 -29
  17. package/dist/date-picker/date-picker.js +90 -89
  18. package/dist/field/field.css +1 -1
  19. package/dist/field/field.module.js +3 -3
  20. package/dist/index.d.ts +72 -4
  21. package/dist/layouts/src/grid/grid.css +1 -1
  22. package/dist/layouts/src/grid/grid.module.js +3 -3
  23. package/dist/node/accordion/accordion.js +5 -4
  24. package/dist/node/app-shell/app-shell.js +28 -26
  25. package/dist/node/app-shell/app-shell.module.js +8 -8
  26. package/dist/node/button/button.js +4 -1
  27. package/dist/node/button/button.module.js +4 -1
  28. package/dist/node/calendar/calendar.js +67 -63
  29. package/dist/node/card/card.module.js +8 -8
  30. package/dist/node/checkbox/checkbox.module.js +4 -4
  31. package/dist/node/combobox/combobox.js +55 -54
  32. package/dist/node/data-table/data-table.js +155 -160
  33. package/dist/node/data-table/data-table.module.js +29 -29
  34. package/dist/node/date-picker/date-picker.js +90 -89
  35. package/dist/node/field/field.module.js +3 -3
  36. package/dist/node/layouts/src/grid/grid.module.js +3 -3
  37. package/dist/node/search/search.js +5 -4
  38. package/dist/node/side-nav/side-nav.js +90 -89
  39. package/dist/node/swap/swap.js +2 -3
  40. package/dist/node/switcher/switcher.js +1 -1
  41. package/dist/node/tabs/tabs.js +5 -4
  42. package/dist/node/toc/toc.js +5 -4
  43. package/dist/search/search.js +5 -4
  44. package/dist/side-nav/side-nav.js +90 -89
  45. package/dist/styles.css +7 -7
  46. package/dist/swap/swap.js +2 -3
  47. package/dist/switcher/switcher.js +1 -1
  48. package/dist/tabs/tabs.js +5 -4
  49. package/dist/toc/toc.js +5 -4
  50. package/package.json +3 -3
@@ -4,70 +4,67 @@ import { Button as e } from "../button/button.js";
4
4
  import { Checkbox as t } from "../checkbox/checkbox.js";
5
5
  import n from "./data-table.module.js";
6
6
  import { Fragment as r, useId as i, useRef as a } from "react";
7
- import { batch as o, cn as s, useComputed as c, useSignal as l, useSignalEffect as ee, useSignals as te } from "@cascivo/core";
8
- import { builtin as u, t as d } from "@cascivo/i18n";
9
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { batch as o, cn as s, useComputed as c, useControllableSignal as l, useSignal as u, useSignalEffect as ee, useSignals as te } from "@cascivo/core";
8
+ import { builtin as d, t as f } from "@cascivo/i18n";
9
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
10
  import { flushSync as ne } from "react-dom";
11
11
  //#region ../components/src/data-table/data-table.tsx
12
- function m(e, t) {
12
+ function h(e, t) {
13
13
  return e[t];
14
14
  }
15
15
  function re(e, t) {
16
16
  return typeof e == "number" && typeof t == "number" ? e - t : String(e ?? "").localeCompare(String(t ?? ""));
17
17
  }
18
- function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMode: ae = "client", onSortChange: oe, searchable: se = !1, pagination: y, selection: b, batchActions: x, renderExpandedRow: S, density: ce = "normal", zebra: le = !1, stickyHeader: ue = !1, loading: C = !1, emptyState: de, title: w, description: T, labels: E, className: fe, virtualized: D = !1, rowHeight: O = 40, windowSize: pe = 20, overscan: me = 3 }) {
18
+ function g({ columns: g, rows: ie, getRowId: _, sort: ae, defaultSort: oe, sortMode: se = "client", onSortChange: ce, searchable: v = !1, pagination: y, selection: b, batchActions: x, renderExpandedRow: S, density: le = "normal", zebra: ue = !1, stickyHeader: de = !1, loading: C = !1, emptyState: fe, title: w, description: T, labels: E, className: pe, virtualized: D = !1, rowHeight: O = 40, windowSize: me = 20, overscan: he = 3 }) {
19
19
  te();
20
- let he = i(), k = {
21
- search: E?.search ?? d(u.dataTable.search),
22
- empty: E?.empty ?? d(u.dataTable.empty),
23
- selectAll: E?.selectAll ?? d(u.dataTable.selectAll),
24
- selectRow: E?.selectRow ?? d(u.dataTable.selectRow),
25
- itemsSelected: (e) => E?.itemsSelected?.(e) ?? d(u.dataTable.itemsSelected, { count: e }),
26
- expandRow: E?.expandRow ?? d(u.dataTable.expandRow),
27
- previousPage: E?.previousPage ?? d(u.dataTable.previousPage),
28
- nextPage: E?.nextPage ?? d(u.dataTable.nextPage)
29
- }, ge = l(g);
30
- ge.value = g;
31
- let _e = l(h);
32
- _e.value = h;
33
- let A = l(v ?? ie);
34
- v !== void 0 && (A.value = v);
35
- let j = l(b?.selected ?? []);
36
- b?.selected !== void 0 && (j.value = b.selected);
37
- let M = l(""), N = l(1), P = l(y?.pageSize ?? 0), F = l(/* @__PURE__ */ new Set()), I = a(null), L = l(0);
20
+ let k = i(), A = {
21
+ search: E?.search ?? f(d.dataTable.search),
22
+ empty: E?.empty ?? f(d.dataTable.empty),
23
+ selectAll: E?.selectAll ?? f(d.dataTable.selectAll),
24
+ selectRow: E?.selectRow ?? f(d.dataTable.selectRow),
25
+ itemsSelected: (e) => E?.itemsSelected?.(e) ?? f(d.dataTable.itemsSelected, { count: e }),
26
+ expandRow: E?.expandRow ?? f(d.dataTable.expandRow),
27
+ previousPage: E?.previousPage ?? f(d.dataTable.previousPage),
28
+ nextPage: E?.nextPage ?? f(d.dataTable.nextPage)
29
+ }, [ge] = l({ value: ie }), [_e] = l({ value: g }), [j, ve] = l({
30
+ value: ae,
31
+ defaultValue: oe
32
+ }), M = u([]), N = b?.selected ?? M.value, P = (e) => {
33
+ b?.selected === void 0 && (M.value = e), b?.onChange?.(e);
34
+ }, F = u(""), I = u(1), L = u(y?.pageSize ?? 0), R = u(/* @__PURE__ */ new Set()), z = a(null), B = u(0);
38
35
  ee(() => {
39
36
  if (!D) return;
40
- let e = I.current;
37
+ let e = z.current;
41
38
  if (!e) return;
42
39
  let t = () => {
43
40
  ne(() => {
44
- L.value = e.scrollTop;
41
+ B.value = e.scrollTop;
45
42
  });
46
43
  };
47
44
  return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
48
45
  });
49
- let R = c(() => ge.value.map((e, t) => ({
46
+ let V = c(() => ge.value.map((e, t) => ({
50
47
  row: e,
51
48
  id: _ ? _(e) : String(t)
52
- }))), z = c(() => {
53
- let e = M.value.trim().toLowerCase();
54
- if (!e) return R.value;
49
+ }))), H = c(() => {
50
+ let e = F.value.trim().toLowerCase();
51
+ if (!e) return V.value;
55
52
  let t = _e.value;
56
- return R.value.filter((n) => t.some((t) => String(m(n.row, t.key) ?? "").toLowerCase().includes(e)));
57
- }), B = c(() => {
58
- let e = A.value;
59
- if (!e || ae === "server") return z.value;
60
- let t = z.value.map((e, t) => [e, t]);
53
+ return V.value.filter((n) => t.some((t) => String(h(n.row, t.key) ?? "").toLowerCase().includes(e)));
54
+ }), U = c(() => {
55
+ let e = j.value;
56
+ if (!e || se === "server") return H.value;
57
+ let t = H.value.map((e, t) => [e, t]);
61
58
  return t.sort((t, n) => {
62
- let r = re(m(t[0].row, e.key), m(n[0].row, e.key));
59
+ let r = re(h(t[0].row, e.key), h(n[0].row, e.key));
63
60
  return e.direction === "desc" && (r = -r), r === 0 ? t[1] - n[1] : r;
64
61
  }), t.map(([e]) => e);
65
- }), ve = c(() => y ? Math.max(1, Math.ceil(z.value.length / P.value)) : 1), V = c(() => Math.min(N.value, ve.value)), H = c(() => {
66
- if (!y) return B.value;
67
- let e = (V.value - 1) * P.value;
68
- return B.value.slice(e, e + P.value);
69
- }), U = c(() => D ? Math.floor(L.value / O) : 0), ye = c(() => D ? Math.min(U.value + pe + me * 2, H.value.length) : H.value.length), be = c(() => D ? H.value.slice(U.value, ye.value) : H.value), xe = (e) => {
70
- let t = A.value, n;
62
+ }), ye = c(() => y ? Math.max(1, Math.ceil(H.value.length / L.value)) : 1), W = c(() => Math.min(I.value, ye.value)), G = c(() => {
63
+ if (!y) return U.value;
64
+ let e = (W.value - 1) * L.value;
65
+ return U.value.slice(e, e + L.value);
66
+ }), K = c(() => D ? Math.floor(B.value / O) : 0), be = c(() => D ? Math.min(K.value + me + he * 2, G.value.length) : G.value.length), xe = c(() => D ? G.value.slice(K.value, be.value) : G.value), Se = (e) => {
67
+ let t = j.value, n;
71
68
  n = !t || t.key !== e ? {
72
69
  key: e,
73
70
  direction: "asc"
@@ -75,9 +72,9 @@ function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMod
75
72
  key: e,
76
73
  direction: "desc"
77
74
  } : void 0, o(() => {
78
- v === void 0 && (A.value = n), N.value = 1;
79
- }), oe?.(n);
80
- }, Se = (e) => {
75
+ ve(n), I.value = 1;
76
+ }), ce?.(n);
77
+ }, Ce = (e) => {
81
78
  if (![
82
79
  "ArrowUp",
83
80
  "ArrowDown",
@@ -99,194 +96,192 @@ function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMod
99
96
  }
100
97
  }
101
98
  a?.focus();
102
- }, W = (e) => {
103
- b?.selected === void 0 && (j.value = e), b?.onChange?.(e);
104
- }, Ce = (e) => {
105
- let t = j.value;
106
- b?.mode === "single" ? W(t.includes(e) ? [] : [e]) : W(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
107
99
  }, we = (e) => {
108
- let t = new Set(F.value);
109
- t.has(e) ? t.delete(e) : t.add(e), F.value = t;
110
- }, G = H.value, K = j.value, Te = F.value, q = G.length > 0 && G.every((e) => K.includes(e.id)), Ee = G.some((e) => K.includes(e.id)), J = be.value, Y = U.value, X = ye.value, De = () => {
111
- let e = G.map((e) => e.id);
112
- W(q ? K.filter((t) => !e.includes(t)) : [...new Set([...K, ...e])]);
113
- }, Z = h.length + +!!b + +!!S, Oe = y && !D && J.length > 0 ? Math.max(0, P.value - J.length) : 0, ke = `${he}-title`, Ae = `${he}-description`, Q = z.value.length, $ = Q === 0 ? 0 : (V.value - 1) * P.value + 1, je = Q === 0 ? 0 : $ + G.length - 1, Me = !!x && x.length > 0 && K.length > 0;
114
- return /* @__PURE__ */ p("div", {
115
- className: s(n.root, fe),
116
- "data-density": ce,
117
- "data-zebra": le || void 0,
118
- "data-sticky-header": ue || void 0,
100
+ let t = N;
101
+ b?.mode === "single" ? P(t.includes(e) ? [] : [e]) : P(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
102
+ }, Te = (e) => {
103
+ let t = new Set(R.value);
104
+ t.has(e) ? t.delete(e) : t.add(e), R.value = t;
105
+ }, q = G.value, Ee = R.value, J = q.length > 0 && q.every((e) => N.includes(e.id)), De = q.some((e) => N.includes(e.id)), Y = xe.value, X = K.value, Oe = be.value, ke = () => {
106
+ let e = q.map((e) => e.id);
107
+ P(J ? N.filter((t) => !e.includes(t)) : [...new Set([...N, ...e])]);
108
+ }, Z = g.length + +!!b + +!!S, Ae = y && !D && Y.length > 0 ? Math.max(0, L.value - Y.length) : 0, je = `${k}-title`, Me = `${k}-description`, Q = H.value.length, $ = Q === 0 ? 0 : (W.value - 1) * L.value + 1, Ne = Q === 0 ? 0 : $ + q.length - 1, Pe = !!x && x.length > 0 && N.length > 0;
109
+ return /* @__PURE__ */ m("div", {
110
+ className: s(n.root, pe),
111
+ "data-density": le,
112
+ "data-zebra": ue || void 0,
113
+ "data-sticky-header": de || void 0,
119
114
  "data-paginated": y ? !0 : void 0,
120
- "data-fixed-layout": h.every((e) => e.width !== void 0) || void 0,
115
+ "data-fixed-layout": g.every((e) => e.width !== void 0) || void 0,
121
116
  children: [
122
- /* @__PURE__ */ f("span", {
117
+ /* @__PURE__ */ p("span", {
123
118
  "aria-live": "polite",
124
119
  className: n.srOnly,
125
- children: j.value.length > 0 ? k.itemsSelected(j.value.length) : ""
120
+ children: N.length > 0 ? A.itemsSelected(N.length) : ""
126
121
  }),
127
- (w !== void 0 || T !== void 0 || se) && /* @__PURE__ */ p("div", {
122
+ (w !== void 0 || T !== void 0 || v) && /* @__PURE__ */ m("div", {
128
123
  className: n.toolbar,
129
- children: [(w !== void 0 || T !== void 0) && /* @__PURE__ */ p("div", {
124
+ children: [(w !== void 0 || T !== void 0) && /* @__PURE__ */ m("div", {
130
125
  className: n.heading,
131
- children: [w !== void 0 && /* @__PURE__ */ f("div", {
132
- id: ke,
126
+ children: [w !== void 0 && /* @__PURE__ */ p("div", {
127
+ id: je,
133
128
  className: n.title,
134
129
  children: w
135
- }), T !== void 0 && /* @__PURE__ */ f("div", {
136
- id: Ae,
130
+ }), T !== void 0 && /* @__PURE__ */ p("div", {
131
+ id: Me,
137
132
  className: n.description,
138
133
  children: T
139
134
  })]
140
- }), se && /* @__PURE__ */ f("input", {
135
+ }), v && /* @__PURE__ */ p("input", {
141
136
  type: "search",
142
137
  className: n.search,
143
- "aria-label": k.search,
144
- placeholder: k.search,
145
- value: M.value,
138
+ "aria-label": A.search,
139
+ placeholder: A.search,
140
+ value: F.value,
146
141
  onChange: (e) => {
147
- M.value = e.target.value, N.value = 1;
142
+ F.value = e.target.value, I.value = 1;
148
143
  }
149
144
  })]
150
145
  }),
151
- Me && /* @__PURE__ */ p("div", {
146
+ Pe && /* @__PURE__ */ m("div", {
152
147
  className: n.batchBar,
153
- children: [/* @__PURE__ */ f("span", {
148
+ children: [/* @__PURE__ */ p("span", {
154
149
  className: n.batchCount,
155
- children: k.itemsSelected(K.length)
156
- }), /* @__PURE__ */ f("div", {
150
+ children: A.itemsSelected(N.length)
151
+ }), /* @__PURE__ */ p("div", {
157
152
  className: n.batchActions,
158
- children: x.map((t, n) => /* @__PURE__ */ f(e, {
153
+ children: x.map((t, n) => /* @__PURE__ */ p(e, {
159
154
  size: "sm",
160
155
  variant: "secondary",
161
- onClick: () => t.onClick(K),
156
+ onClick: () => t.onClick(N),
162
157
  children: t.label
163
158
  }, t.id ?? `${n}-${t.label}`))
164
159
  })]
165
160
  }),
166
- /* @__PURE__ */ f("div", {
167
- ref: D ? I : void 0,
161
+ /* @__PURE__ */ p("div", {
162
+ ref: D ? z : void 0,
168
163
  className: s(n.scroller, D && n.scrollerVirtualized),
169
- children: /* @__PURE__ */ p("table", {
164
+ children: /* @__PURE__ */ m("table", {
170
165
  className: n.table,
171
- "aria-labelledby": w === void 0 ? void 0 : ke,
172
- "aria-describedby": T === void 0 ? void 0 : Ae,
166
+ "aria-labelledby": w === void 0 ? void 0 : je,
167
+ "aria-describedby": T === void 0 ? void 0 : Me,
173
168
  "aria-busy": C || void 0,
174
- "aria-rowcount": D ? G.length : void 0,
175
- onKeyDown: Se,
169
+ "aria-rowcount": D ? q.length : void 0,
170
+ onKeyDown: Ce,
176
171
  children: [
177
- /* @__PURE__ */ p("colgroup", { children: [
178
- S && /* @__PURE__ */ f("col", { className: n.controlCol }),
179
- b && /* @__PURE__ */ f("col", { className: n.controlCol }),
180
- h.map((e) => /* @__PURE__ */ f("col", { style: e.width !== void 0 || e.minWidth !== void 0 ? {
172
+ /* @__PURE__ */ m("colgroup", { children: [
173
+ S && /* @__PURE__ */ p("col", { className: n.controlCol }),
174
+ b && /* @__PURE__ */ p("col", { className: n.controlCol }),
175
+ g.map((e) => /* @__PURE__ */ p("col", { style: e.width !== void 0 || e.minWidth !== void 0 ? {
181
176
  ...e.width === void 0 ? {} : { width: e.width },
182
177
  ...e.minWidth === void 0 ? {} : { minWidth: e.minWidth }
183
178
  } : void 0 }, e.key))
184
179
  ] }),
185
- /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", { children: [
186
- S && /* @__PURE__ */ f("th", {
180
+ /* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", { children: [
181
+ S && /* @__PURE__ */ p("th", {
187
182
  scope: "col",
188
183
  className: n.controlCell,
189
- children: /* @__PURE__ */ f("span", {
184
+ children: /* @__PURE__ */ p("span", {
190
185
  className: n.srOnly,
191
- children: k.expandRow
186
+ children: A.expandRow
192
187
  })
193
188
  }),
194
- b && /* @__PURE__ */ f("th", {
189
+ b && /* @__PURE__ */ p("th", {
195
190
  scope: "col",
196
191
  className: n.controlCell,
197
- children: b.mode === "multi" ? /* @__PURE__ */ f(t, {
198
- "aria-label": k.selectAll,
199
- checked: q,
200
- indeterminate: Ee && !q,
201
- onChange: De
202
- }) : /* @__PURE__ */ f("span", {
192
+ children: b.mode === "multi" ? /* @__PURE__ */ p(t, {
193
+ "aria-label": A.selectAll,
194
+ checked: J,
195
+ indeterminate: De && !J,
196
+ onChange: ke
197
+ }) : /* @__PURE__ */ p("span", {
203
198
  className: n.srOnly,
204
- children: k.selectRow
199
+ children: A.selectRow
205
200
  })
206
201
  }),
207
- h.map((e) => {
208
- let t = A.value?.key === e.key ? A.value.direction : void 0, r = t === "asc" ? "ascending" : t === "desc" ? "descending" : "none";
209
- return /* @__PURE__ */ f("th", {
202
+ g.map((e) => {
203
+ let t = j.value?.key === e.key ? j.value.direction : void 0, r = t === "asc" ? "ascending" : t === "desc" ? "descending" : "none";
204
+ return /* @__PURE__ */ p("th", {
210
205
  scope: "col",
211
206
  "data-align": e.align ?? "start",
212
207
  "data-sized": e.width !== void 0 || void 0,
213
208
  "aria-sort": e.sortable ? r : void 0,
214
- children: e.sortable ? /* @__PURE__ */ f("button", {
209
+ children: e.sortable ? /* @__PURE__ */ p("button", {
215
210
  type: "button",
216
211
  className: n.sortButton,
217
212
  "data-state": r,
218
- onClick: () => xe(e.key),
213
+ onClick: () => Se(e.key),
219
214
  children: e.header
220
215
  }) : e.header
221
216
  }, e.key);
222
217
  })
223
218
  ] }) }),
224
- /* @__PURE__ */ p("tbody", { children: [
225
- C && Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ f("tr", {
219
+ /* @__PURE__ */ m("tbody", { children: [
220
+ C && Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ p("tr", {
226
221
  className: n.row,
227
- children: Array.from({ length: Z }, (e, t) => /* @__PURE__ */ f("td", { children: /* @__PURE__ */ f("span", {
222
+ children: Array.from({ length: Z }, (e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("span", {
228
223
  className: n.shimmer,
229
224
  "aria-hidden": "true"
230
225
  }) }, t))
231
226
  }, t)),
232
- !C && G.length === 0 && /* @__PURE__ */ f("tr", {
227
+ !C && q.length === 0 && /* @__PURE__ */ p("tr", {
233
228
  "data-empty-row": !0,
234
- children: /* @__PURE__ */ f("td", {
229
+ children: /* @__PURE__ */ p("td", {
235
230
  colSpan: Z,
236
231
  className: n.emptyCell,
237
- children: de ?? k.empty
232
+ children: fe ?? A.empty
238
233
  })
239
234
  }),
240
- !C && D && Y > 0 && /* @__PURE__ */ f("tr", {
235
+ !C && D && X > 0 && /* @__PURE__ */ p("tr", {
241
236
  "aria-hidden": "true",
242
- style: { height: Y * O }
237
+ style: { height: X * O }
243
238
  }),
244
- !C && J.map((e, i) => {
245
- let a = D ? Y + i : i, o = K.includes(e.id), s = Te.has(e.id);
246
- return /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ p("tr", {
239
+ !C && Y.map((e, i) => {
240
+ let a = D ? X + i : i, o = N.includes(e.id), s = Ee.has(e.id);
241
+ return /* @__PURE__ */ m(r, { children: [/* @__PURE__ */ m("tr", {
247
242
  className: n.row,
248
243
  "data-parity": a % 2 == 0 ? "even" : "odd",
249
244
  "data-state": o ? "selected" : void 0,
250
- "aria-rowindex": D ? Y + i + 1 : void 0,
245
+ "aria-rowindex": D ? X + i + 1 : void 0,
251
246
  children: [
252
- S && /* @__PURE__ */ f("td", {
247
+ S && /* @__PURE__ */ p("td", {
253
248
  className: n.controlCell,
254
- children: /* @__PURE__ */ f("button", {
249
+ children: /* @__PURE__ */ p("button", {
255
250
  type: "button",
256
251
  className: n.expandButton,
257
252
  "aria-expanded": s,
258
- "aria-label": k.expandRow,
253
+ "aria-label": A.expandRow,
259
254
  "data-state": s ? "open" : "closed",
260
- onClick: () => we(e.id),
261
- children: /* @__PURE__ */ f("span", {
255
+ onClick: () => Te(e.id),
256
+ children: /* @__PURE__ */ p("span", {
262
257
  className: n.chevron,
263
258
  "aria-hidden": "true"
264
259
  })
265
260
  })
266
261
  }),
267
- b && /* @__PURE__ */ f("td", {
262
+ b && /* @__PURE__ */ p("td", {
268
263
  className: n.controlCell,
269
- children: /* @__PURE__ */ f(t, {
270
- "aria-label": k.selectRow,
264
+ children: /* @__PURE__ */ p(t, {
265
+ "aria-label": A.selectRow,
271
266
  checked: o,
272
- onChange: () => Ce(e.id)
267
+ onChange: () => we(e.id)
273
268
  })
274
269
  }),
275
- h.map((t) => /* @__PURE__ */ f("td", {
270
+ g.map((t) => /* @__PURE__ */ p("td", {
276
271
  "data-align": t.align ?? "start",
277
272
  "data-sized": t.width !== void 0 || void 0,
278
- children: t.render ? t.render(e.row) : String(m(e.row, t.key) ?? "")
273
+ children: t.render ? t.render(e.row) : String(h(e.row, t.key) ?? "")
279
274
  }, t.key))
280
275
  ]
281
- }), S && /* @__PURE__ */ f("tr", {
276
+ }), S && /* @__PURE__ */ p("tr", {
282
277
  className: n.expansionRow,
283
278
  "data-state": s ? "open" : "closed",
284
- children: /* @__PURE__ */ f("td", {
279
+ children: /* @__PURE__ */ p("td", {
285
280
  colSpan: Z,
286
- children: /* @__PURE__ */ f("div", {
281
+ children: /* @__PURE__ */ p("div", {
287
282
  className: n.expansionGrid,
288
283
  "data-state": s ? "open" : "closed",
289
- children: /* @__PURE__ */ f("div", {
284
+ children: /* @__PURE__ */ p("div", {
290
285
  className: n.expansionInner,
291
286
  children: S(e.row)
292
287
  })
@@ -294,17 +289,17 @@ function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMod
294
289
  })
295
290
  })] }, e.id);
296
291
  }),
297
- !C && D && X < G.length && /* @__PURE__ */ f("tr", {
292
+ !C && D && Oe < q.length && /* @__PURE__ */ p("tr", {
298
293
  "aria-hidden": "true",
299
- style: { height: (G.length - X) * O }
294
+ style: { height: (q.length - Oe) * O }
300
295
  }),
301
- Oe > 0 && /* @__PURE__ */ f("tr", {
296
+ Ae > 0 && /* @__PURE__ */ p("tr", {
302
297
  "aria-hidden": "true",
303
298
  "data-filler-row": !0,
304
- children: /* @__PURE__ */ f("td", {
299
+ children: /* @__PURE__ */ p("td", {
305
300
  colSpan: Z,
306
301
  style: {
307
- blockSize: `calc(var(--_row-height) * ${Oe})`,
302
+ blockSize: `calc(var(--_row-height) * ${Ae})`,
308
303
  padding: 0
309
304
  }
310
305
  })
@@ -313,55 +308,55 @@ function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMod
313
308
  ]
314
309
  })
315
310
  }),
316
- y && /* @__PURE__ */ p("div", {
311
+ y && /* @__PURE__ */ m("div", {
317
312
  className: n.footer,
318
313
  children: [
319
- y.pageSizeOptions && /* @__PURE__ */ p("label", {
314
+ y.pageSizeOptions && /* @__PURE__ */ m("label", {
320
315
  className: n.pageSize,
321
- children: [/* @__PURE__ */ f("span", { children: "Rows per page" }), /* @__PURE__ */ f("select", {
322
- value: P.value,
316
+ children: [/* @__PURE__ */ p("span", { children: "Rows per page" }), /* @__PURE__ */ p("select", {
317
+ value: L.value,
323
318
  onChange: (e) => {
324
- P.value = Number(e.target.value), N.value = 1;
319
+ L.value = Number(e.target.value), I.value = 1;
325
320
  },
326
- children: y.pageSizeOptions.map((e) => /* @__PURE__ */ f("option", {
321
+ children: y.pageSizeOptions.map((e) => /* @__PURE__ */ p("option", {
327
322
  value: e,
328
323
  children: e
329
324
  }, e))
330
325
  })]
331
326
  }),
332
- /* @__PURE__ */ p("span", {
327
+ /* @__PURE__ */ m("span", {
333
328
  className: n.range,
334
329
  children: [
335
330
  $,
336
331
  "–",
337
- je,
332
+ Ne,
338
333
  " of ",
339
334
  Q
340
335
  ]
341
336
  }),
342
- /* @__PURE__ */ p("div", {
337
+ /* @__PURE__ */ m("div", {
343
338
  className: n.pageButtons,
344
- children: [/* @__PURE__ */ f("button", {
339
+ children: [/* @__PURE__ */ p("button", {
345
340
  type: "button",
346
341
  className: n.pageButton,
347
- "aria-label": k.previousPage,
348
- disabled: V.value <= 1,
342
+ "aria-label": A.previousPage,
343
+ disabled: W.value <= 1,
349
344
  onClick: () => {
350
- N.value = V.value - 1;
345
+ I.value = W.value - 1;
351
346
  },
352
- children: /* @__PURE__ */ f("span", {
347
+ children: /* @__PURE__ */ p("span", {
353
348
  "aria-hidden": "true",
354
349
  children: "‹"
355
350
  })
356
- }), /* @__PURE__ */ f("button", {
351
+ }), /* @__PURE__ */ p("button", {
357
352
  type: "button",
358
353
  className: n.pageButton,
359
- "aria-label": k.nextPage,
360
- disabled: V.value >= ve.value,
354
+ "aria-label": A.nextPage,
355
+ disabled: W.value >= ye.value,
361
356
  onClick: () => {
362
- N.value = V.value + 1;
357
+ I.value = W.value + 1;
363
358
  },
364
- children: /* @__PURE__ */ f("span", {
359
+ children: /* @__PURE__ */ p("span", {
365
360
  "aria-hidden": "true",
366
361
  children: "›"
367
362
  })
@@ -373,4 +368,4 @@ function h({ columns: h, rows: g, getRowId: _, sort: v, defaultSort: ie, sortMod
373
368
  });
374
369
  }
375
370
  //#endregion
376
- export { h as DataTable };
371
+ export { g as DataTable };
@@ -1,33 +1,33 @@
1
1
  var e = {
2
- root: "_root_1wd65_2",
3
- toolbar: "_toolbar_1wd65_26",
4
- heading: "_heading_1wd65_35",
5
- title: "_title_1wd65_41",
6
- description: "_description_1wd65_47",
7
- search: "_search_1wd65_52",
8
- batchBar: "_batchBar_1wd65_79",
9
- batchCount: "_batchCount_1wd65_89",
10
- batchActions: "_batchActions_1wd65_95",
11
- scroller: "_scroller_1wd65_101",
12
- scrollerVirtualized: "_scrollerVirtualized_1wd65_111",
13
- table: "_table_1wd65_117",
14
- row: "_row_1wd65_199",
15
- controlCol: "_controlCol_1wd65_205",
16
- controlCell: "_controlCell_1wd65_209",
17
- sortButton: "_sortButton_1wd65_215",
18
- emptyCell: "_emptyCell_1wd65_263",
19
- expansionRow: "_expansionRow_1wd65_270",
20
- expansionGrid: "_expansionGrid_1wd65_276",
21
- expansionInner: "_expansionInner_1wd65_280",
22
- expandButton: "_expandButton_1wd65_285",
23
- chevron: "_chevron_1wd65_308",
24
- shimmer: "_shimmer_1wd65_323",
25
- footer: "_footer_1wd65_350",
26
- pageSize: "_pageSize_1wd65_360",
27
- range: "_range_1wd65_386",
28
- pageButtons: "_pageButtons_1wd65_391",
29
- pageButton: "_pageButton_1wd65_391",
30
- srOnly: "_srOnly_1wd65_432"
2
+ root: "_root_bwapn_2",
3
+ toolbar: "_toolbar_bwapn_26",
4
+ heading: "_heading_bwapn_35",
5
+ title: "_title_bwapn_41",
6
+ description: "_description_bwapn_47",
7
+ search: "_search_bwapn_52",
8
+ batchBar: "_batchBar_bwapn_79",
9
+ batchCount: "_batchCount_bwapn_89",
10
+ batchActions: "_batchActions_bwapn_95",
11
+ scroller: "_scroller_bwapn_101",
12
+ scrollerVirtualized: "_scrollerVirtualized_bwapn_111",
13
+ table: "_table_bwapn_117",
14
+ row: "_row_bwapn_199",
15
+ controlCol: "_controlCol_bwapn_219",
16
+ controlCell: "_controlCell_bwapn_223",
17
+ sortButton: "_sortButton_bwapn_229",
18
+ emptyCell: "_emptyCell_bwapn_277",
19
+ expansionRow: "_expansionRow_bwapn_284",
20
+ expansionGrid: "_expansionGrid_bwapn_290",
21
+ expansionInner: "_expansionInner_bwapn_294",
22
+ expandButton: "_expandButton_bwapn_299",
23
+ chevron: "_chevron_bwapn_322",
24
+ shimmer: "_shimmer_bwapn_337",
25
+ footer: "_footer_bwapn_364",
26
+ pageSize: "_pageSize_bwapn_374",
27
+ range: "_range_bwapn_400",
28
+ pageButtons: "_pageButtons_bwapn_405",
29
+ pageButton: "_pageButton_bwapn_405",
30
+ srOnly: "_srOnly_bwapn_446"
31
31
  };
32
32
  //#endregion
33
33
  export { e as default };