@ai-matrx/design-system 0.20.21 → 0.21.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 +33 -0
- package/dist/content-transfer.cjs +15 -0
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.js +15 -0
- 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 +15 -0
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +15 -0
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +15 -0
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +15 -0
- 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 +34 -11
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +4 -3
- package/dist/data-table/index.d.ts +4 -3
- package/dist/data-table/index.js +34 -11
- 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/pagination.cjs +15 -0
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +15 -0
- package/dist/data-table/pagination.js.map +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 +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +26 -0
- package/dist/{types-n8d2I1Gu.d.cts → types-B99KFITZ.d.cts} +9 -2
- package/dist/{types-D_UZxZC5.d.ts → types-CryQuMmz.d.ts} +9 -2
- 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-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-
|
|
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-
|
|
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-
|
|
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
|
|
|
@@ -205,13 +205,28 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
);
|
|
208
|
+
var TOUCH_FLOOR_SIZES = /* @__PURE__ */ new Set([
|
|
209
|
+
"xs",
|
|
210
|
+
"sm",
|
|
211
|
+
"default",
|
|
212
|
+
"md",
|
|
213
|
+
"lg",
|
|
214
|
+
"icon",
|
|
215
|
+
"icon-sm",
|
|
216
|
+
"roundIcon"
|
|
217
|
+
]);
|
|
218
|
+
var SQUARE_SIZES = /* @__PURE__ */ new Set(["icon", "icon-sm", "roundIcon"]);
|
|
208
219
|
var Button = React.forwardRef(
|
|
209
220
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
210
221
|
const Component = asChild ? import_react_slot.Slot : "button";
|
|
222
|
+
const resolvedSize = size ?? "default";
|
|
211
223
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
212
224
|
Component,
|
|
213
225
|
{
|
|
214
226
|
className: cn(buttonVariants({ variant, size, className })),
|
|
227
|
+
"data-matrx-button": "",
|
|
228
|
+
"data-tap-floor": TOUCH_FLOOR_SIZES.has(resolvedSize) ? "" : void 0,
|
|
229
|
+
"data-tap-floor-square": SQUARE_SIZES.has(resolvedSize) ? "" : void 0,
|
|
215
230
|
ref,
|
|
216
231
|
...props
|
|
217
232
|
}
|
|
@@ -958,6 +973,7 @@ function TableTitleRow({
|
|
|
958
973
|
context,
|
|
959
974
|
count,
|
|
960
975
|
search,
|
|
976
|
+
tabs,
|
|
961
977
|
actions,
|
|
962
978
|
children,
|
|
963
979
|
className
|
|
@@ -981,15 +997,17 @@ function TableTitleRow({
|
|
|
981
997
|
children: count.value.toLocaleString()
|
|
982
998
|
}
|
|
983
999
|
) : null,
|
|
1000
|
+
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,
|
|
1001
|
+
tabs ? context : null,
|
|
984
1002
|
search ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
985
1003
|
"div",
|
|
986
1004
|
{
|
|
987
1005
|
"data-matrx-table-title-search": true,
|
|
988
|
-
className: "order-last w-full min-w-0 sm:order-none sm:w-
|
|
1006
|
+
className: "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
|
|
989
1007
|
children: search
|
|
990
1008
|
}
|
|
991
1009
|
) : null,
|
|
992
|
-
context,
|
|
1010
|
+
!tabs ? context : null,
|
|
993
1011
|
children,
|
|
994
1012
|
actions ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
995
1013
|
"div",
|
|
@@ -7854,7 +7872,10 @@ function ToolbarFacets({ facets }) {
|
|
|
7854
7872
|
function resetToolbarFacets(facets) {
|
|
7855
7873
|
if (!facets) return;
|
|
7856
7874
|
for (const facet of facets) {
|
|
7857
|
-
if (facet.type
|
|
7875
|
+
if (facet.type === "custom") {
|
|
7876
|
+
if (facet.filter?.active) facet.filter.onReset();
|
|
7877
|
+
continue;
|
|
7878
|
+
}
|
|
7858
7879
|
const def = facet.defaultValue ?? facet.options[0]?.value;
|
|
7859
7880
|
if (def !== void 0 && facet.value !== def) facet.onChange(def);
|
|
7860
7881
|
}
|
|
@@ -9114,19 +9135,20 @@ function MatrxDataTableCore({
|
|
|
9114
9135
|
intelligentSearchEnabled ? columns : visibleColumns,
|
|
9115
9136
|
sourceOwnsColumnFilters ? {} : columnFilters,
|
|
9116
9137
|
sourceOwnsSort ? null : sort,
|
|
9117
|
-
|
|
9138
|
+
"",
|
|
9139
|
+
// Global matching and identity ranking run once across all loaded fields below.
|
|
9118
9140
|
toolbar?.anyOf ? { columnIds: toolbar.anyOf.columnIds, query: anyOfValue } : void 0,
|
|
9119
9141
|
layeredFilters,
|
|
9120
9142
|
searchMatchMode,
|
|
9121
9143
|
searchText
|
|
9122
9144
|
);
|
|
9123
|
-
if (
|
|
9145
|
+
if (sourceOwnsSearch || toolbar?.search === false) return locallyFiltered;
|
|
9124
9146
|
return rankTableSearchRows(
|
|
9125
9147
|
locallyFiltered,
|
|
9126
9148
|
columns,
|
|
9127
9149
|
searchValue,
|
|
9128
9150
|
{
|
|
9129
|
-
scope: searchScope,
|
|
9151
|
+
scope: intelligentSearchEnabled ? searchScope : "all",
|
|
9130
9152
|
...toolbar?.intelligentSearch?.roles === void 0 ? {} : { roles: toolbar.intelligentSearch.roles },
|
|
9131
9153
|
...toolbar?.intelligentSearch?.scopes === void 0 ? {} : { scopes: toolbar.intelligentSearch.scopes },
|
|
9132
9154
|
matchMode: searchMatchMode
|
|
@@ -9240,7 +9262,7 @@ function MatrxDataTableCore({
|
|
|
9240
9262
|
const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
|
|
9241
9263
|
const activeFilterCount = countActiveColumnFilters(columnFilters);
|
|
9242
9264
|
const facetActive = (toolbar?.facets ?? []).some((f) => {
|
|
9243
|
-
if (f.type
|
|
9265
|
+
if (f.type === "custom") return f.filter?.active ?? false;
|
|
9244
9266
|
const def = f.defaultValue ?? f.options[0]?.value;
|
|
9245
9267
|
return def !== void 0 && f.value !== def;
|
|
9246
9268
|
});
|
|
@@ -9860,13 +9882,13 @@ function MatrxDataTableCore({
|
|
|
9860
9882
|
className
|
|
9861
9883
|
),
|
|
9862
9884
|
children: [
|
|
9863
|
-
viewTabs && !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table"),
|
|
9864
9885
|
notice,
|
|
9865
9886
|
savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
|
|
9866
9887
|
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)(
|
|
9888
|
+
!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
9889
|
TableTitleRow,
|
|
9869
9890
|
{
|
|
9891
|
+
tabs: viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
|
|
9870
9892
|
...toolbar?.title === void 0 ? {} : { title: toolbar.title },
|
|
9871
9893
|
context: tableId && SavedViews ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9872
9894
|
SavedViews,
|
|
@@ -10067,7 +10089,8 @@ function MatrxDataTableCore({
|
|
|
10067
10089
|
sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
|
|
10068
10090
|
id: columnId(column),
|
|
10069
10091
|
label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
|
|
10070
|
-
}))
|
|
10092
|
+
})),
|
|
10093
|
+
...effectiveCopy.export?.(processed, data)
|
|
10071
10094
|
}
|
|
10072
10095
|
}
|
|
10073
10096
|
) : null,
|
|
@@ -10538,7 +10561,7 @@ function MatrxDataTableCore({
|
|
|
10538
10561
|
"data-row-id": id,
|
|
10539
10562
|
"data-state": isSelected ? "selected" : void 0,
|
|
10540
10563
|
onClick: (e) => {
|
|
10541
|
-
if (e.target.closest(
|
|
10564
|
+
if (e.target.closest('a, button, input, select, textarea, [role="button"], [role="combobox"], [contenteditable="true"]')) return;
|
|
10542
10565
|
openRow(row);
|
|
10543
10566
|
},
|
|
10544
10567
|
className: cn(
|