@hai3/uikit 0.1.0-alpha.6 → 0.1.0-alpha.8

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