@ai-matrx/design-system 0.55.0 → 0.55.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.
@@ -1,6 +1,6 @@
1
1
  import { ContentTransferReference } from './content-transfer.cjs';
2
2
  import * as React from 'react';
3
- import { ReactNode } from 'react';
3
+ import { ReactNode, ComponentType, MouseEvent } from 'react';
4
4
  import { AgentPayloadInput, AiVariant, AiCustomSource, CopyExportConfig } from './data-table/copy-types.cjs';
5
5
  import { TableStyle, ChoiceColorLookup } from './data-table/table-style.cjs';
6
6
  import { F as FieldFormatConfig } from './types-JnZD8wM0.cjs';
@@ -95,6 +95,21 @@ type TableSearchMatchMode = "contains" | "whole_words";
95
95
  type CellEditType = "string" | "number" | "boolean" | "select"
96
96
  /** Free-text multi-value chips (string[] cells: tags, labels, aliases). */
97
97
  | "tags" | "date" | false;
98
+ /** The table owns action markup and geometry; hosts supply behavior and an icon component only. */
99
+ interface MatrxTableIconAction {
100
+ id: string;
101
+ icon: ComponentType<{
102
+ className?: string;
103
+ "aria-hidden"?: boolean;
104
+ }>;
105
+ label: string;
106
+ tooltip?: string;
107
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
108
+ disabled?: boolean;
109
+ loading?: boolean;
110
+ tone?: "default" | "primary" | "destructive" | "success" | "warning";
111
+ variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link";
112
+ }
98
113
  interface MatrxColumnDef<T> {
99
114
  /** Stable id used for sort/filter state. Defaults to `accessorKey` when set. */
100
115
  id?: string;
@@ -118,6 +133,8 @@ interface MatrxColumnDef<T> {
118
133
  label?: string;
119
134
  /** Cell renderer. Defaults to stringified accessor value. */
120
135
  cell?: (row: T, index: number) => ReactNode;
136
+ /** An explicitly declared custom actions column. Arbitrary content never enters the built-in Actions column. */
137
+ customActions?: (row: T, controls: MatrxDataTableRecordControls) => ReactNode;
121
138
  /** Sortable unless explicitly false. Default true. */
122
139
  sortable?: boolean;
123
140
  /**
@@ -1629,8 +1646,8 @@ interface MatrxDataTableProps<T> {
1629
1646
  * the table owns checkbox selection and Alchemy copy for loaded rows.
1630
1647
  */
1631
1648
  selection?: false | MatrxDataTableSelectionConfig<T>;
1632
- /** Extra row actions rendered in a trailing Actions column. */
1633
- rowActions?: (row: T, controls: MatrxDataTableRecordControls) => ReactNode;
1649
+ /** Icon-only actions in the built-in Actions column. Labels are accessible names/tooltips, never button text. */
1650
+ rowActions?: (row: T, controls: MatrxDataTableRecordControls) => readonly MatrxTableIconAction[];
1634
1651
  /** Extra rows rendered in the table footer with the same columns as data rows. */
1635
1652
  footerRows?: T[];
1636
1653
  /** Optional KPIs above the toolbar and aligned totals in the canonical footer. */
@@ -1703,12 +1720,6 @@ interface MatrxDataTableProps<T> {
1703
1720
  * scrolls. A phone always scrolls: a fitted phone table is columns too narrow to read.
1704
1721
  */
1705
1722
  fitToWidth?: boolean | undefined;
1706
- /**
1707
- * WHAT THE ACTIONS HEADER OFFERS, beside its word — the table's own "add a row action" and the
1708
- * actions menu (merged-grid review 2, G4: "the ACTIONS header has no controls at all"). Drawn
1709
- * only where the Actions column is.
1710
- */
1711
- rowActionsHeader?: ReactNode;
1712
1723
  /** Highlight an index in the currently rendered page without selecting it. */
1713
1724
  highlightedIndex?: number | undefined;
1714
1725
  /** Receives the complete visible local view after local processing, before paging. Attaching after absence receives one snapshot; callback identity changes alone do not notify. */
@@ -1840,4 +1851,4 @@ declare function columnFiltersToLayeredRules(filters: ColumnFiltersState, fieldI
1840
1851
  declare function layeredFilterMatchesValue(value: unknown, rule: LayeredFilterRule): boolean;
1841
1852
  declare function layeredFilterRuleSummary(rule: LayeredFilterRule, fields: readonly LayeredFilterField[]): string;
1842
1853
 
1843
- export { type TableRankedSearchOptions as $, type AnyOfColumnSearch as A, type MatrxDataTableMobileCardControls as B, type ColumnFiltersState as C, type MatrxDataTableMultiExpandedDetailConfig as D, type MatrxDataTableQueryControl as E, type MatrxDataTableReadStatus as F, type MatrxDataTableSelectionConfig as G, type MatrxDataTableSingleExpandedDetailConfig as H, type MatrxDataTableSourceProcessing as I, type MatrxDataTableSpreadsheetConfig as J, type MatrxDataTableStyleConfig as K, type LayeredFilterRule as L, type MatrxColumnDef as M, type MatrxDataTableSummaryConfig as N, type MatrxDataTableSummaryContext as O, type MatrxDataTableSummaryMetric as P, type MatrxDataTableToolbar as Q, type MatrxDataTableUrlStateConfig as R, type SortState as S, type TableSearchMatchMode as T, type MatrxDataTableVirtualizeConfig as U, type MatrxDataTableWindowConfig as V, type MatrxTablePagination as W, type NumberFilterOp as X, type SavedTableViewTab as Y, type SortDirection as Z, type SpreadsheetSelection as _, type ColumnFilterValue as a, type TableSearchRole as a0, type TableSearchScope as a1, type TableViewQuery as a2, type TableViewTab as a3, TableViewTabs as a4, type TableViewTabsProps as a5, type TableViewTabsStore as a6, type TextFilterMode as a7, type ToolbarFacet as a8, inferTableSearchRole as a9, rankTableSearchRows as aa, resolveTableSearchScopes as ab, LAYERED_FILTER_OPERATORS as ac, LAYERED_FILTER_OPERATOR_LABELS as ad, type LayeredFilterField as ae, type LayeredFilterOperator as af, columnFiltersToLayeredRules as ag, completeLayeredFilterRules as ah, decodeLayeredFilterRules as ai, encodeLayeredFilterRules as aj, isCompleteLayeredFilterRule as ak, isLayeredFilterOperator as al, layeredFilterMatchesValue as am, layeredFilterNeedsValue as an, layeredFilterRuleSummary as ao, operatorsForLayeredField as ap, type TableSavedViewsProps as b, type MatrxDataTableDensity as c, type MatrxDataTableRecordControls as d, type MatrxDataTableQueryState as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxDataTableProps as h, type MatrxDataTableAppearance as i, type TableViewSnapshot as j, type MatrxDataTableRead as k, type ColumnMarker as l, type CellEditType as m, type CellEditsMap as n, type MatrxDataTableContextMenuConfig as o, type MatrxDataTableCoverageConfig as p, type MatrxDataTableDetailConfig as q, type MatrxDataTableDrillConfig as r, type MatrxDataTableEditConfig as s, type MatrxDataTableEmptyState as t, type MatrxDataTableExpandedDetailConfig as u, type MatrxDataTableFacetsConfig as v, type MatrxDataTableFilterUi as w, type MatrxDataTableGroupingConfig as x, type MatrxDataTableHierarchyConfig as y, type MatrxDataTableHierarchyMove as z };
1854
+ export { type SpreadsheetSelection as $, type AnyOfColumnSearch as A, type MatrxDataTableHierarchyMove as B, type ColumnFiltersState as C, type MatrxDataTableMobileCardControls as D, type MatrxDataTableMultiExpandedDetailConfig as E, type MatrxDataTableQueryControl as F, type MatrxDataTableReadStatus as G, type MatrxDataTableSelectionConfig as H, type MatrxDataTableSingleExpandedDetailConfig as I, type MatrxDataTableSourceProcessing as J, type MatrxDataTableSpreadsheetConfig as K, type LayeredFilterRule as L, type MatrxColumnDef as M, type MatrxDataTableStyleConfig as N, type MatrxDataTableSummaryConfig as O, type MatrxDataTableSummaryContext as P, type MatrxDataTableSummaryMetric as Q, type MatrxDataTableToolbar as R, type SortState as S, type TableSearchMatchMode as T, type MatrxDataTableUrlStateConfig as U, type MatrxDataTableVirtualizeConfig as V, type MatrxDataTableWindowConfig as W, type MatrxTablePagination as X, type NumberFilterOp as Y, type SavedTableViewTab as Z, type SortDirection as _, type ColumnFilterValue as a, type TableRankedSearchOptions as a0, type TableSearchRole as a1, type TableSearchScope as a2, type TableViewQuery as a3, type TableViewTab as a4, TableViewTabs as a5, type TableViewTabsProps as a6, type TableViewTabsStore as a7, type TextFilterMode as a8, type ToolbarFacet as a9, inferTableSearchRole as aa, rankTableSearchRows as ab, resolveTableSearchScopes as ac, LAYERED_FILTER_OPERATORS as ad, LAYERED_FILTER_OPERATOR_LABELS as ae, type LayeredFilterField as af, type LayeredFilterOperator as ag, columnFiltersToLayeredRules as ah, completeLayeredFilterRules as ai, decodeLayeredFilterRules as aj, encodeLayeredFilterRules as ak, isCompleteLayeredFilterRule as al, isLayeredFilterOperator as am, layeredFilterMatchesValue as an, layeredFilterNeedsValue as ao, layeredFilterRuleSummary as ap, operatorsForLayeredField as aq, type TableSavedViewsProps as b, type MatrxDataTableDensity as c, type MatrxDataTableRecordControls as d, type MatrxDataTableQueryState as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxTableIconAction as h, type MatrxDataTableProps as i, type MatrxDataTableAppearance as j, type TableViewSnapshot as k, type MatrxDataTableRead as l, type ColumnMarker as m, type CellEditType as n, type CellEditsMap as o, type MatrxDataTableContextMenuConfig as p, type MatrxDataTableCoverageConfig as q, type MatrxDataTableDetailConfig as r, type MatrxDataTableDrillConfig as s, type MatrxDataTableEditConfig as t, type MatrxDataTableEmptyState as u, type MatrxDataTableExpandedDetailConfig as v, type MatrxDataTableFacetsConfig as w, type MatrxDataTableFilterUi as x, type MatrxDataTableGroupingConfig as y, type MatrxDataTableHierarchyConfig as z };
@@ -1,6 +1,6 @@
1
1
  import { ContentTransferReference } from './content-transfer.js';
2
2
  import * as React from 'react';
3
- import { ReactNode } from 'react';
3
+ import { ReactNode, ComponentType, MouseEvent } from 'react';
4
4
  import { AgentPayloadInput, AiVariant, AiCustomSource, CopyExportConfig } from './data-table/copy-types.js';
5
5
  import { TableStyle, ChoiceColorLookup } from './data-table/table-style.js';
6
6
  import { F as FieldFormatConfig } from './types-JnZD8wM0.js';
@@ -95,6 +95,21 @@ type TableSearchMatchMode = "contains" | "whole_words";
95
95
  type CellEditType = "string" | "number" | "boolean" | "select"
96
96
  /** Free-text multi-value chips (string[] cells: tags, labels, aliases). */
97
97
  | "tags" | "date" | false;
98
+ /** The table owns action markup and geometry; hosts supply behavior and an icon component only. */
99
+ interface MatrxTableIconAction {
100
+ id: string;
101
+ icon: ComponentType<{
102
+ className?: string;
103
+ "aria-hidden"?: boolean;
104
+ }>;
105
+ label: string;
106
+ tooltip?: string;
107
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
108
+ disabled?: boolean;
109
+ loading?: boolean;
110
+ tone?: "default" | "primary" | "destructive" | "success" | "warning";
111
+ variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link";
112
+ }
98
113
  interface MatrxColumnDef<T> {
99
114
  /** Stable id used for sort/filter state. Defaults to `accessorKey` when set. */
100
115
  id?: string;
@@ -118,6 +133,8 @@ interface MatrxColumnDef<T> {
118
133
  label?: string;
119
134
  /** Cell renderer. Defaults to stringified accessor value. */
120
135
  cell?: (row: T, index: number) => ReactNode;
136
+ /** An explicitly declared custom actions column. Arbitrary content never enters the built-in Actions column. */
137
+ customActions?: (row: T, controls: MatrxDataTableRecordControls) => ReactNode;
121
138
  /** Sortable unless explicitly false. Default true. */
122
139
  sortable?: boolean;
123
140
  /**
@@ -1629,8 +1646,8 @@ interface MatrxDataTableProps<T> {
1629
1646
  * the table owns checkbox selection and Alchemy copy for loaded rows.
1630
1647
  */
1631
1648
  selection?: false | MatrxDataTableSelectionConfig<T>;
1632
- /** Extra row actions rendered in a trailing Actions column. */
1633
- rowActions?: (row: T, controls: MatrxDataTableRecordControls) => ReactNode;
1649
+ /** Icon-only actions in the built-in Actions column. Labels are accessible names/tooltips, never button text. */
1650
+ rowActions?: (row: T, controls: MatrxDataTableRecordControls) => readonly MatrxTableIconAction[];
1634
1651
  /** Extra rows rendered in the table footer with the same columns as data rows. */
1635
1652
  footerRows?: T[];
1636
1653
  /** Optional KPIs above the toolbar and aligned totals in the canonical footer. */
@@ -1703,12 +1720,6 @@ interface MatrxDataTableProps<T> {
1703
1720
  * scrolls. A phone always scrolls: a fitted phone table is columns too narrow to read.
1704
1721
  */
1705
1722
  fitToWidth?: boolean | undefined;
1706
- /**
1707
- * WHAT THE ACTIONS HEADER OFFERS, beside its word — the table's own "add a row action" and the
1708
- * actions menu (merged-grid review 2, G4: "the ACTIONS header has no controls at all"). Drawn
1709
- * only where the Actions column is.
1710
- */
1711
- rowActionsHeader?: ReactNode;
1712
1723
  /** Highlight an index in the currently rendered page without selecting it. */
1713
1724
  highlightedIndex?: number | undefined;
1714
1725
  /** Receives the complete visible local view after local processing, before paging. Attaching after absence receives one snapshot; callback identity changes alone do not notify. */
@@ -1840,4 +1851,4 @@ declare function columnFiltersToLayeredRules(filters: ColumnFiltersState, fieldI
1840
1851
  declare function layeredFilterMatchesValue(value: unknown, rule: LayeredFilterRule): boolean;
1841
1852
  declare function layeredFilterRuleSummary(rule: LayeredFilterRule, fields: readonly LayeredFilterField[]): string;
1842
1853
 
1843
- export { type TableRankedSearchOptions as $, type AnyOfColumnSearch as A, type MatrxDataTableMobileCardControls as B, type ColumnFiltersState as C, type MatrxDataTableMultiExpandedDetailConfig as D, type MatrxDataTableQueryControl as E, type MatrxDataTableReadStatus as F, type MatrxDataTableSelectionConfig as G, type MatrxDataTableSingleExpandedDetailConfig as H, type MatrxDataTableSourceProcessing as I, type MatrxDataTableSpreadsheetConfig as J, type MatrxDataTableStyleConfig as K, type LayeredFilterRule as L, type MatrxColumnDef as M, type MatrxDataTableSummaryConfig as N, type MatrxDataTableSummaryContext as O, type MatrxDataTableSummaryMetric as P, type MatrxDataTableToolbar as Q, type MatrxDataTableUrlStateConfig as R, type SortState as S, type TableSearchMatchMode as T, type MatrxDataTableVirtualizeConfig as U, type MatrxDataTableWindowConfig as V, type MatrxTablePagination as W, type NumberFilterOp as X, type SavedTableViewTab as Y, type SortDirection as Z, type SpreadsheetSelection as _, type ColumnFilterValue as a, type TableSearchRole as a0, type TableSearchScope as a1, type TableViewQuery as a2, type TableViewTab as a3, TableViewTabs as a4, type TableViewTabsProps as a5, type TableViewTabsStore as a6, type TextFilterMode as a7, type ToolbarFacet as a8, inferTableSearchRole as a9, rankTableSearchRows as aa, resolveTableSearchScopes as ab, LAYERED_FILTER_OPERATORS as ac, LAYERED_FILTER_OPERATOR_LABELS as ad, type LayeredFilterField as ae, type LayeredFilterOperator as af, columnFiltersToLayeredRules as ag, completeLayeredFilterRules as ah, decodeLayeredFilterRules as ai, encodeLayeredFilterRules as aj, isCompleteLayeredFilterRule as ak, isLayeredFilterOperator as al, layeredFilterMatchesValue as am, layeredFilterNeedsValue as an, layeredFilterRuleSummary as ao, operatorsForLayeredField as ap, type TableSavedViewsProps as b, type MatrxDataTableDensity as c, type MatrxDataTableRecordControls as d, type MatrxDataTableQueryState as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxDataTableProps as h, type MatrxDataTableAppearance as i, type TableViewSnapshot as j, type MatrxDataTableRead as k, type ColumnMarker as l, type CellEditType as m, type CellEditsMap as n, type MatrxDataTableContextMenuConfig as o, type MatrxDataTableCoverageConfig as p, type MatrxDataTableDetailConfig as q, type MatrxDataTableDrillConfig as r, type MatrxDataTableEditConfig as s, type MatrxDataTableEmptyState as t, type MatrxDataTableExpandedDetailConfig as u, type MatrxDataTableFacetsConfig as v, type MatrxDataTableFilterUi as w, type MatrxDataTableGroupingConfig as x, type MatrxDataTableHierarchyConfig as y, type MatrxDataTableHierarchyMove as z };
1854
+ export { type SpreadsheetSelection as $, type AnyOfColumnSearch as A, type MatrxDataTableHierarchyMove as B, type ColumnFiltersState as C, type MatrxDataTableMobileCardControls as D, type MatrxDataTableMultiExpandedDetailConfig as E, type MatrxDataTableQueryControl as F, type MatrxDataTableReadStatus as G, type MatrxDataTableSelectionConfig as H, type MatrxDataTableSingleExpandedDetailConfig as I, type MatrxDataTableSourceProcessing as J, type MatrxDataTableSpreadsheetConfig as K, type LayeredFilterRule as L, type MatrxColumnDef as M, type MatrxDataTableStyleConfig as N, type MatrxDataTableSummaryConfig as O, type MatrxDataTableSummaryContext as P, type MatrxDataTableSummaryMetric as Q, type MatrxDataTableToolbar as R, type SortState as S, type TableSearchMatchMode as T, type MatrxDataTableUrlStateConfig as U, type MatrxDataTableVirtualizeConfig as V, type MatrxDataTableWindowConfig as W, type MatrxTablePagination as X, type NumberFilterOp as Y, type SavedTableViewTab as Z, type SortDirection as _, type ColumnFilterValue as a, type TableRankedSearchOptions as a0, type TableSearchRole as a1, type TableSearchScope as a2, type TableViewQuery as a3, type TableViewTab as a4, TableViewTabs as a5, type TableViewTabsProps as a6, type TableViewTabsStore as a7, type TextFilterMode as a8, type ToolbarFacet as a9, inferTableSearchRole as aa, rankTableSearchRows as ab, resolveTableSearchScopes as ac, LAYERED_FILTER_OPERATORS as ad, LAYERED_FILTER_OPERATOR_LABELS as ae, type LayeredFilterField as af, type LayeredFilterOperator as ag, columnFiltersToLayeredRules as ah, completeLayeredFilterRules as ai, decodeLayeredFilterRules as aj, encodeLayeredFilterRules as ak, isCompleteLayeredFilterRule as al, isLayeredFilterOperator as am, layeredFilterMatchesValue as an, layeredFilterNeedsValue as ao, layeredFilterRuleSummary as ap, operatorsForLayeredField as aq, type TableSavedViewsProps as b, type MatrxDataTableDensity as c, type MatrxDataTableRecordControls as d, type MatrxDataTableQueryState as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxTableIconAction as h, type MatrxDataTableProps as i, type MatrxDataTableAppearance as j, type TableViewSnapshot as k, type MatrxDataTableRead as l, type ColumnMarker as m, type CellEditType as n, type CellEditsMap as o, type MatrxDataTableContextMenuConfig as p, type MatrxDataTableCoverageConfig as q, type MatrxDataTableDetailConfig as r, type MatrxDataTableDrillConfig as s, type MatrxDataTableEditConfig as t, type MatrxDataTableEmptyState as u, type MatrxDataTableExpandedDetailConfig as v, type MatrxDataTableFacetsConfig as w, type MatrxDataTableFilterUi as x, type MatrxDataTableGroupingConfig as y, type MatrxDataTableHierarchyConfig as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/design-system",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "AI Matrx semantic React primitives shared across Vite, Next.js, desktop, and customer-built applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",