@zentauri-ui/zentauri-components 0.0.83 → 0.0.91
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 +50 -29
- package/dist/ui/accordion.cjs +311 -0
- package/dist/ui/accordion.cjs.map +1 -0
- package/dist/ui/accordion.d.cts +70 -0
- package/dist/ui/accordion.d.ts +70 -0
- package/dist/ui/accordion.js +286 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert.cjs +257 -0
- package/dist/ui/alert.cjs.map +1 -0
- package/dist/ui/alert.d.cts +66 -0
- package/dist/ui/alert.d.ts +66 -0
- package/dist/ui/alert.js +224 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.cjs +192 -0
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.d.cts +37 -0
- package/dist/ui/badge.d.ts +37 -0
- package/dist/ui/badge.js +165 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/buttons.cjs +202 -0
- package/dist/ui/buttons.cjs.map +1 -0
- package/dist/ui/buttons.d.cts +27 -0
- package/dist/ui/buttons.d.ts +27 -0
- package/dist/ui/buttons.js +176 -0
- package/dist/ui/buttons.js.map +1 -0
- package/dist/ui/card.cjs +293 -0
- package/dist/ui/card.cjs.map +1 -0
- package/dist/ui/card.d.cts +77 -0
- package/dist/ui/card.d.ts +77 -0
- package/dist/ui/card.js +258 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/divider.cjs +229 -0
- package/dist/ui/divider.cjs.map +1 -0
- package/dist/ui/divider.d.cts +39 -0
- package/dist/ui/divider.d.ts +39 -0
- package/dist/ui/divider.js +200 -0
- package/dist/ui/divider.js.map +1 -0
- package/dist/ui/drawer.cjs +408 -0
- package/dist/ui/drawer.cjs.map +1 -0
- package/dist/ui/drawer.d.cts +81 -0
- package/dist/ui/drawer.d.ts +81 -0
- package/dist/ui/drawer.js +383 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown.cjs +302 -0
- package/dist/ui/dropdown.cjs.map +1 -0
- package/dist/ui/dropdown.d.cts +50 -0
- package/dist/ui/dropdown.d.ts +50 -0
- package/dist/ui/dropdown.js +278 -0
- package/dist/ui/dropdown.js.map +1 -0
- package/dist/ui/empty-state.cjs +186 -0
- package/dist/ui/empty-state.cjs.map +1 -0
- package/dist/ui/empty-state.d.cts +55 -0
- package/dist/ui/empty-state.d.ts +55 -0
- package/dist/ui/empty-state.js +154 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/index.d.cts +27 -1164
- package/dist/ui/index.d.ts +27 -1164
- package/dist/ui/inputs.cjs +458 -0
- package/dist/ui/inputs.cjs.map +1 -0
- package/dist/ui/inputs.d.cts +35 -0
- package/dist/ui/inputs.d.ts +35 -0
- package/dist/ui/inputs.js +432 -0
- package/dist/ui/inputs.js.map +1 -0
- package/dist/ui/modal.cjs +406 -0
- package/dist/ui/modal.cjs.map +1 -0
- package/dist/ui/modal.d.cts +84 -0
- package/dist/ui/modal.d.ts +84 -0
- package/dist/ui/modal.js +384 -0
- package/dist/ui/modal.js.map +1 -0
- package/dist/ui/pagination.cjs +523 -0
- package/dist/ui/pagination.cjs.map +1 -0
- package/dist/ui/pagination.d.cts +114 -0
- package/dist/ui/pagination.d.ts +114 -0
- package/dist/ui/pagination.js +494 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/progress.cjs +268 -0
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/ui/progress.d.cts +61 -0
- package/dist/ui/progress.d.ts +61 -0
- package/dist/ui/progress.js +237 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/select.cjs +360 -0
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.d.cts +73 -0
- package/dist/ui/select.d.ts +73 -0
- package/dist/ui/select.js +327 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/skeleton.cjs +576 -0
- package/dist/ui/skeleton.cjs.map +1 -0
- package/dist/ui/skeleton.d.cts +90 -0
- package/dist/ui/skeleton.d.ts +90 -0
- package/dist/ui/skeleton.js +544 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/spinner.cjs +219 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.d.cts +27 -0
- package/dist/ui/spinner.d.ts +27 -0
- package/dist/ui/spinner.js +193 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/table.cjs +328 -0
- package/dist/ui/table.cjs.map +1 -0
- package/dist/ui/table.d.cts +81 -0
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +293 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.cjs +300 -0
- package/dist/ui/tabs.cjs.map +1 -0
- package/dist/ui/tabs.d.cts +58 -0
- package/dist/ui/tabs.d.ts +58 -0
- package/dist/ui/tabs.js +274 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/toast.cjs +285 -0
- package/dist/ui/toast.cjs.map +1 -0
- package/dist/ui/toast.d.cts +86 -0
- package/dist/ui/toast.d.ts +86 -0
- package/dist/ui/toast.js +258 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toggle.cjs +185 -0
- package/dist/ui/toggle.cjs.map +1 -0
- package/dist/ui/toggle.d.cts +37 -0
- package/dist/ui/toggle.d.ts +37 -0
- package/dist/ui/toggle.js +158 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.cjs +242 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.d.cts +46 -0
- package/dist/ui/tooltip.d.ts +46 -0
- package/dist/ui/tooltip.js +214 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/variants-1Bx3BEeS.d.cts +8 -0
- package/dist/variants-1Bx3BEeS.d.ts +8 -0
- package/package.json +7 -1
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/ui/pagination/pagination.tsx
|
|
5
|
+
import { forwardRef, useCallback as useCallback2, useId } from "react";
|
|
6
|
+
|
|
7
|
+
// src/lib/utils.ts
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { twMerge } from "tailwind-merge";
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/ui/buttons/variants.ts
|
|
15
|
+
import { cva } from "class-variance-authority";
|
|
16
|
+
var buttonVariants = cva(
|
|
17
|
+
[
|
|
18
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl",
|
|
19
|
+
"text-sm font-medium ring-offset-slate-950 transition-colors",
|
|
20
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
21
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
22
|
+
"select-none"
|
|
23
|
+
],
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
appearance: {
|
|
27
|
+
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white",
|
|
28
|
+
secondary: "bg-slate-800 text-slate-50 hover:bg-slate-700",
|
|
29
|
+
destructive: "bg-rose-600 text-white hover:bg-rose-600",
|
|
30
|
+
outline: "border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10",
|
|
31
|
+
ghost: "bg-transparent text-slate-200 hover:bg-white/5",
|
|
32
|
+
link: "bg-transparent text-cyan-300 underline-offset-4 hover:underline",
|
|
33
|
+
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15",
|
|
34
|
+
emerald: "bg-emerald-600 text-white hover:bg-emerald-600",
|
|
35
|
+
indigo: "bg-indigo-600 text-white hover:bg-indigo-600",
|
|
36
|
+
purple: "bg-purple-600 text-white hover:bg-purple-600",
|
|
37
|
+
pink: "bg-pink-600 text-white hover:bg-pink-600",
|
|
38
|
+
rose: "bg-rose-600 text-white hover:bg-rose-600",
|
|
39
|
+
sky: "bg-sky-600 text-white hover:bg-sky-600",
|
|
40
|
+
teal: "bg-teal-600 text-white hover:bg-teal-600",
|
|
41
|
+
yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
|
|
42
|
+
orange: "bg-orange-600 text-white hover:bg-orange-600",
|
|
43
|
+
gray: "bg-gray-600 text-white hover:bg-gray-600",
|
|
44
|
+
amber: "bg-amber-600 text-white hover:bg-amber-600",
|
|
45
|
+
violet: "bg-violet-600 text-white hover:bg-violet-600",
|
|
46
|
+
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
|
|
47
|
+
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600",
|
|
48
|
+
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600",
|
|
49
|
+
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600",
|
|
50
|
+
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600",
|
|
51
|
+
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600",
|
|
52
|
+
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600",
|
|
53
|
+
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600",
|
|
54
|
+
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600"
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
sm: "h-7 md:h-9 px-3 text-xs",
|
|
58
|
+
md: "h-9 md:h-11 px-4",
|
|
59
|
+
lg: "h-10 md:h-12 px-5 text-base",
|
|
60
|
+
xl: "h-12 md:h-14 px-6 text-lg",
|
|
61
|
+
"2xl": "h-14 md:h-16 px-6 md:px-8 text-xl",
|
|
62
|
+
"3xl": "h-16 md:h-18 px-8 md:px-10 text-2xl",
|
|
63
|
+
"4xl": "h-18 md:h-20 px-10 md:px-12 text-2xl",
|
|
64
|
+
"5xl": "h-20 md:h-22 px-12 md:px-14 text-2xl",
|
|
65
|
+
"6xl": "h-22 md:h-24 px-14 md:px-16 text-2xl",
|
|
66
|
+
"7xl": "h-24 md:h-26 px-16 md:px-18 text-2xl",
|
|
67
|
+
"8xl": "h-26 md:h-28 px-20 text-2xl",
|
|
68
|
+
"9xl": "h-24 md:h-30 px-18 md:px-22 text-2xl",
|
|
69
|
+
"10xl": "h-26 md:h-32 px-20 md:px-24 text-2xl",
|
|
70
|
+
icon: "h-10 w-10"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
appearance: "default",
|
|
75
|
+
size: "md"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
// src/ui/pagination/pagination-logic.ts
|
|
81
|
+
function buildPaginationItems({
|
|
82
|
+
pageCount,
|
|
83
|
+
currentPage,
|
|
84
|
+
siblingCount,
|
|
85
|
+
boundaryCount
|
|
86
|
+
}) {
|
|
87
|
+
if (pageCount <= 0) {
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
const safeBoundary = Math.max(1, boundaryCount);
|
|
91
|
+
const safeSibling = Math.max(0, siblingCount);
|
|
92
|
+
const current = clampPage(currentPage, pageCount);
|
|
93
|
+
const totalNumbers = safeBoundary * 2 + safeSibling * 2 + 1;
|
|
94
|
+
if (pageCount <= totalNumbers) {
|
|
95
|
+
return range(1, pageCount).map((value) => ({ type: "page", value }));
|
|
96
|
+
}
|
|
97
|
+
const leftBoundaryEnd = safeBoundary;
|
|
98
|
+
const rightBoundaryStart = pageCount - safeBoundary + 1;
|
|
99
|
+
const siblingsStart = Math.max(current - safeSibling, leftBoundaryEnd + 1);
|
|
100
|
+
const siblingsEnd = Math.min(current + safeSibling, rightBoundaryStart - 1);
|
|
101
|
+
const pages = /* @__PURE__ */ new Set();
|
|
102
|
+
for (let p = 1; p <= leftBoundaryEnd; p += 1) {
|
|
103
|
+
pages.add(p);
|
|
104
|
+
}
|
|
105
|
+
for (let p = rightBoundaryStart; p <= pageCount; p += 1) {
|
|
106
|
+
pages.add(p);
|
|
107
|
+
}
|
|
108
|
+
for (let p = siblingsStart; p <= siblingsEnd; p += 1) {
|
|
109
|
+
pages.add(p);
|
|
110
|
+
}
|
|
111
|
+
const sorted = [...pages].sort((a, b) => a - b);
|
|
112
|
+
const items = [];
|
|
113
|
+
for (let i = 0; i < sorted.length; i += 1) {
|
|
114
|
+
const value = sorted[i];
|
|
115
|
+
const prev = sorted[i - 1];
|
|
116
|
+
if (i > 0 && prev !== void 0 && value && value - prev > 1) {
|
|
117
|
+
items.push({ type: "ellipsis", key: `gap-${prev}-${value}` });
|
|
118
|
+
}
|
|
119
|
+
items.push({ type: "page", value });
|
|
120
|
+
}
|
|
121
|
+
return items;
|
|
122
|
+
}
|
|
123
|
+
function clampPage(page, pageCount) {
|
|
124
|
+
if (pageCount <= 0) {
|
|
125
|
+
return 1;
|
|
126
|
+
}
|
|
127
|
+
return Math.min(pageCount, Math.max(1, Math.floor(page)));
|
|
128
|
+
}
|
|
129
|
+
function range(from, to) {
|
|
130
|
+
const out = [];
|
|
131
|
+
for (let i = from; i <= to; i += 1) {
|
|
132
|
+
out.push(i);
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/ui/pagination/use-pagination.ts
|
|
138
|
+
import { useCallback, useMemo, useState } from "react";
|
|
139
|
+
function usePagination({
|
|
140
|
+
pageCount,
|
|
141
|
+
page,
|
|
142
|
+
defaultPage = 1,
|
|
143
|
+
siblingCount = 1,
|
|
144
|
+
boundaryCount = 1,
|
|
145
|
+
onPageChange
|
|
146
|
+
}) {
|
|
147
|
+
const [internalPage, setInternalPage] = useState(
|
|
148
|
+
() => clampPage(defaultPage, pageCount)
|
|
149
|
+
);
|
|
150
|
+
const isControlled = page !== void 0;
|
|
151
|
+
const currentPage = clampPage(
|
|
152
|
+
isControlled ? page : internalPage,
|
|
153
|
+
pageCount
|
|
154
|
+
);
|
|
155
|
+
const setPage = useCallback(
|
|
156
|
+
(next) => {
|
|
157
|
+
const clamped = clampPage(next, pageCount);
|
|
158
|
+
if (!isControlled) {
|
|
159
|
+
setInternalPage(clamped);
|
|
160
|
+
}
|
|
161
|
+
onPageChange?.(clamped);
|
|
162
|
+
},
|
|
163
|
+
[isControlled, onPageChange, pageCount]
|
|
164
|
+
);
|
|
165
|
+
const items = useMemo(
|
|
166
|
+
() => buildPaginationItems({
|
|
167
|
+
pageCount,
|
|
168
|
+
currentPage,
|
|
169
|
+
siblingCount,
|
|
170
|
+
boundaryCount
|
|
171
|
+
}),
|
|
172
|
+
[boundaryCount, currentPage, pageCount, siblingCount]
|
|
173
|
+
);
|
|
174
|
+
const canGoPrev = pageCount > 0 && currentPage > 1;
|
|
175
|
+
const canGoNext = pageCount > 0 && currentPage < pageCount;
|
|
176
|
+
const goPrev = useCallback(() => {
|
|
177
|
+
if (canGoPrev) {
|
|
178
|
+
setPage(currentPage - 1);
|
|
179
|
+
}
|
|
180
|
+
}, [canGoPrev, currentPage, setPage]);
|
|
181
|
+
const goNext = useCallback(() => {
|
|
182
|
+
if (canGoNext) {
|
|
183
|
+
setPage(currentPage + 1);
|
|
184
|
+
}
|
|
185
|
+
}, [canGoNext, currentPage, setPage]);
|
|
186
|
+
return {
|
|
187
|
+
currentPage,
|
|
188
|
+
pageCount,
|
|
189
|
+
items,
|
|
190
|
+
setPage,
|
|
191
|
+
goPrev,
|
|
192
|
+
goNext,
|
|
193
|
+
canGoPrev,
|
|
194
|
+
canGoNext
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// src/ui/pagination/variants.ts
|
|
199
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
200
|
+
var paginationListVariants = cva2(
|
|
201
|
+
"inline-flex flex-wrap items-center rounded-xl border p-1 ring-offset-slate-950",
|
|
202
|
+
{
|
|
203
|
+
variants: {
|
|
204
|
+
appearance: {
|
|
205
|
+
default: "border-white/10 bg-white/[0.03]",
|
|
206
|
+
secondary: "border-white/10 bg-slate-900/40",
|
|
207
|
+
destructive: "border-rose-500/25 bg-rose-950/20",
|
|
208
|
+
outline: "border-white/15 bg-transparent",
|
|
209
|
+
ghost: "border-transparent bg-transparent",
|
|
210
|
+
link: "border-transparent bg-transparent",
|
|
211
|
+
glass: "border-white/15 bg-white/5 backdrop-blur-md",
|
|
212
|
+
emerald: "border-emerald-500/25 bg-emerald-950/20",
|
|
213
|
+
indigo: "border-indigo-500/25 bg-indigo-950/20",
|
|
214
|
+
purple: "border-purple-500/25 bg-purple-950/20",
|
|
215
|
+
pink: "border-pink-500/25 bg-pink-950/20",
|
|
216
|
+
rose: "border-rose-500/25 bg-rose-950/20",
|
|
217
|
+
sky: "border-sky-500/25 bg-sky-950/20",
|
|
218
|
+
teal: "border-teal-500/25 bg-teal-950/20",
|
|
219
|
+
yellow: "border-yellow-500/25 bg-yellow-950/20",
|
|
220
|
+
orange: "border-orange-500/25 bg-orange-950/20",
|
|
221
|
+
gray: "border-gray-500/25 bg-gray-950/20",
|
|
222
|
+
amber: "border-amber-500/25 bg-amber-950/20",
|
|
223
|
+
violet: "border-violet-500/25 bg-violet-950/20",
|
|
224
|
+
"gradient-blue": "border-blue-500/30 bg-gradient-to-r from-blue-950/30 to-purple-950/30",
|
|
225
|
+
"gradient-green": "border-lime-500/30 bg-gradient-to-r from-green-950/30 to-lime-950/30",
|
|
226
|
+
"gradient-red": "border-pink-500/30 bg-gradient-to-r from-red-950/30 to-pink-950/30",
|
|
227
|
+
"gradient-yellow": "border-orange-500/30 bg-gradient-to-r from-yellow-950/30 to-orange-950/30",
|
|
228
|
+
"gradient-purple": "border-pink-500/30 bg-gradient-to-r from-purple-950/30 to-pink-950/30",
|
|
229
|
+
"gradient-teal": "border-cyan-500/30 bg-gradient-to-r from-teal-950/30 to-cyan-950/30",
|
|
230
|
+
"gradient-indigo": "border-purple-500/30 bg-gradient-to-r from-indigo-950/30 to-purple-950/30",
|
|
231
|
+
"gradient-pink": "border-rose-500/30 bg-gradient-to-r from-pink-950/30 to-rose-950/30",
|
|
232
|
+
"gradient-orange": "border-orange-500/30 bg-gradient-to-r from-orange-950/30 to-red-950/30"
|
|
233
|
+
},
|
|
234
|
+
size: {
|
|
235
|
+
sm: "gap-0.5",
|
|
236
|
+
md: "gap-1",
|
|
237
|
+
lg: "gap-1",
|
|
238
|
+
xl: "gap-1.5",
|
|
239
|
+
"2xl": "gap-1.5",
|
|
240
|
+
"3xl": "gap-2",
|
|
241
|
+
"4xl": "gap-2",
|
|
242
|
+
"5xl": "gap-2",
|
|
243
|
+
"6xl": "gap-2",
|
|
244
|
+
"7xl": "gap-2.5",
|
|
245
|
+
"8xl": "gap-2.5",
|
|
246
|
+
"9xl": "gap-2.5",
|
|
247
|
+
"10xl": "gap-3",
|
|
248
|
+
icon: "gap-1"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
defaultVariants: {
|
|
252
|
+
appearance: "default",
|
|
253
|
+
size: "md"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
var paginationEllipsisVariants = cva2(
|
|
258
|
+
"inline-flex min-w-[2ch] select-none items-center justify-center px-1 font-medium text-slate-400",
|
|
259
|
+
{
|
|
260
|
+
variants: {
|
|
261
|
+
size: {
|
|
262
|
+
sm: "text-xs",
|
|
263
|
+
md: "text-sm",
|
|
264
|
+
lg: "text-base",
|
|
265
|
+
xl: "text-base",
|
|
266
|
+
"2xl": "text-lg",
|
|
267
|
+
"3xl": "text-lg",
|
|
268
|
+
"4xl": "text-xl",
|
|
269
|
+
"5xl": "text-xl",
|
|
270
|
+
"6xl": "text-xl",
|
|
271
|
+
"7xl": "text-2xl",
|
|
272
|
+
"8xl": "text-2xl",
|
|
273
|
+
"9xl": "text-2xl",
|
|
274
|
+
"10xl": "text-2xl",
|
|
275
|
+
icon: "text-sm"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
defaultVariants: { size: "md" }
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
// src/ui/pagination/pagination.tsx
|
|
283
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
284
|
+
var defaultPrevLabel = "Previous page";
|
|
285
|
+
var defaultNextLabel = "Next page";
|
|
286
|
+
var defaultEllipsisLabel = "More pages";
|
|
287
|
+
var Pagination = forwardRef(
|
|
288
|
+
function Pagination2({
|
|
289
|
+
className,
|
|
290
|
+
appearance = "default",
|
|
291
|
+
size = "md",
|
|
292
|
+
pageCount,
|
|
293
|
+
page,
|
|
294
|
+
defaultPage = 1,
|
|
295
|
+
onPageChange,
|
|
296
|
+
siblingCount = 1,
|
|
297
|
+
boundaryCount = 1,
|
|
298
|
+
showPrevNext = true,
|
|
299
|
+
prevLabel = defaultPrevLabel,
|
|
300
|
+
nextLabel = defaultNextLabel,
|
|
301
|
+
ellipsisLabel = defaultEllipsisLabel,
|
|
302
|
+
getPageHref,
|
|
303
|
+
"aria-label": ariaLabel = "Pagination",
|
|
304
|
+
...rest
|
|
305
|
+
}, ref) {
|
|
306
|
+
const id = useId();
|
|
307
|
+
const listId = `${id}-list`;
|
|
308
|
+
const {
|
|
309
|
+
currentPage,
|
|
310
|
+
items,
|
|
311
|
+
setPage,
|
|
312
|
+
goPrev,
|
|
313
|
+
goNext,
|
|
314
|
+
canGoPrev,
|
|
315
|
+
canGoNext
|
|
316
|
+
} = usePagination({
|
|
317
|
+
pageCount,
|
|
318
|
+
page,
|
|
319
|
+
defaultPage,
|
|
320
|
+
siblingCount,
|
|
321
|
+
boundaryCount,
|
|
322
|
+
onPageChange
|
|
323
|
+
});
|
|
324
|
+
const handleKeyDown = useCallback2(
|
|
325
|
+
(event) => {
|
|
326
|
+
if (pageCount <= 0) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
|
330
|
+
event.preventDefault();
|
|
331
|
+
if (canGoNext) {
|
|
332
|
+
setPage(currentPage + 1);
|
|
333
|
+
}
|
|
334
|
+
} else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
|
335
|
+
event.preventDefault();
|
|
336
|
+
if (canGoPrev) {
|
|
337
|
+
setPage(currentPage - 1);
|
|
338
|
+
}
|
|
339
|
+
} else if (event.key === "Home") {
|
|
340
|
+
event.preventDefault();
|
|
341
|
+
setPage(1);
|
|
342
|
+
} else if (event.key === "End") {
|
|
343
|
+
event.preventDefault();
|
|
344
|
+
setPage(pageCount);
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
[canGoNext, canGoPrev, currentPage, pageCount, setPage]
|
|
348
|
+
);
|
|
349
|
+
if (pageCount <= 0) {
|
|
350
|
+
return null;
|
|
351
|
+
}
|
|
352
|
+
const inactiveTriggerClass = cn(
|
|
353
|
+
buttonVariants({ appearance: "ghost", size }),
|
|
354
|
+
"bg-white/[0.04] text-slate-200 hover:bg-white/10"
|
|
355
|
+
);
|
|
356
|
+
const currentTriggerClass = buttonVariants({ appearance, size });
|
|
357
|
+
const triggerFocusRing = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950";
|
|
358
|
+
const renderPageControl = (pageNumber) => {
|
|
359
|
+
const isCurrent = pageNumber === currentPage;
|
|
360
|
+
const href = getPageHref?.(pageNumber);
|
|
361
|
+
const shared = cn(
|
|
362
|
+
isCurrent ? currentTriggerClass : inactiveTriggerClass,
|
|
363
|
+
"min-w-[2.25ch] shrink-0",
|
|
364
|
+
triggerFocusRing
|
|
365
|
+
);
|
|
366
|
+
if (href) {
|
|
367
|
+
return /* @__PURE__ */ jsx(
|
|
368
|
+
"a",
|
|
369
|
+
{
|
|
370
|
+
"data-slot": "pagination-trigger",
|
|
371
|
+
href,
|
|
372
|
+
"aria-label": `Page ${pageNumber}`,
|
|
373
|
+
"aria-current": isCurrent ? "page" : void 0,
|
|
374
|
+
className: shared,
|
|
375
|
+
children: pageNumber
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
return /* @__PURE__ */ jsx(
|
|
380
|
+
"button",
|
|
381
|
+
{
|
|
382
|
+
type: "button",
|
|
383
|
+
"data-slot": "pagination-trigger",
|
|
384
|
+
"aria-label": `Page ${pageNumber}`,
|
|
385
|
+
"aria-current": isCurrent ? "page" : void 0,
|
|
386
|
+
className: shared,
|
|
387
|
+
onClick: () => {
|
|
388
|
+
if (!isCurrent) {
|
|
389
|
+
setPage(pageNumber);
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
children: pageNumber
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
};
|
|
396
|
+
const prevHref = getPageHref?.(clampPage(currentPage - 1, pageCount));
|
|
397
|
+
const nextHref = getPageHref?.(clampPage(currentPage + 1, pageCount));
|
|
398
|
+
const navTriggerClass = cn(
|
|
399
|
+
buttonVariants({ appearance: "outline", size }),
|
|
400
|
+
"shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950"
|
|
401
|
+
);
|
|
402
|
+
return /* @__PURE__ */ jsx(
|
|
403
|
+
"nav",
|
|
404
|
+
{
|
|
405
|
+
ref,
|
|
406
|
+
"data-slot": "pagination",
|
|
407
|
+
"aria-label": ariaLabel,
|
|
408
|
+
className: cn("w-full", className),
|
|
409
|
+
onKeyDown: handleKeyDown,
|
|
410
|
+
...rest,
|
|
411
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
412
|
+
showPrevNext ? getPageHref && prevHref && canGoPrev ? /* @__PURE__ */ jsx(
|
|
413
|
+
"a",
|
|
414
|
+
{
|
|
415
|
+
"data-slot": "pagination-prev",
|
|
416
|
+
"aria-label": prevLabel,
|
|
417
|
+
href: prevHref,
|
|
418
|
+
className: navTriggerClass,
|
|
419
|
+
children: "Prev"
|
|
420
|
+
}
|
|
421
|
+
) : /* @__PURE__ */ jsx(
|
|
422
|
+
"button",
|
|
423
|
+
{
|
|
424
|
+
type: "button",
|
|
425
|
+
"data-slot": "pagination-prev",
|
|
426
|
+
"aria-label": prevLabel,
|
|
427
|
+
disabled: !canGoPrev,
|
|
428
|
+
className: navTriggerClass,
|
|
429
|
+
onClick: goPrev,
|
|
430
|
+
children: "Prev"
|
|
431
|
+
}
|
|
432
|
+
) : null,
|
|
433
|
+
/* @__PURE__ */ jsx(
|
|
434
|
+
"ul",
|
|
435
|
+
{
|
|
436
|
+
id: listId,
|
|
437
|
+
"data-slot": "pagination-list",
|
|
438
|
+
className: paginationListVariants({ appearance, size }),
|
|
439
|
+
children: items.map((item) => /* @__PURE__ */ jsx(
|
|
440
|
+
"li",
|
|
441
|
+
{
|
|
442
|
+
"data-slot": "pagination-item",
|
|
443
|
+
className: "inline-flex items-center",
|
|
444
|
+
children: item.type === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
445
|
+
"span",
|
|
446
|
+
{
|
|
447
|
+
"data-slot": "pagination-ellipsis",
|
|
448
|
+
"aria-hidden": "true",
|
|
449
|
+
title: ellipsisLabel,
|
|
450
|
+
className: paginationEllipsisVariants({ size }),
|
|
451
|
+
children: "\u2026"
|
|
452
|
+
}
|
|
453
|
+
) : renderPageControl(item.value)
|
|
454
|
+
},
|
|
455
|
+
item.type === "page" ? `page-${item.value}` : item.key
|
|
456
|
+
))
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
showPrevNext ? getPageHref && nextHref && canGoNext ? /* @__PURE__ */ jsx(
|
|
460
|
+
"a",
|
|
461
|
+
{
|
|
462
|
+
"data-slot": "pagination-next",
|
|
463
|
+
"aria-label": nextLabel,
|
|
464
|
+
href: nextHref,
|
|
465
|
+
className: navTriggerClass,
|
|
466
|
+
children: "Next"
|
|
467
|
+
}
|
|
468
|
+
) : /* @__PURE__ */ jsx(
|
|
469
|
+
"button",
|
|
470
|
+
{
|
|
471
|
+
type: "button",
|
|
472
|
+
"data-slot": "pagination-next",
|
|
473
|
+
"aria-label": nextLabel,
|
|
474
|
+
disabled: !canGoNext,
|
|
475
|
+
className: navTriggerClass,
|
|
476
|
+
onClick: goNext,
|
|
477
|
+
children: "Next"
|
|
478
|
+
}
|
|
479
|
+
) : null
|
|
480
|
+
] })
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
Pagination.displayName = "Pagination";
|
|
486
|
+
export {
|
|
487
|
+
Pagination,
|
|
488
|
+
buildPaginationItems,
|
|
489
|
+
clampPage,
|
|
490
|
+
paginationEllipsisVariants,
|
|
491
|
+
paginationListVariants,
|
|
492
|
+
usePagination
|
|
493
|
+
};
|
|
494
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/pagination/pagination.tsx","../../src/lib/utils.ts","../../src/ui/buttons/variants.ts","../../src/ui/pagination/pagination-logic.ts","../../src/ui/pagination/use-pagination.ts","../../src/ui/pagination/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, useCallback, useId, type KeyboardEvent } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"../buttons/variants\";\n\nimport { clampPage } from \"./pagination-logic\";\nimport type { PaginationProps } from \"./types\";\nimport { usePagination } from \"./use-pagination\";\nimport { paginationEllipsisVariants, paginationListVariants } from \"./variants\";\n\nconst defaultPrevLabel = \"Previous page\";\nconst defaultNextLabel = \"Next page\";\nconst defaultEllipsisLabel = \"More pages\";\n\nexport const Pagination = forwardRef<HTMLElement, PaginationProps>(\n function Pagination(\n {\n className,\n appearance = \"default\",\n size = \"md\",\n pageCount,\n page,\n defaultPage = 1,\n onPageChange,\n siblingCount = 1,\n boundaryCount = 1,\n showPrevNext = true,\n prevLabel = defaultPrevLabel,\n nextLabel = defaultNextLabel,\n ellipsisLabel = defaultEllipsisLabel,\n getPageHref,\n \"aria-label\": ariaLabel = \"Pagination\",\n ...rest\n },\n ref,\n ) {\n const id = useId();\n const listId = `${id}-list`;\n\n const {\n currentPage,\n items,\n setPage,\n goPrev,\n goNext,\n canGoPrev,\n canGoNext,\n } = usePagination({\n pageCount,\n page,\n defaultPage,\n siblingCount,\n boundaryCount,\n onPageChange,\n });\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (pageCount <= 0) {\n return;\n }\n if (event.key === \"ArrowRight\" || event.key === \"ArrowDown\") {\n event.preventDefault();\n if (canGoNext) {\n setPage(currentPage + 1);\n }\n } else if (event.key === \"ArrowLeft\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n if (canGoPrev) {\n setPage(currentPage - 1);\n }\n } else if (event.key === \"Home\") {\n event.preventDefault();\n setPage(1);\n } else if (event.key === \"End\") {\n event.preventDefault();\n setPage(pageCount);\n }\n },\n [canGoNext, canGoPrev, currentPage, pageCount, setPage],\n );\n\n if (pageCount <= 0) {\n return null;\n }\n\n const inactiveTriggerClass = cn(\n buttonVariants({ appearance: \"ghost\", size }),\n \"bg-white/[0.04] text-slate-200 hover:bg-white/10\",\n );\n\n const currentTriggerClass = buttonVariants({ appearance, size });\n\n const triggerFocusRing =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950\";\n\n const renderPageControl = (pageNumber: number) => {\n const isCurrent = pageNumber === currentPage;\n const href = getPageHref?.(pageNumber);\n const shared = cn(\n isCurrent ? currentTriggerClass : inactiveTriggerClass,\n \"min-w-[2.25ch] shrink-0\",\n triggerFocusRing,\n );\n\n if (href) {\n return (\n <a\n data-slot=\"pagination-trigger\"\n href={href}\n aria-label={`Page ${pageNumber}`}\n aria-current={isCurrent ? \"page\" : undefined}\n className={shared}\n >\n {pageNumber}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n data-slot=\"pagination-trigger\"\n aria-label={`Page ${pageNumber}`}\n aria-current={isCurrent ? \"page\" : undefined}\n className={shared}\n onClick={() => {\n if (!isCurrent) {\n setPage(pageNumber);\n }\n }}\n >\n {pageNumber}\n </button>\n );\n };\n\n const prevHref = getPageHref?.(clampPage(currentPage - 1, pageCount));\n const nextHref = getPageHref?.(clampPage(currentPage + 1, pageCount));\n\n const navTriggerClass = cn(\n buttonVariants({ appearance: \"outline\", size }),\n \"shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950\",\n );\n\n return (\n <nav\n ref={ref}\n data-slot=\"pagination\"\n aria-label={ariaLabel}\n className={cn(\"w-full\", className)}\n onKeyDown={handleKeyDown}\n {...rest}\n >\n <div className=\"flex flex-wrap items-center gap-2\">\n {showPrevNext ? (\n getPageHref && prevHref && canGoPrev ? (\n <a\n data-slot=\"pagination-prev\"\n aria-label={prevLabel}\n href={prevHref}\n className={navTriggerClass}\n >\n Prev\n </a>\n ) : (\n <button\n type=\"button\"\n data-slot=\"pagination-prev\"\n aria-label={prevLabel}\n disabled={!canGoPrev}\n className={navTriggerClass}\n onClick={goPrev}\n >\n Prev\n </button>\n )\n ) : null}\n\n <ul\n id={listId}\n data-slot=\"pagination-list\"\n className={paginationListVariants({ appearance, size })}\n >\n {items.map((item) => (\n <li\n key={item.type === \"page\" ? `page-${item.value}` : item.key}\n data-slot=\"pagination-item\"\n className=\"inline-flex items-center\"\n >\n {item.type === \"ellipsis\" ? (\n <span\n data-slot=\"pagination-ellipsis\"\n aria-hidden=\"true\"\n title={ellipsisLabel}\n className={paginationEllipsisVariants({ size })}\n >\n …\n </span>\n ) : (\n renderPageControl(item.value)\n )}\n </li>\n ))}\n </ul>\n\n {showPrevNext ? (\n getPageHref && nextHref && canGoNext ? (\n <a\n data-slot=\"pagination-next\"\n aria-label={nextLabel}\n href={nextHref}\n className={navTriggerClass}\n >\n Next\n </a>\n ) : (\n <button\n type=\"button\"\n data-slot=\"pagination-next\"\n aria-label={nextLabel}\n disabled={!canGoNext}\n className={navTriggerClass}\n onClick={goNext}\n >\n Next\n </button>\n )\n ) : null}\n </div>\n </nav>\n );\n },\n);\n\nPagination.displayName = \"Pagination\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}","import { cva } from \"class-variance-authority\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl\",\n \"text-sm font-medium ring-offset-slate-950 transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"select-none\",\n ],\n {\n variants: {\n appearance: {\n default:\n \"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white\",\n secondary: \"bg-slate-800 text-slate-50 hover:bg-slate-700\",\n destructive: \"bg-rose-600 text-white hover:bg-rose-600\",\n outline:\n \"border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10\",\n ghost: \"bg-transparent text-slate-200 hover:bg-white/5\",\n link: \"bg-transparent text-cyan-300 underline-offset-4 hover:underline\",\n glass:\n \"border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15\",\n emerald: \"bg-emerald-600 text-white hover:bg-emerald-600\",\n indigo: \"bg-indigo-600 text-white hover:bg-indigo-600\",\n purple: \"bg-purple-600 text-white hover:bg-purple-600\",\n pink: \"bg-pink-600 text-white hover:bg-pink-600\",\n rose: \"bg-rose-600 text-white hover:bg-rose-600\",\n sky: \"bg-sky-600 text-white hover:bg-sky-600\",\n teal: \"bg-teal-600 text-white hover:bg-teal-600\",\n yellow: \"bg-yellow-600 text-white hover:bg-yellow-600\",\n orange: \"bg-orange-600 text-white hover:bg-orange-600\",\n gray: \"bg-gray-600 text-white hover:bg-gray-600\",\n amber: \"bg-amber-600 text-white hover:bg-amber-600\",\n violet: \"bg-violet-600 text-white hover:bg-violet-600\",\n \"gradient-blue\": \"bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600\",\n \"gradient-green\": \"bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600\",\n \"gradient-red\": \"bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600\",\n \"gradient-yellow\": \"bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600\",\n \"gradient-purple\": \"bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600\",\n \"gradient-teal\": \"bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600\",\n \"gradient-indigo\": \"bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600\",\n \"gradient-pink\": \"bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600\",\n \"gradient-orange\": \"bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600\",\n },\n size: {\n sm: \"h-7 md:h-9 px-3 text-xs\",\n md: \"h-9 md:h-11 px-4\",\n lg: \"h-10 md:h-12 px-5 text-base\",\n xl: \"h-12 md:h-14 px-6 text-lg\",\n \"2xl\": \"h-14 md:h-16 px-6 md:px-8 text-xl\",\n \"3xl\": \"h-16 md:h-18 px-8 md:px-10 text-2xl\",\n \"4xl\": \"h-18 md:h-20 px-10 md:px-12 text-2xl\",\n \"5xl\": \"h-20 md:h-22 px-12 md:px-14 text-2xl\",\n \"6xl\": \"h-22 md:h-24 px-14 md:px-16 text-2xl\",\n \"7xl\": \"h-24 md:h-26 px-16 md:px-18 text-2xl\",\n \"8xl\": \"h-26 md:h-28 px-20 text-2xl\",\n \"9xl\": \"h-24 md:h-30 px-18 md:px-22 text-2xl\",\n \"10xl\": \"h-26 md:h-32 px-20 md:px-24 text-2xl\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n },\n },\n);\n","export type PaginationPageItem =\n | { type: \"page\"; value: number }\n | { type: \"ellipsis\"; key: string };\n\nexport type BuildPaginationItemsParams = {\n pageCount: number;\n currentPage: number;\n siblingCount: number;\n boundaryCount: number;\n};\n\n/**\n * Builds the ordered list of page numbers and ellipsis markers for a pagination control.\n *\n * Args:\n * pageCount: Total number of pages (must be >= 0).\n * currentPage: Active page index (1-based).\n * siblingCount: How many page buttons to show on each side of the current page.\n * boundaryCount: How many pages to pin at the start and end of the range.\n *\n * Returns:\n * A list of items suitable for rendering, e.g. [1, ellipsis, 4,5,6, ellipsis, 20].\n */\nexport function buildPaginationItems({\n pageCount,\n currentPage,\n siblingCount,\n boundaryCount,\n}: BuildPaginationItemsParams): PaginationPageItem[] {\n if (pageCount <= 0) {\n return [];\n }\n\n const safeBoundary = Math.max(1, boundaryCount);\n const safeSibling = Math.max(0, siblingCount);\n const current = clampPage(currentPage, pageCount);\n\n const totalNumbers =\n safeBoundary * 2 + safeSibling * 2 + 1;\n if (pageCount <= totalNumbers) {\n return range(1, pageCount).map((value) => ({ type: \"page\", value }));\n }\n\n const leftBoundaryEnd = safeBoundary;\n const rightBoundaryStart = pageCount - safeBoundary + 1;\n\n const siblingsStart = Math.max(current - safeSibling, leftBoundaryEnd + 1);\n const siblingsEnd = Math.min(current + safeSibling, rightBoundaryStart - 1);\n\n const pages = new Set<number>();\n for (let p = 1; p <= leftBoundaryEnd; p += 1) {\n pages.add(p);\n }\n for (let p = rightBoundaryStart; p <= pageCount; p += 1) {\n pages.add(p);\n }\n for (let p = siblingsStart; p <= siblingsEnd; p += 1) {\n pages.add(p);\n }\n\n const sorted = [...pages].sort((a, b) => a - b);\n const items: PaginationPageItem[] = [];\n\n for (let i = 0; i < sorted.length; i += 1) {\n const value = sorted[i];\n const prev = sorted[i - 1];\n if (i > 0 && prev !== undefined && value && value - prev > 1) {\n items.push({ type: \"ellipsis\", key: `gap-${prev}-${value}` });\n }\n items.push({ type: \"page\", value: value as number });\n }\n\n return items;\n}\n\nexport function clampPage(page: number, pageCount: number): number {\n if (pageCount <= 0) {\n return 1;\n }\n return Math.min(pageCount, Math.max(1, Math.floor(page)));\n}\n\nfunction range(from: number, to: number): number[] {\n const out: number[] = [];\n for (let i = from; i <= to; i += 1) {\n out.push(i);\n }\n return out;\n}\n","\"use client\";\n\nimport { useCallback, useMemo, useState } from \"react\";\n\nimport type { UsePaginationParams, UsePaginationResult } from \"./types\";\nimport { buildPaginationItems, clampPage } from \"./pagination-logic\";\n\nexport function usePagination({\n pageCount,\n page,\n defaultPage = 1,\n siblingCount = 1,\n boundaryCount = 1,\n onPageChange,\n}: UsePaginationParams): UsePaginationResult {\n const [internalPage, setInternalPage] = useState(() =>\n clampPage(defaultPage, pageCount),\n );\n\n const isControlled = page !== undefined;\n const currentPage = clampPage(\n isControlled ? page : internalPage,\n pageCount,\n );\n\n const setPage = useCallback(\n (next: number) => {\n const clamped = clampPage(next, pageCount);\n if (!isControlled) {\n setInternalPage(clamped);\n }\n onPageChange?.(clamped);\n },\n [isControlled, onPageChange, pageCount],\n );\n\n const items = useMemo(\n () =>\n buildPaginationItems({\n pageCount,\n currentPage,\n siblingCount,\n boundaryCount,\n }),\n [boundaryCount, currentPage, pageCount, siblingCount],\n );\n\n const canGoPrev = pageCount > 0 && currentPage > 1;\n const canGoNext = pageCount > 0 && currentPage < pageCount;\n\n const goPrev = useCallback(() => {\n if (canGoPrev) {\n setPage(currentPage - 1);\n }\n }, [canGoPrev, currentPage, setPage]);\n\n const goNext = useCallback(() => {\n if (canGoNext) {\n setPage(currentPage + 1);\n }\n }, [canGoNext, currentPage, setPage]);\n\n return {\n currentPage,\n pageCount,\n items,\n setPage,\n goPrev,\n goNext,\n canGoPrev,\n canGoNext,\n };\n}\n","import { cva } from \"class-variance-authority\";\n\n/**\n * Layout and chrome for the page list cluster. Appearance and size keys align with\n * `components/ui/buttons/variants.ts` for consistent design-system tokens.\n */\nexport const paginationListVariants = cva(\n \"inline-flex flex-wrap items-center rounded-xl border p-1 ring-offset-slate-950\",\n {\n variants: {\n appearance: {\n default: \"border-white/10 bg-white/[0.03]\",\n secondary: \"border-white/10 bg-slate-900/40\",\n destructive: \"border-rose-500/25 bg-rose-950/20\",\n outline: \"border-white/15 bg-transparent\",\n ghost: \"border-transparent bg-transparent\",\n link: \"border-transparent bg-transparent\",\n glass: \"border-white/15 bg-white/5 backdrop-blur-md\",\n emerald: \"border-emerald-500/25 bg-emerald-950/20\",\n indigo: \"border-indigo-500/25 bg-indigo-950/20\",\n purple: \"border-purple-500/25 bg-purple-950/20\",\n pink: \"border-pink-500/25 bg-pink-950/20\",\n rose: \"border-rose-500/25 bg-rose-950/20\",\n sky: \"border-sky-500/25 bg-sky-950/20\",\n teal: \"border-teal-500/25 bg-teal-950/20\",\n yellow: \"border-yellow-500/25 bg-yellow-950/20\",\n orange: \"border-orange-500/25 bg-orange-950/20\",\n gray: \"border-gray-500/25 bg-gray-950/20\",\n amber: \"border-amber-500/25 bg-amber-950/20\",\n violet: \"border-violet-500/25 bg-violet-950/20\",\n \"gradient-blue\": \"border-blue-500/30 bg-gradient-to-r from-blue-950/30 to-purple-950/30\",\n \"gradient-green\": \"border-lime-500/30 bg-gradient-to-r from-green-950/30 to-lime-950/30\",\n \"gradient-red\": \"border-pink-500/30 bg-gradient-to-r from-red-950/30 to-pink-950/30\",\n \"gradient-yellow\":\n \"border-orange-500/30 bg-gradient-to-r from-yellow-950/30 to-orange-950/30\",\n \"gradient-purple\":\n \"border-pink-500/30 bg-gradient-to-r from-purple-950/30 to-pink-950/30\",\n \"gradient-teal\": \"border-cyan-500/30 bg-gradient-to-r from-teal-950/30 to-cyan-950/30\",\n \"gradient-indigo\":\n \"border-purple-500/30 bg-gradient-to-r from-indigo-950/30 to-purple-950/30\",\n \"gradient-pink\": \"border-rose-500/30 bg-gradient-to-r from-pink-950/30 to-rose-950/30\",\n \"gradient-orange\": \"border-orange-500/30 bg-gradient-to-r from-orange-950/30 to-red-950/30\",\n },\n size: {\n sm: \"gap-0.5\",\n md: \"gap-1\",\n lg: \"gap-1\",\n xl: \"gap-1.5\",\n \"2xl\": \"gap-1.5\",\n \"3xl\": \"gap-2\",\n \"4xl\": \"gap-2\",\n \"5xl\": \"gap-2\",\n \"6xl\": \"gap-2\",\n \"7xl\": \"gap-2.5\",\n \"8xl\": \"gap-2.5\",\n \"9xl\": \"gap-2.5\",\n \"10xl\": \"gap-3\",\n icon: \"gap-1\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport const paginationEllipsisVariants = cva(\n \"inline-flex min-w-[2ch] select-none items-center justify-center px-1 font-medium text-slate-400\",\n {\n variants: {\n size: {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n xl: \"text-base\",\n \"2xl\": \"text-lg\",\n \"3xl\": \"text-lg\",\n \"4xl\": \"text-xl\",\n \"5xl\": \"text-xl\",\n \"6xl\": \"text-xl\",\n \"7xl\": \"text-2xl\",\n \"8xl\": \"text-2xl\",\n \"9xl\": \"text-2xl\",\n \"10xl\": \"text-2xl\",\n icon: \"text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n"],"mappings":";;;;AAEA,SAAS,YAAY,eAAAA,cAAa,aAAiC;;;ACFnE,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,SAAS,WAAW;AAEb,IAAM,iBAAiB;AAAA,EAC5B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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