@algorithm-shift/design-system 1.3.112 → 1.3.114

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/index.mjs CHANGED
@@ -4307,7 +4307,7 @@ function DataTable({
4307
4307
  const handlePageSizeChange = (e) => {
4308
4308
  const newSize = Number(e.target.value);
4309
4309
  if (paginationMode === "server") {
4310
- const currentPageIndex = table.getState().pagination.pageIndex;
4310
+ const currentPageIndex = 0;
4311
4311
  onPageChange?.(currentPageIndex, newSize);
4312
4312
  setLocalPageSize(newSize);
4313
4313
  } else {
@@ -4579,26 +4579,18 @@ function DataTable({
4579
4579
  }) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx51("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
4580
4580
  ] }),
4581
4581
  pagination && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between py-3 text-sm w-full", children: [
4582
- !loading && /* @__PURE__ */ jsxs30("div", { className: "flex gap-2 items-center", children: [
4583
- /* @__PURE__ */ jsx51(
4584
- "select",
4585
- {
4586
- value: localPageSize,
4587
- onChange: handlePageSizeChange,
4588
- className: "ml-2 border rounded py-1 text-sm cursor-pointer border-blue-600",
4589
- children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs30("option", { value: size, children: [
4590
- size,
4591
- " / page"
4592
- ] }, size))
4593
- }
4594
- ),
4595
- /* @__PURE__ */ jsxs30("div", { children: [
4596
- "Page ",
4597
- table.getState().pagination.pageIndex + 1,
4598
- " of ",
4599
- pageCount
4600
- ] })
4601
- ] }),
4582
+ !loading && /* @__PURE__ */ jsx51("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ jsx51(
4583
+ "select",
4584
+ {
4585
+ value: localPageSize,
4586
+ onChange: handlePageSizeChange,
4587
+ className: "ml-2 border rounded py-1 text-sm cursor-pointer border-blue-600",
4588
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs30("option", { value: size, children: [
4589
+ size,
4590
+ " / page"
4591
+ ] }, size))
4592
+ }
4593
+ ) }),
4602
4594
  /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
4603
4595
  /* @__PURE__ */ jsx51(
4604
4596
  "button",
@@ -4609,20 +4601,6 @@ function DataTable({
4609
4601
  children: "Prev"
4610
4602
  }
4611
4603
  ),
4612
- getPageNumbers(
4613
- table.getState().pagination.pageIndex + 1,
4614
- table.getPageCount(),
4615
- 5
4616
- ).map((pageNum, index) => /* @__PURE__ */ jsx51(
4617
- "button",
4618
- {
4619
- disabled: pageNum === "...",
4620
- onClick: () => typeof pageNum === "number" && table.setPageIndex(pageNum - 1),
4621
- className: `px-2 py-1 border rounded ${table.getState().pagination.pageIndex + 1 === pageNum ? "bg-[#12715B] text-white" : "bg-white"} ${pageNum === "..." ? "cursor-default" : "cursor-pointer"}`,
4622
- children: pageNum
4623
- },
4624
- index
4625
- )),
4626
4604
  /* @__PURE__ */ jsx51(
4627
4605
  "button",
4628
4606
  {