@arolariu/components
Version:
🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
142 lines (141 loc) • 5.65 kB
JavaScript
"use client";
;
var __webpack_require__ = {};
(()=>{
__webpack_require__.d = (exports1, definition)=>{
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
enumerable: true,
get: definition[key]
});
};
})();
(()=>{
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
__webpack_require__.r = (exports1)=>{
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
value: 'Module'
});
Object.defineProperty(exports1, '__esModule', {
value: true
});
};
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
PaginationContent: ()=>PaginationContent,
Pagination: ()=>Pagination,
PaginationItem: ()=>PaginationItem,
PaginationNext: ()=>PaginationNext,
PaginationEllipsis: ()=>PaginationEllipsis,
PaginationLink: ()=>PaginationLink,
PaginationPrevious: ()=>PaginationPrevious
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const external_lucide_react_namespaceObject = require("lucide-react");
const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
const external_button_cjs_namespaceObject = require("./button.cjs");
function Pagination({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
role: "navigation",
"aria-label": "pagination",
"data-slot": "pagination",
className: (0, utils_cjs_namespaceObject.cn)("mx-auto flex w-full justify-center", className),
...props
});
}
function PaginationContent({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
"data-slot": "pagination-content",
className: (0, utils_cjs_namespaceObject.cn)("flex flex-row items-center gap-1", className),
...props
});
}
function PaginationItem({ ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
"data-slot": "pagination-item",
...props
});
}
function PaginationLink({ className, isActive, size = "icon", ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
"aria-current": isActive ? "page" : void 0,
"data-slot": "pagination-link",
"data-active": isActive,
className: (0, utils_cjs_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
variant: isActive ? "outline" : "ghost",
size
}), className),
...props
});
}
function PaginationPrevious({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
"aria-label": "Go to previous page",
size: "default",
className: (0, utils_cjs_namespaceObject.cn)("gap-1 px-2.5 sm:pl-2.5", className),
...props,
children: [
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {}),
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
className: "hidden sm:block",
children: "Previous"
})
]
});
}
function PaginationNext({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
"aria-label": "Go to next page",
size: "default",
className: (0, utils_cjs_namespaceObject.cn)("gap-1 px-2.5 sm:pr-2.5", className),
...props,
children: [
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
className: "hidden sm:block",
children: "Next"
}),
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {})
]
});
}
function PaginationEllipsis({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
"aria-hidden": true,
"data-slot": "pagination-ellipsis",
className: (0, utils_cjs_namespaceObject.cn)("flex size-9 items-center justify-center", className),
...props,
children: [
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MoreHorizontalIcon, {
className: "size-4"
}),
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
className: "sr-only",
children: "More pages"
})
]
});
}
exports.Pagination = __webpack_exports__.Pagination;
exports.PaginationContent = __webpack_exports__.PaginationContent;
exports.PaginationEllipsis = __webpack_exports__.PaginationEllipsis;
exports.PaginationItem = __webpack_exports__.PaginationItem;
exports.PaginationLink = __webpack_exports__.PaginationLink;
exports.PaginationNext = __webpack_exports__.PaginationNext;
exports.PaginationPrevious = __webpack_exports__.PaginationPrevious;
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
"Pagination",
"PaginationContent",
"PaginationEllipsis",
"PaginationItem",
"PaginationLink",
"PaginationNext",
"PaginationPrevious"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
value: true
});
//# sourceMappingURL=pagination.cjs.map