@ai-matrx/design-system 0.20.18 → 0.20.19
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/dist/data-table/index.js
CHANGED
|
@@ -9329,6 +9329,12 @@ function MatrxDataTableCore({
|
|
|
9329
9329
|
}
|
|
9330
9330
|
resetToolbarFacets(toolbar?.facets);
|
|
9331
9331
|
};
|
|
9332
|
+
const renderedEmptyState = remoteQuery === null && data.length > 0 && hasActiveFilters ? {
|
|
9333
|
+
title: "No matching rows",
|
|
9334
|
+
description: "No rows match the current search or filters.",
|
|
9335
|
+
action: /* @__PURE__ */ jsx40(Button, { type: "button", variant: "outline", size: "sm", onClick: clearAllFilters, children: "Clear filters" }),
|
|
9336
|
+
icon: void 0
|
|
9337
|
+
} : emptyState;
|
|
9332
9338
|
const commitCell = (rowId, field, next) => {
|
|
9333
9339
|
const scope = editScopeKey;
|
|
9334
9340
|
const nextEdits = { [rowId]: { [field]: next } };
|
|
@@ -10243,10 +10249,10 @@ function MatrxDataTableCore({
|
|
|
10243
10249
|
},
|
|
10244
10250
|
`mobile-card-sk-${index}`
|
|
10245
10251
|
)) : paginated.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "flex min-h-48 flex-1 items-center justify-center px-4 py-12 text-center", children: /* @__PURE__ */ jsxs30("div", { className: "flex max-w-sm flex-col items-center gap-2", children: [
|
|
10246
|
-
|
|
10247
|
-
/* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children:
|
|
10248
|
-
|
|
10249
|
-
|
|
10252
|
+
renderedEmptyState?.icon,
|
|
10253
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
|
|
10254
|
+
renderedEmptyState?.description ? /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
|
|
10255
|
+
renderedEmptyState?.action
|
|
10250
10256
|
] }) }) : paginated.map((row, index) => {
|
|
10251
10257
|
const id = getRowId(row);
|
|
10252
10258
|
const displayRow = applyRowEdits(row, edits[id]);
|
|
@@ -10534,10 +10540,10 @@ function MatrxDataTableCore({
|
|
|
10534
10540
|
colSpan: visibleColumns.length + leadingCols + (showActionsCol ? 1 : 0),
|
|
10535
10541
|
className: "px-4 py-12 text-center",
|
|
10536
10542
|
children: /* @__PURE__ */ jsxs30("div", { className: "mx-auto flex max-w-sm flex-col items-center gap-2", children: [
|
|
10537
|
-
|
|
10538
|
-
/* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children:
|
|
10539
|
-
|
|
10540
|
-
|
|
10543
|
+
renderedEmptyState?.icon,
|
|
10544
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm font-medium text-foreground", children: renderedEmptyState?.title ?? "No rows" }),
|
|
10545
|
+
renderedEmptyState?.description ? /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: renderedEmptyState.description }) : null,
|
|
10546
|
+
renderedEmptyState?.action
|
|
10541
10547
|
] })
|
|
10542
10548
|
}
|
|
10543
10549
|
) }) : paginated.map((row, index) => {
|