@ai-matrx/design-system 0.20.21 → 0.20.22

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.22
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/design-system/v0.20.21..npm/design-system/v0.20.22 -- apps/shared/design-system`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.20.21
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.cjs';
2
- import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-n8d2I1Gu.cjs';
2
+ import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-B99KFITZ.cjs';
3
3
  import '../extensions-DCHtNwG3.cjs';
4
4
  import '@ai-matrx/kit/content-transfer';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.js';
2
- import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-D_UZxZC5.js';
2
+ import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-CryQuMmz.js';
3
3
  import '../extensions-DCHtNwG3.js';
4
4
  import '@ai-matrx/kit/content-transfer';
5
5
  import 'react';
@@ -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-n8d2I1Gu.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-B99KFITZ.cjs';
2
2
  import '../extensions-DCHtNwG3.cjs';
3
3
  import '@ai-matrx/kit/content-transfer';
4
4
  import 'react';
@@ -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-D_UZxZC5.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-CryQuMmz.js';
2
2
  import '../extensions-DCHtNwG3.js';
3
3
  import '@ai-matrx/kit/content-transfer';
4
4
  import 'react';
@@ -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 } from '../types-n8d2I1Gu.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-B99KFITZ.cjs';
6
6
  import '../extensions-DCHtNwG3.cjs';
7
7
  import '@ai-matrx/kit/content-transfer';
8
8
 
@@ -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 } from '../types-D_UZxZC5.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-CryQuMmz.js';
6
6
  import '../extensions-DCHtNwG3.js';
7
7
  import '@ai-matrx/kit/content-transfer';
8
8
 
@@ -958,6 +958,7 @@ function TableTitleRow({
958
958
  context,
959
959
  count,
960
960
  search,
961
+ tabs,
961
962
  actions,
962
963
  children,
963
964
  className
@@ -981,15 +982,17 @@ function TableTitleRow({
981
982
  children: count.value.toLocaleString()
982
983
  }
983
984
  ) : null,
985
+ tabs ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "min-w-0 flex-1 basis-32", "data-matrx-table-toolbar-tabs": true, children: tabs }) : null,
986
+ tabs ? context : null,
984
987
  search ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
985
988
  "div",
986
989
  {
987
990
  "data-matrx-table-title-search": true,
988
- className: "order-last w-full min-w-0 sm:order-none sm:w-auto sm:min-w-64 sm:max-w-md",
991
+ className: "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
989
992
  children: search
990
993
  }
991
994
  ) : null,
992
- context,
995
+ !tabs ? context : null,
993
996
  children,
994
997
  actions ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
995
998
  "div",
@@ -7854,7 +7857,10 @@ function ToolbarFacets({ facets }) {
7854
7857
  function resetToolbarFacets(facets) {
7855
7858
  if (!facets) return;
7856
7859
  for (const facet of facets) {
7857
- if (facet.type !== "button-group") continue;
7860
+ if (facet.type === "custom") {
7861
+ if (facet.filter?.active) facet.filter.onReset();
7862
+ continue;
7863
+ }
7858
7864
  const def = facet.defaultValue ?? facet.options[0]?.value;
7859
7865
  if (def !== void 0 && facet.value !== def) facet.onChange(def);
7860
7866
  }
@@ -9114,19 +9120,20 @@ function MatrxDataTableCore({
9114
9120
  intelligentSearchEnabled ? columns : visibleColumns,
9115
9121
  sourceOwnsColumnFilters ? {} : columnFilters,
9116
9122
  sourceOwnsSort ? null : sort,
9117
- intelligentSearchEnabled || toolbar?.search === false || sourceOwnsSearch ? "" : searchValue,
9123
+ "",
9124
+ // Global matching and identity ranking run once across all loaded fields below.
9118
9125
  toolbar?.anyOf ? { columnIds: toolbar.anyOf.columnIds, query: anyOfValue } : void 0,
9119
9126
  layeredFilters,
9120
9127
  searchMatchMode,
9121
9128
  searchText
9122
9129
  );
9123
- if (!intelligentSearchEnabled || sourceOwnsSearch) return locallyFiltered;
9130
+ if (sourceOwnsSearch || toolbar?.search === false) return locallyFiltered;
9124
9131
  return rankTableSearchRows(
9125
9132
  locallyFiltered,
9126
9133
  columns,
9127
9134
  searchValue,
9128
9135
  {
9129
- scope: searchScope,
9136
+ scope: intelligentSearchEnabled ? searchScope : "all",
9130
9137
  ...toolbar?.intelligentSearch?.roles === void 0 ? {} : { roles: toolbar.intelligentSearch.roles },
9131
9138
  ...toolbar?.intelligentSearch?.scopes === void 0 ? {} : { scopes: toolbar.intelligentSearch.scopes },
9132
9139
  matchMode: searchMatchMode
@@ -9240,7 +9247,7 @@ function MatrxDataTableCore({
9240
9247
  const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
9241
9248
  const activeFilterCount = countActiveColumnFilters(columnFilters);
9242
9249
  const facetActive = (toolbar?.facets ?? []).some((f) => {
9243
- if (f.type !== "button-group") return false;
9250
+ if (f.type === "custom") return f.filter?.active ?? false;
9244
9251
  const def = f.defaultValue ?? f.options[0]?.value;
9245
9252
  return def !== void 0 && f.value !== def;
9246
9253
  });
@@ -9860,13 +9867,13 @@ function MatrxDataTableCore({
9860
9867
  className
9861
9868
  ),
9862
9869
  children: [
9863
- viewTabs && !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table"),
9864
9870
  notice,
9865
9871
  savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
9866
9872
  toolbarActionError ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
9867
- !hideToolbar && (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_runtime40.jsxs)(
9873
+ !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_runtime40.jsxs)(
9868
9874
  TableTitleRow,
9869
9875
  {
9876
+ tabs: viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
9870
9877
  ...toolbar?.title === void 0 ? {} : { title: toolbar.title },
9871
9878
  context: tableId && SavedViews ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
9872
9879
  SavedViews,
@@ -10067,7 +10074,8 @@ function MatrxDataTableCore({
10067
10074
  sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
10068
10075
  id: columnId(column),
10069
10076
  label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
10070
- }))
10077
+ })),
10078
+ ...effectiveCopy.export?.(processed, data)
10071
10079
  }
10072
10080
  }
10073
10081
  ) : null,
@@ -10538,7 +10546,7 @@ function MatrxDataTableCore({
10538
10546
  "data-row-id": id,
10539
10547
  "data-state": isSelected ? "selected" : void 0,
10540
10548
  onClick: (e) => {
10541
- if (e.target.closest("a")) return;
10549
+ if (e.target.closest('a, button, input, select, textarea, [role="button"], [role="combobox"], [contenteditable="true"]')) return;
10542
10550
  openRow(row);
10543
10551
  },
10544
10552
  className: cn(