react-glide-table 1.7.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -106,6 +106,37 @@ function applyCellEdit(data, rows, rowIndex, colIndex, raw) {
106
106
  return newData;
107
107
  }
108
108
 
109
+ // src/components/ui/table/features/cell-render/commitCellValue.ts
110
+ function commitCellValue({
111
+ data,
112
+ rows,
113
+ rowId,
114
+ columnId,
115
+ value,
116
+ onCellChange,
117
+ onDataChange
118
+ }) {
119
+ if (!onCellChange && !onDataChange) return true;
120
+ if (onCellChange) {
121
+ onCellChange(rowId, columnId, value);
122
+ return true;
123
+ }
124
+ const row = rows.find((item) => item.id === rowId);
125
+ if (!row) return false;
126
+ const cell = row.getAllCells().find((item) => item.column.id === columnId) ?? row.getVisibleCells().find((item) => item.column.id === columnId);
127
+ if (!cell) return false;
128
+ const accessorKey = getColumnAccessorKey(cell.column.columnDef);
129
+ if (!accessorKey) return false;
130
+ const dataIndex = row.index;
131
+ if (dataIndex < 0 || dataIndex >= data.length) return false;
132
+ const next = data.map((item) => ({ ...item }));
133
+ const target = next[dataIndex];
134
+ if (!target) return false;
135
+ target[accessorKey] = value;
136
+ onDataChange?.(next);
137
+ return true;
138
+ }
139
+
109
140
  // src/components/ui/table/features/cell-edit/useCellEdit.ts
110
141
  function useCellEdit({
111
142
  data,
@@ -141,21 +172,23 @@ function useCellEdit({
141
172
  cancelEdit();
142
173
  return true;
143
174
  }
144
- const value = raw ?? draftValueRef.current;
145
175
  if (!isColumnEditable(cell.column.columnDef)) {
146
176
  cancelEdit();
147
177
  return true;
148
178
  }
179
+ const value = raw ?? draftValueRef.current;
149
180
  const parsed = parseCellEditValue(value, getColumnEditType(cell.column.columnDef));
150
181
  if (!parsed.ok) return false;
151
- if (onCellChange) {
152
- onCellChange(row.id, cell.column.id, parsed.value);
153
- cancelEdit();
154
- return true;
155
- }
156
- const next = applyCellEdit(data, rows, current.rowIndex, current.colIndex, value);
157
- if (!next) return false;
158
- onDataChange?.(next);
182
+ const committed = commitCellValue({
183
+ data,
184
+ rows,
185
+ rowId: row.id,
186
+ columnId: cell.column.id,
187
+ value: parsed.value,
188
+ onCellChange,
189
+ onDataChange
190
+ });
191
+ if (!committed) return false;
159
192
  cancelEdit();
160
193
  return true;
161
194
  },
@@ -184,6 +217,218 @@ function useCellEdit({
184
217
  };
185
218
  }
186
219
 
220
+ // src/components/ui/table/features/cell-render/builtins.tsx
221
+ import { jsx, jsxs } from "react/jsx-runtime";
222
+ function asString(value) {
223
+ if (value == null) return "";
224
+ return String(value);
225
+ }
226
+ function asStringList(value) {
227
+ if (Array.isArray(value)) {
228
+ return value.map((item) => asString(item)).filter(Boolean);
229
+ }
230
+ if (value == null || value === "") return [];
231
+ return [asString(value)];
232
+ }
233
+ function asDrilldownItems(value) {
234
+ if (!Array.isArray(value)) return [];
235
+ return value.flatMap((item) => {
236
+ if (item == null) return [];
237
+ if (typeof item === "string") return [{ text: item }];
238
+ if (typeof item === "object") {
239
+ const record = item;
240
+ const text = asString(record.text ?? record.label ?? "");
241
+ if (!text) return [];
242
+ const img = record.img ?? record.image;
243
+ return [{ text, ...typeof img === "string" ? { img } : {} }];
244
+ }
245
+ return [{ text: asString(item) }];
246
+ });
247
+ }
248
+ function escapeHtml(text) {
249
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
250
+ }
251
+ function simpleMarkdownToHtml(source) {
252
+ const escaped = escapeHtml(source);
253
+ return escaped.replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/\n/g, "<br />");
254
+ }
255
+ function TextCell({ value }) {
256
+ return asString(value);
257
+ }
258
+ function NumberCell({ value }) {
259
+ if (value == null || value === "") return null;
260
+ return asString(value);
261
+ }
262
+ function BooleanCell({ value, update, cellProps }) {
263
+ const checked = Boolean(value);
264
+ const readonly = Boolean(cellProps?.readonly);
265
+ return /* @__PURE__ */ jsx(
266
+ "input",
267
+ {
268
+ type: "checkbox",
269
+ className: "data-table-cell-boolean",
270
+ checked,
271
+ disabled: readonly,
272
+ "aria-checked": checked,
273
+ onChange: (event) => {
274
+ if (readonly) return;
275
+ update(event.target.checked);
276
+ },
277
+ onClick: (event) => {
278
+ event.stopPropagation();
279
+ },
280
+ onMouseDown: (event) => {
281
+ event.stopPropagation();
282
+ }
283
+ }
284
+ );
285
+ }
286
+ function sanitizeUriHref(raw) {
287
+ const href = raw.trim();
288
+ if (!href) return null;
289
+ if (href.startsWith("/") || href.startsWith("#") || href.startsWith("?") || href.startsWith("./") || href.startsWith("../")) {
290
+ return href;
291
+ }
292
+ try {
293
+ const parsed = new URL(href);
294
+ const protocol = parsed.protocol.toLowerCase();
295
+ if (protocol === "http:" || protocol === "https:" || protocol === "mailto:") {
296
+ return href;
297
+ }
298
+ return null;
299
+ } catch {
300
+ if (/^[a-z][a-z0-9+.-]*:/i.test(href)) return null;
301
+ return href;
302
+ }
303
+ }
304
+ function UriCell({ value }) {
305
+ const raw = asString(value);
306
+ if (!raw) return null;
307
+ const href = sanitizeUriHref(raw);
308
+ if (!href) {
309
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-uri", children: raw });
310
+ }
311
+ return /* @__PURE__ */ jsx(
312
+ "a",
313
+ {
314
+ className: "data-table-cell-uri",
315
+ href,
316
+ target: "_blank",
317
+ rel: "noopener noreferrer",
318
+ onClick: (event) => event.stopPropagation(),
319
+ onMouseDown: (event) => event.stopPropagation(),
320
+ children: raw
321
+ }
322
+ );
323
+ }
324
+ function ImageCell({ value }) {
325
+ const urls = asStringList(value);
326
+ if (urls.length === 0) return null;
327
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-image", children: urls.map((url, index) => /* @__PURE__ */ jsx(
328
+ "img",
329
+ {
330
+ src: url,
331
+ alt: "",
332
+ className: "data-table-cell-image-item"
333
+ },
334
+ `${index}:${url}`
335
+ )) });
336
+ }
337
+ function BubbleCell({ value }) {
338
+ const items = asStringList(value);
339
+ if (items.length === 0) return null;
340
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-bubble", children: items.map((item, index) => /* @__PURE__ */ jsx("span", { className: "data-table-cell-bubble-item", children: item }, `${index}:${item}`)) });
341
+ }
342
+ function MarkdownCell({ value }) {
343
+ const source = asString(value);
344
+ if (!source) return null;
345
+ return /* @__PURE__ */ jsx(
346
+ "span",
347
+ {
348
+ className: "data-table-cell-markdown",
349
+ dangerouslySetInnerHTML: { __html: simpleMarkdownToHtml(source) }
350
+ }
351
+ );
352
+ }
353
+ function DrilldownCell({ value }) {
354
+ const items = asDrilldownItems(value);
355
+ if (items.length === 0) return null;
356
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-drilldown", children: items.map((item, index) => /* @__PURE__ */ jsxs(
357
+ "span",
358
+ {
359
+ className: "data-table-cell-drilldown-item",
360
+ children: [
361
+ item.img ? /* @__PURE__ */ jsx(
362
+ "img",
363
+ {
364
+ src: item.img,
365
+ alt: "",
366
+ className: "data-table-cell-drilldown-image"
367
+ }
368
+ ) : null,
369
+ /* @__PURE__ */ jsx("span", { className: "data-table-cell-drilldown-text", children: item.text })
370
+ ]
371
+ },
372
+ `${index}:${item.text}:${item.img ?? ""}`
373
+ )) });
374
+ }
375
+ function LoadingCell() {
376
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-loading", "aria-busy": "true" });
377
+ }
378
+ function ProtectedCell() {
379
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-protected", "aria-label": "protected", children: "****" });
380
+ }
381
+ function RowIdCell({ value }) {
382
+ return /* @__PURE__ */ jsx("span", { className: "data-table-cell-row-id", children: asString(value) });
383
+ }
384
+ var BUILTIN_RENDER_MAP = {
385
+ text: TextCell,
386
+ number: NumberCell,
387
+ boolean: BooleanCell,
388
+ uri: UriCell,
389
+ image: ImageCell,
390
+ bubble: BubbleCell,
391
+ markdown: MarkdownCell,
392
+ drilldown: DrilldownCell,
393
+ loading: LoadingCell,
394
+ protected: ProtectedCell,
395
+ "row-id": RowIdCell
396
+ };
397
+ var BUILTIN_CELL_RENDERERS = Object.keys(BUILTIN_RENDER_MAP).map((kind) => ({
398
+ kind,
399
+ render: BUILTIN_RENDER_MAP[kind]
400
+ }));
401
+
402
+ // src/components/ui/table/features/cell-render/registry.ts
403
+ function createCellRendererRegistry(customRenderers = []) {
404
+ const registry = /* @__PURE__ */ new Map();
405
+ for (const renderer of BUILTIN_CELL_RENDERERS) {
406
+ registry.set(renderer.kind, renderer);
407
+ }
408
+ for (const renderer of customRenderers) {
409
+ registry.set(renderer.kind, renderer);
410
+ }
411
+ return registry;
412
+ }
413
+ function resolveCellRenderer(registry, kind, ctx) {
414
+ if (!kind) return void 0;
415
+ const renderer = registry.get(kind);
416
+ if (!renderer) return void 0;
417
+ if (renderer.isMatch && !renderer.isMatch(ctx)) {
418
+ return void 0;
419
+ }
420
+ return renderer;
421
+ }
422
+ function formatDefaultCellValue(value) {
423
+ if (value == null) return null;
424
+ if (typeof value === "string") return value;
425
+ if (typeof value === "number" || typeof value === "boolean") {
426
+ return String(value);
427
+ }
428
+ if (typeof value === "bigint") return value.toString();
429
+ return String(value);
430
+ }
431
+
187
432
  // src/components/ui/table/features/cell-selection/useCellSelection.ts
188
433
  import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
189
434
 
@@ -493,9 +738,34 @@ function hasCellSelectionEdges(style) {
493
738
  }
494
739
 
495
740
  // src/components/ui/table/features/cell-selection/copyData.ts
741
+ function formatPrimitive(value) {
742
+ if (value === null || value === void 0) return "";
743
+ if (typeof value === "string") return value;
744
+ if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
745
+ return String(value);
746
+ }
747
+ return "";
748
+ }
749
+ function formatObjectValue(value) {
750
+ const text = value.text ?? value.label ?? value.name ?? value.title;
751
+ if (text != null && text !== "") {
752
+ return formatCellValue(text);
753
+ }
754
+ try {
755
+ return JSON.stringify(value);
756
+ } catch {
757
+ return "";
758
+ }
759
+ }
496
760
  function formatCellValue(value) {
497
761
  if (value === null || value === void 0) return "";
498
- return String(value);
762
+ if (Array.isArray(value)) {
763
+ return value.map((item) => formatCellValue(item)).filter((item) => item.length > 0).join(", ");
764
+ }
765
+ if (typeof value === "object") {
766
+ return formatObjectValue(value);
767
+ }
768
+ return formatPrimitive(value);
499
769
  }
500
770
  function getNestedValue(row, path) {
501
771
  if (!path.includes(".")) return row[path];
@@ -1119,10 +1389,40 @@ function getColumnFreezeStyle(offset, options) {
1119
1389
  return {
1120
1390
  position: "sticky",
1121
1391
  ...offset.side === "left" ? { left: offset.offset } : { right: offset.offset },
1122
- zIndex: zBase + offset.stack,
1123
- ...options?.isHeader ? { top: options.headerTop ?? 0 } : {}
1392
+ zIndex: zBase + offset.stack
1393
+ };
1394
+ }
1395
+ function resolveHeaderFreezeOffset(column, freezeOffsets) {
1396
+ const direct = freezeOffsets.get(column.id);
1397
+ if (direct) return direct;
1398
+ const leaves = typeof column.getLeafColumns === "function" ? column.getLeafColumns() : column.columns && column.columns.length > 0 ? flattenHeaderLeaves(column) : [];
1399
+ if (leaves.length === 0) return void 0;
1400
+ const leafOffsets = [];
1401
+ for (const leaf of leaves) {
1402
+ const offset2 = freezeOffsets.get(leaf.id);
1403
+ if (!offset2) return void 0;
1404
+ leafOffsets.push(offset2);
1405
+ }
1406
+ const side = leafOffsets[0]?.side;
1407
+ if (!side || leafOffsets.some((offset2) => offset2.side !== side)) {
1408
+ return void 0;
1409
+ }
1410
+ const offset = Math.min(...leafOffsets.map((item) => item.offset));
1411
+ const leftmost = leafOffsets[0];
1412
+ const rightmost = leafOffsets[leafOffsets.length - 1];
1413
+ return {
1414
+ side,
1415
+ offset,
1416
+ edgeLeft: leftmost.edgeLeft,
1417
+ edgeRight: rightmost.edgeRight,
1418
+ isEdge: leftmost.edgeLeft || rightmost.edgeRight,
1419
+ stack: Math.max(...leafOffsets.map((item) => item.stack))
1124
1420
  };
1125
1421
  }
1422
+ function flattenHeaderLeaves(column) {
1423
+ if (!column.columns || column.columns.length === 0) return [column];
1424
+ return column.columns.flatMap((child) => flattenHeaderLeaves(child));
1425
+ }
1126
1426
 
1127
1427
  // src/components/ui/table/features/inline-search/inlineSearch.ts
1128
1428
  var INLINE_SEARCH_MAX_RESULTS = 1e3;
@@ -1873,6 +2173,7 @@ function useGlideTable(options) {
1873
2173
  onDataChange,
1874
2174
  onCellChange,
1875
2175
  onBatchChange,
2176
+ cellRenderers,
1876
2177
  preserveRowSelection = false,
1877
2178
  toggleField,
1878
2179
  childField,
@@ -2098,6 +2399,22 @@ function useGlideTable(options) {
2098
2399
  commitEdit,
2099
2400
  cancelEdit
2100
2401
  } = useCellEdit({ data: tableData, rows, onDataChange, onCellChange });
2402
+ const cellRendererRegistry = useMemo3(
2403
+ () => createCellRendererRegistry(cellRenderers),
2404
+ [cellRenderers]
2405
+ );
2406
+ const commitRenderedCellValue = useCallback4(
2407
+ (rowId, columnId, value) => commitCellValue({
2408
+ data: tableData,
2409
+ rows,
2410
+ rowId,
2411
+ columnId,
2412
+ value,
2413
+ onCellChange,
2414
+ onDataChange
2415
+ }),
2416
+ [onCellChange, onDataChange, rows, tableData]
2417
+ );
2101
2418
  const handleCellMouseDownWithCommit = useCallback4(
2102
2419
  (rowIndex, colIndex, options2) => {
2103
2420
  const isSameEditingCell = editingCell?.rowIndex === rowIndex && editingCell?.colIndex === colIndex;
@@ -2334,6 +2651,10 @@ function useGlideTable(options) {
2334
2651
  onCommitEdit: commitEdit,
2335
2652
  onCancelEdit: cancelEdit
2336
2653
  },
2654
+ cellRender: {
2655
+ registry: cellRendererRegistry,
2656
+ commitValue: commitRenderedCellValue
2657
+ },
2337
2658
  expand: {
2338
2659
  enableExpand,
2339
2660
  toggleField,
@@ -2380,6 +2701,8 @@ function useGlideTable(options) {
2380
2701
  startEdit,
2381
2702
  commitEdit,
2382
2703
  cancelEdit,
2704
+ cellRendererRegistry,
2705
+ commitRenderedCellValue,
2383
2706
  enableExpand,
2384
2707
  toggleField,
2385
2708
  expandedRows,
@@ -2444,6 +2767,60 @@ function useGlideTable(options) {
2444
2767
  };
2445
2768
  }
2446
2769
 
2770
+ // src/components/ui/table/features/cell-render/ResolvedTableCell.tsx
2771
+ import { useCallback as useCallback5 } from "react";
2772
+
2773
+ // src/components/ui/table/DataTableContext.tsx
2774
+ import { createContext, use } from "react";
2775
+ import { jsx as jsx2 } from "react/jsx-runtime";
2776
+ var DataTableContext = createContext(null);
2777
+ function useDataTableRowContext() {
2778
+ const context = use(DataTableContext);
2779
+ if (!context) {
2780
+ throw new Error("useDataTableRowContext must be used within a DataTableContextProvider");
2781
+ }
2782
+ return context;
2783
+ }
2784
+ function DataTableContextProvider({
2785
+ value,
2786
+ children
2787
+ }) {
2788
+ return /* @__PURE__ */ jsx2(DataTableContext, { value, children });
2789
+ }
2790
+
2791
+ // src/components/ui/table/features/cell-render/ResolvedTableCell.tsx
2792
+ function ResolvedTableCell({
2793
+ info
2794
+ }) {
2795
+ const { cellRender } = useDataTableRowContext();
2796
+ const { row, column, getValue } = info;
2797
+ const meta = column.columnDef.meta;
2798
+ const value = getValue();
2799
+ const columnId = column.id;
2800
+ const update = useCallback5(
2801
+ (next) => {
2802
+ cellRender.commitValue(row.id, columnId, next);
2803
+ },
2804
+ [cellRender, columnId, row.id]
2805
+ );
2806
+ const ctx = {
2807
+ value,
2808
+ row,
2809
+ index: row.index,
2810
+ columnId,
2811
+ cellProps: meta?.cellProps,
2812
+ update
2813
+ };
2814
+ if (meta?.cellRender) {
2815
+ return meta.cellRender(ctx);
2816
+ }
2817
+ const renderer = resolveCellRenderer(cellRender.registry, meta?.kind, ctx);
2818
+ if (renderer) {
2819
+ return renderer.render(ctx);
2820
+ }
2821
+ return formatDefaultCellValue(value);
2822
+ }
2823
+
2447
2824
  // src/components/ui/table/features/column-resize/columnResize.ts
2448
2825
  function getColumnSizeStyle(size, options) {
2449
2826
  const { force = false, lockMax = false } = options ?? {};
@@ -2465,28 +2842,10 @@ import { useMemo as useMemo4 } from "react";
2465
2842
  import { flexRender } from "@tanstack/react-table";
2466
2843
  import { useEffect as useEffect6, useRef as useRef6 } from "react";
2467
2844
 
2468
- // src/components/ui/table/DataTableContext.tsx
2469
- import { createContext, use } from "react";
2470
- import { jsx } from "react/jsx-runtime";
2471
- var DataTableContext = createContext(null);
2472
- function useDataTableRowContext() {
2473
- const context = use(DataTableContext);
2474
- if (!context) {
2475
- throw new Error("useDataTableRowContext must be used within a DataTableContextProvider");
2476
- }
2477
- return context;
2478
- }
2479
- function DataTableContextProvider({
2480
- value,
2481
- children
2482
- }) {
2483
- return /* @__PURE__ */ jsx(DataTableContext, { value, children });
2484
- }
2485
-
2486
2845
  // src/components/ui/table/components/icons.tsx
2487
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
2846
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
2488
2847
  function ChevronDown({ className, "aria-hidden": ariaHidden = true }) {
2489
- return /* @__PURE__ */ jsx2(
2848
+ return /* @__PURE__ */ jsx3(
2490
2849
  "svg",
2491
2850
  {
2492
2851
  className,
@@ -2499,12 +2858,12 @@ function ChevronDown({ className, "aria-hidden": ariaHidden = true }) {
2499
2858
  strokeWidth: "2",
2500
2859
  strokeLinecap: "round",
2501
2860
  strokeLinejoin: "round",
2502
- children: /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" })
2861
+ children: /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" })
2503
2862
  }
2504
2863
  );
2505
2864
  }
2506
2865
  function ChevronUp({ className, "aria-hidden": ariaHidden = true }) {
2507
- return /* @__PURE__ */ jsx2(
2866
+ return /* @__PURE__ */ jsx3(
2508
2867
  "svg",
2509
2868
  {
2510
2869
  className,
@@ -2517,12 +2876,12 @@ function ChevronUp({ className, "aria-hidden": ariaHidden = true }) {
2517
2876
  strokeWidth: "2",
2518
2877
  strokeLinecap: "round",
2519
2878
  strokeLinejoin: "round",
2520
- children: /* @__PURE__ */ jsx2("path", { d: "m18 15-6-6-6 6" })
2879
+ children: /* @__PURE__ */ jsx3("path", { d: "m18 15-6-6-6 6" })
2521
2880
  }
2522
2881
  );
2523
2882
  }
2524
2883
  function ChevronLeft({ className, "aria-hidden": ariaHidden = true }) {
2525
- return /* @__PURE__ */ jsx2(
2884
+ return /* @__PURE__ */ jsx3(
2526
2885
  "svg",
2527
2886
  {
2528
2887
  className,
@@ -2535,12 +2894,12 @@ function ChevronLeft({ className, "aria-hidden": ariaHidden = true }) {
2535
2894
  strokeWidth: "2",
2536
2895
  strokeLinecap: "round",
2537
2896
  strokeLinejoin: "round",
2538
- children: /* @__PURE__ */ jsx2("path", { d: "m15 18-6-6 6-6" })
2897
+ children: /* @__PURE__ */ jsx3("path", { d: "m15 18-6-6 6-6" })
2539
2898
  }
2540
2899
  );
2541
2900
  }
2542
2901
  function ChevronRight({ className, "aria-hidden": ariaHidden = true }) {
2543
- return /* @__PURE__ */ jsx2(
2902
+ return /* @__PURE__ */ jsx3(
2544
2903
  "svg",
2545
2904
  {
2546
2905
  className,
@@ -2553,12 +2912,12 @@ function ChevronRight({ className, "aria-hidden": ariaHidden = true }) {
2553
2912
  strokeWidth: "2",
2554
2913
  strokeLinecap: "round",
2555
2914
  strokeLinejoin: "round",
2556
- children: /* @__PURE__ */ jsx2("path", { d: "m9 18 6-6-6-6" })
2915
+ children: /* @__PURE__ */ jsx3("path", { d: "m9 18 6-6-6-6" })
2557
2916
  }
2558
2917
  );
2559
2918
  }
2560
2919
  function ArrowUp({ className, "aria-hidden": ariaHidden = true }) {
2561
- return /* @__PURE__ */ jsxs(
2920
+ return /* @__PURE__ */ jsxs2(
2562
2921
  "svg",
2563
2922
  {
2564
2923
  className,
@@ -2572,14 +2931,14 @@ function ArrowUp({ className, "aria-hidden": ariaHidden = true }) {
2572
2931
  strokeLinecap: "round",
2573
2932
  strokeLinejoin: "round",
2574
2933
  children: [
2575
- /* @__PURE__ */ jsx2("path", { d: "m18 15-6-6-6 6" }),
2576
- /* @__PURE__ */ jsx2("path", { d: "M12 21V9" })
2934
+ /* @__PURE__ */ jsx3("path", { d: "m18 15-6-6-6 6" }),
2935
+ /* @__PURE__ */ jsx3("path", { d: "M12 21V9" })
2577
2936
  ]
2578
2937
  }
2579
2938
  );
2580
2939
  }
2581
2940
  function ArrowDown({ className, "aria-hidden": ariaHidden = true }) {
2582
- return /* @__PURE__ */ jsxs(
2941
+ return /* @__PURE__ */ jsxs2(
2583
2942
  "svg",
2584
2943
  {
2585
2944
  className,
@@ -2593,14 +2952,14 @@ function ArrowDown({ className, "aria-hidden": ariaHidden = true }) {
2593
2952
  strokeLinecap: "round",
2594
2953
  strokeLinejoin: "round",
2595
2954
  children: [
2596
- /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" }),
2597
- /* @__PURE__ */ jsx2("path", { d: "M12 3v12" })
2955
+ /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" }),
2956
+ /* @__PURE__ */ jsx3("path", { d: "M12 3v12" })
2598
2957
  ]
2599
2958
  }
2600
2959
  );
2601
2960
  }
2602
2961
  function ArrowUpDown({ className, "aria-hidden": ariaHidden = true }) {
2603
- return /* @__PURE__ */ jsxs(
2962
+ return /* @__PURE__ */ jsxs2(
2604
2963
  "svg",
2605
2964
  {
2606
2965
  className,
@@ -2614,10 +2973,10 @@ function ArrowUpDown({ className, "aria-hidden": ariaHidden = true }) {
2614
2973
  strokeLinecap: "round",
2615
2974
  strokeLinejoin: "round",
2616
2975
  children: [
2617
- /* @__PURE__ */ jsx2("path", { d: "m21 16-4 4-4-4" }),
2618
- /* @__PURE__ */ jsx2("path", { d: "M17 20V4" }),
2619
- /* @__PURE__ */ jsx2("path", { d: "m3 8 4-4 4 4" }),
2620
- /* @__PURE__ */ jsx2("path", { d: "M7 4v16" })
2976
+ /* @__PURE__ */ jsx3("path", { d: "m21 16-4 4-4-4" }),
2977
+ /* @__PURE__ */ jsx3("path", { d: "M17 20V4" }),
2978
+ /* @__PURE__ */ jsx3("path", { d: "m3 8 4-4 4 4" }),
2979
+ /* @__PURE__ */ jsx3("path", { d: "M7 4v16" })
2621
2980
  ]
2622
2981
  }
2623
2982
  );
@@ -2629,7 +2988,7 @@ function cn(...inputs) {
2629
2988
  }
2630
2989
 
2631
2990
  // src/components/ui/table/components/DataTable/DataTableRow.tsx
2632
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
2991
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
2633
2992
  function isInteractiveMouseTarget(target) {
2634
2993
  if (!(target instanceof Element)) return false;
2635
2994
  const interactiveSelector = [
@@ -2781,7 +3140,7 @@ function DataTableRow({
2781
3140
  editInputRef.current?.focus();
2782
3141
  editInputRef.current?.select();
2783
3142
  }, [isRowEditing, editingCell?.colIndex]);
2784
- return /* @__PURE__ */ jsx3(
3143
+ return /* @__PURE__ */ jsx4(
2785
3144
  "tr",
2786
3145
  {
2787
3146
  ref: measureElement,
@@ -2875,7 +3234,7 @@ function DataTableRow({
2875
3234
  const searchMatchKey = buildSearchMatchKey(cellIndex, rowIndex);
2876
3235
  const isSearchMatch = enableInlineSearch && searchMatchKeys.has(searchMatchKey);
2877
3236
  const isSearchActive = isSearchMatch && activeMatch !== null && activeMatch[0] === cellIndex && activeMatch[1] === rowIndex;
2878
- return /* @__PURE__ */ jsxs2(
3237
+ return /* @__PURE__ */ jsxs3(
2879
3238
  "td",
2880
3239
  {
2881
3240
  "data-row-index": rowIndex,
@@ -2949,7 +3308,7 @@ function DataTableRow({
2949
3308
  classNames?.cell
2950
3309
  ),
2951
3310
  children: [
2952
- isEditing ? /* @__PURE__ */ jsx3(
3311
+ isEditing ? /* @__PURE__ */ jsx4(
2953
3312
  "input",
2954
3313
  {
2955
3314
  ...editInputProps,
@@ -2992,8 +3351,8 @@ function DataTableRow({
2992
3351
  onCommitEdit(event.currentTarget.value);
2993
3352
  }
2994
3353
  }
2995
- ) : isExpandCell && enableExpand ? /* @__PURE__ */ jsxs2("div", { className: cn("expand-cell", classNames?.expandCell), children: [
2996
- /* @__PURE__ */ jsxs2(
3354
+ ) : isExpandCell && enableExpand ? /* @__PURE__ */ jsxs3("div", { className: cn("expand-cell", classNames?.expandCell), children: [
3355
+ /* @__PURE__ */ jsxs3(
2997
3356
  "div",
2998
3357
  {
2999
3358
  className: cn(
@@ -3001,7 +3360,7 @@ function DataTableRow({
3001
3360
  classNames?.expandCellContent
3002
3361
  ),
3003
3362
  children: [
3004
- rowLevel > 0 && /* @__PURE__ */ jsx3(
3363
+ rowLevel > 0 && /* @__PURE__ */ jsx4(
3005
3364
  "span",
3006
3365
  {
3007
3366
  className: cn(
@@ -3011,7 +3370,7 @@ function DataTableRow({
3011
3370
  children: "\xB7"
3012
3371
  }
3013
3372
  ),
3014
- /* @__PURE__ */ jsx3(
3373
+ /* @__PURE__ */ jsx4(
3015
3374
  "div",
3016
3375
  {
3017
3376
  className: cn(
@@ -3024,7 +3383,7 @@ function DataTableRow({
3024
3383
  ]
3025
3384
  }
3026
3385
  ),
3027
- canExpand && expandKey && /* @__PURE__ */ jsx3(
3386
+ canExpand && expandKey && /* @__PURE__ */ jsx4(
3028
3387
  "button",
3029
3388
  {
3030
3389
  type: "button",
@@ -3038,7 +3397,7 @@ function DataTableRow({
3038
3397
  onToggleExpand?.(expandKey);
3039
3398
  },
3040
3399
  onMouseDown: (event) => event.stopPropagation(),
3041
- children: isExpanded ? /* @__PURE__ */ jsx3(
3400
+ children: isExpanded ? /* @__PURE__ */ jsx4(
3042
3401
  ChevronUp,
3043
3402
  {
3044
3403
  className: cn(
@@ -3046,7 +3405,7 @@ function DataTableRow({
3046
3405
  classNames?.expandToggleIcon
3047
3406
  )
3048
3407
  }
3049
- ) : /* @__PURE__ */ jsx3(
3408
+ ) : /* @__PURE__ */ jsx4(
3050
3409
  ChevronDown,
3051
3410
  {
3052
3411
  className: cn(
@@ -3058,7 +3417,7 @@ function DataTableRow({
3058
3417
  }
3059
3418
  )
3060
3419
  ] }) : flexRender(cell.column.columnDef.cell, cell.getContext()),
3061
- isBottomRightCell && /* @__PURE__ */ jsx3(
3420
+ isBottomRightCell && /* @__PURE__ */ jsx4(
3062
3421
  "div",
3063
3422
  {
3064
3423
  role: "presentation",
@@ -3080,9 +3439,9 @@ function DataTableRow({
3080
3439
  }
3081
3440
 
3082
3441
  // src/components/ui/table/components/DataTable/DataTableSearch.tsx
3083
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
3442
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
3084
3443
  function SearchCloseIcon({ className }) {
3085
- return /* @__PURE__ */ jsxs3(
3444
+ return /* @__PURE__ */ jsxs4(
3086
3445
  "svg",
3087
3446
  {
3088
3447
  className,
@@ -3096,8 +3455,8 @@ function SearchCloseIcon({ className }) {
3096
3455
  strokeLinecap: "round",
3097
3456
  strokeLinejoin: "round",
3098
3457
  children: [
3099
- /* @__PURE__ */ jsx4("path", { d: "M18 6 6 18" }),
3100
- /* @__PURE__ */ jsx4("path", { d: "m6 6 12 12" })
3458
+ /* @__PURE__ */ jsx5("path", { d: "M18 6 6 18" }),
3459
+ /* @__PURE__ */ jsx5("path", { d: "m6 6 12 12" })
3101
3460
  ]
3102
3461
  }
3103
3462
  );
@@ -3143,15 +3502,15 @@ function DataTableSearch({
3143
3502
  onPrevious();
3144
3503
  }
3145
3504
  };
3146
- return /* @__PURE__ */ jsxs3(
3505
+ return /* @__PURE__ */ jsxs4(
3147
3506
  "div",
3148
3507
  {
3149
3508
  className: cn("data-table-search", classNames?.search),
3150
3509
  role: "search",
3151
3510
  onMouseDown: (event) => event.stopPropagation(),
3152
3511
  children: [
3153
- /* @__PURE__ */ jsxs3("div", { className: "data-table-search-row", children: [
3154
- /* @__PURE__ */ jsx4(
3512
+ /* @__PURE__ */ jsxs4("div", { className: "data-table-search-row", children: [
3513
+ /* @__PURE__ */ jsx5(
3155
3514
  "input",
3156
3515
  {
3157
3516
  ref: searchInputRef,
@@ -3167,7 +3526,7 @@ function DataTableSearch({
3167
3526
  onKeyDown: handleKeyDown
3168
3527
  }
3169
3528
  ),
3170
- /* @__PURE__ */ jsx4(
3529
+ /* @__PURE__ */ jsx5(
3171
3530
  "button",
3172
3531
  {
3173
3532
  type: "button",
@@ -3177,10 +3536,10 @@ function DataTableSearch({
3177
3536
  event.stopPropagation();
3178
3537
  onPrevious();
3179
3538
  },
3180
- children: /* @__PURE__ */ jsx4(ChevronUp, { className: "data-table-search-icon" })
3539
+ children: /* @__PURE__ */ jsx5(ChevronUp, { className: "data-table-search-icon" })
3181
3540
  }
3182
3541
  ),
3183
- /* @__PURE__ */ jsx4(
3542
+ /* @__PURE__ */ jsx5(
3184
3543
  "button",
3185
3544
  {
3186
3545
  type: "button",
@@ -3190,10 +3549,10 @@ function DataTableSearch({
3190
3549
  event.stopPropagation();
3191
3550
  onNext();
3192
3551
  },
3193
- children: /* @__PURE__ */ jsx4(ChevronDown, { className: "data-table-search-icon" })
3552
+ children: /* @__PURE__ */ jsx5(ChevronDown, { className: "data-table-search-icon" })
3194
3553
  }
3195
3554
  ),
3196
- canClose ? /* @__PURE__ */ jsx4(
3555
+ canClose ? /* @__PURE__ */ jsx5(
3197
3556
  "button",
3198
3557
  {
3199
3558
  type: "button",
@@ -3203,11 +3562,11 @@ function DataTableSearch({
3203
3562
  event.stopPropagation();
3204
3563
  onClose();
3205
3564
  },
3206
- children: /* @__PURE__ */ jsx4(SearchCloseIcon, { className: "data-table-search-icon" })
3565
+ children: /* @__PURE__ */ jsx5(SearchCloseIcon, { className: "data-table-search-icon" })
3207
3566
  }
3208
3567
  ) : null
3209
3568
  ] }),
3210
- /* @__PURE__ */ jsx4(
3569
+ /* @__PURE__ */ jsx5(
3211
3570
  "div",
3212
3571
  {
3213
3572
  className: cn("data-table-search-status", classNames?.searchStatus),
@@ -3215,7 +3574,7 @@ function DataTableSearch({
3215
3574
  children: resultString
3216
3575
  }
3217
3576
  ),
3218
- searchStatus !== void 0 ? /* @__PURE__ */ jsx4(
3577
+ searchStatus !== void 0 ? /* @__PURE__ */ jsx5(
3219
3578
  "div",
3220
3579
  {
3221
3580
  className: cn(
@@ -3226,7 +3585,7 @@ function DataTableSearch({
3226
3585
  "aria-valuemin": 0,
3227
3586
  "aria-valuemax": 100,
3228
3587
  "aria-valuenow": progress,
3229
- children: /* @__PURE__ */ jsx4(
3588
+ children: /* @__PURE__ */ jsx5(
3230
3589
  "div",
3231
3590
  {
3232
3591
  className: "data-table-search-progress-bar",
@@ -3241,7 +3600,7 @@ function DataTableSearch({
3241
3600
  }
3242
3601
 
3243
3602
  // src/components/ui/table/components/DataTable/DataTableToolbar.tsx
3244
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
3603
+ import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
3245
3604
  function DataTableToolbar({
3246
3605
  filteredCount,
3247
3606
  totalCount,
@@ -3259,20 +3618,20 @@ function DataTableToolbar({
3259
3618
  const selectionContent = selectionLabel?.(selectedCount) ?? null;
3260
3619
  const hasSelectionContent = selectionContent !== null && selectionContent !== false && selectionContent !== void 0 && typeof selectionContent !== "boolean";
3261
3620
  if (!hasLeftContent && !hasToolbar && !hasSelectionContent) return null;
3262
- return /* @__PURE__ */ jsxs4("div", { className: cn("DataTableToolbarJSX", classNames?.toolbar, className), children: [
3263
- /* @__PURE__ */ jsxs4("div", { className: cn("toolbar-left", classNames?.toolbarLeft), children: [
3264
- hasCount && /* @__PURE__ */ jsx5("span", { className: cn("toolbar-count", classNames?.toolbarCount), children: displayFiltered !== void 0 && totalCount !== void 0 ? /* @__PURE__ */ jsxs4(Fragment, { children: [
3265
- /* @__PURE__ */ jsx5("span", { className: "toolbar-count-primary", children: displayFiltered }),
3266
- /* @__PURE__ */ jsxs4("span", { className: "toolbar-count-placeholder", children: [
3621
+ return /* @__PURE__ */ jsxs5("div", { className: cn("DataTableToolbarJSX", classNames?.toolbar, className), children: [
3622
+ /* @__PURE__ */ jsxs5("div", { className: cn("toolbar-left", classNames?.toolbarLeft), children: [
3623
+ hasCount && /* @__PURE__ */ jsx6("span", { className: cn("toolbar-count", classNames?.toolbarCount), children: displayFiltered !== void 0 && totalCount !== void 0 ? /* @__PURE__ */ jsxs5(Fragment, { children: [
3624
+ /* @__PURE__ */ jsx6("span", { className: "toolbar-count-primary", children: displayFiltered }),
3625
+ /* @__PURE__ */ jsxs5("span", { className: "toolbar-count-placeholder", children: [
3267
3626
  " / ",
3268
3627
  totalCount
3269
3628
  ] })
3270
- ] }) : /* @__PURE__ */ jsx5("span", { className: "toolbar-count-primary", children: displayFiltered ?? totalCount }) }),
3629
+ ] }) : /* @__PURE__ */ jsx6("span", { className: "toolbar-count-primary", children: displayFiltered ?? totalCount }) }),
3271
3630
  summary
3272
3631
  ] }),
3273
- /* @__PURE__ */ jsxs4("div", { className: cn("toolbar-right", classNames?.toolbarRight), children: [
3274
- hasSelectionContent && (typeof selectionContent === "string" || typeof selectionContent === "number" ? /* @__PURE__ */ jsx5("span", { className: cn("toolbar-selection", classNames?.toolbarSelection), children: selectionContent }) : selectionContent),
3275
- hasToolbar && /* @__PURE__ */ jsx5("div", { className: cn("toolbar-actions", classNames?.toolbarActions), children: toolbar })
3632
+ /* @__PURE__ */ jsxs5("div", { className: cn("toolbar-right", classNames?.toolbarRight), children: [
3633
+ hasSelectionContent && (typeof selectionContent === "string" || typeof selectionContent === "number" ? /* @__PURE__ */ jsx6("span", { className: cn("toolbar-selection", classNames?.toolbarSelection), children: selectionContent }) : selectionContent),
3634
+ hasToolbar && /* @__PURE__ */ jsx6("div", { className: cn("toolbar-actions", classNames?.toolbarActions), children: toolbar })
3276
3635
  ] })
3277
3636
  ] });
3278
3637
  }
@@ -3310,20 +3669,20 @@ function getMergedHeaderGroups(headerGroups) {
3310
3669
  }
3311
3670
 
3312
3671
  // src/components/ui/table/components/DataTable/DataTable.tsx
3313
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
3672
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
3314
3673
  function DefaultScroll({
3315
3674
  scrollRef,
3316
3675
  children,
3317
3676
  className
3318
3677
  }) {
3319
- return /* @__PURE__ */ jsx6("div", { ref: scrollRef, className: cn("data-table-scroll", className), children });
3678
+ return /* @__PURE__ */ jsx7("div", { ref: scrollRef, className: cn("data-table-scroll", className), children });
3320
3679
  }
3321
3680
  function DefaultPending({
3322
3681
  loadingText,
3323
3682
  className,
3324
3683
  classNames
3325
3684
  }) {
3326
- return /* @__PURE__ */ jsx6(
3685
+ return /* @__PURE__ */ jsx7(
3327
3686
  "div",
3328
3687
  {
3329
3688
  className: cn(
@@ -3333,7 +3692,7 @@ function DefaultPending({
3333
3692
  classNames?.pending,
3334
3693
  className
3335
3694
  ),
3336
- children: /* @__PURE__ */ jsx6("span", { className: cn("data-table-loading-text", classNames?.loadingText), children: loadingText })
3695
+ children: /* @__PURE__ */ jsx7("span", { className: cn("data-table-loading-text", classNames?.loadingText), children: loadingText })
3337
3696
  }
3338
3697
  );
3339
3698
  }
@@ -3342,7 +3701,7 @@ function DefaultEmpty({
3342
3701
  columnCount,
3343
3702
  classNames
3344
3703
  }) {
3345
- return /* @__PURE__ */ jsx6("tr", { children: /* @__PURE__ */ jsx6(
3704
+ return /* @__PURE__ */ jsx7("tr", { children: /* @__PURE__ */ jsx7(
3346
3705
  "td",
3347
3706
  {
3348
3707
  colSpan: columnCount,
@@ -3400,7 +3759,7 @@ function DataTable({
3400
3759
  [rowContextValue, classNames]
3401
3760
  );
3402
3761
  if (isPending) {
3403
- return /* @__PURE__ */ jsx6(
3762
+ return /* @__PURE__ */ jsx7(
3404
3763
  PendingSlot,
3405
3764
  {
3406
3765
  loadingText,
@@ -3409,7 +3768,7 @@ function DataTable({
3409
3768
  }
3410
3769
  );
3411
3770
  }
3412
- return /* @__PURE__ */ jsxs5(
3771
+ return /* @__PURE__ */ jsxs6(
3413
3772
  "div",
3414
3773
  {
3415
3774
  ref: rootRef,
@@ -3423,7 +3782,7 @@ function DataTable({
3423
3782
  className
3424
3783
  ),
3425
3784
  children: [
3426
- /* @__PURE__ */ jsx6(
3785
+ /* @__PURE__ */ jsx7(
3427
3786
  ToolbarSlot,
3428
3787
  {
3429
3788
  filteredCount: filteredCount ?? tableData.length,
@@ -3435,7 +3794,7 @@ function DataTable({
3435
3794
  classNames
3436
3795
  }
3437
3796
  ),
3438
- enableInlineSearch ? /* @__PURE__ */ jsx6(
3797
+ enableInlineSearch ? /* @__PURE__ */ jsx7(
3439
3798
  DataTableSearch,
3440
3799
  {
3441
3800
  showSearch: inlineSearch.showSearch,
@@ -3457,14 +3816,14 @@ function DataTable({
3457
3816
  onPrevious: inlineSearch.goToPrevious
3458
3817
  }
3459
3818
  ) : null,
3460
- /* @__PURE__ */ jsx6(ScrollSlot, { scrollRef, className: classNames?.scroll, children: /* @__PURE__ */ jsxs5(
3819
+ /* @__PURE__ */ jsx7(ScrollSlot, { scrollRef, className: classNames?.scroll, children: /* @__PURE__ */ jsxs6(
3461
3820
  "table",
3462
3821
  {
3463
3822
  className: cn("data-table", classNames?.table),
3464
3823
  style: enableColumnResize ? { width: table.getTotalSize() } : void 0,
3465
3824
  onDragStart: enableCellSelection ? (event) => event.preventDefault() : void 0,
3466
3825
  children: [
3467
- /* @__PURE__ */ jsx6("thead", { className: cn("data-table-head", classNames?.head), children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx6(
3826
+ /* @__PURE__ */ jsx7("thead", { className: cn("data-table-head", classNames?.head), children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx7(
3468
3827
  "tr",
3469
3828
  {
3470
3829
  className: cn("data-table-head-row", classNames?.headRow),
@@ -3476,7 +3835,7 @@ function DataTable({
3476
3835
  force: enableColumnResize,
3477
3836
  lockMax: enableColumnResize
3478
3837
  });
3479
- const freezeOffset = enableColumnFreeze ? freezeOffsets.get(header.column.id) : void 0;
3838
+ const freezeOffset = enableColumnFreeze ? resolveHeaderFreezeOffset(header.column, freezeOffsets) : void 0;
3480
3839
  const freezeStyle = getColumnFreezeStyle(freezeOffset, {
3481
3840
  isHeader: true,
3482
3841
  headerTop: header.depth * DATA_TABLE_HEADER_ROW_HEIGHT
@@ -3485,7 +3844,7 @@ function DataTable({
3485
3844
  ...sizeStyle,
3486
3845
  ...freezeStyle
3487
3846
  };
3488
- return /* @__PURE__ */ jsxs5(
3847
+ return /* @__PURE__ */ jsxs6(
3489
3848
  "th",
3490
3849
  {
3491
3850
  colSpan: header.colSpan,
@@ -3502,8 +3861,11 @@ function DataTable({
3502
3861
  headerClassName
3503
3862
  ),
3504
3863
  children: [
3505
- header.isPlaceholder ? null : flexRender2(header.column.columnDef.header, header.getContext()),
3506
- canResize ? /* @__PURE__ */ jsx6(
3864
+ header.isPlaceholder ? null : flexRender2(
3865
+ header.column.columnDef.header,
3866
+ header.getContext()
3867
+ ),
3868
+ canResize ? /* @__PURE__ */ jsx7(
3507
3869
  "div",
3508
3870
  {
3509
3871
  role: "separator",
@@ -3529,20 +3891,20 @@ function DataTable({
3529
3891
  },
3530
3892
  headerGroup.id
3531
3893
  )) }),
3532
- /* @__PURE__ */ jsx6(DataTableContextProvider, { value: contextValue, children: /* @__PURE__ */ jsx6(
3894
+ /* @__PURE__ */ jsx7(DataTableContextProvider, { value: contextValue, children: /* @__PURE__ */ jsx7(
3533
3895
  "tbody",
3534
3896
  {
3535
3897
  onMouseLeave: clearHover,
3536
3898
  className: cn("data-table-body", classNames?.body),
3537
- children: rows.length === 0 ? /* @__PURE__ */ jsx6(
3899
+ children: rows.length === 0 ? /* @__PURE__ */ jsx7(
3538
3900
  EmptySlot,
3539
3901
  {
3540
3902
  emptyText,
3541
3903
  columnCount,
3542
3904
  classNames
3543
3905
  }
3544
- ) : shouldVirtualize ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
3545
- paddingTop > 0 && /* @__PURE__ */ jsx6(
3906
+ ) : shouldVirtualize ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
3907
+ paddingTop > 0 && /* @__PURE__ */ jsx7(
3546
3908
  "tr",
3547
3909
  {
3548
3910
  "aria-hidden": true,
@@ -3550,7 +3912,7 @@ function DataTable({
3550
3912
  "data-table-virtual-spacer",
3551
3913
  classNames?.virtualSpacer
3552
3914
  ),
3553
- children: /* @__PURE__ */ jsx6(
3915
+ children: /* @__PURE__ */ jsx7(
3554
3916
  "td",
3555
3917
  {
3556
3918
  colSpan: columnCount,
@@ -3566,7 +3928,7 @@ function DataTable({
3566
3928
  virtualRows.map((virtualRow) => {
3567
3929
  const row = rows[virtualRow.index];
3568
3930
  if (!row) return null;
3569
- return /* @__PURE__ */ jsx6(
3931
+ return /* @__PURE__ */ jsx7(
3570
3932
  RowSlot,
3571
3933
  {
3572
3934
  row,
@@ -3577,7 +3939,7 @@ function DataTable({
3577
3939
  row.id
3578
3940
  );
3579
3941
  }),
3580
- paddingBottom > 0 && /* @__PURE__ */ jsx6(
3942
+ paddingBottom > 0 && /* @__PURE__ */ jsx7(
3581
3943
  "tr",
3582
3944
  {
3583
3945
  "aria-hidden": true,
@@ -3585,7 +3947,7 @@ function DataTable({
3585
3947
  "data-table-virtual-spacer",
3586
3948
  classNames?.virtualSpacer
3587
3949
  ),
3588
- children: /* @__PURE__ */ jsx6(
3950
+ children: /* @__PURE__ */ jsx7(
3589
3951
  "td",
3590
3952
  {
3591
3953
  colSpan: columnCount,
@@ -3598,7 +3960,7 @@ function DataTable({
3598
3960
  )
3599
3961
  }
3600
3962
  )
3601
- ] }) : rows.map((row) => /* @__PURE__ */ jsx6(
3963
+ ] }) : rows.map((row) => /* @__PURE__ */ jsx7(
3602
3964
  RowSlot,
3603
3965
  {
3604
3966
  row,
@@ -3617,10 +3979,10 @@ function DataTable({
3617
3979
  }
3618
3980
 
3619
3981
  // src/components/ui/table/components/Table/Table.tsx
3620
- import { useCallback as useCallback5, useMemo as useMemo5, useState as useState5 } from "react";
3982
+ import { useCallback as useCallback6, useMemo as useMemo5, useState as useState5 } from "react";
3621
3983
 
3622
3984
  // src/components/ui/table/components/Table/buildColumnDef.tsx
3623
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
3985
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
3624
3986
  function SortableHeader({
3625
3987
  label,
3626
3988
  field,
@@ -3629,15 +3991,18 @@ function SortableHeader({
3629
3991
  }) {
3630
3992
  const isActive = sort?.field === field;
3631
3993
  const Icon = isActive ? sort.direction === "asc" ? ArrowUp : ArrowDown : ArrowUpDown;
3632
- return /* @__PURE__ */ jsxs6(
3994
+ return /* @__PURE__ */ jsxs7(
3633
3995
  "button",
3634
3996
  {
3635
3997
  type: "button",
3636
- className: cn("SortableHeaderJSX", isActive ? "is-active" : "is-inactive"),
3998
+ className: cn(
3999
+ "SortableHeaderJSX",
4000
+ isActive ? "is-active" : "is-inactive"
4001
+ ),
3637
4002
  onClick: () => onSort(field),
3638
4003
  children: [
3639
- /* @__PURE__ */ jsx7("span", { children: label }),
3640
- /* @__PURE__ */ jsx7(Icon, { className: "sortable-header-icon" })
4004
+ /* @__PURE__ */ jsx8("span", { children: label }),
4005
+ /* @__PURE__ */ jsx8(Icon, { className: "sortable-header-icon" })
3641
4006
  ]
3642
4007
  }
3643
4008
  );
@@ -3659,6 +4024,8 @@ function buildColumnDef(props, sort, onSort) {
3659
4024
  editable,
3660
4025
  editType,
3661
4026
  editInputProps,
4027
+ kind,
4028
+ cellProps,
3662
4029
  className,
3663
4030
  headerClassName,
3664
4031
  render
@@ -3670,18 +4037,20 @@ function buildColumnDef(props, sort, onSort) {
3670
4037
  ...minWidth != null ? { minSize: minWidth } : {},
3671
4038
  ...maxWidth != null ? { maxSize: maxWidth } : {},
3672
4039
  ...resizable === false ? { enableResizing: false } : {},
3673
- header: sortable ? () => /* @__PURE__ */ jsx7(SortableHeader, { label: children, field, sort, onSort }) : (
4040
+ header: sortable ? () => /* @__PURE__ */ jsx8(
4041
+ SortableHeader,
4042
+ {
4043
+ label: children,
4044
+ field,
4045
+ sort,
4046
+ onSort
4047
+ }
4048
+ ) : (
3674
4049
  // eslint-disable-next-line @typescript-eslint/promise-function-async
3675
4050
  () => children
3676
4051
  ),
3677
- ...render ? {
3678
- // eslint-disable-next-line @typescript-eslint/promise-function-async
3679
- cell: ({ row, getValue }) => render(
3680
- getValue(),
3681
- row,
3682
- row.index
3683
- )
3684
- } : {},
4052
+ // eslint-disable-next-line @typescript-eslint/promise-function-async
4053
+ cell: (info) => /* @__PURE__ */ jsx8(ResolvedTableCell, { info }),
3685
4054
  meta: {
3686
4055
  align,
3687
4056
  rowSpan,
@@ -3689,6 +4058,9 @@ function buildColumnDef(props, sort, onSort) {
3689
4058
  editable,
3690
4059
  editType,
3691
4060
  editInputProps,
4061
+ kind,
4062
+ cellProps,
4063
+ cellRender: render,
3692
4064
  frozen,
3693
4065
  className,
3694
4066
  headerClassName
@@ -3711,10 +4083,8 @@ function buildColumnDefsFromTree(nodes, sort, onSort) {
3711
4083
  const { header, align, headerClassName } = node.props;
3712
4084
  return {
3713
4085
  id: resolveGroupId(node.props, index),
3714
- header: (
3715
- // eslint-disable-next-line @typescript-eslint/promise-function-async
3716
- () => header
3717
- ),
4086
+ // eslint-disable-next-line @typescript-eslint/promise-function-async
4087
+ header: () => header,
3718
4088
  columns: childDefs,
3719
4089
  enableResizing: false,
3720
4090
  meta: {
@@ -3881,7 +4251,7 @@ function TableHeader(props) {
3881
4251
  TableHeader.displayName = TABLE_HEADER_DISPLAY_NAME;
3882
4252
 
3883
4253
  // src/components/ui/table/components/Table/TablePagination.tsx
3884
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
4254
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
3885
4255
  function TablePagination({
3886
4256
  page,
3887
4257
  pageSize = 10,
@@ -3893,8 +4263,8 @@ function TablePagination({
3893
4263
  const safePage = Math.min(Math.max(1, page), totalPages);
3894
4264
  const canGoPrev = safePage > 1;
3895
4265
  const canGoNext = safePage < totalPages;
3896
- return /* @__PURE__ */ jsxs7("div", { className: cn("TablePaginationJSX", className), children: [
3897
- /* @__PURE__ */ jsx8(
4266
+ return /* @__PURE__ */ jsxs8("div", { className: cn("TablePaginationJSX", className), children: [
4267
+ /* @__PURE__ */ jsx9(
3898
4268
  "button",
3899
4269
  {
3900
4270
  type: "button",
@@ -3902,15 +4272,15 @@ function TablePagination({
3902
4272
  disabled: !canGoPrev,
3903
4273
  onClick: () => onChange(safePage - 1),
3904
4274
  "aria-label": "Previous page",
3905
- children: /* @__PURE__ */ jsx8(ChevronLeft, { className: "pagination-button-icon" })
4275
+ children: /* @__PURE__ */ jsx9(ChevronLeft, { className: "pagination-button-icon" })
3906
4276
  }
3907
4277
  ),
3908
- /* @__PURE__ */ jsxs7("span", { className: "pagination-label", children: [
4278
+ /* @__PURE__ */ jsxs8("span", { className: "pagination-label", children: [
3909
4279
  safePage,
3910
4280
  " / ",
3911
4281
  totalPages
3912
4282
  ] }),
3913
- /* @__PURE__ */ jsx8(
4283
+ /* @__PURE__ */ jsx9(
3914
4284
  "button",
3915
4285
  {
3916
4286
  type: "button",
@@ -3918,7 +4288,7 @@ function TablePagination({
3918
4288
  disabled: !canGoNext,
3919
4289
  onClick: () => onChange(safePage + 1),
3920
4290
  "aria-label": "Next page",
3921
- children: /* @__PURE__ */ jsx8(ChevronRight, { className: "pagination-button-icon" })
4291
+ children: /* @__PURE__ */ jsx9(ChevronRight, { className: "pagination-button-icon" })
3922
4292
  }
3923
4293
  )
3924
4294
  ] });
@@ -3926,7 +4296,7 @@ function TablePagination({
3926
4296
  TablePagination.displayName = TABLE_PAGINATION_DISPLAY_NAME;
3927
4297
 
3928
4298
  // src/components/ui/table/components/Table/Table.tsx
3929
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
4299
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
3930
4300
  function TableRoot({
3931
4301
  data,
3932
4302
  children,
@@ -3940,7 +4310,7 @@ function TableRoot({
3940
4310
  [children]
3941
4311
  );
3942
4312
  const [sort, setSort] = useState5(null);
3943
- const handleSort = useCallback5((field) => {
4313
+ const handleSort = useCallback6((field) => {
3944
4314
  setSort((previous) => {
3945
4315
  if (previous?.field !== field) {
3946
4316
  return { field, direction: "asc" };
@@ -3968,8 +4338,8 @@ function TableRoot({
3968
4338
  if (countLeafColumns(columnTree) === 0) {
3969
4339
  console.warn("[Table] Declare at least one Table.Column inside Table.Header.");
3970
4340
  }
3971
- return /* @__PURE__ */ jsxs8("div", { className: "TableJSX", children: [
3972
- /* @__PURE__ */ jsx9(
4341
+ return /* @__PURE__ */ jsxs9("div", { className: "TableJSX", children: [
4342
+ /* @__PURE__ */ jsx10(
3973
4343
  DataTable,
3974
4344
  {
3975
4345
  ...dataTableProps,
@@ -3980,7 +4350,7 @@ function TableRoot({
3980
4350
  className: cn(className, paginationProps && "DataTableJSX--with-pagination")
3981
4351
  }
3982
4352
  ),
3983
- paginationProps && /* @__PURE__ */ jsx9(
4353
+ paginationProps && /* @__PURE__ */ jsx10(
3984
4354
  TablePagination,
3985
4355
  {
3986
4356
  page,
@@ -4005,7 +4375,7 @@ function createTable() {
4005
4375
  ColumnGroup.displayName = TABLE_COLUMN_GROUP_DISPLAY_NAME;
4006
4376
  return Object.assign(
4007
4377
  function BoundTable(props) {
4008
- return /* @__PURE__ */ jsx9(TableRoot, { ...props });
4378
+ return /* @__PURE__ */ jsx10(TableRoot, { ...props });
4009
4379
  },
4010
4380
  {
4011
4381
  Header: TableHeader,
@@ -4024,6 +4394,7 @@ var Table = Object.assign(TableRoot, {
4024
4394
  Pagination: TablePagination
4025
4395
  });
4026
4396
  export {
4397
+ BUILTIN_CELL_RENDERERS,
4027
4398
  CELL_SELECTION_EDGES_CLASS,
4028
4399
  DEFAULT_DATA_TABLE_LABELS,
4029
4400
  DEFAULT_TREE_CHILDREN_FIELD,
@@ -4032,6 +4403,7 @@ export {
4032
4403
  DEFAULT_TREE_QTY_FIELD,
4033
4404
  DataTable,
4034
4405
  INLINE_SEARCH_MAX_RESULTS,
4406
+ ResolvedTableCell,
4035
4407
  Table,
4036
4408
  applyCellEdit,
4037
4409
  applyFillData,
@@ -4051,10 +4423,14 @@ export {
4051
4423
  collectFillChanges,
4052
4424
  collectRowSpanColumns,
4053
4425
  collectSearchMatchesInRange,
4426
+ commitCellValue,
4427
+ createCellRendererRegistry,
4054
4428
  createSearchRegex,
4055
4429
  createTable,
4056
4430
  escapeSearchRegex,
4057
4431
  flattenSubtreeRows,
4432
+ formatCellValue,
4433
+ formatDefaultCellValue,
4058
4434
  formatSearchResultLabel,
4059
4435
  getCellEditDraftValue,
4060
4436
  getCellSelectionEdgeStyle,
@@ -4076,8 +4452,10 @@ export {
4076
4452
  parseClipboardTSV,
4077
4453
  parseClipboardTSVWithDepths,
4078
4454
  previousSearchIndex,
4455
+ resolveCellRenderer,
4079
4456
  resolveColumnFreezeSide,
4080
4457
  resolveDataTableLabels,
4458
+ resolveHeaderFreezeOffset,
4081
4459
  resolvePasteColumnIds,
4082
4460
  resolveRowSelection,
4083
4461
  resolveRowSpanAt,