@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 +18 -5
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +39 -7
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +8 -3
- package/dist/data-table/index.d.ts +8 -3
- package/dist/data-table/index.js +39 -7
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/{types-p13OrDj-.d.ts → types-Z32pxexx.d.ts} +9 -0
- package/dist/{types-D7O3uOIs.d.cts → types-oVyZbfwn.d.cts} +9 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, n as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, o as MatrxDataTableDetailConfig, p as MatrxDataTableEditConfig, q as MatrxDataTableEmptyState, r as MatrxDataTableExpandedDetailConfig, s as MatrxDataTableFacetsConfig, t as MatrxDataTableFilterUi, u as MatrxDataTableGroupingConfig, v as MatrxDataTableHierarchyConfig, w as MatrxDataTableHierarchyMove, x as MatrxDataTableMobileCardControls, y as MatrxDataTableMultiExpandedDetailConfig, z as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, B as MatrxDataTableSelectionConfig, D as MatrxDataTableSingleExpandedDetailConfig, E as MatrxDataTableSourceProcessing, F as MatrxDataTableSpreadsheetConfig, G as MatrxDataTableStyleConfig, H as MatrxDataTableToolbar, I as MatrxDataTableUrlStateConfig, J as MatrxDataTableVirtualizeConfig, K as MatrxDataTableWindowConfig, N as MatrxTablePagination, O as SortDirection, S as SortState, P as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, Q as TableSearchRole, R as TableSearchScope, U as TableViewQuery, V as TextFilterMode, W as ToolbarFacet, X as inferTableSearchRole, Y as rankTableSearchRows, Z as resolveTableSearchScopes } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-oVyZbfwn.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, n as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, o as MatrxDataTableDetailConfig, p as MatrxDataTableEditConfig, q as MatrxDataTableEmptyState, r as MatrxDataTableExpandedDetailConfig, s as MatrxDataTableFacetsConfig, t as MatrxDataTableFilterUi, u as MatrxDataTableGroupingConfig, v as MatrxDataTableHierarchyConfig, w as MatrxDataTableHierarchyMove, x as MatrxDataTableMobileCardControls, y as MatrxDataTableMultiExpandedDetailConfig, z as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, B as MatrxDataTableSelectionConfig, D as MatrxDataTableSingleExpandedDetailConfig, E as MatrxDataTableSourceProcessing, F as MatrxDataTableSpreadsheetConfig, G as MatrxDataTableStyleConfig, H as MatrxDataTableToolbar, I as MatrxDataTableUrlStateConfig, J as MatrxDataTableVirtualizeConfig, K as MatrxDataTableWindowConfig, N as MatrxTablePagination, O as SortDirection, S as SortState, P as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, Q as TableSearchRole, R as TableSearchScope, U as TableViewQuery, V as TextFilterMode, W as ToolbarFacet, X as inferTableSearchRole, Y as rankTableSearchRows, Z as resolveTableSearchScopes } from '../types-oVyZbfwn.cjs';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
6
6
|
import { CopyControlProps } from './copy-types.cjs';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.cjs';
|
|
@@ -56,11 +56,16 @@ interface TableTitleRowProps {
|
|
|
56
56
|
tabs?: ReactNode;
|
|
57
57
|
actions?: ReactNode;
|
|
58
58
|
children?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* One row at every width: nothing wraps onto a second line; the row scrolls sideways on a
|
|
61
|
+
* narrow screen instead (the search keeps its place in the row).
|
|
62
|
+
*/
|
|
63
|
+
singleRow?: boolean;
|
|
59
64
|
className?: string;
|
|
60
65
|
}
|
|
61
66
|
/** Shared responsive title composition. Hosts retain their existing query,
|
|
62
67
|
* navigation and persistence controllers; this component owns layout only. */
|
|
63
|
-
declare function TableTitleRow({ title, headingLevel, context, count, search, tabs, actions, children, className, }: TableTitleRowProps): React.JSX.Element;
|
|
68
|
+
declare function TableTitleRow({ title, headingLevel, context, count, search, tabs, actions, children, singleRow, className, }: TableTitleRowProps): React.JSX.Element;
|
|
64
69
|
|
|
65
70
|
interface SavedViewsControlProps {
|
|
66
71
|
views: ReadonlyArray<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, n as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, o as MatrxDataTableDetailConfig, p as MatrxDataTableEditConfig, q as MatrxDataTableEmptyState, r as MatrxDataTableExpandedDetailConfig, s as MatrxDataTableFacetsConfig, t as MatrxDataTableFilterUi, u as MatrxDataTableGroupingConfig, v as MatrxDataTableHierarchyConfig, w as MatrxDataTableHierarchyMove, x as MatrxDataTableMobileCardControls, y as MatrxDataTableMultiExpandedDetailConfig, z as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, B as MatrxDataTableSelectionConfig, D as MatrxDataTableSingleExpandedDetailConfig, E as MatrxDataTableSourceProcessing, F as MatrxDataTableSpreadsheetConfig, G as MatrxDataTableStyleConfig, H as MatrxDataTableToolbar, I as MatrxDataTableUrlStateConfig, J as MatrxDataTableVirtualizeConfig, K as MatrxDataTableWindowConfig, N as MatrxTablePagination, O as SortDirection, S as SortState, P as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, Q as TableSearchRole, R as TableSearchScope, U as TableViewQuery, V as TextFilterMode, W as ToolbarFacet, X as inferTableSearchRole, Y as rankTableSearchRows, Z as resolveTableSearchScopes } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-Z32pxexx.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, n as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, o as MatrxDataTableDetailConfig, p as MatrxDataTableEditConfig, q as MatrxDataTableEmptyState, r as MatrxDataTableExpandedDetailConfig, s as MatrxDataTableFacetsConfig, t as MatrxDataTableFilterUi, u as MatrxDataTableGroupingConfig, v as MatrxDataTableHierarchyConfig, w as MatrxDataTableHierarchyMove, x as MatrxDataTableMobileCardControls, y as MatrxDataTableMultiExpandedDetailConfig, z as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, B as MatrxDataTableSelectionConfig, D as MatrxDataTableSingleExpandedDetailConfig, E as MatrxDataTableSourceProcessing, F as MatrxDataTableSpreadsheetConfig, G as MatrxDataTableStyleConfig, H as MatrxDataTableToolbar, I as MatrxDataTableUrlStateConfig, J as MatrxDataTableVirtualizeConfig, K as MatrxDataTableWindowConfig, N as MatrxTablePagination, O as SortDirection, S as SortState, P as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, Q as TableSearchRole, R as TableSearchScope, U as TableViewQuery, V as TextFilterMode, W as ToolbarFacet, X as inferTableSearchRole, Y as rankTableSearchRows, Z as resolveTableSearchScopes } from '../types-Z32pxexx.js';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
6
6
|
import { CopyControlProps } from './copy-types.js';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.js';
|
|
@@ -56,11 +56,16 @@ interface TableTitleRowProps {
|
|
|
56
56
|
tabs?: ReactNode;
|
|
57
57
|
actions?: ReactNode;
|
|
58
58
|
children?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* One row at every width: nothing wraps onto a second line; the row scrolls sideways on a
|
|
61
|
+
* narrow screen instead (the search keeps its place in the row).
|
|
62
|
+
*/
|
|
63
|
+
singleRow?: boolean;
|
|
59
64
|
className?: string;
|
|
60
65
|
}
|
|
61
66
|
/** Shared responsive title composition. Hosts retain their existing query,
|
|
62
67
|
* navigation and persistence controllers; this component owns layout only. */
|
|
63
|
-
declare function TableTitleRow({ title, headingLevel, context, count, search, tabs, actions, children, className, }: TableTitleRowProps): React.JSX.Element;
|
|
68
|
+
declare function TableTitleRow({ title, headingLevel, context, count, search, tabs, actions, children, singleRow, className, }: TableTitleRowProps): React.JSX.Element;
|
|
64
69
|
|
|
65
70
|
interface SavedViewsControlProps {
|
|
66
71
|
views: ReadonlyArray<{
|
package/dist/data-table/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useRef as useRef16,
|
|
14
14
|
useState as useState22
|
|
15
15
|
} from "react";
|
|
16
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
16
17
|
import {
|
|
17
18
|
DndContext,
|
|
18
19
|
DragOverlay,
|
|
@@ -941,6 +942,7 @@ function TableTitleRow({
|
|
|
941
942
|
tabs,
|
|
942
943
|
actions,
|
|
943
944
|
children,
|
|
945
|
+
singleRow = false,
|
|
944
946
|
className
|
|
945
947
|
}) {
|
|
946
948
|
const Heading = headingLevel === 1 ? "h1" : "h2";
|
|
@@ -949,7 +951,8 @@ function TableTitleRow({
|
|
|
949
951
|
{
|
|
950
952
|
"data-matrx-table-toolbar": true,
|
|
951
953
|
className: cn(
|
|
952
|
-
"relative flex min-w-0 shrink-0
|
|
954
|
+
"relative flex min-w-0 shrink-0 items-center gap-2",
|
|
955
|
+
singleRow ? "flex-nowrap overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "flex-wrap",
|
|
953
956
|
className
|
|
954
957
|
),
|
|
955
958
|
children: [
|
|
@@ -968,7 +971,7 @@ function TableTitleRow({
|
|
|
968
971
|
"div",
|
|
969
972
|
{
|
|
970
973
|
"data-matrx-table-title-search": true,
|
|
971
|
-
className: "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
|
|
974
|
+
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",
|
|
972
975
|
children: search
|
|
973
976
|
}
|
|
974
977
|
) : null,
|
|
@@ -978,7 +981,7 @@ function TableTitleRow({
|
|
|
978
981
|
"div",
|
|
979
982
|
{
|
|
980
983
|
"data-matrx-table-actions": true,
|
|
981
|
-
className: "ml-auto flex min-w-0
|
|
984
|
+
className: cn("ml-auto flex min-w-0 items-center gap-0", singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"),
|
|
982
985
|
children: actions
|
|
983
986
|
}
|
|
984
987
|
) : null
|
|
@@ -13429,6 +13432,11 @@ function MatrxDataTableCore({
|
|
|
13429
13432
|
const rowCopyInMenu = rowCopyPlacement === "menu" && Boolean(rowActions);
|
|
13430
13433
|
const showInlineRowCopy = showRowCopy && !rowCopyInMenu;
|
|
13431
13434
|
const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
|
|
13435
|
+
const placeToolbar = (node) => {
|
|
13436
|
+
if (!toolbar || !("portalInto" in toolbar)) return node;
|
|
13437
|
+
const target = toolbar.portalInto;
|
|
13438
|
+
return target ? createPortal2(node, target) : null;
|
|
13439
|
+
};
|
|
13432
13440
|
const renderRowActions = (row, controls) => {
|
|
13433
13441
|
const actions = rowActions?.(row, controls);
|
|
13434
13442
|
const scopedActions = /* @__PURE__ */ jsx42(MatrxTableRowControlsScope, { value: controls, children: actions });
|
|
@@ -14256,9 +14264,10 @@ function MatrxDataTableCore({
|
|
|
14256
14264
|
notice,
|
|
14257
14265
|
savedViewError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
|
|
14258
14266
|
toolbarActionError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
|
|
14259
|
-
!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__ */ jsxs32(
|
|
14267
|
+
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__ */ jsxs32(
|
|
14260
14268
|
TableTitleRow,
|
|
14261
14269
|
{
|
|
14270
|
+
...toolbar?.singleRow ? { singleRow: true } : {},
|
|
14262
14271
|
tabs: viewTabs ? /* @__PURE__ */ jsx42(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
|
|
14263
14272
|
...toolbar?.title === void 0 ? {} : { title: toolbar.title },
|
|
14264
14273
|
...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
|
|
@@ -14393,8 +14402,31 @@ function MatrxDataTableCore({
|
|
|
14393
14402
|
"div",
|
|
14394
14403
|
{
|
|
14395
14404
|
"data-matrx-table-actions": true,
|
|
14396
|
-
className:
|
|
14405
|
+
className: cn(
|
|
14406
|
+
"ml-auto flex min-w-0 items-center gap-0",
|
|
14407
|
+
toolbar?.singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"
|
|
14408
|
+
),
|
|
14397
14409
|
children: [
|
|
14410
|
+
toolbar?.singleRow && coverageResult && coverageResult.notice ? /* @__PURE__ */ jsxs32(Tooltip, { children: [
|
|
14411
|
+
/* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs32(
|
|
14412
|
+
"span",
|
|
14413
|
+
{
|
|
14414
|
+
"data-matrx-table-coverage": true,
|
|
14415
|
+
"data-matrx-table-coverage-scope": coverageResult.scope,
|
|
14416
|
+
role: "status",
|
|
14417
|
+
tabIndex: 0,
|
|
14418
|
+
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",
|
|
14419
|
+
children: [
|
|
14420
|
+
coverageResult.badge,
|
|
14421
|
+
/* @__PURE__ */ jsxs32("span", { className: "sr-only", children: [
|
|
14422
|
+
": ",
|
|
14423
|
+
coverageResult.notice
|
|
14424
|
+
] })
|
|
14425
|
+
]
|
|
14426
|
+
}
|
|
14427
|
+
) }),
|
|
14428
|
+
/* @__PURE__ */ jsx42(TooltipContent, { className: "max-w-xs", children: coverageResult.notice })
|
|
14429
|
+
] }) : null,
|
|
14398
14430
|
/* @__PURE__ */ jsx42(
|
|
14399
14431
|
TableToolbarAction,
|
|
14400
14432
|
{
|
|
@@ -14537,9 +14569,9 @@ function MatrxDataTableCore({
|
|
|
14537
14569
|
)
|
|
14538
14570
|
]
|
|
14539
14571
|
}
|
|
14540
|
-
),
|
|
14572
|
+
)),
|
|
14541
14573
|
/* @__PURE__ */ jsxs32("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
|
|
14542
|
-
coverageResult && coverageResult.notice ? /* @__PURE__ */ jsxs32(
|
|
14574
|
+
coverageResult && coverageResult.notice && !toolbar?.singleRow ? /* @__PURE__ */ jsxs32(
|
|
14543
14575
|
"div",
|
|
14544
14576
|
{
|
|
14545
14577
|
"data-matrx-table-coverage": true,
|