@karakuri-ui/react 0.2.2 → 0.2.4
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/README.md +9 -0
- package/dist/components/ui/accordion.d.mts +49 -0
- package/dist/components/ui/accordion.d.ts +49 -0
- package/dist/components/ui/accordion.js +220 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/accordion.mjs +181 -0
- package/dist/components/ui/accordion.mjs.map +1 -0
- package/dist/components/ui/alert.d.mts +47 -0
- package/dist/components/ui/alert.d.ts +47 -0
- package/dist/components/ui/alert.js +223 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/alert.mjs +185 -0
- package/dist/components/ui/alert.mjs.map +1 -0
- package/dist/components/ui/avatar.d.mts +232 -0
- package/dist/components/ui/avatar.d.ts +232 -0
- package/dist/components/ui/avatar.js +250 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/avatar.mjs +209 -0
- package/dist/components/ui/avatar.mjs.map +1 -0
- package/dist/components/ui/badge.d.mts +31 -0
- package/dist/components/ui/badge.d.ts +31 -0
- package/dist/components/ui/badge.js +205 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/badge.mjs +170 -0
- package/dist/components/ui/badge.mjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.mts +57 -0
- package/dist/components/ui/breadcrumb.d.ts +57 -0
- package/dist/components/ui/breadcrumb.js +209 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/breadcrumb.mjs +168 -0
- package/dist/components/ui/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/button-group.d.mts +22 -0
- package/dist/components/ui/button-group.d.ts +22 -0
- package/dist/components/ui/button-group.js +107 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button-group.mjs +72 -0
- package/dist/components/ui/button-group.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +31 -0
- package/dist/components/ui/button.d.ts +31 -0
- package/dist/components/ui/button.js +176 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/button.mjs +141 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/card.d.mts +77 -0
- package/dist/components/ui/card.d.ts +77 -0
- package/dist/components/ui/card.js +370 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/card.mjs +328 -0
- package/dist/components/ui/card.mjs.map +1 -0
- package/dist/{chart.js → components/ui/chart.js} +29 -39
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/{chart.mjs → components/ui/chart.mjs} +21 -31
- package/dist/components/ui/chart.mjs.map +1 -0
- package/dist/components/ui/checkbox.d.mts +24 -0
- package/dist/components/ui/checkbox.d.ts +24 -0
- package/dist/components/ui/checkbox.js +173 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/checkbox.mjs +138 -0
- package/dist/components/ui/checkbox.mjs.map +1 -0
- package/dist/components/ui/divider.d.mts +27 -0
- package/dist/components/ui/divider.d.ts +27 -0
- package/dist/components/ui/divider.js +147 -0
- package/dist/components/ui/divider.js.map +1 -0
- package/dist/components/ui/divider.mjs +112 -0
- package/dist/components/ui/divider.mjs.map +1 -0
- package/dist/components/ui/drawer.d.mts +51 -0
- package/dist/components/ui/drawer.d.ts +51 -0
- package/dist/components/ui/drawer.js +225 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/drawer.mjs +178 -0
- package/dist/components/ui/drawer.mjs.map +1 -0
- package/dist/components/ui/dropdown.d.mts +59 -0
- package/dist/components/ui/dropdown.d.ts +59 -0
- package/dist/components/ui/dropdown.js +310 -0
- package/dist/components/ui/dropdown.js.map +1 -0
- package/dist/components/ui/dropdown.mjs +263 -0
- package/dist/components/ui/dropdown.mjs.map +1 -0
- package/dist/components/ui/field.d.mts +33 -0
- package/dist/components/ui/field.d.ts +33 -0
- package/dist/components/ui/field.js +146 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/field.mjs +108 -0
- package/dist/components/ui/field.mjs.map +1 -0
- package/dist/components/ui/icon-button.d.mts +20 -0
- package/dist/components/ui/icon-button.d.ts +20 -0
- package/dist/components/ui/icon-button.js +147 -0
- package/dist/components/ui/icon-button.js.map +1 -0
- package/dist/components/ui/icon-button.mjs +112 -0
- package/dist/components/ui/icon-button.mjs.map +1 -0
- package/dist/components/ui/index.d.mts +55 -0
- package/dist/components/ui/index.d.ts +55 -0
- package/dist/components/ui/index.js +476 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/index.mjs +246 -0
- package/dist/components/ui/index.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +20 -0
- package/dist/components/ui/input.d.ts +20 -0
- package/dist/components/ui/input.js +250 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/input.mjs +215 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/metric-card.d.mts +53 -0
- package/dist/components/ui/metric-card.d.ts +53 -0
- package/dist/components/ui/metric-card.js +258 -0
- package/dist/components/ui/metric-card.js.map +1 -0
- package/dist/components/ui/metric-card.mjs +217 -0
- package/dist/components/ui/metric-card.mjs.map +1 -0
- package/dist/components/ui/modal.d.mts +77 -0
- package/dist/components/ui/modal.d.ts +77 -0
- package/dist/components/ui/modal.js +396 -0
- package/dist/components/ui/modal.js.map +1 -0
- package/dist/components/ui/modal.mjs +338 -0
- package/dist/components/ui/modal.mjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.mts +139 -0
- package/dist/components/ui/navigation-menu.d.ts +139 -0
- package/dist/components/ui/navigation-menu.js +531 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/navigation-menu.mjs +488 -0
- package/dist/components/ui/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/pagination.d.mts +130 -0
- package/dist/components/ui/pagination.d.ts +130 -0
- package/dist/components/ui/pagination.js +495 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/pagination.mjs +449 -0
- package/dist/components/ui/pagination.mjs.map +1 -0
- package/dist/components/ui/popover.d.mts +41 -0
- package/dist/components/ui/popover.d.ts +41 -0
- package/dist/components/ui/popover.js +175 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/popover.mjs +133 -0
- package/dist/components/ui/popover.mjs.map +1 -0
- package/dist/components/ui/progress.d.mts +35 -0
- package/dist/components/ui/progress.d.ts +35 -0
- package/dist/components/ui/progress.js +194 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/progress.mjs +159 -0
- package/dist/components/ui/progress.mjs.map +1 -0
- package/dist/components/ui/radio-group.d.mts +40 -0
- package/dist/components/ui/radio-group.d.ts +40 -0
- package/dist/components/ui/radio-group.js +177 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/radio-group.mjs +140 -0
- package/dist/components/ui/radio-group.mjs.map +1 -0
- package/dist/components/ui/segmented.d.mts +30 -0
- package/dist/components/ui/segmented.d.ts +30 -0
- package/dist/components/ui/segmented.js +241 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/segmented.mjs +204 -0
- package/dist/components/ui/segmented.mjs.map +1 -0
- package/dist/components/ui/select.d.mts +31 -0
- package/dist/components/ui/select.d.ts +31 -0
- package/dist/components/ui/select.js +317 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/select.mjs +276 -0
- package/dist/components/ui/select.mjs.map +1 -0
- package/dist/components/ui/skeleton.d.mts +26 -0
- package/dist/components/ui/skeleton.d.ts +26 -0
- package/dist/components/ui/skeleton.js +144 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/skeleton.mjs +109 -0
- package/dist/components/ui/skeleton.mjs.map +1 -0
- package/dist/components/ui/slider.d.mts +38 -0
- package/dist/components/ui/slider.d.ts +38 -0
- package/dist/components/ui/slider.js +180 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/slider.mjs +145 -0
- package/dist/components/ui/slider.mjs.map +1 -0
- package/dist/components/ui/spinner.d.mts +23 -0
- package/dist/components/ui/spinner.d.ts +23 -0
- package/dist/components/ui/spinner.js +471 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/spinner.mjs +436 -0
- package/dist/components/ui/spinner.mjs.map +1 -0
- package/dist/components/ui/switch.d.mts +22 -0
- package/dist/components/ui/switch.d.ts +22 -0
- package/dist/components/ui/switch.js +173 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/switch.mjs +138 -0
- package/dist/components/ui/switch.mjs.map +1 -0
- package/dist/components/ui/table.d.mts +74 -0
- package/dist/components/ui/table.d.ts +74 -0
- package/dist/components/ui/table.js +240 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/table.mjs +199 -0
- package/dist/components/ui/table.mjs.map +1 -0
- package/dist/components/ui/tabs.d.mts +40 -0
- package/dist/components/ui/tabs.d.ts +40 -0
- package/dist/components/ui/tabs.js +238 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/tabs.mjs +199 -0
- package/dist/components/ui/tabs.mjs.map +1 -0
- package/dist/components/ui/textarea.d.mts +19 -0
- package/dist/components/ui/textarea.d.ts +19 -0
- package/dist/components/ui/textarea.js +181 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/textarea.mjs +146 -0
- package/dist/components/ui/textarea.mjs.map +1 -0
- package/dist/components/ui/toast.d.mts +93 -0
- package/dist/components/ui/toast.d.ts +93 -0
- package/dist/components/ui/toast.js +429 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toast.mjs +393 -0
- package/dist/components/ui/toast.mjs.map +1 -0
- package/dist/components/ui/toggle-group.d.mts +47 -0
- package/dist/components/ui/toggle-group.d.ts +47 -0
- package/dist/components/ui/toggle-group.js +186 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle-group.mjs +149 -0
- package/dist/components/ui/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggle.d.mts +19 -0
- package/dist/components/ui/toggle.d.ts +19 -0
- package/dist/components/ui/toggle.js +194 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/toggle.mjs +159 -0
- package/dist/components/ui/toggle.mjs.map +1 -0
- package/dist/components/ui/tooltip.d.mts +37 -0
- package/dist/components/ui/tooltip.d.ts +37 -0
- package/dist/components/ui/tooltip.js +137 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/tooltip.mjs +96 -0
- package/dist/components/ui/tooltip.mjs.map +1 -0
- package/dist/lib/utils.d.mts +10 -0
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.js +33 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +9 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/chart.js.map +0 -1
- package/dist/chart.mjs.map +0 -1
- package/dist/index.d.mts +0 -1636
- package/dist/index.d.ts +0 -1636
- package/dist/index.js +0 -7291
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -7048
- package/dist/index.mjs.map +0 -1
- /package/dist/{chart.d.mts → components/ui/chart.d.mts} +0 -0
- /package/dist/{chart.d.ts → components/ui/chart.d.ts} +0 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var pagination_exports = {};
|
|
31
|
+
__export(pagination_exports, {
|
|
32
|
+
Pagination: () => Pagination,
|
|
33
|
+
PaginationContent: () => PaginationContent,
|
|
34
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
35
|
+
PaginationFirst: () => PaginationFirst,
|
|
36
|
+
PaginationItem: () => PaginationItem,
|
|
37
|
+
PaginationItems: () => PaginationItems,
|
|
38
|
+
PaginationLast: () => PaginationLast,
|
|
39
|
+
PaginationLink: () => PaginationLink,
|
|
40
|
+
PaginationNext: () => PaginationNext,
|
|
41
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
42
|
+
paginationItemVariants: () => paginationItemVariants,
|
|
43
|
+
paginationSizeMap: () => paginationSizeMap,
|
|
44
|
+
usePagination: () => usePagination
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(pagination_exports);
|
|
47
|
+
var React = __toESM(require("react"));
|
|
48
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
49
|
+
var import_utils = require("../../lib/utils");
|
|
50
|
+
function ChevronLeftIcon({ className }) {
|
|
51
|
+
return /* @__PURE__ */ React.createElement(
|
|
52
|
+
"svg",
|
|
53
|
+
{
|
|
54
|
+
className,
|
|
55
|
+
fill: "none",
|
|
56
|
+
viewBox: "0 0 24 24",
|
|
57
|
+
stroke: "currentColor",
|
|
58
|
+
strokeWidth: 2
|
|
59
|
+
},
|
|
60
|
+
/* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" })
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function ChevronRightIcon({ className }) {
|
|
64
|
+
return /* @__PURE__ */ React.createElement(
|
|
65
|
+
"svg",
|
|
66
|
+
{
|
|
67
|
+
className,
|
|
68
|
+
fill: "none",
|
|
69
|
+
viewBox: "0 0 24 24",
|
|
70
|
+
stroke: "currentColor",
|
|
71
|
+
strokeWidth: 2
|
|
72
|
+
},
|
|
73
|
+
/* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function ChevronsLeftIcon({ className }) {
|
|
77
|
+
return /* @__PURE__ */ React.createElement(
|
|
78
|
+
"svg",
|
|
79
|
+
{
|
|
80
|
+
className,
|
|
81
|
+
fill: "none",
|
|
82
|
+
viewBox: "0 0 24 24",
|
|
83
|
+
stroke: "currentColor",
|
|
84
|
+
strokeWidth: 2
|
|
85
|
+
},
|
|
86
|
+
/* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 17l-5-5 5-5M18 17l-5-5 5-5" })
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function ChevronsRightIcon({ className }) {
|
|
90
|
+
return /* @__PURE__ */ React.createElement(
|
|
91
|
+
"svg",
|
|
92
|
+
{
|
|
93
|
+
className,
|
|
94
|
+
fill: "none",
|
|
95
|
+
viewBox: "0 0 24 24",
|
|
96
|
+
stroke: "currentColor",
|
|
97
|
+
strokeWidth: 2
|
|
98
|
+
},
|
|
99
|
+
/* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 7l5 5-5 5M6 7l5 5-5 5" })
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function EllipsisIcon({ className }) {
|
|
103
|
+
return /* @__PURE__ */ React.createElement(
|
|
104
|
+
"svg",
|
|
105
|
+
{
|
|
106
|
+
className,
|
|
107
|
+
fill: "currentColor",
|
|
108
|
+
viewBox: "0 0 24 24"
|
|
109
|
+
},
|
|
110
|
+
/* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "12", r: "1.5" }),
|
|
111
|
+
/* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
112
|
+
/* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "12", r: "1.5" })
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function range(start, end) {
|
|
116
|
+
const result = [];
|
|
117
|
+
for (let i = start; i <= end; i++) result.push(i);
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
function usePagination({
|
|
121
|
+
total,
|
|
122
|
+
siblings = 1,
|
|
123
|
+
boundaries = 1,
|
|
124
|
+
page
|
|
125
|
+
}) {
|
|
126
|
+
if (total <= 0) return [];
|
|
127
|
+
const totalPageNumbers = siblings * 2 + 3 + boundaries * 2;
|
|
128
|
+
if (totalPageNumbers >= total) {
|
|
129
|
+
return range(1, total);
|
|
130
|
+
}
|
|
131
|
+
const leftSiblingIndex = Math.max(page - siblings, boundaries + 1);
|
|
132
|
+
const rightSiblingIndex = Math.min(page + siblings, total - boundaries);
|
|
133
|
+
const showLeftDots = leftSiblingIndex > boundaries + 2;
|
|
134
|
+
const showRightDots = rightSiblingIndex < total - boundaries - 1;
|
|
135
|
+
if (!showLeftDots && showRightDots) {
|
|
136
|
+
const leftItemCount = 3 + 2 * siblings + boundaries;
|
|
137
|
+
const leftRange = range(1, leftItemCount);
|
|
138
|
+
return [...leftRange, "dots", ...range(total - boundaries + 1, total)];
|
|
139
|
+
}
|
|
140
|
+
if (showLeftDots && !showRightDots) {
|
|
141
|
+
const rightItemCount = 3 + 2 * siblings + boundaries;
|
|
142
|
+
const rightRange = range(total - rightItemCount + 1, total);
|
|
143
|
+
return [...range(1, boundaries), "dots", ...rightRange];
|
|
144
|
+
}
|
|
145
|
+
return [
|
|
146
|
+
...range(1, boundaries),
|
|
147
|
+
"dots",
|
|
148
|
+
...range(leftSiblingIndex, rightSiblingIndex),
|
|
149
|
+
"dots",
|
|
150
|
+
...range(total - boundaries + 1, total)
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
const PaginationContext = React.createContext(null);
|
|
154
|
+
function usePaginationContext() {
|
|
155
|
+
const ctx = React.useContext(PaginationContext);
|
|
156
|
+
if (!ctx) throw new Error("Pagination components must be used within <Pagination>");
|
|
157
|
+
return ctx;
|
|
158
|
+
}
|
|
159
|
+
const paginationSizeMap = {
|
|
160
|
+
xs: { item: "h-7 min-w-7 text-xs", icon: "icon-xs", gap: "gap-1" },
|
|
161
|
+
sm: { item: "h-8 min-w-8 text-sm", icon: "icon-xs", gap: "gap-1" },
|
|
162
|
+
default: { item: "h-9 min-w-9 text-md", icon: "icon-sm", gap: "gap-1" },
|
|
163
|
+
lg: { item: "h-10 min-w-10 text-md", icon: "icon-sm", gap: "gap-1.5" },
|
|
164
|
+
xl: { item: "h-12 min-w-12 text-base", icon: "icon-sm", gap: "gap-1.5" }
|
|
165
|
+
};
|
|
166
|
+
const paginationItemVariants = (0, import_class_variance_authority.cva)(
|
|
167
|
+
"inline-flex items-center justify-center select-none transition-colors duration-fast font-semibold focus-visible:focus-ring",
|
|
168
|
+
{
|
|
169
|
+
variants: {
|
|
170
|
+
radius: {
|
|
171
|
+
sm: "rounded-sm",
|
|
172
|
+
base: "rounded",
|
|
173
|
+
md: "rounded-md",
|
|
174
|
+
lg: "rounded-lg",
|
|
175
|
+
xl: "rounded-xl",
|
|
176
|
+
full: "rounded-full"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
defaultVariants: {
|
|
180
|
+
radius: "md"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
const activeColorMap = {
|
|
185
|
+
default: "bg-foreground text-background",
|
|
186
|
+
primary: "bg-primary text-primary-foreground"
|
|
187
|
+
};
|
|
188
|
+
const ghostActiveColorMap = {
|
|
189
|
+
default: "bg-background-muted text-foreground font-bold",
|
|
190
|
+
primary: "bg-background-muted text-primary"
|
|
191
|
+
};
|
|
192
|
+
function getItemClasses(variant, color, isActive, disabled) {
|
|
193
|
+
if (disabled) {
|
|
194
|
+
return variant === "outline" ? "border border-border text-disabled-foreground pointer-events-none opacity-50" : "border border-transparent text-disabled-foreground pointer-events-none opacity-50";
|
|
195
|
+
}
|
|
196
|
+
if (isActive) {
|
|
197
|
+
switch (variant) {
|
|
198
|
+
case "outline":
|
|
199
|
+
return `border ${color === "default" ? "border-foreground" : "border-primary"} ${activeColorMap[color]}`;
|
|
200
|
+
case "ghost":
|
|
201
|
+
return `border border-transparent ${ghostActiveColorMap[color]}`;
|
|
202
|
+
case "default":
|
|
203
|
+
default:
|
|
204
|
+
return `border border-transparent ${activeColorMap[color]}`;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
switch (variant) {
|
|
208
|
+
case "outline":
|
|
209
|
+
return "border border-border text-text-muted hover:bg-background-muted hover:text-foreground";
|
|
210
|
+
case "ghost":
|
|
211
|
+
return "border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground";
|
|
212
|
+
case "default":
|
|
213
|
+
default:
|
|
214
|
+
return "border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground";
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const PaginationRoot = React.forwardRef(
|
|
218
|
+
({
|
|
219
|
+
className,
|
|
220
|
+
total = 1,
|
|
221
|
+
value,
|
|
222
|
+
defaultValue = 1,
|
|
223
|
+
onChange,
|
|
224
|
+
siblings = 1,
|
|
225
|
+
boundaries = 1,
|
|
226
|
+
size = "default",
|
|
227
|
+
variant = "default",
|
|
228
|
+
color = "default",
|
|
229
|
+
radius = "md",
|
|
230
|
+
disabled = false,
|
|
231
|
+
withControls = true,
|
|
232
|
+
withEdges = false,
|
|
233
|
+
loop = false,
|
|
234
|
+
children,
|
|
235
|
+
...props
|
|
236
|
+
}, ref) => {
|
|
237
|
+
const [internalPage, setInternalPage] = React.useState(defaultValue);
|
|
238
|
+
const isControlled = value !== void 0;
|
|
239
|
+
const page = isControlled ? value : internalPage;
|
|
240
|
+
const handlePageChange = React.useCallback((newPage) => {
|
|
241
|
+
if (disabled) return;
|
|
242
|
+
const clamped = Math.max(1, Math.min(total, newPage));
|
|
243
|
+
if (!isControlled) setInternalPage(clamped);
|
|
244
|
+
onChange?.(clamped);
|
|
245
|
+
}, [disabled, total, isControlled, onChange]);
|
|
246
|
+
const paginationRange = usePagination({ total, siblings, boundaries, page });
|
|
247
|
+
const contextValue = React.useMemo(() => ({
|
|
248
|
+
page,
|
|
249
|
+
total,
|
|
250
|
+
siblings,
|
|
251
|
+
boundaries,
|
|
252
|
+
size,
|
|
253
|
+
variant,
|
|
254
|
+
color,
|
|
255
|
+
radius,
|
|
256
|
+
disabled,
|
|
257
|
+
loop,
|
|
258
|
+
onPageChange: handlePageChange,
|
|
259
|
+
paginationRange
|
|
260
|
+
}), [page, total, siblings, boundaries, size, variant, color, radius, disabled, loop, handlePageChange, paginationRange]);
|
|
261
|
+
return /* @__PURE__ */ React.createElement(PaginationContext.Provider, { value: contextValue }, /* @__PURE__ */ React.createElement(
|
|
262
|
+
"nav",
|
|
263
|
+
{
|
|
264
|
+
ref,
|
|
265
|
+
role: "navigation",
|
|
266
|
+
"aria-label": "pagination",
|
|
267
|
+
className: (0, import_utils.cn)("", className),
|
|
268
|
+
...props
|
|
269
|
+
},
|
|
270
|
+
children ?? /* @__PURE__ */ React.createElement(PaginationContent, null, withEdges && /* @__PURE__ */ React.createElement(PaginationItem, null, /* @__PURE__ */ React.createElement(PaginationFirst, null)), withControls && /* @__PURE__ */ React.createElement(PaginationItem, null, /* @__PURE__ */ React.createElement(PaginationPrevious, null)), /* @__PURE__ */ React.createElement(PaginationItems, null), withControls && /* @__PURE__ */ React.createElement(PaginationItem, null, /* @__PURE__ */ React.createElement(PaginationNext, null)), withEdges && /* @__PURE__ */ React.createElement(PaginationItem, null, /* @__PURE__ */ React.createElement(PaginationLast, null)))
|
|
271
|
+
));
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
PaginationRoot.displayName = "Pagination";
|
|
275
|
+
const PaginationContent = React.forwardRef(
|
|
276
|
+
({ className, ...props }, ref) => {
|
|
277
|
+
const { size } = usePaginationContext();
|
|
278
|
+
const sizeClass = paginationSizeMap[size];
|
|
279
|
+
return /* @__PURE__ */ React.createElement(
|
|
280
|
+
"ul",
|
|
281
|
+
{
|
|
282
|
+
ref,
|
|
283
|
+
className: (0, import_utils.cn)("flex flex-wrap items-center", sizeClass.gap, className),
|
|
284
|
+
...props
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
PaginationContent.displayName = "PaginationContent";
|
|
290
|
+
const PaginationItem = React.forwardRef(
|
|
291
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("li", { ref, className: (0, import_utils.cn)("", className), ...props })
|
|
292
|
+
);
|
|
293
|
+
PaginationItem.displayName = "PaginationItem";
|
|
294
|
+
const PaginationLink = React.forwardRef(
|
|
295
|
+
({ className, page: targetPage, isActive: isActiveProp, ...props }, ref) => {
|
|
296
|
+
const ctx = usePaginationContext();
|
|
297
|
+
const isActive = isActiveProp ?? ctx.page === targetPage;
|
|
298
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
299
|
+
return /* @__PURE__ */ React.createElement(
|
|
300
|
+
"button",
|
|
301
|
+
{
|
|
302
|
+
ref,
|
|
303
|
+
type: "button",
|
|
304
|
+
"aria-current": isActive ? "page" : void 0,
|
|
305
|
+
"aria-label": `Go to page ${targetPage}`,
|
|
306
|
+
disabled: ctx.disabled,
|
|
307
|
+
onClick: () => ctx.onPageChange(targetPage),
|
|
308
|
+
className: (0, import_utils.cn)(
|
|
309
|
+
paginationItemVariants({ radius: ctx.radius }),
|
|
310
|
+
sizeClass.item,
|
|
311
|
+
getItemClasses(ctx.variant, ctx.color, isActive, ctx.disabled),
|
|
312
|
+
className
|
|
313
|
+
),
|
|
314
|
+
...props
|
|
315
|
+
},
|
|
316
|
+
targetPage
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
);
|
|
320
|
+
PaginationLink.displayName = "PaginationLink";
|
|
321
|
+
const PaginationPrevious = React.forwardRef(
|
|
322
|
+
({ className, icon, ...props }, ref) => {
|
|
323
|
+
const ctx = usePaginationContext();
|
|
324
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
325
|
+
const isDisabled = ctx.disabled || !ctx.loop && ctx.page <= 1;
|
|
326
|
+
const handleClick = () => {
|
|
327
|
+
if (ctx.page <= 1) {
|
|
328
|
+
if (ctx.loop) ctx.onPageChange(ctx.total);
|
|
329
|
+
} else {
|
|
330
|
+
ctx.onPageChange(ctx.page - 1);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
return /* @__PURE__ */ React.createElement(
|
|
334
|
+
"button",
|
|
335
|
+
{
|
|
336
|
+
ref,
|
|
337
|
+
type: "button",
|
|
338
|
+
"aria-label": "Go to previous page",
|
|
339
|
+
disabled: isDisabled,
|
|
340
|
+
onClick: handleClick,
|
|
341
|
+
className: (0, import_utils.cn)(
|
|
342
|
+
paginationItemVariants({ radius: ctx.radius }),
|
|
343
|
+
sizeClass.item,
|
|
344
|
+
getItemClasses(ctx.variant, ctx.color, false, isDisabled),
|
|
345
|
+
className
|
|
346
|
+
),
|
|
347
|
+
...props
|
|
348
|
+
},
|
|
349
|
+
icon ?? /* @__PURE__ */ React.createElement(ChevronLeftIcon, { className: sizeClass.icon })
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
354
|
+
const PaginationNext = React.forwardRef(
|
|
355
|
+
({ className, icon, ...props }, ref) => {
|
|
356
|
+
const ctx = usePaginationContext();
|
|
357
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
358
|
+
const isDisabled = ctx.disabled || !ctx.loop && ctx.page >= ctx.total;
|
|
359
|
+
const handleClick = () => {
|
|
360
|
+
if (ctx.page >= ctx.total) {
|
|
361
|
+
if (ctx.loop) ctx.onPageChange(1);
|
|
362
|
+
} else {
|
|
363
|
+
ctx.onPageChange(ctx.page + 1);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
return /* @__PURE__ */ React.createElement(
|
|
367
|
+
"button",
|
|
368
|
+
{
|
|
369
|
+
ref,
|
|
370
|
+
type: "button",
|
|
371
|
+
"aria-label": "Go to next page",
|
|
372
|
+
disabled: isDisabled,
|
|
373
|
+
onClick: handleClick,
|
|
374
|
+
className: (0, import_utils.cn)(
|
|
375
|
+
paginationItemVariants({ radius: ctx.radius }),
|
|
376
|
+
sizeClass.item,
|
|
377
|
+
getItemClasses(ctx.variant, ctx.color, false, isDisabled),
|
|
378
|
+
className
|
|
379
|
+
),
|
|
380
|
+
...props
|
|
381
|
+
},
|
|
382
|
+
icon ?? /* @__PURE__ */ React.createElement(ChevronRightIcon, { className: sizeClass.icon })
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
PaginationNext.displayName = "PaginationNext";
|
|
387
|
+
const PaginationFirst = React.forwardRef(
|
|
388
|
+
({ className, icon, ...props }, ref) => {
|
|
389
|
+
const ctx = usePaginationContext();
|
|
390
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
391
|
+
const isDisabled = ctx.disabled || ctx.page <= 1;
|
|
392
|
+
return /* @__PURE__ */ React.createElement(
|
|
393
|
+
"button",
|
|
394
|
+
{
|
|
395
|
+
ref,
|
|
396
|
+
type: "button",
|
|
397
|
+
"aria-label": "Go to first page",
|
|
398
|
+
disabled: isDisabled,
|
|
399
|
+
onClick: () => ctx.onPageChange(1),
|
|
400
|
+
className: (0, import_utils.cn)(
|
|
401
|
+
paginationItemVariants({ radius: ctx.radius }),
|
|
402
|
+
sizeClass.item,
|
|
403
|
+
getItemClasses(ctx.variant, ctx.color, false, isDisabled),
|
|
404
|
+
className
|
|
405
|
+
),
|
|
406
|
+
...props
|
|
407
|
+
},
|
|
408
|
+
icon ?? /* @__PURE__ */ React.createElement(ChevronsLeftIcon, { className: sizeClass.icon })
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
PaginationFirst.displayName = "PaginationFirst";
|
|
413
|
+
const PaginationLast = React.forwardRef(
|
|
414
|
+
({ className, icon, ...props }, ref) => {
|
|
415
|
+
const ctx = usePaginationContext();
|
|
416
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
417
|
+
const isDisabled = ctx.disabled || ctx.page >= ctx.total;
|
|
418
|
+
return /* @__PURE__ */ React.createElement(
|
|
419
|
+
"button",
|
|
420
|
+
{
|
|
421
|
+
ref,
|
|
422
|
+
type: "button",
|
|
423
|
+
"aria-label": "Go to last page",
|
|
424
|
+
disabled: isDisabled,
|
|
425
|
+
onClick: () => ctx.onPageChange(ctx.total),
|
|
426
|
+
className: (0, import_utils.cn)(
|
|
427
|
+
paginationItemVariants({ radius: ctx.radius }),
|
|
428
|
+
sizeClass.item,
|
|
429
|
+
getItemClasses(ctx.variant, ctx.color, false, isDisabled),
|
|
430
|
+
className
|
|
431
|
+
),
|
|
432
|
+
...props
|
|
433
|
+
},
|
|
434
|
+
icon ?? /* @__PURE__ */ React.createElement(ChevronsRightIcon, { className: sizeClass.icon })
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
PaginationLast.displayName = "PaginationLast";
|
|
439
|
+
const PaginationEllipsis = React.forwardRef(
|
|
440
|
+
({ className, ...props }, ref) => {
|
|
441
|
+
const ctx = usePaginationContext();
|
|
442
|
+
const sizeClass = paginationSizeMap[ctx.size];
|
|
443
|
+
return /* @__PURE__ */ React.createElement(
|
|
444
|
+
"span",
|
|
445
|
+
{
|
|
446
|
+
ref,
|
|
447
|
+
"aria-hidden": "true",
|
|
448
|
+
className: (0, import_utils.cn)(
|
|
449
|
+
"inline-flex items-center justify-center text-text-muted",
|
|
450
|
+
sizeClass.item,
|
|
451
|
+
className
|
|
452
|
+
),
|
|
453
|
+
...props
|
|
454
|
+
},
|
|
455
|
+
/* @__PURE__ */ React.createElement(EllipsisIcon, { className: sizeClass.icon }),
|
|
456
|
+
/* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "More pages")
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
461
|
+
const PaginationItems = React.forwardRef(
|
|
462
|
+
({ className, ...props }, ref) => {
|
|
463
|
+
const ctx = usePaginationContext();
|
|
464
|
+
return /* @__PURE__ */ React.createElement("div", { ref, className: (0, import_utils.cn)("contents", className), ...props }, ctx.paginationRange.map((item, index) => /* @__PURE__ */ React.createElement(PaginationItem, { key: `${item}-${index}` }, item === "dots" ? /* @__PURE__ */ React.createElement(PaginationEllipsis, null) : /* @__PURE__ */ React.createElement(PaginationLink, { page: item }))));
|
|
465
|
+
}
|
|
466
|
+
);
|
|
467
|
+
PaginationItems.displayName = "PaginationItems";
|
|
468
|
+
const Pagination = Object.assign(PaginationRoot, {
|
|
469
|
+
Content: PaginationContent,
|
|
470
|
+
Item: PaginationItem,
|
|
471
|
+
Link: PaginationLink,
|
|
472
|
+
Previous: PaginationPrevious,
|
|
473
|
+
Next: PaginationNext,
|
|
474
|
+
First: PaginationFirst,
|
|
475
|
+
Last: PaginationLast,
|
|
476
|
+
Ellipsis: PaginationEllipsis,
|
|
477
|
+
Items: PaginationItems
|
|
478
|
+
});
|
|
479
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
480
|
+
0 && (module.exports = {
|
|
481
|
+
Pagination,
|
|
482
|
+
PaginationContent,
|
|
483
|
+
PaginationEllipsis,
|
|
484
|
+
PaginationFirst,
|
|
485
|
+
PaginationItem,
|
|
486
|
+
PaginationItems,
|
|
487
|
+
PaginationLast,
|
|
488
|
+
PaginationLink,
|
|
489
|
+
PaginationNext,
|
|
490
|
+
PaginationPrevious,
|
|
491
|
+
paginationItemVariants,
|
|
492
|
+
paginationSizeMap,
|
|
493
|
+
usePagination
|
|
494
|
+
});
|
|
495
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/pagination.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\n// ─── Built-in Icons ──────────────────────────────────────\n\nfunction ChevronLeftIcon({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15 19l-7-7 7-7\" />\n </svg>\n )\n}\n\nfunction ChevronRightIcon({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n )\n}\n\nfunction ChevronsLeftIcon({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M11 17l-5-5 5-5M18 17l-5-5 5-5\" />\n </svg>\n )\n}\n\nfunction ChevronsRightIcon({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M13 7l5 5-5 5M6 7l5 5-5 5\" />\n </svg>\n )\n}\n\nfunction EllipsisIcon({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <circle cx=\"6\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.5\" />\n <circle cx=\"18\" cy=\"12\" r=\"1.5\" />\n </svg>\n )\n}\n\n// ─── usePagination Hook ──────────────────────────────────\n\nexport type PaginationRange = (number | 'dots')[]\n\nexport interface UsePaginationProps {\n /** Total number of pages */\n total: number\n /** Number of siblings on each side of current page */\n siblings?: number\n /** Number of boundary pages at start/end */\n boundaries?: number\n /** Current active page (1-based) */\n page: number\n}\n\nfunction range(start: number, end: number): number[] {\n const result: number[] = []\n for (let i = start; i <= end; i++) result.push(i)\n return result\n}\n\nexport function usePagination({\n total,\n siblings = 1,\n boundaries = 1,\n page,\n}: UsePaginationProps): PaginationRange {\n if (total <= 0) return []\n\n const totalPageNumbers = siblings * 2 + 3 + boundaries * 2\n if (totalPageNumbers >= total) {\n return range(1, total)\n }\n\n const leftSiblingIndex = Math.max(page - siblings, boundaries + 1)\n const rightSiblingIndex = Math.min(page + siblings, total - boundaries)\n\n const showLeftDots = leftSiblingIndex > boundaries + 2\n const showRightDots = rightSiblingIndex < total - boundaries - 1\n\n if (!showLeftDots && showRightDots) {\n const leftItemCount = 3 + 2 * siblings + boundaries\n const leftRange = range(1, leftItemCount)\n return [...leftRange, 'dots' as const, ...range(total - boundaries + 1, total)]\n }\n\n if (showLeftDots && !showRightDots) {\n const rightItemCount = 3 + 2 * siblings + boundaries\n const rightRange = range(total - rightItemCount + 1, total)\n return [...range(1, boundaries), 'dots' as const, ...rightRange]\n }\n\n return [\n ...range(1, boundaries),\n 'dots' as const,\n ...range(leftSiblingIndex, rightSiblingIndex),\n 'dots' as const,\n ...range(total - boundaries + 1, total),\n ]\n}\n\n// ─── Context ─────────────────────────────────────────────\n\nexport type PaginationSize = 'xs' | 'sm' | 'default' | 'lg' | 'xl'\nexport type PaginationVariant = 'default' | 'outline' | 'ghost'\nexport type PaginationColor = 'default' | 'primary'\nexport type PaginationRadius = 'sm' | 'base' | 'md' | 'lg' | 'xl' | 'full'\n\ntype PaginationContextValue = {\n page: number\n total: number\n siblings: number\n boundaries: number\n size: PaginationSize\n variant: PaginationVariant\n color: PaginationColor\n radius: PaginationRadius\n disabled: boolean\n loop: boolean\n onPageChange: (page: number) => void\n paginationRange: PaginationRange\n}\n\nconst PaginationContext = React.createContext<PaginationContextValue | null>(null)\n\nfunction usePaginationContext() {\n const ctx = React.useContext(PaginationContext)\n if (!ctx) throw new Error('Pagination components must be used within <Pagination>')\n return ctx\n}\n\n// ─── Size Map ────────────────────────────────────────────\n\nconst paginationSizeMap = {\n xs: { item: 'h-7 min-w-7 text-xs', icon: 'icon-xs', gap: 'gap-1' },\n sm: { item: 'h-8 min-w-8 text-sm', icon: 'icon-xs', gap: 'gap-1' },\n default: { item: 'h-9 min-w-9 text-md', icon: 'icon-sm', gap: 'gap-1' },\n lg: { item: 'h-10 min-w-10 text-md', icon: 'icon-sm', gap: 'gap-1.5' },\n xl: { item: 'h-12 min-w-12 text-base', icon: 'icon-sm', gap: 'gap-1.5' },\n} as const\n\n// ─── Item Variants (CVA) ─────────────────────────────────\n\nconst paginationItemVariants = cva(\n 'inline-flex items-center justify-center select-none transition-colors duration-fast font-semibold focus-visible:focus-ring',\n {\n variants: {\n radius: {\n sm: 'rounded-sm',\n base: 'rounded',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n full: 'rounded-full',\n },\n },\n defaultVariants: {\n radius: 'md',\n },\n }\n)\n\n// ─── Variant Style Helpers ───────────────────────────────\n\n// Active color maps\nconst activeColorMap = {\n default: 'bg-foreground text-background',\n primary: 'bg-primary text-primary-foreground',\n} as const\n\nconst ghostActiveColorMap = {\n default: 'bg-background-muted text-foreground font-bold',\n primary: 'bg-background-muted text-primary',\n} as const\n\nfunction getItemClasses(variant: PaginationVariant, color: PaginationColor, isActive: boolean, disabled: boolean) {\n if (disabled) {\n return variant === 'outline'\n ? 'border border-border text-disabled-foreground pointer-events-none opacity-50'\n : 'border border-transparent text-disabled-foreground pointer-events-none opacity-50'\n }\n if (isActive) {\n switch (variant) {\n case 'outline':\n return `border ${color === 'default' ? 'border-foreground' : 'border-primary'} ${activeColorMap[color]}`\n case 'ghost':\n return `border border-transparent ${ghostActiveColorMap[color]}`\n case 'default':\n default:\n return `border border-transparent ${activeColorMap[color]}`\n }\n }\n switch (variant) {\n case 'outline':\n return 'border border-border text-text-muted hover:bg-background-muted hover:text-foreground'\n case 'ghost':\n return 'border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground'\n case 'default':\n default:\n return 'border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground'\n }\n}\n\n// ─── Pagination (Root) ───────────────────────────────────\n\nexport interface PaginationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'onChange'> {\n /** Total number of pages */\n total?: number\n /** Controlled active page (1-based) */\n value?: number\n /** Initial page for uncontrolled mode */\n defaultValue?: number\n /** Page change callback */\n onChange?: (page: number) => void\n /** Number of siblings on each side of current page */\n siblings?: number\n /** Number of boundary pages at start/end */\n boundaries?: number\n /** Component size */\n size?: PaginationSize\n /** Visual variant */\n variant?: PaginationVariant\n /** Active page color */\n color?: PaginationColor\n /** Border radius */\n radius?: PaginationRadius\n /** Disable all interactions */\n disabled?: boolean\n /** Show previous/next controls */\n withControls?: boolean\n /** Show first/last controls */\n withEdges?: boolean\n /** Loop from last to first and vice versa */\n loop?: boolean\n}\n\nconst PaginationRoot = React.forwardRef<HTMLElement, PaginationProps>(\n ({\n className,\n total = 1,\n value,\n defaultValue = 1,\n onChange,\n siblings = 1,\n boundaries = 1,\n size = 'default',\n variant = 'default',\n color = 'default',\n radius = 'md',\n disabled = false,\n withControls = true,\n withEdges = false,\n loop = false,\n children,\n ...props\n }, ref) => {\n // Controlled / Uncontrolled\n const [internalPage, setInternalPage] = React.useState(defaultValue)\n const isControlled = value !== undefined\n const page = isControlled ? value : internalPage\n\n const handlePageChange = React.useCallback((newPage: number) => {\n if (disabled) return\n const clamped = Math.max(1, Math.min(total, newPage))\n if (!isControlled) setInternalPage(clamped)\n onChange?.(clamped)\n }, [disabled, total, isControlled, onChange])\n\n const paginationRange = usePagination({ total, siblings, boundaries, page })\n\n const contextValue = React.useMemo<PaginationContextValue>(() => ({\n page,\n total,\n siblings,\n boundaries,\n size,\n variant,\n color,\n radius,\n disabled,\n loop,\n onPageChange: handlePageChange,\n paginationRange,\n }), [page, total, siblings, boundaries, size, variant, color, radius, disabled, loop, handlePageChange, paginationRange])\n\n return (\n <PaginationContext.Provider value={contextValue}>\n <nav\n ref={ref}\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('', className)}\n {...props}\n >\n {children ?? (\n <PaginationContent>\n {withEdges && <PaginationItem><PaginationFirst /></PaginationItem>}\n {withControls && <PaginationItem><PaginationPrevious /></PaginationItem>}\n <PaginationItems />\n {withControls && <PaginationItem><PaginationNext /></PaginationItem>}\n {withEdges && <PaginationItem><PaginationLast /></PaginationItem>}\n </PaginationContent>\n )}\n </nav>\n </PaginationContext.Provider>\n )\n }\n)\nPaginationRoot.displayName = 'Pagination'\n\n// ─── PaginationContent ───────────────────────────────────\n\nconst PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentPropsWithoutRef<'ul'>>(\n ({ className, ...props }, ref) => {\n const { size } = usePaginationContext()\n const sizeClass = paginationSizeMap[size]\n return (\n <ul\n ref={ref}\n className={cn('flex flex-wrap items-center', sizeClass.gap, className)}\n {...props}\n />\n )\n }\n)\nPaginationContent.displayName = 'PaginationContent'\n\n// ─── PaginationItem ──────────────────────────────────────\n\nconst PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<'li'>>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={cn('', className)} {...props} />\n )\n)\nPaginationItem.displayName = 'PaginationItem'\n\n// ─── PaginationLink ──────────────────────────────────────\n\nexport interface PaginationLinkProps extends React.ComponentPropsWithoutRef<'button'> {\n /** Page number this link navigates to */\n page: number\n /** Whether this page is currently active (auto-detected from context if omitted) */\n isActive?: boolean\n}\n\nconst PaginationLink = React.forwardRef<HTMLButtonElement, PaginationLinkProps>(\n ({ className, page: targetPage, isActive: isActiveProp, ...props }, ref) => {\n const ctx = usePaginationContext()\n const isActive = isActiveProp ?? (ctx.page === targetPage)\n const sizeClass = paginationSizeMap[ctx.size]\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-current={isActive ? 'page' : undefined}\n aria-label={`Go to page ${targetPage}`}\n disabled={ctx.disabled}\n onClick={() => ctx.onPageChange(targetPage)}\n className={cn(\n paginationItemVariants({ radius: ctx.radius }),\n sizeClass.item,\n getItemClasses(ctx.variant, ctx.color, isActive, ctx.disabled),\n className\n )}\n {...props}\n >\n {targetPage}\n </button>\n )\n }\n)\nPaginationLink.displayName = 'PaginationLink'\n\n// ─── PaginationPrevious ──────────────────────────────────\n\nexport interface PaginationPreviousProps extends React.ComponentPropsWithoutRef<'button'> {\n /** Custom icon */\n icon?: React.ReactNode\n}\n\nconst PaginationPrevious = React.forwardRef<HTMLButtonElement, PaginationPreviousProps>(\n ({ className, icon, ...props }, ref) => {\n const ctx = usePaginationContext()\n const sizeClass = paginationSizeMap[ctx.size]\n const isDisabled = ctx.disabled || (!ctx.loop && ctx.page <= 1)\n\n const handleClick = () => {\n if (ctx.page <= 1) {\n if (ctx.loop) ctx.onPageChange(ctx.total)\n } else {\n ctx.onPageChange(ctx.page - 1)\n }\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label=\"Go to previous page\"\n disabled={isDisabled}\n onClick={handleClick}\n className={cn(\n paginationItemVariants({ radius: ctx.radius }),\n sizeClass.item,\n getItemClasses(ctx.variant, ctx.color, false, isDisabled),\n className\n )}\n {...props}\n >\n {icon ?? <ChevronLeftIcon className={sizeClass.icon} />}\n </button>\n )\n }\n)\nPaginationPrevious.displayName = 'PaginationPrevious'\n\n// ─── PaginationNext ──────────────────────────────────────\n\nexport interface PaginationNextProps extends React.ComponentPropsWithoutRef<'button'> {\n /** Custom icon */\n icon?: React.ReactNode\n}\n\nconst PaginationNext = React.forwardRef<HTMLButtonElement, PaginationNextProps>(\n ({ className, icon, ...props }, ref) => {\n const ctx = usePaginationContext()\n const sizeClass = paginationSizeMap[ctx.size]\n const isDisabled = ctx.disabled || (!ctx.loop && ctx.page >= ctx.total)\n\n const handleClick = () => {\n if (ctx.page >= ctx.total) {\n if (ctx.loop) ctx.onPageChange(1)\n } else {\n ctx.onPageChange(ctx.page + 1)\n }\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label=\"Go to next page\"\n disabled={isDisabled}\n onClick={handleClick}\n className={cn(\n paginationItemVariants({ radius: ctx.radius }),\n sizeClass.item,\n getItemClasses(ctx.variant, ctx.color, false, isDisabled),\n className\n )}\n {...props}\n >\n {icon ?? <ChevronRightIcon className={sizeClass.icon} />}\n </button>\n )\n }\n)\nPaginationNext.displayName = 'PaginationNext'\n\n// ─── PaginationFirst ─────────────────────────────────────\n\nexport interface PaginationFirstProps extends React.ComponentPropsWithoutRef<'button'> {\n /** Custom icon */\n icon?: React.ReactNode\n}\n\nconst PaginationFirst = React.forwardRef<HTMLButtonElement, PaginationFirstProps>(\n ({ className, icon, ...props }, ref) => {\n const ctx = usePaginationContext()\n const sizeClass = paginationSizeMap[ctx.size]\n const isDisabled = ctx.disabled || ctx.page <= 1\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label=\"Go to first page\"\n disabled={isDisabled}\n onClick={() => ctx.onPageChange(1)}\n className={cn(\n paginationItemVariants({ radius: ctx.radius }),\n sizeClass.item,\n getItemClasses(ctx.variant, ctx.color, false, isDisabled),\n className\n )}\n {...props}\n >\n {icon ?? <ChevronsLeftIcon className={sizeClass.icon} />}\n </button>\n )\n }\n)\nPaginationFirst.displayName = 'PaginationFirst'\n\n// ─── PaginationLast ──────────────────────────────────────\n\nexport interface PaginationLastProps extends React.ComponentPropsWithoutRef<'button'> {\n /** Custom icon */\n icon?: React.ReactNode\n}\n\nconst PaginationLast = React.forwardRef<HTMLButtonElement, PaginationLastProps>(\n ({ className, icon, ...props }, ref) => {\n const ctx = usePaginationContext()\n const sizeClass = paginationSizeMap[ctx.size]\n const isDisabled = ctx.disabled || ctx.page >= ctx.total\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label=\"Go to last page\"\n disabled={isDisabled}\n onClick={() => ctx.onPageChange(ctx.total)}\n className={cn(\n paginationItemVariants({ radius: ctx.radius }),\n sizeClass.item,\n getItemClasses(ctx.variant, ctx.color, false, isDisabled),\n className\n )}\n {...props}\n >\n {icon ?? <ChevronsRightIcon className={sizeClass.icon} />}\n </button>\n )\n }\n)\nPaginationLast.displayName = 'PaginationLast'\n\n// ─── PaginationEllipsis ──────────────────────────────────\n\nconst PaginationEllipsis = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<'span'>>(\n ({ className, ...props }, ref) => {\n const ctx = usePaginationContext()\n const sizeClass = paginationSizeMap[ctx.size]\n return (\n <span\n ref={ref}\n aria-hidden=\"true\"\n className={cn(\n 'inline-flex items-center justify-center text-text-muted',\n sizeClass.item,\n className\n )}\n {...props}\n >\n <EllipsisIcon className={sizeClass.icon} />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n }\n)\nPaginationEllipsis.displayName = 'PaginationEllipsis'\n\n// ─── PaginationItems (Convenience) ───────────────────────\n\nconst PaginationItems = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n ({ className, ...props }, ref) => {\n const ctx = usePaginationContext()\n return (\n <div ref={ref} className={cn('contents', className)} {...props}>\n {ctx.paginationRange.map((item, index) => (\n <PaginationItem key={`${item}-${index}`}>\n {item === 'dots' ? (\n <PaginationEllipsis />\n ) : (\n <PaginationLink page={item} />\n )}\n </PaginationItem>\n ))}\n </div>\n )\n }\n)\nPaginationItems.displayName = 'PaginationItems'\n\n// ─── Exports ─────────────────────────────────────────────\n\n// ─── Namespace ──────────────────────────────────────────\nconst Pagination = Object.assign(PaginationRoot, {\n Content: PaginationContent,\n Item: PaginationItem,\n Link: PaginationLink,\n Previous: PaginationPrevious,\n Next: PaginationNext,\n First: PaginationFirst,\n Last: PaginationLast,\n Ellipsis: PaginationEllipsis,\n Items: PaginationItems,\n})\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nnamespace Pagination {\n export type LinkProps = PaginationLinkProps\n export type PreviousProps = PaginationPreviousProps\n export type NextProps = PaginationNextProps\n export type FirstProps = PaginationFirstProps\n export type LastProps = PaginationLastProps\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationItem,\n PaginationLink,\n PaginationPrevious,\n PaginationNext,\n PaginationFirst,\n PaginationLast,\n PaginationEllipsis,\n PaginationItems,\n paginationItemVariants,\n paginationSizeMap,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,sCAAuC;AACvC,mBAAmB;AAInB,SAAS,gBAAgB,EAAE,UAAU,GAA2B;AAC9D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,QAAO;AAAA,MACP,aAAa;AAAA;AAAA,IAEb,oCAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,mBAAkB;AAAA,EACzE;AAEJ;AAEA,SAAS,iBAAiB,EAAE,UAAU,GAA2B;AAC/D,SACE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