@udaymantr/ui 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/LICENSE +21 -0
- package/dist/index.cjs +3432 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +726 -0
- package/dist/index.d.ts +726 -0
- package/dist/index.js +3140 -0
- package/dist/index.js.map +1 -0
- package/package.json +68 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3140 @@
|
|
|
1
|
+
// src/components/ui/accordion.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDown } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/components/ui/accordion.tsx
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var Accordion = AccordionPrimitive.Root;
|
|
16
|
+
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
|
|
17
|
+
AccordionItem.displayName = "AccordionItem";
|
|
18
|
+
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
19
|
+
AccordionPrimitive.Trigger,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
children,
|
|
29
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
) }));
|
|
33
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
34
|
+
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
35
|
+
AccordionPrimitive.Content,
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
41
|
+
}
|
|
42
|
+
));
|
|
43
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
44
|
+
|
|
45
|
+
// src/components/ui/alert-dialog.tsx
|
|
46
|
+
import * as React3 from "react";
|
|
47
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
48
|
+
|
|
49
|
+
// src/components/ui/button.tsx
|
|
50
|
+
import * as React2 from "react";
|
|
51
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
52
|
+
import { cva } from "class-variance-authority";
|
|
53
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
54
|
+
var buttonVariants = cva(
|
|
55
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
56
|
+
{
|
|
57
|
+
variants: {
|
|
58
|
+
variant: {
|
|
59
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
60
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
61
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
62
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
63
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
64
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
default: "h-10 px-4 py-2",
|
|
68
|
+
sm: "h-9 rounded-md px-3",
|
|
69
|
+
lg: "h-11 rounded-md px-8",
|
|
70
|
+
icon: "h-10 w-10"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
variant: "default",
|
|
75
|
+
size: "default"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
var Button = React2.forwardRef(
|
|
80
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
81
|
+
const Comp = asChild ? Slot : "button";
|
|
82
|
+
return /* @__PURE__ */ jsx2(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
Button.displayName = "Button";
|
|
86
|
+
|
|
87
|
+
// src/components/ui/alert-dialog.tsx
|
|
88
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
89
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
90
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
91
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
92
|
+
var AlertDialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
93
|
+
AlertDialogPrimitive.Overlay,
|
|
94
|
+
{
|
|
95
|
+
className: cn(
|
|
96
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
97
|
+
className
|
|
98
|
+
),
|
|
99
|
+
...props,
|
|
100
|
+
ref
|
|
101
|
+
}
|
|
102
|
+
));
|
|
103
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
104
|
+
var AlertDialogContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs2(AlertDialogPortal, { children: [
|
|
105
|
+
/* @__PURE__ */ jsx3(AlertDialogOverlay, {}),
|
|
106
|
+
/* @__PURE__ */ jsx3(
|
|
107
|
+
AlertDialogPrimitive.Content,
|
|
108
|
+
{
|
|
109
|
+
ref,
|
|
110
|
+
className: cn(
|
|
111
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
...props
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }));
|
|
118
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
119
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx3("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
120
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
121
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx3("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
122
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
123
|
+
var AlertDialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
124
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
125
|
+
var AlertDialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
126
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
127
|
+
var AlertDialogAction = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
|
|
128
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
129
|
+
var AlertDialogCancel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
130
|
+
AlertDialogPrimitive.Cancel,
|
|
131
|
+
{
|
|
132
|
+
ref,
|
|
133
|
+
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
));
|
|
137
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
138
|
+
|
|
139
|
+
// src/components/ui/alert.tsx
|
|
140
|
+
import * as React4 from "react";
|
|
141
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
142
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
143
|
+
var alertVariants = cva2(
|
|
144
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
145
|
+
{
|
|
146
|
+
variants: {
|
|
147
|
+
variant: {
|
|
148
|
+
default: "bg-background text-foreground",
|
|
149
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
defaultVariants: {
|
|
153
|
+
variant: "default"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
var Alert = React4.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx4("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
158
|
+
Alert.displayName = "Alert";
|
|
159
|
+
var AlertTitle = React4.forwardRef(
|
|
160
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx4("h5", { ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })
|
|
161
|
+
);
|
|
162
|
+
AlertTitle.displayName = "AlertTitle";
|
|
163
|
+
var AlertDescription = React4.forwardRef(
|
|
164
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx4("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })
|
|
165
|
+
);
|
|
166
|
+
AlertDescription.displayName = "AlertDescription";
|
|
167
|
+
|
|
168
|
+
// src/components/ui/aspect-ratio.tsx
|
|
169
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
170
|
+
var AspectRatio = AspectRatioPrimitive.Root;
|
|
171
|
+
|
|
172
|
+
// src/components/ui/avatar.tsx
|
|
173
|
+
import * as React5 from "react";
|
|
174
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
175
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
176
|
+
var Avatar = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
177
|
+
AvatarPrimitive.Root,
|
|
178
|
+
{
|
|
179
|
+
ref,
|
|
180
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
));
|
|
184
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
185
|
+
var AvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(AvatarPrimitive.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props }));
|
|
186
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
187
|
+
var AvatarFallback = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
188
|
+
AvatarPrimitive.Fallback,
|
|
189
|
+
{
|
|
190
|
+
ref,
|
|
191
|
+
className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
|
|
192
|
+
...props
|
|
193
|
+
}
|
|
194
|
+
));
|
|
195
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
196
|
+
|
|
197
|
+
// src/components/ui/badge.tsx
|
|
198
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
199
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
200
|
+
var badgeVariants = cva3(
|
|
201
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
202
|
+
{
|
|
203
|
+
variants: {
|
|
204
|
+
variant: {
|
|
205
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
206
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
207
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
208
|
+
outline: "text-foreground"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
defaultVariants: {
|
|
212
|
+
variant: "default"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
function Badge({ className, variant, ...props }) {
|
|
217
|
+
return /* @__PURE__ */ jsx6("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// src/components/ui/breadcrumb.tsx
|
|
221
|
+
import * as React6 from "react";
|
|
222
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
223
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
224
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
225
|
+
var Breadcrumb = React6.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx7("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
226
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
227
|
+
var BreadcrumbList = React6.forwardRef(
|
|
228
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
229
|
+
"ol",
|
|
230
|
+
{
|
|
231
|
+
ref,
|
|
232
|
+
className: cn(
|
|
233
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
234
|
+
className
|
|
235
|
+
),
|
|
236
|
+
...props
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
);
|
|
240
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
241
|
+
var BreadcrumbItem = React6.forwardRef(
|
|
242
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
243
|
+
);
|
|
244
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
245
|
+
var BreadcrumbLink = React6.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
246
|
+
const Comp = asChild ? Slot2 : "a";
|
|
247
|
+
return /* @__PURE__ */ jsx7(Comp, { ref, className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
248
|
+
});
|
|
249
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
250
|
+
var BreadcrumbPage = React6.forwardRef(
|
|
251
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
252
|
+
"span",
|
|
253
|
+
{
|
|
254
|
+
ref,
|
|
255
|
+
role: "link",
|
|
256
|
+
"aria-disabled": "true",
|
|
257
|
+
"aria-current": "page",
|
|
258
|
+
className: cn("font-normal text-foreground", className),
|
|
259
|
+
...props
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
);
|
|
263
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
264
|
+
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx7("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? /* @__PURE__ */ jsx7(ChevronRight, {}) });
|
|
265
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
266
|
+
var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs3(
|
|
267
|
+
"span",
|
|
268
|
+
{
|
|
269
|
+
role: "presentation",
|
|
270
|
+
"aria-hidden": "true",
|
|
271
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
272
|
+
...props,
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ jsx7(MoreHorizontal, { className: "h-4 w-4" }),
|
|
275
|
+
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "More" })
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
280
|
+
|
|
281
|
+
// src/components/ui/calendar.tsx
|
|
282
|
+
import { ChevronLeft, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
283
|
+
import { DayPicker } from "react-day-picker";
|
|
284
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
285
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
286
|
+
return /* @__PURE__ */ jsx8(
|
|
287
|
+
DayPicker,
|
|
288
|
+
{
|
|
289
|
+
showOutsideDays,
|
|
290
|
+
className: cn("p-3", className),
|
|
291
|
+
classNames: {
|
|
292
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
293
|
+
month: "space-y-4",
|
|
294
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
295
|
+
caption_label: "text-sm font-medium",
|
|
296
|
+
nav: "space-x-1 flex items-center",
|
|
297
|
+
nav_button: cn(
|
|
298
|
+
buttonVariants({ variant: "outline" }),
|
|
299
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
300
|
+
),
|
|
301
|
+
nav_button_previous: "absolute left-1",
|
|
302
|
+
nav_button_next: "absolute right-1",
|
|
303
|
+
table: "w-full border-collapse space-y-1",
|
|
304
|
+
head_row: "flex",
|
|
305
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
306
|
+
row: "flex w-full mt-2",
|
|
307
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
308
|
+
day: cn(buttonVariants({ variant: "ghost" }), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
309
|
+
day_range_end: "day-range-end",
|
|
310
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
311
|
+
day_today: "bg-accent text-accent-foreground",
|
|
312
|
+
day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
313
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
314
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
315
|
+
day_hidden: "invisible",
|
|
316
|
+
...classNames
|
|
317
|
+
},
|
|
318
|
+
components: {
|
|
319
|
+
IconLeft: ({ ..._props }) => /* @__PURE__ */ jsx8(ChevronLeft, { className: "h-4 w-4" }),
|
|
320
|
+
IconRight: ({ ..._props }) => /* @__PURE__ */ jsx8(ChevronRight2, { className: "h-4 w-4" })
|
|
321
|
+
},
|
|
322
|
+
...props
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
Calendar.displayName = "Calendar";
|
|
327
|
+
|
|
328
|
+
// src/components/ui/card.tsx
|
|
329
|
+
import * as React7 from "react";
|
|
330
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
331
|
+
var Card = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props }));
|
|
332
|
+
Card.displayName = "Card";
|
|
333
|
+
var CardHeader = React7.forwardRef(
|
|
334
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
335
|
+
);
|
|
336
|
+
CardHeader.displayName = "CardHeader";
|
|
337
|
+
var CardTitle = React7.forwardRef(
|
|
338
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
|
|
339
|
+
);
|
|
340
|
+
CardTitle.displayName = "CardTitle";
|
|
341
|
+
var CardDescription = React7.forwardRef(
|
|
342
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
343
|
+
);
|
|
344
|
+
CardDescription.displayName = "CardDescription";
|
|
345
|
+
var CardContent = React7.forwardRef(
|
|
346
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
347
|
+
);
|
|
348
|
+
CardContent.displayName = "CardContent";
|
|
349
|
+
var CardFooter = React7.forwardRef(
|
|
350
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
351
|
+
);
|
|
352
|
+
CardFooter.displayName = "CardFooter";
|
|
353
|
+
|
|
354
|
+
// src/components/ui/carousel.tsx
|
|
355
|
+
import * as React8 from "react";
|
|
356
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
357
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
358
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
359
|
+
var CarouselContext = React8.createContext(null);
|
|
360
|
+
function useCarousel() {
|
|
361
|
+
const context = React8.useContext(CarouselContext);
|
|
362
|
+
if (!context) {
|
|
363
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
364
|
+
}
|
|
365
|
+
return context;
|
|
366
|
+
}
|
|
367
|
+
var Carousel = React8.forwardRef(
|
|
368
|
+
({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
|
|
369
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
370
|
+
{
|
|
371
|
+
...opts,
|
|
372
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
373
|
+
},
|
|
374
|
+
plugins
|
|
375
|
+
);
|
|
376
|
+
const [canScrollPrev, setCanScrollPrev] = React8.useState(false);
|
|
377
|
+
const [canScrollNext, setCanScrollNext] = React8.useState(false);
|
|
378
|
+
const onSelect = React8.useCallback((api2) => {
|
|
379
|
+
if (!api2) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
383
|
+
setCanScrollNext(api2.canScrollNext());
|
|
384
|
+
}, []);
|
|
385
|
+
const scrollPrev = React8.useCallback(() => {
|
|
386
|
+
api?.scrollPrev();
|
|
387
|
+
}, [api]);
|
|
388
|
+
const scrollNext = React8.useCallback(() => {
|
|
389
|
+
api?.scrollNext();
|
|
390
|
+
}, [api]);
|
|
391
|
+
const handleKeyDown = React8.useCallback(
|
|
392
|
+
(event) => {
|
|
393
|
+
if (event.key === "ArrowLeft") {
|
|
394
|
+
event.preventDefault();
|
|
395
|
+
scrollPrev();
|
|
396
|
+
} else if (event.key === "ArrowRight") {
|
|
397
|
+
event.preventDefault();
|
|
398
|
+
scrollNext();
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
[scrollPrev, scrollNext]
|
|
402
|
+
);
|
|
403
|
+
React8.useEffect(() => {
|
|
404
|
+
if (!api || !setApi) {
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
setApi(api);
|
|
408
|
+
}, [api, setApi]);
|
|
409
|
+
React8.useEffect(() => {
|
|
410
|
+
if (!api) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
onSelect(api);
|
|
414
|
+
api.on("reInit", onSelect);
|
|
415
|
+
api.on("select", onSelect);
|
|
416
|
+
return () => {
|
|
417
|
+
api?.off("select", onSelect);
|
|
418
|
+
};
|
|
419
|
+
}, [api, onSelect]);
|
|
420
|
+
return /* @__PURE__ */ jsx10(
|
|
421
|
+
CarouselContext.Provider,
|
|
422
|
+
{
|
|
423
|
+
value: {
|
|
424
|
+
carouselRef,
|
|
425
|
+
api,
|
|
426
|
+
opts,
|
|
427
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
428
|
+
scrollPrev,
|
|
429
|
+
scrollNext,
|
|
430
|
+
canScrollPrev,
|
|
431
|
+
canScrollNext
|
|
432
|
+
},
|
|
433
|
+
children: /* @__PURE__ */ jsx10(
|
|
434
|
+
"div",
|
|
435
|
+
{
|
|
436
|
+
ref,
|
|
437
|
+
onKeyDownCapture: handleKeyDown,
|
|
438
|
+
className: cn("relative", className),
|
|
439
|
+
role: "region",
|
|
440
|
+
"aria-roledescription": "carousel",
|
|
441
|
+
...props,
|
|
442
|
+
children
|
|
443
|
+
}
|
|
444
|
+
)
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
Carousel.displayName = "Carousel";
|
|
450
|
+
var CarouselContent = React8.forwardRef(
|
|
451
|
+
({ className, ...props }, ref) => {
|
|
452
|
+
const { carouselRef, orientation } = useCarousel();
|
|
453
|
+
return /* @__PURE__ */ jsx10("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx10(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
ref,
|
|
457
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
458
|
+
...props
|
|
459
|
+
}
|
|
460
|
+
) });
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
CarouselContent.displayName = "CarouselContent";
|
|
464
|
+
var CarouselItem = React8.forwardRef(
|
|
465
|
+
({ className, ...props }, ref) => {
|
|
466
|
+
const { orientation } = useCarousel();
|
|
467
|
+
return /* @__PURE__ */ jsx10(
|
|
468
|
+
"div",
|
|
469
|
+
{
|
|
470
|
+
ref,
|
|
471
|
+
role: "group",
|
|
472
|
+
"aria-roledescription": "slide",
|
|
473
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
474
|
+
...props
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
);
|
|
479
|
+
CarouselItem.displayName = "CarouselItem";
|
|
480
|
+
var CarouselPrevious = React8.forwardRef(
|
|
481
|
+
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
482
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
483
|
+
return /* @__PURE__ */ jsxs4(
|
|
484
|
+
Button,
|
|
485
|
+
{
|
|
486
|
+
ref,
|
|
487
|
+
variant,
|
|
488
|
+
size,
|
|
489
|
+
className: cn(
|
|
490
|
+
"absolute h-8 w-8 rounded-full",
|
|
491
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
492
|
+
className
|
|
493
|
+
),
|
|
494
|
+
disabled: !canScrollPrev,
|
|
495
|
+
onClick: scrollPrev,
|
|
496
|
+
...props,
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ jsx10(ArrowLeft, { className: "h-4 w-4" }),
|
|
499
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Previous slide" })
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
506
|
+
var CarouselNext = React8.forwardRef(
|
|
507
|
+
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
508
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
509
|
+
return /* @__PURE__ */ jsxs4(
|
|
510
|
+
Button,
|
|
511
|
+
{
|
|
512
|
+
ref,
|
|
513
|
+
variant,
|
|
514
|
+
size,
|
|
515
|
+
className: cn(
|
|
516
|
+
"absolute h-8 w-8 rounded-full",
|
|
517
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
518
|
+
className
|
|
519
|
+
),
|
|
520
|
+
disabled: !canScrollNext,
|
|
521
|
+
onClick: scrollNext,
|
|
522
|
+
...props,
|
|
523
|
+
children: [
|
|
524
|
+
/* @__PURE__ */ jsx10(ArrowRight, { className: "h-4 w-4" }),
|
|
525
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Next slide" })
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
);
|
|
531
|
+
CarouselNext.displayName = "CarouselNext";
|
|
532
|
+
|
|
533
|
+
// src/components/ui/chart.tsx
|
|
534
|
+
import * as React9 from "react";
|
|
535
|
+
import * as RechartsPrimitive from "recharts";
|
|
536
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
537
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
538
|
+
var ChartContext = React9.createContext(null);
|
|
539
|
+
function useChart() {
|
|
540
|
+
const context = React9.useContext(ChartContext);
|
|
541
|
+
if (!context) {
|
|
542
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
543
|
+
}
|
|
544
|
+
return context;
|
|
545
|
+
}
|
|
546
|
+
var ChartContainer = React9.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
547
|
+
const uniqueId = React9.useId();
|
|
548
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
549
|
+
return /* @__PURE__ */ jsx11(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs5(
|
|
550
|
+
"div",
|
|
551
|
+
{
|
|
552
|
+
"data-chart": chartId,
|
|
553
|
+
ref,
|
|
554
|
+
className: cn(
|
|
555
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
|
|
556
|
+
className
|
|
557
|
+
),
|
|
558
|
+
...props,
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ jsx11(ChartStyle, { id: chartId, config }),
|
|
561
|
+
/* @__PURE__ */ jsx11(RechartsPrimitive.ResponsiveContainer, { children })
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
) });
|
|
565
|
+
});
|
|
566
|
+
ChartContainer.displayName = "Chart";
|
|
567
|
+
var ChartStyle = ({ id, config }) => {
|
|
568
|
+
const colorConfig = Object.entries(config).filter(([_, config2]) => config2.theme || config2.color);
|
|
569
|
+
if (!colorConfig.length) {
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
return /* @__PURE__ */ jsx11(
|
|
573
|
+
"style",
|
|
574
|
+
{
|
|
575
|
+
dangerouslySetInnerHTML: {
|
|
576
|
+
__html: Object.entries(THEMES).map(
|
|
577
|
+
([theme, prefix]) => `
|
|
578
|
+
${prefix} [data-chart=${id}] {
|
|
579
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
580
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
581
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
582
|
+
}).join("\n")}
|
|
583
|
+
}
|
|
584
|
+
`
|
|
585
|
+
).join("\n")
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
};
|
|
590
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
591
|
+
var ChartTooltipContent = React9.forwardRef(
|
|
592
|
+
({
|
|
593
|
+
active,
|
|
594
|
+
payload,
|
|
595
|
+
className,
|
|
596
|
+
indicator = "dot",
|
|
597
|
+
hideLabel = false,
|
|
598
|
+
hideIndicator = false,
|
|
599
|
+
label,
|
|
600
|
+
labelFormatter,
|
|
601
|
+
labelClassName,
|
|
602
|
+
formatter,
|
|
603
|
+
color,
|
|
604
|
+
nameKey,
|
|
605
|
+
labelKey
|
|
606
|
+
}, ref) => {
|
|
607
|
+
const { config } = useChart();
|
|
608
|
+
const tooltipLabel = React9.useMemo(() => {
|
|
609
|
+
if (hideLabel || !payload?.length) {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
const [item] = payload;
|
|
613
|
+
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
614
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
615
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
616
|
+
if (labelFormatter) {
|
|
617
|
+
return /* @__PURE__ */ jsx11("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
618
|
+
}
|
|
619
|
+
if (!value) {
|
|
620
|
+
return null;
|
|
621
|
+
}
|
|
622
|
+
return /* @__PURE__ */ jsx11("div", { className: cn("font-medium", labelClassName), children: value });
|
|
623
|
+
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
624
|
+
if (!active || !payload?.length) {
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
628
|
+
return /* @__PURE__ */ jsxs5(
|
|
629
|
+
"div",
|
|
630
|
+
{
|
|
631
|
+
ref,
|
|
632
|
+
className: cn(
|
|
633
|
+
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
634
|
+
className
|
|
635
|
+
),
|
|
636
|
+
children: [
|
|
637
|
+
!nestLabel ? tooltipLabel : null,
|
|
638
|
+
/* @__PURE__ */ jsx11("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
639
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
640
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
641
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
642
|
+
return /* @__PURE__ */ jsx11(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
className: cn(
|
|
646
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
647
|
+
indicator === "dot" && "items-center"
|
|
648
|
+
),
|
|
649
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
650
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx11(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx11(
|
|
651
|
+
"div",
|
|
652
|
+
{
|
|
653
|
+
className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
654
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
655
|
+
"w-1": indicator === "line",
|
|
656
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
657
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
658
|
+
}),
|
|
659
|
+
style: {
|
|
660
|
+
"--color-bg": indicatorColor,
|
|
661
|
+
"--color-border": indicatorColor
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
/* @__PURE__ */ jsxs5(
|
|
666
|
+
"div",
|
|
667
|
+
{
|
|
668
|
+
className: cn(
|
|
669
|
+
"flex flex-1 justify-between leading-none",
|
|
670
|
+
nestLabel ? "items-end" : "items-center"
|
|
671
|
+
),
|
|
672
|
+
children: [
|
|
673
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid gap-1.5", children: [
|
|
674
|
+
nestLabel ? tooltipLabel : null,
|
|
675
|
+
/* @__PURE__ */ jsx11("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
676
|
+
] }),
|
|
677
|
+
item.value && /* @__PURE__ */ jsx11("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
)
|
|
681
|
+
] })
|
|
682
|
+
},
|
|
683
|
+
item.dataKey
|
|
684
|
+
);
|
|
685
|
+
}) })
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
692
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
693
|
+
var ChartLegendContent = React9.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
694
|
+
const { config } = useChart();
|
|
695
|
+
if (!payload?.length) {
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
return /* @__PURE__ */ jsx11(
|
|
699
|
+
"div",
|
|
700
|
+
{
|
|
701
|
+
ref,
|
|
702
|
+
className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
|
|
703
|
+
children: payload.map((item) => {
|
|
704
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
705
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
706
|
+
return /* @__PURE__ */ jsxs5(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
710
|
+
children: [
|
|
711
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx11(itemConfig.icon, {}) : /* @__PURE__ */ jsx11(
|
|
712
|
+
"div",
|
|
713
|
+
{
|
|
714
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
715
|
+
style: {
|
|
716
|
+
backgroundColor: item.color
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
),
|
|
720
|
+
itemConfig?.label
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
item.value
|
|
724
|
+
);
|
|
725
|
+
})
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
});
|
|
729
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
730
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
731
|
+
if (typeof payload !== "object" || payload === null) {
|
|
732
|
+
return void 0;
|
|
733
|
+
}
|
|
734
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
735
|
+
let configLabelKey = key;
|
|
736
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
737
|
+
configLabelKey = payload[key];
|
|
738
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
739
|
+
configLabelKey = payloadPayload[key];
|
|
740
|
+
}
|
|
741
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// src/components/ui/checkbox.tsx
|
|
745
|
+
import * as React10 from "react";
|
|
746
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
747
|
+
import { Check } from "lucide-react";
|
|
748
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
749
|
+
var Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
750
|
+
CheckboxPrimitive.Root,
|
|
751
|
+
{
|
|
752
|
+
ref,
|
|
753
|
+
className: cn(
|
|
754
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
755
|
+
className
|
|
756
|
+
),
|
|
757
|
+
...props,
|
|
758
|
+
children: /* @__PURE__ */ jsx12(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx12(Check, { className: "h-4 w-4" }) })
|
|
759
|
+
}
|
|
760
|
+
));
|
|
761
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
762
|
+
|
|
763
|
+
// src/components/ui/collapsible.tsx
|
|
764
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
765
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
|
766
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
767
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
768
|
+
|
|
769
|
+
// src/components/ui/command.tsx
|
|
770
|
+
import * as React12 from "react";
|
|
771
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
772
|
+
import { Search } from "lucide-react";
|
|
773
|
+
|
|
774
|
+
// src/components/ui/dialog.tsx
|
|
775
|
+
import * as React11 from "react";
|
|
776
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
777
|
+
import { X } from "lucide-react";
|
|
778
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
779
|
+
var Dialog = DialogPrimitive.Root;
|
|
780
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
781
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
782
|
+
var DialogClose = DialogPrimitive.Close;
|
|
783
|
+
var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
784
|
+
DialogPrimitive.Overlay,
|
|
785
|
+
{
|
|
786
|
+
ref,
|
|
787
|
+
className: cn(
|
|
788
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
789
|
+
className
|
|
790
|
+
),
|
|
791
|
+
...props
|
|
792
|
+
}
|
|
793
|
+
));
|
|
794
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
795
|
+
var DialogContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(DialogPortal, { children: [
|
|
796
|
+
/* @__PURE__ */ jsx13(DialogOverlay, {}),
|
|
797
|
+
/* @__PURE__ */ jsxs6(
|
|
798
|
+
DialogPrimitive.Content,
|
|
799
|
+
{
|
|
800
|
+
ref,
|
|
801
|
+
className: cn(
|
|
802
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
803
|
+
className
|
|
804
|
+
),
|
|
805
|
+
...props,
|
|
806
|
+
children: [
|
|
807
|
+
children,
|
|
808
|
+
/* @__PURE__ */ jsxs6(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
809
|
+
/* @__PURE__ */ jsx13(X, { className: "h-4 w-4" }),
|
|
810
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Close" })
|
|
811
|
+
] })
|
|
812
|
+
]
|
|
813
|
+
}
|
|
814
|
+
)
|
|
815
|
+
] }));
|
|
816
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
817
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx13("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
818
|
+
DialogHeader.displayName = "DialogHeader";
|
|
819
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx13("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
820
|
+
DialogFooter.displayName = "DialogFooter";
|
|
821
|
+
var DialogTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
822
|
+
DialogPrimitive.Title,
|
|
823
|
+
{
|
|
824
|
+
ref,
|
|
825
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
826
|
+
...props
|
|
827
|
+
}
|
|
828
|
+
));
|
|
829
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
830
|
+
var DialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
831
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
832
|
+
|
|
833
|
+
// src/components/ui/command.tsx
|
|
834
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
835
|
+
var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
836
|
+
CommandPrimitive,
|
|
837
|
+
{
|
|
838
|
+
ref,
|
|
839
|
+
className: cn(
|
|
840
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
841
|
+
className
|
|
842
|
+
),
|
|
843
|
+
...props
|
|
844
|
+
}
|
|
845
|
+
));
|
|
846
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
847
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
848
|
+
return /* @__PURE__ */ jsx14(Dialog, { ...props, children: /* @__PURE__ */ jsx14(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsx14(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
849
|
+
};
|
|
850
|
+
var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs7("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
851
|
+
/* @__PURE__ */ jsx14(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
852
|
+
/* @__PURE__ */ jsx14(
|
|
853
|
+
CommandPrimitive.Input,
|
|
854
|
+
{
|
|
855
|
+
ref,
|
|
856
|
+
className: cn(
|
|
857
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
858
|
+
className
|
|
859
|
+
),
|
|
860
|
+
...props
|
|
861
|
+
}
|
|
862
|
+
)
|
|
863
|
+
] }));
|
|
864
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
865
|
+
var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
866
|
+
CommandPrimitive.List,
|
|
867
|
+
{
|
|
868
|
+
ref,
|
|
869
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
870
|
+
...props
|
|
871
|
+
}
|
|
872
|
+
));
|
|
873
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
874
|
+
var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ jsx14(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
875
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
876
|
+
var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
877
|
+
CommandPrimitive.Group,
|
|
878
|
+
{
|
|
879
|
+
ref,
|
|
880
|
+
className: cn(
|
|
881
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
882
|
+
className
|
|
883
|
+
),
|
|
884
|
+
...props
|
|
885
|
+
}
|
|
886
|
+
));
|
|
887
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
888
|
+
var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(CommandPrimitive.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), ...props }));
|
|
889
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
890
|
+
var CommandItem = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
891
|
+
CommandPrimitive.Item,
|
|
892
|
+
{
|
|
893
|
+
ref,
|
|
894
|
+
className: cn(
|
|
895
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
896
|
+
className
|
|
897
|
+
),
|
|
898
|
+
...props
|
|
899
|
+
}
|
|
900
|
+
));
|
|
901
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
902
|
+
var CommandShortcut = ({ className, ...props }) => {
|
|
903
|
+
return /* @__PURE__ */ jsx14("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
904
|
+
};
|
|
905
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
906
|
+
|
|
907
|
+
// src/components/ui/context-menu.tsx
|
|
908
|
+
import * as React13 from "react";
|
|
909
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
910
|
+
import { Check as Check2, ChevronRight as ChevronRight3, Circle } from "lucide-react";
|
|
911
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
912
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
913
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
914
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
915
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
916
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
917
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
918
|
+
var ContextMenuSubTrigger = React13.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
919
|
+
ContextMenuPrimitive.SubTrigger,
|
|
920
|
+
{
|
|
921
|
+
ref,
|
|
922
|
+
className: cn(
|
|
923
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
924
|
+
inset && "pl-8",
|
|
925
|
+
className
|
|
926
|
+
),
|
|
927
|
+
...props,
|
|
928
|
+
children: [
|
|
929
|
+
children,
|
|
930
|
+
/* @__PURE__ */ jsx15(ChevronRight3, { className: "ml-auto h-4 w-4" })
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
));
|
|
934
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
935
|
+
var ContextMenuSubContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
936
|
+
ContextMenuPrimitive.SubContent,
|
|
937
|
+
{
|
|
938
|
+
ref,
|
|
939
|
+
className: cn(
|
|
940
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
|
|
941
|
+
className
|
|
942
|
+
),
|
|
943
|
+
...props
|
|
944
|
+
}
|
|
945
|
+
));
|
|
946
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
947
|
+
var ContextMenuContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
|
948
|
+
ContextMenuPrimitive.Content,
|
|
949
|
+
{
|
|
950
|
+
ref,
|
|
951
|
+
className: cn(
|
|
952
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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",
|
|
953
|
+
className
|
|
954
|
+
),
|
|
955
|
+
...props
|
|
956
|
+
}
|
|
957
|
+
) }));
|
|
958
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
959
|
+
var ContextMenuItem = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
960
|
+
ContextMenuPrimitive.Item,
|
|
961
|
+
{
|
|
962
|
+
ref,
|
|
963
|
+
className: cn(
|
|
964
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
965
|
+
inset && "pl-8",
|
|
966
|
+
className
|
|
967
|
+
),
|
|
968
|
+
...props
|
|
969
|
+
}
|
|
970
|
+
));
|
|
971
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
972
|
+
var ContextMenuCheckboxItem = React13.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
973
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
974
|
+
{
|
|
975
|
+
ref,
|
|
976
|
+
className: cn(
|
|
977
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
978
|
+
className
|
|
979
|
+
),
|
|
980
|
+
checked,
|
|
981
|
+
...props,
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(Check2, { className: "h-4 w-4" }) }) }),
|
|
984
|
+
children
|
|
985
|
+
]
|
|
986
|
+
}
|
|
987
|
+
));
|
|
988
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
989
|
+
var ContextMenuRadioItem = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
990
|
+
ContextMenuPrimitive.RadioItem,
|
|
991
|
+
{
|
|
992
|
+
ref,
|
|
993
|
+
className: cn(
|
|
994
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
995
|
+
className
|
|
996
|
+
),
|
|
997
|
+
...props,
|
|
998
|
+
children: [
|
|
999
|
+
/* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1000
|
+
children
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
));
|
|
1004
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1005
|
+
var ContextMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1006
|
+
ContextMenuPrimitive.Label,
|
|
1007
|
+
{
|
|
1008
|
+
ref,
|
|
1009
|
+
className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
|
|
1010
|
+
...props
|
|
1011
|
+
}
|
|
1012
|
+
));
|
|
1013
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1014
|
+
var ContextMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(ContextMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
1015
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
1016
|
+
var ContextMenuShortcut = ({ className, ...props }) => {
|
|
1017
|
+
return /* @__PURE__ */ jsx15("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
1018
|
+
};
|
|
1019
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
1020
|
+
|
|
1021
|
+
// src/components/ui/drawer.tsx
|
|
1022
|
+
import * as React14 from "react";
|
|
1023
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1024
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1025
|
+
var Drawer = ({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsx16(DrawerPrimitive.Root, { shouldScaleBackground, ...props });
|
|
1026
|
+
Drawer.displayName = "Drawer";
|
|
1027
|
+
var DrawerTrigger = DrawerPrimitive.Trigger;
|
|
1028
|
+
var DrawerPortal = DrawerPrimitive.Portal;
|
|
1029
|
+
var DrawerClose = DrawerPrimitive.Close;
|
|
1030
|
+
var DrawerOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(DrawerPrimitive.Overlay, { ref, className: cn("fixed inset-0 z-50 bg-black/80", className), ...props }));
|
|
1031
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
1032
|
+
var DrawerContent = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(DrawerPortal, { children: [
|
|
1033
|
+
/* @__PURE__ */ jsx16(DrawerOverlay, {}),
|
|
1034
|
+
/* @__PURE__ */ jsxs9(
|
|
1035
|
+
DrawerPrimitive.Content,
|
|
1036
|
+
{
|
|
1037
|
+
ref,
|
|
1038
|
+
className: cn(
|
|
1039
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
1040
|
+
className
|
|
1041
|
+
),
|
|
1042
|
+
...props,
|
|
1043
|
+
children: [
|
|
1044
|
+
/* @__PURE__ */ jsx16("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
1045
|
+
children
|
|
1046
|
+
]
|
|
1047
|
+
}
|
|
1048
|
+
)
|
|
1049
|
+
] }));
|
|
1050
|
+
DrawerContent.displayName = "DrawerContent";
|
|
1051
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx16("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
|
|
1052
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
1053
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx16("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
1054
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
1055
|
+
var DrawerTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1056
|
+
DrawerPrimitive.Title,
|
|
1057
|
+
{
|
|
1058
|
+
ref,
|
|
1059
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
1060
|
+
...props
|
|
1061
|
+
}
|
|
1062
|
+
));
|
|
1063
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
1064
|
+
var DrawerDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(DrawerPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
1065
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
1066
|
+
|
|
1067
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1068
|
+
import * as React15 from "react";
|
|
1069
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1070
|
+
import { Check as Check3, ChevronRight as ChevronRight4, Circle as Circle2 } from "lucide-react";
|
|
1071
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1072
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1073
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1074
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1075
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1076
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1077
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1078
|
+
var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1079
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1080
|
+
{
|
|
1081
|
+
ref,
|
|
1082
|
+
className: cn(
|
|
1083
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",
|
|
1084
|
+
inset && "pl-8",
|
|
1085
|
+
className
|
|
1086
|
+
),
|
|
1087
|
+
...props,
|
|
1088
|
+
children: [
|
|
1089
|
+
children,
|
|
1090
|
+
/* @__PURE__ */ jsx17(ChevronRight4, { className: "ml-auto h-4 w-4" })
|
|
1091
|
+
]
|
|
1092
|
+
}
|
|
1093
|
+
));
|
|
1094
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1095
|
+
var DropdownMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1096
|
+
DropdownMenuPrimitive.SubContent,
|
|
1097
|
+
{
|
|
1098
|
+
ref,
|
|
1099
|
+
className: cn(
|
|
1100
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
1101
|
+
className
|
|
1102
|
+
),
|
|
1103
|
+
...props
|
|
1104
|
+
}
|
|
1105
|
+
));
|
|
1106
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1107
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx17(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
|
|
1108
|
+
DropdownMenuPrimitive.Content,
|
|
1109
|
+
{
|
|
1110
|
+
ref,
|
|
1111
|
+
sideOffset,
|
|
1112
|
+
className: cn(
|
|
1113
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
|
|
1114
|
+
className
|
|
1115
|
+
),
|
|
1116
|
+
...props
|
|
1117
|
+
}
|
|
1118
|
+
) }));
|
|
1119
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1120
|
+
var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1121
|
+
DropdownMenuPrimitive.Item,
|
|
1122
|
+
{
|
|
1123
|
+
ref,
|
|
1124
|
+
className: cn(
|
|
1125
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1126
|
+
inset && "pl-8",
|
|
1127
|
+
className
|
|
1128
|
+
),
|
|
1129
|
+
...props
|
|
1130
|
+
}
|
|
1131
|
+
));
|
|
1132
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1133
|
+
var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1134
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1135
|
+
{
|
|
1136
|
+
ref,
|
|
1137
|
+
className: cn(
|
|
1138
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1139
|
+
className
|
|
1140
|
+
),
|
|
1141
|
+
checked,
|
|
1142
|
+
...props,
|
|
1143
|
+
children: [
|
|
1144
|
+
/* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(Check3, { className: "h-4 w-4" }) }) }),
|
|
1145
|
+
children
|
|
1146
|
+
]
|
|
1147
|
+
}
|
|
1148
|
+
));
|
|
1149
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1150
|
+
var DropdownMenuRadioItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1151
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1152
|
+
{
|
|
1153
|
+
ref,
|
|
1154
|
+
className: cn(
|
|
1155
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1156
|
+
className
|
|
1157
|
+
),
|
|
1158
|
+
...props,
|
|
1159
|
+
children: [
|
|
1160
|
+
/* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(Circle2, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1161
|
+
children
|
|
1162
|
+
]
|
|
1163
|
+
}
|
|
1164
|
+
));
|
|
1165
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1166
|
+
var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1167
|
+
DropdownMenuPrimitive.Label,
|
|
1168
|
+
{
|
|
1169
|
+
ref,
|
|
1170
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
1171
|
+
...props
|
|
1172
|
+
}
|
|
1173
|
+
));
|
|
1174
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1175
|
+
var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
1176
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1177
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
1178
|
+
return /* @__PURE__ */ jsx17("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1179
|
+
};
|
|
1180
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1181
|
+
|
|
1182
|
+
// src/components/ui/form.tsx
|
|
1183
|
+
import * as React17 from "react";
|
|
1184
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1185
|
+
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
1186
|
+
|
|
1187
|
+
// src/components/ui/label.tsx
|
|
1188
|
+
import * as React16 from "react";
|
|
1189
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1190
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
1191
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1192
|
+
var labelVariants = cva4("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
1193
|
+
var Label3 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1194
|
+
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
1195
|
+
|
|
1196
|
+
// src/components/ui/form.tsx
|
|
1197
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1198
|
+
var Form = FormProvider;
|
|
1199
|
+
var FormFieldContext = React17.createContext({});
|
|
1200
|
+
var FormField = ({
|
|
1201
|
+
...props
|
|
1202
|
+
}) => {
|
|
1203
|
+
return /* @__PURE__ */ jsx19(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx19(Controller, { ...props }) });
|
|
1204
|
+
};
|
|
1205
|
+
var useFormField = () => {
|
|
1206
|
+
const fieldContext = React17.useContext(FormFieldContext);
|
|
1207
|
+
const itemContext = React17.useContext(FormItemContext);
|
|
1208
|
+
const { getFieldState, formState } = useFormContext();
|
|
1209
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1210
|
+
if (!fieldContext) {
|
|
1211
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
1212
|
+
}
|
|
1213
|
+
const { id } = itemContext;
|
|
1214
|
+
return {
|
|
1215
|
+
id,
|
|
1216
|
+
name: fieldContext.name,
|
|
1217
|
+
formItemId: `${id}-form-item`,
|
|
1218
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1219
|
+
formMessageId: `${id}-form-item-message`,
|
|
1220
|
+
...fieldState
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
var FormItemContext = React17.createContext({});
|
|
1224
|
+
var FormItem = React17.forwardRef(
|
|
1225
|
+
({ className, ...props }, ref) => {
|
|
1226
|
+
const id = React17.useId();
|
|
1227
|
+
return /* @__PURE__ */ jsx19(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx19("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
1228
|
+
}
|
|
1229
|
+
);
|
|
1230
|
+
FormItem.displayName = "FormItem";
|
|
1231
|
+
var FormLabel = React17.forwardRef(({ className, ...props }, ref) => {
|
|
1232
|
+
const { error, formItemId } = useFormField();
|
|
1233
|
+
return /* @__PURE__ */ jsx19(Label3, { ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
1234
|
+
});
|
|
1235
|
+
FormLabel.displayName = "FormLabel";
|
|
1236
|
+
var FormControl = React17.forwardRef(
|
|
1237
|
+
({ ...props }, ref) => {
|
|
1238
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1239
|
+
return /* @__PURE__ */ jsx19(
|
|
1240
|
+
Slot3,
|
|
1241
|
+
{
|
|
1242
|
+
ref,
|
|
1243
|
+
id: formItemId,
|
|
1244
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
1245
|
+
"aria-invalid": !!error,
|
|
1246
|
+
...props
|
|
1247
|
+
}
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
FormControl.displayName = "FormControl";
|
|
1252
|
+
var FormDescription = React17.forwardRef(
|
|
1253
|
+
({ className, ...props }, ref) => {
|
|
1254
|
+
const { formDescriptionId } = useFormField();
|
|
1255
|
+
return /* @__PURE__ */ jsx19("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
|
|
1256
|
+
}
|
|
1257
|
+
);
|
|
1258
|
+
FormDescription.displayName = "FormDescription";
|
|
1259
|
+
var FormMessage = React17.forwardRef(
|
|
1260
|
+
({ className, children, ...props }, ref) => {
|
|
1261
|
+
const { error, formMessageId } = useFormField();
|
|
1262
|
+
const body = error ? String(error?.message) : children;
|
|
1263
|
+
if (!body) {
|
|
1264
|
+
return null;
|
|
1265
|
+
}
|
|
1266
|
+
return /* @__PURE__ */ jsx19("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
|
|
1267
|
+
}
|
|
1268
|
+
);
|
|
1269
|
+
FormMessage.displayName = "FormMessage";
|
|
1270
|
+
|
|
1271
|
+
// src/components/ui/hover-card.tsx
|
|
1272
|
+
import * as React18 from "react";
|
|
1273
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
1274
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1275
|
+
var HoverCard = HoverCardPrimitive.Root;
|
|
1276
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
1277
|
+
var HoverCardContent = React18.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1278
|
+
HoverCardPrimitive.Content,
|
|
1279
|
+
{
|
|
1280
|
+
ref,
|
|
1281
|
+
align,
|
|
1282
|
+
sideOffset,
|
|
1283
|
+
className: cn(
|
|
1284
|
+
"z-50 w-64 rounded-md 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",
|
|
1285
|
+
className
|
|
1286
|
+
),
|
|
1287
|
+
...props
|
|
1288
|
+
}
|
|
1289
|
+
));
|
|
1290
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
1291
|
+
|
|
1292
|
+
// src/components/ui/input-otp.tsx
|
|
1293
|
+
import * as React19 from "react";
|
|
1294
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1295
|
+
import { Dot } from "lucide-react";
|
|
1296
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1297
|
+
var InputOTP = React19.forwardRef(
|
|
1298
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1299
|
+
OTPInput,
|
|
1300
|
+
{
|
|
1301
|
+
ref,
|
|
1302
|
+
containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName),
|
|
1303
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
1304
|
+
...props
|
|
1305
|
+
}
|
|
1306
|
+
)
|
|
1307
|
+
);
|
|
1308
|
+
InputOTP.displayName = "InputOTP";
|
|
1309
|
+
var InputOTPGroup = React19.forwardRef(
|
|
1310
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx21("div", { ref, className: cn("flex items-center", className), ...props })
|
|
1311
|
+
);
|
|
1312
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1313
|
+
var InputOTPSlot = React19.forwardRef(({ index, className, ...props }, ref) => {
|
|
1314
|
+
const inputOTPContext = React19.useContext(OTPInputContext);
|
|
1315
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1316
|
+
return /* @__PURE__ */ jsxs11(
|
|
1317
|
+
"div",
|
|
1318
|
+
{
|
|
1319
|
+
ref,
|
|
1320
|
+
className: cn(
|
|
1321
|
+
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
1322
|
+
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
1323
|
+
className
|
|
1324
|
+
),
|
|
1325
|
+
...props,
|
|
1326
|
+
children: [
|
|
1327
|
+
char,
|
|
1328
|
+
hasFakeCaret && /* @__PURE__ */ jsx21("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx21("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
});
|
|
1333
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1334
|
+
var InputOTPSeparator = React19.forwardRef(
|
|
1335
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx21("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx21(Dot, {}) })
|
|
1336
|
+
);
|
|
1337
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1338
|
+
|
|
1339
|
+
// src/components/ui/input.tsx
|
|
1340
|
+
import * as React20 from "react";
|
|
1341
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1342
|
+
var Input = React20.forwardRef(
|
|
1343
|
+
({ className, type, ...props }, ref) => {
|
|
1344
|
+
return /* @__PURE__ */ jsx22(
|
|
1345
|
+
"input",
|
|
1346
|
+
{
|
|
1347
|
+
type,
|
|
1348
|
+
className: cn(
|
|
1349
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1350
|
+
className
|
|
1351
|
+
),
|
|
1352
|
+
ref,
|
|
1353
|
+
...props
|
|
1354
|
+
}
|
|
1355
|
+
);
|
|
1356
|
+
}
|
|
1357
|
+
);
|
|
1358
|
+
Input.displayName = "Input";
|
|
1359
|
+
|
|
1360
|
+
// src/components/ui/menubar.tsx
|
|
1361
|
+
import * as React21 from "react";
|
|
1362
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
1363
|
+
import { Check as Check4, ChevronRight as ChevronRight5, Circle as Circle3 } from "lucide-react";
|
|
1364
|
+
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1365
|
+
var MenubarMenu = MenubarPrimitive.Menu;
|
|
1366
|
+
var MenubarGroup = MenubarPrimitive.Group;
|
|
1367
|
+
var MenubarPortal = MenubarPrimitive.Portal;
|
|
1368
|
+
var MenubarSub = MenubarPrimitive.Sub;
|
|
1369
|
+
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
1370
|
+
var Menubar = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1371
|
+
MenubarPrimitive.Root,
|
|
1372
|
+
{
|
|
1373
|
+
ref,
|
|
1374
|
+
className: cn("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className),
|
|
1375
|
+
...props
|
|
1376
|
+
}
|
|
1377
|
+
));
|
|
1378
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
1379
|
+
var MenubarTrigger = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1380
|
+
MenubarPrimitive.Trigger,
|
|
1381
|
+
{
|
|
1382
|
+
ref,
|
|
1383
|
+
className: cn(
|
|
1384
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
1385
|
+
className
|
|
1386
|
+
),
|
|
1387
|
+
...props
|
|
1388
|
+
}
|
|
1389
|
+
));
|
|
1390
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
1391
|
+
var MenubarSubTrigger = React21.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1392
|
+
MenubarPrimitive.SubTrigger,
|
|
1393
|
+
{
|
|
1394
|
+
ref,
|
|
1395
|
+
className: cn(
|
|
1396
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
1397
|
+
inset && "pl-8",
|
|
1398
|
+
className
|
|
1399
|
+
),
|
|
1400
|
+
...props,
|
|
1401
|
+
children: [
|
|
1402
|
+
children,
|
|
1403
|
+
/* @__PURE__ */ jsx23(ChevronRight5, { className: "ml-auto h-4 w-4" })
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
));
|
|
1407
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
1408
|
+
var MenubarSubContent = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1409
|
+
MenubarPrimitive.SubContent,
|
|
1410
|
+
{
|
|
1411
|
+
ref,
|
|
1412
|
+
className: cn(
|
|
1413
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",
|
|
1414
|
+
className
|
|
1415
|
+
),
|
|
1416
|
+
...props
|
|
1417
|
+
}
|
|
1418
|
+
));
|
|
1419
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
1420
|
+
var MenubarContent = React21.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx23(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
|
|
1421
|
+
MenubarPrimitive.Content,
|
|
1422
|
+
{
|
|
1423
|
+
ref,
|
|
1424
|
+
align,
|
|
1425
|
+
alignOffset,
|
|
1426
|
+
sideOffset,
|
|
1427
|
+
className: cn(
|
|
1428
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
|
|
1429
|
+
className
|
|
1430
|
+
),
|
|
1431
|
+
...props
|
|
1432
|
+
}
|
|
1433
|
+
) }));
|
|
1434
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
1435
|
+
var MenubarItem = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1436
|
+
MenubarPrimitive.Item,
|
|
1437
|
+
{
|
|
1438
|
+
ref,
|
|
1439
|
+
className: cn(
|
|
1440
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1441
|
+
inset && "pl-8",
|
|
1442
|
+
className
|
|
1443
|
+
),
|
|
1444
|
+
...props
|
|
1445
|
+
}
|
|
1446
|
+
));
|
|
1447
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
1448
|
+
var MenubarCheckboxItem = React21.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1449
|
+
MenubarPrimitive.CheckboxItem,
|
|
1450
|
+
{
|
|
1451
|
+
ref,
|
|
1452
|
+
className: cn(
|
|
1453
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1454
|
+
className
|
|
1455
|
+
),
|
|
1456
|
+
checked,
|
|
1457
|
+
...props,
|
|
1458
|
+
children: [
|
|
1459
|
+
/* @__PURE__ */ jsx23("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx23(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx23(Check4, { className: "h-4 w-4" }) }) }),
|
|
1460
|
+
children
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
));
|
|
1464
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
1465
|
+
var MenubarRadioItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1466
|
+
MenubarPrimitive.RadioItem,
|
|
1467
|
+
{
|
|
1468
|
+
ref,
|
|
1469
|
+
className: cn(
|
|
1470
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1471
|
+
className
|
|
1472
|
+
),
|
|
1473
|
+
...props,
|
|
1474
|
+
children: [
|
|
1475
|
+
/* @__PURE__ */ jsx23("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx23(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx23(Circle3, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1476
|
+
children
|
|
1477
|
+
]
|
|
1478
|
+
}
|
|
1479
|
+
));
|
|
1480
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
1481
|
+
var MenubarLabel = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1482
|
+
MenubarPrimitive.Label,
|
|
1483
|
+
{
|
|
1484
|
+
ref,
|
|
1485
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
1486
|
+
...props
|
|
1487
|
+
}
|
|
1488
|
+
));
|
|
1489
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
1490
|
+
var MenubarSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(MenubarPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
1491
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
1492
|
+
var MenubarShortcut = ({ className, ...props }) => {
|
|
1493
|
+
return /* @__PURE__ */ jsx23("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
1494
|
+
};
|
|
1495
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
1496
|
+
|
|
1497
|
+
// src/components/ui/navigation-menu.tsx
|
|
1498
|
+
import * as React22 from "react";
|
|
1499
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
1500
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
1501
|
+
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1502
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1503
|
+
var NavigationMenu = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
1504
|
+
NavigationMenuPrimitive.Root,
|
|
1505
|
+
{
|
|
1506
|
+
ref,
|
|
1507
|
+
className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className),
|
|
1508
|
+
...props,
|
|
1509
|
+
children: [
|
|
1510
|
+
children,
|
|
1511
|
+
/* @__PURE__ */ jsx24(NavigationMenuViewport, {})
|
|
1512
|
+
]
|
|
1513
|
+
}
|
|
1514
|
+
));
|
|
1515
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
1516
|
+
var NavigationMenuList = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1517
|
+
NavigationMenuPrimitive.List,
|
|
1518
|
+
{
|
|
1519
|
+
ref,
|
|
1520
|
+
className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className),
|
|
1521
|
+
...props
|
|
1522
|
+
}
|
|
1523
|
+
));
|
|
1524
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
1525
|
+
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
1526
|
+
var navigationMenuTriggerStyle = cva5(
|
|
1527
|
+
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
|
|
1528
|
+
);
|
|
1529
|
+
var NavigationMenuTrigger = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
1530
|
+
NavigationMenuPrimitive.Trigger,
|
|
1531
|
+
{
|
|
1532
|
+
ref,
|
|
1533
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
1534
|
+
...props,
|
|
1535
|
+
children: [
|
|
1536
|
+
children,
|
|
1537
|
+
" ",
|
|
1538
|
+
/* @__PURE__ */ jsx24(
|
|
1539
|
+
ChevronDown2,
|
|
1540
|
+
{
|
|
1541
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
1542
|
+
"aria-hidden": "true"
|
|
1543
|
+
}
|
|
1544
|
+
)
|
|
1545
|
+
]
|
|
1546
|
+
}
|
|
1547
|
+
));
|
|
1548
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
1549
|
+
var NavigationMenuContent = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1550
|
+
NavigationMenuPrimitive.Content,
|
|
1551
|
+
{
|
|
1552
|
+
ref,
|
|
1553
|
+
className: cn(
|
|
1554
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",
|
|
1555
|
+
className
|
|
1556
|
+
),
|
|
1557
|
+
...props
|
|
1558
|
+
}
|
|
1559
|
+
));
|
|
1560
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
1561
|
+
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
1562
|
+
var NavigationMenuViewport = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx24(
|
|
1563
|
+
NavigationMenuPrimitive.Viewport,
|
|
1564
|
+
{
|
|
1565
|
+
className: cn(
|
|
1566
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
1567
|
+
className
|
|
1568
|
+
),
|
|
1569
|
+
ref,
|
|
1570
|
+
...props
|
|
1571
|
+
}
|
|
1572
|
+
) }));
|
|
1573
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
1574
|
+
var NavigationMenuIndicator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1575
|
+
NavigationMenuPrimitive.Indicator,
|
|
1576
|
+
{
|
|
1577
|
+
ref,
|
|
1578
|
+
className: cn(
|
|
1579
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
1580
|
+
className
|
|
1581
|
+
),
|
|
1582
|
+
...props,
|
|
1583
|
+
children: /* @__PURE__ */ jsx24("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
1584
|
+
}
|
|
1585
|
+
));
|
|
1586
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
1587
|
+
|
|
1588
|
+
// src/components/ui/pagination.tsx
|
|
1589
|
+
import * as React23 from "react";
|
|
1590
|
+
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight6, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
1591
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1592
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx25(
|
|
1593
|
+
"nav",
|
|
1594
|
+
{
|
|
1595
|
+
role: "navigation",
|
|
1596
|
+
"aria-label": "pagination",
|
|
1597
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
1598
|
+
...props
|
|
1599
|
+
}
|
|
1600
|
+
);
|
|
1601
|
+
Pagination.displayName = "Pagination";
|
|
1602
|
+
var PaginationContent = React23.forwardRef(
|
|
1603
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx25("ul", { ref, className: cn("flex flex-row items-center gap-1", className), ...props })
|
|
1604
|
+
);
|
|
1605
|
+
PaginationContent.displayName = "PaginationContent";
|
|
1606
|
+
var PaginationItem = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25("li", { ref, className: cn("", className), ...props }));
|
|
1607
|
+
PaginationItem.displayName = "PaginationItem";
|
|
1608
|
+
var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx25(
|
|
1609
|
+
"a",
|
|
1610
|
+
{
|
|
1611
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1612
|
+
className: cn(
|
|
1613
|
+
buttonVariants({
|
|
1614
|
+
variant: isActive ? "outline" : "ghost",
|
|
1615
|
+
size
|
|
1616
|
+
}),
|
|
1617
|
+
className
|
|
1618
|
+
),
|
|
1619
|
+
...props
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
PaginationLink.displayName = "PaginationLink";
|
|
1623
|
+
var PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs14(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 pl-2.5", className), ...props, children: [
|
|
1624
|
+
/* @__PURE__ */ jsx25(ChevronLeft2, { className: "h-4 w-4" }),
|
|
1625
|
+
/* @__PURE__ */ jsx25("span", { children: "Previous" })
|
|
1626
|
+
] });
|
|
1627
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
1628
|
+
var PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs14(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 pr-2.5", className), ...props, children: [
|
|
1629
|
+
/* @__PURE__ */ jsx25("span", { children: "Next" }),
|
|
1630
|
+
/* @__PURE__ */ jsx25(ChevronRight6, { className: "h-4 w-4" })
|
|
1631
|
+
] });
|
|
1632
|
+
PaginationNext.displayName = "PaginationNext";
|
|
1633
|
+
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs14("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
|
|
1634
|
+
/* @__PURE__ */ jsx25(MoreHorizontal2, { className: "h-4 w-4" }),
|
|
1635
|
+
/* @__PURE__ */ jsx25("span", { className: "sr-only", children: "More pages" })
|
|
1636
|
+
] });
|
|
1637
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
1638
|
+
|
|
1639
|
+
// src/components/ui/popover.tsx
|
|
1640
|
+
import * as React24 from "react";
|
|
1641
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1642
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1643
|
+
var Popover = PopoverPrimitive.Root;
|
|
1644
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1645
|
+
var PopoverContent = React24.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx26(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1646
|
+
PopoverPrimitive.Content,
|
|
1647
|
+
{
|
|
1648
|
+
ref,
|
|
1649
|
+
align,
|
|
1650
|
+
sideOffset,
|
|
1651
|
+
className: cn(
|
|
1652
|
+
"z-50 w-72 rounded-md 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",
|
|
1653
|
+
className
|
|
1654
|
+
),
|
|
1655
|
+
...props
|
|
1656
|
+
}
|
|
1657
|
+
) }));
|
|
1658
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1659
|
+
|
|
1660
|
+
// src/components/ui/progress.tsx
|
|
1661
|
+
import * as React25 from "react";
|
|
1662
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1663
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1664
|
+
var Progress = React25.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1665
|
+
ProgressPrimitive.Root,
|
|
1666
|
+
{
|
|
1667
|
+
ref,
|
|
1668
|
+
className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
|
|
1669
|
+
...props,
|
|
1670
|
+
children: /* @__PURE__ */ jsx27(
|
|
1671
|
+
ProgressPrimitive.Indicator,
|
|
1672
|
+
{
|
|
1673
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1674
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1675
|
+
}
|
|
1676
|
+
)
|
|
1677
|
+
}
|
|
1678
|
+
));
|
|
1679
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1680
|
+
|
|
1681
|
+
// src/components/ui/radio-group.tsx
|
|
1682
|
+
import * as React26 from "react";
|
|
1683
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
1684
|
+
import { Circle as Circle4 } from "lucide-react";
|
|
1685
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1686
|
+
var RadioGroup4 = React26.forwardRef(({ className, ...props }, ref) => {
|
|
1687
|
+
return /* @__PURE__ */ jsx28(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref });
|
|
1688
|
+
});
|
|
1689
|
+
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1690
|
+
var RadioGroupItem = React26.forwardRef(({ className, ...props }, ref) => {
|
|
1691
|
+
return /* @__PURE__ */ jsx28(
|
|
1692
|
+
RadioGroupPrimitive.Item,
|
|
1693
|
+
{
|
|
1694
|
+
ref,
|
|
1695
|
+
className: cn(
|
|
1696
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1697
|
+
className
|
|
1698
|
+
),
|
|
1699
|
+
...props,
|
|
1700
|
+
children: /* @__PURE__ */ jsx28(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx28(Circle4, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1701
|
+
}
|
|
1702
|
+
);
|
|
1703
|
+
});
|
|
1704
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1705
|
+
|
|
1706
|
+
// src/components/ui/resizable.tsx
|
|
1707
|
+
import { GripVertical } from "lucide-react";
|
|
1708
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
1709
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1710
|
+
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx29(
|
|
1711
|
+
ResizablePrimitive.PanelGroup,
|
|
1712
|
+
{
|
|
1713
|
+
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
1714
|
+
...props
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
var ResizablePanel = ResizablePrimitive.Panel;
|
|
1718
|
+
var ResizableHandle = ({
|
|
1719
|
+
withHandle,
|
|
1720
|
+
className,
|
|
1721
|
+
...props
|
|
1722
|
+
}) => /* @__PURE__ */ jsx29(
|
|
1723
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
1724
|
+
{
|
|
1725
|
+
className: cn(
|
|
1726
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
1727
|
+
className
|
|
1728
|
+
),
|
|
1729
|
+
...props,
|
|
1730
|
+
children: withHandle && /* @__PURE__ */ jsx29("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx29(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
1731
|
+
}
|
|
1732
|
+
);
|
|
1733
|
+
|
|
1734
|
+
// src/components/ui/scroll-area.tsx
|
|
1735
|
+
import * as React27 from "react";
|
|
1736
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1737
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1738
|
+
var ScrollArea = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs15(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
|
|
1739
|
+
/* @__PURE__ */ jsx30(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1740
|
+
/* @__PURE__ */ jsx30(ScrollBar, {}),
|
|
1741
|
+
/* @__PURE__ */ jsx30(ScrollAreaPrimitive.Corner, {})
|
|
1742
|
+
] }));
|
|
1743
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1744
|
+
var ScrollBar = React27.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1745
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1746
|
+
{
|
|
1747
|
+
ref,
|
|
1748
|
+
orientation,
|
|
1749
|
+
className: cn(
|
|
1750
|
+
"flex touch-none select-none transition-colors",
|
|
1751
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1752
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1753
|
+
className
|
|
1754
|
+
),
|
|
1755
|
+
...props,
|
|
1756
|
+
children: /* @__PURE__ */ jsx30(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1757
|
+
}
|
|
1758
|
+
));
|
|
1759
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1760
|
+
|
|
1761
|
+
// src/components/ui/select.tsx
|
|
1762
|
+
import * as React28 from "react";
|
|
1763
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1764
|
+
import { Check as Check5, ChevronDown as ChevronDown3, ChevronUp } from "lucide-react";
|
|
1765
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1766
|
+
var Select = SelectPrimitive.Root;
|
|
1767
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
1768
|
+
var SelectValue = SelectPrimitive.Value;
|
|
1769
|
+
var SelectTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
1770
|
+
SelectPrimitive.Trigger,
|
|
1771
|
+
{
|
|
1772
|
+
ref,
|
|
1773
|
+
className: cn(
|
|
1774
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1775
|
+
className
|
|
1776
|
+
),
|
|
1777
|
+
...props,
|
|
1778
|
+
children: [
|
|
1779
|
+
children,
|
|
1780
|
+
/* @__PURE__ */ jsx31(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx31(ChevronDown3, { className: "h-4 w-4 opacity-50" }) })
|
|
1781
|
+
]
|
|
1782
|
+
}
|
|
1783
|
+
));
|
|
1784
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1785
|
+
var SelectScrollUpButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
1786
|
+
SelectPrimitive.ScrollUpButton,
|
|
1787
|
+
{
|
|
1788
|
+
ref,
|
|
1789
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1790
|
+
...props,
|
|
1791
|
+
children: /* @__PURE__ */ jsx31(ChevronUp, { className: "h-4 w-4" })
|
|
1792
|
+
}
|
|
1793
|
+
));
|
|
1794
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1795
|
+
var SelectScrollDownButton = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
1796
|
+
SelectPrimitive.ScrollDownButton,
|
|
1797
|
+
{
|
|
1798
|
+
ref,
|
|
1799
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1800
|
+
...props,
|
|
1801
|
+
children: /* @__PURE__ */ jsx31(ChevronDown3, { className: "h-4 w-4" })
|
|
1802
|
+
}
|
|
1803
|
+
));
|
|
1804
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1805
|
+
var SelectContent = React28.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx31(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
1806
|
+
SelectPrimitive.Content,
|
|
1807
|
+
{
|
|
1808
|
+
ref,
|
|
1809
|
+
className: cn(
|
|
1810
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
1811
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1812
|
+
className
|
|
1813
|
+
),
|
|
1814
|
+
position,
|
|
1815
|
+
...props,
|
|
1816
|
+
children: [
|
|
1817
|
+
/* @__PURE__ */ jsx31(SelectScrollUpButton, {}),
|
|
1818
|
+
/* @__PURE__ */ jsx31(
|
|
1819
|
+
SelectPrimitive.Viewport,
|
|
1820
|
+
{
|
|
1821
|
+
className: cn(
|
|
1822
|
+
"p-1",
|
|
1823
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1824
|
+
),
|
|
1825
|
+
children
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
/* @__PURE__ */ jsx31(SelectScrollDownButton, {})
|
|
1829
|
+
]
|
|
1830
|
+
}
|
|
1831
|
+
) }));
|
|
1832
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1833
|
+
var SelectLabel = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(SelectPrimitive.Label, { ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props }));
|
|
1834
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1835
|
+
var SelectItem = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
1836
|
+
SelectPrimitive.Item,
|
|
1837
|
+
{
|
|
1838
|
+
ref,
|
|
1839
|
+
className: cn(
|
|
1840
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
|
|
1841
|
+
className
|
|
1842
|
+
),
|
|
1843
|
+
...props,
|
|
1844
|
+
children: [
|
|
1845
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx31(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx31(Check5, { className: "h-4 w-4" }) }) }),
|
|
1846
|
+
/* @__PURE__ */ jsx31(SelectPrimitive.ItemText, { children })
|
|
1847
|
+
]
|
|
1848
|
+
}
|
|
1849
|
+
));
|
|
1850
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1851
|
+
var SelectSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
1852
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1853
|
+
|
|
1854
|
+
// src/components/ui/separator.tsx
|
|
1855
|
+
import * as React29 from "react";
|
|
1856
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1857
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1858
|
+
var Separator5 = React29.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
1859
|
+
SeparatorPrimitive.Root,
|
|
1860
|
+
{
|
|
1861
|
+
ref,
|
|
1862
|
+
decorative,
|
|
1863
|
+
orientation,
|
|
1864
|
+
className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
|
|
1865
|
+
...props
|
|
1866
|
+
}
|
|
1867
|
+
));
|
|
1868
|
+
Separator5.displayName = SeparatorPrimitive.Root.displayName;
|
|
1869
|
+
|
|
1870
|
+
// src/components/ui/sheet.tsx
|
|
1871
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
1872
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
1873
|
+
import { X as X2 } from "lucide-react";
|
|
1874
|
+
import * as React30 from "react";
|
|
1875
|
+
import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1876
|
+
var Sheet = SheetPrimitive.Root;
|
|
1877
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
1878
|
+
var SheetClose = SheetPrimitive.Close;
|
|
1879
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
1880
|
+
var SheetOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
1881
|
+
SheetPrimitive.Overlay,
|
|
1882
|
+
{
|
|
1883
|
+
className: cn(
|
|
1884
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1885
|
+
className
|
|
1886
|
+
),
|
|
1887
|
+
...props,
|
|
1888
|
+
ref
|
|
1889
|
+
}
|
|
1890
|
+
));
|
|
1891
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
1892
|
+
var sheetVariants = cva6(
|
|
1893
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1894
|
+
{
|
|
1895
|
+
variants: {
|
|
1896
|
+
side: {
|
|
1897
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1898
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1899
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1900
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
defaultVariants: {
|
|
1904
|
+
side: "right"
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
var SheetContent = React30.forwardRef(
|
|
1909
|
+
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs17(SheetPortal, { children: [
|
|
1910
|
+
/* @__PURE__ */ jsx33(SheetOverlay, {}),
|
|
1911
|
+
/* @__PURE__ */ jsxs17(SheetPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
1912
|
+
children,
|
|
1913
|
+
/* @__PURE__ */ jsxs17(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
1914
|
+
/* @__PURE__ */ jsx33(X2, { className: "h-4 w-4" }),
|
|
1915
|
+
/* @__PURE__ */ jsx33("span", { className: "sr-only", children: "Close" })
|
|
1916
|
+
] })
|
|
1917
|
+
] })
|
|
1918
|
+
] })
|
|
1919
|
+
);
|
|
1920
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
1921
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx33("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
1922
|
+
SheetHeader.displayName = "SheetHeader";
|
|
1923
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx33("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
1924
|
+
SheetFooter.displayName = "SheetFooter";
|
|
1925
|
+
var SheetTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(SheetPrimitive.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
|
|
1926
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
1927
|
+
var SheetDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(SheetPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
1928
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
1929
|
+
|
|
1930
|
+
// src/components/ui/sidebar.tsx
|
|
1931
|
+
import * as React33 from "react";
|
|
1932
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1933
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
1934
|
+
import { PanelLeft } from "lucide-react";
|
|
1935
|
+
|
|
1936
|
+
// src/hooks/use-mobile.ts
|
|
1937
|
+
import * as React31 from "react";
|
|
1938
|
+
var MOBILE_BREAKPOINT = 768;
|
|
1939
|
+
function useIsMobile() {
|
|
1940
|
+
const [isMobile, setIsMobile] = React31.useState(void 0);
|
|
1941
|
+
React31.useEffect(() => {
|
|
1942
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1943
|
+
const onChange = () => {
|
|
1944
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1945
|
+
};
|
|
1946
|
+
mql.addEventListener("change", onChange);
|
|
1947
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1948
|
+
return () => mql.removeEventListener("change", onChange);
|
|
1949
|
+
}, []);
|
|
1950
|
+
return !!isMobile;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
// src/components/ui/skeleton.tsx
|
|
1954
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1955
|
+
function Skeleton({ className, ...props }) {
|
|
1956
|
+
return /* @__PURE__ */ jsx34("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
// src/components/ui/tooltip.tsx
|
|
1960
|
+
import * as React32 from "react";
|
|
1961
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
1962
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1963
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1964
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
1965
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1966
|
+
var TooltipContent = React32.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
1967
|
+
TooltipPrimitive.Content,
|
|
1968
|
+
{
|
|
1969
|
+
ref,
|
|
1970
|
+
sideOffset,
|
|
1971
|
+
className: cn(
|
|
1972
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
1973
|
+
className
|
|
1974
|
+
),
|
|
1975
|
+
...props
|
|
1976
|
+
}
|
|
1977
|
+
));
|
|
1978
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
1979
|
+
|
|
1980
|
+
// src/components/ui/sidebar.tsx
|
|
1981
|
+
import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1982
|
+
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
1983
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1984
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
1985
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1986
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1987
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1988
|
+
var SidebarContext = React33.createContext(null);
|
|
1989
|
+
function useSidebar() {
|
|
1990
|
+
const context = React33.useContext(SidebarContext);
|
|
1991
|
+
if (!context) {
|
|
1992
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1993
|
+
}
|
|
1994
|
+
return context;
|
|
1995
|
+
}
|
|
1996
|
+
var SidebarProvider = React33.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
1997
|
+
const isMobile = useIsMobile();
|
|
1998
|
+
const [openMobile, setOpenMobile] = React33.useState(false);
|
|
1999
|
+
const [_open, _setOpen] = React33.useState(defaultOpen);
|
|
2000
|
+
const open = openProp ?? _open;
|
|
2001
|
+
const setOpen = React33.useCallback(
|
|
2002
|
+
(value) => {
|
|
2003
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2004
|
+
if (setOpenProp) {
|
|
2005
|
+
setOpenProp(openState);
|
|
2006
|
+
} else {
|
|
2007
|
+
_setOpen(openState);
|
|
2008
|
+
}
|
|
2009
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
2010
|
+
},
|
|
2011
|
+
[setOpenProp, open]
|
|
2012
|
+
);
|
|
2013
|
+
const toggleSidebar = React33.useCallback(() => {
|
|
2014
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2015
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
2016
|
+
React33.useEffect(() => {
|
|
2017
|
+
const handleKeyDown = (event) => {
|
|
2018
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2019
|
+
event.preventDefault();
|
|
2020
|
+
toggleSidebar();
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
2023
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2024
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2025
|
+
}, [toggleSidebar]);
|
|
2026
|
+
const state = open ? "expanded" : "collapsed";
|
|
2027
|
+
const contextValue = React33.useMemo(
|
|
2028
|
+
() => ({
|
|
2029
|
+
state,
|
|
2030
|
+
open,
|
|
2031
|
+
setOpen,
|
|
2032
|
+
isMobile,
|
|
2033
|
+
openMobile,
|
|
2034
|
+
setOpenMobile,
|
|
2035
|
+
toggleSidebar
|
|
2036
|
+
}),
|
|
2037
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
2038
|
+
);
|
|
2039
|
+
return /* @__PURE__ */ jsx36(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx36(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx36(
|
|
2040
|
+
"div",
|
|
2041
|
+
{
|
|
2042
|
+
style: {
|
|
2043
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2044
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2045
|
+
...style
|
|
2046
|
+
},
|
|
2047
|
+
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", className),
|
|
2048
|
+
ref,
|
|
2049
|
+
...props,
|
|
2050
|
+
children
|
|
2051
|
+
}
|
|
2052
|
+
) }) });
|
|
2053
|
+
});
|
|
2054
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
2055
|
+
var Sidebar = React33.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
2056
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
2057
|
+
if (collapsible === "none") {
|
|
2058
|
+
return /* @__PURE__ */ jsx36(
|
|
2059
|
+
"div",
|
|
2060
|
+
{
|
|
2061
|
+
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
2062
|
+
ref,
|
|
2063
|
+
...props,
|
|
2064
|
+
children
|
|
2065
|
+
}
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
if (isMobile) {
|
|
2069
|
+
return /* @__PURE__ */ jsx36(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx36(
|
|
2070
|
+
SheetContent,
|
|
2071
|
+
{
|
|
2072
|
+
"data-sidebar": "sidebar",
|
|
2073
|
+
"data-mobile": "true",
|
|
2074
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2075
|
+
style: {
|
|
2076
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2077
|
+
},
|
|
2078
|
+
side,
|
|
2079
|
+
children: /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full flex-col", children })
|
|
2080
|
+
}
|
|
2081
|
+
) });
|
|
2082
|
+
}
|
|
2083
|
+
return /* @__PURE__ */ jsxs18(
|
|
2084
|
+
"div",
|
|
2085
|
+
{
|
|
2086
|
+
ref,
|
|
2087
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
2088
|
+
"data-state": state,
|
|
2089
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2090
|
+
"data-variant": variant,
|
|
2091
|
+
"data-side": side,
|
|
2092
|
+
children: [
|
|
2093
|
+
/* @__PURE__ */ jsx36(
|
|
2094
|
+
"div",
|
|
2095
|
+
{
|
|
2096
|
+
className: cn(
|
|
2097
|
+
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
2098
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
2099
|
+
"group-data-[side=right]:rotate-180",
|
|
2100
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
2101
|
+
)
|
|
2102
|
+
}
|
|
2103
|
+
),
|
|
2104
|
+
/* @__PURE__ */ jsx36(
|
|
2105
|
+
"div",
|
|
2106
|
+
{
|
|
2107
|
+
className: cn(
|
|
2108
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
2109
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
2110
|
+
// Adjust the padding for floating and inset variants.
|
|
2111
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
2112
|
+
className
|
|
2113
|
+
),
|
|
2114
|
+
...props,
|
|
2115
|
+
children: /* @__PURE__ */ jsx36(
|
|
2116
|
+
"div",
|
|
2117
|
+
{
|
|
2118
|
+
"data-sidebar": "sidebar",
|
|
2119
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
2120
|
+
children
|
|
2121
|
+
}
|
|
2122
|
+
)
|
|
2123
|
+
}
|
|
2124
|
+
)
|
|
2125
|
+
]
|
|
2126
|
+
}
|
|
2127
|
+
);
|
|
2128
|
+
});
|
|
2129
|
+
Sidebar.displayName = "Sidebar";
|
|
2130
|
+
var SidebarTrigger = React33.forwardRef(
|
|
2131
|
+
({ className, onClick, ...props }, ref) => {
|
|
2132
|
+
const { toggleSidebar } = useSidebar();
|
|
2133
|
+
return /* @__PURE__ */ jsxs18(
|
|
2134
|
+
Button,
|
|
2135
|
+
{
|
|
2136
|
+
ref,
|
|
2137
|
+
"data-sidebar": "trigger",
|
|
2138
|
+
variant: "ghost",
|
|
2139
|
+
size: "icon",
|
|
2140
|
+
className: cn("h-7 w-7", className),
|
|
2141
|
+
onClick: (event) => {
|
|
2142
|
+
onClick?.(event);
|
|
2143
|
+
toggleSidebar();
|
|
2144
|
+
},
|
|
2145
|
+
...props,
|
|
2146
|
+
children: [
|
|
2147
|
+
/* @__PURE__ */ jsx36(PanelLeft, {}),
|
|
2148
|
+
/* @__PURE__ */ jsx36("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2149
|
+
]
|
|
2150
|
+
}
|
|
2151
|
+
);
|
|
2152
|
+
}
|
|
2153
|
+
);
|
|
2154
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
2155
|
+
var SidebarRail = React33.forwardRef(
|
|
2156
|
+
({ className, ...props }, ref) => {
|
|
2157
|
+
const { toggleSidebar } = useSidebar();
|
|
2158
|
+
return /* @__PURE__ */ jsx36(
|
|
2159
|
+
"button",
|
|
2160
|
+
{
|
|
2161
|
+
ref,
|
|
2162
|
+
"data-sidebar": "rail",
|
|
2163
|
+
"aria-label": "Toggle Sidebar",
|
|
2164
|
+
tabIndex: -1,
|
|
2165
|
+
onClick: toggleSidebar,
|
|
2166
|
+
title: "Toggle Sidebar",
|
|
2167
|
+
className: cn(
|
|
2168
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex",
|
|
2169
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
2170
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
2171
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
2172
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
2173
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
2174
|
+
className
|
|
2175
|
+
),
|
|
2176
|
+
...props
|
|
2177
|
+
}
|
|
2178
|
+
);
|
|
2179
|
+
}
|
|
2180
|
+
);
|
|
2181
|
+
SidebarRail.displayName = "SidebarRail";
|
|
2182
|
+
var SidebarInset = React33.forwardRef(({ className, ...props }, ref) => {
|
|
2183
|
+
return /* @__PURE__ */ jsx36(
|
|
2184
|
+
"main",
|
|
2185
|
+
{
|
|
2186
|
+
ref,
|
|
2187
|
+
className: cn(
|
|
2188
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
2189
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
2190
|
+
className
|
|
2191
|
+
),
|
|
2192
|
+
...props
|
|
2193
|
+
}
|
|
2194
|
+
);
|
|
2195
|
+
});
|
|
2196
|
+
SidebarInset.displayName = "SidebarInset";
|
|
2197
|
+
var SidebarInput = React33.forwardRef(
|
|
2198
|
+
({ className, ...props }, ref) => {
|
|
2199
|
+
return /* @__PURE__ */ jsx36(
|
|
2200
|
+
Input,
|
|
2201
|
+
{
|
|
2202
|
+
ref,
|
|
2203
|
+
"data-sidebar": "input",
|
|
2204
|
+
className: cn(
|
|
2205
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
2206
|
+
className
|
|
2207
|
+
),
|
|
2208
|
+
...props
|
|
2209
|
+
}
|
|
2210
|
+
);
|
|
2211
|
+
}
|
|
2212
|
+
);
|
|
2213
|
+
SidebarInput.displayName = "SidebarInput";
|
|
2214
|
+
var SidebarHeader = React33.forwardRef(({ className, ...props }, ref) => {
|
|
2215
|
+
return /* @__PURE__ */ jsx36("div", { ref, "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
2216
|
+
});
|
|
2217
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
2218
|
+
var SidebarFooter = React33.forwardRef(({ className, ...props }, ref) => {
|
|
2219
|
+
return /* @__PURE__ */ jsx36("div", { ref, "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
2220
|
+
});
|
|
2221
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
2222
|
+
var SidebarSeparator = React33.forwardRef(
|
|
2223
|
+
({ className, ...props }, ref) => {
|
|
2224
|
+
return /* @__PURE__ */ jsx36(
|
|
2225
|
+
Separator5,
|
|
2226
|
+
{
|
|
2227
|
+
ref,
|
|
2228
|
+
"data-sidebar": "separator",
|
|
2229
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
2230
|
+
...props
|
|
2231
|
+
}
|
|
2232
|
+
);
|
|
2233
|
+
}
|
|
2234
|
+
);
|
|
2235
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
2236
|
+
var SidebarContent = React33.forwardRef(({ className, ...props }, ref) => {
|
|
2237
|
+
return /* @__PURE__ */ jsx36(
|
|
2238
|
+
"div",
|
|
2239
|
+
{
|
|
2240
|
+
ref,
|
|
2241
|
+
"data-sidebar": "content",
|
|
2242
|
+
className: cn(
|
|
2243
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2244
|
+
className
|
|
2245
|
+
),
|
|
2246
|
+
...props
|
|
2247
|
+
}
|
|
2248
|
+
);
|
|
2249
|
+
});
|
|
2250
|
+
SidebarContent.displayName = "SidebarContent";
|
|
2251
|
+
var SidebarGroup = React33.forwardRef(({ className, ...props }, ref) => {
|
|
2252
|
+
return /* @__PURE__ */ jsx36(
|
|
2253
|
+
"div",
|
|
2254
|
+
{
|
|
2255
|
+
ref,
|
|
2256
|
+
"data-sidebar": "group",
|
|
2257
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2258
|
+
...props
|
|
2259
|
+
}
|
|
2260
|
+
);
|
|
2261
|
+
});
|
|
2262
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
2263
|
+
var SidebarGroupLabel = React33.forwardRef(
|
|
2264
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
2265
|
+
const Comp = asChild ? Slot4 : "div";
|
|
2266
|
+
return /* @__PURE__ */ jsx36(
|
|
2267
|
+
Comp,
|
|
2268
|
+
{
|
|
2269
|
+
ref,
|
|
2270
|
+
"data-sidebar": "group-label",
|
|
2271
|
+
className: cn(
|
|
2272
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2273
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
2274
|
+
className
|
|
2275
|
+
),
|
|
2276
|
+
...props
|
|
2277
|
+
}
|
|
2278
|
+
);
|
|
2279
|
+
}
|
|
2280
|
+
);
|
|
2281
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
2282
|
+
var SidebarGroupAction = React33.forwardRef(
|
|
2283
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
2284
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2285
|
+
return /* @__PURE__ */ jsx36(
|
|
2286
|
+
Comp,
|
|
2287
|
+
{
|
|
2288
|
+
ref,
|
|
2289
|
+
"data-sidebar": "group-action",
|
|
2290
|
+
className: cn(
|
|
2291
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2292
|
+
// Increases the hit area of the button on mobile.
|
|
2293
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
2294
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2295
|
+
className
|
|
2296
|
+
),
|
|
2297
|
+
...props
|
|
2298
|
+
}
|
|
2299
|
+
);
|
|
2300
|
+
}
|
|
2301
|
+
);
|
|
2302
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
2303
|
+
var SidebarGroupContent = React33.forwardRef(
|
|
2304
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { ref, "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props })
|
|
2305
|
+
);
|
|
2306
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2307
|
+
var SidebarMenu = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("ul", { ref, "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-1", className), ...props }));
|
|
2308
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
2309
|
+
var SidebarMenuItem = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("li", { ref, "data-sidebar": "menu-item", className: cn("group/menu-item relative", className), ...props }));
|
|
2310
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
2311
|
+
var sidebarMenuButtonVariants = cva7(
|
|
2312
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2313
|
+
{
|
|
2314
|
+
variants: {
|
|
2315
|
+
variant: {
|
|
2316
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2317
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
2318
|
+
},
|
|
2319
|
+
size: {
|
|
2320
|
+
default: "h-8 text-sm",
|
|
2321
|
+
sm: "h-7 text-xs",
|
|
2322
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
defaultVariants: {
|
|
2326
|
+
variant: "default",
|
|
2327
|
+
size: "default"
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
var SidebarMenuButton = React33.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
2332
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2333
|
+
const { isMobile, state } = useSidebar();
|
|
2334
|
+
const button = /* @__PURE__ */ jsx36(
|
|
2335
|
+
Comp,
|
|
2336
|
+
{
|
|
2337
|
+
ref,
|
|
2338
|
+
"data-sidebar": "menu-button",
|
|
2339
|
+
"data-size": size,
|
|
2340
|
+
"data-active": isActive,
|
|
2341
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
2342
|
+
...props
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
if (!tooltip) {
|
|
2346
|
+
return button;
|
|
2347
|
+
}
|
|
2348
|
+
if (typeof tooltip === "string") {
|
|
2349
|
+
tooltip = {
|
|
2350
|
+
children: tooltip
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
return /* @__PURE__ */ jsxs18(Tooltip2, { children: [
|
|
2354
|
+
/* @__PURE__ */ jsx36(TooltipTrigger, { asChild: true, children: button }),
|
|
2355
|
+
/* @__PURE__ */ jsx36(TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
|
|
2356
|
+
] });
|
|
2357
|
+
});
|
|
2358
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2359
|
+
var SidebarMenuAction = React33.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2360
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2361
|
+
return /* @__PURE__ */ jsx36(
|
|
2362
|
+
Comp,
|
|
2363
|
+
{
|
|
2364
|
+
ref,
|
|
2365
|
+
"data-sidebar": "menu-action",
|
|
2366
|
+
className: cn(
|
|
2367
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2368
|
+
// Increases the hit area of the button on mobile.
|
|
2369
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
2370
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2371
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2372
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2373
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2374
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
2375
|
+
className
|
|
2376
|
+
),
|
|
2377
|
+
...props
|
|
2378
|
+
}
|
|
2379
|
+
);
|
|
2380
|
+
});
|
|
2381
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2382
|
+
var SidebarMenuBadge = React33.forwardRef(
|
|
2383
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2384
|
+
"div",
|
|
2385
|
+
{
|
|
2386
|
+
ref,
|
|
2387
|
+
"data-sidebar": "menu-badge",
|
|
2388
|
+
className: cn(
|
|
2389
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
2390
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2391
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2392
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2393
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2394
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2395
|
+
className
|
|
2396
|
+
),
|
|
2397
|
+
...props
|
|
2398
|
+
}
|
|
2399
|
+
)
|
|
2400
|
+
);
|
|
2401
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
2402
|
+
var SidebarMenuSkeleton = React33.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2403
|
+
const width = React33.useMemo(() => {
|
|
2404
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2405
|
+
}, []);
|
|
2406
|
+
return /* @__PURE__ */ jsxs18(
|
|
2407
|
+
"div",
|
|
2408
|
+
{
|
|
2409
|
+
ref,
|
|
2410
|
+
"data-sidebar": "menu-skeleton",
|
|
2411
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2412
|
+
...props,
|
|
2413
|
+
children: [
|
|
2414
|
+
showIcon && /* @__PURE__ */ jsx36(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
2415
|
+
/* @__PURE__ */ jsx36(
|
|
2416
|
+
Skeleton,
|
|
2417
|
+
{
|
|
2418
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
2419
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2420
|
+
style: {
|
|
2421
|
+
"--skeleton-width": width
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
)
|
|
2425
|
+
]
|
|
2426
|
+
}
|
|
2427
|
+
);
|
|
2428
|
+
});
|
|
2429
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
2430
|
+
var SidebarMenuSub = React33.forwardRef(
|
|
2431
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2432
|
+
"ul",
|
|
2433
|
+
{
|
|
2434
|
+
ref,
|
|
2435
|
+
"data-sidebar": "menu-sub",
|
|
2436
|
+
className: cn(
|
|
2437
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
2438
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2439
|
+
className
|
|
2440
|
+
),
|
|
2441
|
+
...props
|
|
2442
|
+
}
|
|
2443
|
+
)
|
|
2444
|
+
);
|
|
2445
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
2446
|
+
var SidebarMenuSubItem = React33.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx36("li", { ref, ...props }));
|
|
2447
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
2448
|
+
var SidebarMenuSubButton = React33.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2449
|
+
const Comp = asChild ? Slot4 : "a";
|
|
2450
|
+
return /* @__PURE__ */ jsx36(
|
|
2451
|
+
Comp,
|
|
2452
|
+
{
|
|
2453
|
+
ref,
|
|
2454
|
+
"data-sidebar": "menu-sub-button",
|
|
2455
|
+
"data-size": size,
|
|
2456
|
+
"data-active": isActive,
|
|
2457
|
+
className: cn(
|
|
2458
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
2459
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
2460
|
+
size === "sm" && "text-xs",
|
|
2461
|
+
size === "md" && "text-sm",
|
|
2462
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2463
|
+
className
|
|
2464
|
+
),
|
|
2465
|
+
...props
|
|
2466
|
+
}
|
|
2467
|
+
);
|
|
2468
|
+
});
|
|
2469
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
2470
|
+
|
|
2471
|
+
// src/components/ui/slider.tsx
|
|
2472
|
+
import * as React34 from "react";
|
|
2473
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
2474
|
+
import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2475
|
+
var Slider = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs19(
|
|
2476
|
+
SliderPrimitive.Root,
|
|
2477
|
+
{
|
|
2478
|
+
ref,
|
|
2479
|
+
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
2480
|
+
...props,
|
|
2481
|
+
children: [
|
|
2482
|
+
/* @__PURE__ */ jsx37(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx37(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
2483
|
+
/* @__PURE__ */ jsx37(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
2484
|
+
]
|
|
2485
|
+
}
|
|
2486
|
+
));
|
|
2487
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
2488
|
+
|
|
2489
|
+
// src/components/ui/sonner.tsx
|
|
2490
|
+
import { useTheme } from "next-themes";
|
|
2491
|
+
import { Toaster as Sonner, toast } from "sonner";
|
|
2492
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2493
|
+
var Toaster = ({ ...props }) => {
|
|
2494
|
+
const { theme = "system" } = useTheme();
|
|
2495
|
+
return /* @__PURE__ */ jsx38(
|
|
2496
|
+
Sonner,
|
|
2497
|
+
{
|
|
2498
|
+
theme,
|
|
2499
|
+
className: "toaster group",
|
|
2500
|
+
toastOptions: {
|
|
2501
|
+
classNames: {
|
|
2502
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
2503
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
2504
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
2505
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
...props
|
|
2509
|
+
}
|
|
2510
|
+
);
|
|
2511
|
+
};
|
|
2512
|
+
|
|
2513
|
+
// src/components/ui/switch.tsx
|
|
2514
|
+
import * as React35 from "react";
|
|
2515
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
2516
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2517
|
+
var Switch = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
2518
|
+
SwitchPrimitives.Root,
|
|
2519
|
+
{
|
|
2520
|
+
className: cn(
|
|
2521
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
2522
|
+
className
|
|
2523
|
+
),
|
|
2524
|
+
...props,
|
|
2525
|
+
ref,
|
|
2526
|
+
children: /* @__PURE__ */ jsx39(
|
|
2527
|
+
SwitchPrimitives.Thumb,
|
|
2528
|
+
{
|
|
2529
|
+
className: cn(
|
|
2530
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
2531
|
+
)
|
|
2532
|
+
}
|
|
2533
|
+
)
|
|
2534
|
+
}
|
|
2535
|
+
));
|
|
2536
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
2537
|
+
|
|
2538
|
+
// src/components/ui/table.tsx
|
|
2539
|
+
import * as React36 from "react";
|
|
2540
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2541
|
+
var Table = React36.forwardRef(
|
|
2542
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx40("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
2543
|
+
);
|
|
2544
|
+
Table.displayName = "Table";
|
|
2545
|
+
var TableHeader = React36.forwardRef(
|
|
2546
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
2547
|
+
);
|
|
2548
|
+
TableHeader.displayName = "TableHeader";
|
|
2549
|
+
var TableBody = React36.forwardRef(
|
|
2550
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
2551
|
+
);
|
|
2552
|
+
TableBody.displayName = "TableBody";
|
|
2553
|
+
var TableFooter = React36.forwardRef(
|
|
2554
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
|
|
2555
|
+
);
|
|
2556
|
+
TableFooter.displayName = "TableFooter";
|
|
2557
|
+
var TableRow = React36.forwardRef(
|
|
2558
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
2559
|
+
"tr",
|
|
2560
|
+
{
|
|
2561
|
+
ref,
|
|
2562
|
+
className: cn("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50", className),
|
|
2563
|
+
...props
|
|
2564
|
+
}
|
|
2565
|
+
)
|
|
2566
|
+
);
|
|
2567
|
+
TableRow.displayName = "TableRow";
|
|
2568
|
+
var TableHead = React36.forwardRef(
|
|
2569
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
2570
|
+
"th",
|
|
2571
|
+
{
|
|
2572
|
+
ref,
|
|
2573
|
+
className: cn(
|
|
2574
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
2575
|
+
className
|
|
2576
|
+
),
|
|
2577
|
+
...props
|
|
2578
|
+
}
|
|
2579
|
+
)
|
|
2580
|
+
);
|
|
2581
|
+
TableHead.displayName = "TableHead";
|
|
2582
|
+
var TableCell = React36.forwardRef(
|
|
2583
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
|
|
2584
|
+
);
|
|
2585
|
+
TableCell.displayName = "TableCell";
|
|
2586
|
+
var TableCaption = React36.forwardRef(
|
|
2587
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx40("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
|
|
2588
|
+
);
|
|
2589
|
+
TableCaption.displayName = "TableCaption";
|
|
2590
|
+
|
|
2591
|
+
// src/components/ui/tabs.tsx
|
|
2592
|
+
import * as React37 from "react";
|
|
2593
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2594
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2595
|
+
var Tabs = TabsPrimitive.Root;
|
|
2596
|
+
var TabsList = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2597
|
+
TabsPrimitive.List,
|
|
2598
|
+
{
|
|
2599
|
+
ref,
|
|
2600
|
+
className: cn(
|
|
2601
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
2602
|
+
className
|
|
2603
|
+
),
|
|
2604
|
+
...props
|
|
2605
|
+
}
|
|
2606
|
+
));
|
|
2607
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2608
|
+
var TabsTrigger = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2609
|
+
TabsPrimitive.Trigger,
|
|
2610
|
+
{
|
|
2611
|
+
ref,
|
|
2612
|
+
className: cn(
|
|
2613
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
2614
|
+
className
|
|
2615
|
+
),
|
|
2616
|
+
...props
|
|
2617
|
+
}
|
|
2618
|
+
));
|
|
2619
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2620
|
+
var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2621
|
+
TabsPrimitive.Content,
|
|
2622
|
+
{
|
|
2623
|
+
ref,
|
|
2624
|
+
className: cn(
|
|
2625
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2626
|
+
className
|
|
2627
|
+
),
|
|
2628
|
+
...props
|
|
2629
|
+
}
|
|
2630
|
+
));
|
|
2631
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2632
|
+
|
|
2633
|
+
// src/components/ui/textarea.tsx
|
|
2634
|
+
import * as React38 from "react";
|
|
2635
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2636
|
+
var Textarea = React38.forwardRef(({ className, ...props }, ref) => {
|
|
2637
|
+
return /* @__PURE__ */ jsx42(
|
|
2638
|
+
"textarea",
|
|
2639
|
+
{
|
|
2640
|
+
className: cn(
|
|
2641
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2642
|
+
className
|
|
2643
|
+
),
|
|
2644
|
+
ref,
|
|
2645
|
+
...props
|
|
2646
|
+
}
|
|
2647
|
+
);
|
|
2648
|
+
});
|
|
2649
|
+
Textarea.displayName = "Textarea";
|
|
2650
|
+
|
|
2651
|
+
// src/components/ui/toast.tsx
|
|
2652
|
+
import * as React39 from "react";
|
|
2653
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
2654
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
2655
|
+
import { X as X3 } from "lucide-react";
|
|
2656
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2657
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
2658
|
+
var ToastViewport = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
2659
|
+
ToastPrimitives.Viewport,
|
|
2660
|
+
{
|
|
2661
|
+
ref,
|
|
2662
|
+
className: cn(
|
|
2663
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
2664
|
+
className
|
|
2665
|
+
),
|
|
2666
|
+
...props
|
|
2667
|
+
}
|
|
2668
|
+
));
|
|
2669
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
2670
|
+
var toastVariants = cva8(
|
|
2671
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2672
|
+
{
|
|
2673
|
+
variants: {
|
|
2674
|
+
variant: {
|
|
2675
|
+
default: "border bg-background text-foreground",
|
|
2676
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
2677
|
+
}
|
|
2678
|
+
},
|
|
2679
|
+
defaultVariants: {
|
|
2680
|
+
variant: "default"
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
);
|
|
2684
|
+
var Toast = React39.forwardRef(({ className, variant, ...props }, ref) => {
|
|
2685
|
+
return /* @__PURE__ */ jsx43(ToastPrimitives.Root, { ref, className: cn(toastVariants({ variant }), className), ...props });
|
|
2686
|
+
});
|
|
2687
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
2688
|
+
var ToastAction = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
2689
|
+
ToastPrimitives.Action,
|
|
2690
|
+
{
|
|
2691
|
+
ref,
|
|
2692
|
+
className: cn(
|
|
2693
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",
|
|
2694
|
+
className
|
|
2695
|
+
),
|
|
2696
|
+
...props
|
|
2697
|
+
}
|
|
2698
|
+
));
|
|
2699
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
2700
|
+
var ToastClose = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
2701
|
+
ToastPrimitives.Close,
|
|
2702
|
+
{
|
|
2703
|
+
ref,
|
|
2704
|
+
className: cn(
|
|
2705
|
+
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
2706
|
+
className
|
|
2707
|
+
),
|
|
2708
|
+
"toast-close": "",
|
|
2709
|
+
...props,
|
|
2710
|
+
children: /* @__PURE__ */ jsx43(X3, { className: "h-4 w-4" })
|
|
2711
|
+
}
|
|
2712
|
+
));
|
|
2713
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
2714
|
+
var ToastTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(ToastPrimitives.Title, { ref, className: cn("text-sm font-semibold", className), ...props }));
|
|
2715
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
2716
|
+
var ToastDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(ToastPrimitives.Description, { ref, className: cn("text-sm opacity-90", className), ...props }));
|
|
2717
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
2718
|
+
|
|
2719
|
+
// src/hooks/use-toast.ts
|
|
2720
|
+
import * as React40 from "react";
|
|
2721
|
+
var TOAST_LIMIT = 1;
|
|
2722
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
2723
|
+
var count = 0;
|
|
2724
|
+
function genId() {
|
|
2725
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
2726
|
+
return count.toString();
|
|
2727
|
+
}
|
|
2728
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
2729
|
+
var addToRemoveQueue = (toastId) => {
|
|
2730
|
+
if (toastTimeouts.has(toastId)) return;
|
|
2731
|
+
const timeout = setTimeout(() => {
|
|
2732
|
+
toastTimeouts.delete(toastId);
|
|
2733
|
+
dispatch({ type: "REMOVE_TOAST", toastId });
|
|
2734
|
+
}, TOAST_REMOVE_DELAY);
|
|
2735
|
+
toastTimeouts.set(toastId, timeout);
|
|
2736
|
+
};
|
|
2737
|
+
var reducer = (state, action) => {
|
|
2738
|
+
switch (action.type) {
|
|
2739
|
+
case "ADD_TOAST":
|
|
2740
|
+
return { ...state, toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT) };
|
|
2741
|
+
case "UPDATE_TOAST":
|
|
2742
|
+
return {
|
|
2743
|
+
...state,
|
|
2744
|
+
toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t)
|
|
2745
|
+
};
|
|
2746
|
+
case "DISMISS_TOAST": {
|
|
2747
|
+
const { toastId } = action;
|
|
2748
|
+
if (toastId) {
|
|
2749
|
+
addToRemoveQueue(toastId);
|
|
2750
|
+
} else {
|
|
2751
|
+
state.toasts.forEach((toast3) => addToRemoveQueue(toast3.id));
|
|
2752
|
+
}
|
|
2753
|
+
return {
|
|
2754
|
+
...state,
|
|
2755
|
+
toasts: state.toasts.map(
|
|
2756
|
+
(t) => t.id === toastId || toastId === void 0 ? { ...t, open: false } : t
|
|
2757
|
+
)
|
|
2758
|
+
};
|
|
2759
|
+
}
|
|
2760
|
+
case "REMOVE_TOAST":
|
|
2761
|
+
if (action.toastId === void 0) return { ...state, toasts: [] };
|
|
2762
|
+
return { ...state, toasts: state.toasts.filter((t) => t.id !== action.toastId) };
|
|
2763
|
+
}
|
|
2764
|
+
};
|
|
2765
|
+
var listeners = [];
|
|
2766
|
+
var memoryState = { toasts: [] };
|
|
2767
|
+
function dispatch(action) {
|
|
2768
|
+
memoryState = reducer(memoryState, action);
|
|
2769
|
+
listeners.forEach((listener) => listener(memoryState));
|
|
2770
|
+
}
|
|
2771
|
+
function toast2({ ...props }) {
|
|
2772
|
+
const id = genId();
|
|
2773
|
+
const update = (props2) => dispatch({ type: "UPDATE_TOAST", toast: { ...props2, id } });
|
|
2774
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
2775
|
+
dispatch({
|
|
2776
|
+
type: "ADD_TOAST",
|
|
2777
|
+
toast: {
|
|
2778
|
+
...props,
|
|
2779
|
+
id,
|
|
2780
|
+
open: true,
|
|
2781
|
+
onOpenChange: (open) => {
|
|
2782
|
+
if (!open) dismiss();
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
});
|
|
2786
|
+
return { id, dismiss, update };
|
|
2787
|
+
}
|
|
2788
|
+
function useToast() {
|
|
2789
|
+
const [state, setState] = React40.useState(memoryState);
|
|
2790
|
+
React40.useEffect(() => {
|
|
2791
|
+
listeners.push(setState);
|
|
2792
|
+
return () => {
|
|
2793
|
+
const index = listeners.indexOf(setState);
|
|
2794
|
+
if (index > -1) listeners.splice(index, 1);
|
|
2795
|
+
};
|
|
2796
|
+
}, [state]);
|
|
2797
|
+
return {
|
|
2798
|
+
...state,
|
|
2799
|
+
toast: toast2,
|
|
2800
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
// src/components/ui/toaster.tsx
|
|
2805
|
+
import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2806
|
+
function Toaster2() {
|
|
2807
|
+
const { toasts } = useToast();
|
|
2808
|
+
return /* @__PURE__ */ jsxs20(ToastProvider, { children: [
|
|
2809
|
+
toasts.map(function({ id, title, description, action, ...props }) {
|
|
2810
|
+
return /* @__PURE__ */ jsxs20(Toast, { ...props, children: [
|
|
2811
|
+
/* @__PURE__ */ jsxs20("div", { className: "grid gap-1", children: [
|
|
2812
|
+
title && /* @__PURE__ */ jsx44(ToastTitle, { children: title }),
|
|
2813
|
+
description && /* @__PURE__ */ jsx44(ToastDescription, { children: description })
|
|
2814
|
+
] }),
|
|
2815
|
+
action,
|
|
2816
|
+
/* @__PURE__ */ jsx44(ToastClose, {})
|
|
2817
|
+
] }, id);
|
|
2818
|
+
}),
|
|
2819
|
+
/* @__PURE__ */ jsx44(ToastViewport, {})
|
|
2820
|
+
] });
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
// src/components/ui/toggle-group.tsx
|
|
2824
|
+
import * as React42 from "react";
|
|
2825
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
2826
|
+
|
|
2827
|
+
// src/components/ui/toggle.tsx
|
|
2828
|
+
import * as React41 from "react";
|
|
2829
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
2830
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
2831
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2832
|
+
var toggleVariants = cva9(
|
|
2833
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
2834
|
+
{
|
|
2835
|
+
variants: {
|
|
2836
|
+
variant: {
|
|
2837
|
+
default: "bg-transparent",
|
|
2838
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
2839
|
+
},
|
|
2840
|
+
size: {
|
|
2841
|
+
default: "h-10 px-3",
|
|
2842
|
+
sm: "h-9 px-2.5",
|
|
2843
|
+
lg: "h-11 px-5"
|
|
2844
|
+
}
|
|
2845
|
+
},
|
|
2846
|
+
defaultVariants: {
|
|
2847
|
+
variant: "default",
|
|
2848
|
+
size: "default"
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
);
|
|
2852
|
+
var Toggle = React41.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx45(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
2853
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
2854
|
+
|
|
2855
|
+
// src/components/ui/toggle-group.tsx
|
|
2856
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2857
|
+
var ToggleGroupContext = React42.createContext({
|
|
2858
|
+
size: "default",
|
|
2859
|
+
variant: "default"
|
|
2860
|
+
});
|
|
2861
|
+
var ToggleGroup = React42.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx46(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx46(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
|
|
2862
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
2863
|
+
var ToggleGroupItem = React42.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
2864
|
+
const context = React42.useContext(ToggleGroupContext);
|
|
2865
|
+
return /* @__PURE__ */ jsx46(
|
|
2866
|
+
ToggleGroupPrimitive.Item,
|
|
2867
|
+
{
|
|
2868
|
+
ref,
|
|
2869
|
+
className: cn(
|
|
2870
|
+
toggleVariants({
|
|
2871
|
+
variant: context.variant || variant,
|
|
2872
|
+
size: context.size || size
|
|
2873
|
+
}),
|
|
2874
|
+
className
|
|
2875
|
+
),
|
|
2876
|
+
...props,
|
|
2877
|
+
children
|
|
2878
|
+
}
|
|
2879
|
+
);
|
|
2880
|
+
});
|
|
2881
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
2882
|
+
export {
|
|
2883
|
+
Accordion,
|
|
2884
|
+
AccordionContent,
|
|
2885
|
+
AccordionItem,
|
|
2886
|
+
AccordionTrigger,
|
|
2887
|
+
Alert,
|
|
2888
|
+
AlertDescription,
|
|
2889
|
+
AlertDialog,
|
|
2890
|
+
AlertDialogAction,
|
|
2891
|
+
AlertDialogCancel,
|
|
2892
|
+
AlertDialogContent,
|
|
2893
|
+
AlertDialogDescription,
|
|
2894
|
+
AlertDialogFooter,
|
|
2895
|
+
AlertDialogHeader,
|
|
2896
|
+
AlertDialogOverlay,
|
|
2897
|
+
AlertDialogPortal,
|
|
2898
|
+
AlertDialogTitle,
|
|
2899
|
+
AlertDialogTrigger,
|
|
2900
|
+
AlertTitle,
|
|
2901
|
+
AspectRatio,
|
|
2902
|
+
Avatar,
|
|
2903
|
+
AvatarFallback,
|
|
2904
|
+
AvatarImage,
|
|
2905
|
+
Badge,
|
|
2906
|
+
Breadcrumb,
|
|
2907
|
+
BreadcrumbEllipsis,
|
|
2908
|
+
BreadcrumbItem,
|
|
2909
|
+
BreadcrumbLink,
|
|
2910
|
+
BreadcrumbList,
|
|
2911
|
+
BreadcrumbPage,
|
|
2912
|
+
BreadcrumbSeparator,
|
|
2913
|
+
Button,
|
|
2914
|
+
Calendar,
|
|
2915
|
+
Card,
|
|
2916
|
+
CardContent,
|
|
2917
|
+
CardDescription,
|
|
2918
|
+
CardFooter,
|
|
2919
|
+
CardHeader,
|
|
2920
|
+
CardTitle,
|
|
2921
|
+
Carousel,
|
|
2922
|
+
CarouselContent,
|
|
2923
|
+
CarouselItem,
|
|
2924
|
+
CarouselNext,
|
|
2925
|
+
CarouselPrevious,
|
|
2926
|
+
ChartContainer,
|
|
2927
|
+
ChartLegend,
|
|
2928
|
+
ChartLegendContent,
|
|
2929
|
+
ChartStyle,
|
|
2930
|
+
ChartTooltip,
|
|
2931
|
+
ChartTooltipContent,
|
|
2932
|
+
Checkbox,
|
|
2933
|
+
Collapsible,
|
|
2934
|
+
CollapsibleContent2 as CollapsibleContent,
|
|
2935
|
+
CollapsibleTrigger2 as CollapsibleTrigger,
|
|
2936
|
+
Command,
|
|
2937
|
+
CommandDialog,
|
|
2938
|
+
CommandEmpty,
|
|
2939
|
+
CommandGroup,
|
|
2940
|
+
CommandInput,
|
|
2941
|
+
CommandItem,
|
|
2942
|
+
CommandList,
|
|
2943
|
+
CommandSeparator,
|
|
2944
|
+
CommandShortcut,
|
|
2945
|
+
ContextMenu,
|
|
2946
|
+
ContextMenuCheckboxItem,
|
|
2947
|
+
ContextMenuContent,
|
|
2948
|
+
ContextMenuGroup,
|
|
2949
|
+
ContextMenuItem,
|
|
2950
|
+
ContextMenuLabel,
|
|
2951
|
+
ContextMenuPortal,
|
|
2952
|
+
ContextMenuRadioGroup,
|
|
2953
|
+
ContextMenuRadioItem,
|
|
2954
|
+
ContextMenuSeparator,
|
|
2955
|
+
ContextMenuShortcut,
|
|
2956
|
+
ContextMenuSub,
|
|
2957
|
+
ContextMenuSubContent,
|
|
2958
|
+
ContextMenuSubTrigger,
|
|
2959
|
+
ContextMenuTrigger,
|
|
2960
|
+
Dialog,
|
|
2961
|
+
DialogClose,
|
|
2962
|
+
DialogContent,
|
|
2963
|
+
DialogDescription,
|
|
2964
|
+
DialogFooter,
|
|
2965
|
+
DialogHeader,
|
|
2966
|
+
DialogOverlay,
|
|
2967
|
+
DialogPortal,
|
|
2968
|
+
DialogTitle,
|
|
2969
|
+
DialogTrigger,
|
|
2970
|
+
Drawer,
|
|
2971
|
+
DrawerClose,
|
|
2972
|
+
DrawerContent,
|
|
2973
|
+
DrawerDescription,
|
|
2974
|
+
DrawerFooter,
|
|
2975
|
+
DrawerHeader,
|
|
2976
|
+
DrawerOverlay,
|
|
2977
|
+
DrawerPortal,
|
|
2978
|
+
DrawerTitle,
|
|
2979
|
+
DrawerTrigger,
|
|
2980
|
+
DropdownMenu,
|
|
2981
|
+
DropdownMenuCheckboxItem,
|
|
2982
|
+
DropdownMenuContent,
|
|
2983
|
+
DropdownMenuGroup,
|
|
2984
|
+
DropdownMenuItem,
|
|
2985
|
+
DropdownMenuLabel,
|
|
2986
|
+
DropdownMenuPortal,
|
|
2987
|
+
DropdownMenuRadioGroup,
|
|
2988
|
+
DropdownMenuRadioItem,
|
|
2989
|
+
DropdownMenuSeparator,
|
|
2990
|
+
DropdownMenuShortcut,
|
|
2991
|
+
DropdownMenuSub,
|
|
2992
|
+
DropdownMenuSubContent,
|
|
2993
|
+
DropdownMenuSubTrigger,
|
|
2994
|
+
DropdownMenuTrigger,
|
|
2995
|
+
Form,
|
|
2996
|
+
FormControl,
|
|
2997
|
+
FormDescription,
|
|
2998
|
+
FormField,
|
|
2999
|
+
FormItem,
|
|
3000
|
+
FormLabel,
|
|
3001
|
+
FormMessage,
|
|
3002
|
+
HoverCard,
|
|
3003
|
+
HoverCardContent,
|
|
3004
|
+
HoverCardTrigger,
|
|
3005
|
+
Input,
|
|
3006
|
+
InputOTP,
|
|
3007
|
+
InputOTPGroup,
|
|
3008
|
+
InputOTPSeparator,
|
|
3009
|
+
InputOTPSlot,
|
|
3010
|
+
Label3 as Label,
|
|
3011
|
+
Menubar,
|
|
3012
|
+
MenubarCheckboxItem,
|
|
3013
|
+
MenubarContent,
|
|
3014
|
+
MenubarGroup,
|
|
3015
|
+
MenubarItem,
|
|
3016
|
+
MenubarLabel,
|
|
3017
|
+
MenubarMenu,
|
|
3018
|
+
MenubarPortal,
|
|
3019
|
+
MenubarRadioGroup,
|
|
3020
|
+
MenubarRadioItem,
|
|
3021
|
+
MenubarSeparator,
|
|
3022
|
+
MenubarShortcut,
|
|
3023
|
+
MenubarSub,
|
|
3024
|
+
MenubarSubContent,
|
|
3025
|
+
MenubarSubTrigger,
|
|
3026
|
+
MenubarTrigger,
|
|
3027
|
+
NavigationMenu,
|
|
3028
|
+
NavigationMenuContent,
|
|
3029
|
+
NavigationMenuIndicator,
|
|
3030
|
+
NavigationMenuItem,
|
|
3031
|
+
NavigationMenuLink,
|
|
3032
|
+
NavigationMenuList,
|
|
3033
|
+
NavigationMenuTrigger,
|
|
3034
|
+
NavigationMenuViewport,
|
|
3035
|
+
Pagination,
|
|
3036
|
+
PaginationContent,
|
|
3037
|
+
PaginationEllipsis,
|
|
3038
|
+
PaginationItem,
|
|
3039
|
+
PaginationLink,
|
|
3040
|
+
PaginationNext,
|
|
3041
|
+
PaginationPrevious,
|
|
3042
|
+
Popover,
|
|
3043
|
+
PopoverContent,
|
|
3044
|
+
PopoverTrigger,
|
|
3045
|
+
Progress,
|
|
3046
|
+
RadioGroup4 as RadioGroup,
|
|
3047
|
+
RadioGroupItem,
|
|
3048
|
+
ResizableHandle,
|
|
3049
|
+
ResizablePanel,
|
|
3050
|
+
ResizablePanelGroup,
|
|
3051
|
+
ScrollArea,
|
|
3052
|
+
ScrollBar,
|
|
3053
|
+
Select,
|
|
3054
|
+
SelectContent,
|
|
3055
|
+
SelectGroup,
|
|
3056
|
+
SelectItem,
|
|
3057
|
+
SelectLabel,
|
|
3058
|
+
SelectScrollDownButton,
|
|
3059
|
+
SelectScrollUpButton,
|
|
3060
|
+
SelectSeparator,
|
|
3061
|
+
SelectTrigger,
|
|
3062
|
+
SelectValue,
|
|
3063
|
+
Separator5 as Separator,
|
|
3064
|
+
Sheet,
|
|
3065
|
+
SheetClose,
|
|
3066
|
+
SheetContent,
|
|
3067
|
+
SheetDescription,
|
|
3068
|
+
SheetFooter,
|
|
3069
|
+
SheetHeader,
|
|
3070
|
+
SheetOverlay,
|
|
3071
|
+
SheetPortal,
|
|
3072
|
+
SheetTitle,
|
|
3073
|
+
SheetTrigger,
|
|
3074
|
+
Sidebar,
|
|
3075
|
+
SidebarContent,
|
|
3076
|
+
SidebarFooter,
|
|
3077
|
+
SidebarGroup,
|
|
3078
|
+
SidebarGroupAction,
|
|
3079
|
+
SidebarGroupContent,
|
|
3080
|
+
SidebarGroupLabel,
|
|
3081
|
+
SidebarHeader,
|
|
3082
|
+
SidebarInput,
|
|
3083
|
+
SidebarInset,
|
|
3084
|
+
SidebarMenu,
|
|
3085
|
+
SidebarMenuAction,
|
|
3086
|
+
SidebarMenuBadge,
|
|
3087
|
+
SidebarMenuButton,
|
|
3088
|
+
SidebarMenuItem,
|
|
3089
|
+
SidebarMenuSkeleton,
|
|
3090
|
+
SidebarMenuSub,
|
|
3091
|
+
SidebarMenuSubButton,
|
|
3092
|
+
SidebarMenuSubItem,
|
|
3093
|
+
SidebarProvider,
|
|
3094
|
+
SidebarRail,
|
|
3095
|
+
SidebarSeparator,
|
|
3096
|
+
SidebarTrigger,
|
|
3097
|
+
Skeleton,
|
|
3098
|
+
Slider,
|
|
3099
|
+
Toaster as Sonner,
|
|
3100
|
+
Switch,
|
|
3101
|
+
Table,
|
|
3102
|
+
TableBody,
|
|
3103
|
+
TableCaption,
|
|
3104
|
+
TableCell,
|
|
3105
|
+
TableFooter,
|
|
3106
|
+
TableHead,
|
|
3107
|
+
TableHeader,
|
|
3108
|
+
TableRow,
|
|
3109
|
+
Tabs,
|
|
3110
|
+
TabsContent,
|
|
3111
|
+
TabsList,
|
|
3112
|
+
TabsTrigger,
|
|
3113
|
+
Textarea,
|
|
3114
|
+
Toast,
|
|
3115
|
+
ToastAction,
|
|
3116
|
+
ToastClose,
|
|
3117
|
+
ToastDescription,
|
|
3118
|
+
ToastProvider,
|
|
3119
|
+
ToastTitle,
|
|
3120
|
+
ToastViewport,
|
|
3121
|
+
Toaster2 as Toaster,
|
|
3122
|
+
Toggle,
|
|
3123
|
+
ToggleGroup,
|
|
3124
|
+
ToggleGroupItem,
|
|
3125
|
+
Tooltip2 as Tooltip,
|
|
3126
|
+
TooltipContent,
|
|
3127
|
+
TooltipProvider,
|
|
3128
|
+
TooltipTrigger,
|
|
3129
|
+
badgeVariants,
|
|
3130
|
+
buttonVariants,
|
|
3131
|
+
cn,
|
|
3132
|
+
navigationMenuTriggerStyle,
|
|
3133
|
+
toast as sonnerToast,
|
|
3134
|
+
toast2 as toastFn,
|
|
3135
|
+
toggleVariants,
|
|
3136
|
+
useFormField,
|
|
3137
|
+
useSidebar,
|
|
3138
|
+
useToast
|
|
3139
|
+
};
|
|
3140
|
+
//# sourceMappingURL=index.js.map
|