@underverse-ui/underverse 2.0.19 → 2.0.20
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/api-reference.json +1 -1
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -31887,6 +31887,7 @@ function DataTableHeader({
|
|
|
31887
31887
|
// src/components/DataTable/components/Pagination.tsx
|
|
31888
31888
|
var import_react35 = __toESM(require("react"), 1);
|
|
31889
31889
|
init_cn();
|
|
31890
|
+
init_radius();
|
|
31890
31891
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
31891
31892
|
function DataTablePagination({
|
|
31892
31893
|
totalItems,
|
|
@@ -31897,7 +31898,8 @@ function DataTablePagination({
|
|
|
31897
31898
|
setCurPageSize,
|
|
31898
31899
|
size,
|
|
31899
31900
|
align,
|
|
31900
|
-
paginationRange
|
|
31901
|
+
paginationRange,
|
|
31902
|
+
borderMode
|
|
31901
31903
|
}) {
|
|
31902
31904
|
const totalPages = Math.ceil(totalItems / curPageSize);
|
|
31903
31905
|
const pages = import_react35.default.useMemo(() => {
|
|
@@ -31913,7 +31915,8 @@ function DataTablePagination({
|
|
|
31913
31915
|
const controlButtonSize = size === "lg" ? "md" : "sm";
|
|
31914
31916
|
const navBtnClass = size === "sm" ? "h-6 w-6 p-0 rounded-full" : size === "lg" ? "h-8 w-8 p-0 rounded-full" : "h-7 w-7 p-0 rounded-full";
|
|
31915
31917
|
const navIconClass = size === "sm" ? "h-3.5 w-3.5" : size === "lg" ? "h-5 w-5" : "h-4 w-4";
|
|
31916
|
-
const
|
|
31918
|
+
const pageBtnRadiusClass = getBorderRadiusClass(borderMode);
|
|
31919
|
+
const pageBtnClass = size === "sm" ? "h-6 min-w-6 px-1.5 text-[11px] font-medium transition-colors" : size === "lg" ? "h-8 min-w-8 px-2.5 text-sm font-medium transition-colors" : "h-7 min-w-7 px-2 text-xs font-medium transition-colors";
|
|
31917
31920
|
const containerTextClass = size === "sm" ? "text-[11px]" : size === "lg" ? "text-sm" : "text-xs";
|
|
31918
31921
|
const pageSizeClass = size === "sm" ? "w-16" : size === "lg" ? "w-24" : "w-20";
|
|
31919
31922
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("relative flex items-center gap-2 px-1 pt-3 text-muted-foreground", containerTextClass), children: [
|
|
@@ -31943,7 +31946,7 @@ function DataTablePagination({
|
|
|
31943
31946
|
"div",
|
|
31944
31947
|
{
|
|
31945
31948
|
className: cn(
|
|
31946
|
-
"flex items-center gap-
|
|
31949
|
+
"flex items-center gap-3",
|
|
31947
31950
|
align === "center" && "absolute left-1/2 -translate-x-1/2",
|
|
31948
31951
|
align === "right" && "ml-auto"
|
|
31949
31952
|
),
|
|
@@ -31959,17 +31962,17 @@ function DataTablePagination({
|
|
|
31959
31962
|
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { className: navIconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
|
|
31960
31963
|
}
|
|
31961
31964
|
),
|
|
31962
|
-
pages.map(
|
|
31965
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex items-center gap-2", children: pages.map(
|
|
31963
31966
|
(p, i) => p === "..." ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "px-1 text-muted-foreground/60", children: "\u2026" }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
31964
31967
|
"button",
|
|
31965
31968
|
{
|
|
31966
31969
|
onClick: () => setCurPage(p),
|
|
31967
|
-
className: cn(pageBtnClass, curPage === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"),
|
|
31970
|
+
className: cn(pageBtnClass, pageBtnRadiusClass, curPage === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"),
|
|
31968
31971
|
children: p
|
|
31969
31972
|
},
|
|
31970
31973
|
p
|
|
31971
31974
|
)
|
|
31972
|
-
),
|
|
31975
|
+
) }),
|
|
31973
31976
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
31974
31977
|
Button_default,
|
|
31975
31978
|
{
|
|
@@ -32948,7 +32951,8 @@ function DataTable({
|
|
|
32948
32951
|
setCurPageSize,
|
|
32949
32952
|
size,
|
|
32950
32953
|
align: paginationAlign,
|
|
32951
|
-
paginationRange
|
|
32954
|
+
paginationRange,
|
|
32955
|
+
borderMode: resolvedBorderMode
|
|
32952
32956
|
}
|
|
32953
32957
|
)
|
|
32954
32958
|
] });
|