@moontra/moonui 0.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,30 @@
1
- // src/lib/utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import * as React32 from 'react';
4
+ import { createContext, useContext, useState, useMemo, useEffect } from 'react';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+ import { cva } from 'class-variance-authority';
7
+ import * as LabelPrimitive from '@radix-ui/react-label';
8
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
9
+ import * as SelectPrimitive from '@radix-ui/react-select';
10
+ import { ChevronDown, ChevronUp, Check, Loader2, X, Info, AlertCircle, AlertTriangle, Minus, Circle, MoreHorizontal, Search, ChevronRight, ChevronLeft } from 'lucide-react';
11
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
12
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
13
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
14
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
15
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
16
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
17
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
18
+ import 'react-dom';
19
+ import { createSlot } from '@radix-ui/react-slot';
20
+ import * as SliderPrimitive from '@radix-ui/react-slider';
21
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
22
+ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
23
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
24
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
25
+
26
+ /** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
27
+
4
28
  function cn(...inputs) {
5
29
  return twMerge(clsx(inputs));
6
30
  }
@@ -44,30 +68,289 @@ function combineRefs(...refs) {
44
68
  });
45
69
  };
46
70
  }
47
-
48
- // src/components/ui/button.tsx
49
- import * as React from "react";
50
- import { cva } from "class-variance-authority";
51
- import { jsx } from "react/jsx-runtime";
71
+ var modernTheme = {
72
+ borderRadius: {
73
+ sm: "0.5rem",
74
+ md: "0.75rem",
75
+ lg: "1rem",
76
+ full: "9999px"
77
+ },
78
+ colors: {
79
+ primary: "hsl(250, 95%, 64%)",
80
+ secondary: "hsl(250, 70%, 80%)",
81
+ success: "hsl(142, 71%, 45%)",
82
+ warning: "hsl(38, 92%, 50%)",
83
+ error: "hsl(0, 84%, 60%)",
84
+ background: "hsl(0, 0%, 100%)",
85
+ foreground: "hsl(221, 39%, 11%)",
86
+ card: "hsl(0, 0%, 100%)",
87
+ cardForeground: "hsl(221, 39%, 11%)",
88
+ border: "hsl(210, 20%, 90%)",
89
+ muted: "hsl(210, 20%, 96%)",
90
+ mutedForeground: "hsl(215, 16%, 47%)",
91
+ accent: "hsl(328, 85%, 70%)",
92
+ accentForeground: "hsl(210, 20%, 98%)"
93
+ }
94
+ };
95
+ var roundedTheme = {
96
+ borderRadius: {
97
+ sm: "1rem",
98
+ md: "1.25rem",
99
+ lg: "1.5rem",
100
+ full: "9999px"
101
+ }
102
+ };
103
+ var minimalTheme = {
104
+ borderRadius: {
105
+ sm: "0.125rem",
106
+ md: "0.25rem",
107
+ lg: "0.375rem",
108
+ full: "9999px"
109
+ },
110
+ colors: {
111
+ primary: "hsl(220, 14%, 40%)",
112
+ secondary: "hsl(220, 9%, 60%)",
113
+ success: "hsl(142, 71%, 45%)",
114
+ warning: "hsl(38, 92%, 50%)",
115
+ error: "hsl(0, 84%, 60%)",
116
+ background: "hsl(0, 0%, 100%)",
117
+ foreground: "hsl(221, 39%, 11%)",
118
+ card: "hsl(0, 0%, 100%)",
119
+ cardForeground: "hsl(221, 39%, 11%)",
120
+ border: "hsl(220, 13%, 91%)",
121
+ muted: "hsl(220, 14%, 96%)",
122
+ mutedForeground: "hsl(215, 16%, 47%)",
123
+ accent: "hsl(210, 20%, 96%)",
124
+ accentForeground: "hsl(221, 39%, 11%)"
125
+ }
126
+ };
127
+ var defaultLightTheme = {
128
+ colors: {
129
+ primary: "hsl(221, 83%, 53%)",
130
+ secondary: "hsl(215, 20%, 65%)",
131
+ success: "hsl(142, 71%, 45%)",
132
+ warning: "hsl(38, 92%, 50%)",
133
+ error: "hsl(0, 84%, 60%)",
134
+ background: "hsl(0, 0%, 100%)",
135
+ foreground: "hsl(221, 39%, 11%)",
136
+ card: "hsl(0, 0%, 100%)",
137
+ cardForeground: "hsl(221, 39%, 11%)",
138
+ border: "hsl(210, 20%, 90%)",
139
+ muted: "hsl(210, 20%, 96%)",
140
+ mutedForeground: "hsl(215, 16%, 47%)",
141
+ accent: "hsl(210, 20%, 96%)",
142
+ accentForeground: "hsl(221, 39%, 11%)"
143
+ },
144
+ borderRadius: {
145
+ sm: "0.25rem",
146
+ md: "0.375rem",
147
+ lg: "0.5rem",
148
+ full: "9999px"
149
+ },
150
+ fontSizes: {
151
+ xs: "0.75rem",
152
+ sm: "0.875rem",
153
+ base: "1rem",
154
+ lg: "1.125rem",
155
+ xl: "1.25rem",
156
+ "2xl": "1.5rem",
157
+ "3xl": "1.875rem"
158
+ },
159
+ spacing: {
160
+ 1: "0.25rem",
161
+ 2: "0.5rem",
162
+ 4: "1rem",
163
+ 6: "1.5rem",
164
+ 8: "2rem"
165
+ }
166
+ };
167
+ var defaultDarkTheme = {
168
+ ...defaultLightTheme,
169
+ colors: {
170
+ primary: "hsl(221, 83%, 53%)",
171
+ secondary: "hsl(215, 20%, 65%)",
172
+ success: "hsl(142, 71%, 45%)",
173
+ warning: "hsl(38, 92%, 50%)",
174
+ error: "hsl(0, 84%, 60%)",
175
+ background: "hsl(221, 39%, 11%)",
176
+ foreground: "hsl(210, 20%, 98%)",
177
+ card: "hsl(220, 26%, 14%)",
178
+ cardForeground: "hsl(210, 20%, 98%)",
179
+ border: "hsl(215, 28%, 17%)",
180
+ muted: "hsl(215, 27%, 16%)",
181
+ mutedForeground: "hsl(215, 16%, 57%)",
182
+ accent: "hsl(215, 27%, 16%)",
183
+ accentForeground: "hsl(210, 20%, 98%)"
184
+ }
185
+ };
186
+ var ThemeContext = createContext(void 0);
187
+ var getPresetTheme = (preset) => {
188
+ switch (preset) {
189
+ case "modern":
190
+ return modernTheme;
191
+ case "rounded":
192
+ return roundedTheme;
193
+ case "minimal":
194
+ return minimalTheme;
195
+ default:
196
+ return {};
197
+ }
198
+ };
199
+ var ThemeProvider = ({
200
+ children,
201
+ defaultColorMode = "light",
202
+ preset = "default",
203
+ lightTheme = {},
204
+ darkTheme = {},
205
+ extensions = {}
206
+ }) => {
207
+ const [colorMode, setColorMode] = useState(defaultColorMode);
208
+ const presetThemeValues = getPresetTheme(preset);
209
+ const [customLightTheme, setCustomLightTheme] = useState({
210
+ ...defaultLightTheme,
211
+ ...presetThemeValues,
212
+ ...lightTheme,
213
+ colors: {
214
+ ...defaultLightTheme.colors,
215
+ ...presetThemeValues.colors || {},
216
+ ...lightTheme.colors || {}
217
+ },
218
+ extensions
219
+ });
220
+ const [customDarkTheme, setCustomDarkTheme] = useState({
221
+ ...defaultDarkTheme,
222
+ ...presetThemeValues,
223
+ ...darkTheme,
224
+ colors: {
225
+ ...defaultDarkTheme.colors,
226
+ ...presetThemeValues.colors || {},
227
+ ...darkTheme.colors || {}
228
+ },
229
+ extensions
230
+ });
231
+ const theme = useMemo(() => {
232
+ return colorMode === "light" ? customLightTheme : customDarkTheme;
233
+ }, [colorMode, customLightTheme, customDarkTheme]);
234
+ const updateTheme = (config) => {
235
+ if (colorMode === "light") {
236
+ setCustomLightTheme((prev) => ({
237
+ ...prev,
238
+ ...config,
239
+ colors: {
240
+ ...prev.colors,
241
+ ...config.colors || {}
242
+ },
243
+ extensions: {
244
+ ...prev.extensions || {},
245
+ ...config.extensions || {}
246
+ }
247
+ }));
248
+ } else {
249
+ setCustomDarkTheme((prev) => ({
250
+ ...prev,
251
+ ...config,
252
+ colors: {
253
+ ...prev.colors,
254
+ ...config.colors || {}
255
+ },
256
+ extensions: {
257
+ ...prev.extensions || {},
258
+ ...config.extensions || {}
259
+ }
260
+ }));
261
+ }
262
+ };
263
+ const setThemePreset = (preset2) => {
264
+ const presetValues = getPresetTheme(preset2);
265
+ updateTheme({
266
+ ...presetValues,
267
+ colors: presetValues.colors
268
+ });
269
+ };
270
+ const value = {
271
+ theme,
272
+ colorMode,
273
+ setColorMode,
274
+ updateTheme,
275
+ setThemePreset
276
+ };
277
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
278
+ };
279
+ var useTheme = () => {
280
+ const context = useContext(ThemeContext);
281
+ if (context === void 0) {
282
+ throw new Error("useTheme must be used within a ThemeProvider");
283
+ }
284
+ return context;
285
+ };
286
+ var createCssVariables = (theme) => {
287
+ const variables = {};
288
+ Object.entries(theme.colors).forEach(([key, value]) => {
289
+ variables[`--color-${key}`] = value;
290
+ });
291
+ Object.entries(theme.borderRadius).forEach(([key, value]) => {
292
+ variables[`--radius-${key}`] = value;
293
+ });
294
+ Object.entries(theme.fontSizes).forEach(([key, value]) => {
295
+ variables[`--font-size-${key}`] = value;
296
+ });
297
+ Object.entries(theme.spacing).forEach(([key, value]) => {
298
+ variables[`--space-${key}`] = value;
299
+ });
300
+ if (theme.extensions) {
301
+ Object.entries(theme.extensions).forEach(([categoryKey, categoryValue]) => {
302
+ if (typeof categoryValue === "object" && categoryValue !== null) {
303
+ Object.entries(categoryValue).forEach(([key, value]) => {
304
+ variables[`--${categoryKey}-${key}`] = value;
305
+ });
306
+ } else if (typeof categoryValue === "string") {
307
+ variables[`--${categoryKey}`] = categoryValue;
308
+ }
309
+ });
310
+ }
311
+ return variables;
312
+ };
313
+ var CssVariablesInjector = () => {
314
+ const { theme } = useTheme();
315
+ useEffect(() => {
316
+ const variables = createCssVariables(theme);
317
+ const root = document.documentElement;
318
+ Object.entries(variables).forEach(([key, value]) => {
319
+ root.style.setProperty(key, value);
320
+ });
321
+ return () => {
322
+ Object.keys(variables).forEach((key) => {
323
+ root.style.removeProperty(key);
324
+ });
325
+ };
326
+ }, [theme]);
327
+ return null;
328
+ };
329
+ var ThemeProvider2 = (props) => {
330
+ return /* @__PURE__ */ jsxs(ThemeProvider, { ...props, children: [
331
+ /* @__PURE__ */ jsx(CssVariablesInjector, {}),
332
+ props.children
333
+ ] });
334
+ };
52
335
  var buttonVariants = cva(
53
- "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",
336
+ "inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
54
337
  {
55
338
  variants: {
56
339
  variant: {
57
- default: "bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",
58
- destructive: "bg-red-500 text-slate-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",
59
- outline: "border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",
60
- secondary: "bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",
61
- ghost: "hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",
62
- link: "text-slate-900 underline-offset-4 hover:underline dark:text-slate-50",
63
- primary: "bg-primary text-white hover:bg-primary/90",
64
- success: "bg-green-500 text-white hover:bg-green-600"
340
+ default: "bg-[var(--color-foreground)] text-[var(--color-background)] hover:bg-[var(--color-foreground)]/90",
341
+ destructive: "bg-[var(--color-error)] text-white hover:bg-[var(--color-error)]/90",
342
+ outline: "border border-[var(--color-border)] bg-[var(--color-background)] hover:bg-[var(--color-muted)] hover:text-[var(--color-foreground)]",
343
+ secondary: "bg-[var(--color-muted)] text-[var(--color-mutedForeground)] hover:bg-[var(--color-muted)]/80",
344
+ ghost: "hover:bg-[var(--color-muted)] hover:text-[var(--color-foreground)]",
345
+ link: "text-[var(--color-foreground)] underline-offset-4 hover:underline",
346
+ primary: "bg-[var(--color-primary)] text-white hover:bg-[var(--color-primary)]/90",
347
+ success: "bg-[var(--color-success)] text-white hover:bg-[var(--color-success)]/90"
65
348
  },
66
349
  size: {
67
- default: "h-10 px-4 py-2",
68
- sm: "h-9 rounded-md px-3",
69
- lg: "h-11 rounded-md px-8",
70
- icon: "h-10 w-10"
350
+ default: "h-10 px-4 py-2 rounded-[var(--radius-md)]",
351
+ sm: "h-9 rounded-[var(--radius-sm)] px-3 text-sm",
352
+ lg: "h-11 rounded-[var(--radius-lg)] px-8 text-base",
353
+ icon: "h-10 w-10 rounded-[var(--radius-md)]"
71
354
  }
72
355
  },
73
356
  defaultVariants: {
@@ -76,36 +359,36 @@ var buttonVariants = cva(
76
359
  }
77
360
  }
78
361
  );
79
- var Button = React.forwardRef(
362
+ var Button = React32.forwardRef(
80
363
  ({ className, variant, size, asChild = false, ...props }, ref) => {
81
- const Comp = asChild ? React.Fragment : "button";
364
+ const Comp = asChild ? React32.Fragment : "button";
82
365
  return /* @__PURE__ */ jsx(
83
366
  Comp,
84
367
  {
85
368
  className: cn(buttonVariants({ variant, size, className })),
86
369
  ref,
87
- ...props
370
+ ...props,
371
+ style: {
372
+ // Özel tema değişkenleri burada da kullanılabilir
373
+ ...props.style
374
+ }
88
375
  }
89
376
  );
90
377
  }
91
378
  );
92
379
  Button.displayName = "Button";
93
-
94
- // src/components/ui/badge.tsx
95
- import { cva as cva2 } from "class-variance-authority";
96
- import { jsx as jsx2 } from "react/jsx-runtime";
97
- var badgeVariants = cva2(
98
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
380
+ var badgeVariants = cva(
381
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
99
382
  {
100
383
  variants: {
101
384
  variant: {
102
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
103
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
104
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
105
- outline: "text-foreground",
106
- success: "border-transparent bg-green-500 text-white hover:bg-green-600",
107
- warning: "border-transparent bg-yellow-500 text-white hover:bg-yellow-600",
108
- info: "border-transparent bg-blue-500 text-white hover:bg-blue-600"
385
+ default: "border-transparent bg-[var(--color-primary)] text-white hover:bg-[var(--color-primary)]/80",
386
+ secondary: "border-transparent bg-[var(--color-secondary)] text-white hover:bg-[var(--color-secondary)]/80",
387
+ destructive: "border-transparent bg-[var(--color-error)] text-white hover:bg-[var(--color-error)]/80",
388
+ outline: "border-[var(--color-border)] bg-transparent text-[var(--color-foreground)]",
389
+ success: "border-transparent bg-[var(--color-success)] text-white hover:bg-[var(--color-success)]/80",
390
+ warning: "border-transparent bg-[var(--color-warning)] text-white hover:bg-[var(--color-warning)]/80",
391
+ info: "border-transparent bg-[var(--color-primary)] text-white hover:bg-[var(--color-primary)]/80"
109
392
  }
110
393
  },
111
394
  defaultVariants: {
@@ -114,25 +397,22 @@ var badgeVariants = cva2(
114
397
  }
115
398
  );
116
399
  function Badge({ className, variant, ...props }) {
117
- return /* @__PURE__ */ jsx2("div", { className: cn(badgeVariants({ variant }), className), ...props });
400
+ return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
118
401
  }
119
-
120
- // src/components/ui/card.tsx
121
- import * as React2 from "react";
122
- import { jsx as jsx3 } from "react/jsx-runtime";
123
- var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
402
+ var Card = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
124
403
  "div",
125
404
  {
126
405
  ref,
127
406
  className: cn(
128
- "rounded-lg border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
407
+ "rounded-lg border shadow-sm",
408
+ "border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-foreground)]",
129
409
  className
130
410
  ),
131
411
  ...props
132
412
  }
133
413
  ));
134
414
  Card.displayName = "Card";
135
- var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
415
+ var CardHeader = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
136
416
  "div",
137
417
  {
138
418
  ref,
@@ -141,7 +421,7 @@ var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
141
421
  }
142
422
  ));
143
423
  CardHeader.displayName = "CardHeader";
144
- var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
424
+ var CardTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
145
425
  "h3",
146
426
  {
147
427
  ref,
@@ -153,18 +433,18 @@ var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__
153
433
  }
154
434
  ));
155
435
  CardTitle.displayName = "CardTitle";
156
- var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
436
+ var CardDescription = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
157
437
  "p",
158
438
  {
159
439
  ref,
160
- className: cn("text-sm text-slate-500 dark:text-slate-400", className),
440
+ className: cn("text-sm text-[var(--color-muted-foreground)]", className),
161
441
  ...props
162
442
  }
163
443
  ));
164
444
  CardDescription.displayName = "CardDescription";
165
- var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3("div", { ref, className: cn("p-6 pt-0", className), ...props }));
445
+ var CardContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
166
446
  CardContent.displayName = "CardContent";
167
- var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
447
+ var CardFooter = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
168
448
  "div",
169
449
  {
170
450
  ref,
@@ -173,21 +453,3751 @@ var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
173
453
  }
174
454
  ));
175
455
  CardFooter.displayName = "CardFooter";
176
- export {
177
- Badge,
178
- Button,
179
- Card,
180
- CardContent,
181
- CardDescription,
182
- CardFooter,
183
- CardHeader,
184
- CardTitle,
185
- badgeVariants,
186
- buttonVariants,
187
- cn,
188
- combineRefs,
189
- debounce,
190
- formatCurrency,
191
- generateId,
192
- get
193
- };
456
+ var Input = React32.forwardRef(
457
+ ({ className, type, ...props }, ref) => {
458
+ return /* @__PURE__ */ jsx(
459
+ "input",
460
+ {
461
+ type,
462
+ className: cn(
463
+ "flex h-10 w-full rounded-[var(--radius-md)] border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium",
464
+ "border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-foreground)]",
465
+ "placeholder:text-[var(--color-muted-foreground)] focus-visible:outline-none focus-visible:ring-2",
466
+ "focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-background)]",
467
+ "disabled:cursor-not-allowed disabled:opacity-50",
468
+ className
469
+ ),
470
+ ref,
471
+ ...props
472
+ }
473
+ );
474
+ }
475
+ );
476
+ Input.displayName = "Input";
477
+ var Textarea = React32.forwardRef(
478
+ ({ className, ...props }, ref) => {
479
+ return /* @__PURE__ */ jsx(
480
+ "textarea",
481
+ {
482
+ className: cn(
483
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
484
+ className
485
+ ),
486
+ ref,
487
+ ...props
488
+ }
489
+ );
490
+ }
491
+ );
492
+ Textarea.displayName = "Textarea";
493
+ var labelVariants = cva(
494
+ "text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"
495
+ );
496
+ var Label = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
497
+ LabelPrimitive.Root,
498
+ {
499
+ ref,
500
+ className: cn(labelVariants(), className),
501
+ ...props
502
+ }
503
+ ));
504
+ Label.displayName = LabelPrimitive.Root.displayName;
505
+ var Separator = React32.forwardRef(
506
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
507
+ SeparatorPrimitive.Root,
508
+ {
509
+ ref,
510
+ decorative,
511
+ orientation,
512
+ className: cn(
513
+ "shrink-0 bg-border",
514
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
515
+ className
516
+ ),
517
+ ...props
518
+ }
519
+ )
520
+ );
521
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
522
+ var Select = SelectPrimitive.Root;
523
+ var SelectGroup = SelectPrimitive.Group;
524
+ var SelectValue = SelectPrimitive.Value;
525
+ var SelectTrigger = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
526
+ SelectPrimitive.Trigger,
527
+ {
528
+ ref,
529
+ className: cn(
530
+ "flex h-10 w-full items-center justify-between rounded-[var(--radius-md)] border px-3 py-2 text-sm [&>span]:line-clamp-1",
531
+ "border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-foreground)]",
532
+ "placeholder:text-[var(--color-muted-foreground)] focus:outline-none focus:ring-2",
533
+ "focus:ring-[var(--color-primary)] focus:ring-offset-2 focus:ring-offset-[var(--color-background)]",
534
+ "disabled:cursor-not-allowed disabled:opacity-50",
535
+ className
536
+ ),
537
+ ...props,
538
+ children: [
539
+ children,
540
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
541
+ ]
542
+ }
543
+ ));
544
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
545
+ var SelectScrollUpButton = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
546
+ SelectPrimitive.ScrollUpButton,
547
+ {
548
+ ref,
549
+ className: cn(
550
+ "flex cursor-default items-center justify-center py-1",
551
+ className
552
+ ),
553
+ ...props,
554
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
555
+ }
556
+ ));
557
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
558
+ var SelectScrollDownButton = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
559
+ SelectPrimitive.ScrollDownButton,
560
+ {
561
+ ref,
562
+ className: cn(
563
+ "flex cursor-default items-center justify-center py-1",
564
+ className
565
+ ),
566
+ ...props,
567
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
568
+ }
569
+ ));
570
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
571
+ var SelectContent = React32.forwardRef(({ className, children, position = "item-aligned", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
572
+ SelectPrimitive.Content,
573
+ {
574
+ ref,
575
+ className: cn(
576
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-[var(--radius-md)] border shadow-md",
577
+ "border-[var(--color-border)] bg-[var(--color-card)] text-[var(--color-foreground)]",
578
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
579
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
580
+ "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",
581
+ 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",
582
+ className
583
+ ),
584
+ position,
585
+ ...props,
586
+ children: [
587
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
588
+ /* @__PURE__ */ jsx(
589
+ SelectPrimitive.Viewport,
590
+ {
591
+ className: cn(
592
+ "p-1",
593
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
594
+ ),
595
+ children
596
+ }
597
+ ),
598
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
599
+ ]
600
+ }
601
+ ) }));
602
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
603
+ var SelectLabel = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
604
+ SelectPrimitive.Label,
605
+ {
606
+ ref,
607
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold text-[var(--color-foreground)]", className),
608
+ ...props
609
+ }
610
+ ));
611
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
612
+ var SelectItem = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
613
+ SelectPrimitive.Item,
614
+ {
615
+ ref,
616
+ className: cn(
617
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
618
+ "focus:bg-[var(--color-accent)] focus:text-[var(--color-accent-foreground)]",
619
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
620
+ className
621
+ ),
622
+ ...props,
623
+ children: [
624
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
625
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
626
+ ]
627
+ }
628
+ ));
629
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
630
+ var SelectSeparator = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
631
+ SelectPrimitive.Separator,
632
+ {
633
+ ref,
634
+ className: cn("-mx-1 my-1 h-px bg-[var(--color-border)]", className),
635
+ ...props
636
+ }
637
+ ));
638
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
639
+ var Switch = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
640
+ SwitchPrimitives.Root,
641
+ {
642
+ className: cn(
643
+ "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
644
+ "transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]",
645
+ "focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-background)]",
646
+ "disabled:cursor-not-allowed disabled:opacity-50",
647
+ "data-[state=checked]:bg-[var(--color-primary)] data-[state=unchecked]:bg-[var(--color-muted)]",
648
+ className
649
+ ),
650
+ ...props,
651
+ ref,
652
+ children: /* @__PURE__ */ jsx(
653
+ SwitchPrimitives.Thumb,
654
+ {
655
+ className: cn(
656
+ "pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform",
657
+ "bg-[var(--color-background)] data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
658
+ )
659
+ }
660
+ )
661
+ }
662
+ ));
663
+ Switch.displayName = SwitchPrimitives.Root.displayName;
664
+ var Dialog = DialogPrimitive.Root;
665
+ var DialogTrigger = DialogPrimitive.Trigger;
666
+ var DialogPortal = DialogPrimitive.Portal;
667
+ var DialogClose = DialogPrimitive.Close;
668
+ var overlayVariants = cva(
669
+ "fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
670
+ {
671
+ variants: {
672
+ variant: {
673
+ default: "bg-black/80",
674
+ subtle: "bg-black/60",
675
+ blur: "bg-black/40 backdrop-blur-md",
676
+ minimal: "bg-black/20 backdrop-blur-sm"
677
+ },
678
+ animation: {
679
+ default: "duration-200",
680
+ slow: "duration-300",
681
+ fast: "duration-100"
682
+ }
683
+ },
684
+ defaultVariants: {
685
+ variant: "default",
686
+ animation: "default"
687
+ }
688
+ }
689
+ );
690
+ var DialogOverlay = React32.forwardRef(({ className, variant, animation, ...props }, ref) => /* @__PURE__ */ jsx(
691
+ DialogPrimitive.Overlay,
692
+ {
693
+ ref,
694
+ className: cn(overlayVariants({ variant, animation }), className),
695
+ ...props
696
+ }
697
+ ));
698
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
699
+ var dialogContentVariants = cva(
700
+ "fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border shadow-lg bg-[var(--color-card)] text-[var(--color-foreground)]",
701
+ {
702
+ variants: {
703
+ variant: {
704
+ default: "border-[var(--color-border)]",
705
+ primary: "border-[var(--color-primary)]/20",
706
+ secondary: "border-[var(--color-secondary)]/20",
707
+ ghost: "border-transparent shadow-xl",
708
+ destructive: "border-[var(--color-error)]/20"
709
+ },
710
+ size: {
711
+ xs: "max-w-xs p-4",
712
+ sm: "max-w-sm p-5",
713
+ default: "max-w-lg p-6",
714
+ md: "max-w-md p-6",
715
+ lg: "max-w-2xl p-7",
716
+ xl: "max-w-4xl p-8",
717
+ full: "max-w-[95vw] max-h-[95vh] p-6"
718
+ },
719
+ radius: {
720
+ none: "rounded-none",
721
+ sm: "rounded-[var(--radius-sm)]",
722
+ default: "rounded-[var(--radius-md)]",
723
+ lg: "rounded-[var(--radius-lg)]",
724
+ xl: "rounded-2xl",
725
+ full: "rounded-[var(--radius-full)]"
726
+ },
727
+ animation: {
728
+ default: "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",
729
+ fade: "duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
730
+ zoom: "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",
731
+ slide: "duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
732
+ none: ""
733
+ },
734
+ position: {
735
+ default: "top-[50%]",
736
+ top: "top-[5%]",
737
+ bottom: "bottom-[5%] top-auto translate-y-0"
738
+ }
739
+ },
740
+ defaultVariants: {
741
+ variant: "default",
742
+ size: "default",
743
+ radius: "default",
744
+ animation: "default",
745
+ position: "default"
746
+ }
747
+ }
748
+ );
749
+ var DialogContent = React32.forwardRef(
750
+ ({
751
+ className,
752
+ children,
753
+ variant,
754
+ size,
755
+ radius,
756
+ animation,
757
+ position,
758
+ overlayVariant = "default",
759
+ overlayAnimation = "default",
760
+ hideCloseButton = false,
761
+ title,
762
+ description,
763
+ icon,
764
+ loading = false,
765
+ success = false,
766
+ onClose,
767
+ ...props
768
+ }, ref) => {
769
+ const handleClose = () => {
770
+ if (onClose) {
771
+ onClose();
772
+ }
773
+ };
774
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
775
+ /* @__PURE__ */ jsx(
776
+ DialogOverlay,
777
+ {
778
+ variant: overlayVariant,
779
+ animation: overlayAnimation
780
+ }
781
+ ),
782
+ /* @__PURE__ */ jsxs(
783
+ DialogPrimitive.Content,
784
+ {
785
+ ref,
786
+ className: cn(
787
+ dialogContentVariants({
788
+ variant,
789
+ size,
790
+ radius,
791
+ animation,
792
+ position
793
+ }),
794
+ className
795
+ ),
796
+ onEscapeKeyDown: onClose ? (e) => {
797
+ e.preventDefault();
798
+ handleClose();
799
+ } : void 0,
800
+ onPointerDownOutside: onClose ? (e) => {
801
+ e.preventDefault();
802
+ handleClose();
803
+ } : void 0,
804
+ ...props,
805
+ children: [
806
+ (title || description) && /* @__PURE__ */ jsxs(DialogHeader, { className: icon || loading || success ? "flex flex-row items-start gap-4" : "", children: [
807
+ (icon || loading || success) && /* @__PURE__ */ jsxs("div", { className: "rounded-full bg-[var(--color-accent)] p-2 flex-shrink-0", children: [
808
+ loading && /* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin text-[var(--color-primary)]" }),
809
+ success && !loading && /* @__PURE__ */ jsx(Check, { className: "h-5 w-5 text-[var(--color-success)]" }),
810
+ !loading && !success && icon && /* @__PURE__ */ jsx("span", { className: "text-[var(--color-primary)]", children: icon })
811
+ ] }),
812
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
813
+ title && /* @__PURE__ */ jsx(DialogTitle, { children: title }),
814
+ description && /* @__PURE__ */ jsx(DialogDescription, { children: description })
815
+ ] })
816
+ ] }),
817
+ children,
818
+ !hideCloseButton && /* @__PURE__ */ jsxs(
819
+ DialogPrimitive.Close,
820
+ {
821
+ onClick: handleClose,
822
+ className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/30 focus:ring-offset-2 disabled:pointer-events-none text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]",
823
+ children: [
824
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
825
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
826
+ ]
827
+ }
828
+ )
829
+ ]
830
+ }
831
+ )
832
+ ] });
833
+ }
834
+ );
835
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
836
+ var DialogHeader = ({
837
+ className,
838
+ ...props
839
+ }) => /* @__PURE__ */ jsx(
840
+ "div",
841
+ {
842
+ className: cn(
843
+ "flex flex-col space-y-2 text-center sm:text-left",
844
+ className
845
+ ),
846
+ ...props
847
+ }
848
+ );
849
+ DialogHeader.displayName = "DialogHeader";
850
+ var DialogFooter = ({
851
+ className,
852
+ ...props
853
+ }) => /* @__PURE__ */ jsx(
854
+ "div",
855
+ {
856
+ className: cn(
857
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",
858
+ className
859
+ ),
860
+ ...props
861
+ }
862
+ );
863
+ DialogFooter.displayName = "DialogFooter";
864
+ var DialogTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
865
+ DialogPrimitive.Title,
866
+ {
867
+ ref,
868
+ className: cn(
869
+ "text-xl font-semibold leading-snug tracking-tight text-[var(--color-foreground)]",
870
+ className
871
+ ),
872
+ ...props
873
+ }
874
+ ));
875
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
876
+ var DialogDescription = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
877
+ DialogPrimitive.Description,
878
+ {
879
+ ref,
880
+ className: cn(
881
+ "text-sm text-[var(--color-muted-foreground)] leading-normal",
882
+ className
883
+ ),
884
+ ...props
885
+ }
886
+ ));
887
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
888
+ var DialogForm = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
889
+ "form",
890
+ {
891
+ ref,
892
+ className: cn("flex flex-col gap-4", className),
893
+ ...props
894
+ }
895
+ ));
896
+ DialogForm.displayName = "DialogForm";
897
+ var Tabs = React32.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsx(
898
+ TabsPrimitive.Root,
899
+ {
900
+ ref,
901
+ orientation: vertical ? "vertical" : "horizontal",
902
+ ...props
903
+ }
904
+ ));
905
+ Tabs.displayName = TabsPrimitive.Root.displayName;
906
+ var tabsListVariants = cva(
907
+ "flex items-center justify-start transition-all duration-200",
908
+ {
909
+ variants: {
910
+ variant: {
911
+ default: "bg-[var(--color-accent)] rounded-[var(--radius-sm)] p-1 text-[var(--color-muted-foreground)]",
912
+ pills: "bg-transparent gap-2 p-0 text-[var(--color-muted-foreground)]",
913
+ underline: "bg-transparent border-b border-[var(--color-border)] gap-4 text-[var(--color-muted-foreground)]",
914
+ cards: "bg-transparent gap-2 p-0 text-[var(--color-muted-foreground)]",
915
+ minimal: "bg-transparent gap-1 p-0 text-[var(--color-muted-foreground)]"
916
+ },
917
+ orientation: {
918
+ horizontal: "flex-row",
919
+ vertical: "flex-col items-start gap-1"
920
+ },
921
+ fullWidth: {
922
+ true: "w-full"
923
+ }
924
+ },
925
+ defaultVariants: {
926
+ variant: "default",
927
+ orientation: "horizontal",
928
+ fullWidth: false
929
+ }
930
+ }
931
+ );
932
+ var TabsList = React32.forwardRef(({ className, variant, orientation, fullWidth, ...props }, ref) => /* @__PURE__ */ jsx(
933
+ TabsPrimitive.List,
934
+ {
935
+ ref,
936
+ className: cn(tabsListVariants({ variant, orientation, fullWidth, className })),
937
+ ...props
938
+ }
939
+ ));
940
+ TabsList.displayName = TabsPrimitive.List.displayName;
941
+ var tabsTriggerVariants = cva(
942
+ "inline-flex items-center justify-center whitespace-nowrap font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]/30 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
943
+ {
944
+ variants: {
945
+ variant: {
946
+ default: "rounded-[var(--radius-sm)] data-[state=active]:bg-[var(--color-background)] data-[state=active]:text-[var(--color-foreground)] data-[state=active]:shadow-sm",
947
+ underline: "rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-[var(--color-primary)] data-[state=active]:bg-transparent data-[state=active]:text-[var(--color-foreground)]",
948
+ pills: "rounded-full bg-[var(--color-accent)] hover:bg-[var(--color-accent)]/80 data-[state=active]:bg-[var(--color-primary)] data-[state=active]:text-[var(--color-primary-foreground)]",
949
+ cards: "rounded-[var(--radius-sm)] bg-[var(--color-accent)]/50 hover:bg-[var(--color-accent)] data-[state=active]:bg-[var(--color-background)] data-[state=active]:text-[var(--color-foreground)] data-[state=active]:shadow-md",
950
+ minimal: "rounded-sm bg-transparent hover:bg-[var(--color-accent)]/30 data-[state=active]:bg-transparent data-[state=active]:text-[var(--color-foreground)] data-[state=active]:underline data-[state=active]:underline-offset-4"
951
+ },
952
+ size: {
953
+ sm: "h-7 px-2 text-[var(--font-size-xs)]",
954
+ md: "h-9 px-3 py-1.5 text-[var(--font-size-sm)]",
955
+ lg: "h-10 px-4 py-2 text-[var(--font-size-base)]"
956
+ },
957
+ orientation: {
958
+ horizontal: "",
959
+ vertical: "justify-start w-full text-left"
960
+ },
961
+ fullWidth: {
962
+ true: "w-full"
963
+ }
964
+ },
965
+ defaultVariants: {
966
+ variant: "default",
967
+ size: "md",
968
+ orientation: "horizontal",
969
+ fullWidth: false
970
+ }
971
+ }
972
+ );
973
+ var TabsTrigger = React32.forwardRef(({
974
+ className,
975
+ variant,
976
+ size,
977
+ icon,
978
+ iconPosition = "left",
979
+ badge,
980
+ fadeTabs = false,
981
+ orientation,
982
+ fullWidth,
983
+ children,
984
+ ...props
985
+ }, ref) => /* @__PURE__ */ jsxs(
986
+ TabsPrimitive.Trigger,
987
+ {
988
+ ref,
989
+ className: cn(
990
+ tabsTriggerVariants({ variant, size, orientation, fullWidth }),
991
+ fadeTabs && "data-[state=inactive]:opacity-60",
992
+ className
993
+ ),
994
+ ...props,
995
+ children: [
996
+ icon && iconPosition === "left" && /* @__PURE__ */ jsx("span", { className: "mr-2", children: icon }),
997
+ children,
998
+ icon && iconPosition === "right" && /* @__PURE__ */ jsx("span", { className: "ml-2", children: icon }),
999
+ badge && /* @__PURE__ */ jsx("span", { className: "ml-2", children: badge })
1000
+ ]
1001
+ }
1002
+ ));
1003
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
1004
+ var TabsContent = React32.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsx(
1005
+ TabsPrimitive.Content,
1006
+ {
1007
+ ref,
1008
+ className: cn(
1009
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]/30 focus-visible:ring-offset-2",
1010
+ animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
1011
+ className
1012
+ ),
1013
+ ...props
1014
+ }
1015
+ ));
1016
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
1017
+ var avatarVariants = cva(
1018
+ "relative flex shrink-0 overflow-hidden",
1019
+ {
1020
+ variants: {
1021
+ size: {
1022
+ default: "h-10 w-10",
1023
+ xs: "h-6 w-6",
1024
+ sm: "h-8 w-8",
1025
+ md: "h-10 w-10",
1026
+ lg: "h-12 w-12",
1027
+ xl: "h-16 w-16",
1028
+ "2xl": "h-20 w-20"
1029
+ },
1030
+ radius: {
1031
+ default: "rounded-full",
1032
+ sm: "rounded-[var(--radius-sm)]",
1033
+ lg: "rounded-[var(--radius-lg)]",
1034
+ full: "rounded-full",
1035
+ none: "rounded-none"
1036
+ },
1037
+ variant: {
1038
+ default: "",
1039
+ ring: "ring-2 ring-[var(--color-border)]",
1040
+ ringOffset: "ring-2 ring-[var(--color-border)] ring-offset-2 ring-offset-[var(--color-background)]",
1041
+ border: "border-2 border-[var(--color-border)]"
1042
+ }
1043
+ },
1044
+ defaultVariants: {
1045
+ size: "default",
1046
+ radius: "default",
1047
+ variant: "default"
1048
+ }
1049
+ }
1050
+ );
1051
+ var Avatar = React32.forwardRef(({ className, size, radius, variant, ...props }, ref) => /* @__PURE__ */ jsx(
1052
+ AvatarPrimitive.Root,
1053
+ {
1054
+ ref,
1055
+ className: cn(avatarVariants({ size, radius, variant }), className),
1056
+ ...props
1057
+ }
1058
+ ));
1059
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
1060
+ var AvatarImage = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1061
+ AvatarPrimitive.Image,
1062
+ {
1063
+ ref,
1064
+ className: cn("aspect-square h-full w-full", className),
1065
+ ...props
1066
+ }
1067
+ ));
1068
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
1069
+ var AvatarFallback = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1070
+ AvatarPrimitive.Fallback,
1071
+ {
1072
+ ref,
1073
+ className: cn(
1074
+ "flex h-full w-full items-center justify-center bg-[var(--color-accent)] text-[var(--color-foreground)]",
1075
+ className
1076
+ ),
1077
+ ...props
1078
+ }
1079
+ ));
1080
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
1081
+ var AvatarGroup = React32.forwardRef(
1082
+ ({ className, limit, avatars, overlapOffset = -8, ...props }, ref) => {
1083
+ const visibleAvatars = limit ? avatars.slice(0, limit) : avatars;
1084
+ const remainingCount = limit ? Math.max(0, avatars.length - limit) : 0;
1085
+ return /* @__PURE__ */ jsx(
1086
+ "div",
1087
+ {
1088
+ ref,
1089
+ className: cn("flex items-center", className),
1090
+ ...props,
1091
+ children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
1092
+ visibleAvatars.map((avatar, index) => /* @__PURE__ */ jsx(
1093
+ "div",
1094
+ {
1095
+ className: "relative",
1096
+ style: {
1097
+ marginLeft: index === 0 ? 0 : `${overlapOffset}px`,
1098
+ zIndex: visibleAvatars.length - index
1099
+ },
1100
+ children: avatar
1101
+ },
1102
+ index
1103
+ )),
1104
+ remainingCount > 0 && /* @__PURE__ */ jsx(
1105
+ "div",
1106
+ {
1107
+ className: "relative z-0",
1108
+ style: { marginLeft: `${overlapOffset}px` },
1109
+ children: /* @__PURE__ */ jsx(Avatar, { variant: "border", children: /* @__PURE__ */ jsxs(AvatarFallback, { children: [
1110
+ "+",
1111
+ remainingCount
1112
+ ] }) })
1113
+ }
1114
+ )
1115
+ ] })
1116
+ }
1117
+ );
1118
+ }
1119
+ );
1120
+ AvatarGroup.displayName = "AvatarGroup";
1121
+ var alertVariants = cva(
1122
+ "relative w-full flex items-center gap-3 p-4 border text-[var(--color-foreground)] [&>svg]:shrink-0",
1123
+ {
1124
+ variants: {
1125
+ variant: {
1126
+ default: "bg-[var(--color-background)] text-[var(--color-foreground)] border-[var(--color-border)]",
1127
+ primary: "bg-[var(--color-primary)]/10 text-[var(--color-primary)] border-[var(--color-primary)]/30",
1128
+ success: "bg-[var(--color-success)]/10 text-[var(--color-success)] border-[var(--color-success)]/30",
1129
+ warning: "bg-[var(--color-warning)]/10 text-[var(--color-warning)] border-[var(--color-warning)]/30",
1130
+ error: "bg-[var(--color-error)]/10 text-[var(--color-error)] border-[var(--color-error)]/30",
1131
+ info: "bg-[var(--color-info)]/10 text-[var(--color-info)] border-[var(--color-info)]/30"
1132
+ },
1133
+ size: {
1134
+ sm: "py-2 text-[var(--font-size-xs)]",
1135
+ default: "py-3 text-[var(--font-size-sm)]",
1136
+ lg: "py-4 text-[var(--font-size-base)]"
1137
+ },
1138
+ radius: {
1139
+ none: "rounded-none",
1140
+ sm: "rounded-[var(--radius-sm)]",
1141
+ default: "rounded-[var(--radius-md)]",
1142
+ lg: "rounded-[var(--radius-lg)]",
1143
+ full: "rounded-full"
1144
+ },
1145
+ withClose: {
1146
+ true: "pr-10"
1147
+ }
1148
+ },
1149
+ defaultVariants: {
1150
+ variant: "default",
1151
+ size: "default",
1152
+ radius: "default",
1153
+ withClose: false
1154
+ }
1155
+ }
1156
+ );
1157
+ var Alert = React32.forwardRef(
1158
+ ({ className, variant = "default", size, radius, hideIcon = false, closable = false, onClose, children, ...props }, ref) => {
1159
+ const Icon2 = React32.useMemo(() => {
1160
+ switch (variant) {
1161
+ case "success":
1162
+ return Check;
1163
+ case "warning":
1164
+ return AlertTriangle;
1165
+ case "error":
1166
+ return AlertCircle;
1167
+ case "info":
1168
+ return Info;
1169
+ default:
1170
+ return Info;
1171
+ }
1172
+ }, [variant]);
1173
+ return /* @__PURE__ */ jsxs(
1174
+ "div",
1175
+ {
1176
+ ref,
1177
+ role: "alert",
1178
+ className: cn(alertVariants({ variant, size, radius, withClose: closable }), className),
1179
+ ...props,
1180
+ children: [
1181
+ !hideIcon && /* @__PURE__ */ jsx(Icon2, { className: "h-5 w-5" }),
1182
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children }),
1183
+ closable && onClose && /* @__PURE__ */ jsx(
1184
+ "button",
1185
+ {
1186
+ onClick: onClose,
1187
+ className: "absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100",
1188
+ "aria-label": "Kapat",
1189
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
1190
+ }
1191
+ )
1192
+ ]
1193
+ }
1194
+ );
1195
+ }
1196
+ );
1197
+ Alert.displayName = "Alert";
1198
+ var AlertTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1199
+ "h5",
1200
+ {
1201
+ ref,
1202
+ className: cn("font-semibold leading-tight tracking-tight mb-1", className),
1203
+ ...props
1204
+ }
1205
+ ));
1206
+ AlertTitle.displayName = "AlertTitle";
1207
+ var AlertDescription = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1208
+ "div",
1209
+ {
1210
+ ref,
1211
+ className: cn("leading-5 text-[var(--color-muted-foreground)]", className),
1212
+ ...props
1213
+ }
1214
+ ));
1215
+ AlertDescription.displayName = "AlertDescription";
1216
+ var ToastProvider = React32.createContext(null);
1217
+ var useToast = () => {
1218
+ const context = React32.useContext(ToastProvider);
1219
+ if (!context) {
1220
+ throw new Error("useToast must be used within a ToastProvider");
1221
+ }
1222
+ return context;
1223
+ };
1224
+ var toastVariants = cva(
1225
+ "group pointer-events-auto relative flex w-full items-center justify-between gap-2 overflow-hidden border p-4 shadow-md transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full",
1226
+ {
1227
+ variants: {
1228
+ variant: {
1229
+ default: "bg-[var(--color-background)] border-[var(--color-border)]",
1230
+ primary: "border-[var(--color-primary)]/50 bg-[var(--color-primary)]/10",
1231
+ success: "border-[var(--color-success)]/50 bg-[var(--color-success)]/10",
1232
+ warning: "border-[var(--color-warning)]/50 bg-[var(--color-warning)]/10",
1233
+ error: "border-[var(--color-error)]/50 bg-[var(--color-error)]/10",
1234
+ info: "border-[var(--color-info)]/50 bg-[var(--color-info)]/10",
1235
+ destructive: "destructive group border-[var(--color-error)] bg-[var(--color-error)] text-[var(--color-error-foreground)]"
1236
+ },
1237
+ size: {
1238
+ sm: "text-[var(--font-size-xs)]",
1239
+ default: "text-[var(--font-size-sm)]",
1240
+ lg: "text-[var(--font-size-base)]"
1241
+ },
1242
+ radius: {
1243
+ none: "rounded-none",
1244
+ sm: "rounded-[var(--radius-sm)]",
1245
+ default: "rounded-[var(--radius-md)]",
1246
+ lg: "rounded-[var(--radius-lg)]",
1247
+ full: "rounded-full"
1248
+ }
1249
+ },
1250
+ defaultVariants: {
1251
+ variant: "default",
1252
+ size: "default",
1253
+ radius: "default"
1254
+ }
1255
+ }
1256
+ );
1257
+ var Toast = ({
1258
+ className,
1259
+ variant,
1260
+ size,
1261
+ radius,
1262
+ title,
1263
+ description,
1264
+ action,
1265
+ onClose,
1266
+ autoClose = true,
1267
+ duration = 5e3,
1268
+ hideIcon = false,
1269
+ showProgress = false,
1270
+ ...props
1271
+ }) => {
1272
+ const [progress, setProgress] = React32.useState(100);
1273
+ const timerRef = React32.useRef(void 0);
1274
+ const Icon2 = React32.useMemo(() => {
1275
+ switch (variant) {
1276
+ case "success":
1277
+ return Check;
1278
+ case "warning":
1279
+ return AlertTriangle;
1280
+ case "error":
1281
+ case "destructive":
1282
+ return AlertCircle;
1283
+ case "info":
1284
+ return Info;
1285
+ default:
1286
+ return null;
1287
+ }
1288
+ }, [variant]);
1289
+ React32.useEffect(() => {
1290
+ if (autoClose) {
1291
+ const startTime = Date.now();
1292
+ const endTime = startTime + duration;
1293
+ const updateProgress = () => {
1294
+ const now = Date.now();
1295
+ const remaining = endTime - now;
1296
+ const newProgress = remaining / duration * 100;
1297
+ setProgress(Math.max(0, newProgress));
1298
+ if (remaining > 0) {
1299
+ timerRef.current = setTimeout(updateProgress, 16);
1300
+ } else if (onClose) {
1301
+ onClose();
1302
+ }
1303
+ };
1304
+ updateProgress();
1305
+ }
1306
+ return () => {
1307
+ if (timerRef.current) {
1308
+ clearTimeout(timerRef.current);
1309
+ }
1310
+ };
1311
+ }, [autoClose, duration, onClose]);
1312
+ const textColorClass = variant === "default" ? "text-[var(--color-foreground)]" : variant === "destructive" ? "text-[var(--color-error-foreground)]" : `text-[var(--color-${variant})]`;
1313
+ return /* @__PURE__ */ jsxs(
1314
+ "div",
1315
+ {
1316
+ className: cn(toastVariants({ variant, size, radius }), className),
1317
+ ...props,
1318
+ children: [
1319
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start", children: [
1320
+ !hideIcon && Icon2 && /* @__PURE__ */ jsx(
1321
+ Icon2,
1322
+ {
1323
+ className: cn(
1324
+ "h-5 w-5",
1325
+ textColorClass
1326
+ )
1327
+ }
1328
+ ),
1329
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
1330
+ title && /* @__PURE__ */ jsx("div", { className: cn("font-medium leading-none tracking-tight", textColorClass), children: title }),
1331
+ description && /* @__PURE__ */ jsx("div", { className: cn("text-[var(--color-muted-foreground)] leading-normal", {
1332
+ "text-[var(--color-error-foreground)]/90": variant === "destructive"
1333
+ }), children: description })
1334
+ ] })
1335
+ ] }),
1336
+ action,
1337
+ onClose && /* @__PURE__ */ jsx(
1338
+ "button",
1339
+ {
1340
+ onClick: onClose,
1341
+ className: cn(
1342
+ "absolute right-2 top-2 rounded-[var(--radius-sm)] p-1 transition-opacity hover:opacity-100 opacity-70",
1343
+ textColorClass
1344
+ ),
1345
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
1346
+ }
1347
+ ),
1348
+ autoClose && showProgress && /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-[var(--color-accent)]/50", children: /* @__PURE__ */ jsx(
1349
+ "div",
1350
+ {
1351
+ className: cn(
1352
+ "h-full transition-all",
1353
+ variant === "default" ? "bg-[var(--color-primary)]" : `bg-[var(--color-${variant === "destructive" ? "error" : variant})]`
1354
+ ),
1355
+ style: { width: `${progress}%` }
1356
+ }
1357
+ ) })
1358
+ ]
1359
+ }
1360
+ );
1361
+ };
1362
+ Toast.displayName = "Toast";
1363
+ var ToastContainer = ({
1364
+ className,
1365
+ position = "bottom-right",
1366
+ gap = 8,
1367
+ // maxToasts parametresi ileriki versiyonlarda kullanılacak
1368
+ ...props
1369
+ }) => {
1370
+ const positionClasses = {
1371
+ "top-right": "top-0 right-0 flex-col-reverse",
1372
+ "top-center": "top-0 left-1/2 -translate-x-1/2 flex-col-reverse",
1373
+ "top-left": "top-0 left-0 flex-col-reverse",
1374
+ "bottom-right": "bottom-0 right-0 flex-col",
1375
+ "bottom-center": "bottom-0 left-1/2 -translate-x-1/2 flex-col",
1376
+ "bottom-left": "bottom-0 left-0 flex-col"
1377
+ };
1378
+ return /* @__PURE__ */ jsx(
1379
+ "div",
1380
+ {
1381
+ className: cn(
1382
+ "fixed z-[100] flex gap-2 p-4 md:max-w-[420px] w-full",
1383
+ positionClasses[position],
1384
+ className
1385
+ ),
1386
+ style: { gap: `${gap}px` },
1387
+ ...props
1388
+ }
1389
+ );
1390
+ };
1391
+ ToastContainer.displayName = "ToastContainer";
1392
+ var tooltipContentVariants = cva(
1393
+ "absolute z-50 overflow-hidden border text-[var(--font-size-xs)] opacity-0 transition-opacity duration-200 ease-in-out pointer-events-none",
1394
+ {
1395
+ variants: {
1396
+ variant: {
1397
+ default: "bg-[var(--color-background)] border-[var(--color-border)] text-[var(--color-foreground)]",
1398
+ primary: "bg-[var(--color-primary)] border-[var(--color-primary)] text-[var(--color-primary-foreground)]",
1399
+ secondary: "bg-[var(--color-secondary)] border-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
1400
+ success: "bg-[var(--color-success)] border-[var(--color-success)] text-white",
1401
+ warning: "bg-[var(--color-warning)] border-[var(--color-warning)] text-[var(--color-foreground)]",
1402
+ error: "bg-[var(--color-error)] border-[var(--color-error)] text-white",
1403
+ info: "bg-[var(--color-info)] border-[var(--color-info)] text-white"
1404
+ },
1405
+ size: {
1406
+ sm: "px-2 py-1 max-w-[200px]",
1407
+ default: "px-3 py-1.5 max-w-[300px]",
1408
+ lg: "px-4 py-2 max-w-[400px]"
1409
+ },
1410
+ radius: {
1411
+ none: "rounded-none",
1412
+ sm: "rounded-[var(--radius-sm)]",
1413
+ default: "rounded-[var(--radius-md)]",
1414
+ lg: "rounded-[var(--radius-lg)]",
1415
+ full: "rounded-full"
1416
+ },
1417
+ shadow: {
1418
+ sm: "shadow-sm",
1419
+ default: "shadow-md",
1420
+ lg: "shadow-lg",
1421
+ none: ""
1422
+ },
1423
+ side: {
1424
+ top: "bottom-full mb-2",
1425
+ bottom: "top-full mt-2",
1426
+ left: "right-full mr-2",
1427
+ right: "left-full ml-2"
1428
+ },
1429
+ align: {
1430
+ start: "",
1431
+ center: "",
1432
+ end: ""
1433
+ },
1434
+ visible: {
1435
+ true: "opacity-100",
1436
+ false: "opacity-0"
1437
+ },
1438
+ arrow: {
1439
+ true: 'after:content-[""] after:absolute after:w-2 after:h-2 after:rotate-45 after:border after:border-t-0 after:border-l-0',
1440
+ false: ""
1441
+ }
1442
+ },
1443
+ defaultVariants: {
1444
+ variant: "default",
1445
+ size: "default",
1446
+ radius: "default",
1447
+ shadow: "default",
1448
+ side: "top",
1449
+ align: "center",
1450
+ visible: false,
1451
+ arrow: true
1452
+ },
1453
+ compoundVariants: [
1454
+ {
1455
+ side: "top",
1456
+ arrow: true,
1457
+ className: "after:bottom-[-5px] after:border-r-[var(--color-border)] after:border-b-[var(--color-border)] after:bg-[var(--color-background)]"
1458
+ },
1459
+ {
1460
+ side: "bottom",
1461
+ arrow: true,
1462
+ className: "after:top-[-5px] after:border-t-[var(--color-border)] after:border-l-[var(--color-border)] after:bg-[var(--color-background)]"
1463
+ },
1464
+ {
1465
+ side: "left",
1466
+ arrow: true,
1467
+ className: "after:right-[-5px] after:border-t-[var(--color-border)] after:border-r-[var(--color-border)] after:bg-[var(--color-background)]"
1468
+ },
1469
+ {
1470
+ side: "right",
1471
+ arrow: true,
1472
+ className: "after:left-[-5px] after:border-b-[var(--color-border)] after:border-l-[var(--color-border)] after:bg-[var(--color-background)]"
1473
+ },
1474
+ {
1475
+ align: "center",
1476
+ side: "top",
1477
+ className: "left-1/2 -translate-x-1/2 after:left-1/2 after:-translate-x-1/2"
1478
+ },
1479
+ {
1480
+ align: "center",
1481
+ side: "bottom",
1482
+ className: "left-1/2 -translate-x-1/2 after:left-1/2 after:-translate-x-1/2"
1483
+ },
1484
+ {
1485
+ align: "center",
1486
+ side: "left",
1487
+ className: "top-1/2 -translate-y-1/2 after:top-1/2 after:-translate-y-1/2"
1488
+ },
1489
+ {
1490
+ align: "center",
1491
+ side: "right",
1492
+ className: "top-1/2 -translate-y-1/2 after:top-1/2 after:-translate-y-1/2"
1493
+ },
1494
+ {
1495
+ align: "start",
1496
+ side: "top",
1497
+ className: "left-0 after:left-3"
1498
+ },
1499
+ {
1500
+ align: "start",
1501
+ side: "bottom",
1502
+ className: "left-0 after:left-3"
1503
+ },
1504
+ {
1505
+ align: "start",
1506
+ side: "left",
1507
+ className: "top-0 after:top-3"
1508
+ },
1509
+ {
1510
+ align: "start",
1511
+ side: "right",
1512
+ className: "top-0 after:top-3"
1513
+ },
1514
+ {
1515
+ align: "end",
1516
+ side: "top",
1517
+ className: "right-0 after:right-3"
1518
+ },
1519
+ {
1520
+ align: "end",
1521
+ side: "bottom",
1522
+ className: "right-0 after:right-3"
1523
+ },
1524
+ {
1525
+ align: "end",
1526
+ side: "left",
1527
+ className: "bottom-0 after:bottom-3"
1528
+ },
1529
+ {
1530
+ align: "end",
1531
+ side: "right",
1532
+ className: "bottom-0 after:bottom-3"
1533
+ }
1534
+ ]
1535
+ }
1536
+ );
1537
+ function Tooltip({
1538
+ children,
1539
+ content,
1540
+ delayDuration = 300,
1541
+ side = "top",
1542
+ align = "center",
1543
+ variant,
1544
+ size,
1545
+ radius,
1546
+ shadow,
1547
+ disabled = false,
1548
+ contentClassName,
1549
+ triggerClassName,
1550
+ ...props
1551
+ }) {
1552
+ const [visible, setVisible] = React32.useState(false);
1553
+ const timeoutRef = React32.useRef(void 0);
1554
+ const showTooltip = () => {
1555
+ if (timeoutRef.current) {
1556
+ clearTimeout(timeoutRef.current);
1557
+ }
1558
+ timeoutRef.current = setTimeout(() => {
1559
+ setVisible(true);
1560
+ }, delayDuration);
1561
+ };
1562
+ const hideTooltip = () => {
1563
+ if (timeoutRef.current) {
1564
+ clearTimeout(timeoutRef.current);
1565
+ }
1566
+ setVisible(false);
1567
+ };
1568
+ React32.useEffect(() => {
1569
+ return () => {
1570
+ if (timeoutRef.current) {
1571
+ clearTimeout(timeoutRef.current);
1572
+ }
1573
+ };
1574
+ }, []);
1575
+ if (disabled) {
1576
+ return /* @__PURE__ */ jsx(Fragment, { children });
1577
+ }
1578
+ return /* @__PURE__ */ jsxs(
1579
+ "div",
1580
+ {
1581
+ className: "relative inline-flex",
1582
+ onMouseEnter: showTooltip,
1583
+ onMouseLeave: hideTooltip,
1584
+ onFocus: showTooltip,
1585
+ onBlur: hideTooltip,
1586
+ children: [
1587
+ /* @__PURE__ */ jsx("div", { className: cn("inline-flex", triggerClassName || ""), children }),
1588
+ /* @__PURE__ */ jsx(
1589
+ "div",
1590
+ {
1591
+ className: cn(
1592
+ tooltipContentVariants({
1593
+ variant,
1594
+ size,
1595
+ radius,
1596
+ shadow,
1597
+ side,
1598
+ align,
1599
+ visible,
1600
+ arrow: true
1601
+ }),
1602
+ contentClassName
1603
+ ),
1604
+ role: "tooltip",
1605
+ ...props,
1606
+ children: content
1607
+ }
1608
+ )
1609
+ ]
1610
+ }
1611
+ );
1612
+ }
1613
+ Tooltip.displayName = "Tooltip";
1614
+ var checkboxVariants = cva(
1615
+ "peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-[var(--color-primary-foreground)]",
1616
+ {
1617
+ variants: {
1618
+ variant: {
1619
+ default: "border-[var(--color-border)] bg-[var(--color-background)] data-[state=checked]:bg-[var(--color-primary)] data-[state=checked]:border-[var(--color-primary)]",
1620
+ outline: "border-[var(--color-border)] bg-transparent data-[state=checked]:bg-[var(--color-primary)] data-[state=checked]:border-[var(--color-primary)]",
1621
+ muted: "border-[var(--color-border)] bg-[var(--color-accent)] data-[state=checked]:bg-[var(--color-primary)] data-[state=checked]:border-[var(--color-primary)]",
1622
+ ghost: "border-transparent bg-transparent hover:bg-[var(--color-accent)] data-[state=checked]:bg-[var(--color-primary)] data-[state=checked]:border-[var(--color-primary)]"
1623
+ },
1624
+ size: {
1625
+ sm: "h-3.5 w-3.5",
1626
+ default: "h-4 w-4",
1627
+ md: "h-5 w-5",
1628
+ lg: "h-6 w-6"
1629
+ },
1630
+ radius: {
1631
+ none: "rounded-none",
1632
+ sm: "rounded-[var(--radius-sm)]",
1633
+ default: "rounded-[var(--radius-sm)]",
1634
+ md: "rounded-[var(--radius-md)]",
1635
+ full: "rounded-full"
1636
+ },
1637
+ animation: {
1638
+ none: "",
1639
+ subtle: "transition-all duration-200",
1640
+ default: "transition-all duration-200",
1641
+ bounce: "transition-all duration-200"
1642
+ }
1643
+ },
1644
+ defaultVariants: {
1645
+ variant: "default",
1646
+ size: "default",
1647
+ radius: "default",
1648
+ animation: "default"
1649
+ }
1650
+ }
1651
+ );
1652
+ var Checkbox = React32.forwardRef(({
1653
+ className,
1654
+ variant,
1655
+ size,
1656
+ radius,
1657
+ animation,
1658
+ indeterminate = false,
1659
+ icon,
1660
+ checked,
1661
+ ...props
1662
+ }, ref) => {
1663
+ const [isIndeterminate, setIsIndeterminate] = React32.useState(indeterminate);
1664
+ React32.useEffect(() => {
1665
+ setIsIndeterminate(indeterminate);
1666
+ }, [indeterminate]);
1667
+ const effectiveChecked = isIndeterminate ? false : checked;
1668
+ return /* @__PURE__ */ jsx(
1669
+ CheckboxPrimitive.Root,
1670
+ {
1671
+ ref,
1672
+ checked: effectiveChecked,
1673
+ className: cn(checkboxVariants({ variant, size, radius, animation }), className),
1674
+ ...props,
1675
+ children: /* @__PURE__ */ jsx(
1676
+ CheckboxPrimitive.Indicator,
1677
+ {
1678
+ className: cn(
1679
+ "flex items-center justify-center text-current",
1680
+ animation === "bounce" && "data-[state=checked]:animate-bounce"
1681
+ ),
1682
+ children: isIndeterminate ? /* @__PURE__ */ jsx(Minus, { className: "h-[65%] w-[65%]" }) : icon ? icon : /* @__PURE__ */ jsx(Check, { className: "h-[65%] w-[65%]" })
1683
+ }
1684
+ )
1685
+ }
1686
+ );
1687
+ });
1688
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
1689
+ var CheckboxGroup = React32.forwardRef(
1690
+ ({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
1691
+ return /* @__PURE__ */ jsx(
1692
+ "div",
1693
+ {
1694
+ ref,
1695
+ className: cn(
1696
+ "flex",
1697
+ orientation === "vertical" ? "flex-col" : "flex-row flex-wrap",
1698
+ className
1699
+ ),
1700
+ style: { gap: spacing },
1701
+ role: "group",
1702
+ ...props,
1703
+ children
1704
+ }
1705
+ );
1706
+ }
1707
+ );
1708
+ CheckboxGroup.displayName = "CheckboxGroup";
1709
+ var CheckboxLabel = React32.forwardRef(
1710
+ ({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
1711
+ return /* @__PURE__ */ jsx(
1712
+ "label",
1713
+ {
1714
+ ref,
1715
+ htmlFor,
1716
+ className: cn(
1717
+ "text-[var(--font-size-sm)] font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1718
+ position === "start" ? "mr-2" : "ml-2",
1719
+ disabled && "cursor-not-allowed opacity-70",
1720
+ className
1721
+ ),
1722
+ ...props,
1723
+ children
1724
+ }
1725
+ );
1726
+ }
1727
+ );
1728
+ CheckboxLabel.displayName = "CheckboxLabel";
1729
+ var CheckboxWithLabel = React32.forwardRef(({
1730
+ id,
1731
+ label,
1732
+ labelPosition = "end",
1733
+ labelClassName,
1734
+ ...checkboxProps
1735
+ }, ref) => {
1736
+ const checkboxId = id || `checkbox-${Math.random().toString(36).substring(2, 9)}`;
1737
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
1738
+ labelPosition === "start" && /* @__PURE__ */ jsx(
1739
+ CheckboxLabel,
1740
+ {
1741
+ htmlFor: checkboxId,
1742
+ position: "start",
1743
+ disabled: checkboxProps.disabled,
1744
+ className: labelClassName,
1745
+ children: label
1746
+ }
1747
+ ),
1748
+ /* @__PURE__ */ jsx(Checkbox, { ref, id: checkboxId, ...checkboxProps }),
1749
+ labelPosition === "end" && /* @__PURE__ */ jsx(
1750
+ CheckboxLabel,
1751
+ {
1752
+ htmlFor: checkboxId,
1753
+ position: "end",
1754
+ disabled: checkboxProps.disabled,
1755
+ className: labelClassName,
1756
+ children: label
1757
+ }
1758
+ )
1759
+ ] });
1760
+ });
1761
+ CheckboxWithLabel.displayName = "CheckboxWithLabel";
1762
+ var radioGroupItemVariants = cva(
1763
+ "aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1764
+ {
1765
+ variants: {
1766
+ variant: {
1767
+ default: "border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-primary)]",
1768
+ outline: "border-[var(--color-border)] bg-transparent text-[var(--color-primary)]",
1769
+ filled: "border-[var(--color-primary)] bg-[var(--color-primary)]/10 text-[var(--color-primary)]"
1770
+ },
1771
+ size: {
1772
+ sm: "h-3.5 w-3.5",
1773
+ default: "h-4 w-4",
1774
+ md: "h-5 w-5",
1775
+ lg: "h-6 w-6"
1776
+ }
1777
+ },
1778
+ defaultVariants: {
1779
+ variant: "default",
1780
+ size: "default"
1781
+ }
1782
+ }
1783
+ );
1784
+ var RadioGroupContext = React32.createContext({});
1785
+ var RadioGroup = React32.forwardRef(
1786
+ ({ className, value, onValueChange, disabled, name, ...props }, ref) => {
1787
+ return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: { value, onValueChange, disabled, name }, children: /* @__PURE__ */ jsx(
1788
+ "div",
1789
+ {
1790
+ ref,
1791
+ role: "radiogroup",
1792
+ className: cn("grid gap-2", className),
1793
+ ...props
1794
+ }
1795
+ ) });
1796
+ }
1797
+ );
1798
+ RadioGroup.displayName = "RadioGroup";
1799
+ var RadioGroupItem = React32.forwardRef(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
1800
+ const radioGroup = React32.useContext(RadioGroupContext);
1801
+ const generatedId = React32.useId();
1802
+ const radioId = id || generatedId;
1803
+ const isChecked = radioGroup.value === value;
1804
+ const handleChange = (e) => {
1805
+ if (radioGroup.onValueChange) {
1806
+ radioGroup.onValueChange(e.target.value);
1807
+ }
1808
+ if (props.onChange) {
1809
+ props.onChange(e);
1810
+ }
1811
+ };
1812
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
1813
+ /* @__PURE__ */ jsx(
1814
+ "input",
1815
+ {
1816
+ type: "radio",
1817
+ id: radioId,
1818
+ ref,
1819
+ value,
1820
+ checked: isChecked,
1821
+ disabled: disabled || radioGroup.disabled,
1822
+ name: radioGroup.name,
1823
+ onChange: handleChange,
1824
+ className: "sr-only",
1825
+ ...props
1826
+ }
1827
+ ),
1828
+ /* @__PURE__ */ jsx(
1829
+ "label",
1830
+ {
1831
+ htmlFor: radioId,
1832
+ className: cn(
1833
+ radioGroupItemVariants({ variant, size }),
1834
+ "rounded-full",
1835
+ "focus-visible:ring-[var(--color-primary)]/50",
1836
+ "relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",
1837
+ disabled && "cursor-not-allowed opacity-50",
1838
+ className
1839
+ ),
1840
+ children: /* @__PURE__ */ jsx("span", { className: cn(
1841
+ "absolute inset-0 pointer-events-none",
1842
+ isChecked && "flex items-center justify-center"
1843
+ ), children: isChecked && (indicator || /* @__PURE__ */ jsx(Circle, { className: "h-[60%] w-[60%] fill-current text-current" })) })
1844
+ }
1845
+ )
1846
+ ] });
1847
+ });
1848
+ RadioGroupItem.displayName = "RadioGroupItem";
1849
+ var RadioLabel = React32.forwardRef(
1850
+ ({ className, htmlFor, children, disabled = false, ...props }, ref) => {
1851
+ return /* @__PURE__ */ jsx(
1852
+ "label",
1853
+ {
1854
+ ref,
1855
+ htmlFor,
1856
+ className: cn(
1857
+ "text-[var(--font-size-sm)] font-medium leading-none ml-2 text-[var(--color-foreground)]",
1858
+ disabled && "cursor-not-allowed opacity-70",
1859
+ className
1860
+ ),
1861
+ ...props,
1862
+ children
1863
+ }
1864
+ );
1865
+ }
1866
+ );
1867
+ RadioLabel.displayName = "RadioLabel";
1868
+ var RadioItemWithLabel = React32.forwardRef(({
1869
+ id,
1870
+ label,
1871
+ labelClassName,
1872
+ ...radioProps
1873
+ }, ref) => {
1874
+ const radioId = id || `radio-${Math.random().toString(36).substring(2, 9)}`;
1875
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
1876
+ /* @__PURE__ */ jsx(RadioGroupItem, { ref, id: radioId, ...radioProps }),
1877
+ /* @__PURE__ */ jsx(
1878
+ RadioLabel,
1879
+ {
1880
+ htmlFor: radioId,
1881
+ disabled: radioProps.disabled,
1882
+ className: labelClassName,
1883
+ children: label
1884
+ }
1885
+ )
1886
+ ] });
1887
+ });
1888
+ RadioItemWithLabel.displayName = "RadioItemWithLabel";
1889
+ var progressVariants = cva(
1890
+ "relative w-full overflow-hidden bg-[var(--color-muted)]",
1891
+ {
1892
+ variants: {
1893
+ variant: {
1894
+ default: "bg-[var(--color-muted)]",
1895
+ primary: "bg-[var(--color-primary)]/20",
1896
+ secondary: "bg-[var(--color-secondary)]/20",
1897
+ success: "bg-[var(--color-success)]/20",
1898
+ warning: "bg-[var(--color-warning)]/20",
1899
+ error: "bg-[var(--color-error)]/20"
1900
+ },
1901
+ size: {
1902
+ xs: "h-1",
1903
+ sm: "h-1.5",
1904
+ default: "h-2",
1905
+ md: "h-2.5",
1906
+ lg: "h-3",
1907
+ xl: "h-4"
1908
+ },
1909
+ radius: {
1910
+ none: "rounded-none",
1911
+ sm: "rounded-[var(--radius-sm)]",
1912
+ default: "rounded-[var(--radius-md)]",
1913
+ lg: "rounded-[var(--radius-lg)]",
1914
+ full: "rounded-full"
1915
+ },
1916
+ animation: {
1917
+ default: "[&>div]:transition-all [&>div]:duration-500",
1918
+ smooth: "[&>div]:transition-all [&>div]:duration-700",
1919
+ fast: "[&>div]:transition-all [&>div]:duration-300",
1920
+ none: ""
1921
+ }
1922
+ },
1923
+ defaultVariants: {
1924
+ variant: "default",
1925
+ size: "default",
1926
+ radius: "full",
1927
+ animation: "default"
1928
+ }
1929
+ }
1930
+ );
1931
+ var progressIndicatorVariants = cva(
1932
+ "h-full w-full flex-1",
1933
+ {
1934
+ variants: {
1935
+ variant: {
1936
+ default: "bg-[var(--color-foreground)]",
1937
+ primary: "bg-[var(--color-primary)]",
1938
+ secondary: "bg-[var(--color-secondary)]",
1939
+ success: "bg-[var(--color-success)]",
1940
+ warning: "bg-[var(--color-warning)]",
1941
+ error: "bg-[var(--color-error)]"
1942
+ },
1943
+ animation: {
1944
+ default: "transition-all duration-500",
1945
+ smooth: "transition-all duration-700",
1946
+ fast: "transition-all duration-300",
1947
+ none: ""
1948
+ }
1949
+ },
1950
+ defaultVariants: {
1951
+ variant: "primary",
1952
+ animation: "default"
1953
+ }
1954
+ }
1955
+ );
1956
+ var Progress = React32.forwardRef(({
1957
+ className,
1958
+ value = 0,
1959
+ variant,
1960
+ size,
1961
+ radius,
1962
+ animation,
1963
+ indicatorVariant,
1964
+ showValueLabel = false,
1965
+ valueLabel,
1966
+ labelClassName,
1967
+ indeterminate = false,
1968
+ max = 100,
1969
+ ...props
1970
+ }, ref) => {
1971
+ const normalizedValue = Math.max(0, Math.min(value, max));
1972
+ const percentage = max > 0 ? normalizedValue / max * 100 : 0;
1973
+ const label = valueLabel || `${Math.round(percentage)}%`;
1974
+ return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
1975
+ showValueLabel && /* @__PURE__ */ jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsx(
1976
+ "span",
1977
+ {
1978
+ className: cn(
1979
+ "text-[var(--font-size-sm)] font-medium text-[var(--color-muted-foreground)]",
1980
+ labelClassName
1981
+ ),
1982
+ children: label
1983
+ }
1984
+ ) }),
1985
+ /* @__PURE__ */ jsx(
1986
+ "div",
1987
+ {
1988
+ ref,
1989
+ className: cn(progressVariants({ variant, size, radius, animation }), className),
1990
+ role: "progressbar",
1991
+ "aria-valuemin": 0,
1992
+ "aria-valuemax": max,
1993
+ "aria-valuenow": indeterminate ? void 0 : normalizedValue,
1994
+ ...props,
1995
+ children: /* @__PURE__ */ jsx(
1996
+ "div",
1997
+ {
1998
+ className: cn(
1999
+ progressIndicatorVariants({ variant: indicatorVariant || variant, animation }),
2000
+ indeterminate && "animate-indeterminate-progress"
2001
+ ),
2002
+ style: indeterminate ? {} : { transform: `translateX(-${100 - percentage}%)` }
2003
+ }
2004
+ )
2005
+ }
2006
+ )
2007
+ ] });
2008
+ });
2009
+ Progress.displayName = "Progress";
2010
+ var skeletonVariants = cva(
2011
+ "animate-pulse rounded-[var(--radius-md)]",
2012
+ {
2013
+ variants: {
2014
+ variant: {
2015
+ default: "bg-[var(--color-muted)]",
2016
+ primary: "bg-[var(--color-primary)]/10",
2017
+ secondary: "bg-[var(--color-secondary)]/10",
2018
+ accent: "bg-[var(--color-accent)]"
2019
+ },
2020
+ size: {
2021
+ default: "",
2022
+ sm: "scale-90",
2023
+ lg: "scale-110"
2024
+ },
2025
+ shape: {
2026
+ rect: "rounded-[var(--radius-md)]",
2027
+ circle: "rounded-full",
2028
+ pill: "rounded-full"
2029
+ },
2030
+ animation: {
2031
+ pulse: "animate-pulse",
2032
+ wave: "animate-shimmer overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:animate-[shimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent",
2033
+ none: "animate-none"
2034
+ }
2035
+ },
2036
+ defaultVariants: {
2037
+ variant: "default",
2038
+ size: "default",
2039
+ shape: "rect",
2040
+ animation: "pulse"
2041
+ }
2042
+ }
2043
+ );
2044
+ var Skeleton = React32.forwardRef(
2045
+ ({
2046
+ className,
2047
+ variant,
2048
+ size,
2049
+ shape,
2050
+ animation,
2051
+ height,
2052
+ width,
2053
+ isLoaded = false,
2054
+ children,
2055
+ fadeInDuration = 400,
2056
+ style,
2057
+ ...props
2058
+ }, ref) => {
2059
+ if (isLoaded && children) {
2060
+ return /* @__PURE__ */ jsx(
2061
+ "div",
2062
+ {
2063
+ ref,
2064
+ className: cn("animate-fade-in", className),
2065
+ style: {
2066
+ animationDuration: `${fadeInDuration}ms`,
2067
+ height,
2068
+ width,
2069
+ ...style
2070
+ },
2071
+ ...props,
2072
+ children
2073
+ }
2074
+ );
2075
+ }
2076
+ return /* @__PURE__ */ jsx(
2077
+ "div",
2078
+ {
2079
+ ref,
2080
+ className: cn(
2081
+ skeletonVariants({ variant, size, shape, animation }),
2082
+ "relative",
2083
+ className
2084
+ ),
2085
+ style: {
2086
+ height,
2087
+ width,
2088
+ ...style
2089
+ },
2090
+ ...props
2091
+ }
2092
+ );
2093
+ }
2094
+ );
2095
+ Skeleton.displayName = "Skeleton";
2096
+ var SkeletonText = React32.forwardRef(
2097
+ ({
2098
+ className,
2099
+ lines = 3,
2100
+ lineHeight = "0.85rem",
2101
+ spacing = "0.5rem",
2102
+ lastLineWidth = 80,
2103
+ randomWidths = false,
2104
+ variant = "default",
2105
+ animation = "pulse",
2106
+ ...props
2107
+ }, ref) => {
2108
+ return /* @__PURE__ */ jsx(
2109
+ "div",
2110
+ {
2111
+ ref,
2112
+ className: cn("flex flex-col", className),
2113
+ style: { gap: spacing },
2114
+ ...props,
2115
+ children: Array.from({ length: lines }).map((_, i) => {
2116
+ const isLastLine = i === lines - 1;
2117
+ const widthPercentage = isLastLine ? lastLineWidth : randomWidths ? Math.floor(Math.random() * 20) + 80 : 100;
2118
+ return /* @__PURE__ */ jsx(
2119
+ Skeleton,
2120
+ {
2121
+ variant,
2122
+ animation,
2123
+ className: "w-full",
2124
+ style: {
2125
+ height: lineHeight,
2126
+ width: `${widthPercentage}%`
2127
+ }
2128
+ },
2129
+ i
2130
+ );
2131
+ })
2132
+ }
2133
+ );
2134
+ }
2135
+ );
2136
+ SkeletonText.displayName = "SkeletonText";
2137
+ var SkeletonAvatar = React32.forwardRef(
2138
+ ({
2139
+ className,
2140
+ size = "2.5rem",
2141
+ variant = "default",
2142
+ animation = "pulse",
2143
+ ...props
2144
+ }, ref) => {
2145
+ return /* @__PURE__ */ jsx(
2146
+ Skeleton,
2147
+ {
2148
+ ref,
2149
+ variant,
2150
+ animation,
2151
+ shape: "circle",
2152
+ className: cn("shrink-0", className),
2153
+ style: {
2154
+ height: size,
2155
+ width: size
2156
+ },
2157
+ ...props
2158
+ }
2159
+ );
2160
+ }
2161
+ );
2162
+ SkeletonAvatar.displayName = "SkeletonAvatar";
2163
+ var SkeletonCard = React32.forwardRef(
2164
+ ({
2165
+ className,
2166
+ showHeader = true,
2167
+ contentLines = 3,
2168
+ showFooter = true,
2169
+ variant = "default",
2170
+ animation = "pulse",
2171
+ ...props
2172
+ }, ref) => {
2173
+ return /* @__PURE__ */ jsxs(
2174
+ "div",
2175
+ {
2176
+ ref,
2177
+ className: cn(
2178
+ "overflow-hidden rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-background)] p-4",
2179
+ className
2180
+ ),
2181
+ ...props,
2182
+ children: [
2183
+ showHeader && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center gap-4", children: [
2184
+ /* @__PURE__ */ jsx(SkeletonAvatar, { size: "2.5rem", variant, animation }),
2185
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
2186
+ /* @__PURE__ */ jsx(
2187
+ Skeleton,
2188
+ {
2189
+ variant,
2190
+ animation,
2191
+ className: "mb-2 h-4 w-1/3"
2192
+ }
2193
+ ),
2194
+ /* @__PURE__ */ jsx(
2195
+ Skeleton,
2196
+ {
2197
+ variant,
2198
+ animation,
2199
+ className: "h-3 w-1/4"
2200
+ }
2201
+ )
2202
+ ] })
2203
+ ] }),
2204
+ /* @__PURE__ */ jsx(
2205
+ SkeletonText,
2206
+ {
2207
+ lines: contentLines,
2208
+ variant,
2209
+ animation,
2210
+ className: "mb-4"
2211
+ }
2212
+ ),
2213
+ showFooter && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-4 pt-4 border-t border-[var(--color-border)]", children: [
2214
+ /* @__PURE__ */ jsx(
2215
+ Skeleton,
2216
+ {
2217
+ variant,
2218
+ animation,
2219
+ className: "h-4 w-1/4"
2220
+ }
2221
+ ),
2222
+ /* @__PURE__ */ jsx(
2223
+ Skeleton,
2224
+ {
2225
+ variant,
2226
+ animation,
2227
+ className: "h-4 w-1/5"
2228
+ }
2229
+ )
2230
+ ] })
2231
+ ]
2232
+ }
2233
+ );
2234
+ }
2235
+ );
2236
+ SkeletonCard.displayName = "SkeletonCard";
2237
+ var popoverContentVariants = cva(
2238
+ "z-50 w-72 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-background)] p-4 shadow-[var(--shadow-md)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
2239
+ {
2240
+ variants: {
2241
+ variant: {
2242
+ default: "",
2243
+ destructive: "border-[var(--color-error)] bg-[var(--color-error)]/5",
2244
+ outline: "border-[var(--color-border)] bg-transparent",
2245
+ subtle: "border-transparent bg-[var(--color-muted)]/50"
2246
+ },
2247
+ size: {
2248
+ sm: "w-48 p-3",
2249
+ default: "w-72 p-4",
2250
+ lg: "w-96 p-5"
2251
+ },
2252
+ side: {
2253
+ top: "data-[side=top]:slide-in-from-bottom-2",
2254
+ right: "data-[side=right]:slide-in-from-left-2",
2255
+ bottom: "data-[side=bottom]:slide-in-from-top-2",
2256
+ left: "data-[side=left]:slide-in-from-right-2"
2257
+ },
2258
+ position: {
2259
+ pointerEventsNone: "pointer-events-none",
2260
+ default: ""
2261
+ },
2262
+ radius: {
2263
+ none: "rounded-none",
2264
+ sm: "rounded-[var(--radius-sm)]",
2265
+ default: "rounded-[var(--radius-md)]",
2266
+ lg: "rounded-[var(--radius-lg)]",
2267
+ full: "rounded-full"
2268
+ },
2269
+ shadow: {
2270
+ none: "shadow-none",
2271
+ sm: "shadow-[var(--shadow-sm)]",
2272
+ default: "shadow-[var(--shadow-md)]",
2273
+ md: "shadow-[var(--shadow-md)]",
2274
+ lg: "shadow-[var(--shadow-lg)]",
2275
+ xl: "shadow-[var(--shadow-xl)]"
2276
+ }
2277
+ },
2278
+ defaultVariants: {
2279
+ variant: "default",
2280
+ size: "default",
2281
+ radius: "default",
2282
+ shadow: "default"
2283
+ }
2284
+ }
2285
+ );
2286
+ var Popover = PopoverPrimitive.Root;
2287
+ var PopoverTrigger = PopoverPrimitive.Trigger;
2288
+ var PopoverAnchor = PopoverPrimitive.Anchor;
2289
+ var PopoverContent = React32.forwardRef(({
2290
+ className,
2291
+ variant,
2292
+ size,
2293
+ side,
2294
+ position,
2295
+ radius,
2296
+ shadow,
2297
+ backdrop = false,
2298
+ closeOnInteractOutside = true,
2299
+ overlayBackdrop = false,
2300
+ sideOffset = 4,
2301
+ ...props
2302
+ }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
2303
+ overlayBackdrop && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-40 bg-[var(--color-overlay)] opacity-30" }),
2304
+ /* @__PURE__ */ jsx(
2305
+ PopoverPrimitive.Content,
2306
+ {
2307
+ ref,
2308
+ sideOffset,
2309
+ collisionPadding: 8,
2310
+ onInteractOutside: (e) => {
2311
+ if (!closeOnInteractOutside) {
2312
+ e.preventDefault();
2313
+ }
2314
+ },
2315
+ className: cn(
2316
+ popoverContentVariants({
2317
+ variant,
2318
+ size,
2319
+ side,
2320
+ position,
2321
+ radius,
2322
+ shadow
2323
+ }),
2324
+ backdrop && "backdrop-blur-md bg-opacity-80",
2325
+ className
2326
+ ),
2327
+ ...props
2328
+ }
2329
+ )
2330
+ ] }));
2331
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
2332
+ var PopoverClose = PopoverPrimitive.Close;
2333
+ var PopoverSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(
2334
+ "div",
2335
+ {
2336
+ className: cn("my-2 h-px bg-[var(--color-border)]", className),
2337
+ ...props
2338
+ }
2339
+ );
2340
+ PopoverSeparator.displayName = "PopoverSeparator";
2341
+ var PopoverHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
2342
+ "div",
2343
+ {
2344
+ className: cn("-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-[var(--color-border)]", className),
2345
+ ...props
2346
+ }
2347
+ );
2348
+ PopoverHeader.displayName = "PopoverHeader";
2349
+ var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
2350
+ "div",
2351
+ {
2352
+ className: cn("-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-[var(--color-border)]", className),
2353
+ ...props
2354
+ }
2355
+ );
2356
+ PopoverFooter.displayName = "PopoverFooter";
2357
+ var breadcrumbVariants = cva(
2358
+ "flex items-center gap-1.5",
2359
+ {
2360
+ variants: {
2361
+ variant: {
2362
+ default: "text-[var(--color-foreground)] transition-colors",
2363
+ muted: "text-[var(--color-muted-foreground)] transition-colors",
2364
+ ghost: "text-[var(--color-foreground)]/60 transition-colors",
2365
+ accent: "text-[var(--color-accent)] transition-colors",
2366
+ primary: "text-[var(--color-primary)] transition-colors"
2367
+ },
2368
+ size: {
2369
+ sm: "text-[var(--font-size-xs)]",
2370
+ default: "text-[var(--font-size-sm)]",
2371
+ md: "text-[var(--font-size-base)]",
2372
+ lg: "text-[var(--font-size-lg)]"
2373
+ }
2374
+ },
2375
+ defaultVariants: {
2376
+ variant: "default",
2377
+ size: "default"
2378
+ }
2379
+ }
2380
+ );
2381
+ var Breadcrumb = React32.forwardRef(
2382
+ ({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
2383
+ "nav",
2384
+ {
2385
+ ref,
2386
+ className: cn(breadcrumbVariants({ variant, size }), className),
2387
+ "aria-label": "breadcrumb",
2388
+ ...props
2389
+ }
2390
+ )
2391
+ );
2392
+ Breadcrumb.displayName = "Breadcrumb";
2393
+ var BreadcrumbList = React32.forwardRef(
2394
+ ({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
2395
+ const childrenArray = React32.Children.toArray(props.children).filter(Boolean);
2396
+ const childCount = childrenArray.length;
2397
+ if (collapsed && childCount > collapsedWidth) {
2398
+ const firstItem = childrenArray[0];
2399
+ const lastTwoItems = childrenArray.slice(-2);
2400
+ return /* @__PURE__ */ jsxs(
2401
+ "ol",
2402
+ {
2403
+ ref,
2404
+ className: cn(
2405
+ "flex flex-wrap items-center gap-1.5 sm:gap-2.5",
2406
+ className
2407
+ ),
2408
+ ...props,
2409
+ children: [
2410
+ firstItem,
2411
+ /* @__PURE__ */ jsx(BreadcrumbEllipsis, {}),
2412
+ lastTwoItems
2413
+ ]
2414
+ }
2415
+ );
2416
+ }
2417
+ return /* @__PURE__ */ jsx(
2418
+ "ol",
2419
+ {
2420
+ ref,
2421
+ className: cn(
2422
+ "flex flex-wrap items-center gap-1.5 sm:gap-2.5",
2423
+ className
2424
+ ),
2425
+ ...props
2426
+ }
2427
+ );
2428
+ }
2429
+ );
2430
+ BreadcrumbList.displayName = "BreadcrumbList";
2431
+ var BreadcrumbItem = React32.forwardRef(
2432
+ ({ className, isCurrent, href, asChild = false, ...props }, ref) => {
2433
+ const Comp = asChild ? React32.Fragment : href ? "a" : "span";
2434
+ const itemProps = asChild ? {} : href ? { href } : {};
2435
+ return /* @__PURE__ */ jsx(
2436
+ "li",
2437
+ {
2438
+ ref,
2439
+ className: cn("inline-flex items-center gap-1.5", className),
2440
+ "aria-current": isCurrent ? "page" : void 0,
2441
+ ...props,
2442
+ children: /* @__PURE__ */ jsx(
2443
+ Comp,
2444
+ {
2445
+ className: cn(
2446
+ "transition-colors duration-[var(--duration-base)] hover:text-[var(--color-foreground)]",
2447
+ isCurrent ? "font-[var(--font-weight-medium)] text-[var(--color-foreground)]" : "text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] hover:underline hover:underline-offset-4 hover:decoration-[var(--color-border)]"
2448
+ ),
2449
+ ...itemProps,
2450
+ children: props.children
2451
+ }
2452
+ )
2453
+ }
2454
+ );
2455
+ }
2456
+ );
2457
+ BreadcrumbItem.displayName = "BreadcrumbItem";
2458
+ var BreadcrumbSeparator = ({
2459
+ children,
2460
+ className,
2461
+ ...props
2462
+ }) => /* @__PURE__ */ jsx(
2463
+ "li",
2464
+ {
2465
+ role: "presentation",
2466
+ "aria-hidden": "true",
2467
+ className: cn("text-[var(--color-muted-foreground)] opacity-70", className),
2468
+ ...props,
2469
+ children: children || /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5" })
2470
+ }
2471
+ );
2472
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
2473
+ var BreadcrumbEllipsis = ({
2474
+ className,
2475
+ ...props
2476
+ }) => /* @__PURE__ */ jsxs(
2477
+ "li",
2478
+ {
2479
+ role: "presentation",
2480
+ "aria-hidden": "true",
2481
+ className: cn("flex items-center text-[var(--color-muted-foreground)] hover:text-[var(--color-muted-foreground)]/80 transition-colors duration-[var(--duration-base)]", className),
2482
+ ...props,
2483
+ children: [
2484
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
2485
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Daha fazla sayfa" })
2486
+ ]
2487
+ }
2488
+ );
2489
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
2490
+ var Accordion = AccordionPrimitive.Root;
2491
+ var accordionItemVariants = cva(
2492
+ "border-b",
2493
+ {
2494
+ variants: {
2495
+ variant: {
2496
+ default: "border-[var(--color-border)]",
2497
+ outline: "border-[var(--color-border)] rounded-md mb-2 border p-[1px] last:mb-0",
2498
+ card: "border-[var(--color-border)] rounded-md mb-2 border bg-[var(--color-background)] p-0 shadow-sm last:mb-0"
2499
+ }
2500
+ },
2501
+ defaultVariants: {
2502
+ variant: "default"
2503
+ }
2504
+ }
2505
+ );
2506
+ var AccordionItem = React32.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
2507
+ AccordionPrimitive.Item,
2508
+ {
2509
+ ref,
2510
+ className: cn(accordionItemVariants({ variant }), className),
2511
+ ...props
2512
+ }
2513
+ ));
2514
+ AccordionItem.displayName = "AccordionItem";
2515
+ var accordionTriggerVariants = cva(
2516
+ "flex flex-1 items-center justify-between py-4 transition-all [&[data-state=open]>svg]:rotate-180 group",
2517
+ {
2518
+ variants: {
2519
+ variant: {
2520
+ default: "font-[var(--font-weight-medium)] text-[var(--color-foreground)] hover:text-[var(--color-primary)] hover:underline",
2521
+ ghost: "font-[var(--font-weight-medium)] text-[var(--color-foreground)] hover:text-[var(--color-foreground)] hover:bg-[var(--color-accent)]/10 rounded px-2 -mx-2",
2522
+ outline: "font-[var(--font-weight-medium)] text-[var(--color-foreground)] px-4 py-3 hover:bg-[var(--color-accent)]/5 rounded-t"
2523
+ },
2524
+ size: {
2525
+ sm: "text-[var(--font-size-xs)] py-2",
2526
+ default: "text-[var(--font-size-sm)] py-3",
2527
+ md: "text-[var(--font-size-base)] py-4",
2528
+ lg: "text-[var(--font-size-lg)] py-5"
2529
+ }
2530
+ },
2531
+ defaultVariants: {
2532
+ variant: "default",
2533
+ size: "default"
2534
+ }
2535
+ }
2536
+ );
2537
+ var AccordionTrigger = React32.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
2538
+ AccordionPrimitive.Trigger,
2539
+ {
2540
+ ref,
2541
+ className: cn(accordionTriggerVariants({ variant, size }), className),
2542
+ ...props,
2543
+ children: [
2544
+ children,
2545
+ /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-[var(--duration-base)] opacity-70 group-hover:opacity-100" })
2546
+ ]
2547
+ }
2548
+ ) }));
2549
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
2550
+ var accordionContentVariants = cva(
2551
+ "overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
2552
+ {
2553
+ variants: {
2554
+ variant: {
2555
+ default: "text-[var(--color-muted-foreground)]",
2556
+ ghost: "text-[var(--color-muted-foreground)]",
2557
+ outline: "text-[var(--color-muted-foreground)] px-4 pb-3"
2558
+ },
2559
+ size: {
2560
+ sm: "text-[var(--font-size-xs)]",
2561
+ default: "text-[var(--font-size-sm)]",
2562
+ md: "text-[var(--font-size-base)]",
2563
+ lg: "text-[var(--font-size-lg)]"
2564
+ }
2565
+ },
2566
+ defaultVariants: {
2567
+ variant: "default",
2568
+ size: "default"
2569
+ }
2570
+ }
2571
+ );
2572
+ var AccordionContent = React32.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
2573
+ AccordionPrimitive.Content,
2574
+ {
2575
+ ref,
2576
+ className: cn(accordionContentVariants({ variant, size }), className),
2577
+ ...props,
2578
+ children: /* @__PURE__ */ jsx("div", { className: "pb-4 pt-0", children })
2579
+ }
2580
+ ));
2581
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
2582
+
2583
+ // node_modules/@radix-ui/primitive/dist/index.mjs
2584
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
2585
+ return function handleEvent(event) {
2586
+ originalEventHandler?.(event);
2587
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
2588
+ return ourEventHandler?.(event);
2589
+ }
2590
+ };
2591
+ }
2592
+ function createContextScope(scopeName, createContextScopeDeps = []) {
2593
+ let defaultContexts = [];
2594
+ function createContext32(rootComponentName, defaultContext) {
2595
+ const BaseContext = React32.createContext(defaultContext);
2596
+ const index = defaultContexts.length;
2597
+ defaultContexts = [...defaultContexts, defaultContext];
2598
+ const Provider = (props) => {
2599
+ const { scope, children, ...context } = props;
2600
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
2601
+ const value = React32.useMemo(() => context, Object.values(context));
2602
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
2603
+ };
2604
+ Provider.displayName = rootComponentName + "Provider";
2605
+ function useContext22(consumerName, scope) {
2606
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
2607
+ const context = React32.useContext(Context);
2608
+ if (context)
2609
+ return context;
2610
+ if (defaultContext !== void 0)
2611
+ return defaultContext;
2612
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
2613
+ }
2614
+ return [Provider, useContext22];
2615
+ }
2616
+ const createScope = () => {
2617
+ const scopeContexts = defaultContexts.map((defaultContext) => {
2618
+ return React32.createContext(defaultContext);
2619
+ });
2620
+ return function useScope(scope) {
2621
+ const contexts = scope?.[scopeName] || scopeContexts;
2622
+ return React32.useMemo(
2623
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
2624
+ [scope, contexts]
2625
+ );
2626
+ };
2627
+ };
2628
+ createScope.scopeName = scopeName;
2629
+ return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
2630
+ }
2631
+ function composeContextScopes(...scopes) {
2632
+ const baseScope = scopes[0];
2633
+ if (scopes.length === 1)
2634
+ return baseScope;
2635
+ const createScope = () => {
2636
+ const scopeHooks = scopes.map((createScope2) => ({
2637
+ useScope: createScope2(),
2638
+ scopeName: createScope2.scopeName
2639
+ }));
2640
+ return function useComposedScopes(overrideScopes) {
2641
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
2642
+ const scopeProps = useScope(overrideScopes);
2643
+ const currentScope = scopeProps[`__scope${scopeName}`];
2644
+ return { ...nextScopes2, ...currentScope };
2645
+ }, {});
2646
+ return React32.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
2647
+ };
2648
+ };
2649
+ createScope.scopeName = baseScope.scopeName;
2650
+ return createScope;
2651
+ }
2652
+ var useLayoutEffect2 = globalThis?.document ? React32.useLayoutEffect : () => {
2653
+ };
2654
+ var useInsertionEffect = React32[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
2655
+ function useControllableState({
2656
+ prop,
2657
+ defaultProp,
2658
+ onChange = () => {
2659
+ },
2660
+ caller
2661
+ }) {
2662
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
2663
+ defaultProp,
2664
+ onChange
2665
+ });
2666
+ const isControlled = prop !== void 0;
2667
+ const value = isControlled ? prop : uncontrolledProp;
2668
+ {
2669
+ const isControlledRef = React32.useRef(prop !== void 0);
2670
+ React32.useEffect(() => {
2671
+ const wasControlled = isControlledRef.current;
2672
+ if (wasControlled !== isControlled) {
2673
+ const from = wasControlled ? "controlled" : "uncontrolled";
2674
+ const to = isControlled ? "controlled" : "uncontrolled";
2675
+ console.warn(
2676
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
2677
+ );
2678
+ }
2679
+ isControlledRef.current = isControlled;
2680
+ }, [isControlled, caller]);
2681
+ }
2682
+ const setValue = React32.useCallback(
2683
+ (nextValue) => {
2684
+ if (isControlled) {
2685
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
2686
+ if (value2 !== prop) {
2687
+ onChangeRef.current?.(value2);
2688
+ }
2689
+ } else {
2690
+ setUncontrolledProp(nextValue);
2691
+ }
2692
+ },
2693
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
2694
+ );
2695
+ return [value, setValue];
2696
+ }
2697
+ function useUncontrolledState({
2698
+ defaultProp,
2699
+ onChange
2700
+ }) {
2701
+ const [value, setValue] = React32.useState(defaultProp);
2702
+ const prevValueRef = React32.useRef(value);
2703
+ const onChangeRef = React32.useRef(onChange);
2704
+ useInsertionEffect(() => {
2705
+ onChangeRef.current = onChange;
2706
+ }, [onChange]);
2707
+ React32.useEffect(() => {
2708
+ if (prevValueRef.current !== value) {
2709
+ onChangeRef.current?.(value);
2710
+ prevValueRef.current = value;
2711
+ }
2712
+ }, [value, prevValueRef]);
2713
+ return [value, setValue, onChangeRef];
2714
+ }
2715
+ function isFunction(value) {
2716
+ return typeof value === "function";
2717
+ }
2718
+ function setRef(ref, value) {
2719
+ if (typeof ref === "function") {
2720
+ return ref(value);
2721
+ } else if (ref !== null && ref !== void 0) {
2722
+ ref.current = value;
2723
+ }
2724
+ }
2725
+ function composeRefs(...refs) {
2726
+ return (node) => {
2727
+ let hasCleanup = false;
2728
+ const cleanups = refs.map((ref) => {
2729
+ const cleanup = setRef(ref, node);
2730
+ if (!hasCleanup && typeof cleanup == "function") {
2731
+ hasCleanup = true;
2732
+ }
2733
+ return cleanup;
2734
+ });
2735
+ if (hasCleanup) {
2736
+ return () => {
2737
+ for (let i = 0; i < cleanups.length; i++) {
2738
+ const cleanup = cleanups[i];
2739
+ if (typeof cleanup == "function") {
2740
+ cleanup();
2741
+ } else {
2742
+ setRef(refs[i], null);
2743
+ }
2744
+ }
2745
+ };
2746
+ }
2747
+ };
2748
+ }
2749
+ function useComposedRefs(...refs) {
2750
+ return React32.useCallback(composeRefs(...refs), refs);
2751
+ }
2752
+ var NODES = [
2753
+ "a",
2754
+ "button",
2755
+ "div",
2756
+ "form",
2757
+ "h2",
2758
+ "h3",
2759
+ "img",
2760
+ "input",
2761
+ "label",
2762
+ "li",
2763
+ "nav",
2764
+ "ol",
2765
+ "p",
2766
+ "select",
2767
+ "span",
2768
+ "svg",
2769
+ "ul"
2770
+ ];
2771
+ var Primitive = NODES.reduce((primitive, node) => {
2772
+ const Slot = createSlot(`Primitive.${node}`);
2773
+ const Node = React32.forwardRef((props, forwardedRef) => {
2774
+ const { asChild, ...primitiveProps } = props;
2775
+ const Comp = asChild ? Slot : node;
2776
+ if (typeof window !== "undefined") {
2777
+ window[Symbol.for("radix-ui")] = true;
2778
+ }
2779
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
2780
+ });
2781
+ Node.displayName = `Primitive.${node}`;
2782
+ return { ...primitive, [node]: Node };
2783
+ }, {});
2784
+ function useStateMachine(initialState, machine) {
2785
+ return React32.useReducer((state, event) => {
2786
+ const nextState = machine[state][event];
2787
+ return nextState ?? state;
2788
+ }, initialState);
2789
+ }
2790
+ var Presence = (props) => {
2791
+ const { present, children } = props;
2792
+ const presence = usePresence(present);
2793
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React32.Children.only(children);
2794
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
2795
+ const forceMount = typeof children === "function";
2796
+ return forceMount || presence.isPresent ? React32.cloneElement(child, { ref }) : null;
2797
+ };
2798
+ Presence.displayName = "Presence";
2799
+ function usePresence(present) {
2800
+ const [node, setNode] = React32.useState();
2801
+ const stylesRef = React32.useRef(null);
2802
+ const prevPresentRef = React32.useRef(present);
2803
+ const prevAnimationNameRef = React32.useRef("none");
2804
+ const initialState = present ? "mounted" : "unmounted";
2805
+ const [state, send] = useStateMachine(initialState, {
2806
+ mounted: {
2807
+ UNMOUNT: "unmounted",
2808
+ ANIMATION_OUT: "unmountSuspended"
2809
+ },
2810
+ unmountSuspended: {
2811
+ MOUNT: "mounted",
2812
+ ANIMATION_END: "unmounted"
2813
+ },
2814
+ unmounted: {
2815
+ MOUNT: "mounted"
2816
+ }
2817
+ });
2818
+ React32.useEffect(() => {
2819
+ const currentAnimationName = getAnimationName(stylesRef.current);
2820
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
2821
+ }, [state]);
2822
+ useLayoutEffect2(() => {
2823
+ const styles = stylesRef.current;
2824
+ const wasPresent = prevPresentRef.current;
2825
+ const hasPresentChanged = wasPresent !== present;
2826
+ if (hasPresentChanged) {
2827
+ const prevAnimationName = prevAnimationNameRef.current;
2828
+ const currentAnimationName = getAnimationName(styles);
2829
+ if (present) {
2830
+ send("MOUNT");
2831
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
2832
+ send("UNMOUNT");
2833
+ } else {
2834
+ const isAnimating = prevAnimationName !== currentAnimationName;
2835
+ if (wasPresent && isAnimating) {
2836
+ send("ANIMATION_OUT");
2837
+ } else {
2838
+ send("UNMOUNT");
2839
+ }
2840
+ }
2841
+ prevPresentRef.current = present;
2842
+ }
2843
+ }, [present, send]);
2844
+ useLayoutEffect2(() => {
2845
+ if (node) {
2846
+ let timeoutId;
2847
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
2848
+ const handleAnimationEnd = (event) => {
2849
+ const currentAnimationName = getAnimationName(stylesRef.current);
2850
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
2851
+ if (event.target === node && isCurrentAnimation) {
2852
+ send("ANIMATION_END");
2853
+ if (!prevPresentRef.current) {
2854
+ const currentFillMode = node.style.animationFillMode;
2855
+ node.style.animationFillMode = "forwards";
2856
+ timeoutId = ownerWindow.setTimeout(() => {
2857
+ if (node.style.animationFillMode === "forwards") {
2858
+ node.style.animationFillMode = currentFillMode;
2859
+ }
2860
+ });
2861
+ }
2862
+ }
2863
+ };
2864
+ const handleAnimationStart = (event) => {
2865
+ if (event.target === node) {
2866
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
2867
+ }
2868
+ };
2869
+ node.addEventListener("animationstart", handleAnimationStart);
2870
+ node.addEventListener("animationcancel", handleAnimationEnd);
2871
+ node.addEventListener("animationend", handleAnimationEnd);
2872
+ return () => {
2873
+ ownerWindow.clearTimeout(timeoutId);
2874
+ node.removeEventListener("animationstart", handleAnimationStart);
2875
+ node.removeEventListener("animationcancel", handleAnimationEnd);
2876
+ node.removeEventListener("animationend", handleAnimationEnd);
2877
+ };
2878
+ } else {
2879
+ send("ANIMATION_END");
2880
+ }
2881
+ }, [node, send]);
2882
+ return {
2883
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
2884
+ ref: React32.useCallback((node2) => {
2885
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
2886
+ setNode(node2);
2887
+ }, [])
2888
+ };
2889
+ }
2890
+ function getAnimationName(styles) {
2891
+ return styles?.animationName || "none";
2892
+ }
2893
+ function getElementRef(element) {
2894
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2895
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2896
+ if (mayWarn) {
2897
+ return element.ref;
2898
+ }
2899
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2900
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2901
+ if (mayWarn) {
2902
+ return element.props.ref;
2903
+ }
2904
+ return element.props.ref || element.ref;
2905
+ }
2906
+ var useReactId = React32[" useId ".trim().toString()] || (() => void 0);
2907
+ var count = 0;
2908
+ function useId2(deterministicId) {
2909
+ const [id, setId] = React32.useState(useReactId());
2910
+ useLayoutEffect2(() => {
2911
+ if (!deterministicId)
2912
+ setId((reactId) => reactId ?? String(count++));
2913
+ }, [deterministicId]);
2914
+ return deterministicId || (id ? `radix-${id}` : "");
2915
+ }
2916
+ var COLLAPSIBLE_NAME = "Collapsible";
2917
+ var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
2918
+ var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
2919
+ var Collapsible = React32.forwardRef(
2920
+ (props, forwardedRef) => {
2921
+ const {
2922
+ __scopeCollapsible,
2923
+ open: openProp,
2924
+ defaultOpen,
2925
+ disabled,
2926
+ onOpenChange,
2927
+ ...collapsibleProps
2928
+ } = props;
2929
+ const [open, setOpen] = useControllableState({
2930
+ prop: openProp,
2931
+ defaultProp: defaultOpen ?? false,
2932
+ onChange: onOpenChange,
2933
+ caller: COLLAPSIBLE_NAME
2934
+ });
2935
+ return /* @__PURE__ */ jsx(
2936
+ CollapsibleProvider,
2937
+ {
2938
+ scope: __scopeCollapsible,
2939
+ disabled,
2940
+ contentId: useId2(),
2941
+ open,
2942
+ onOpenToggle: React32.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
2943
+ children: /* @__PURE__ */ jsx(
2944
+ Primitive.div,
2945
+ {
2946
+ "data-state": getState(open),
2947
+ "data-disabled": disabled ? "" : void 0,
2948
+ ...collapsibleProps,
2949
+ ref: forwardedRef
2950
+ }
2951
+ )
2952
+ }
2953
+ );
2954
+ }
2955
+ );
2956
+ Collapsible.displayName = COLLAPSIBLE_NAME;
2957
+ var TRIGGER_NAME = "CollapsibleTrigger";
2958
+ var CollapsibleTrigger = React32.forwardRef(
2959
+ (props, forwardedRef) => {
2960
+ const { __scopeCollapsible, ...triggerProps } = props;
2961
+ const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
2962
+ return /* @__PURE__ */ jsx(
2963
+ Primitive.button,
2964
+ {
2965
+ type: "button",
2966
+ "aria-controls": context.contentId,
2967
+ "aria-expanded": context.open || false,
2968
+ "data-state": getState(context.open),
2969
+ "data-disabled": context.disabled ? "" : void 0,
2970
+ disabled: context.disabled,
2971
+ ...triggerProps,
2972
+ ref: forwardedRef,
2973
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
2974
+ }
2975
+ );
2976
+ }
2977
+ );
2978
+ CollapsibleTrigger.displayName = TRIGGER_NAME;
2979
+ var CONTENT_NAME = "CollapsibleContent";
2980
+ var CollapsibleContent = React32.forwardRef(
2981
+ (props, forwardedRef) => {
2982
+ const { forceMount, ...contentProps } = props;
2983
+ const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
2984
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
2985
+ }
2986
+ );
2987
+ CollapsibleContent.displayName = CONTENT_NAME;
2988
+ var CollapsibleContentImpl = React32.forwardRef((props, forwardedRef) => {
2989
+ const { __scopeCollapsible, present, children, ...contentProps } = props;
2990
+ const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
2991
+ const [isPresent, setIsPresent] = React32.useState(present);
2992
+ const ref = React32.useRef(null);
2993
+ const composedRefs = useComposedRefs(forwardedRef, ref);
2994
+ const heightRef = React32.useRef(0);
2995
+ const height = heightRef.current;
2996
+ const widthRef = React32.useRef(0);
2997
+ const width = widthRef.current;
2998
+ const isOpen = context.open || isPresent;
2999
+ const isMountAnimationPreventedRef = React32.useRef(isOpen);
3000
+ const originalStylesRef = React32.useRef(void 0);
3001
+ React32.useEffect(() => {
3002
+ const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
3003
+ return () => cancelAnimationFrame(rAF);
3004
+ }, []);
3005
+ useLayoutEffect2(() => {
3006
+ const node = ref.current;
3007
+ if (node) {
3008
+ originalStylesRef.current = originalStylesRef.current || {
3009
+ transitionDuration: node.style.transitionDuration,
3010
+ animationName: node.style.animationName
3011
+ };
3012
+ node.style.transitionDuration = "0s";
3013
+ node.style.animationName = "none";
3014
+ const rect = node.getBoundingClientRect();
3015
+ heightRef.current = rect.height;
3016
+ widthRef.current = rect.width;
3017
+ if (!isMountAnimationPreventedRef.current) {
3018
+ node.style.transitionDuration = originalStylesRef.current.transitionDuration;
3019
+ node.style.animationName = originalStylesRef.current.animationName;
3020
+ }
3021
+ setIsPresent(present);
3022
+ }
3023
+ }, [context.open, present]);
3024
+ return /* @__PURE__ */ jsx(
3025
+ Primitive.div,
3026
+ {
3027
+ "data-state": getState(context.open),
3028
+ "data-disabled": context.disabled ? "" : void 0,
3029
+ id: context.contentId,
3030
+ hidden: !isOpen,
3031
+ ...contentProps,
3032
+ ref: composedRefs,
3033
+ style: {
3034
+ [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
3035
+ [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
3036
+ ...props.style
3037
+ },
3038
+ children: isOpen && children
3039
+ }
3040
+ );
3041
+ });
3042
+ function getState(open) {
3043
+ return open ? "open" : "closed";
3044
+ }
3045
+ var Root11 = Collapsible;
3046
+ var Trigger6 = CollapsibleTrigger;
3047
+ var Content6 = CollapsibleContent;
3048
+ var Collapsible2 = Root11;
3049
+ var collapsibleTriggerVariants = cva(
3050
+ "flex w-full items-center justify-between transition-all",
3051
+ {
3052
+ variants: {
3053
+ variant: {
3054
+ default: "text-[var(--color-foreground)] hover:text-[var(--color-primary)]",
3055
+ ghost: "text-[var(--color-foreground)] hover:bg-[var(--color-accent)]/10 rounded",
3056
+ outline: "text-[var(--color-foreground)] border border-[var(--color-border)] rounded-t-[var(--radius-md)] hover:bg-[var(--color-accent)]/5"
3057
+ },
3058
+ size: {
3059
+ sm: "text-[var(--font-size-xs)] py-2 px-3",
3060
+ default: "text-[var(--font-size-sm)] py-3 px-4",
3061
+ md: "text-[var(--font-size-base)] py-4 px-4",
3062
+ lg: "text-[var(--font-size-lg)] py-5 px-5"
3063
+ }
3064
+ },
3065
+ defaultVariants: {
3066
+ variant: "default",
3067
+ size: "default"
3068
+ }
3069
+ }
3070
+ );
3071
+ var CollapsibleTrigger2 = React32.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxs(
3072
+ Trigger6,
3073
+ {
3074
+ ref,
3075
+ className: cn(collapsibleTriggerVariants({ variant, size }), className),
3076
+ ...props,
3077
+ children: [
3078
+ children,
3079
+ /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-[var(--duration-base)] [&[data-state=open]]:rotate-180" })
3080
+ ]
3081
+ }
3082
+ ));
3083
+ CollapsibleTrigger2.displayName = Trigger6.displayName;
3084
+ var collapsibleContentVariants = cva(
3085
+ "overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",
3086
+ {
3087
+ variants: {
3088
+ variant: {
3089
+ default: "text-[var(--color-muted-foreground)]",
3090
+ ghost: "text-[var(--color-muted-foreground)] rounded-b",
3091
+ outline: "text-[var(--color-muted-foreground)] border border-t-0 border-[var(--color-border)] rounded-b-[var(--radius-md)]"
3092
+ },
3093
+ size: {
3094
+ sm: "text-[var(--font-size-xs)]",
3095
+ default: "text-[var(--font-size-sm)]",
3096
+ md: "text-[var(--font-size-base)]",
3097
+ lg: "text-[var(--font-size-lg)]"
3098
+ }
3099
+ },
3100
+ defaultVariants: {
3101
+ variant: "default",
3102
+ size: "default"
3103
+ }
3104
+ }
3105
+ );
3106
+ var CollapsibleContent2 = React32.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
3107
+ Content6,
3108
+ {
3109
+ ref,
3110
+ className: cn(collapsibleContentVariants({ variant, size }), className),
3111
+ ...props,
3112
+ children: /* @__PURE__ */ jsx("div", { className: "p-4", children })
3113
+ }
3114
+ ));
3115
+ CollapsibleContent2.displayName = Content6.displayName;
3116
+ var aspectRatioVariants = cva(
3117
+ "relative overflow-hidden",
3118
+ {
3119
+ variants: {
3120
+ variant: {
3121
+ default: "rounded-[var(--radius-md)] bg-[var(--color-muted)]/10",
3122
+ ghost: "bg-transparent",
3123
+ outline: "rounded-[var(--radius-md)] border border-[var(--color-border)]",
3124
+ card: "rounded-[var(--radius-md)] bg-[var(--color-card)] shadow-sm"
3125
+ },
3126
+ radius: {
3127
+ none: "rounded-none",
3128
+ sm: "rounded-[var(--radius-sm)]",
3129
+ md: "rounded-[var(--radius-md)]",
3130
+ lg: "rounded-[var(--radius-lg)]",
3131
+ full: "rounded-full"
3132
+ }
3133
+ },
3134
+ defaultVariants: {
3135
+ variant: "default"
3136
+ }
3137
+ }
3138
+ );
3139
+ var AspectRatio = React32.forwardRef(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => /* @__PURE__ */ jsx(
3140
+ "div",
3141
+ {
3142
+ ref,
3143
+ className: cn(aspectRatioVariants({ variant, radius }), className),
3144
+ style: {
3145
+ position: "relative",
3146
+ paddingBottom: `${1 / ratio * 100}%`,
3147
+ ...style
3148
+ },
3149
+ ...props,
3150
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children })
3151
+ }
3152
+ ));
3153
+ AspectRatio.displayName = "AspectRatio";
3154
+ var commandVariants = cva(
3155
+ "flex h-full w-full flex-col overflow-hidden rounded-[var(--radius-md)]",
3156
+ {
3157
+ variants: {
3158
+ variant: {
3159
+ default: "bg-[var(--color-popover)] text-[var(--color-popover-foreground)]",
3160
+ glass: "bg-[var(--color-background)]/80 text-[var(--color-foreground)] backdrop-blur-sm",
3161
+ bordered: "bg-[var(--color-popover)] text-[var(--color-popover-foreground)] border border-[var(--color-border)]"
3162
+ },
3163
+ size: {
3164
+ sm: "p-2",
3165
+ default: "p-4",
3166
+ lg: "p-6"
3167
+ }
3168
+ },
3169
+ defaultVariants: {
3170
+ variant: "default",
3171
+ size: "default"
3172
+ }
3173
+ }
3174
+ );
3175
+ var Command = React32.forwardRef(
3176
+ ({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
3177
+ "div",
3178
+ {
3179
+ ref,
3180
+ className: cn(commandVariants({ variant, size }), className),
3181
+ ...props
3182
+ }
3183
+ )
3184
+ );
3185
+ Command.displayName = "Command";
3186
+ var CommandDialog = ({
3187
+ children,
3188
+ commandClassName,
3189
+ ...props
3190
+ }) => {
3191
+ return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsx(Command, { className: cn(
3192
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
3193
+ commandClassName
3194
+ ), children }) }) });
3195
+ };
3196
+ var commandInputVariants = cva(
3197
+ "flex h-11 w-full rounded-none border-none bg-transparent py-3 text-sm outline-none placeholder:text-[var(--color-muted-foreground)] disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none",
3198
+ {
3199
+ variants: {
3200
+ variant: {
3201
+ default: "",
3202
+ minimal: "h-9",
3203
+ bordered: "border-b border-[var(--color-border)]"
3204
+ }
3205
+ },
3206
+ defaultVariants: {
3207
+ variant: "default"
3208
+ }
3209
+ }
3210
+ );
3211
+ var CommandInput = React32.forwardRef(
3212
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", children: [
3213
+ /* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
3214
+ /* @__PURE__ */ jsx(
3215
+ "input",
3216
+ {
3217
+ ref,
3218
+ className: cn(commandInputVariants({ variant }), className),
3219
+ ...props
3220
+ }
3221
+ )
3222
+ ] })
3223
+ );
3224
+ CommandInput.displayName = "CommandInput";
3225
+ var commandListVariants = cva(
3226
+ "max-h-[300px] overflow-y-auto overflow-x-hidden",
3227
+ {
3228
+ variants: {
3229
+ variant: {
3230
+ default: "",
3231
+ scrollable: "max-h-[400px]",
3232
+ compact: "max-h-[200px]"
3233
+ }
3234
+ },
3235
+ defaultVariants: {
3236
+ variant: "default"
3237
+ }
3238
+ }
3239
+ );
3240
+ var CommandList = React32.forwardRef(
3241
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
3242
+ "div",
3243
+ {
3244
+ ref,
3245
+ className: cn(commandListVariants({ variant }), className),
3246
+ role: "listbox",
3247
+ ...props
3248
+ }
3249
+ )
3250
+ );
3251
+ CommandList.displayName = "CommandList";
3252
+ var CommandEmpty = React32.forwardRef(
3253
+ (props, ref) => /* @__PURE__ */ jsx(
3254
+ "div",
3255
+ {
3256
+ ref,
3257
+ className: "py-6 text-center text-sm text-[var(--color-muted-foreground)]",
3258
+ ...props
3259
+ }
3260
+ )
3261
+ );
3262
+ CommandEmpty.displayName = "CommandEmpty";
3263
+ var commandGroupVariants = cva(
3264
+ "overflow-hidden p-1 text-[var(--color-foreground)]",
3265
+ {
3266
+ variants: {
3267
+ variant: {
3268
+ default: "",
3269
+ separated: "mt-2 border-t border-[var(--color-border)] pt-2",
3270
+ indented: "pl-4"
3271
+ }
3272
+ },
3273
+ defaultVariants: {
3274
+ variant: "default"
3275
+ }
3276
+ }
3277
+ );
3278
+ var CommandGroup = React32.forwardRef(
3279
+ ({ className, variant, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3280
+ "div",
3281
+ {
3282
+ ref,
3283
+ className: cn(commandGroupVariants({ variant }), className),
3284
+ ...props,
3285
+ children: [
3286
+ heading && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-xs font-medium text-[var(--color-muted-foreground)]", children: heading }),
3287
+ children
3288
+ ]
3289
+ }
3290
+ )
3291
+ );
3292
+ CommandGroup.displayName = "CommandGroup";
3293
+ var CommandSeparator = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3294
+ "div",
3295
+ {
3296
+ ref,
3297
+ className: cn("-mx-1 h-px bg-[var(--color-border)]", className),
3298
+ ...props
3299
+ }
3300
+ ));
3301
+ CommandSeparator.displayName = "CommandSeparator";
3302
+ var commandItemVariants = cva(
3303
+ "relative flex cursor-default select-none items-center rounded-[var(--radius-sm)] px-2 py-1.5 text-sm outline-none aria-selected:bg-[var(--color-accent)] aria-selected:text-[var(--color-accent-foreground)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3304
+ {
3305
+ variants: {
3306
+ variant: {
3307
+ default: "",
3308
+ subtle: "aria-selected:bg-[var(--color-accent)]/10 aria-selected:text-[var(--color-accent-foreground)]",
3309
+ ghost: "hover:bg-[var(--color-muted)]/10 aria-selected:bg-[var(--color-muted)]/20 aria-selected:text-[var(--color-foreground)]"
3310
+ }
3311
+ },
3312
+ defaultVariants: {
3313
+ variant: "default"
3314
+ }
3315
+ }
3316
+ );
3317
+ var CommandItem = React32.forwardRef(
3318
+ ({ className, variant, onSelect, selected, disabled, value, ...props }, ref) => {
3319
+ const handleClick = React32.useCallback(() => {
3320
+ if (disabled)
3321
+ return;
3322
+ if (onSelect && value) {
3323
+ onSelect(value);
3324
+ }
3325
+ }, [disabled, onSelect, value]);
3326
+ return /* @__PURE__ */ jsx(
3327
+ "div",
3328
+ {
3329
+ ref,
3330
+ className: cn(commandItemVariants({ variant }), className),
3331
+ role: "option",
3332
+ "aria-selected": selected,
3333
+ "data-disabled": disabled ? "" : void 0,
3334
+ onClick: handleClick,
3335
+ ...props
3336
+ }
3337
+ );
3338
+ }
3339
+ );
3340
+ CommandItem.displayName = "CommandItem";
3341
+ var CommandShortcut = ({ className, ...props }) => {
3342
+ return /* @__PURE__ */ jsx(
3343
+ "span",
3344
+ {
3345
+ className: cn(
3346
+ "ml-auto text-xs tracking-widest text-[var(--color-muted-foreground)]",
3347
+ className
3348
+ ),
3349
+ ...props
3350
+ }
3351
+ );
3352
+ };
3353
+ CommandShortcut.displayName = "CommandShortcut";
3354
+ var toggleVariants = cva(
3355
+ "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
3356
+ {
3357
+ variants: {
3358
+ variant: {
3359
+ default: "bg-transparent",
3360
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
3361
+ },
3362
+ size: {
3363
+ default: "h-10 px-3",
3364
+ sm: "h-9 px-2.5",
3365
+ lg: "h-11 px-5"
3366
+ }
3367
+ },
3368
+ defaultVariants: {
3369
+ variant: "default",
3370
+ size: "default"
3371
+ }
3372
+ }
3373
+ );
3374
+ var Toggle = React32.forwardRef(
3375
+ ({ className, variant, size, pressed, onPressedChange, onClick, ...props }, ref) => {
3376
+ const handleClick = (event) => {
3377
+ if (onPressedChange) {
3378
+ onPressedChange(!pressed);
3379
+ }
3380
+ if (onClick) {
3381
+ onClick(event);
3382
+ }
3383
+ };
3384
+ return /* @__PURE__ */ jsx(
3385
+ "button",
3386
+ {
3387
+ ref,
3388
+ "data-state": pressed ? "on" : "off",
3389
+ "aria-pressed": pressed,
3390
+ className: cn(toggleVariants({ variant, size, className })),
3391
+ onClick: handleClick,
3392
+ ...props
3393
+ }
3394
+ );
3395
+ }
3396
+ );
3397
+ Toggle.displayName = "Toggle";
3398
+ var Slider = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
3399
+ SliderPrimitive.Root,
3400
+ {
3401
+ ref,
3402
+ className: cn(
3403
+ "relative flex w-full touch-none select-none items-center",
3404
+ className
3405
+ ),
3406
+ ...props,
3407
+ children: [
3408
+ /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
3409
+ /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
3410
+ ]
3411
+ }
3412
+ ));
3413
+ Slider.displayName = SliderPrimitive.Root.displayName;
3414
+ var DropdownMenu = DropdownMenuPrimitive.Root;
3415
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
3416
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
3417
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
3418
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
3419
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
3420
+ var DropdownMenuSubTrigger = React32.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3421
+ DropdownMenuPrimitive.SubTrigger,
3422
+ {
3423
+ ref,
3424
+ className: cn(
3425
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
3426
+ inset && "pl-8",
3427
+ className
3428
+ ),
3429
+ ...props,
3430
+ children: [
3431
+ children,
3432
+ /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
3433
+ ]
3434
+ }
3435
+ ));
3436
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
3437
+ var DropdownMenuSubContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3438
+ DropdownMenuPrimitive.SubContent,
3439
+ {
3440
+ ref,
3441
+ className: cn(
3442
+ "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",
3443
+ className
3444
+ ),
3445
+ ...props
3446
+ }
3447
+ ));
3448
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
3449
+ var DropdownMenuContent = React32.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3450
+ DropdownMenuPrimitive.Content,
3451
+ {
3452
+ ref,
3453
+ sideOffset,
3454
+ className: cn(
3455
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3456
+ className
3457
+ ),
3458
+ ...props
3459
+ }
3460
+ ) }));
3461
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
3462
+ var DropdownMenuItem = React32.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3463
+ DropdownMenuPrimitive.Item,
3464
+ {
3465
+ ref,
3466
+ className: cn(
3467
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3468
+ inset && "pl-8",
3469
+ className
3470
+ ),
3471
+ ...props
3472
+ }
3473
+ ));
3474
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
3475
+ var DropdownMenuCheckboxItem = React32.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3476
+ DropdownMenuPrimitive.CheckboxItem,
3477
+ {
3478
+ ref,
3479
+ className: cn(
3480
+ "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 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3481
+ className
3482
+ ),
3483
+ checked,
3484
+ ...props,
3485
+ children: [
3486
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
3487
+ children
3488
+ ]
3489
+ }
3490
+ ));
3491
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
3492
+ var DropdownMenuRadioItem = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3493
+ DropdownMenuPrimitive.RadioItem,
3494
+ {
3495
+ ref,
3496
+ className: cn(
3497
+ "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 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3498
+ className
3499
+ ),
3500
+ ...props,
3501
+ children: [
3502
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
3503
+ children
3504
+ ]
3505
+ }
3506
+ ));
3507
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
3508
+ var DropdownMenuLabel = React32.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3509
+ DropdownMenuPrimitive.Label,
3510
+ {
3511
+ ref,
3512
+ className: cn(
3513
+ "px-2 py-1.5 text-sm font-semibold",
3514
+ inset && "pl-8",
3515
+ className
3516
+ ),
3517
+ ...props
3518
+ }
3519
+ ));
3520
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
3521
+ var DropdownMenuSeparator = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3522
+ DropdownMenuPrimitive.Separator,
3523
+ {
3524
+ ref,
3525
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
3526
+ ...props
3527
+ }
3528
+ ));
3529
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
3530
+ var DropdownMenuShortcut = ({
3531
+ className,
3532
+ ...props
3533
+ }) => {
3534
+ return /* @__PURE__ */ jsx(
3535
+ "span",
3536
+ {
3537
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
3538
+ ...props
3539
+ }
3540
+ );
3541
+ };
3542
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
3543
+ var NavigationMenu = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3544
+ NavigationMenuPrimitive.Root,
3545
+ {
3546
+ ref,
3547
+ className: cn(
3548
+ "relative z-10 flex max-w-max flex-1 items-center justify-center",
3549
+ className
3550
+ ),
3551
+ ...props,
3552
+ children: [
3553
+ children,
3554
+ /* @__PURE__ */ jsx(NavigationMenuViewport, {})
3555
+ ]
3556
+ }
3557
+ ));
3558
+ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
3559
+ var NavigationMenuList = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3560
+ NavigationMenuPrimitive.List,
3561
+ {
3562
+ ref,
3563
+ className: cn(
3564
+ "group flex flex-1 list-none items-center justify-center space-x-1",
3565
+ className
3566
+ ),
3567
+ ...props
3568
+ }
3569
+ ));
3570
+ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
3571
+ var NavigationMenuItem = NavigationMenuPrimitive.Item;
3572
+ var navigationMenuTriggerStyle = cva(
3573
+ "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
3574
+ );
3575
+ var NavigationMenuTrigger = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3576
+ NavigationMenuPrimitive.Trigger,
3577
+ {
3578
+ ref,
3579
+ className: cn(navigationMenuTriggerStyle(), "group", className),
3580
+ ...props,
3581
+ children: [
3582
+ children,
3583
+ " ",
3584
+ /* @__PURE__ */ jsx(
3585
+ ChevronDown,
3586
+ {
3587
+ className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
3588
+ "aria-hidden": "true"
3589
+ }
3590
+ )
3591
+ ]
3592
+ }
3593
+ ));
3594
+ NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
3595
+ var NavigationMenuContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3596
+ NavigationMenuPrimitive.Content,
3597
+ {
3598
+ ref,
3599
+ className: cn(
3600
+ "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 ",
3601
+ className
3602
+ ),
3603
+ ...props
3604
+ }
3605
+ ));
3606
+ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
3607
+ var NavigationMenuLink = NavigationMenuPrimitive.Link;
3608
+ var NavigationMenuViewport = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
3609
+ NavigationMenuPrimitive.Viewport,
3610
+ {
3611
+ className: cn(
3612
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
3613
+ className
3614
+ ),
3615
+ ref,
3616
+ ...props
3617
+ }
3618
+ ) }));
3619
+ NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
3620
+ var NavigationMenuIndicator = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3621
+ NavigationMenuPrimitive.Indicator,
3622
+ {
3623
+ ref,
3624
+ className: cn(
3625
+ "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",
3626
+ className
3627
+ ),
3628
+ ...props,
3629
+ children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
3630
+ }
3631
+ ));
3632
+ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
3633
+ var Sheet = DialogPrimitive.Root;
3634
+ var SheetTrigger = DialogPrimitive.Trigger;
3635
+ var SheetClose = DialogPrimitive.Close;
3636
+ var SheetPortal = DialogPrimitive.Portal;
3637
+ var SheetOverlay = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3638
+ DialogPrimitive.Overlay,
3639
+ {
3640
+ className: cn(
3641
+ "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",
3642
+ className
3643
+ ),
3644
+ ...props,
3645
+ ref
3646
+ }
3647
+ ));
3648
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
3649
+ var sheetVariants = cva(
3650
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
3651
+ {
3652
+ variants: {
3653
+ side: {
3654
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
3655
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
3656
+ 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",
3657
+ 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"
3658
+ }
3659
+ },
3660
+ defaultVariants: {
3661
+ side: "right"
3662
+ }
3663
+ }
3664
+ );
3665
+ var SheetContent = React32.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
3666
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
3667
+ /* @__PURE__ */ jsxs(
3668
+ DialogPrimitive.Content,
3669
+ {
3670
+ ref,
3671
+ className: cn(sheetVariants({ side }), className),
3672
+ ...props,
3673
+ children: [
3674
+ children,
3675
+ /* @__PURE__ */ jsxs(DialogPrimitive.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: [
3676
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
3677
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
3678
+ ] })
3679
+ ]
3680
+ }
3681
+ )
3682
+ ] }));
3683
+ SheetContent.displayName = DialogPrimitive.Content.displayName;
3684
+ var SheetHeader = ({
3685
+ className,
3686
+ ...props
3687
+ }) => /* @__PURE__ */ jsx(
3688
+ "div",
3689
+ {
3690
+ className: cn(
3691
+ "flex flex-col space-y-2 text-center sm:text-left",
3692
+ className
3693
+ ),
3694
+ ...props
3695
+ }
3696
+ );
3697
+ SheetHeader.displayName = "SheetHeader";
3698
+ var SheetFooter = ({
3699
+ className,
3700
+ ...props
3701
+ }) => /* @__PURE__ */ jsx(
3702
+ "div",
3703
+ {
3704
+ className: cn(
3705
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
3706
+ className
3707
+ ),
3708
+ ...props
3709
+ }
3710
+ );
3711
+ SheetFooter.displayName = "SheetFooter";
3712
+ var SheetTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3713
+ DialogPrimitive.Title,
3714
+ {
3715
+ ref,
3716
+ className: cn("text-lg font-semibold text-foreground", className),
3717
+ ...props
3718
+ }
3719
+ ));
3720
+ SheetTitle.displayName = DialogPrimitive.Title.displayName;
3721
+ var SheetDescription = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3722
+ DialogPrimitive.Description,
3723
+ {
3724
+ ref,
3725
+ className: cn("text-sm text-muted-foreground", className),
3726
+ ...props
3727
+ }
3728
+ ));
3729
+ SheetDescription.displayName = DialogPrimitive.Description.displayName;
3730
+ var HoverCard = HoverCardPrimitive.Root;
3731
+ var HoverCardTrigger = HoverCardPrimitive.Trigger;
3732
+ var HoverCardContent = React32.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
3733
+ HoverCardPrimitive.Content,
3734
+ {
3735
+ ref,
3736
+ align,
3737
+ sideOffset,
3738
+ className: cn(
3739
+ "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3740
+ className
3741
+ ),
3742
+ ...props
3743
+ }
3744
+ ));
3745
+ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
3746
+ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
3747
+ "nav",
3748
+ {
3749
+ role: "navigation",
3750
+ "aria-label": "pagination",
3751
+ className: cn("mx-auto flex w-full justify-center", className),
3752
+ ...props
3753
+ }
3754
+ );
3755
+ Pagination.displayName = "Pagination";
3756
+ var PaginationContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3757
+ "ul",
3758
+ {
3759
+ ref,
3760
+ className: cn("flex flex-row items-center gap-1", className),
3761
+ ...props
3762
+ }
3763
+ ));
3764
+ PaginationContent.displayName = "PaginationContent";
3765
+ var PaginationItem = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
3766
+ PaginationItem.displayName = "PaginationItem";
3767
+ var PaginationLink = ({
3768
+ className,
3769
+ isActive,
3770
+ size = "icon",
3771
+ ...props
3772
+ }) => /* @__PURE__ */ jsx(
3773
+ "a",
3774
+ {
3775
+ "aria-current": isActive ? "page" : void 0,
3776
+ className: cn(
3777
+ buttonVariants({
3778
+ variant: isActive ? "outline" : "ghost",
3779
+ size
3780
+ }),
3781
+ className
3782
+ ),
3783
+ ...props
3784
+ }
3785
+ );
3786
+ PaginationLink.displayName = "PaginationLink";
3787
+ var PaginationPrevious = ({
3788
+ className,
3789
+ ...props
3790
+ }) => /* @__PURE__ */ jsxs(
3791
+ PaginationLink,
3792
+ {
3793
+ "aria-label": "Go to previous page",
3794
+ size: "default",
3795
+ className: cn("gap-1 pl-2.5", className),
3796
+ ...props,
3797
+ children: [
3798
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
3799
+ /* @__PURE__ */ jsx("span", { children: "Previous" })
3800
+ ]
3801
+ }
3802
+ );
3803
+ PaginationPrevious.displayName = "PaginationPrevious";
3804
+ var PaginationNext = ({
3805
+ className,
3806
+ ...props
3807
+ }) => /* @__PURE__ */ jsxs(
3808
+ PaginationLink,
3809
+ {
3810
+ "aria-label": "Go to next page",
3811
+ size: "default",
3812
+ className: cn("gap-1 pr-2.5", className),
3813
+ ...props,
3814
+ children: [
3815
+ /* @__PURE__ */ jsx("span", { children: "Next" }),
3816
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
3817
+ ]
3818
+ }
3819
+ );
3820
+ PaginationNext.displayName = "PaginationNext";
3821
+ var PaginationEllipsis = ({
3822
+ className,
3823
+ ...props
3824
+ }) => /* @__PURE__ */ jsxs(
3825
+ "span",
3826
+ {
3827
+ "aria-hidden": true,
3828
+ className: cn("flex h-9 w-9 items-center justify-center", className),
3829
+ ...props,
3830
+ children: [
3831
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
3832
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
3833
+ ]
3834
+ }
3835
+ );
3836
+ PaginationEllipsis.displayName = "PaginationEllipsis";
3837
+ var MenubarMenu = MenubarPrimitive.Menu;
3838
+ var MenubarGroup = MenubarPrimitive.Group;
3839
+ var MenubarPortal = MenubarPrimitive.Portal;
3840
+ var MenubarSub = MenubarPrimitive.Sub;
3841
+ var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
3842
+ var Menubar = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3843
+ MenubarPrimitive.Root,
3844
+ {
3845
+ ref,
3846
+ className: cn(
3847
+ "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
3848
+ className
3849
+ ),
3850
+ ...props
3851
+ }
3852
+ ));
3853
+ Menubar.displayName = MenubarPrimitive.Root.displayName;
3854
+ var MenubarTrigger = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3855
+ MenubarPrimitive.Trigger,
3856
+ {
3857
+ ref,
3858
+ className: cn(
3859
+ "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
3860
+ className
3861
+ ),
3862
+ ...props
3863
+ }
3864
+ ));
3865
+ MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
3866
+ var MenubarSubTrigger = React32.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3867
+ MenubarPrimitive.SubTrigger,
3868
+ {
3869
+ ref,
3870
+ className: cn(
3871
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
3872
+ inset && "pl-8",
3873
+ className
3874
+ ),
3875
+ ...props,
3876
+ children: [
3877
+ children,
3878
+ /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
3879
+ ]
3880
+ }
3881
+ ));
3882
+ MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
3883
+ var MenubarSubContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3884
+ MenubarPrimitive.SubContent,
3885
+ {
3886
+ ref,
3887
+ className: cn(
3888
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3889
+ className
3890
+ ),
3891
+ ...props
3892
+ }
3893
+ ));
3894
+ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
3895
+ var MenubarContent = React32.forwardRef(
3896
+ ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3897
+ MenubarPrimitive.Content,
3898
+ {
3899
+ ref,
3900
+ align,
3901
+ alignOffset,
3902
+ sideOffset,
3903
+ className: cn(
3904
+ "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3905
+ className
3906
+ ),
3907
+ ...props
3908
+ }
3909
+ ) })
3910
+ );
3911
+ MenubarContent.displayName = MenubarPrimitive.Content.displayName;
3912
+ var MenubarItem = React32.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3913
+ MenubarPrimitive.Item,
3914
+ {
3915
+ ref,
3916
+ className: cn(
3917
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3918
+ inset && "pl-8",
3919
+ className
3920
+ ),
3921
+ ...props
3922
+ }
3923
+ ));
3924
+ MenubarItem.displayName = MenubarPrimitive.Item.displayName;
3925
+ var MenubarCheckboxItem = React32.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3926
+ MenubarPrimitive.CheckboxItem,
3927
+ {
3928
+ ref,
3929
+ className: cn(
3930
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3931
+ className
3932
+ ),
3933
+ checked,
3934
+ ...props,
3935
+ children: [
3936
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
3937
+ children
3938
+ ]
3939
+ }
3940
+ ));
3941
+ MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
3942
+ var MenubarRadioItem = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3943
+ MenubarPrimitive.RadioItem,
3944
+ {
3945
+ ref,
3946
+ className: cn(
3947
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3948
+ className
3949
+ ),
3950
+ ...props,
3951
+ children: [
3952
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
3953
+ children
3954
+ ]
3955
+ }
3956
+ ));
3957
+ MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
3958
+ var MenubarLabel = React32.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3959
+ MenubarPrimitive.Label,
3960
+ {
3961
+ ref,
3962
+ className: cn(
3963
+ "px-2 py-1.5 text-sm font-semibold",
3964
+ inset && "pl-8",
3965
+ className
3966
+ ),
3967
+ ...props
3968
+ }
3969
+ ));
3970
+ MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
3971
+ var MenubarSeparator = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3972
+ MenubarPrimitive.Separator,
3973
+ {
3974
+ ref,
3975
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
3976
+ ...props
3977
+ }
3978
+ ));
3979
+ MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
3980
+ var MenubarShortcut = ({
3981
+ className,
3982
+ ...props
3983
+ }) => {
3984
+ return /* @__PURE__ */ jsx(
3985
+ "span",
3986
+ {
3987
+ className: cn(
3988
+ "ml-auto text-xs tracking-widest text-muted-foreground",
3989
+ className
3990
+ ),
3991
+ ...props
3992
+ }
3993
+ );
3994
+ };
3995
+ MenubarShortcut.displayName = "MenubarShortcut";
3996
+ var tableVariants = cva(
3997
+ "w-full caption-bottom text-sm",
3998
+ {
3999
+ variants: {
4000
+ variant: {
4001
+ default: "dark:text-gray-200",
4002
+ bordered: "border border-border dark:border-gray-700",
4003
+ striped: "dark:text-gray-200",
4004
+ card: "border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",
4005
+ minimal: "border-none dark:text-gray-200"
4006
+ },
4007
+ size: {
4008
+ sm: "text-xs",
4009
+ default: "text-sm",
4010
+ lg: "text-base"
4011
+ }
4012
+ },
4013
+ defaultVariants: {
4014
+ variant: "default",
4015
+ size: "default"
4016
+ }
4017
+ }
4018
+ );
4019
+ var Table = React32.forwardRef(({
4020
+ className,
4021
+ variant,
4022
+ size,
4023
+ loading,
4024
+ emptyContent,
4025
+ // Commenting unused properties to prevent lint warnings
4026
+ // sortColumn,
4027
+ // sortDirection,
4028
+ // onSortChange,
4029
+ // selectedRowIds,
4030
+ // onRowSelectionChange,
4031
+ // disableRowSelection,
4032
+ // getRowId,
4033
+ ...props
4034
+ }, ref) => {
4035
+ const striped = variant === "striped";
4036
+ const childrenWithProps = React32.Children.map(props.children, (child) => {
4037
+ if (React32.isValidElement(child)) {
4038
+ if (child.type === "tbody") {
4039
+ const tbodyProps = child.props;
4040
+ return React32.cloneElement(child, {
4041
+ className: cn(tbodyProps.className, striped && "even:[&>tr]:bg-muted/50")
4042
+ });
4043
+ }
4044
+ }
4045
+ return child;
4046
+ });
4047
+ return /* @__PURE__ */ jsxs("div", { className: "relative w-full overflow-auto", children: [
4048
+ loading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-background/60 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }),
4049
+ /* @__PURE__ */ jsx(
4050
+ "table",
4051
+ {
4052
+ ref,
4053
+ className: cn(
4054
+ tableVariants({ variant, size }),
4055
+ loading && "opacity-70",
4056
+ className
4057
+ ),
4058
+ ...props,
4059
+ children: childrenWithProps
4060
+ }
4061
+ ),
4062
+ emptyContent && React32.Children.count(props.children) === 0 && /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-muted-foreground", children: emptyContent })
4063
+ ] });
4064
+ });
4065
+ Table.displayName = "Table";
4066
+ var TableHeader = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4067
+ "thead",
4068
+ {
4069
+ ref,
4070
+ className: cn(
4071
+ "border-b bg-muted/50 dark:bg-gray-800/30 dark:border-gray-700",
4072
+ className
4073
+ ),
4074
+ ...props
4075
+ }
4076
+ ));
4077
+ TableHeader.displayName = "TableHeader";
4078
+ var TableBody = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("", className), ...props }));
4079
+ TableBody.displayName = "TableBody";
4080
+ var TableFooter = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4081
+ "tfoot",
4082
+ {
4083
+ ref,
4084
+ className: cn("bg-primary text-primary-foreground font-medium", className),
4085
+ ...props
4086
+ }
4087
+ ));
4088
+ TableFooter.displayName = "TableFooter";
4089
+ var TableRow = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4090
+ "tr",
4091
+ {
4092
+ ref,
4093
+ className: cn(
4094
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
4095
+ className
4096
+ ),
4097
+ ...props
4098
+ }
4099
+ ));
4100
+ TableRow.displayName = "TableRow";
4101
+ var TableHead = React32.forwardRef(
4102
+ ({ className, sortable, sorted, onSort, children, ...props }, ref) => {
4103
+ const renderSortIcon = () => {
4104
+ if (!sortable)
4105
+ return null;
4106
+ if (sorted === "asc") {
4107
+ return /* @__PURE__ */ jsx(
4108
+ "svg",
4109
+ {
4110
+ xmlns: "http://www.w3.org/2000/svg",
4111
+ className: "ml-1 h-4 w-4 inline-block",
4112
+ viewBox: "0 0 20 20",
4113
+ fill: "currentColor",
4114
+ children: /* @__PURE__ */ jsx(
4115
+ "path",
4116
+ {
4117
+ fillRule: "evenodd",
4118
+ d: "M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",
4119
+ clipRule: "evenodd"
4120
+ }
4121
+ )
4122
+ }
4123
+ );
4124
+ }
4125
+ if (sorted === "desc") {
4126
+ return /* @__PURE__ */ jsx(
4127
+ "svg",
4128
+ {
4129
+ xmlns: "http://www.w3.org/2000/svg",
4130
+ className: "ml-1 h-4 w-4 inline-block",
4131
+ viewBox: "0 0 20 20",
4132
+ fill: "currentColor",
4133
+ children: /* @__PURE__ */ jsx(
4134
+ "path",
4135
+ {
4136
+ fillRule: "evenodd",
4137
+ d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",
4138
+ clipRule: "evenodd"
4139
+ }
4140
+ )
4141
+ }
4142
+ );
4143
+ }
4144
+ return /* @__PURE__ */ jsx(
4145
+ "svg",
4146
+ {
4147
+ xmlns: "http://www.w3.org/2000/svg",
4148
+ className: "ml-1 h-4 w-4 inline-block opacity-30",
4149
+ viewBox: "0 0 20 20",
4150
+ fill: "currentColor",
4151
+ children: /* @__PURE__ */ jsx(
4152
+ "path",
4153
+ {
4154
+ fillRule: "evenodd",
4155
+ d: "M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",
4156
+ clipRule: "evenodd"
4157
+ }
4158
+ )
4159
+ }
4160
+ );
4161
+ };
4162
+ return /* @__PURE__ */ jsx(
4163
+ "th",
4164
+ {
4165
+ ref,
4166
+ className: cn(
4167
+ "h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
4168
+ sortable && "cursor-pointer hover:text-foreground select-none",
4169
+ className
4170
+ ),
4171
+ onClick: sortable ? onSort : void 0,
4172
+ ...props,
4173
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4174
+ children,
4175
+ sortable && renderSortIcon()
4176
+ ] })
4177
+ }
4178
+ );
4179
+ }
4180
+ );
4181
+ TableHead.displayName = "TableHead";
4182
+ var TableCell = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4183
+ "td",
4184
+ {
4185
+ ref,
4186
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
4187
+ ...props
4188
+ }
4189
+ ));
4190
+ TableCell.displayName = "TableCell";
4191
+ var TableCaption = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4192
+ "caption",
4193
+ {
4194
+ ref,
4195
+ className: cn("mt-4 text-sm text-muted-foreground", className),
4196
+ ...props
4197
+ }
4198
+ ));
4199
+ TableCaption.displayName = "TableCaption";
4200
+
4201
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbList, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider2 as ThemeProvider, Toast, ToastContainer, ToastProvider, Toggle, Tooltip, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, combineRefs, commandGroupVariants, commandInputVariants, commandItemVariants, commandListVariants, commandVariants, createCssVariables, debounce, formatCurrency, generateId, get, navigationMenuTriggerStyle, popoverContentVariants, progressVariants, skeletonVariants, toastVariants, toggleVariants, tooltipContentVariants, useTheme, useToast };
4202
+ //# sourceMappingURL=out.js.map
4203
+ //# sourceMappingURL=index.mjs.map