@nuvia/components 0.1.0
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 +96 -0
- package/dist/hooks/use-mobile.cjs +44 -0
- package/dist/hooks/use-mobile.cjs.map +1 -0
- package/dist/hooks/use-mobile.js +22 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.cjs +146 -0
- package/dist/hooks/use-toast.cjs.map +1 -0
- package/dist/hooks/use-toast.js +122 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.cjs +4117 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +3800 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/fonts.cjs +15 -0
- package/dist/lib/fonts.cjs.map +1 -0
- package/dist/lib/fonts.js +13 -0
- package/dist/lib/fonts.js.map +1 -0
- package/dist/lib/utils.cjs +18 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.js +14 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/theme.cjs +24 -0
- package/dist/providers/theme.cjs.map +1 -0
- package/dist/providers/theme.js +22 -0
- package/dist/providers/theme.js.map +1 -0
- package/dist/ui/accordion.cjs +75 -0
- package/dist/ui/accordion.cjs.map +1 -0
- package/dist/ui/accordion.js +49 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.cjs +189 -0
- package/dist/ui/alert-dialog.cjs.map +1 -0
- package/dist/ui/alert-dialog.js +156 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.cjs +81 -0
- package/dist/ui/alert.cjs.map +1 -0
- package/dist/ui/alert.js +57 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.cjs +29 -0
- package/dist/ui/aspect-ratio.cjs.map +1 -0
- package/dist/ui/aspect-ratio.js +7 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/auto-complete.cjs +284 -0
- package/dist/ui/auto-complete.cjs.map +1 -0
- package/dist/ui/auto-complete.js +262 -0
- package/dist/ui/auto-complete.js.map +1 -0
- package/dist/ui/avatar.cjs +70 -0
- package/dist/ui/avatar.cjs.map +1 -0
- package/dist/ui/avatar.js +45 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.cjs +34 -0
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.js +31 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.cjs +120 -0
- package/dist/ui/breadcrumb.cjs.map +1 -0
- package/dist/ui/breadcrumb.js +92 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.cjs +80 -0
- package/dist/ui/button.cjs.map +1 -0
- package/dist/ui/button.js +57 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.cjs +135 -0
- package/dist/ui/calendar.cjs.map +1 -0
- package/dist/ui/calendar.js +113 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.cjs +89 -0
- package/dist/ui/card.cjs.map +1 -0
- package/dist/ui/card.js +62 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.cjs +269 -0
- package/dist/ui/carousel.cjs.map +1 -0
- package/dist/ui/carousel.js +240 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/chart.cjs +267 -0
- package/dist/ui/chart.cjs.map +1 -0
- package/dist/ui/chart.js +239 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/checkbox.cjs +55 -0
- package/dist/ui/checkbox.cjs.map +1 -0
- package/dist/ui/checkbox.js +32 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/chip.cjs +79 -0
- package/dist/ui/chip.cjs.map +1 -0
- package/dist/ui/chip.js +55 -0
- package/dist/ui/chip.js.map +1 -0
- package/dist/ui/collapsible.cjs +33 -0
- package/dist/ui/collapsible.cjs.map +1 -0
- package/dist/ui/collapsible.js +9 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/combobox.cjs +254 -0
- package/dist/ui/combobox.cjs.map +1 -0
- package/dist/ui/combobox.js +232 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/command.cjs +199 -0
- package/dist/ui/command.cjs.map +1 -0
- package/dist/ui/command.js +168 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.cjs +181 -0
- package/dist/ui/context-menu.cjs.map +1 -0
- package/dist/ui/context-menu.js +144 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/dialog.cjs +132 -0
- package/dist/ui/dialog.cjs.map +1 -0
- package/dist/ui/dialog.js +100 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/drawer.cjs +128 -0
- package/dist/ui/drawer.cjs.map +1 -0
- package/dist/ui/drawer.js +97 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.cjs +194 -0
- package/dist/ui/dropdown-menu.cjs.map +1 -0
- package/dist/ui/dropdown-menu.js +157 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/form.cjs +179 -0
- package/dist/ui/form.cjs.map +1 -0
- package/dist/ui/form.js +149 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.cjs +53 -0
- package/dist/ui/hover-card.cjs.map +1 -0
- package/dist/ui/hover-card.js +28 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/input-otp.cjs +76 -0
- package/dist/ui/input-otp.cjs.map +1 -0
- package/dist/ui/input-otp.js +51 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.cjs +51 -0
- package/dist/ui/input.cjs.map +1 -0
- package/dist/ui/input.js +29 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.cjs +55 -0
- package/dist/ui/label.cjs.map +1 -0
- package/dist/ui/label.js +32 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/lottie-animation.cjs +85 -0
- package/dist/ui/lottie-animation.cjs.map +1 -0
- package/dist/ui/lottie-animation.js +79 -0
- package/dist/ui/lottie-animation.js.map +1 -0
- package/dist/ui/menubar.cjs +210 -0
- package/dist/ui/menubar.cjs.map +1 -0
- package/dist/ui/menubar.js +172 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/multi-combobox.cjs +319 -0
- package/dist/ui/multi-combobox.cjs.map +1 -0
- package/dist/ui/multi-combobox.js +297 -0
- package/dist/ui/multi-combobox.js.map +1 -0
- package/dist/ui/navigation-menu.cjs +136 -0
- package/dist/ui/navigation-menu.cjs.map +1 -0
- package/dist/ui/navigation-menu.js +105 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.cjs +172 -0
- package/dist/ui/pagination.cjs.map +1 -0
- package/dist/ui/pagination.js +144 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.cjs +55 -0
- package/dist/ui/popover.cjs.map +1 -0
- package/dist/ui/popover.js +29 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.cjs +54 -0
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/ui/progress.js +31 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.cjs +62 -0
- package/dist/ui/radio-group.cjs.map +1 -0
- package/dist/ui/radio-group.js +38 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.cjs +65 -0
- package/dist/ui/resizable.cjs.map +1 -0
- package/dist/ui/resizable.js +41 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.cjs +66 -0
- package/dist/ui/scroll-area.cjs.map +1 -0
- package/dist/ui/scroll-area.js +42 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.cjs +152 -0
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.js +120 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.cjs +52 -0
- package/dist/ui/separator.cjs.map +1 -0
- package/dist/ui/separator.js +29 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.cjs +143 -0
- package/dist/ui/sheet.cjs.map +1 -0
- package/dist/ui/sheet.js +111 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.cjs +816 -0
- package/dist/ui/sidebar.cjs.map +1 -0
- package/dist/ui/sidebar.js +768 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.cjs +25 -0
- package/dist/ui/skeleton.cjs.map +1 -0
- package/dist/ui/skeleton.js +23 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.cjs +51 -0
- package/dist/ui/slider.cjs.map +1 -0
- package/dist/ui/slider.js +28 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.cjs +46 -0
- package/dist/ui/sonner.cjs.map +1 -0
- package/dist/ui/sonner.js +41 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.cjs +83 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.js +81 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.cjs +67 -0
- package/dist/ui/switch.cjs.map +1 -0
- package/dist/ui/switch.js +44 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.cjs +118 -0
- package/dist/ui/table.cjs.map +1 -0
- package/dist/ui/table.js +89 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.cjs +79 -0
- package/dist/ui/tabs.cjs.map +1 -0
- package/dist/ui/tabs.js +53 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.cjs +48 -0
- package/dist/ui/textarea.cjs.map +1 -0
- package/dist/ui/textarea.js +26 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast.cjs +125 -0
- package/dist/ui/toast.cjs.map +1 -0
- package/dist/ui/toast.js +96 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.cjs +251 -0
- package/dist/ui/toaster.cjs.map +1 -0
- package/dist/ui/toaster.js +228 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.cjs +101 -0
- package/dist/ui/toggle-group.cjs.map +1 -0
- package/dist/ui/toggle-group.js +76 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.cjs +66 -0
- package/dist/ui/toggle.cjs.map +1 -0
- package/dist/ui/toggle.js +42 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.cjs +54 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.js +28 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/package.json +116 -0
- package/src/styles/globals.css +529 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React2 = require('react');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
require('sonner');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
8
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
var reactIcons = require('@radix-ui/react-icons');
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n.default = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
31
|
+
|
|
32
|
+
// src/ui/pagination.tsx
|
|
33
|
+
var cn = (...inputs) => tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
35
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
variant: {
|
|
39
|
+
default: "bg-foreground-primary-medium text-white shadow hover:bg-primary/90",
|
|
40
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
41
|
+
outline: "border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy",
|
|
42
|
+
secondary: "bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy",
|
|
43
|
+
ghost: "text-foreground-secondary-heavy hover:bg-background-secondary-light",
|
|
44
|
+
link: "text-text-links hover:bg-background-secondary-light",
|
|
45
|
+
accent: "bg-accent nuvia-gradient-1 text-white"
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
default: "h-10 px-4 py-2",
|
|
49
|
+
xs: "h-[30px] px-3 rounded-xl text-xs",
|
|
50
|
+
sm: "h-9 rounded-xl px-3 text-xs",
|
|
51
|
+
lg: "h-12 rounded-xl px-8",
|
|
52
|
+
icon: "h-10 w-10 min-w-10",
|
|
53
|
+
"icon-xs": "h-[30px] w-[30px] min-w-[30px]",
|
|
54
|
+
"icon-sm": "h-9 w-9 min-w-9",
|
|
55
|
+
bullet: "h-8 w-8 min-w-8"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "default",
|
|
60
|
+
size: "default"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
var Button = React2__namespace.forwardRef(
|
|
65
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
66
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
67
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
Comp,
|
|
69
|
+
{
|
|
70
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
71
|
+
ref,
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
Button.displayName = "Button";
|
|
78
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
+
"nav",
|
|
80
|
+
{
|
|
81
|
+
role: "navigation",
|
|
82
|
+
"aria-label": "pagination",
|
|
83
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
Pagination.displayName = "Pagination";
|
|
88
|
+
var PaginationContent = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
"ul",
|
|
90
|
+
{
|
|
91
|
+
ref,
|
|
92
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
));
|
|
96
|
+
PaginationContent.displayName = "PaginationContent";
|
|
97
|
+
var PaginationItem = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("cursor-pointer", className), ...props }));
|
|
98
|
+
PaginationItem.displayName = "PaginationItem";
|
|
99
|
+
var PaginationLink = ({
|
|
100
|
+
className,
|
|
101
|
+
isActive,
|
|
102
|
+
size = "icon",
|
|
103
|
+
...props
|
|
104
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
105
|
+
"a",
|
|
106
|
+
{
|
|
107
|
+
"aria-current": isActive ? "page" : void 0,
|
|
108
|
+
className: cn(
|
|
109
|
+
buttonVariants({
|
|
110
|
+
variant: isActive ? "outline" : "ghost",
|
|
111
|
+
size
|
|
112
|
+
}),
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
PaginationLink.displayName = "PaginationLink";
|
|
119
|
+
var PaginationPrevious = ({
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
+
PaginationLink,
|
|
124
|
+
{
|
|
125
|
+
"aria-label": "Go to previous page",
|
|
126
|
+
size: "default",
|
|
127
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
128
|
+
...props,
|
|
129
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.ChevronLeftIcon, { className: "h-4 w-4" })
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
133
|
+
var PaginationNext = ({
|
|
134
|
+
className,
|
|
135
|
+
...props
|
|
136
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
+
PaginationLink,
|
|
138
|
+
{
|
|
139
|
+
"aria-label": "Go to next page",
|
|
140
|
+
size: "default",
|
|
141
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
142
|
+
...props,
|
|
143
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.ChevronRightIcon, { className: "h-4 w-4" })
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
PaginationNext.displayName = "PaginationNext";
|
|
147
|
+
var PaginationEllipsis = ({
|
|
148
|
+
className,
|
|
149
|
+
...props
|
|
150
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
151
|
+
"span",
|
|
152
|
+
{
|
|
153
|
+
"aria-hidden": true,
|
|
154
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
155
|
+
...props,
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
158
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
163
|
+
|
|
164
|
+
exports.Pagination = Pagination;
|
|
165
|
+
exports.PaginationContent = PaginationContent;
|
|
166
|
+
exports.PaginationEllipsis = PaginationEllipsis;
|
|
167
|
+
exports.PaginationItem = PaginationItem;
|
|
168
|
+
exports.PaginationLink = PaginationLink;
|
|
169
|
+
exports.PaginationNext = PaginationNext;
|
|
170
|
+
exports.PaginationPrevious = PaginationPrevious;
|
|
171
|
+
//# sourceMappingURL=pagination.cjs.map
|
|
172
|
+
//# sourceMappingURL=pagination.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/button.tsx","../../src/ui/pagination.tsx"],"names":["twMerge","clsx","cva","React","Slot","jsx","React2","ChevronLeftIcon","ChevronRightIcon","jsxs","DotsHorizontalIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,cAAA,GAAiBC,0BAAA;AAAA,EACrB,0RAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,oEAAA;AAAA,QACF,WAAA,EACE,oEAAA;AAAA,QACF,OAAA,EACE,mHAAA;AAAA,QACF,SAAA,EACE,mGAAA;AAAA,QACF,KAAA,EACE,qEAAA;AAAA,QACF,IAAA,EAAM,qDAAA;AAAA,QACN,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,gBAAA;AAAA,QACT,EAAA,EAAI,kCAAA;AAAA,QACJ,EAAA,EAAI,6BAAA;AAAA,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AAA;AAAA,IACC,YAAA,EAAW,iBAAA;AAAA,IACX,IAAA,EAAK,SAAA;AAAA,IACL,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,IAC9C,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAAA,cAAAA,CAACG,2BAAA,EAAA,EAAiB,SAAA,EAAU,SAAA,EAAU;AAAA;AACxC;AAEF,cAAA,CAAe,WAAA,GAAc,gBAAA;AAE7B,IAAM,qBAAqB,CAAC;AAAA,EAC1B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACEC,eAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,aAAA,EAAW,IAAA;AAAA,IACX,SAAA,EAAW,EAAA,CAAG,0CAAA,EAA4C,SAAS,CAAA;AAAA,IAClE,GAAG,KAAA;AAAA,IAEJ,QAAA,EAAA;AAAA,sBAAAJ,cAAAA,CAACK,6BAAA,EAAA,EAAmB,SAAA,EAAU,SAAA,EAAU,CAAA;AAAA,sBACxCL,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAU,QAAA,EAAA,YAAA,EAAU;AAAA;AAAA;AACtC;AAEF,kBAAA,CAAmB,WAAA,GAAc,oBAAA","file":"pagination.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-foreground-primary-medium text-white shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy\",\n secondary:\n \"bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy\",\n ghost:\n \"text-foreground-secondary-heavy hover:bg-background-secondary-light\",\n link: \"text-text-links hover:bg-background-secondary-light\",\n accent: \"bg-accent nuvia-gradient-1 text-white\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n xs: \"h-[30px] px-3 rounded-xl text-xs\",\n sm: \"h-9 rounded-xl px-3 text-xs\",\n lg: \"h-12 rounded-xl px-8\",\n icon: \"h-10 w-10 min-w-10\",\n \"icon-xs\": \"h-[30px] w-[30px] min-w-[30px]\",\n \"icon-sm\": \"h-9 w-9 min-w-9\",\n bullet: \"h-8 w-8 min-w-8\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\nimport { ButtonProps, buttonVariants } from \"./button\"\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from \"@radix-ui/react-icons\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"cursor-pointer\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 cursor-pointer\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 cursor-pointer\", className)}\n {...props}\n >\n <ChevronRightIcon className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n"]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import * as React2 from 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import 'sonner';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
import { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';
|
|
9
|
+
|
|
10
|
+
// src/ui/pagination.tsx
|
|
11
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
12
|
+
var buttonVariants = cva(
|
|
13
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "bg-foreground-primary-medium text-white shadow hover:bg-primary/90",
|
|
18
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
19
|
+
outline: "border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy",
|
|
20
|
+
secondary: "bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy",
|
|
21
|
+
ghost: "text-foreground-secondary-heavy hover:bg-background-secondary-light",
|
|
22
|
+
link: "text-text-links hover:bg-background-secondary-light",
|
|
23
|
+
accent: "bg-accent nuvia-gradient-1 text-white"
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
default: "h-10 px-4 py-2",
|
|
27
|
+
xs: "h-[30px] px-3 rounded-xl text-xs",
|
|
28
|
+
sm: "h-9 rounded-xl px-3 text-xs",
|
|
29
|
+
lg: "h-12 rounded-xl px-8",
|
|
30
|
+
icon: "h-10 w-10 min-w-10",
|
|
31
|
+
"icon-xs": "h-[30px] w-[30px] min-w-[30px]",
|
|
32
|
+
"icon-sm": "h-9 w-9 min-w-9",
|
|
33
|
+
bullet: "h-8 w-8 min-w-8"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "default",
|
|
38
|
+
size: "default"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
var Button = React2.forwardRef(
|
|
43
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
Comp,
|
|
47
|
+
{
|
|
48
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
49
|
+
ref,
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
Button.displayName = "Button";
|
|
56
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
57
|
+
"nav",
|
|
58
|
+
{
|
|
59
|
+
role: "navigation",
|
|
60
|
+
"aria-label": "pagination",
|
|
61
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
Pagination.displayName = "Pagination";
|
|
66
|
+
var PaginationContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
67
|
+
"ul",
|
|
68
|
+
{
|
|
69
|
+
ref,
|
|
70
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
PaginationContent.displayName = "PaginationContent";
|
|
75
|
+
var PaginationItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("cursor-pointer", className), ...props }));
|
|
76
|
+
PaginationItem.displayName = "PaginationItem";
|
|
77
|
+
var PaginationLink = ({
|
|
78
|
+
className,
|
|
79
|
+
isActive,
|
|
80
|
+
size = "icon",
|
|
81
|
+
...props
|
|
82
|
+
}) => /* @__PURE__ */ jsx(
|
|
83
|
+
"a",
|
|
84
|
+
{
|
|
85
|
+
"aria-current": isActive ? "page" : void 0,
|
|
86
|
+
className: cn(
|
|
87
|
+
buttonVariants({
|
|
88
|
+
variant: isActive ? "outline" : "ghost",
|
|
89
|
+
size
|
|
90
|
+
}),
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
PaginationLink.displayName = "PaginationLink";
|
|
97
|
+
var PaginationPrevious = ({
|
|
98
|
+
className,
|
|
99
|
+
...props
|
|
100
|
+
}) => /* @__PURE__ */ jsx(
|
|
101
|
+
PaginationLink,
|
|
102
|
+
{
|
|
103
|
+
"aria-label": "Go to previous page",
|
|
104
|
+
size: "default",
|
|
105
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
106
|
+
...props,
|
|
107
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "h-4 w-4" })
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
111
|
+
var PaginationNext = ({
|
|
112
|
+
className,
|
|
113
|
+
...props
|
|
114
|
+
}) => /* @__PURE__ */ jsx(
|
|
115
|
+
PaginationLink,
|
|
116
|
+
{
|
|
117
|
+
"aria-label": "Go to next page",
|
|
118
|
+
size: "default",
|
|
119
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
120
|
+
...props,
|
|
121
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-4 w-4" })
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
PaginationNext.displayName = "PaginationNext";
|
|
125
|
+
var PaginationEllipsis = ({
|
|
126
|
+
className,
|
|
127
|
+
...props
|
|
128
|
+
}) => /* @__PURE__ */ jsxs(
|
|
129
|
+
"span",
|
|
130
|
+
{
|
|
131
|
+
"aria-hidden": true,
|
|
132
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
133
|
+
...props,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
136
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
141
|
+
|
|
142
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
143
|
+
//# sourceMappingURL=pagination.js.map
|
|
144
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/button.tsx","../../src/ui/pagination.tsx"],"names":["React","jsx"],"mappings":";;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiC,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,0RAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,oEAAA;AAAA,QACF,WAAA,EACE,oEAAA;AAAA,QACF,OAAA,EACE,mHAAA;AAAA,QACF,SAAA,EACE,mGAAA;AAAA,QACF,KAAA,EACE,qEAAA;AAAA,QACF,IAAA,EAAM,qDA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AAEF,kBAAA,CAAmB,WAAA,GAAc,oBAAA;AAEjC,IAAM,iBAAiB,CAAC;AAAA,EACtB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACEA,GAAAA;AAAA,EAAC,cAAA;AAAA,EAAA;AAAA,IACC,YAAA,EAAW,iBAAA;AAAA,IACX,IAAA,EAAK,SAAA;AAAA,IACL,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,IAC9C,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAAA,GAAAA,CAAC,gBAAA,EAAA,EAAiB,SAAA,EAAU,SAAA,EAAU;AAAA;AACxC;AAEF,cAAA,CAAe,WAAA,GAAc,gBAAA;AAE7B,IAAM,qBAAqB,CAAC;AAAA,EAC1B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,IAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,aAAA,EAAW,IAAA;AAAA,IACX,SAAA,EAAW,EAAA,CAAG,0CAAA,EAA4C,SAAS,CAAA;AAAA,IAClE,GAAG,KAAA;AAAA,IAEJ,QAAA,EAAA;AAAA,sBAAAA,GAAAA,CAAC,kBAAA,EAAA,EAAmB,SAAA,EAAU,SAAA,EAAU,CAAA;AAAA,sBACxCA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAU,QAAA,EAAA,YAAA,EAAU;AAAA;AAAA;AACtC;AAEF,kBAAA,CAAmB,WAAA,GAAc,oBAAA","file":"pagination.js","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-foreground-primary-medium text-white shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy\",\n secondary:\n \"bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy\",\n ghost:\n \"text-foreground-secondary-heavy hover:bg-background-secondary-light\",\n link: \"text-text-links hover:bg-background-secondary-light\",\n accent: \"bg-accent nuvia-gradient-1 text-white\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n xs: \"h-[30px] px-3 rounded-xl text-xs\",\n sm: \"h-9 rounded-xl px-3 text-xs\",\n lg: \"h-12 rounded-xl px-8\",\n icon: \"h-10 w-10 min-w-10\",\n \"icon-xs\": \"h-[30px] w-[30px] min-w-[30px]\",\n \"icon-sm\": \"h-9 w-9 min-w-9\",\n bullet: \"h-8 w-8 min-w-8\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\nimport { ButtonProps, buttonVariants } from \"./button\"\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from \"@radix-ui/react-icons\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"cursor-pointer\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 cursor-pointer\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 cursor-pointer\", className)}\n {...props}\n >\n <ChevronRightIcon className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
require('sonner');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
30
|
+
|
|
31
|
+
var cn = (...inputs) => tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
|
+
var Popover = PopoverPrimitive__namespace.Root;
|
|
33
|
+
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
34
|
+
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
35
|
+
var PopoverContent = React__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
+
PopoverPrimitive__namespace.Content,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
align,
|
|
40
|
+
sideOffset,
|
|
41
|
+
className: cn(
|
|
42
|
+
"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
43
|
+
className
|
|
44
|
+
),
|
|
45
|
+
...props
|
|
46
|
+
}
|
|
47
|
+
) }));
|
|
48
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
49
|
+
|
|
50
|
+
exports.Popover = Popover;
|
|
51
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
52
|
+
exports.PopoverContent = PopoverContent;
|
|
53
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
54
|
+
//# sourceMappingURL=popover.cjs.map
|
|
55
|
+
//# sourceMappingURL=popover.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/popover.tsx"],"names":["twMerge","clsx","PopoverPrimitive","React","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,OAAA,GAA2BC,2BAAA,CAAA;AAEjC,IAAM,cAAA,GAAkCA,2BAAA,CAAA;AAExC,IAAM,aAAA,GAAiCA,2BAAA,CAAA;AAEvC,IAAM,cAAA,GAAuBC,gBAAA,CAAA,UAAA,CAG3B,CAAC,EAAE,WAAW,KAAA,GAAQ,QAAA,EAAU,UAAA,GAAa,CAAA,EAAG,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC5DC,cAAA,CAAkBF,oCAAjB,EACC,QAAA,kBAAAE,cAAA;AAAA,EAAkBF,2BAAA,CAAA,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,4aAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CAAA,EACF,CACD;AACD,cAAA,CAAe,cAA+BA,2BAAA,CAAA,OAAA,CAAQ,WAAA","file":"popover.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"../lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import 'sonner';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
9
|
+
var Popover = PopoverPrimitive.Root;
|
|
10
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
11
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
12
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
13
|
+
PopoverPrimitive.Content,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
align,
|
|
17
|
+
sideOffset,
|
|
18
|
+
className: cn(
|
|
19
|
+
"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
) }));
|
|
25
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
26
|
+
|
|
27
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
28
|
+
//# sourceMappingURL=popover.js.map
|
|
29
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/popover.tsx"],"names":[],"mappings":";;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiC,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,OAAA,GAA2B,gBAAA,CAAA;AAEjC,IAAM,cAAA,GAAkC,gBAAA,CAAA;AAExC,IAAM,aAAA,GAAiC,gBAAA,CAAA;AAEvC,IAAM,cAAA,GAAuB,KAAA,CAAA,UAAA,CAG3B,CAAC,EAAE,WAAW,KAAA,GAAQ,QAAA,EAAU,UAAA,GAAa,CAAA,EAAG,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC5D,GAAA,CAAkB,yBAAjB,EACC,QAAA,kBAAA,GAAA;AAAA,EAAkB,gBAAA,CAAA,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,4aAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CAAA,EACF,CACD;AACD,cAAA,CAAe,cAA+B,gBAAA,CAAA,OAAA,CAAQ,WAAA","file":"popover.js","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"../lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
require('sonner');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
30
|
+
|
|
31
|
+
var cn = (...inputs) => tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
|
+
var Progress = React__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
ProgressPrimitive__namespace.Root,
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
className: cn(
|
|
37
|
+
"relative h-4 w-full overflow-hidden rounded-full bg-primary/20",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
|
+
ProgressPrimitive__namespace.Indicator,
|
|
43
|
+
{
|
|
44
|
+
className: "h-full w-full rounded-full flex-1 bg-primary transition-all",
|
|
45
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
));
|
|
50
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
51
|
+
|
|
52
|
+
exports.Progress = Progress;
|
|
53
|
+
//# sourceMappingURL=progress.cjs.map
|
|
54
|
+
//# sourceMappingURL=progress.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/progress.tsx"],"names":["twMerge","clsx","React","jsx","ProgressPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,QAAA,GAAiBC,4BAGrB,CAAC,EAAE,WAAW,KAAA,EAAO,GAAG,KAAA,EAAM,EAAG,GAAA,qBACjCC,cAAA;AAAA,EAAmBC,4BAAA,CAAA,IAAA;AAAA,EAAlB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,gEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAAD,cAAA;AAAA,MAAmBC,4BAAA,CAAA,SAAA;AAAA,MAAlB;AAAA,QACC,SAAA,EAAU,6DAAA;AAAA,QACV,OAAO,EAAE,SAAA,EAAW,eAAe,GAAA,IAAO,KAAA,IAAS,EAAE,CAAA,EAAA,CAAA;AAAK;AAAA;AAC5D;AACF,CACD;AACD,QAAA,CAAS,cAAgCA,4BAAA,CAAA,IAAA,CAAK,WAAA","file":"progress.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"../lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative h-4 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full rounded-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import 'sonner';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
9
|
+
var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
ProgressPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
className: cn(
|
|
14
|
+
"relative h-4 w-full overflow-hidden rounded-full bg-primary/20",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(
|
|
19
|
+
ProgressPrimitive.Indicator,
|
|
20
|
+
{
|
|
21
|
+
className: "h-full w-full rounded-full flex-1 bg-primary transition-all",
|
|
22
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
28
|
+
|
|
29
|
+
export { Progress };
|
|
30
|
+
//# sourceMappingURL=progress.js.map
|
|
31
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/progress.tsx"],"names":[],"mappings":";;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiC,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,QAAA,GAAiB,iBAGrB,CAAC,EAAE,WAAW,KAAA,EAAO,GAAG,KAAA,EAAM,EAAG,GAAA,qBACjC,GAAA;AAAA,EAAmB,iBAAA,CAAA,IAAA;AAAA,EAAlB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,gEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAA,GAAA;AAAA,MAAmB,iBAAA,CAAA,SAAA;AAAA,MAAlB;AAAA,QACC,SAAA,EAAU,6DAAA;AAAA,QACV,OAAO,EAAE,SAAA,EAAW,eAAe,GAAA,IAAO,KAAA,IAAS,EAAE,CAAA,EAAA,CAAA;AAAK;AAAA;AAC5D;AACF,CACD;AACD,QAAA,CAAS,cAAgC,iBAAA,CAAA,IAAA,CAAK,WAAA","file":"progress.js","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"../lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative h-4 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full rounded-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
require('sonner');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
30
|
+
|
|
31
|
+
var cn = (...inputs) => tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
|
+
var RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
+
RadioGroupPrimitive__namespace.Root,
|
|
35
|
+
{
|
|
36
|
+
className: cn("grid gap-2", className),
|
|
37
|
+
...props,
|
|
38
|
+
ref
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
43
|
+
var RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
RadioGroupPrimitive__namespace.Item,
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
className: cn(
|
|
49
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props,
|
|
53
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2.5 w-2.5 rounded-full bg-primary" }) })
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
58
|
+
|
|
59
|
+
exports.RadioGroup = RadioGroup;
|
|
60
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
61
|
+
//# sourceMappingURL=radio-group.cjs.map
|
|
62
|
+
//# sourceMappingURL=radio-group.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/radio-group.tsx"],"names":["twMerge","clsx","React","jsx","RadioGroupPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,UAAA,GAAmBC,4BAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,uBACEC,cAAA;AAAA,IAAqBC,8BAAA,CAAA,IAAA;AAAA,IAApB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA;AAAA,MACpC,GAAG,KAAA;AAAA,MACJ;AAAA;AAAA,GACF;AAEJ,CAAC;AACD,UAAA,CAAW,cAAkCA,8BAAA,CAAA,IAAA,CAAK,WAAA;AAElD,IAAM,cAAA,GAAuBF,4BAG3B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,uBACEC,cAAA;AAAA,IAAqBC,8BAAA,CAAA,IAAA;AAAA,IAApB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,8LAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAAD,cAAA,CAAqBC,0CAApB,EAA8B,SAAA,EAAU,oCACvC,QAAA,kBAAAD,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qCAAA,EAAsC,CAAA,EACvD;AAAA;AAAA,GACF;AAEJ,CAAC;AACD,cAAA,CAAe,cAAkCC,8BAAA,CAAA,IAAA,CAAK,WAAA","file":"radio-group.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { cn } from \"../lib/utils\"\nimport { DotFilledIcon } from \"@radix-ui/react-icons\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <div className=\"h-2.5 w-2.5 rounded-full bg-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"]}
|