@ai-matrx/design-system 0.36.0 → 0.37.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.37.1 — 2026-09-23 (0.37.0 was tagged but its dts build failed under TypeScript 6 before the registry; same contents)
4
+
5
+ **Four data-table changes that were on main and never published.** (published by lane
6
+ PUBLISH-SWEEP-4.)
7
+
8
+ * **Keyboard multi-expand restored** — expanded-detail rows open and close from the keyboard in
9
+ the multi-expand arm again (`MatrxDataTable.expanded-detail.test.tsx`).
10
+ * **`coverage.loaded`** — the number of rows loaded from the source BEFORE a host narrows `data`
11
+ with a domain filter; defaults to `data.length`, so a filtered page no longer reports the
12
+ filtered count as what was loaded.
13
+ * **`toolbar.titleCount`** — a source-owned total shown beside the shared title.
14
+ * **`toolbar.customSearch`** — a caller-owned search control in the canonical title-row search
15
+ slot, for a deliberately narrower query contract; it never changes table query state.
16
+
17
+ No consumer action; every addition is optional. Toolchain moved to TypeScript 6.
18
+
3
19
  ## 0.36.0 — 2026-09-23
4
20
 
5
21
  **A press inside a popover a grid cell opened is no longer a press on the cell.** (lane
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.cjs';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-kiV-CAuZ.cjs';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-BuMHbFjs.cjs';
3
3
  import '../content-transfer.cjs';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.js';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-Cxm5XK0L.js';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-B8vwElPz.js';
3
3
  import '../content-transfer.js';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-kiV-CAuZ.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-BuMHbFjs.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Cxm5XK0L.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-B8vwElPz.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.cjs';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-kiV-CAuZ.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-BuMHbFjs.cjs';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.cjs';
7
7
  import '../content-transfer.cjs';
8
8
  import '@ai-matrx/kit/content-transfer';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.js';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-Cxm5XK0L.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-B8vwElPz.js';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
7
7
  import '../content-transfer.js';
8
8
  import '@ai-matrx/kit/content-transfer';
@@ -12144,6 +12144,7 @@ function MatrxDataTableCore({
12144
12144
  toolbar,
12145
12145
  hideToolbar = false,
12146
12146
  hidePagination = false,
12147
+ paginationLabelFormat,
12147
12148
  filterUi,
12148
12149
  detail,
12149
12150
  expandedDetail,
@@ -13180,7 +13181,7 @@ function MatrxDataTableCore({
13180
13181
  const coverageResult = (0, import_react21.useMemo)(() => {
13181
13182
  if (!coverage) return null;
13182
13183
  return describeCoverage({
13183
- loaded: data.length,
13184
+ loaded: coverage.loaded ?? data.length,
13184
13185
  ...coverage.matched === void 0 ? {} : { matched: coverage.matched },
13185
13186
  ...coverage.total === void 0 ? {} : { total: coverage.total },
13186
13187
  ...coverage.cap === void 0 ? {} : { cap: coverage.cap },
@@ -14183,11 +14184,12 @@ function MatrxDataTableCore({
14183
14184
  notice,
14184
14185
  savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
14185
14186
  toolbarActionError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
14186
- !hideToolbar && (viewTabs || toolbar?.title || showSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14187
+ !hideToolbar && (viewTabs || toolbar?.title || toolbar?.titleCount || showSearch || toolbar?.customSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14187
14188
  TableTitleRow,
14188
14189
  {
14189
14190
  tabs: viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
14190
14191
  ...toolbar?.title === void 0 ? {} : { title: toolbar.title },
14192
+ ...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
14191
14193
  context: tableId && SavedViews ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14192
14194
  SavedViews,
14193
14195
  {
@@ -14197,7 +14199,7 @@ function MatrxDataTableCore({
14197
14199
  onApply: applySavedView
14198
14200
  }
14199
14201
  ) }) : void 0,
14200
- search: showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14202
+ search: toolbar?.customSearch ?? (showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14201
14203
  TableSearch,
14202
14204
  {
14203
14205
  value: searchValue,
@@ -14268,7 +14270,7 @@ function MatrxDataTableCore({
14268
14270
  ] }) : null
14269
14271
  ]
14270
14272
  }
14271
- ) : null,
14273
+ ) : null),
14272
14274
  children: [
14273
14275
  toolbar?.layeredFilters ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14274
14276
  LayeredFilterBuilder,
@@ -14922,6 +14924,7 @@ function MatrxDataTableCore({
14922
14924
  leadingCols,
14923
14925
  showActionsCol,
14924
14926
  rowNoun: grouping?.rowNoun ?? "row",
14927
+ ...grouping?.renderLabel ? { renderLabel: grouping.renderLabel } : {},
14925
14928
  onToggle: () => setCollapsedGroups(toggleGroupCollapsed(collapsedGroups, entry.group.key))
14926
14929
  },
14927
14930
  `matrx-group-${entry.group.key}`
@@ -15095,7 +15098,7 @@ function MatrxDataTableCore({
15095
15098
  "div",
15096
15099
  {
15097
15100
  className: cn(
15098
- colIdx === 0 && hierarchy && "flex min-w-0 items-center"
15101
+ colIdx === 0 && (hierarchy || canExpandRow(row)) && "flex min-w-0 items-center"
15099
15102
  ),
15100
15103
  children: [
15101
15104
  colIdx === 0 && hierarchy ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -15106,6 +15109,40 @@ function MatrxDataTableCore({
15106
15109
  disabled: !(hierarchy.canReparent?.(row) ?? true)
15107
15110
  }
15108
15111
  ) : null,
15112
+ colIdx === 0 && canExpandRow(row) ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
15113
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
15114
+ Button,
15115
+ {
15116
+ type: "button",
15117
+ variant: "ghost",
15118
+ size: "icon",
15119
+ "data-matrx-table-expand-toggle": true,
15120
+ className: "mr-1 h-7 w-7 shrink-0 text-muted-foreground hover:text-foreground [&_svg]:size-4",
15121
+ "aria-label": isRowExpanded(row) ? "Collapse row details" : "Expand row details",
15122
+ "aria-expanded": isRowExpanded(row),
15123
+ onClick: (event) => {
15124
+ event.stopPropagation();
15125
+ toggleExpanded(row);
15126
+ },
15127
+ onKeyDown: (event) => {
15128
+ if (event.key !== "Enter" && event.key !== " ") return;
15129
+ event.preventDefault();
15130
+ event.stopPropagation();
15131
+ toggleExpanded(row);
15132
+ },
15133
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
15134
+ ChevronRight,
15135
+ {
15136
+ className: cn(
15137
+ "transition-transform",
15138
+ isRowExpanded(row) && "rotate-90"
15139
+ )
15140
+ }
15141
+ )
15142
+ }
15143
+ ) }),
15144
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { children: isRowExpanded(row) ? "Collapse details" : "Expand details" })
15145
+ ] }) : null,
15109
15146
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
15110
15147
  "div",
15111
15148
  {
@@ -15448,7 +15485,7 @@ function MatrxDataTableCore({
15448
15485
  GenericTablePagination,
15449
15486
  {
15450
15487
  totalItems,
15451
- ...sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${(0, import_format5.formatCount)(start)}\u2013${(0, import_format5.formatCount)(end)} of ${(0, import_format5.formatCount)(total)} matching \xB7 ${(0, import_format5.formatCount)(data.length)} / ${(0, import_format5.formatCount)(sourceTotal)} loaded` },
15488
+ ...paginationLabelFormat ? { labelFormat: paginationLabelFormat } : sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${(0, import_format5.formatCount)(start)}\u2013${(0, import_format5.formatCount)(end)} of ${(0, import_format5.formatCount)(total)} matching \xB7 ${(0, import_format5.formatCount)(data.length)} / ${(0, import_format5.formatCount)(sourceTotal)} loaded` },
15452
15489
  ...localProgressiveEnabled ? { progressive: {
15453
15490
  shownCount: progressiveRows.shownCount,
15454
15491
  loadedCount: data.length,
@@ -15966,6 +16003,7 @@ function TableGroupHeaderRow({
15966
16003
  leadingCols,
15967
16004
  showActionsCol,
15968
16005
  rowNoun,
16006
+ renderLabel,
15969
16007
  onToggle
15970
16008
  }) {
15971
16009
  const count = group.rows.length;
@@ -15996,7 +16034,7 @@ function TableGroupHeaderRow({
15996
16034
  children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChevronDown, { className: "h-4 w-4" })
15997
16035
  }
15998
16036
  ),
15999
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "truncate text-sm font-semibold text-foreground", children: group.label }),
16037
+ renderLabel ? renderLabel(group) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "truncate text-sm font-semibold text-foreground", children: group.label }),
16000
16038
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: summary })
16001
16039
  ] }) }, id);
16002
16040
  }