@ai-matrx/design-system 0.48.9 → 0.48.11
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 +23 -0
- package/dist/data-table/index.cjs +40 -31
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +40 -31
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +4 -3
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +4 -3
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/tap-target.css +3 -1
- package/package.json +1 -1
package/dist/data-table/index.js
CHANGED
|
@@ -36390,6 +36390,7 @@ function GenericTablePagination({
|
|
|
36390
36390
|
const startItem = totalItems === 0 ? 0 : progressive ? 1 : (currentPage - 1) * effectiveItemsPerPage + 1;
|
|
36391
36391
|
const endItem = Math.min(progressive?.shownCount ?? currentPage * effectiveItemsPerPage, totalItems);
|
|
36392
36392
|
const defaultLabelFormat = (start, end, total) => {
|
|
36393
|
+
if (total === 0 && !unknownTotal) return "0 rows";
|
|
36393
36394
|
if (unknownTotal) return `${unknownTotal.pageRowCount.toLocaleString()} on page ${currentPage.toLocaleString()}`;
|
|
36394
36395
|
if (progressive) return progressive.loadedCount !== void 0 && progressive.loadedCount !== total ? `${end} shown / ${total} matching \xB7 ${progressive.loadedCount} loaded` : `${end} shown / ${total} loaded`;
|
|
36395
36396
|
return compact ? `${start}-${end} of ${total}` : `Showing ${start} to ${end} of ${total} entries`;
|
|
@@ -36444,7 +36445,7 @@ function GenericTablePagination({
|
|
|
36444
36445
|
{
|
|
36445
36446
|
className: cn("flex min-w-0 justify-center", infoContainerClassName),
|
|
36446
36447
|
children: showPageInfo && !hideEntriesInfo && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
36447
|
-
/* @__PURE__ */ jsx23("span", { className: "truncate text-xs tabular-nums text-muted-foreground sm:hidden", children: labelFormat ? formatLabel(startItem, endItem, totalItems) : unknownTotal ? defaultLabelFormat(startItem, endItem, totalItems) : progressive ? `${endItem}/${totalItems} ${progressive.loadedCount !== void 0 && progressive.loadedCount !== totalItems ? "matching" : "loaded"}` : `${startItem}-${endItem} / ${totalItems}` }),
|
|
36448
|
+
/* @__PURE__ */ jsx23("span", { className: "truncate text-xs tabular-nums text-muted-foreground sm:hidden", children: labelFormat ? formatLabel(startItem, endItem, totalItems) : unknownTotal ? defaultLabelFormat(startItem, endItem, totalItems) : totalItems === 0 ? "0 rows" : progressive ? `${endItem}/${totalItems} ${progressive.loadedCount !== void 0 && progressive.loadedCount !== totalItems ? "matching" : "loaded"}` : `${startItem}-${endItem} / ${totalItems}` }),
|
|
36448
36449
|
/* @__PURE__ */ jsx23(
|
|
36449
36450
|
"span",
|
|
36450
36451
|
{
|
|
@@ -36519,7 +36520,7 @@ function GenericTablePagination({
|
|
|
36519
36520
|
),
|
|
36520
36521
|
fallbackClassName: page === currentPage ? pageActiveButtonClassName : pageButtonClassName,
|
|
36521
36522
|
onClick: () => onPageChange(page),
|
|
36522
|
-
disabled: isFetching,
|
|
36523
|
+
disabled: isFetching || totalPages <= 1,
|
|
36523
36524
|
children: /* @__PURE__ */ jsx23("span", { children: page })
|
|
36524
36525
|
},
|
|
36525
36526
|
`mobile-${page}`
|
|
@@ -36535,7 +36536,7 @@ function GenericTablePagination({
|
|
|
36535
36536
|
visibilityClassName: "hidden sm:inline-flex",
|
|
36536
36537
|
fallbackClassName: currentPage === page ? pageActiveButtonClassName : pageButtonClassName,
|
|
36537
36538
|
onClick: () => onPageChange(page),
|
|
36538
|
-
disabled: isFetching,
|
|
36539
|
+
disabled: isFetching || totalPages <= 1,
|
|
36539
36540
|
children: /* @__PURE__ */ jsx23("span", { children: page })
|
|
36540
36541
|
},
|
|
36541
36542
|
`desktop-${page}`
|
|
@@ -43827,7 +43828,9 @@ function BottomSheet({
|
|
|
43827
43828
|
{
|
|
43828
43829
|
className: cn(
|
|
43829
43830
|
"fixed inset-x-0 bottom-0 z-[10000] mt-24 flex flex-col rounded-t-2xl overflow-hidden",
|
|
43830
|
-
|
|
43831
|
+
// Adaptive sizes to its content, up to 90dvh — never a 60dvh floor that
|
|
43832
|
+
// left a two-action sheet mostly empty (hosts overrode it with min-h-0).
|
|
43833
|
+
size === "full" ? "h-[92dvh]" : "max-h-[90dvh]",
|
|
43831
43834
|
surface === "solid" && "border border-b-0 border-border bg-background shadow-2xl",
|
|
43832
43835
|
contentClassName
|
|
43833
43836
|
),
|
|
@@ -51111,10 +51114,11 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51111
51114
|
},
|
|
51112
51115
|
"matrx-column-spacer-end"
|
|
51113
51116
|
) : null
|
|
51114
|
-
] }, `sk-${i}`)) : readFailure ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48("td", { colSpan: renderedColSpan, className: "px-0 py-12 text-center", children: /* @__PURE__ */ jsx48("div", { className: "sticky left-0 flex flex-col items-center gap-2 whitespace-normal px-4", style: { width: "100cqw", maxWidth: "100%" }, children: readFailure }) }) }) : paginated.length === 0 ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48(
|
|
51117
|
+
] }, `sk-${i}`)) : readFailure ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48("td", { colSpan: renderedColSpan, "data-matrx-table-message-cell": true, className: "px-0 py-12 text-center", children: /* @__PURE__ */ jsx48("div", { className: "sticky left-0 flex flex-col items-center gap-2 whitespace-normal px-4", style: { width: "100cqw", maxWidth: "100%" }, children: readFailure }) }) }) : paginated.length === 0 ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48(
|
|
51115
51118
|
"td",
|
|
51116
51119
|
{
|
|
51117
51120
|
colSpan: renderedColSpan,
|
|
51121
|
+
"data-matrx-table-message-cell": true,
|
|
51118
51122
|
className: "px-0 py-12 text-center",
|
|
51119
51123
|
children: /* @__PURE__ */ jsxs37("div", { "data-matrx-table-empty-state": true, className: "sticky left-0 flex flex-col items-center gap-2 whitespace-normal px-4", style: { width: "100cqw", maxWidth: "100%" }, children: [
|
|
51120
51124
|
renderedEmptyState?.icon,
|
|
@@ -51401,32 +51405,37 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51401
51405
|
] }) : !isLoading && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx48("span", { className: "min-w-0 max-w-full break-words whitespace-normal px-3 text-xs text-muted-foreground sm:text-sm", children: "All rows loaded" }) : null
|
|
51402
51406
|
]
|
|
51403
51407
|
}
|
|
51404
|
-
) : !hidePagination ?
|
|
51405
|
-
|
|
51406
|
-
|
|
51407
|
-
|
|
51408
|
-
|
|
51409
|
-
|
|
51410
|
-
|
|
51411
|
-
|
|
51412
|
-
|
|
51413
|
-
|
|
51414
|
-
|
|
51415
|
-
|
|
51416
|
-
|
|
51417
|
-
|
|
51418
|
-
|
|
51419
|
-
|
|
51420
|
-
|
|
51421
|
-
|
|
51422
|
-
|
|
51423
|
-
|
|
51424
|
-
|
|
51425
|
-
|
|
51426
|
-
|
|
51427
|
-
|
|
51428
|
-
|
|
51429
|
-
|
|
51408
|
+
) : !hidePagination ? (
|
|
51409
|
+
// Keep the footer and disabled page controls in place for an empty table,
|
|
51410
|
+
// including an unfiltered empty source. The empty-state copy explains why
|
|
51411
|
+
// there are no records; the stable footer preserves the table controls.
|
|
51412
|
+
/* @__PURE__ */ jsx48(MatrxTableChrome, { part: "pagination", epoch: paginationEpoch, render: () => /* @__PURE__ */ jsx48("div", { className: "shrink-0", children: /* @__PURE__ */ jsx48(
|
|
51413
|
+
GenericTablePagination,
|
|
51414
|
+
{
|
|
51415
|
+
totalItems,
|
|
51416
|
+
...paginationLabelFormat ? { labelFormat: paginationLabelFormat } : sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${formatCount3(start)}\u2013${formatCount3(end)} of ${formatCount3(total)} matching \xB7 ${formatCount3(data.length)} / ${formatCount3(sourceTotal)} loaded` },
|
|
51417
|
+
...localProgressiveEnabled ? { progressive: {
|
|
51418
|
+
shownCount: progressiveRows.shownCount,
|
|
51419
|
+
loadedCount: data.length,
|
|
51420
|
+
hasMore: progressiveRows.hasMore,
|
|
51421
|
+
onShowMore: () => void chromeLatest.current.showMore()
|
|
51422
|
+
} } : {},
|
|
51423
|
+
itemsPerPage: pageSize === 0 && allRowsAreLoaded ? 0 : effectivePageSize,
|
|
51424
|
+
currentPage: safePage,
|
|
51425
|
+
onPageChange: setPage,
|
|
51426
|
+
onItemsPerPageChange: (n2) => {
|
|
51427
|
+
setPageSize(n2);
|
|
51428
|
+
if (!controlledQuery) setPage(1);
|
|
51429
|
+
},
|
|
51430
|
+
pageSizeOptions: pageSizeOptions.filter((size) => size > 0),
|
|
51431
|
+
showAllOption: allRowsAreLoaded,
|
|
51432
|
+
allValue: 0,
|
|
51433
|
+
allOptionLabel: "All loaded",
|
|
51434
|
+
compact: true,
|
|
51435
|
+
hideEntriesInfo: false
|
|
51436
|
+
}
|
|
51437
|
+
) }) })
|
|
51438
|
+
) : null,
|
|
51430
51439
|
selection && selectionCount > 0 ? /* @__PURE__ */ jsxs37(
|
|
51431
51440
|
"div",
|
|
51432
51441
|
{
|