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