@ai-matrx/design-system 0.60.1 → 0.60.7

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.
@@ -37069,7 +37069,7 @@ function GenericTablePagination({
37069
37069
  children: /* @__PURE__ */ jsx25(ChevronLeft, { className: "h-5 w-5" })
37070
37070
  }
37071
37071
  ),
37072
- !unknownTotal && getPageNumbers(3).map((page) => /* @__PURE__ */ jsx25(
37072
+ (unknownTotal ? [currentPage] : getPageNumbers(3)).map((page) => /* @__PURE__ */ jsx25(
37073
37073
  PaginationAction,
37074
37074
  {
37075
37075
  HostAction: host.ToolbarAction,
@@ -37079,13 +37079,15 @@ function GenericTablePagination({
37079
37079
  disabledHint: isFetching ? "Loading source page" : `Already on page ${page}`,
37080
37080
  visibilityClassName: "hidden",
37081
37081
  fallbackClassName: page === currentPage ? pageActiveButtonClassName : pageButtonClassName,
37082
- onClick: () => onPageChange(page),
37083
- disabled: isFetching || totalPages <= 1,
37082
+ onClick: () => {
37083
+ if (!unknownTotal) onPageChange(page);
37084
+ },
37085
+ disabled: Boolean(unknownTotal) || isFetching || totalPages <= 1,
37084
37086
  children: /* @__PURE__ */ jsx25("span", { children: page })
37085
37087
  },
37086
37088
  `mobile-${page}`
37087
37089
  )),
37088
- !unknownTotal && getPageNumbers().map((page) => /* @__PURE__ */ jsx25(
37090
+ (unknownTotal ? [currentPage] : getPageNumbers()).map((page) => /* @__PURE__ */ jsx25(
37089
37091
  PaginationAction,
37090
37092
  {
37091
37093
  HostAction: host.ToolbarAction,
@@ -37095,8 +37097,10 @@ function GenericTablePagination({
37095
37097
  disabledHint: isFetching ? "Loading source page" : `Already on page ${page}`,
37096
37098
  visibilityClassName: "hidden sm:inline-flex",
37097
37099
  fallbackClassName: currentPage === page ? pageActiveButtonClassName : pageButtonClassName,
37098
- onClick: () => onPageChange(page),
37099
- disabled: isFetching || totalPages <= 1,
37100
+ onClick: () => {
37101
+ if (!unknownTotal) onPageChange(page);
37102
+ },
37103
+ disabled: Boolean(unknownTotal) || isFetching || totalPages <= 1,
37100
37104
  children: /* @__PURE__ */ jsx25("span", { children: page })
37101
37105
  },
37102
37106
  `desktop-${page}`
@@ -37114,17 +37118,19 @@ function GenericTablePagination({
37114
37118
  children: /* @__PURE__ */ jsx25(ChevronRight, { className: "h-5 w-5" })
37115
37119
  }
37116
37120
  ),
37117
- !unknownTotal && /* @__PURE__ */ jsx25(
37121
+ /* @__PURE__ */ jsx25(
37118
37122
  PaginationAction,
37119
37123
  {
37120
37124
  HostAction: host.ToolbarAction,
37121
37125
  compact,
37122
37126
  ariaLabel: "Last page",
37123
- disabledHint: isFetching ? "Loading source page" : "Already on the last page",
37127
+ disabledHint: unknownTotal ? "Last page is unknown" : isFetching ? "Loading source page" : "Already on the last page",
37124
37128
  visibilityClassName: "hidden sm:inline-flex",
37125
37129
  fallbackClassName: navButtonClassName,
37126
- onClick: () => onPageChange(totalPages),
37127
- disabled: isLastPageDisabled,
37130
+ onClick: () => {
37131
+ if (!unknownTotal) onPageChange(totalPages);
37132
+ },
37133
+ disabled: Boolean(unknownTotal) || isLastPageDisabled,
37128
37134
  children: /* @__PURE__ */ jsx25(ChevronsRight, { className: "h-5 w-5" })
37129
37135
  }
37130
37136
  )