@ai-matrx/design-system 0.21.1 → 0.21.2

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,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { g as MatrxDataTableProps, h as TableViewSnapshot } from '../types-B99KFITZ.cjs';
4
- export { A as AnyOfColumnSearch, i as CellEditType, j as CellEditsMap, e as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, f as MatrxDataTableCopyConfig, c as MatrxDataTableDensity, k as MatrxDataTableDetailConfig, l as MatrxDataTableEditConfig, m as MatrxDataTableEmptyState, n as MatrxDataTableFilterUi, o as MatrxDataTableHierarchyConfig, p as MatrxDataTableHierarchyMove, q as MatrxDataTableMobileCardControls, r as MatrxDataTableQueryControl, d as MatrxDataTableQueryState, s as MatrxDataTableRecordControls, t as MatrxDataTableSelectionConfig, u as MatrxDataTableSourceProcessing, v as MatrxDataTableToolbar, w as MatrxDataTableUrlStateConfig, x as MatrxDataTableWindowConfig, y as MatrxTablePagination, z as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, B as TableViewQuery, D as TextFilterMode, E as ToolbarFacet } from '../types-B99KFITZ.cjs';
3
+ import { g as MatrxDataTableProps, h as TableViewSnapshot } from '../types-Bt-0UhEw.cjs';
4
+ export { A as AnyOfColumnSearch, i as CellEditType, j as CellEditsMap, e as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, f as MatrxDataTableCopyConfig, c as MatrxDataTableDensity, k as MatrxDataTableDetailConfig, l as MatrxDataTableEditConfig, m as MatrxDataTableEmptyState, n as MatrxDataTableFilterUi, o as MatrxDataTableHierarchyConfig, p as MatrxDataTableHierarchyMove, q as MatrxDataTableMobileCardControls, r as MatrxDataTableQueryControl, d as MatrxDataTableQueryState, s as MatrxDataTableRecordControls, t as MatrxDataTableSelectionConfig, u as MatrxDataTableSourceProcessing, v as MatrxDataTableToolbar, w as MatrxDataTableUrlStateConfig, x as MatrxDataTableWindowConfig, y as MatrxTablePagination, z as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, B as TableViewQuery, D as TextFilterMode, E as ToolbarFacet } from '../types-Bt-0UhEw.cjs';
5
5
  export { MatrxDataTableHost, MatrxDataTableProvider, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost } from './host.cjs';
6
6
  export { DataRowInspector } from './data-row-inspector.cjs';
7
7
  export { DataRowWindow, DataRowWindowProps, DataRowWindowTab } from './data-row-window.cjs';
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { g as MatrxDataTableProps, h as TableViewSnapshot } from '../types-CryQuMmz.js';
4
- export { A as AnyOfColumnSearch, i as CellEditType, j as CellEditsMap, e as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, f as MatrxDataTableCopyConfig, c as MatrxDataTableDensity, k as MatrxDataTableDetailConfig, l as MatrxDataTableEditConfig, m as MatrxDataTableEmptyState, n as MatrxDataTableFilterUi, o as MatrxDataTableHierarchyConfig, p as MatrxDataTableHierarchyMove, q as MatrxDataTableMobileCardControls, r as MatrxDataTableQueryControl, d as MatrxDataTableQueryState, s as MatrxDataTableRecordControls, t as MatrxDataTableSelectionConfig, u as MatrxDataTableSourceProcessing, v as MatrxDataTableToolbar, w as MatrxDataTableUrlStateConfig, x as MatrxDataTableWindowConfig, y as MatrxTablePagination, z as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, B as TableViewQuery, D as TextFilterMode, E as ToolbarFacet } from '../types-CryQuMmz.js';
3
+ import { g as MatrxDataTableProps, h as TableViewSnapshot } from '../types-DnnvjGV4.js';
4
+ export { A as AnyOfColumnSearch, i as CellEditType, j as CellEditsMap, e as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, f as MatrxDataTableCopyConfig, c as MatrxDataTableDensity, k as MatrxDataTableDetailConfig, l as MatrxDataTableEditConfig, m as MatrxDataTableEmptyState, n as MatrxDataTableFilterUi, o as MatrxDataTableHierarchyConfig, p as MatrxDataTableHierarchyMove, q as MatrxDataTableMobileCardControls, r as MatrxDataTableQueryControl, d as MatrxDataTableQueryState, s as MatrxDataTableRecordControls, t as MatrxDataTableSelectionConfig, u as MatrxDataTableSourceProcessing, v as MatrxDataTableToolbar, w as MatrxDataTableUrlStateConfig, x as MatrxDataTableWindowConfig, y as MatrxTablePagination, z as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, B as TableViewQuery, D as TextFilterMode, E as ToolbarFacet } from '../types-DnnvjGV4.js';
5
5
  export { MatrxDataTableHost, MatrxDataTableProvider, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost } from './host.js';
6
6
  export { DataRowInspector } from './data-row-inspector.js';
7
7
  export { DataRowWindow, DataRowWindowProps, DataRowWindowTab } from './data-row-window.js';
@@ -8561,6 +8561,7 @@ function MatrxDataTableCore({
8561
8561
  localPagination,
8562
8562
  pageSizeOptions = [10, 25, 50, 100, 200, 500, 1e3, 2e3],
8563
8563
  zebra = true,
8564
+ stickyHeader = true,
8564
8565
  className,
8565
8566
  tableClassName,
8566
8567
  mobileCards,
@@ -8811,7 +8812,10 @@ function MatrxDataTableCore({
8811
8812
  ]);
8812
8813
  const scrollRef = useRef11(null);
8813
8814
  const tableRef = useRef11(null);
8815
+ const tableHeaderRef = useRef11(null);
8814
8816
  const cardsScrollRef = useRef11(null);
8817
+ const [documentStickyHeader, setDocumentStickyHeader] = useState20(false);
8818
+ const documentStickyHeaderRef = useRef11(false);
8815
8819
  const previousAppendKeyForScrollReset = useRef11(appendQueryKey);
8816
8820
  useLayoutEffect2(() => {
8817
8821
  const previous = previousAppendKeyForScrollReset.current;
@@ -8873,6 +8877,65 @@ function MatrxDataTableCore({
8873
8877
  observer?.disconnect();
8874
8878
  };
8875
8879
  }, [updateScrollHint, data, columns]);
8880
+ useLayoutEffect2(() => {
8881
+ const scroll = scrollRef.current;
8882
+ const table = tableRef.current;
8883
+ const header = tableHeaderRef.current;
8884
+ if (!scroll || !table || !header || !stickyHeader) return;
8885
+ let frame = 0;
8886
+ const update = () => {
8887
+ const hasInternalVerticalScroll = scroll.scrollHeight > scroll.clientHeight + 1;
8888
+ const nextDocumentSticky = !hasInternalVerticalScroll;
8889
+ if (documentStickyHeaderRef.current !== nextDocumentSticky) {
8890
+ documentStickyHeaderRef.current = nextDocumentSticky;
8891
+ setDocumentStickyHeader(nextDocumentSticky);
8892
+ }
8893
+ if (!nextDocumentSticky) {
8894
+ header.style.setProperty("--matrx-document-sticky-offset", "0px");
8895
+ return;
8896
+ }
8897
+ const previousOffset = Number.parseFloat(
8898
+ header.style.getPropertyValue("--matrx-document-sticky-offset")
8899
+ ) || 0;
8900
+ const headerRect = header.getBoundingClientRect();
8901
+ const naturalHeaderTop = headerRect.top - previousOffset;
8902
+ const tableRect = table.getBoundingClientRect();
8903
+ let scrollTargetTop = 0;
8904
+ for (let ancestor = scroll.parentElement; ancestor; ancestor = ancestor.parentElement) {
8905
+ const ancestorStyle = window.getComputedStyle(ancestor);
8906
+ const overflowY = ancestorStyle.overflowY;
8907
+ if (/^(auto|scroll|overlay)$/.test(overflowY) && ancestor.scrollHeight > ancestor.clientHeight + 1) {
8908
+ const scrollPaddingTop = Number.parseFloat(ancestorStyle.scrollPaddingTop) || 0;
8909
+ scrollTargetTop = ancestor.getBoundingClientRect().top + scrollPaddingTop;
8910
+ break;
8911
+ }
8912
+ }
8913
+ const offset = Math.max(
8914
+ 0,
8915
+ Math.min(
8916
+ scrollTargetTop - naturalHeaderTop,
8917
+ tableRect.bottom - headerRect.height - naturalHeaderTop
8918
+ )
8919
+ );
8920
+ header.style.setProperty("--matrx-document-sticky-offset", `${offset}px`);
8921
+ };
8922
+ const requestUpdate = () => {
8923
+ cancelAnimationFrame(frame);
8924
+ frame = requestAnimationFrame(update);
8925
+ };
8926
+ const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(requestUpdate);
8927
+ resizeObserver?.observe(scroll);
8928
+ resizeObserver?.observe(table);
8929
+ window.addEventListener("scroll", requestUpdate, true);
8930
+ window.addEventListener("resize", requestUpdate);
8931
+ requestUpdate();
8932
+ return () => {
8933
+ cancelAnimationFrame(frame);
8934
+ resizeObserver?.disconnect();
8935
+ window.removeEventListener("scroll", requestUpdate, true);
8936
+ window.removeEventListener("resize", requestUpdate);
8937
+ };
8938
+ }, [stickyHeader, data, columns]);
8876
8939
  const [columnOrder, setColumnOrder] = useState20(() => columnState?.order ?? columns.map(columnId));
8877
8940
  const [hiddenColumnIds, setHiddenColumnIds] = useState20(
8878
8941
  () => new Set(columnState?.hidden ?? columns.filter((column) => column.hidden).map(columnId))
@@ -10250,7 +10313,7 @@ function MatrxDataTableCore({
10250
10313
  "aria-busy": isLoading || isFetching,
10251
10314
  ...appendQuery === null ? {} : { style: { containerType: "inline-size" } },
10252
10315
  className: cn(
10253
- "flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
10316
+ "relative flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
10254
10317
  mobileCardsClass
10255
10318
  ),
10256
10319
  children: [
@@ -10258,7 +10321,7 @@ function MatrxDataTableCore({
10258
10321
  "div",
10259
10322
  {
10260
10323
  role: "status",
10261
- className: "h-0.5 shrink-0 overflow-hidden rounded-full bg-primary/15",
10324
+ className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
10262
10325
  children: [
10263
10326
  /* @__PURE__ */ jsx40("div", { className: "h-full w-full animate-pulse bg-primary" }),
10264
10327
  /* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Refreshing table data" })
@@ -10380,7 +10443,7 @@ function MatrxDataTableCore({
10380
10443
  "div",
10381
10444
  {
10382
10445
  role: "status",
10383
- className: "sticky left-0 top-0 z-20 h-0.5 w-full overflow-hidden bg-primary/15",
10446
+ className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
10384
10447
  children: [
10385
10448
  /* @__PURE__ */ jsx40("div", { className: "h-full w-full animate-pulse bg-primary" }),
10386
10449
  /* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Refreshing table data" })
@@ -10405,142 +10468,153 @@ function MatrxDataTableCore({
10405
10468
  fixedLayoutActive && "sm:table-fixed sm:max-w-none sm:w-[var(--matrx-resized-table-width)]"
10406
10469
  ),
10407
10470
  children: [
10408
- /* @__PURE__ */ jsx40("thead", { className: "sticky top-0 z-10 border-b border-border bg-muted/90 shadow-[0_1px_0_0_var(--border)] backdrop-blur-sm", children: /* @__PURE__ */ jsxs30("tr", { children: [
10409
- selection ? /* @__PURE__ */ jsx40(
10410
- "th",
10411
- {
10412
- "data-matrx-table-selection-column": true,
10413
- className: "h-9 w-9 px-2 text-left align-middle",
10414
- style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
10415
- children: /* @__PURE__ */ jsx40(
10416
- "div",
10471
+ /* @__PURE__ */ jsx40(
10472
+ "thead",
10473
+ {
10474
+ ref: tableHeaderRef,
10475
+ "data-matrx-table-sticky-header": stickyHeader ? "true" : void 0,
10476
+ className: cn(
10477
+ "z-10 border-b border-border bg-muted/90 shadow-[0_1px_0_0_var(--border)] backdrop-blur-sm",
10478
+ stickyHeader && (documentStickyHeader ? "relative translate-y-[var(--matrx-document-sticky-offset)]" : "sticky top-0")
10479
+ ),
10480
+ children: /* @__PURE__ */ jsxs30("tr", { children: [
10481
+ selection ? /* @__PURE__ */ jsx40(
10482
+ "th",
10417
10483
  {
10418
- "data-matrx-table-selection-target": true,
10419
- onClick: (event) => {
10420
- if (event.target === event.currentTarget) {
10421
- event.currentTarget.querySelector('[role="checkbox"]')?.click();
10422
- }
10423
- },
10484
+ "data-matrx-table-selection-column": true,
10485
+ className: "h-9 w-9 px-2 text-left align-middle",
10486
+ style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
10424
10487
  children: /* @__PURE__ */ jsx40(
10425
- Checkbox,
10488
+ "div",
10426
10489
  {
10427
- className: CHECKBOX_TAP_AREA,
10428
- checked: allOnPageSelected ? true : someOnPageSelected ? "indeterminate" : false,
10429
- disabled: selectableRows.length === 0,
10430
- onCheckedChange: toggleAllOnPage,
10431
- "aria-label": allOnPageSelected ? "Clear selection on this page" : "Select every row on this page"
10490
+ "data-matrx-table-selection-target": true,
10491
+ onClick: (event) => {
10492
+ if (event.target === event.currentTarget) {
10493
+ event.currentTarget.querySelector('[role="checkbox"]')?.click();
10494
+ }
10495
+ },
10496
+ children: /* @__PURE__ */ jsx40(
10497
+ Checkbox,
10498
+ {
10499
+ className: CHECKBOX_TAP_AREA,
10500
+ checked: allOnPageSelected ? true : someOnPageSelected ? "indeterminate" : false,
10501
+ disabled: selectableRows.length === 0,
10502
+ onCheckedChange: toggleAllOnPage,
10503
+ "aria-label": allOnPageSelected ? "Clear selection on this page" : "Select every row on this page"
10504
+ }
10505
+ )
10432
10506
  }
10433
10507
  )
10434
10508
  }
10435
- )
10436
- }
10437
- ) : null,
10438
- visibleColumns.map((col) => {
10439
- const id = columnId(col);
10440
- const meta = filterMeta.get(id);
10441
- const isSorted = sort?.id === id;
10442
- const headerLabel = col.label ?? (typeof col.header === "string" ? col.header : id);
10443
- const defaultSortDirection = col.defaultSortDirection ?? "asc";
10444
- const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
10445
- const columnResizable = resizableColumns && col.resizable !== false;
10446
- return /* @__PURE__ */ jsxs30(
10447
- "th",
10448
- {
10449
- "data-matrx-table-column-id": id,
10450
- "data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
10451
- "aria-sort": isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : void 0,
10452
- className: cn(
10453
- "relative h-9 text-left align-middle max-sm:whitespace-nowrap",
10454
- // ICON COLUMN (MatrxColumnDef.compact): a 40px star
10455
- // column cannot honor `width: 40` while paying 16px of
10456
- // padding for a 14px glyph.
10457
- col.compact ? "px-1" : "px-2",
10458
- // An intentional mobile column set (see
10459
- // MatrxColumnDef.mobileHidden). CSS, not a JS
10460
- // breakpoint — no hydration mismatch, and the column
10461
- // stays sortable/filterable from the toolbar.
10462
- col.mobileHidden && "max-sm:hidden",
10463
- // Consumer widths are desktop tuning: applied from `sm`
10464
- // up via a CSS var. The minimum is load-bearing: without
10465
- // it, a crowded table crushes a declared 190px column to a
10466
- // few characters wide instead of using the canonical
10467
- // horizontal-scroll surface.
10468
- (col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10469
- col.headerClassName,
10470
- isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10471
- col.align === "center" && "text-center",
10472
- col.align === "right" && "text-right"
10473
- ),
10474
- style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
10475
- children: [
10476
- /* @__PURE__ */ jsx40(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ jsx40(
10477
- ColumnHeaderCell,
10478
- {
10479
- label: col.header,
10480
- labelText: headerLabel,
10481
- sortable: col.sortable !== false,
10482
- isSorted: Boolean(isSorted),
10483
- sortDirection: sort?.direction ?? defaultSortDirection,
10484
- onSortAsc: () => setSort({ id, direction: "asc" }),
10485
- onSortDesc: () => setSort({ id, direction: "desc" }),
10486
- onClearSort: () => setSort(null),
10487
- onHeaderSortClick: () => {
10488
- if (!isSorted) {
10489
- setSort({ id, direction: defaultSortDirection });
10490
- return;
10509
+ ) : null,
10510
+ visibleColumns.map((col) => {
10511
+ const id = columnId(col);
10512
+ const meta = filterMeta.get(id);
10513
+ const isSorted = sort?.id === id;
10514
+ const headerLabel = col.label ?? (typeof col.header === "string" ? col.header : id);
10515
+ const defaultSortDirection = col.defaultSortDirection ?? "asc";
10516
+ const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
10517
+ const columnResizable = resizableColumns && col.resizable !== false;
10518
+ return /* @__PURE__ */ jsxs30(
10519
+ "th",
10520
+ {
10521
+ "data-matrx-table-column-id": id,
10522
+ "data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
10523
+ "aria-sort": isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : void 0,
10524
+ className: cn(
10525
+ "relative h-9 text-left align-middle max-sm:whitespace-nowrap",
10526
+ // ICON COLUMN (MatrxColumnDef.compact): a 40px star
10527
+ // column cannot honor `width: 40` while paying 16px of
10528
+ // padding for a 14px glyph.
10529
+ col.compact ? "px-1" : "px-2",
10530
+ // An intentional mobile column set (see
10531
+ // MatrxColumnDef.mobileHidden). CSS, not a JS
10532
+ // breakpoint — no hydration mismatch, and the column
10533
+ // stays sortable/filterable from the toolbar.
10534
+ col.mobileHidden && "max-sm:hidden",
10535
+ // Consumer widths are desktop tuning: applied from `sm`
10536
+ // up via a CSS var. The minimum is load-bearing: without
10537
+ // it, a crowded table crushes a declared 190px column to a
10538
+ // few characters wide instead of using the canonical
10539
+ // horizontal-scroll surface.
10540
+ (col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10541
+ col.headerClassName,
10542
+ isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10543
+ col.align === "center" && "text-center",
10544
+ col.align === "right" && "text-right"
10545
+ ),
10546
+ style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
10547
+ children: [
10548
+ /* @__PURE__ */ jsx40(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ jsx40(
10549
+ ColumnHeaderCell,
10550
+ {
10551
+ label: col.header,
10552
+ labelText: headerLabel,
10553
+ sortable: col.sortable !== false,
10554
+ isSorted: Boolean(isSorted),
10555
+ sortDirection: sort?.direction ?? defaultSortDirection,
10556
+ onSortAsc: () => setSort({ id, direction: "asc" }),
10557
+ onSortDesc: () => setSort({ id, direction: "desc" }),
10558
+ onClearSort: () => setSort(null),
10559
+ onHeaderSortClick: () => {
10560
+ if (!isSorted) {
10561
+ setSort({ id, direction: defaultSortDirection });
10562
+ return;
10563
+ }
10564
+ if (sort?.direction === "asc") {
10565
+ setSort({ id, direction: "desc" });
10566
+ return;
10567
+ }
10568
+ setSort({ id, direction: "asc" });
10569
+ },
10570
+ filterKind: meta?.kind ?? null,
10571
+ filterValue: columnFilters[id],
10572
+ onFilterChange: (next) => setColumnFilter(id, next),
10573
+ selectOptions: meta?.options,
10574
+ selectSingle: col.filterSingle,
10575
+ filterApplyLabel: filterUi?.applyLabel,
10576
+ filterShowCancel: filterUi?.showCancel,
10577
+ filterFooterHint: filterUi?.footerHint,
10578
+ allowNegation: filterUi?.allowNegation,
10579
+ allowNullModes: filterUi?.allowNullModes,
10580
+ align: col.align,
10581
+ compact: col.compact,
10582
+ reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
10491
10583
  }
10492
- if (sort?.direction === "asc") {
10493
- setSort({ id, direction: "desc" });
10494
- return;
10584
+ ) }),
10585
+ columnResizable ? /* @__PURE__ */ jsx40(
10586
+ ColumnResizeHandle,
10587
+ {
10588
+ columnId: id,
10589
+ label: headerLabel,
10590
+ tableRef,
10591
+ minWidth: col.minWidth,
10592
+ maxWidth: col.maxWidth,
10593
+ onResizeStart: captureResizeGestureSnapshot,
10594
+ onResizeCancel: clearResizeGestureSnapshot,
10595
+ onResizeCommit: (columnId2, width) => commitColumnWidths(
10596
+ { ...effectiveColumnWidths, [columnId2]: width },
10597
+ true
10598
+ )
10495
10599
  }
10496
- setSort({ id, direction: "asc" });
10497
- },
10498
- filterKind: meta?.kind ?? null,
10499
- filterValue: columnFilters[id],
10500
- onFilterChange: (next) => setColumnFilter(id, next),
10501
- selectOptions: meta?.options,
10502
- selectSingle: col.filterSingle,
10503
- filterApplyLabel: filterUi?.applyLabel,
10504
- filterShowCancel: filterUi?.showCancel,
10505
- filterFooterHint: filterUi?.footerHint,
10506
- allowNegation: filterUi?.allowNegation,
10507
- allowNullModes: filterUi?.allowNullModes,
10508
- align: col.align,
10509
- compact: col.compact,
10510
- reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
10511
- }
10512
- ) }),
10513
- columnResizable ? /* @__PURE__ */ jsx40(
10514
- ColumnResizeHandle,
10515
- {
10516
- columnId: id,
10517
- label: headerLabel,
10518
- tableRef,
10519
- minWidth: col.minWidth,
10520
- maxWidth: col.maxWidth,
10521
- onResizeStart: captureResizeGestureSnapshot,
10522
- onResizeCancel: clearResizeGestureSnapshot,
10523
- onResizeCommit: (columnId2, width) => commitColumnWidths(
10524
- { ...effectiveColumnWidths, [columnId2]: width },
10525
- true
10526
- )
10527
- }
10528
- ) : null
10529
- ]
10530
- },
10531
- id
10532
- );
10533
- }),
10534
- showActionsCol && /* @__PURE__ */ jsx40(
10535
- "th",
10536
- {
10537
- "data-matrx-table-actions-column": true,
10538
- className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
10539
- style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
10540
- children: "Actions"
10541
- }
10542
- )
10543
- ] }) }),
10600
+ ) : null
10601
+ ]
10602
+ },
10603
+ id
10604
+ );
10605
+ }),
10606
+ showActionsCol && /* @__PURE__ */ jsx40(
10607
+ "th",
10608
+ {
10609
+ "data-matrx-table-actions-column": true,
10610
+ className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
10611
+ style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
10612
+ children: "Actions"
10613
+ }
10614
+ )
10615
+ ] })
10616
+ }
10617
+ ),
10544
10618
  /* @__PURE__ */ jsxs30("tbody", { children: [
10545
10619
  isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs30("tr", { className: "border-b border-border/60", children: [
10546
10620
  selection ? /* @__PURE__ */ jsx40("td", { className: "px-2 py-2", style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth), children: /* @__PURE__ */ jsx40(Skeleton, { className: "h-3.5 w-3.5" }) }) : null,