@alfadocs/ui-kit 1.9.2 → 1.9.4

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,27 +1,27 @@
1
- import { jsx as o, jsxs as M } from "react/jsx-runtime";
2
- import { useMemo as G, forwardRef as q, useState as z, useCallback as N, useEffect as W, useRef as V, createContext as he, useContext as xe, isValidElement as _e, cloneElement as Ge, useImperativeHandle as Ft } from "react";
1
+ import { jsx as o, jsxs as _ } from "react/jsx-runtime";
2
+ import { useMemo as L, forwardRef as B, useState as M, useCallback as N, useEffect as $, useRef as V, createContext as ye, useContext as ve, isValidElement as Ge, cloneElement as Le, useImperativeHandle as Ft } from "react";
3
3
  import { S as kt } from "./skeleton-CZbwyJAA.js";
4
4
  import { E as At } from "./empty-state-X0sVPfVo.js";
5
5
  import { c as Pt } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as D } from "react-i18next";
7
7
  import { useGridFilter as Ot, AgGridReact as zt } from "ag-grid-react";
8
8
  import { ModuleRegistry as Mt, AllCommunityModule as _t } from "ag-grid-community";
9
- import { I as Le } from "./icon-button-group-D6SVMteH.js";
10
- import { B as ae } from "./button-nJaPh_HC.js";
9
+ import { I as je } from "./icon-button-group-D6SVMteH.js";
10
+ import { B as ie } from "./button-nJaPh_HC.js";
11
11
  import { I as X } from "./icon-button-DA2CAGHZ.js";
12
- import { P as se } from "./popover-Cqcjx-Ny.js";
12
+ import { P as de } from "./popover-Cqcjx-Ny.js";
13
13
  import { C as Gt } from "./checkbox-BuZ1u__2.js";
14
- import { T as ye } from "./text-input-CUvCb6ST.js";
15
- import { T as Oe } from "./tag-3wgkwwDB.js";
14
+ import { T as Te } from "./text-input-CUvCb6ST.js";
15
+ import { T as ze } from "./tag-3wgkwwDB.js";
16
16
  import { D as U } from "./dropdown-menu-DU-Hrf33.js";
17
- import { X as je } from "./x-B5YnXwCz.js";
17
+ import { X as qe } from "./x-B5YnXwCz.js";
18
18
  import { R as Lt } from "./refresh-cw-DnI0cLFC.js";
19
- import { S as ve } from "./search-QbWPlY5f.js";
19
+ import { S as we } from "./search-QbWPlY5f.js";
20
20
  import { c as jt } from "./createLucideIcon-DhHxpK9K.js";
21
21
  import { G as qt } from "./grip-vertical-onSb1JXO.js";
22
22
  import { P as Bt } from "./printer-rkK0T1gi.js";
23
- import { F as qe } from "./file-text-5yv6r2ls.js";
24
- import { D as de } from "./download-CfYKJO_j.js";
23
+ import { F as Be } from "./file-text-5yv6r2ls.js";
24
+ import { D as pe } from "./download-CfYKJO_j.js";
25
25
  import { F as Wt } from "./file-spreadsheet-DmwyfV4O.js";
26
26
  import $t from "i18next";
27
27
  import { S as Kt } from "./select-BW5ecXlX.js";
@@ -50,13 +50,13 @@ const Qt = [
50
50
  ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
51
51
  ], Jt = jt("columns-3-cog", Qt);
52
52
  function Zt(e) {
53
- if (!_e(e)) return e;
53
+ if (!Ge(e)) return e;
54
54
  const t = e, a = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
55
- return Ge(t, { className: n, size: t.props.size ?? 16 });
55
+ return Le(t, { className: n, size: t.props.size ?? 16 });
56
56
  }
57
- const Be = he(null);
57
+ const We = ye(null);
58
58
  function H(e) {
59
- const t = xe(Be);
59
+ const t = ve(We);
60
60
  if (!t)
61
61
  throw new Error(
62
62
  `${e} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
@@ -69,11 +69,11 @@ function Yt({
69
69
  onPrint: a,
70
70
  children: n
71
71
  }) {
72
- const i = G(
72
+ const i = L(
73
73
  () => ({ getApi: e, selectionCount: t, onPrint: a }),
74
74
  [e, t, a]
75
75
  );
76
- return /* @__PURE__ */ o(Be.Provider, { value: i, children: n });
76
+ return /* @__PURE__ */ o(We.Provider, { value: i, children: n });
77
77
  }
78
78
  const er = [
79
79
  "data-table-toolbar",
@@ -87,7 +87,7 @@ const er = [
87
87
  // No card surface: the toolbar sits directly on the page background,
88
88
  // matching the header-tools layout the Patients / Care Plan List
89
89
  // patterns established (the old bg-card + border + shadow bar is gone).
90
- ].join(" "), We = q(
90
+ ].join(" "), $e = B(
91
91
  ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ o(
92
92
  "div",
93
93
  {
@@ -99,8 +99,8 @@ const er = [
99
99
  }
100
100
  )
101
101
  );
102
- We.displayName = "DataTable.Toolbar";
103
- const $e = q(
102
+ $e.displayName = "DataTable.Toolbar";
103
+ const Ke = B(
104
104
  ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ o(
105
105
  "div",
106
106
  {
@@ -119,8 +119,8 @@ const $e = q(
119
119
  }
120
120
  )
121
121
  );
122
- $e.displayName = "DataTable.Toolbar.FilterBar";
123
- const Ke = q(
122
+ Ke.displayName = "DataTable.Toolbar.FilterBar";
123
+ const He = B(
124
124
  ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ o(
125
125
  "div",
126
126
  {
@@ -135,8 +135,8 @@ const Ke = q(
135
135
  }
136
136
  )
137
137
  );
138
- Ke.displayName = "DataTable.Toolbar.Actions";
139
- const Te = q(
138
+ He.displayName = "DataTable.Toolbar.Actions";
139
+ const Ce = B(
140
140
  ({ label: e, onExport: t, intent: a = "outline", ...n }, i) => {
141
141
  const { t: d } = D(), { getApi: f } = H("DataTable.Toolbar.ExportCsv"), m = N(() => {
142
142
  const c = f();
@@ -148,7 +148,7 @@ const Te = q(
148
148
  ref: i,
149
149
  type: "button",
150
150
  intent: a,
151
- icon: /* @__PURE__ */ o(de, { "aria-hidden": !0 }),
151
+ icon: /* @__PURE__ */ o(pe, { "aria-hidden": !0 }),
152
152
  tooltip: e ?? d("dataTable.exportCsv"),
153
153
  onClick: m,
154
154
  ...n
@@ -156,8 +156,8 @@ const Te = q(
156
156
  );
157
157
  }
158
158
  );
159
- Te.displayName = "DataTable.Toolbar.ExportCsv";
160
- function ee(e, t = [30, 30, 30]) {
159
+ Ce.displayName = "DataTable.Toolbar.ExportCsv";
160
+ function te(e, t = [30, 30, 30]) {
161
161
  if (typeof document > "u") return t;
162
162
  const a = document.createElement("span");
163
163
  a.style.color = `hsl(var(${e}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
@@ -166,7 +166,7 @@ function ee(e, t = [30, 30, 30]) {
166
166
  const i = n.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
167
167
  return i ? [Number(i[1]), Number(i[2]), Number(i[3])] : t;
168
168
  }
169
- async function He(e, t) {
169
+ async function Ve(e, t) {
170
170
  if (!e) return;
171
171
  const [{ jsPDF: a }, { default: n }] = await Promise.all([
172
172
  import("./jspdf.es.min-DaapWjR1.js").then((x) => x.j),
@@ -177,16 +177,16 @@ async function He(e, t) {
177
177
  e.forEachNodeAfterFilterAndSort((x) => {
178
178
  if (!x.data) return;
179
179
  const l = d.map((p) => {
180
- const T = e.getCellValue({
180
+ const w = e.getCellValue({
181
181
  rowNode: x,
182
182
  colKey: p,
183
183
  useFormatter: !0
184
184
  });
185
- return T == null ? "" : String(T);
185
+ return w == null ? "" : String(w);
186
186
  });
187
187
  m.push(l);
188
188
  });
189
- const c = ee("--muted", [240, 240, 240]), g = ee("--foreground", [30, 30, 30]), u = ee("--card-foreground", [30, 30, 30]), b = ee("--card", [250, 250, 250]), v = new a({ orientation: "landscape" });
189
+ const c = te("--muted", [240, 240, 240]), g = te("--foreground", [30, 30, 30]), u = te("--card-foreground", [30, 30, 30]), b = te("--card", [250, 250, 250]), v = new a({ orientation: "landscape" });
190
190
  n(v, {
191
191
  head: f,
192
192
  body: m,
@@ -200,7 +200,7 @@ async function He(e, t) {
200
200
  }
201
201
  }), v.save(t.fileName);
202
202
  }
203
- const we = q(
203
+ const Re = B(
204
204
  ({ label: e, onClick: t, fileName: a, intent: n = "outline", ...i }, d) => {
205
205
  const { t: f } = D(), { getApi: m } = H("DataTable.Toolbar.ExportPdf"), c = N(() => {
206
206
  const g = m();
@@ -208,7 +208,7 @@ const we = q(
208
208
  t(g);
209
209
  return;
210
210
  }
211
- He(g, {
211
+ Ve(g, {
212
212
  fileName: a ?? "data-table-export.pdf"
213
213
  });
214
214
  }, [m, t, a]);
@@ -218,7 +218,7 @@ const we = q(
218
218
  ref: d,
219
219
  type: "button",
220
220
  intent: n,
221
- icon: /* @__PURE__ */ o(qe, { "aria-hidden": !0 }),
221
+ icon: /* @__PURE__ */ o(Be, { "aria-hidden": !0 }),
222
222
  tooltip: e ?? f("dataTable.exportPdf"),
223
223
  onClick: c,
224
224
  ...i
@@ -226,8 +226,8 @@ const we = q(
226
226
  );
227
227
  }
228
228
  );
229
- we.displayName = "DataTable.Toolbar.ExportPdf";
230
- const Ce = q(
229
+ Re.displayName = "DataTable.Toolbar.ExportPdf";
230
+ const Se = B(
231
231
  ({ label: e, intent: t = "outline", ...a }, n) => {
232
232
  const { t: i } = D(), { onPrint: d } = H("DataTable.Toolbar.Print");
233
233
  return /* @__PURE__ */ o(
@@ -244,10 +244,10 @@ const Ce = q(
244
244
  );
245
245
  }
246
246
  );
247
- Ce.displayName = "DataTable.Toolbar.Print";
248
- const Ve = ({ placeholder: e, debounceMs: t = 150 }) => {
249
- const { t: a } = D(), { getApi: n } = H("DataTable.Toolbar.QuickSearch"), [i, d] = z(""), f = V(void 0);
250
- return W(() => (f.current && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
247
+ Se.displayName = "DataTable.Toolbar.Print";
248
+ const Ue = ({ placeholder: e, debounceMs: t = 150 }) => {
249
+ const { t: a } = D(), { getApi: n } = H("DataTable.Toolbar.QuickSearch"), [i, d] = M(""), f = V(void 0);
250
+ return $(() => (f.current && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
251
251
  const m = n();
252
252
  m && m.setGridOption("quickFilterText", i);
253
253
  }, t), () => {
@@ -260,22 +260,22 @@ const Ve = ({ placeholder: e, debounceMs: t = 150 }) => {
260
260
  // `--toolbar-search-max` token in the kit yet — see this component's
261
261
  // summary for a follow-up note recommending we add one.
262
262
  /* @__PURE__ */ o("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ o(
263
- ye,
263
+ Te,
264
264
  {
265
265
  type: "search",
266
266
  size: "sm",
267
267
  value: i,
268
268
  onChange: (m) => d(m.target.value),
269
269
  placeholder: e ?? a("dataTable.quickSearch.placeholder", "Search…"),
270
- startAdornment: /* @__PURE__ */ o(ve, { "aria-hidden": !0, className: "ds:size-4" }),
270
+ startAdornment: /* @__PURE__ */ o(we, { "aria-hidden": !0, className: "ds:size-4" }),
271
271
  clearable: !0,
272
272
  onClear: () => d(""),
273
273
  "aria-label": a("dataTable.quickSearch.label", "Quick search")
274
274
  }
275
275
  ) });
276
276
  };
277
- Ve.displayName = "DataTable.Toolbar.QuickSearch";
278
- const Re = q(
277
+ Ue.displayName = "DataTable.Toolbar.QuickSearch";
278
+ const Ie = B(
279
279
  ({ onRefresh: e, label: t, intent: a = "outline", ...n }, i) => {
280
280
  const { t: d } = D();
281
281
  return /* @__PURE__ */ o(
@@ -292,7 +292,7 @@ const Re = q(
292
292
  );
293
293
  }
294
294
  );
295
- Re.displayName = "DataTable.Toolbar.Refresh";
295
+ Ie.displayName = "DataTable.Toolbar.Refresh";
296
296
  function tr(e) {
297
297
  if (!e || typeof e != "object") return "";
298
298
  const t = e;
@@ -302,8 +302,8 @@ function tr(e) {
302
302
  }
303
303
  return typeof t.dateFrom == "string" ? typeof t.dateTo == "string" && t.dateTo ? `${t.dateFrom} – ${t.dateTo}` : String(t.dateFrom) : Array.isArray(t.values) ? t.values.map(String).join(", ") : "";
304
304
  }
305
- const Ue = () => {
306
- const { t: e } = D(), { getApi: t } = H("DataTable.Toolbar.FilterChips"), [a, n] = z([]), [i, d] = z(""), f = N(() => {
305
+ const Xe = () => {
306
+ const { t: e } = D(), { getApi: t } = H("DataTable.Toolbar.FilterChips"), [a, n] = M([]), [i, d] = M(""), f = N(() => {
307
307
  const u = t();
308
308
  if (!u) {
309
309
  n([]), d("");
@@ -311,7 +311,7 @@ const Ue = () => {
311
311
  }
312
312
  const b = u.getFilterModel() ?? {}, v = u.getColumns() ?? [], x = [];
313
313
  for (const p of Object.keys(b)) {
314
- const T = v.find((R) => R.getColId() === p), y = u.getDisplayNameForColumn(T, null) ?? p;
314
+ const w = v.find((R) => R.getColId() === p), y = u.getDisplayNameForColumn(w, null) ?? p;
315
315
  x.push({
316
316
  colId: p,
317
317
  headerName: y,
@@ -322,7 +322,7 @@ const Ue = () => {
322
322
  const l = u.getGridOption("quickFilterText");
323
323
  d(typeof l == "string" ? l : "");
324
324
  }, [t]);
325
- if (W(() => {
325
+ if ($(() => {
326
326
  let u;
327
327
  const b = (l) => f(), v = (l) => {
328
328
  l.addEventListener("filterChanged", b), f(), u = () => l.removeEventListener("filterChanged", b);
@@ -346,7 +346,7 @@ const Ue = () => {
346
346
  const u = t();
347
347
  u && (u.setFilterModel(null), u.setGridOption("quickFilterText", ""), d(""));
348
348
  }
349
- return /* @__PURE__ */ M(
349
+ return /* @__PURE__ */ _(
350
350
  "div",
351
351
  {
352
352
  role: "group",
@@ -354,7 +354,7 @@ const Ue = () => {
354
354
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
355
355
  children: [
356
356
  i && /* @__PURE__ */ o(
357
- Oe,
357
+ ze,
358
358
  {
359
359
  label: `${e("dataTable.quickSearch.label", "Quick search")}: ${i}`,
360
360
  size: "sm",
@@ -366,7 +366,7 @@ const Ue = () => {
366
366
  }
367
367
  ),
368
368
  a.map((u) => /* @__PURE__ */ o(
369
- Oe,
369
+ ze,
370
370
  {
371
371
  label: u.text ? `${u.headerName}: ${u.text}` : u.headerName,
372
372
  size: "sm",
@@ -376,13 +376,13 @@ const Ue = () => {
376
376
  u.colId
377
377
  )),
378
378
  /* @__PURE__ */ o(
379
- ae,
379
+ ie,
380
380
  {
381
381
  type: "button",
382
382
  intent: "ghost",
383
383
  size: "sm",
384
384
  onClick: g,
385
- startIcon: /* @__PURE__ */ o(je, { "aria-hidden": !0, className: "ds:size-4" }),
385
+ startIcon: /* @__PURE__ */ o(qe, { "aria-hidden": !0, className: "ds:size-4" }),
386
386
  children: e("dataTable.filterChips.clearAll", "Clear all")
387
387
  }
388
388
  )
@@ -390,13 +390,13 @@ const Ue = () => {
390
390
  }
391
391
  );
392
392
  };
393
- Ue.displayName = "DataTable.Toolbar.FilterChips";
394
- const Xe = ({
393
+ Xe.displayName = "DataTable.Toolbar.FilterChips";
394
+ const Qe = ({
395
395
  field: e,
396
396
  options: t,
397
397
  label: a
398
398
  }) => {
399
- const { t: n } = D(), { getApi: i } = H("DataTable.Toolbar.FacetFilter"), [d, f] = z(null);
399
+ const { t: n } = D(), { getApi: i } = H("DataTable.Toolbar.FacetFilter"), [d, f] = M(null);
400
400
  function m(c) {
401
401
  f(c);
402
402
  const g = i();
@@ -420,7 +420,7 @@ const Xe = ({
420
420
  children: t.map((c) => {
421
421
  const g = d === c.value;
422
422
  return /* @__PURE__ */ o(
423
- ae,
423
+ ie,
424
424
  {
425
425
  type: "button",
426
426
  size: "sm",
@@ -435,7 +435,7 @@ const Xe = ({
435
435
  }
436
436
  );
437
437
  };
438
- Xe.displayName = "DataTable.Toolbar.FacetFilter";
438
+ Qe.displayName = "DataTable.Toolbar.FacetFilter";
439
439
  const rr = ["csv", "xlsx", "pdf"];
440
440
  async function ar(e, t) {
441
441
  if (!e) return;
@@ -446,17 +446,17 @@ async function ar(e, t) {
446
446
  )
447
447
  ), e.forEachNodeAfterFilterAndSort((p) => {
448
448
  p.data && i.addRow(
449
- f.map((T) => {
449
+ f.map((w) => {
450
450
  const y = e.getCellValue({
451
451
  rowNode: p,
452
- colKey: T,
452
+ colKey: w,
453
453
  useFormatter: !0
454
454
  });
455
455
  return y ?? "";
456
456
  })
457
457
  );
458
458
  });
459
- const m = ee("--muted", [240, 240, 240]), c = ee("--foreground", [30, 30, 30]), g = i.getRow(1), u = ([p, T, y]) => `${p.toString(16).padStart(2, "0")}${T.toString(16).padStart(2, "0")}${y.toString(16).padStart(2, "0")}`.toUpperCase();
459
+ const m = te("--muted", [240, 240, 240]), c = te("--foreground", [30, 30, 30]), g = i.getRow(1), u = ([p, w, y]) => `${p.toString(16).padStart(2, "0")}${w.toString(16).padStart(2, "0")}${y.toString(16).padStart(2, "0")}`.toUpperCase();
460
460
  g.eachCell((p) => {
461
461
  p.font = { bold: !0, color: { argb: `FF${u(c)}` } }, p.fill = {
462
462
  type: "pattern",
@@ -469,26 +469,26 @@ async function ar(e, t) {
469
469
  }), x = URL.createObjectURL(v), l = document.createElement("a");
470
470
  l.href = x, l.download = t.fileName, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(x);
471
471
  }
472
- const Qe = he(null);
472
+ const Je = ye(null);
473
473
  function nr() {
474
- const e = xe(Qe);
474
+ const e = ve(Je);
475
475
  if (!e)
476
476
  throw new Error(
477
477
  "DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
478
478
  );
479
479
  return e;
480
480
  }
481
- const Se = q(
481
+ const Ee = B(
482
482
  ({ children: e, label: t, intent: a = "outline", ...n }, i) => {
483
- const { t: d } = D(), { getApi: f } = H("DataTable.Toolbar.ExportMenu"), m = G(() => ({ getApi: f }), [f]), c = e ?? rr.map((g) => /* @__PURE__ */ o(Ie, { format: g }, g));
484
- return /* @__PURE__ */ o(Qe.Provider, { value: m, children: /* @__PURE__ */ M(U.Root, { children: [
483
+ const { t: d } = D(), { getApi: f } = H("DataTable.Toolbar.ExportMenu"), m = L(() => ({ getApi: f }), [f]), c = e ?? rr.map((g) => /* @__PURE__ */ o(Ne, { format: g }, g));
484
+ return /* @__PURE__ */ o(Je.Provider, { value: m, children: /* @__PURE__ */ _(U.Root, { children: [
485
485
  /* @__PURE__ */ o(U.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
486
486
  X,
487
487
  {
488
488
  ref: i,
489
489
  type: "button",
490
490
  intent: a,
491
- icon: /* @__PURE__ */ o(de, { "aria-hidden": !0 }),
491
+ icon: /* @__PURE__ */ o(pe, { "aria-hidden": !0 }),
492
492
  tooltip: t ?? d("dataTable.export.menu", "Export"),
493
493
  "aria-label": t ?? d("dataTable.export.menu", "Export"),
494
494
  "aria-haspopup": "menu",
@@ -499,14 +499,14 @@ const Se = q(
499
499
  ] }) });
500
500
  }
501
501
  );
502
- Se.displayName = "DataTable.Toolbar.ExportMenu";
502
+ Ee.displayName = "DataTable.Toolbar.ExportMenu";
503
503
  function or(e, t) {
504
504
  return t === "csv" ? e("dataTable.export.csv", "Export CSV") : t === "xlsx" ? e("dataTable.export.xlsx", "Export Excel") : t === "pdf" ? e("dataTable.export.pdf", "Export PDF") : e("dataTable.export.custom", "Export");
505
505
  }
506
506
  function sr(e) {
507
- return e === "csv" ? /* @__PURE__ */ o(de, { "aria-hidden": !0, className: "ds:size-4" }) : e === "xlsx" ? /* @__PURE__ */ o(Wt, { "aria-hidden": !0, className: "ds:size-4" }) : e === "pdf" ? /* @__PURE__ */ o(qe, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ o(de, { "aria-hidden": !0, className: "ds:size-4" });
507
+ return e === "csv" ? /* @__PURE__ */ o(pe, { "aria-hidden": !0, className: "ds:size-4" }) : e === "xlsx" ? /* @__PURE__ */ o(Wt, { "aria-hidden": !0, className: "ds:size-4" }) : e === "pdf" ? /* @__PURE__ */ o(Be, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ o(pe, { "aria-hidden": !0, className: "ds:size-4" });
508
508
  }
509
- const Ie = ({
509
+ const Ne = ({
510
510
  format: e,
511
511
  label: t,
512
512
  onClick: a,
@@ -519,7 +519,7 @@ const Ie = ({
519
519
  return;
520
520
  }
521
521
  if (e === "pdf") {
522
- He(m, {
522
+ Ve(m, {
523
523
  fileName: n ?? "data-table-export.pdf"
524
524
  });
525
525
  return;
@@ -532,12 +532,12 @@ const Ie = ({
532
532
  }
533
533
  a == null || a(m);
534
534
  }, [e, n, a, d]);
535
- return /* @__PURE__ */ o(U.Item, { onSelect: f, children: /* @__PURE__ */ M("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
535
+ return /* @__PURE__ */ o(U.Item, { onSelect: f, children: /* @__PURE__ */ _("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
536
536
  sr(e),
537
537
  /* @__PURE__ */ o("span", { children: t ?? or(i, e) })
538
538
  ] }) });
539
539
  };
540
- Ie.displayName = "DataTable.Toolbar.ExportMenu.Item";
540
+ Ne.displayName = "DataTable.Toolbar.ExportMenu.Item";
541
541
  function ir(e) {
542
542
  return e ? (e.getAllGridColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
543
543
  colId: a.getColId(),
@@ -545,127 +545,138 @@ function ir(e) {
545
545
  visible: a.isVisible()
546
546
  }).filter((a) => a !== null) : [];
547
547
  }
548
- const Ee = q(
548
+ const De = B(
549
549
  function({ label: t, icon: a, footer: n, header: i, intent: d = "outline", ...f }, m) {
550
- const { t: c } = D(), { getApi: g } = H("DataTable.Toolbar.ColumnToggle"), [u, b] = z(!1), [v, x] = z([]), [l, p] = z(null), [T, y] = z(null);
551
- W(() => {
550
+ const { t: c } = D(), { getApi: g } = H("DataTable.Toolbar.ColumnToggle"), [u, b] = M(!1), [v, x] = M([]), [l, p] = M(null), [w, y] = M(null);
551
+ $(() => {
552
552
  u && x(ir(g()));
553
553
  }, [u, g]);
554
554
  const R = N(
555
- (w, k) => {
556
- const L = g();
557
- L && (L.setColumnsVisible([w], k), x(
555
+ (T, F) => {
556
+ const z = g();
557
+ z && (z.setColumnsVisible([T], F), x(
558
558
  (I) => I.map(
559
- (A) => A.colId === w ? { ...A, visible: k } : A
559
+ (j) => j.colId === T ? { ...j, visible: F } : j
560
560
  )
561
561
  ));
562
562
  },
563
563
  [g]
564
564
  ), C = N(
565
- (w, k) => {
566
- if (w === k) return;
567
- const L = g();
568
- if (!L) return;
565
+ (T, F) => {
566
+ if (T === F) return;
567
+ const z = g();
568
+ if (!z) return;
569
569
  x((A) => {
570
- const O = A.findIndex((S) => S.colId === w), B = A.findIndex((S) => S.colId === k);
571
- if (O < 0 || B < 0) return A;
572
- const K = [...A], [ne] = K.splice(O, 1);
573
- return K.splice(B, 0, ne), K;
570
+ const ae = A.findIndex((oe) => oe.colId === T), S = A.findIndex((oe) => oe.colId === F);
571
+ if (ae < 0 || S < 0) return A;
572
+ const Y = [...A], [ne] = Y.splice(ae, 1);
573
+ return Y.splice(S, 0, ne), Y;
574
574
  });
575
- const I = v.findIndex((A) => A.colId === k);
576
- I >= 0 && L.moveColumns([w], I);
575
+ const I = z.getAllGridColumns(), j = I.find((A) => A.getColId() === T), P = I.find((A) => A.getColId() === F);
576
+ if (!j || !P) return;
577
+ j.getPinned() !== P.getPinned() && z.setColumnsPinned([T], P.getPinned() ?? null);
578
+ const W = z.getAllGridColumns().findIndex((A) => A.getColId() === F);
579
+ W >= 0 && z.moveColumns([T], W);
577
580
  },
578
- [g, v]
579
- ), $ = t ?? c("dataTable.columnToggle");
580
- return /* @__PURE__ */ M(se.Root, { open: u, onOpenChange: b, children: [
581
- /* @__PURE__ */ o(se.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
581
+ [g]
582
+ ), K = t ?? c("dataTable.columnToggle");
583
+ return /* @__PURE__ */ _(de.Root, { open: u, onOpenChange: b, children: [
584
+ /* @__PURE__ */ o(de.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
582
585
  X,
583
586
  {
584
587
  ref: m,
585
588
  type: "button",
586
589
  intent: d,
587
590
  icon: a ?? /* @__PURE__ */ o(Jt, { "aria-hidden": !0 }),
588
- tooltip: $,
589
- "aria-label": $,
591
+ tooltip: K,
592
+ "aria-label": K,
590
593
  "aria-haspopup": "dialog",
591
594
  ...f
592
595
  }
593
596
  ) }),
594
- /* @__PURE__ */ M(se.Content, { size: "sm", align: "end", children: [
595
- /* @__PURE__ */ o(se.Heading, { children: $ }),
596
- i ? /* @__PURE__ */ o("div", { className: "ds:mb-[var(--spacing-xs)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)]", children: i }) : null,
597
- /* @__PURE__ */ o(
598
- "ul",
599
- {
600
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
601
- "aria-label": $,
602
- children: v.map((w) => {
603
- const k = l === w.colId, L = T === w.colId && l !== w.colId;
604
- return /* @__PURE__ */ M(
605
- "li",
606
- {
607
- draggable: !0,
608
- onDragStart: (I) => {
609
- p(w.colId), I.dataTransfer.effectAllowed = "move", I.dataTransfer.setData("text/plain", w.colId);
610
- },
611
- onDragOver: (I) => {
612
- I.preventDefault(), I.dataTransfer.dropEffect = "move", y(w.colId);
613
- },
614
- onDragLeave: () => {
615
- y(
616
- (I) => I === w.colId ? null : I
617
- );
618
- },
619
- onDrop: (I) => {
620
- I.preventDefault();
621
- const A = I.dataTransfer.getData("text/plain");
622
- A && C(A, w.colId), p(null), y(null);
623
- },
624
- onDragEnd: () => {
625
- p(null), y(null);
626
- },
627
- className: [
628
- "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
629
- k ? "ds:opacity-50" : "",
630
- L ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
631
- ].filter(Boolean).join(" "),
632
- children: [
633
- /* @__PURE__ */ o(
634
- "span",
635
- {
636
- "aria-hidden": "true",
637
- className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
638
- children: /* @__PURE__ */ o(qt, { className: "ds:size-4" })
639
- }
640
- ),
641
- /* @__PURE__ */ o(
642
- Gt,
643
- {
644
- label: w.displayName,
645
- checked: w.visible,
646
- onCheckedChange: (I) => R(w.colId, I === !0)
647
- }
648
- )
649
- ]
650
- },
651
- w.colId
652
- );
653
- })
654
- }
655
- ),
656
- n ? /* @__PURE__ */ o("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: n }) : null
657
- ] })
597
+ /* @__PURE__ */ _(
598
+ de.Content,
599
+ {
600
+ size: "sm",
601
+ align: "end",
602
+ className: "ds:flex ds:max-h-[var(--radix-popover-content-available-height)] ds:flex-col",
603
+ children: [
604
+ /* @__PURE__ */ o(de.Heading, { children: K }),
605
+ i ? /* @__PURE__ */ o("div", { className: "ds:mb-[var(--spacing-xs)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)]", children: i }) : null,
606
+ /* @__PURE__ */ o(
607
+ "ul",
608
+ {
609
+ className: "ds:flex ds:min-h-0 ds:flex-col ds:gap-[var(--spacing-xs)] ds:overflow-y-auto",
610
+ "aria-label": K,
611
+ children: v.map((T) => {
612
+ const F = l === T.colId, z = w === T.colId && l !== T.colId;
613
+ return /* @__PURE__ */ _(
614
+ "li",
615
+ {
616
+ draggable: !0,
617
+ onDragStart: (I) => {
618
+ p(T.colId), I.dataTransfer.effectAllowed = "move", I.dataTransfer.setData("text/plain", T.colId);
619
+ },
620
+ onDragOver: (I) => {
621
+ I.preventDefault(), I.dataTransfer.dropEffect = "move", y(T.colId);
622
+ },
623
+ onDragLeave: () => {
624
+ y(
625
+ (I) => I === T.colId ? null : I
626
+ );
627
+ },
628
+ onDrop: (I) => {
629
+ I.preventDefault();
630
+ const j = I.dataTransfer.getData("text/plain");
631
+ j && C(j, T.colId), p(null), y(null);
632
+ },
633
+ onDragEnd: () => {
634
+ p(null), y(null);
635
+ },
636
+ className: [
637
+ "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
638
+ F ? "ds:opacity-50" : "",
639
+ z ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
640
+ ].filter(Boolean).join(" "),
641
+ children: [
642
+ /* @__PURE__ */ o(
643
+ "span",
644
+ {
645
+ "aria-hidden": "true",
646
+ className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
647
+ children: /* @__PURE__ */ o(qt, { className: "ds:size-4" })
648
+ }
649
+ ),
650
+ /* @__PURE__ */ o(
651
+ Gt,
652
+ {
653
+ label: T.displayName,
654
+ checked: T.visible,
655
+ onCheckedChange: (I) => R(T.colId, I === !0)
656
+ }
657
+ )
658
+ ]
659
+ },
660
+ T.colId
661
+ );
662
+ })
663
+ }
664
+ ),
665
+ n ? /* @__PURE__ */ o("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: n }) : null
666
+ ]
667
+ }
668
+ )
658
669
  ] });
659
670
  }
660
671
  );
661
- Ee.displayName = "DataTable.Toolbar.ColumnToggle";
662
- const Je = q(
672
+ De.displayName = "DataTable.Toolbar.ColumnToggle";
673
+ const Ze = B(
663
674
  ({ label: e, icon: t, onClick: a, variant: n = "default", size: i = "sm", ...d }, f) => {
664
675
  const { t: m } = D(), { getApi: c, selectionCount: g } = H(
665
676
  "DataTable.Toolbar.BulkAction"
666
677
  );
667
- return g === 0 ? null : /* @__PURE__ */ M(
668
- ae,
678
+ return g === 0 ? null : /* @__PURE__ */ _(
679
+ ie,
669
680
  {
670
681
  ref: f,
671
682
  type: "button",
@@ -690,32 +701,32 @@ const Je = q(
690
701
  );
691
702
  }
692
703
  );
693
- Je.displayName = "DataTable.Toolbar.BulkAction";
704
+ Ze.displayName = "DataTable.Toolbar.BulkAction";
694
705
  for (const e of [
695
- Te,
696
- we,
697
706
  Ce,
698
707
  Re,
699
708
  Se,
700
- Ee
709
+ Ie,
710
+ Ee,
711
+ De
701
712
  ])
702
713
  e.rendersIconButton = !0;
703
- const lr = Object.assign(Se, {
704
- Item: Ie
705
- }), le = Object.assign(We, {
706
- FilterBar: $e,
707
- Actions: Ke,
714
+ const lr = Object.assign(Ee, {
715
+ Item: Ne
716
+ }), ue = Object.assign($e, {
717
+ FilterBar: Ke,
718
+ Actions: He,
708
719
  /** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
709
- ExportCsv: Te,
720
+ ExportCsv: Ce,
710
721
  /** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
711
- ExportPdf: we,
712
- Print: Ce,
713
- ColumnToggle: Ee,
714
- BulkAction: Je,
715
- QuickSearch: Ve,
716
- Refresh: Re,
717
- FilterChips: Ue,
718
- FacetFilter: Xe,
722
+ ExportPdf: Re,
723
+ Print: Se,
724
+ ColumnToggle: De,
725
+ BulkAction: Ze,
726
+ QuickSearch: Ue,
727
+ Refresh: Ie,
728
+ FilterChips: Xe,
729
+ FacetFilter: Qe,
719
730
  ExportMenu: lr
720
731
  }), dr = [
721
732
  "contains",
@@ -751,11 +762,11 @@ function ur(e) {
751
762
  return e == null ? null : typeof e == "string" ? e : String(e);
752
763
  }
753
764
  function pr(e) {
754
- const { model: t, onModelChange: a, getValue: n, placeholder: i, defaultOperator: d } = e, { t: f } = D("ui"), m = (t == null ? void 0 : t.type) ?? d ?? "contains", [c, g] = z(m), [u, b] = z((t == null ? void 0 : t.filter) ?? "");
755
- W(() => {
765
+ const { model: t, onModelChange: a, getValue: n, placeholder: i, defaultOperator: d } = e, { t: f } = D("ui"), m = (t == null ? void 0 : t.type) ?? d ?? "contains", [c, g] = M(m), [u, b] = M((t == null ? void 0 : t.filter) ?? "");
766
+ $(() => {
756
767
  g((t == null ? void 0 : t.type) ?? d ?? "contains"), b((t == null ? void 0 : t.filter) ?? "");
757
768
  }, [t, d]);
758
- const v = G(() => cr($t.language), []);
769
+ const v = L(() => cr($t.language), []);
759
770
  Ot({
760
771
  doesFilterPass: (y) => {
761
772
  const R = t;
@@ -793,8 +804,8 @@ function pr(e) {
793
804
  value: y,
794
805
  label: f(`dataTable.textFilter.operators.${y}`)
795
806
  })
796
- ), T = i ?? f("dataTable.textFilter.placeholder");
797
- return /* @__PURE__ */ M(
807
+ ), w = i ?? f("dataTable.textFilter.placeholder");
808
+ return /* @__PURE__ */ _(
798
809
  "div",
799
810
  {
800
811
  "data-component": "text-filter",
@@ -813,7 +824,7 @@ function pr(e) {
813
824
  }
814
825
  ),
815
826
  /* @__PURE__ */ o(
816
- ye,
827
+ Te,
817
828
  {
818
829
  size: "sm",
819
830
  value: u,
@@ -821,14 +832,14 @@ function pr(e) {
821
832
  onKeyDown: (y) => {
822
833
  y.key === "Enter" && (y.preventDefault(), x());
823
834
  },
824
- placeholder: T,
825
- "aria-label": T,
826
- startAdornment: /* @__PURE__ */ o(ve, { "aria-hidden": "true", className: "ds:size-4" })
835
+ placeholder: w,
836
+ "aria-label": w,
837
+ startAdornment: /* @__PURE__ */ o(we, { "aria-hidden": "true", className: "ds:size-4" })
827
838
  }
828
839
  ),
829
- /* @__PURE__ */ M("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
830
- /* @__PURE__ */ o(ae, { intent: "ghost", size: "sm", onClick: l, type: "button", children: f("dataTable.textFilter.clear") }),
831
- /* @__PURE__ */ o(ae, { intent: "primary", size: "sm", onClick: x, type: "button", children: f("dataTable.textFilter.apply") })
840
+ /* @__PURE__ */ _("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
841
+ /* @__PURE__ */ o(ie, { intent: "ghost", size: "sm", onClick: l, type: "button", children: f("dataTable.textFilter.clear") }),
842
+ /* @__PURE__ */ o(ie, { intent: "primary", size: "sm", onClick: x, type: "button", children: f("dataTable.textFilter.apply") })
832
843
  ] })
833
844
  ]
834
845
  }
@@ -836,10 +847,10 @@ function pr(e) {
836
847
  }
837
848
  function fr(e) {
838
849
  var b, v;
839
- const { model: t, onModelChange: a, column: n } = e, { t: i } = D("ui"), d = ((v = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : v.filterParams) ?? {}, f = d.defaultOperator ?? "contains", m = d.placeholder ?? i("dataTable.textFilter.placeholder"), [c, g] = z((t == null ? void 0 : t.filter) ?? "");
840
- W(() => {
850
+ const { model: t, onModelChange: a, column: n } = e, { t: i } = D("ui"), d = ((v = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : v.filterParams) ?? {}, f = d.defaultOperator ?? "contains", m = d.placeholder ?? i("dataTable.textFilter.placeholder"), [c, g] = M((t == null ? void 0 : t.filter) ?? "");
851
+ $(() => {
841
852
  g((t == null ? void 0 : t.filter) ?? "");
842
- }, [t == null ? void 0 : t.filter]), W(() => {
853
+ }, [t == null ? void 0 : t.filter]), $(() => {
843
854
  if (c === ((t == null ? void 0 : t.filter) ?? "")) return;
844
855
  const x = setTimeout(() => {
845
856
  if (c === "") {
@@ -854,14 +865,14 @@ function fr(e) {
854
865
  g(""), t && a(null);
855
866
  }
856
867
  return /* @__PURE__ */ o("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
857
- ye,
868
+ Te,
858
869
  {
859
870
  size: "sm",
860
871
  value: c,
861
872
  onChange: (x) => g(x.target.value),
862
873
  placeholder: m,
863
874
  "aria-label": m,
864
- startAdornment: /* @__PURE__ */ o(ve, { "aria-hidden": "true", className: "ds:size-4" }),
875
+ startAdornment: /* @__PURE__ */ o(we, { "aria-hidden": "true", className: "ds:size-4" }),
865
876
  endAdornment: c.length > 0 ? /* @__PURE__ */ o(
866
877
  "button",
867
878
  {
@@ -869,34 +880,34 @@ function fr(e) {
869
880
  "aria-label": i("dataTable.textFilter.clear"),
870
881
  onClick: u,
871
882
  className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
872
- children: /* @__PURE__ */ o(je, { "aria-hidden": "true", className: "ds:size-4" })
883
+ children: /* @__PURE__ */ o(qe, { "aria-hidden": "true", className: "ds:size-4" })
873
884
  }
874
885
  ) : void 0
875
886
  }
876
887
  ) });
877
888
  }
878
- const mr = /* @__PURE__ */ new Set(["presentation", "none"]), ze = '[role="presentation"][aria-hidden], [role="none"][aria-hidden]';
879
- function ie(e) {
889
+ const mr = /* @__PURE__ */ new Set(["presentation", "none"]), Me = '[role="presentation"][aria-hidden], [role="none"][aria-hidden]';
890
+ function ce(e) {
880
891
  const t = e.getAttribute("role");
881
892
  t === null || !mr.has(t) || e.getAttribute("aria-hidden") === "false" && e.removeAttribute("aria-hidden");
882
893
  }
883
894
  function gr(e, t = !0) {
884
- W(() => {
895
+ $(() => {
885
896
  const a = e.current;
886
897
  if (!t || !a || typeof MutationObserver > "u") return;
887
898
  (() => {
888
- for (const d of a.querySelectorAll(ze)) ie(d);
899
+ for (const d of a.querySelectorAll(Me)) ce(d);
889
900
  })();
890
901
  const i = new MutationObserver((d) => {
891
902
  for (const f of d)
892
903
  if (f.type === "attributes")
893
- ie(f.target);
904
+ ce(f.target);
894
905
  else
895
906
  for (const m of f.addedNodes)
896
907
  if (m instanceof Element) {
897
- ie(m);
898
- for (const c of m.querySelectorAll(ze))
899
- ie(c);
908
+ ce(m);
909
+ for (const c of m.querySelectorAll(Me))
910
+ ce(c);
900
911
  }
901
912
  });
902
913
  return i.observe(a, {
@@ -907,59 +918,59 @@ function gr(e, t = !0) {
907
918
  }), () => i.disconnect();
908
919
  }, [e, t]);
909
920
  }
910
- const te = "__dsDetailOf", br = "ds-data-table-expanded-row", Ze = "::detail", hr = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
911
- function j(e) {
912
- return typeof e == "object" && e !== null && typeof e[te] == "string";
921
+ const re = "__dsDetailOf", br = "ds-data-table-expanded-row", Ye = "::detail", hr = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
922
+ function q(e) {
923
+ return typeof e == "object" && e !== null && typeof e[re] == "string";
913
924
  }
914
925
  function xr(e) {
915
- return `${e}${Ze}`;
926
+ return `${e}${Ye}`;
916
927
  }
917
928
  function da(e) {
918
- return e.endsWith(Ze);
929
+ return e.endsWith(Ye);
919
930
  }
920
931
  function yr(e, t) {
921
- return { ...e, [te]: t };
932
+ return { ...e, [re]: t };
922
933
  }
923
- const Ye = he(
934
+ const et = ye(
924
935
  null
925
936
  );
926
937
  function vr(e) {
927
938
  var l;
928
- const t = xe(
929
- Ye
930
- ), { t: a } = D(), n = V(null), { data: i, node: d, api: f } = e, m = j(i), c = t == null ? void 0 : t.heights, g = d.id, u = V(t);
931
- if (u.current = t, W(() => {
939
+ const t = ve(
940
+ et
941
+ ), { t: a } = D(), n = V(null), { data: i, node: d, api: f } = e, m = q(i), c = t == null ? void 0 : t.heights, g = d.id, u = V(t);
942
+ if (u.current = t, $(() => {
932
943
  const p = n.current;
933
944
  if (!p || !m || !c || g == null) return;
934
- let T = c.get(g) ?? 0;
945
+ let w = c.get(g) ?? 0;
935
946
  const y = () => {
936
947
  const C = Math.ceil(p.getBoundingClientRect().height);
937
- C <= 0 || C === T || (T = C, c.set(g, C), d.setRowHeight(C), f.onRowHeightChanged());
948
+ C <= 0 || C === w || (w = C, c.set(g, C), d.setRowHeight(C), f.onRowHeightChanged());
938
949
  };
939
950
  y();
940
951
  const R = new ResizeObserver(y);
941
952
  return R.observe(p), () => R.disconnect();
942
- }, [f, g, c, m, d]), W(() => {
943
- const p = n.current, T = p == null ? void 0 : p.parentElement;
944
- if (!p || !T || !m) return;
953
+ }, [f, g, c, m, d]), $(() => {
954
+ const p = n.current, w = p == null ? void 0 : p.parentElement;
955
+ if (!p || !w || !m) return;
945
956
  const y = (R) => {
946
- var C, $;
947
- R.target !== T || R.defaultPrevented || (R.key === "Escape" ? (R.stopPropagation(), ($ = (C = u.current) == null ? void 0 : C.onExpandedRowChange) == null || $.call(C, null)) : R.key === "Enter" && (R.preventDefault(), (p.querySelector(hr) ?? p).focus()));
957
+ var C, K;
958
+ R.target !== w || R.defaultPrevented || (R.key === "Escape" ? (R.stopPropagation(), (K = (C = u.current) == null ? void 0 : C.onExpandedRowChange) == null || K.call(C, null)) : R.key === "Enter" && (R.preventDefault(), (p.querySelector(hr) ?? p).focus()));
948
959
  };
949
- return T.addEventListener("keydown", y), () => T.removeEventListener("keydown", y);
960
+ return w.addEventListener("keydown", y), () => w.removeEventListener("keydown", y);
950
961
  }, [m]), !m) {
951
962
  const p = t == null ? void 0 : t.fallbackRenderer;
952
963
  return p ? /* @__PURE__ */ o(p, { ...e }) : null;
953
964
  }
954
- const b = i[te];
965
+ const b = i[re];
955
966
  let v;
956
967
  if (t != null && t.expanded && t.expanded.id === b)
957
968
  v = t.expanded.row;
958
969
  else {
959
- const { [te]: p, ...T } = i;
960
- v = T;
970
+ const { [re]: p, ...w } = i;
971
+ v = w;
961
972
  }
962
- return /* @__PURE__ */ M(
973
+ return /* @__PURE__ */ _(
963
974
  "div",
964
975
  {
965
976
  ref: n,
@@ -969,8 +980,8 @@ function vr(e) {
969
980
  "data-expanded-row-of": b,
970
981
  className: "ds-data-table-expanded-row-surface",
971
982
  onKeyDown: (p) => {
972
- var T;
973
- p.key !== "Escape" || p.defaultPrevented || (p.stopPropagation(), (T = t == null ? void 0 : t.onExpandedRowChange) == null || T.call(t, null));
983
+ var w;
984
+ p.key !== "Escape" || p.defaultPrevented || (p.stopPropagation(), (w = t == null ? void 0 : t.onExpandedRowChange) == null || w.call(t, null));
974
985
  },
975
986
  children: [
976
987
  /* @__PURE__ */ o("span", { className: "ds:sr-only", children: a("dataTable.expandedRow") }),
@@ -1197,7 +1208,7 @@ const wr = Pt("ag-theme-alfadocs ds:w-full", {
1197
1208
  });
1198
1209
  function Cr() {
1199
1210
  const { t: e } = D();
1200
- return G(
1211
+ return L(
1201
1212
  () => ({
1202
1213
  // Filter strings
1203
1214
  contains: e("dataTable.agGrid.contains"),
@@ -1259,7 +1270,7 @@ function Sr() {
1259
1270
  }
1260
1271
  );
1261
1272
  }
1262
- function et(e) {
1273
+ function tt(e) {
1263
1274
  return e.map(({ hide: t, pinned: a, ...n }) => n);
1264
1275
  }
1265
1276
  function Ir(e) {
@@ -1267,7 +1278,7 @@ function Ir(e) {
1267
1278
  const t = localStorage.getItem(`data-table-col-state:${e}`);
1268
1279
  if (!t) return null;
1269
1280
  const a = JSON.parse(t);
1270
- return Array.isArray(a) ? et(a) : null;
1281
+ return Array.isArray(a) ? tt(a) : null;
1271
1282
  } catch {
1272
1283
  return null;
1273
1284
  }
@@ -1276,7 +1287,7 @@ function Er(e, t) {
1276
1287
  try {
1277
1288
  localStorage.setItem(
1278
1289
  `data-table-col-state:${e}`,
1279
- JSON.stringify(et(t.getColumnState()))
1290
+ JSON.stringify(tt(t.getColumnState()))
1280
1291
  );
1281
1292
  } catch {
1282
1293
  }
@@ -1305,26 +1316,26 @@ function Dr(e, t) {
1305
1316
  loadingOverlay: x,
1306
1317
  gridOptions: l,
1307
1318
  density: p,
1308
- bordered: T,
1319
+ bordered: w,
1309
1320
  heightClass: y = "ds:h-[500px]",
1310
1321
  className: R,
1311
1322
  getRowClass: C,
1312
- pinnedBottomRowData: $,
1313
- printMode: w = !1,
1314
- expandedRowId: k,
1315
- renderExpandedRow: L,
1323
+ pinnedBottomRowData: K,
1324
+ printMode: T = !1,
1325
+ expandedRowId: F,
1326
+ renderExpandedRow: z,
1316
1327
  onExpandedRowChange: I,
1317
- children: A
1318
- } = e, O = k !== void 0 || L !== void 0, B = l == null ? void 0 : l.getRowId;
1319
- if (O && !B)
1328
+ children: j
1329
+ } = e, P = F !== void 0 || z !== void 0, W = l == null ? void 0 : l.getRowId;
1330
+ if (P && !W)
1320
1331
  throw new Error(
1321
1332
  "DataTable: `expandedRowId` / `renderExpandedRow` require `gridOptions.getRowId` — the expanded row is addressed by row id, not by index."
1322
1333
  );
1323
- const { t: K, i18n: ne } = D(), S = V(null), Ne = V(null);
1324
- gr(Ne);
1325
- const [ce, rt] = z(0), [ue, pe] = z(""), at = Cr(), De = V(k);
1326
- De.current = k;
1327
- const fe = G(
1334
+ const { t: A, i18n: ae } = D(), S = V(null), Y = V(null);
1335
+ gr(Y);
1336
+ const [ne, oe] = M(0), [fe, me] = M(""), at = Cr(), Fe = V(F);
1337
+ Fe.current = F;
1338
+ const ge = L(
1328
1339
  () => ({
1329
1340
  getSelection: () => {
1330
1341
  var h;
@@ -1332,7 +1343,7 @@ function Dr(e, t) {
1332
1343
  if (!r) return [];
1333
1344
  const s = [];
1334
1345
  for (const E of r.getSelectedNodes())
1335
- E.id != null && !j(E.data) && s.push(E.id);
1346
+ E.id != null && !q(E.data) && s.push(E.id);
1336
1347
  return s;
1337
1348
  },
1338
1349
  setSelection: (r) => {
@@ -1340,21 +1351,21 @@ function Dr(e, t) {
1340
1351
  const s = (E = S.current) == null ? void 0 : E.api;
1341
1352
  if (!s) return;
1342
1353
  const h = new Set(r);
1343
- s.forEachNode((F) => {
1344
- F.id != null && F.setSelected(h.has(F.id));
1354
+ s.forEachNode((k) => {
1355
+ k.id != null && k.setSelected(h.has(k.id));
1345
1356
  });
1346
1357
  },
1347
1358
  selectRange: (r, s) => {
1348
- var Pe;
1349
- const h = (Pe = S.current) == null ? void 0 : Pe.api;
1359
+ var Oe;
1360
+ const h = (Oe = S.current) == null ? void 0 : Oe.api;
1350
1361
  if (!h) return;
1351
1362
  const E = [];
1352
1363
  h.forEachNodeAfterFilterAndSort((Z) => {
1353
- Z.id != null && !j(Z.data) && E.push(Z.id);
1364
+ Z.id != null && !q(Z.data) && E.push(Z.id);
1354
1365
  });
1355
- const F = E.indexOf(r), P = E.indexOf(s);
1356
- if (F < 0 || P < 0) return;
1357
- const [_, Y] = F <= P ? [F, P] : [P, F], J = new Set(E.slice(_, Y + 1));
1366
+ const k = E.indexOf(r), O = E.indexOf(s);
1367
+ if (k < 0 || O < 0) return;
1368
+ const [G, ee] = k <= O ? [k, O] : [O, k], J = new Set(E.slice(G, ee + 1));
1358
1369
  h.forEachNode((Z) => {
1359
1370
  Z.id != null && Z.setSelected(J.has(Z.id));
1360
1371
  });
@@ -1380,9 +1391,9 @@ function Dr(e, t) {
1380
1391
  var E;
1381
1392
  const s = (E = S.current) == null ? void 0 : E.api;
1382
1393
  if (!s) return;
1383
- const h = s.getColumnState().map((F) => {
1384
- const P = r.find((_) => _.colId === F.colId);
1385
- return { ...F, sort: P ? P.sort : null };
1394
+ const h = s.getColumnState().map((k) => {
1395
+ const O = r.find((G) => G.colId === k.colId);
1396
+ return { ...k, sort: O ? O.sort : null };
1386
1397
  });
1387
1398
  s.applyColumnState({ state: h, defaultState: { sort: null } });
1388
1399
  },
@@ -1394,7 +1405,7 @@ function Dr(e, t) {
1394
1405
  var s, h;
1395
1406
  (h = (s = S.current) == null ? void 0 : s.api) == null || h.paginationGoToPage(r);
1396
1407
  },
1397
- getExpandedRowId: () => De.current ?? null,
1408
+ getExpandedRowId: () => Fe.current ?? null,
1398
1409
  getRawApi: () => {
1399
1410
  var r;
1400
1411
  return (r = S.current) == null ? void 0 : r.api;
@@ -1402,10 +1413,10 @@ function Dr(e, t) {
1402
1413
  }),
1403
1414
  []
1404
1415
  );
1405
- Ft(t, () => fe, [fe]), Ht(Tr, fe, c);
1406
- const nt = ne.dir() === "rtl", ot = n === void 0, st = Vt(), { resolvedTheme: Fe } = Ut(), it = (Fe === "light-accessible" || Fe === "dark-accessible") && p === "compact" ? "default" : p, lt = G(() => {
1416
+ Ft(t, () => ge, [ge]), Ht(Tr, ge, c);
1417
+ const nt = ae.dir() === "rtl", ot = n === void 0, st = Vt(), { resolvedTheme: ke } = Ut(), it = (ke === "light-accessible" || ke === "dark-accessible") && p === "compact" ? "default" : p, lt = L(() => {
1407
1418
  if (!i) return;
1408
- const r = (s) => !j(s.data);
1419
+ const r = (s) => !q(s.data);
1409
1420
  return i === "single" ? { mode: "singleRow", isRowSelectable: r } : {
1410
1421
  mode: "multiRow",
1411
1422
  headerCheckbox: !0,
@@ -1420,34 +1431,34 @@ function Dr(e, t) {
1420
1431
  state: r,
1421
1432
  applyOrder: !0
1422
1433
  });
1423
- }, [c]), me = N(
1434
+ }, [c]), be = N(
1424
1435
  (r) => {
1425
1436
  var s;
1426
1437
  r.source && Nr.has(r.source) || c && ((s = S.current) != null && s.api) && Er(c, S.current.api);
1427
1438
  },
1428
1439
  [c]
1429
- ), ct = G(() => {
1440
+ ), ct = L(() => {
1430
1441
  if (!l) return;
1431
1442
  const r = { ...l };
1432
- return delete r.defaultColDef, O && (delete r.getRowId, delete r.isFullWidthRow, delete r.fullWidthCellRenderer, delete r.getRowHeight, delete r.postSortRows, delete r.getRowClass, delete r.defaultCsvExportParams, delete r.defaultExcelExportParams), r;
1433
- }, [O, l]), ke = V(/* @__PURE__ */ new Map()), re = V(l);
1434
- re.current = l;
1435
- const Ae = N(
1443
+ return delete r.defaultColDef, P && (delete r.getRowId, delete r.isFullWidthRow, delete r.fullWidthCellRenderer, delete r.getRowHeight, delete r.postSortRows, delete r.getRowClass, delete r.defaultCsvExportParams, delete r.defaultExcelExportParams), r;
1444
+ }, [P, l]), Ae = V(/* @__PURE__ */ new Map()), se = V(l);
1445
+ se.current = l;
1446
+ const Pe = N(
1436
1447
  (r) => {
1437
1448
  var s;
1438
- return B == null ? void 0 : B({
1449
+ return W == null ? void 0 : W({
1439
1450
  data: r,
1440
1451
  level: 0,
1441
1452
  api: (s = S.current) == null ? void 0 : s.api,
1442
1453
  context: l == null ? void 0 : l.context
1443
1454
  });
1444
1455
  },
1445
- [B, l == null ? void 0 : l.context]
1446
- ), Q = G(() => {
1447
- if (!O || k == null || !n) return null;
1448
- const r = n.find((s) => Ae(s) === k);
1449
- return r === void 0 ? null : { id: k, row: r };
1450
- }, [O, k, Ae, n]), ut = G(() => {
1456
+ [W, l == null ? void 0 : l.context]
1457
+ ), Q = L(() => {
1458
+ if (!P || F == null || !n) return null;
1459
+ const r = n.find((s) => Pe(s) === F);
1460
+ return r === void 0 ? null : { id: F, row: r };
1461
+ }, [P, F, Pe, n]), ut = L(() => {
1451
1462
  if (!Q || !n) return n;
1452
1463
  const r = n.indexOf(Q.row), s = yr(Q.row, Q.id);
1453
1464
  return [
@@ -1456,110 +1467,110 @@ function Dr(e, t) {
1456
1467
  ...n.slice(r + 1)
1457
1468
  ];
1458
1469
  }, [Q, n]), pt = N(
1459
- (r) => j(r.data) ? xr(r.data[te]) : B(r),
1460
- [B]
1470
+ (r) => q(r.data) ? xr(r.data[re]) : W(r),
1471
+ [W]
1461
1472
  ), ft = N(
1462
1473
  (r) => {
1463
1474
  var s, h;
1464
- return j(r.rowNode.data) || (((h = (s = re.current) == null ? void 0 : s.isFullWidthRow) == null ? void 0 : h.call(s, r)) ?? !1);
1475
+ return q(r.rowNode.data) || (((h = (s = se.current) == null ? void 0 : s.isFullWidthRow) == null ? void 0 : h.call(s, r)) ?? !1);
1465
1476
  },
1466
1477
  []
1467
1478
  ), mt = N(
1468
1479
  (r) => {
1469
1480
  var s, h;
1470
- return j(r.data) ? ke.current.get(r.node.id ?? "") : (h = (s = re.current) == null ? void 0 : s.getRowHeight) == null ? void 0 : h.call(s, r);
1481
+ return q(r.data) ? Ae.current.get(r.node.id ?? "") : (h = (s = se.current) == null ? void 0 : s.getRowHeight) == null ? void 0 : h.call(s, r);
1471
1482
  },
1472
1483
  []
1473
1484
  ), gt = N(
1474
1485
  (r) => {
1475
- var _, Y;
1476
- (Y = (_ = re.current) == null ? void 0 : _.postSortRows) == null || Y.call(_, r);
1477
- const { nodes: s } = r, h = s.findIndex((J) => j(J.data));
1486
+ var G, ee;
1487
+ (ee = (G = se.current) == null ? void 0 : G.postSortRows) == null || ee.call(G, r);
1488
+ const { nodes: s } = r, h = s.findIndex((J) => q(J.data));
1478
1489
  if (h < 0) return;
1479
- const [E] = s.splice(h, 1), F = E.data[te], P = s.findIndex((J) => J.id === F);
1480
- s.splice(P < 0 ? s.length : P + 1, 0, E);
1490
+ const [E] = s.splice(h, 1), k = E.data[re], O = s.findIndex((J) => J.id === k);
1491
+ s.splice(O < 0 ? s.length : O + 1, 0, E);
1481
1492
  },
1482
1493
  []
1483
1494
  ), bt = N(
1484
1495
  (r) => {
1485
1496
  var s, h;
1486
- return j(r.data) ? br : ((h = (s = re.current) == null ? void 0 : s.getRowClass) == null ? void 0 : h.call(s, r)) ?? (C == null ? void 0 : C(r));
1497
+ return q(r.data) ? br : ((h = (s = se.current) == null ? void 0 : s.getRowClass) == null ? void 0 : h.call(s, r)) ?? (C == null ? void 0 : C(r));
1487
1498
  },
1488
1499
  [C]
1489
- ), oe = N(
1490
- (r) => j(r.node.data),
1500
+ ), le = N(
1501
+ (r) => q(r.node.data),
1491
1502
  []
1492
- ), ht = G(() => {
1493
- if (!O) return;
1503
+ ), ht = L(() => {
1504
+ if (!P) return;
1494
1505
  const r = l == null ? void 0 : l.defaultCsvExportParams;
1495
1506
  return {
1496
1507
  ...r,
1497
1508
  shouldRowBeSkipped: (s) => {
1498
1509
  var h;
1499
- return oe(s) || (((h = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : h.call(r, s)) ?? !1);
1510
+ return le(s) || (((h = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : h.call(r, s)) ?? !1);
1500
1511
  }
1501
1512
  };
1502
- }, [O, l == null ? void 0 : l.defaultCsvExportParams, oe]), xt = G(() => {
1503
- if (!O) return;
1513
+ }, [P, l == null ? void 0 : l.defaultCsvExportParams, le]), xt = L(() => {
1514
+ if (!P) return;
1504
1515
  const r = l == null ? void 0 : l.defaultExcelExportParams;
1505
1516
  return {
1506
1517
  ...r,
1507
1518
  shouldRowBeSkipped: (s) => {
1508
1519
  var h;
1509
- return oe(s) || (((h = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : h.call(r, s)) ?? !1);
1520
+ return le(s) || (((h = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : h.call(r, s)) ?? !1);
1510
1521
  }
1511
1522
  };
1512
- }, [O, l == null ? void 0 : l.defaultExcelExportParams, oe]), ge = l == null ? void 0 : l.fullWidthCellRenderer, yt = G(
1523
+ }, [P, l == null ? void 0 : l.defaultExcelExportParams, le]), he = l == null ? void 0 : l.fullWidthCellRenderer, yt = L(
1513
1524
  () => ({
1514
- renderExpandedRow: L,
1525
+ renderExpandedRow: z,
1515
1526
  onExpandedRowChange: I,
1516
1527
  expanded: Q,
1517
- heights: ke.current,
1518
- fallbackRenderer: typeof ge == "function" ? ge : void 0
1528
+ heights: Ae.current,
1529
+ fallbackRenderer: typeof he == "function" ? he : void 0
1519
1530
  }),
1520
1531
  [
1521
- ge,
1532
+ he,
1522
1533
  Q,
1523
1534
  I,
1524
- L
1535
+ z
1525
1536
  ]
1526
1537
  ), vt = N(() => {
1527
1538
  var h;
1528
1539
  const r = (h = S.current) == null ? void 0 : h.api;
1529
1540
  if (!r) return;
1530
- const s = r.getSelectedRows().filter((E) => !j(E));
1531
- rt(s.length), g == null || g(s);
1541
+ const s = r.getSelectedRows().filter((E) => !q(E));
1542
+ oe(s.length), g == null || g(s);
1532
1543
  }, [g]), Tt = N(
1533
1544
  (r) => {
1534
1545
  var h;
1535
1546
  const s = (h = S.current) == null ? void 0 : h.api;
1536
1547
  if (s) {
1537
- const F = s.getColumnState().find((P) => P.sort);
1538
- if (F) {
1539
- const P = F.colId, _ = s.getColumnDef(P), Y = (_ == null ? void 0 : _.headerName) ?? P, J = F.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1540
- pe(
1541
- K("dataTable.sortAnnounce", {
1542
- column: Y,
1543
- direction: K(J)
1548
+ const k = s.getColumnState().find((O) => O.sort);
1549
+ if (k) {
1550
+ const O = k.colId, G = s.getColumnDef(O), ee = (G == null ? void 0 : G.headerName) ?? O, J = k.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1551
+ me(
1552
+ A("dataTable.sortAnnounce", {
1553
+ column: ee,
1554
+ direction: A(J)
1544
1555
  })
1545
1556
  );
1546
1557
  } else
1547
- pe("");
1558
+ me("");
1548
1559
  }
1549
1560
  u == null || u(r);
1550
1561
  },
1551
- [u, K]
1562
+ [u, A]
1552
1563
  ), wt = N(
1553
1564
  (r) => {
1554
1565
  b == null || b(r);
1555
1566
  },
1556
1567
  [b]
1557
1568
  );
1558
- W(() => {
1559
- if (!ue) return;
1560
- const r = setTimeout(() => pe(""), 3e3);
1569
+ $(() => {
1570
+ if (!fe) return;
1571
+ const r = setTimeout(() => me(""), 3e3);
1561
1572
  return () => clearTimeout(r);
1562
- }, [ue]);
1573
+ }, [fe]);
1563
1574
  const Ct = v ?? Sr, Rt = x ?? Rr, St = N(
1564
1575
  () => {
1565
1576
  var r;
@@ -1570,35 +1581,35 @@ function Dr(e, t) {
1570
1581
  typeof window < "u" && window.print();
1571
1582
  }, []), Et = wr({
1572
1583
  density: it,
1573
- bordered: T,
1584
+ bordered: w,
1574
1585
  className: R
1575
- }), Nt = A ?? /* @__PURE__ */ o("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ M(
1576
- Le,
1586
+ }), Nt = j ?? /* @__PURE__ */ o("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ _(
1587
+ je,
1577
1588
  {
1578
1589
  role: "toolbar",
1579
- "aria-label": K("dataTable.tableActions"),
1590
+ "aria-label": A("dataTable.tableActions"),
1580
1591
  className: "ds:bg-[var(--background)]",
1581
1592
  children: [
1582
- /* @__PURE__ */ o(le.ExportMenu, {}),
1583
- /* @__PURE__ */ o(le.Print, {}),
1584
- /* @__PURE__ */ o(le.ColumnToggle, {})
1593
+ /* @__PURE__ */ o(ue.ExportMenu, {}),
1594
+ /* @__PURE__ */ o(ue.Print, {}),
1595
+ /* @__PURE__ */ o(ue.ColumnToggle, {})
1585
1596
  ]
1586
1597
  }
1587
- ) }), Dt = w ? !1 : d;
1588
- return /* @__PURE__ */ M(
1598
+ ) }), Dt = T ? !1 : d;
1599
+ return /* @__PURE__ */ _(
1589
1600
  "div",
1590
1601
  {
1591
1602
  className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
1592
1603
  "aria-busy": ot ? "true" : void 0,
1593
1604
  "data-component": "data-table",
1594
1605
  "data-component-id": c,
1595
- "data-print-mode": w ? "true" : void 0,
1606
+ "data-print-mode": T ? "true" : void 0,
1596
1607
  children: [
1597
- !w && /* @__PURE__ */ o(
1608
+ !T && /* @__PURE__ */ o(
1598
1609
  Yt,
1599
1610
  {
1600
1611
  getApi: St,
1601
- selectionCount: ce,
1612
+ selectionCount: ne,
1602
1613
  onPrint: It,
1603
1614
  children: Nt
1604
1615
  }
@@ -1606,10 +1617,10 @@ function Dr(e, t) {
1606
1617
  /* @__PURE__ */ o(
1607
1618
  "div",
1608
1619
  {
1609
- ref: Ne,
1610
- className: [Et, w ? "" : y].join(" ").trim(),
1620
+ ref: Y,
1621
+ className: [Et, T ? "" : y].join(" ").trim(),
1611
1622
  children: /* @__PURE__ */ o(
1612
- Ye.Provider,
1623
+ et.Provider,
1613
1624
  {
1614
1625
  value: yt,
1615
1626
  children: /* @__PURE__ */ o(
@@ -1639,7 +1650,7 @@ function Dr(e, t) {
1639
1650
  pagination: Dt,
1640
1651
  paginationPageSize: f,
1641
1652
  paginationPageSizeSelector: m,
1642
- paginationNumberFormatter: (r) => new Intl.NumberFormat(ne.language).format(r.value),
1653
+ paginationNumberFormatter: (r) => new Intl.NumberFormat(ae.language).format(r.value),
1643
1654
  animateRows: !st,
1644
1655
  enableRtl: nt,
1645
1656
  ensureDomOrder: !0,
@@ -1662,18 +1673,18 @@ function Dr(e, t) {
1662
1673
  localeText: at,
1663
1674
  noRowsOverlayComponent: Ct,
1664
1675
  loadingOverlayComponent: Rt,
1665
- getRowClass: O ? bt : C,
1666
- pinnedBottomRowData: $,
1667
- domLayout: w ? "autoHeight" : void 0,
1676
+ getRowClass: P ? bt : C,
1677
+ pinnedBottomRowData: K,
1678
+ domLayout: T ? "autoHeight" : void 0,
1668
1679
  onGridReady: dt,
1669
- onColumnMoved: me,
1670
- onColumnResized: me,
1671
- onColumnPinned: me,
1680
+ onColumnMoved: be,
1681
+ onColumnResized: be,
1682
+ onColumnPinned: be,
1672
1683
  onSortChanged: Tt,
1673
1684
  onFilterChanged: wt,
1674
1685
  onSelectionChanged: vt,
1675
1686
  ...ct,
1676
- ...O ? {
1687
+ ...P ? {
1677
1688
  getRowId: pt,
1678
1689
  isFullWidthRow: ft,
1679
1690
  fullWidthCellRenderer: vr,
@@ -1688,35 +1699,35 @@ function Dr(e, t) {
1688
1699
  )
1689
1700
  }
1690
1701
  ),
1691
- !w && /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: ce > 0 ? /* @__PURE__ */ o("span", { children: K("dataTable.selected", { count: ce }) }) : /* @__PURE__ */ o("span", {}) }),
1692
- /* @__PURE__ */ o("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: ue })
1702
+ !T && /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: ne > 0 ? /* @__PURE__ */ o("span", { children: A("dataTable.selected", { count: ne }) }) : /* @__PURE__ */ o("span", {}) }),
1703
+ /* @__PURE__ */ o("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: fe })
1693
1704
  ]
1694
1705
  }
1695
1706
  );
1696
1707
  }
1697
- const tt = q(Dr);
1698
- tt.displayName = "DataTable";
1699
- const ca = Object.assign(tt, {
1700
- Toolbar: le
1708
+ const rt = B(Dr);
1709
+ rt.displayName = "DataTable";
1710
+ const ca = Object.assign(rt, {
1711
+ Toolbar: ue
1701
1712
  });
1702
- function Me(e) {
1703
- if (!_e(e)) return e;
1713
+ function _e(e) {
1714
+ if (!Ge(e)) return e;
1704
1715
  const t = e, a = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
1705
- return Ge(t, { className: n, size: t.props.size ?? 16 });
1716
+ return Le(t, { className: n, size: t.props.size ?? 16 });
1706
1717
  }
1707
1718
  function ua(e) {
1708
1719
  return Math.max(1, e) * 32 + 28;
1709
1720
  }
1710
- function be(e, t) {
1721
+ function xe(e, t) {
1711
1722
  return typeof e == "function" ? e(t) : !!e;
1712
1723
  }
1713
1724
  const Fr = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
1714
1725
  function pa(e) {
1715
1726
  const { data: t, actions: a, intent: n = "ghost", group: i, label: d, collapsed: f } = e, { t: m } = D();
1716
1727
  if (!t) return null;
1717
- const c = a.filter((b) => !be(b.hidden, t));
1728
+ const c = a.filter((b) => !xe(b.hidden, t));
1718
1729
  if (typeof f == "function" ? f() : !!f)
1719
- return /* @__PURE__ */ M(U.Root, { children: [
1730
+ return /* @__PURE__ */ _(U.Root, { children: [
1720
1731
  /* @__PURE__ */ o(U.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
1721
1732
  X,
1722
1733
  {
@@ -1729,8 +1740,8 @@ function pa(e) {
1729
1740
  /* @__PURE__ */ o(U.Content, { align: "end", children: c.map((b, v) => /* @__PURE__ */ o(
1730
1741
  U.Item,
1731
1742
  {
1732
- startIcon: Me(b.icon),
1733
- disabled: be(b.disabled, t),
1743
+ startIcon: _e(b.icon),
1744
+ disabled: xe(b.disabled, t),
1734
1745
  onSelect: () => b.onClick(t),
1735
1746
  className: b.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
1736
1747
  children: b.label
@@ -1739,13 +1750,13 @@ function pa(e) {
1739
1750
  )) })
1740
1751
  ] });
1741
1752
  const u = c.map((b, v) => {
1742
- const x = be(b.disabled, t), l = x && b.disabledReason ? b.disabledReason : b.label;
1753
+ const x = xe(b.disabled, t), l = x && b.disabledReason ? b.disabledReason : b.label;
1743
1754
  return /* @__PURE__ */ o(
1744
1755
  X,
1745
1756
  {
1746
1757
  size: "sm",
1747
1758
  intent: n,
1748
- icon: Me(b.icon),
1759
+ icon: _e(b.icon),
1749
1760
  tooltip: l,
1750
1761
  "aria-label": b.label,
1751
1762
  disabled: x,
@@ -1758,7 +1769,7 @@ function pa(e) {
1758
1769
  );
1759
1770
  });
1760
1771
  return i ? /* @__PURE__ */ o(
1761
- Le,
1772
+ je,
1762
1773
  {
1763
1774
  "aria-label": d ?? m("dataTable.actions", "Actions"),
1764
1775
  size: "sm",
@@ -1772,13 +1783,13 @@ export {
1772
1783
  br as E,
1773
1784
  pr as T,
1774
1785
  fr as a,
1775
- le as b,
1786
+ ue as b,
1776
1787
  Yt as c,
1777
1788
  ua as d,
1778
1789
  Tr as e,
1779
- He as f,
1790
+ Ve as f,
1780
1791
  xr as g,
1781
1792
  da as h,
1782
- j as i
1793
+ q as i
1783
1794
  };
1784
- //# sourceMappingURL=actions-cell-renderer-B2pw6iH8.js.map
1795
+ //# sourceMappingURL=actions-cell-renderer-WUTyAes8.js.map