@ai-matrx/design-system 0.17.2 → 0.17.3

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.
@@ -6498,7 +6498,7 @@ function MatrxDataTableCore({
6498
6498
  mobileCardsClass
6499
6499
  ),
6500
6500
  children: [
6501
- isFetching && !isLoading ? /* @__PURE__ */ jsxs24(
6501
+ isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs24(
6502
6502
  "div",
6503
6503
  {
6504
6504
  role: "status",
@@ -6593,7 +6593,7 @@ function MatrxDataTableCore({
6593
6593
  resolve: resolveHierarchyMove
6594
6594
  }
6595
6595
  ) : null,
6596
- isFetching && !isLoading ? /* @__PURE__ */ jsxs24(
6596
+ isFetching && !isLoading && appendQuery === null ? /* @__PURE__ */ jsxs24(
6597
6597
  "div",
6598
6598
  {
6599
6599
  role: "status",
@@ -6954,13 +6954,56 @@ function MatrxDataTableCore({
6954
6954
  }
6955
6955
  ) : null
6956
6956
  ] }),
6957
- appendQuery ? /* @__PURE__ */ jsxs24("div", { "data-matrx-table-footer": true, className: "flex min-h-16 shrink-0 items-center justify-between gap-3 border-t border-border px-3 py-2", "aria-busy": isLoading || isFetching, children: [
6958
- /* @__PURE__ */ jsxs24("div", { role: "status", "aria-live": "polite", className: "text-xs text-muted-foreground", children: [
6959
- isFetching ? "Loading more rows\u2026" : isLoading ? "Loading rows\u2026" : `${data.length.toLocaleString()} loaded${appendQuery.pagination.totalItems === void 0 ? "" : ` of ${appendQuery.pagination.totalItems.toLocaleString()}`}`,
6960
- scrollPagination.error ? /* @__PURE__ */ jsx32("p", { role: "alert", className: "text-destructive", children: scrollPagination.error.message }) : null
6961
- ] }),
6962
- scrollPagination.error && !appendQuery.pagination.hasNextPage ? /* @__PURE__ */ jsx32(Button, { type: "button", variant: "outline", onClick: appendQuery.pagination.refresh, children: "Reload rows" }) : appendQuery.pagination.hasNextPage || scrollPagination.error ? /* @__PURE__ */ jsx32(Button, { type: "button", variant: "outline", disabled: isLoading || isFetching, onClick: () => void scrollPagination.requestNextPage(), children: scrollPagination.error ? "Retry" : "Load more" }) : !isLoading ? /* @__PURE__ */ jsx32("span", { className: "text-xs text-muted-foreground", children: "All rows loaded" }) : null
6963
- ] }) : !hidePagination && totalItems > 0 ? /* @__PURE__ */ jsx32("div", { className: "shrink-0", children: /* @__PURE__ */ jsx32(
6957
+ appendQuery ? /* @__PURE__ */ jsxs24(
6958
+ "div",
6959
+ {
6960
+ "data-matrx-table-footer": true,
6961
+ className: "flex min-h-16 shrink-0 items-center justify-between gap-3 border-t border-border px-3 py-2",
6962
+ "aria-busy": isLoading || isFetching,
6963
+ children: [
6964
+ /* @__PURE__ */ jsxs24(
6965
+ "div",
6966
+ {
6967
+ role: "status",
6968
+ "aria-live": "polite",
6969
+ className: "flex min-w-0 flex-1 items-center gap-2 text-xs text-muted-foreground",
6970
+ children: [
6971
+ isLoading || isFetching ? /* @__PURE__ */ jsx32(
6972
+ Loader2,
6973
+ {
6974
+ "data-matrx-table-append-loader": true,
6975
+ "aria-hidden": "true",
6976
+ className: "h-5 w-5 shrink-0 animate-spin text-primary motion-reduce:animate-none"
6977
+ }
6978
+ ) : null,
6979
+ /* @__PURE__ */ jsxs24("div", { className: "min-w-0", children: [
6980
+ /* @__PURE__ */ jsx32("p", { className: "break-words font-medium text-foreground", children: isFetching ? "Loading more rows\u2026" : isLoading ? "Loading rows\u2026" : `${data.length.toLocaleString()} loaded${appendQuery.pagination.totalItems === void 0 ? "" : ` of ${appendQuery.pagination.totalItems.toLocaleString()}`}` }),
6981
+ scrollPagination.error ? /* @__PURE__ */ jsx32("p", { role: "alert", className: "break-words text-destructive", children: scrollPagination.error.message }) : null
6982
+ ] })
6983
+ ]
6984
+ }
6985
+ ),
6986
+ scrollPagination.error && !appendQuery.pagination.hasNextPage ? /* @__PURE__ */ jsx32(
6987
+ Button,
6988
+ {
6989
+ type: "button",
6990
+ variant: "outline",
6991
+ onClick: appendQuery.pagination.refresh,
6992
+ children: "Reload rows"
6993
+ }
6994
+ ) : appendQuery.pagination.hasNextPage || scrollPagination.error ? /* @__PURE__ */ jsx32(
6995
+ Button,
6996
+ {
6997
+ type: "button",
6998
+ variant: "outline",
6999
+ disabled: isLoading || isFetching,
7000
+ onClick: () => void scrollPagination.requestNextPage(),
7001
+ children: scrollPagination.error ? "Retry" : "Load more"
7002
+ }
7003
+ ) : !isLoading ? /* @__PURE__ */ jsx32("span", { className: "text-xs text-muted-foreground", children: "All rows loaded" }) : null
7004
+ ]
7005
+ }
7006
+ ) : !hidePagination && totalItems > 0 ? /* @__PURE__ */ jsx32("div", { className: "shrink-0", children: /* @__PURE__ */ jsx32(
6964
7007
  GenericTablePagination,
6965
7008
  {
6966
7009
  totalItems,