@ai-matrx/design-system 0.34.0 → 0.35.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 +26 -0
- package/dist/content-transfer.cjs +3 -1
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.js +3 -1
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +3 -1
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +3 -1
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +3 -1
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +3 -1
- package/dist/data-table/data-row-window.js.map +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 -22
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +39 -22
- 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/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{types-CFmCZXVn.d.ts → types-Cxm5XK0L.d.ts} +25 -7
- package/dist/{types-CYkwg9jR.d.cts → types-kiV-CAuZ.d.cts} +25 -7
- package/package.json +1 -1
|
@@ -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-
|
|
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';
|
|
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-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Cxm5XK0L.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-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-kiV-CAuZ.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-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-Cxm5XK0L.js';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
|
|
7
7
|
import '../content-transfer.js';
|
|
8
8
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -2594,6 +2594,7 @@ var PopoverContent = React13.forwardRef(
|
|
|
2594
2594
|
sideOffset = 4,
|
|
2595
2595
|
container,
|
|
2596
2596
|
animated = true,
|
|
2597
|
+
sizing = "fixed",
|
|
2597
2598
|
...props
|
|
2598
2599
|
}, ref) => {
|
|
2599
2600
|
const portalContainer = usePortalContainer(container);
|
|
@@ -2610,7 +2611,8 @@ var PopoverContent = React13.forwardRef(
|
|
|
2610
2611
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
2611
2612
|
// above it, and a popover opened from a dialog still stacks above the
|
|
2612
2613
|
// dialog. z-[10001] buried dialogs behind fullscreen popovers.
|
|
2613
|
-
"z-[10000]
|
|
2614
|
+
"z-[10000] max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
2615
|
+
sizing === "content" ? "w-auto min-w-[min(max(var(--radix-popover-trigger-width),20rem),calc(100vw-2rem))] max-w-[min(28rem,calc(100vw-2rem))]" : "w-72",
|
|
2614
2616
|
animated && MOTION_POPPER,
|
|
2615
2617
|
className
|
|
2616
2618
|
),
|
|
@@ -6296,8 +6298,9 @@ function ColumnHeaderCell({
|
|
|
6296
6298
|
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
6297
6299
|
PopoverContent,
|
|
6298
6300
|
{
|
|
6301
|
+
sizing: "content",
|
|
6299
6302
|
align: "start",
|
|
6300
|
-
className: "
|
|
6303
|
+
className: "p-2",
|
|
6301
6304
|
onClick: (e) => e.stopPropagation(),
|
|
6302
6305
|
onOpenAutoFocus: (event) => {
|
|
6303
6306
|
const content = event.currentTarget;
|
|
@@ -10995,8 +10998,9 @@ function EditableTableCell({
|
|
|
10995
10998
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
10996
10999
|
PopoverContent,
|
|
10997
11000
|
{
|
|
11001
|
+
sizing: "content",
|
|
10998
11002
|
align: "start",
|
|
10999
|
-
className: "
|
|
11003
|
+
className: "p-2",
|
|
11000
11004
|
onClick: (e) => e.stopPropagation(),
|
|
11001
11005
|
children: [
|
|
11002
11006
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -13158,14 +13162,14 @@ function MatrxDataTableCore({
|
|
|
13158
13162
|
const coverageResult = (0, import_react21.useMemo)(() => {
|
|
13159
13163
|
if (!coverage) return null;
|
|
13160
13164
|
return describeCoverage({
|
|
13161
|
-
loaded:
|
|
13165
|
+
loaded: data.length,
|
|
13162
13166
|
...coverage.matched === void 0 ? {} : { matched: coverage.matched },
|
|
13163
13167
|
...coverage.total === void 0 ? {} : { total: coverage.total },
|
|
13164
13168
|
...coverage.cap === void 0 ? {} : { cap: coverage.cap },
|
|
13165
13169
|
answeredBy: coverage.answeredBy ?? "client",
|
|
13166
13170
|
...coverage.noun === void 0 ? {} : { noun: coverage.noun }
|
|
13167
13171
|
});
|
|
13168
|
-
}, [coverage,
|
|
13172
|
+
}, [coverage, data.length]);
|
|
13169
13173
|
const bodyEntries = (0, import_react21.useMemo)(() => {
|
|
13170
13174
|
const from = effectiveRowWindow ? effectiveRowWindow.start : 0;
|
|
13171
13175
|
const to = effectiveRowWindow ? effectiveRowWindow.end : void 0;
|
|
@@ -13386,13 +13390,26 @@ function MatrxDataTableCore({
|
|
|
13386
13390
|
setWindowRowSnapshot(null);
|
|
13387
13391
|
};
|
|
13388
13392
|
const canExpandRow = (row) => Boolean(expandedDetail && (expandedDetail.canExpand?.(row) ?? true));
|
|
13389
|
-
const
|
|
13393
|
+
const isMultiExpandedDetail = (detail2) => "expandedIds" in detail2;
|
|
13394
|
+
const isRowExpanded = (row) => {
|
|
13395
|
+
if (!expandedDetail || !canExpandRow(row)) return false;
|
|
13396
|
+
const id = getRowId(row);
|
|
13397
|
+
return isMultiExpandedDetail(expandedDetail) ? expandedDetail.expandedIds.has(id) : expandedDetail.expandedId === id;
|
|
13398
|
+
};
|
|
13390
13399
|
const toggleExpanded = (row) => {
|
|
13391
13400
|
if (!expandedDetail || !canExpandRow(row)) return;
|
|
13392
13401
|
const id = getRowId(row);
|
|
13393
|
-
expandedDetail
|
|
13394
|
-
|
|
13395
|
-
|
|
13402
|
+
if (isMultiExpandedDetail(expandedDetail)) {
|
|
13403
|
+
const nextExpandedIds = new Set(expandedDetail.expandedIds);
|
|
13404
|
+
if (nextExpandedIds.has(id)) {
|
|
13405
|
+
nextExpandedIds.delete(id);
|
|
13406
|
+
} else {
|
|
13407
|
+
nextExpandedIds.add(id);
|
|
13408
|
+
}
|
|
13409
|
+
expandedDetail.onExpandedIdsChange(nextExpandedIds);
|
|
13410
|
+
return;
|
|
13411
|
+
}
|
|
13412
|
+
expandedDetail.onExpandedIdChange(expandedDetail.expandedId === id ? null : id);
|
|
13396
13413
|
};
|
|
13397
13414
|
const openRow = (row) => {
|
|
13398
13415
|
if (canExpandRow(row)) {
|
|
@@ -14430,6 +14447,19 @@ function MatrxDataTableCore({
|
|
|
14430
14447
|
}
|
|
14431
14448
|
),
|
|
14432
14449
|
/* @__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: [
|
|
14450
|
+
coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
14451
|
+
"div",
|
|
14452
|
+
{
|
|
14453
|
+
"data-matrx-table-coverage": true,
|
|
14454
|
+
"data-matrx-table-coverage-scope": coverageResult.scope,
|
|
14455
|
+
role: "status",
|
|
14456
|
+
className: "flex shrink-0 items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
|
|
14457
|
+
children: [
|
|
14458
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold", children: coverageResult.badge }),
|
|
14459
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: coverageResult.notice })
|
|
14460
|
+
]
|
|
14461
|
+
}
|
|
14462
|
+
) : null,
|
|
14433
14463
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative min-h-0 flex-1", children: [
|
|
14434
14464
|
mobileCards ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
14435
14465
|
"div",
|
|
@@ -14536,19 +14566,6 @@ function MatrxDataTableCore({
|
|
|
14536
14566
|
]
|
|
14537
14567
|
}
|
|
14538
14568
|
) : null,
|
|
14539
|
-
coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
14540
|
-
"div",
|
|
14541
|
-
{
|
|
14542
|
-
"data-matrx-table-coverage": true,
|
|
14543
|
-
"data-matrx-table-coverage-scope": coverageResult.scope,
|
|
14544
|
-
role: "status",
|
|
14545
|
-
className: "mb-1 flex items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
|
|
14546
|
-
children: [
|
|
14547
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold", children: coverageResult.badge }),
|
|
14548
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: coverageResult.notice })
|
|
14549
|
-
]
|
|
14550
|
-
}
|
|
14551
|
-
) : null,
|
|
14552
14569
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
14553
14570
|
"div",
|
|
14554
14571
|
{
|