@zentauri-ui/zentauri-components 0.0.91 → 0.0.93
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 +36 -4
- package/dist/chunk-BZSIXBA7.js +70 -0
- package/dist/chunk-BZSIXBA7.js.map +1 -0
- package/dist/chunk-E5UX537J.js +11 -0
- package/dist/chunk-E5UX537J.js.map +1 -0
- package/dist/chunk-MEWYFWBX.mjs +14 -0
- package/dist/chunk-MEWYFWBX.mjs.map +1 -0
- package/dist/chunk-VJHD7QZH.mjs +73 -0
- package/dist/chunk-VJHD7QZH.mjs.map +1 -0
- package/dist/ui/accordion.js +51 -57
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/{accordion.cjs → accordion.mjs} +38 -67
- package/dist/ui/accordion.mjs.map +1 -0
- package/dist/ui/{alert.d.cts → alert.d.mts} +1 -1
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.js +40 -46
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/{alert.cjs → alert.mjs} +29 -66
- package/dist/ui/alert.mjs.map +1 -0
- package/dist/ui/{badge.d.cts → badge.d.mts} +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +20 -26
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/{badge.cjs → badge.mjs} +17 -48
- package/dist/ui/badge.mjs.map +1 -0
- package/dist/ui/{buttons.d.cts → buttons.d.mts} +1 -1
- package/dist/ui/buttons.d.ts +1 -1
- package/dist/ui/buttons.js +18 -87
- package/dist/ui/buttons.js.map +1 -1
- package/dist/ui/buttons.mjs +109 -0
- package/dist/ui/buttons.mjs.map +1 -0
- package/dist/ui/{card.d.cts → card.d.mts} +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +40 -46
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/{card.cjs → card.mjs} +26 -65
- package/dist/ui/card.mjs.map +1 -0
- package/dist/ui/{divider.d.cts → divider.d.mts} +2 -2
- package/dist/ui/divider.d.ts +2 -2
- package/dist/ui/divider.js +30 -36
- package/dist/ui/divider.js.map +1 -1
- package/dist/ui/{divider.cjs → divider.mjs} +22 -55
- package/dist/ui/divider.mjs.map +1 -0
- package/dist/ui/{drawer.d.cts → drawer.d.mts} +3 -3
- package/dist/ui/drawer.d.ts +3 -3
- package/dist/ui/drawer.js +64 -70
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/{drawer.cjs → drawer.mjs} +48 -77
- package/dist/ui/drawer.mjs.map +1 -0
- package/dist/ui/{dropdown.d.cts → dropdown.d.mts} +4 -4
- package/dist/ui/dropdown.d.ts +4 -4
- package/dist/ui/dropdown.js +43 -49
- package/dist/ui/dropdown.js.map +1 -1
- package/dist/ui/{dropdown.cjs → dropdown.mjs} +34 -62
- package/dist/ui/dropdown.mjs.map +1 -0
- package/dist/ui/{empty-state.d.cts → empty-state.d.mts} +1 -1
- package/dist/ui/empty-state.d.ts +1 -1
- package/dist/ui/empty-state.js +31 -37
- package/dist/ui/empty-state.js.map +1 -1
- package/dist/ui/empty-state.mjs +150 -0
- package/dist/ui/empty-state.mjs.map +1 -0
- package/dist/ui/{inputs.d.cts → inputs.d.mts} +2 -2
- package/dist/ui/inputs.d.ts +2 -2
- package/dist/ui/inputs.js +26 -32
- package/dist/ui/inputs.js.map +1 -1
- package/dist/ui/{inputs.cjs → inputs.mjs} +21 -51
- package/dist/ui/inputs.mjs.map +1 -0
- package/dist/ui/{modal.d.cts → modal.d.mts} +3 -3
- package/dist/ui/modal.d.ts +3 -3
- package/dist/ui/modal.js +69 -75
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/{modal.cjs → modal.mjs} +53 -79
- package/dist/ui/modal.mjs.map +1 -0
- package/dist/ui/{pagination.d.cts → pagination.d.mts} +3 -3
- package/dist/ui/pagination.d.ts +3 -3
- package/dist/ui/pagination.js +48 -117
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/{pagination.cjs → pagination.mjs} +35 -131
- package/dist/ui/pagination.mjs.map +1 -0
- package/dist/ui/{progress.d.cts → progress.d.mts} +5 -5
- package/dist/ui/progress.d.ts +5 -5
- package/dist/ui/progress.js +37 -43
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/{progress.cjs → progress.mjs} +25 -60
- package/dist/ui/progress.mjs.map +1 -0
- package/dist/ui/{select.d.cts → select.d.mts} +4 -4
- package/dist/ui/select.d.ts +4 -4
- package/dist/ui/select.js +43 -49
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/{select.cjs → select.mjs} +31 -68
- package/dist/ui/select.mjs.map +1 -0
- package/dist/ui/{skeleton.d.cts → skeleton.d.mts} +3 -3
- package/dist/ui/skeleton.d.ts +3 -3
- package/dist/ui/skeleton.js +45 -51
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/{skeleton.cjs → skeleton.mjs} +31 -67
- package/dist/ui/skeleton.mjs.map +1 -0
- package/dist/ui/{spinner.d.cts → spinner.d.mts} +3 -3
- package/dist/ui/spinner.d.ts +3 -3
- package/dist/ui/spinner.js +34 -40
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/{spinner.cjs → spinner.mjs} +27 -57
- package/dist/ui/spinner.mjs.map +1 -0
- package/dist/ui/{table.d.cts → table.d.mts} +4 -4
- package/dist/ui/table.d.ts +4 -4
- package/dist/ui/table.js +43 -49
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/{table.cjs → table.mjs} +26 -65
- package/dist/ui/table.mjs.map +1 -0
- package/dist/ui/{tabs.d.cts → tabs.d.mts} +1 -1
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/tabs.js +41 -47
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/{tabs.cjs → tabs.mjs} +29 -59
- package/dist/ui/tabs.mjs.map +1 -0
- package/dist/ui/{toast.d.cts → toast.d.mts} +1 -1
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +57 -63
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/{toast.cjs → toast.mjs} +43 -74
- package/dist/ui/toast.mjs.map +1 -0
- package/dist/ui/{toggle.d.cts → toggle.d.mts} +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +23 -29
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/{toggle.cjs → toggle.mjs} +19 -50
- package/dist/ui/toggle.mjs.map +1 -0
- package/dist/ui/{tooltip.d.cts → tooltip.d.mts} +2 -2
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.js +29 -35
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/{tooltip.cjs → tooltip.mjs} +26 -58
- package/dist/ui/tooltip.mjs.map +1 -0
- package/dist/variants-Dd9pe-ov.d.mts +8 -0
- package/dist/variants-Dd9pe-ov.d.ts +8 -0
- package/package.json +10 -15
- package/dist/ui/accordion.cjs.map +0 -1
- package/dist/ui/alert.cjs.map +0 -1
- package/dist/ui/badge.cjs.map +0 -1
- package/dist/ui/buttons.cjs +0 -202
- package/dist/ui/buttons.cjs.map +0 -1
- package/dist/ui/card.cjs.map +0 -1
- package/dist/ui/divider.cjs.map +0 -1
- package/dist/ui/drawer.cjs.map +0 -1
- package/dist/ui/dropdown.cjs.map +0 -1
- package/dist/ui/empty-state.cjs +0 -186
- package/dist/ui/empty-state.cjs.map +0 -1
- package/dist/ui/index.cjs +0 -5764
- package/dist/ui/index.cjs.map +0 -1
- package/dist/ui/index.d.cts +0 -27
- package/dist/ui/index.d.ts +0 -27
- package/dist/ui/index.js +0 -5626
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/inputs.cjs.map +0 -1
- package/dist/ui/modal.cjs.map +0 -1
- package/dist/ui/pagination.cjs.map +0 -1
- package/dist/ui/progress.cjs.map +0 -1
- package/dist/ui/select.cjs.map +0 -1
- package/dist/ui/skeleton.cjs.map +0 -1
- package/dist/ui/spinner.cjs.map +0 -1
- package/dist/ui/table.cjs.map +0 -1
- package/dist/ui/tabs.cjs.map +0 -1
- package/dist/ui/toast.cjs.map +0 -1
- package/dist/ui/toggle.cjs.map +0 -1
- package/dist/ui/tooltip.cjs.map +0 -1
- package/dist/variants-1Bx3BEeS.d.cts +0 -8
- package/dist/variants-1Bx3BEeS.d.ts +0 -8
- /package/dist/ui/{accordion.d.cts → accordion.d.mts} +0 -0
|
@@ -1,109 +1,14 @@
|
|
|
1
|
-
"use
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use client";
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
paginationEllipsisVariants: () => paginationEllipsisVariants,
|
|
27
|
-
paginationListVariants: () => paginationListVariants,
|
|
28
|
-
usePagination: () => usePagination
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(pagination_exports);
|
|
3
|
+
import {
|
|
4
|
+
buttonVariants
|
|
5
|
+
} from "../chunk-VJHD7QZH.mjs";
|
|
6
|
+
import {
|
|
7
|
+
cn
|
|
8
|
+
} from "../chunk-MEWYFWBX.mjs";
|
|
31
9
|
|
|
32
10
|
// src/ui/pagination/pagination.tsx
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// src/lib/utils.ts
|
|
36
|
-
var import_clsx = require("clsx");
|
|
37
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
38
|
-
function cn(...inputs) {
|
|
39
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// src/ui/buttons/variants.ts
|
|
43
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
44
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
45
|
-
[
|
|
46
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl",
|
|
47
|
-
"text-sm font-medium ring-offset-slate-950 transition-colors",
|
|
48
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
49
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
50
|
-
"select-none"
|
|
51
|
-
],
|
|
52
|
-
{
|
|
53
|
-
variants: {
|
|
54
|
-
appearance: {
|
|
55
|
-
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white",
|
|
56
|
-
secondary: "bg-slate-800 text-slate-50 hover:bg-slate-700",
|
|
57
|
-
destructive: "bg-rose-600 text-white hover:bg-rose-600",
|
|
58
|
-
outline: "border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10",
|
|
59
|
-
ghost: "bg-transparent text-slate-200 hover:bg-white/5",
|
|
60
|
-
link: "bg-transparent text-cyan-300 underline-offset-4 hover:underline",
|
|
61
|
-
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15",
|
|
62
|
-
emerald: "bg-emerald-600 text-white hover:bg-emerald-600",
|
|
63
|
-
indigo: "bg-indigo-600 text-white hover:bg-indigo-600",
|
|
64
|
-
purple: "bg-purple-600 text-white hover:bg-purple-600",
|
|
65
|
-
pink: "bg-pink-600 text-white hover:bg-pink-600",
|
|
66
|
-
rose: "bg-rose-600 text-white hover:bg-rose-600",
|
|
67
|
-
sky: "bg-sky-600 text-white hover:bg-sky-600",
|
|
68
|
-
teal: "bg-teal-600 text-white hover:bg-teal-600",
|
|
69
|
-
yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
|
|
70
|
-
orange: "bg-orange-600 text-white hover:bg-orange-600",
|
|
71
|
-
gray: "bg-gray-600 text-white hover:bg-gray-600",
|
|
72
|
-
amber: "bg-amber-600 text-white hover:bg-amber-600",
|
|
73
|
-
violet: "bg-violet-600 text-white hover:bg-violet-600",
|
|
74
|
-
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
|
|
75
|
-
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600",
|
|
76
|
-
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600",
|
|
77
|
-
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600",
|
|
78
|
-
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600",
|
|
79
|
-
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600",
|
|
80
|
-
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600",
|
|
81
|
-
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600",
|
|
82
|
-
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600"
|
|
83
|
-
},
|
|
84
|
-
size: {
|
|
85
|
-
sm: "h-7 md:h-9 px-3 text-xs",
|
|
86
|
-
md: "h-9 md:h-11 px-4",
|
|
87
|
-
lg: "h-10 md:h-12 px-5 text-base",
|
|
88
|
-
xl: "h-12 md:h-14 px-6 text-lg",
|
|
89
|
-
"2xl": "h-14 md:h-16 px-6 md:px-8 text-xl",
|
|
90
|
-
"3xl": "h-16 md:h-18 px-8 md:px-10 text-2xl",
|
|
91
|
-
"4xl": "h-18 md:h-20 px-10 md:px-12 text-2xl",
|
|
92
|
-
"5xl": "h-20 md:h-22 px-12 md:px-14 text-2xl",
|
|
93
|
-
"6xl": "h-22 md:h-24 px-14 md:px-16 text-2xl",
|
|
94
|
-
"7xl": "h-24 md:h-26 px-16 md:px-18 text-2xl",
|
|
95
|
-
"8xl": "h-26 md:h-28 px-20 text-2xl",
|
|
96
|
-
"9xl": "h-24 md:h-30 px-18 md:px-22 text-2xl",
|
|
97
|
-
"10xl": "h-26 md:h-32 px-20 md:px-24 text-2xl",
|
|
98
|
-
icon: "h-10 w-10"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultVariants: {
|
|
102
|
-
appearance: "default",
|
|
103
|
-
size: "md"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
);
|
|
11
|
+
import { forwardRef, useCallback as useCallback2, useId } from "react";
|
|
107
12
|
|
|
108
13
|
// src/ui/pagination/pagination-logic.ts
|
|
109
14
|
function buildPaginationItems({
|
|
@@ -163,7 +68,7 @@ function range(from, to) {
|
|
|
163
68
|
}
|
|
164
69
|
|
|
165
70
|
// src/ui/pagination/use-pagination.ts
|
|
166
|
-
|
|
71
|
+
import { useCallback, useMemo, useState } from "react";
|
|
167
72
|
function usePagination({
|
|
168
73
|
pageCount,
|
|
169
74
|
page,
|
|
@@ -172,7 +77,7 @@ function usePagination({
|
|
|
172
77
|
boundaryCount = 1,
|
|
173
78
|
onPageChange
|
|
174
79
|
}) {
|
|
175
|
-
const [internalPage, setInternalPage] =
|
|
80
|
+
const [internalPage, setInternalPage] = useState(
|
|
176
81
|
() => clampPage(defaultPage, pageCount)
|
|
177
82
|
);
|
|
178
83
|
const isControlled = page !== void 0;
|
|
@@ -180,7 +85,7 @@ function usePagination({
|
|
|
180
85
|
isControlled ? page : internalPage,
|
|
181
86
|
pageCount
|
|
182
87
|
);
|
|
183
|
-
const setPage =
|
|
88
|
+
const setPage = useCallback(
|
|
184
89
|
(next) => {
|
|
185
90
|
const clamped = clampPage(next, pageCount);
|
|
186
91
|
if (!isControlled) {
|
|
@@ -190,7 +95,7 @@ function usePagination({
|
|
|
190
95
|
},
|
|
191
96
|
[isControlled, onPageChange, pageCount]
|
|
192
97
|
);
|
|
193
|
-
const items =
|
|
98
|
+
const items = useMemo(
|
|
194
99
|
() => buildPaginationItems({
|
|
195
100
|
pageCount,
|
|
196
101
|
currentPage,
|
|
@@ -201,12 +106,12 @@ function usePagination({
|
|
|
201
106
|
);
|
|
202
107
|
const canGoPrev = pageCount > 0 && currentPage > 1;
|
|
203
108
|
const canGoNext = pageCount > 0 && currentPage < pageCount;
|
|
204
|
-
const goPrev =
|
|
109
|
+
const goPrev = useCallback(() => {
|
|
205
110
|
if (canGoPrev) {
|
|
206
111
|
setPage(currentPage - 1);
|
|
207
112
|
}
|
|
208
113
|
}, [canGoPrev, currentPage, setPage]);
|
|
209
|
-
const goNext =
|
|
114
|
+
const goNext = useCallback(() => {
|
|
210
115
|
if (canGoNext) {
|
|
211
116
|
setPage(currentPage + 1);
|
|
212
117
|
}
|
|
@@ -224,8 +129,8 @@ function usePagination({
|
|
|
224
129
|
}
|
|
225
130
|
|
|
226
131
|
// src/ui/pagination/variants.ts
|
|
227
|
-
|
|
228
|
-
var paginationListVariants =
|
|
132
|
+
import { cva } from "class-variance-authority";
|
|
133
|
+
var paginationListVariants = cva(
|
|
229
134
|
"inline-flex flex-wrap items-center rounded-xl border p-1 ring-offset-slate-950",
|
|
230
135
|
{
|
|
231
136
|
variants: {
|
|
@@ -282,7 +187,7 @@ var paginationListVariants = (0, import_class_variance_authority2.cva)(
|
|
|
282
187
|
}
|
|
283
188
|
}
|
|
284
189
|
);
|
|
285
|
-
var paginationEllipsisVariants =
|
|
190
|
+
var paginationEllipsisVariants = cva(
|
|
286
191
|
"inline-flex min-w-[2ch] select-none items-center justify-center px-1 font-medium text-slate-400",
|
|
287
192
|
{
|
|
288
193
|
variants: {
|
|
@@ -308,11 +213,11 @@ var paginationEllipsisVariants = (0, import_class_variance_authority2.cva)(
|
|
|
308
213
|
);
|
|
309
214
|
|
|
310
215
|
// src/ui/pagination/pagination.tsx
|
|
311
|
-
|
|
216
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
312
217
|
var defaultPrevLabel = "Previous page";
|
|
313
218
|
var defaultNextLabel = "Next page";
|
|
314
219
|
var defaultEllipsisLabel = "More pages";
|
|
315
|
-
var Pagination =
|
|
220
|
+
var Pagination = forwardRef(
|
|
316
221
|
function Pagination2({
|
|
317
222
|
className,
|
|
318
223
|
appearance = "default",
|
|
@@ -331,7 +236,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
331
236
|
"aria-label": ariaLabel = "Pagination",
|
|
332
237
|
...rest
|
|
333
238
|
}, ref) {
|
|
334
|
-
const id =
|
|
239
|
+
const id = useId();
|
|
335
240
|
const listId = `${id}-list`;
|
|
336
241
|
const {
|
|
337
242
|
currentPage,
|
|
@@ -349,7 +254,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
349
254
|
boundaryCount,
|
|
350
255
|
onPageChange
|
|
351
256
|
});
|
|
352
|
-
const handleKeyDown = (
|
|
257
|
+
const handleKeyDown = useCallback2(
|
|
353
258
|
(event) => {
|
|
354
259
|
if (pageCount <= 0) {
|
|
355
260
|
return;
|
|
@@ -392,7 +297,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
392
297
|
triggerFocusRing
|
|
393
298
|
);
|
|
394
299
|
if (href) {
|
|
395
|
-
return /* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ jsx(
|
|
396
301
|
"a",
|
|
397
302
|
{
|
|
398
303
|
"data-slot": "pagination-trigger",
|
|
@@ -404,7 +309,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
404
309
|
}
|
|
405
310
|
);
|
|
406
311
|
}
|
|
407
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ jsx(
|
|
408
313
|
"button",
|
|
409
314
|
{
|
|
410
315
|
type: "button",
|
|
@@ -427,7 +332,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
427
332
|
buttonVariants({ appearance: "outline", size }),
|
|
428
333
|
"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"
|
|
429
334
|
);
|
|
430
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ jsx(
|
|
431
336
|
"nav",
|
|
432
337
|
{
|
|
433
338
|
ref,
|
|
@@ -436,8 +341,8 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
436
341
|
className: cn("w-full", className),
|
|
437
342
|
onKeyDown: handleKeyDown,
|
|
438
343
|
...rest,
|
|
439
|
-
children: /* @__PURE__ */
|
|
440
|
-
showPrevNext ? getPageHref && prevHref && canGoPrev ? /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
345
|
+
showPrevNext ? getPageHref && prevHref && canGoPrev ? /* @__PURE__ */ jsx(
|
|
441
346
|
"a",
|
|
442
347
|
{
|
|
443
348
|
"data-slot": "pagination-prev",
|
|
@@ -446,7 +351,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
446
351
|
className: navTriggerClass,
|
|
447
352
|
children: "Prev"
|
|
448
353
|
}
|
|
449
|
-
) : /* @__PURE__ */
|
|
354
|
+
) : /* @__PURE__ */ jsx(
|
|
450
355
|
"button",
|
|
451
356
|
{
|
|
452
357
|
type: "button",
|
|
@@ -458,18 +363,18 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
458
363
|
children: "Prev"
|
|
459
364
|
}
|
|
460
365
|
) : null,
|
|
461
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ jsx(
|
|
462
367
|
"ul",
|
|
463
368
|
{
|
|
464
369
|
id: listId,
|
|
465
370
|
"data-slot": "pagination-list",
|
|
466
371
|
className: paginationListVariants({ appearance, size }),
|
|
467
|
-
children: items.map((item) => /* @__PURE__ */
|
|
372
|
+
children: items.map((item) => /* @__PURE__ */ jsx(
|
|
468
373
|
"li",
|
|
469
374
|
{
|
|
470
375
|
"data-slot": "pagination-item",
|
|
471
376
|
className: "inline-flex items-center",
|
|
472
|
-
children: item.type === "ellipsis" ? /* @__PURE__ */
|
|
377
|
+
children: item.type === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
473
378
|
"span",
|
|
474
379
|
{
|
|
475
380
|
"data-slot": "pagination-ellipsis",
|
|
@@ -484,7 +389,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
484
389
|
))
|
|
485
390
|
}
|
|
486
391
|
),
|
|
487
|
-
showPrevNext ? getPageHref && nextHref && canGoNext ? /* @__PURE__ */
|
|
392
|
+
showPrevNext ? getPageHref && nextHref && canGoNext ? /* @__PURE__ */ jsx(
|
|
488
393
|
"a",
|
|
489
394
|
{
|
|
490
395
|
"data-slot": "pagination-next",
|
|
@@ -493,7 +398,7 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
493
398
|
className: navTriggerClass,
|
|
494
399
|
children: "Next"
|
|
495
400
|
}
|
|
496
|
-
) : /* @__PURE__ */
|
|
401
|
+
) : /* @__PURE__ */ jsx(
|
|
497
402
|
"button",
|
|
498
403
|
{
|
|
499
404
|
type: "button",
|
|
@@ -511,13 +416,12 @@ var Pagination = (0, import_react2.forwardRef)(
|
|
|
511
416
|
}
|
|
512
417
|
);
|
|
513
418
|
Pagination.displayName = "Pagination";
|
|
514
|
-
|
|
515
|
-
0 && (module.exports = {
|
|
419
|
+
export {
|
|
516
420
|
Pagination,
|
|
517
421
|
buildPaginationItems,
|
|
518
422
|
clampPage,
|
|
519
423
|
paginationEllipsisVariants,
|
|
520
424
|
paginationListVariants,
|
|
521
425
|
usePagination
|
|
522
|
-
}
|
|
523
|
-
//# sourceMappingURL=pagination.
|
|
426
|
+
};
|
|
427
|
+
//# sourceMappingURL=pagination.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/pagination/pagination.tsx","../../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","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;;;ACqB5D,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqD;AACnD,MAAI,aAAa,GAAG;AAClB,WAAO,CAAC;AAAA,EACV;AAEA,QAAM,eAAe,KAAK,IAAI,GAAG,aAAa;AAC9C,QAAM,cAAc,KAAK,IAAI,GAAG,YAAY;AAC5C,QAAM,UAAU,UAAU,aAAa,SAAS;AAEhD,QAAM,eACJ,eAAe,IAAI,cAAc,IAAI;AACvC,MAAI,aAAa,cAAc;AAC7B,WAAO,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,QAAQ,MAAM,EAAE;AAAA,EACrE;AAEA,QAAM,kBAAkB;AACxB,QAAM,qBAAqB,YAAY,eAAe;AAEtD,QAAM,gBAAgB,KAAK,IAAI,UAAU,aAAa,kBAAkB,CAAC;AACzE,QAAM,cAAc,KAAK,IAAI,UAAU,aAAa,qBAAqB,CAAC;AAE1E,QAAM,QAAQ,oBAAI,IAAY;AAC9B,WAAS,IAAI,GAAG,KAAK,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;AAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAU;AAAA,cACV,cAAY;AAAA,cACZ,UAAU,CAAC;AAAA,cACX,WAAW;AAAA,cACX,SAAS;AAAA,cACV;AAAA;AAAA,UAED,IAEA;AAAA,UAEJ;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,aAAU;AAAA,cACV,WAAW,uBAAuB,EAAE,YAAY,KAAK,CAAC;AAAA,cAErD,gBAAM,IAAI,CAAC,SACV;AAAA,gBAAC;AAAA;AAAA,kBAEC,aAAU;AAAA,kBACV,WAAU;AAAA,kBAET,eAAK,SAAS,aACb;AAAA,oBAAC;AAAA;AAAA,sBACC,aAAU;AAAA,sBACV,eAAY;AAAA,sBACZ,OAAO;AAAA,sBACP,WAAW,2BAA2B,EAAE,KAAK,CAAC;AAAA,sBAC/C;AAAA;AAAA,kBAED,IAEA,kBAAkB,KAAK,KAAK;AAAA;AAAA,gBAdzB,KAAK,SAAS,SAAS,QAAQ,KAAK,KAAK,KAAK,KAAK;AAAA,cAgB1D,CACD;AAAA;AAAA,UACH;AAAA,UAEC,eACC,eAAe,YAAY,YACzB;AAAA,YAAC;AAAA;AAAA,cACC,aAAU;AAAA,cACV,cAAY;AAAA,cACZ,MAAM;AAAA,cACN,WAAW;AAAA,cACZ;AAAA;AAAA,UAED,IAEA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAU;AAAA,cACV,cAAY;AAAA,cACZ,UAAU,CAAC;AAAA,cACX,WAAW;AAAA,cACX,SAAS;AAAA,cACV;AAAA;AAAA,UAED,IAEA;AAAA,WACN;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["useCallback","Pagination","useCallback"]}
|
|
@@ -5,15 +5,15 @@ import { ReactNode } from 'react';
|
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
|
|
7
7
|
declare const progressVariants: (props?: ({
|
|
8
|
-
appearance?: "default" | "
|
|
9
|
-
size?: "
|
|
10
|
-
shape?: "flat" | "
|
|
8
|
+
appearance?: "default" | "secondary" | "destructive" | "emerald" | "indigo" | "purple" | "pink" | "rose" | "sky" | "teal" | "yellow" | "orange" | "outline" | "ghost" | "glass" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
shape?: "flat" | "rounded" | "pill" | null | undefined;
|
|
11
11
|
striped?: boolean | null | undefined;
|
|
12
12
|
animated?: boolean | null | undefined;
|
|
13
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
14
|
declare const progressTrackVariants: (props?: ({
|
|
15
|
-
size?: "
|
|
16
|
-
shape?: "flat" | "
|
|
15
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
16
|
+
shape?: "flat" | "rounded" | "pill" | null | undefined;
|
|
17
17
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
18
|
declare const progressBarVariants: (props?: ({
|
|
19
19
|
striped?: boolean | null | undefined;
|
package/dist/ui/progress.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ import { ReactNode } from 'react';
|
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
|
|
7
7
|
declare const progressVariants: (props?: ({
|
|
8
|
-
appearance?: "default" | "
|
|
9
|
-
size?: "
|
|
10
|
-
shape?: "flat" | "
|
|
8
|
+
appearance?: "default" | "secondary" | "destructive" | "emerald" | "indigo" | "purple" | "pink" | "rose" | "sky" | "teal" | "yellow" | "orange" | "outline" | "ghost" | "glass" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
shape?: "flat" | "rounded" | "pill" | null | undefined;
|
|
11
11
|
striped?: boolean | null | undefined;
|
|
12
12
|
animated?: boolean | null | undefined;
|
|
13
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
14
|
declare const progressTrackVariants: (props?: ({
|
|
15
|
-
size?: "
|
|
16
|
-
shape?: "flat" | "
|
|
15
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
16
|
+
shape?: "flat" | "rounded" | "pill" | null | undefined;
|
|
17
17
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
18
|
declare const progressBarVariants: (props?: ({
|
|
19
19
|
striped?: boolean | null | undefined;
|
package/dist/ui/progress.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
+
var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
|
|
3
4
|
|
|
4
5
|
// src/ui/progress/progress.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// src/lib/utils.ts
|
|
9
|
-
import { clsx } from "clsx";
|
|
10
|
-
import { twMerge } from "tailwind-merge";
|
|
11
|
-
function cn(...inputs) {
|
|
12
|
-
return twMerge(clsx(inputs));
|
|
13
|
-
}
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
var _framermotion = require('framer-motion');
|
|
14
8
|
|
|
15
9
|
// src/ui/progress/animations.ts
|
|
16
10
|
var progressAnimationPresets = {
|
|
@@ -22,8 +16,8 @@ var progressAnimationPresets = {
|
|
|
22
16
|
};
|
|
23
17
|
|
|
24
18
|
// src/ui/progress/variants.ts
|
|
25
|
-
|
|
26
|
-
var progressVariants = cva("w-full text-slate-50", {
|
|
19
|
+
var _classvarianceauthority = require('class-variance-authority');
|
|
20
|
+
var progressVariants = _classvarianceauthority.cva.call(void 0, "w-full text-slate-50", {
|
|
27
21
|
variants: {
|
|
28
22
|
appearance: {
|
|
29
23
|
default: "[--progress-fill:theme(colors.slate.50)]",
|
|
@@ -80,7 +74,7 @@ var progressVariants = cva("w-full text-slate-50", {
|
|
|
80
74
|
animated: false
|
|
81
75
|
}
|
|
82
76
|
});
|
|
83
|
-
var progressTrackVariants = cva("relative w-full overflow-hidden bg-white/10", {
|
|
77
|
+
var progressTrackVariants = _classvarianceauthority.cva.call(void 0, "relative w-full overflow-hidden bg-white/10", {
|
|
84
78
|
variants: {
|
|
85
79
|
size: {
|
|
86
80
|
xs: "h-1",
|
|
@@ -100,7 +94,7 @@ var progressTrackVariants = cva("relative w-full overflow-hidden bg-white/10", {
|
|
|
100
94
|
shape: "rounded"
|
|
101
95
|
}
|
|
102
96
|
});
|
|
103
|
-
var progressBarVariants = cva(
|
|
97
|
+
var progressBarVariants = _classvarianceauthority.cva.call(void 0,
|
|
104
98
|
"h-full w-full origin-left rounded-[inherit]",
|
|
105
99
|
{
|
|
106
100
|
variants: {
|
|
@@ -114,10 +108,10 @@ var progressBarVariants = cva(
|
|
|
114
108
|
);
|
|
115
109
|
|
|
116
110
|
// src/ui/progress/progress.tsx
|
|
117
|
-
|
|
118
|
-
var ProgressContext = createContext(null);
|
|
111
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
112
|
+
var ProgressContext = _react.createContext.call(void 0, null);
|
|
119
113
|
function useProgressContext(component) {
|
|
120
|
-
const ctx = useContext(ProgressContext);
|
|
114
|
+
const ctx = _react.useContext.call(void 0, ProgressContext);
|
|
121
115
|
if (!ctx) {
|
|
122
116
|
throw new Error(`${component} must be used within <Progress>`);
|
|
123
117
|
}
|
|
@@ -146,21 +140,21 @@ function Progress(props) {
|
|
|
146
140
|
const motionProps = progressAnimationPresets[animation];
|
|
147
141
|
const clamped = clamp(value, min, max);
|
|
148
142
|
const percent = max === min ? 0 : (clamped - min) / (max - min) * 100;
|
|
149
|
-
const ctx = useMemo(
|
|
143
|
+
const ctx = _react.useMemo.call(void 0,
|
|
150
144
|
() => ({
|
|
151
145
|
value: clamped,
|
|
152
146
|
min,
|
|
153
147
|
max,
|
|
154
|
-
size: size
|
|
155
|
-
shape: shape
|
|
148
|
+
size: _nullishCoalesce(size, () => ( "md")),
|
|
149
|
+
shape: _nullishCoalesce(shape, () => ( "rounded")),
|
|
156
150
|
striped: Boolean(striped),
|
|
157
151
|
animated: Boolean(animated),
|
|
158
|
-
appearance: appearance
|
|
152
|
+
appearance: _nullishCoalesce(appearance, () => ( "default"))
|
|
159
153
|
}),
|
|
160
154
|
[animated, appearance, clamped, max, min, shape, size, striped]
|
|
161
155
|
);
|
|
162
|
-
return /* @__PURE__ */ jsx(ProgressContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
163
|
-
motion.div,
|
|
156
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProgressContext.Provider, { value: ctx, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
157
|
+
_framermotion.motion.div,
|
|
164
158
|
{
|
|
165
159
|
ref,
|
|
166
160
|
"data-slot": "progress",
|
|
@@ -169,14 +163,14 @@ function Progress(props) {
|
|
|
169
163
|
"aria-valuemax": max,
|
|
170
164
|
"aria-valuenow": clamped,
|
|
171
165
|
"aria-label": label,
|
|
172
|
-
className: cn(
|
|
166
|
+
className: _chunkE5UX537Jjs.cn.call(void 0,
|
|
173
167
|
progressVariants({ appearance, size, shape, striped, animated }),
|
|
174
168
|
className
|
|
175
169
|
),
|
|
176
170
|
initial: false,
|
|
177
171
|
...motionProps,
|
|
178
172
|
...rest,
|
|
179
|
-
children: children
|
|
173
|
+
children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProgressBar, { style: { transform: `scaleX(${percent / 100})` } }) })))
|
|
180
174
|
}
|
|
181
175
|
) });
|
|
182
176
|
}
|
|
@@ -188,17 +182,17 @@ function ProgressBar({
|
|
|
188
182
|
...rest
|
|
189
183
|
}) {
|
|
190
184
|
const { size, shape, striped, animated } = useProgressContext("ProgressBar");
|
|
191
|
-
return /* @__PURE__ */ jsx(
|
|
185
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
192
186
|
"div",
|
|
193
187
|
{
|
|
194
188
|
"data-slot": "progress-track",
|
|
195
|
-
className: cn(progressTrackVariants({ size, shape }), "text-current"),
|
|
196
|
-
children: /* @__PURE__ */ jsx(
|
|
197
|
-
motion.div,
|
|
189
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, progressTrackVariants({ size, shape }), "text-current"),
|
|
190
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
191
|
+
_framermotion.motion.div,
|
|
198
192
|
{
|
|
199
193
|
ref,
|
|
200
194
|
"data-slot": "progress-bar",
|
|
201
|
-
className: cn(progressBarVariants({ striped }), className),
|
|
195
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, progressBarVariants({ striped }), className),
|
|
202
196
|
style: {
|
|
203
197
|
transformOrigin: "left center",
|
|
204
198
|
...style
|
|
@@ -213,25 +207,25 @@ function ProgressBar({
|
|
|
213
207
|
}
|
|
214
208
|
ProgressBar.displayName = "ProgressBar";
|
|
215
209
|
function ProgressLabel({ className, children }) {
|
|
216
|
-
return /* @__PURE__ */ jsx("div", { "data-slot": "progress-label", className: cn("mb-2 font-medium text-slate-200", className), children });
|
|
210
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-slot": "progress-label", className: _chunkE5UX537Jjs.cn.call(void 0, "mb-2 font-medium text-slate-200", className), children });
|
|
217
211
|
}
|
|
218
212
|
ProgressLabel.displayName = "ProgressLabel";
|
|
219
213
|
function ProgressValue({ className, children }) {
|
|
220
214
|
const { value, min, max } = useProgressContext("ProgressValue");
|
|
221
215
|
const range = max - min;
|
|
222
216
|
const pct = range === 0 ? 0 : Math.round((value - min) / range * 100);
|
|
223
|
-
const content = children
|
|
224
|
-
return /* @__PURE__ */ jsx("div", { "data-slot": "progress-value", className: cn("mt-2 text-right text-slate-400", className), children: content });
|
|
217
|
+
const content = _nullishCoalesce(children, () => ( `${pct}%`));
|
|
218
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-slot": "progress-value", className: _chunkE5UX537Jjs.cn.call(void 0, "mt-2 text-right text-slate-400", className), children: content });
|
|
225
219
|
}
|
|
226
220
|
ProgressValue.displayName = "ProgressValue";
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
exports.Progress = Progress; exports.ProgressBar = ProgressBar; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.progressAnimationPresets = progressAnimationPresets; exports.progressBarVariants = progressBarVariants; exports.progressTrackVariants = progressTrackVariants; exports.progressVariants = progressVariants;
|
|
237
231
|
//# sourceMappingURL=progress.js.map
|
package/dist/ui/progress.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/progress/progress.tsx","../../src/lib/utils.ts","../../src/ui/progress/animations.ts","../../src/ui/progress/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useMemo } from \"react\";\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { progressAnimationPresets } from \"./animations\";\nimport type { ProgressProps, ProgressSectionProps } from \"./types\";\nimport {\n progressBarVariants,\n progressTrackVariants,\n progressVariants,\n} from \"./variants\";\n\ntype ProgressCtx = {\n value: number;\n min: number;\n max: number;\n size: NonNullable<ProgressProps[\"size\"]>;\n shape: NonNullable<ProgressProps[\"shape\"]>;\n striped: boolean;\n animated: boolean;\n appearance: NonNullable<ProgressProps[\"appearance\"]>;\n};\n\nconst ProgressContext = createContext<ProgressCtx | null>(null);\n\nfunction useProgressContext(component: string): ProgressCtx {\n const ctx = useContext(ProgressContext);\n if (!ctx) {\n throw new Error(`${component} must be used within <Progress>`);\n }\n return ctx;\n}\n\nfunction clamp(value: number, min: number, max: number) {\n return Math.min(max, Math.max(min, value));\n}\n\nexport function Progress(props: ProgressProps) {\n const {\n className,\n appearance = \"default\",\n size = \"md\",\n shape = \"rounded\",\n striped = false,\n animated = false,\n animation = \"none\",\n value = 0,\n min = 0,\n max = 100,\n label,\n children,\n ref,\n ...rest\n } = props;\n const motionProps = progressAnimationPresets[animation];\n const clamped = clamp(value, min, max);\n const percent = max === min ? 0 : ((clamped - min) / (max - min)) * 100;\n\n const ctx = useMemo(\n () => ({\n value: clamped,\n min,\n max,\n size: size ?? \"md\",\n shape: shape ?? \"rounded\",\n striped: Boolean(striped),\n animated: Boolean(animated),\n appearance: appearance ?? \"default\",\n }),\n [animated, appearance, clamped, max, min, shape, size, striped],\n );\n\n return (\n <ProgressContext.Provider value={ctx}>\n <motion.div\n ref={ref}\n data-slot=\"progress\"\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={clamped}\n aria-label={label}\n className={cn(\n progressVariants({ appearance, size, shape, striped, animated }),\n className,\n )}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children ?? (\n <>\n <ProgressBar style={{ transform: `scaleX(${percent / 100})` }} />\n </>\n )}\n </motion.div>\n </ProgressContext.Provider>\n );\n}\n\nProgress.displayName = \"Progress\";\n\nexport function ProgressBar({\n className,\n style,\n ref,\n ...rest\n}: ProgressSectionProps & { style?: React.CSSProperties; ref?: React.Ref<HTMLDivElement> }) {\n const { size, shape, striped, animated } = useProgressContext(\"ProgressBar\");\n\n return (\n <div\n data-slot=\"progress-track\"\n className={cn(progressTrackVariants({ size, shape }), \"text-current\")}\n >\n <motion.div\n ref={ref}\n data-slot=\"progress-bar\"\n className={cn(progressBarVariants({ striped }), className)}\n style={{\n transformOrigin: \"left center\",\n ...style,\n }}\n animate={\n animated\n ? { x: [\"-30%\", \"0%\"], opacity: [0.85, 1] }\n : undefined\n }\n transition={\n animated\n ? { repeat: Infinity, duration: 1.1, ease: \"easeInOut\" }\n : undefined\n }\n {...rest}\n />\n </div>\n );\n}\n\nProgressBar.displayName = \"ProgressBar\";\n\nexport function ProgressLabel({ className, children }: ProgressSectionProps) {\n return (\n <div data-slot=\"progress-label\" className={cn(\"mb-2 font-medium text-slate-200\", className)}>\n {children}\n </div>\n );\n}\n\nProgressLabel.displayName = \"ProgressLabel\";\n\nexport function ProgressValue({ className, children }: ProgressSectionProps) {\n const { value, min, max } = useProgressContext(\"ProgressValue\");\n const range = max - min;\n const pct = range === 0 ? 0 : Math.round(((value - min) / range) * 100);\n const content = children ?? `${pct}%`;\n return (\n <div data-slot=\"progress-value\" className={cn(\"mt-2 text-right text-slate-400\", className)}>\n {content}\n </div>\n );\n}\n\nProgressValue.displayName = \"ProgressValue\";\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 type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { ProgressAnimation } from \"./types\";\n\ntype ProgressPresetMotionProps = Pick<\n HTMLMotionProps<\"div\">,\n \"transition\" | \"animate\"\n>;\n\nexport type ProgressAnimationPresets = Record<\n ProgressAnimation,\n ProgressPresetMotionProps\n>;\n\nexport const progressAnimationPresets: ProgressAnimationPresets = {\n none: {},\n shimmer: {\n animate: { backgroundPosition: [\"0% 0%\", \"100% 0%\"] },\n transition: { repeat: Infinity, duration: 1.2, ease: \"linear\" },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nexport const progressVariants = cva(\"w-full text-slate-50\", {\n variants: {\n appearance: {\n default: \"[--progress-fill:theme(colors.slate.50)]\",\n secondary: \"[--progress-fill:theme(colors.slate.300)]\",\n destructive: \"[--progress-fill:theme(colors.rose.400)]\",\n emerald: \"[--progress-fill:theme(colors.emerald.400)]\",\n indigo: \"[--progress-fill:theme(colors.indigo.400)]\",\n purple: \"[--progress-fill:theme(colors.purple.400)]\",\n pink: \"[--progress-fill:theme(colors.pink.400)]\",\n rose: \"[--progress-fill:theme(colors.rose.400)]\",\n sky: \"[--progress-fill:theme(colors.sky.400)]\",\n teal: \"[--progress-fill:theme(colors.teal.400)]\",\n yellow: \"[--progress-fill:theme(colors.yellow.400)]\",\n orange: \"[--progress-fill:theme(colors.orange.400)]\",\n outline: \"[--progress-fill:theme(colors.cyan.300)]\",\n ghost: \"[--progress-fill:theme(colors.slate.200)]\",\n glass: \"[--progress-fill:theme(colors.white)]\",\n \"gradient-blue\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.blue.500),theme(colors.purple.500))]\",\n \"gradient-green\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.green.500),theme(colors.lime.500))]\",\n \"gradient-red\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.red.500),theme(colors.pink.500))]\",\n \"gradient-yellow\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.yellow.500),theme(colors.orange.500))]\",\n \"gradient-purple\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.purple.500),theme(colors.pink.500))]\",\n \"gradient-teal\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.teal.500),theme(colors.cyan.500))]\",\n \"gradient-indigo\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.indigo.500),theme(colors.purple.500))]\",\n \"gradient-pink\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.pink.500),theme(colors.rose.500))]\",\n \"gradient-orange\":\n \"[--progress-fill:linear-gradient(90deg,theme(colors.orange.500),theme(colors.red.500))]\",\n },\n size: {\n xs: \"text-[0.65rem]\",\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n xl: \"text-lg\",\n },\n shape: {\n flat: \"rounded-none\",\n rounded: \"rounded-md\",\n pill: \"rounded-full\",\n },\n striped: {\n true: \"\",\n false: \"\",\n },\n animated: {\n true: \"\",\n false: \"\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n shape: \"rounded\",\n striped: false,\n animated: false,\n },\n});\n\nexport const progressTrackVariants = cva(\"relative w-full overflow-hidden bg-white/10\", {\n variants: {\n size: {\n xs: \"h-1\",\n sm: \"h-1.5\",\n md: \"h-2\",\n lg: \"h-3\",\n xl: \"h-4\",\n },\n shape: {\n flat: \"rounded-none\",\n rounded: \"rounded-md\",\n pill: \"rounded-full\",\n },\n },\n defaultVariants: {\n size: \"md\",\n shape: \"rounded\",\n },\n});\n\nexport const progressBarVariants = cva(\n \"h-full w-full origin-left rounded-[inherit]\",\n {\n variants: {\n striped: {\n true: \"bg-[repeating-linear-gradient(135deg,rgba(255,255,255,0.18)_0,rgba(255,255,255,0.18)_10px,transparent_10px,transparent_20px)]\",\n false: \"[background:var(--progress-fill)]\",\n },\n },\n defaultVariants: { striped: false },\n },\n);\n"],"mappings":";;;;AAEA,SAAS,eAAe,YAAY,eAAe;AACnD,SAAS,cAAc;;;ACHvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACSO,IAAM,2BAAqD;AAAA,EAChE,MAAM,CAAC;AAAA,EACP,SAAS;AAAA,IACP,SAAS,EAAE,oBAAoB,CAAC,SAAS,SAAS,EAAE;AAAA,IACpD,YAAY,EAAE,QAAQ,UAAU,UAAU,KAAK,MAAM,SAAS;AAAA,EAChE;AACF;;;ACpBA,SAAS,WAAW;AAEb,IAAM,mBAAmB,IAAI,wBAAwB;AAAA,EAC1D,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAAS;AAAA,MACT,WAAW;AAAA,MACX,aAA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AAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA,EAAA;AACA,EAAA;AACA,IAAA;AACA,IAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,QAAA;AACA,QAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,YAAA;AACA,YAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,QAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA;AACA;AACA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/Users/shubham/Desktop/Repos/NEXT JS/zentauri-ui/packages/components/dist/ui/progress.js","sourcesContent":[null]}
|