@ai-matrx/design-system 0.39.5 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.40.0 (2026-09-25 — version and notes set by PUBLISHER-5)
4
+
5
+ ### Lane TABLE-PAGE-CHROME (2026-09-25)
6
+
7
+ * **The table's toolbar can live in the page's one row.** `MatrxDataTableToolbar.portalInto`
8
+ (an element, or `null` while it mounts) draws the toolbar row INTO the placing page's own
9
+ toolbar row, so a page and its table share one row instead of stacking two bars (records-ui's
10
+ `TablePage`: the view picker, the layout chooser and the table's search side by side).
11
+ `MatrxDataTableToolbar.singleRow` (and `TableTitleRow.singleRow`) keeps the row one line at
12
+ every width: nothing wraps, a narrow screen scrolls it sideways, the search keeps its place.
13
+ With `singleRow`, what the answer covers ("Unknown total", "Partial") is a badge IN the row with the
14
+ whole sentence on hover and to a screen reader, never a band between the toolbar and the column
15
+ headers. Both are additive; without them nothing changes. Suite
16
+ `MatrxDataTable.toolbar-into-the-page-row.test.tsx` RED 1/2 on the prior bytes, GREEN 4/4;
17
+ data-table 649/649. **Consumer action:** none.
18
+
3
19
  ## 0.39.5
4
20
 
5
21
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -14,11 +30,8 @@ No source changes intended and no consumer action required.
14
30
 
15
31
  ## 0.39.3
16
32
 
17
- Automatic changed-only republish (docs/metadata drift since the last tag — see
18
- `git diff npm/design-system/v0.39.2..npm/design-system/v0.39.3 -- apps/shared/design-system`).
19
- No source changes intended and no consumer action required.
20
-
21
- ## Unreleased
33
+ The auto release stubbed this version as a docs-only republish; it carried UI-FIX-19's source
34
+ change below (notes placed under it by PUBLISHER-5, 2026-09-25).
22
35
 
23
36
  ### Lane UI-FIX-19 (2026-09-24)
24
37
 
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.cjs';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-D7O3uOIs.cjs';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-oVyZbfwn.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-p13OrDj-.js';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-Z32pxexx.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-D7O3uOIs.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-oVyZbfwn.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-p13OrDj-.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Z32pxexx.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-D7O3uOIs.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-oVyZbfwn.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-p13OrDj-.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-Z32pxexx.js';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
7
7
  import '../content-transfer.js';
8
8
  import '@ai-matrx/kit/content-transfer';
@@ -152,6 +152,7 @@ module.exports = __toCommonJS(data_table_exports);
152
152
 
153
153
  // src/data-table/MatrxDataTable.tsx
154
154
  var import_react21 = require("react");
155
+ var import_react_dom2 = require("react-dom");
155
156
  var import_core3 = require("@dnd-kit/core");
156
157
 
157
158
  // src/data-table/icons.tsx
@@ -1069,6 +1070,7 @@ function TableTitleRow({
1069
1070
  tabs,
1070
1071
  actions,
1071
1072
  children,
1073
+ singleRow = false,
1072
1074
  className
1073
1075
  }) {
1074
1076
  const Heading = headingLevel === 1 ? "h1" : "h2";
@@ -1077,7 +1079,8 @@ function TableTitleRow({
1077
1079
  {
1078
1080
  "data-matrx-table-toolbar": true,
1079
1081
  className: cn(
1080
- "relative flex min-w-0 shrink-0 flex-wrap items-center gap-2",
1082
+ "relative flex min-w-0 shrink-0 items-center gap-2",
1083
+ singleRow ? "flex-nowrap overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "flex-wrap",
1081
1084
  className
1082
1085
  ),
1083
1086
  children: [
@@ -1096,7 +1099,7 @@ function TableTitleRow({
1096
1099
  "div",
1097
1100
  {
1098
1101
  "data-matrx-table-title-search": true,
1099
- className: "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
1102
+ className: singleRow ? "w-44 min-w-[9rem] shrink-0 sm:w-64 sm:max-w-md" : "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
1100
1103
  children: search
1101
1104
  }
1102
1105
  ) : null,
@@ -1106,7 +1109,7 @@ function TableTitleRow({
1106
1109
  "div",
1107
1110
  {
1108
1111
  "data-matrx-table-actions": true,
1109
- className: "ml-auto flex min-w-0 flex-wrap items-center gap-0",
1112
+ className: cn("ml-auto flex min-w-0 items-center gap-0", singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"),
1110
1113
  children: actions
1111
1114
  }
1112
1115
  ) : null
@@ -13495,6 +13498,11 @@ function MatrxDataTableCore({
13495
13498
  const rowCopyInMenu = rowCopyPlacement === "menu" && Boolean(rowActions);
13496
13499
  const showInlineRowCopy = showRowCopy && !rowCopyInMenu;
13497
13500
  const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
13501
+ const placeToolbar = (node) => {
13502
+ if (!toolbar || !("portalInto" in toolbar)) return node;
13503
+ const target = toolbar.portalInto;
13504
+ return target ? (0, import_react_dom2.createPortal)(node, target) : null;
13505
+ };
13498
13506
  const renderRowActions = (row, controls) => {
13499
13507
  const actions = rowActions?.(row, controls);
13500
13508
  const scopedActions = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MatrxTableRowControlsScope, { value: controls, children: actions });
@@ -14322,9 +14330,10 @@ function MatrxDataTableCore({
14322
14330
  notice,
14323
14331
  savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
14324
14332
  toolbarActionError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
14325
- !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)(
14333
+ placeToolbar(!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)(
14326
14334
  TableTitleRow,
14327
14335
  {
14336
+ ...toolbar?.singleRow ? { singleRow: true } : {},
14328
14337
  tabs: viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
14329
14338
  ...toolbar?.title === void 0 ? {} : { title: toolbar.title },
14330
14339
  ...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
@@ -14459,8 +14468,31 @@ function MatrxDataTableCore({
14459
14468
  "div",
14460
14469
  {
14461
14470
  "data-matrx-table-actions": true,
14462
- className: "ml-auto flex min-w-0 flex-wrap items-center gap-0",
14471
+ className: cn(
14472
+ "ml-auto flex min-w-0 items-center gap-0",
14473
+ toolbar?.singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"
14474
+ ),
14463
14475
  children: [
14476
+ toolbar?.singleRow && coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
14477
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14478
+ "span",
14479
+ {
14480
+ "data-matrx-table-coverage": true,
14481
+ "data-matrx-table-coverage-scope": coverageResult.scope,
14482
+ role: "status",
14483
+ tabIndex: 0,
14484
+ className: "mr-1 inline-flex shrink-0 items-center whitespace-nowrap rounded-md border border-amber-300/70 bg-amber-50 px-2 py-0.5 text-[11px] font-semibold text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
14485
+ children: [
14486
+ coverageResult.badge,
14487
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "sr-only", children: [
14488
+ ": ",
14489
+ coverageResult.notice
14490
+ ] })
14491
+ ]
14492
+ }
14493
+ ) }),
14494
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { className: "max-w-xs", children: coverageResult.notice })
14495
+ ] }) : null,
14464
14496
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14465
14497
  TableToolbarAction,
14466
14498
  {
@@ -14603,9 +14635,9 @@ function MatrxDataTableCore({
14603
14635
  )
14604
14636
  ]
14605
14637
  }
14606
- ),
14638
+ )),
14607
14639
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
14608
- coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14640
+ coverageResult && coverageResult.notice && !toolbar?.singleRow ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14609
14641
  "div",
14610
14642
  {
14611
14643
  "data-matrx-table-coverage": true,