@bison-lab/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,2401 @@
1
+ "use client";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ import * as React from "react";
5
+ import { defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, motionPresets, radiusPresets, shadowPresets } from "@bison-lab/tokens";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, ContextMenu as ContextMenu$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from "radix-ui";
8
+ import { cva } from "class-variance-authority";
9
+ import { ArrowLeft, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, FileQuestion, Inbox, Loader2, Mail, Menu, MoreHorizontal, Search, ServerCrash, Wrench, X } from "lucide-react";
10
+ import { Toaster as Toaster$1, toast } from "sonner";
11
+ import { Command as Command$1 } from "cmdk";
12
+ //#region src/lib/utils.ts
13
+ function cn(...inputs) {
14
+ return twMerge(clsx(inputs));
15
+ }
16
+ //#endregion
17
+ //#region src/providers/theme-provider.tsx
18
+ const ThemeProviderContext = React.createContext(void 0);
19
+ function ThemeProvider({ children, defaultTheme = "system", storageKey = "bison-theme", attribute = "class", ...props }) {
20
+ const [theme, setTheme] = React.useState(defaultTheme);
21
+ React.useEffect(() => {
22
+ const stored = localStorage.getItem(storageKey);
23
+ if (stored) setTheme(stored);
24
+ }, [storageKey]);
25
+ React.useEffect(() => {
26
+ const root = window.document.documentElement;
27
+ root.classList.remove("light", "dark");
28
+ if (theme === "system") {
29
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
30
+ root.classList.add(systemTheme);
31
+ } else root.classList.add(theme);
32
+ }, [theme, attribute]);
33
+ const value = React.useMemo(() => ({
34
+ theme,
35
+ setTheme: (newTheme) => {
36
+ localStorage.setItem(storageKey, newTheme);
37
+ setTheme(newTheme);
38
+ }
39
+ }), [theme, storageKey]);
40
+ return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, {
41
+ ...props,
42
+ value,
43
+ children
44
+ });
45
+ }
46
+ function useTheme() {
47
+ const context = React.useContext(ThemeProviderContext);
48
+ if (!context) throw new Error("useTheme must be used within a ThemeProvider");
49
+ return context;
50
+ }
51
+ //#endregion
52
+ //#region src/providers/density-provider.tsx
53
+ const DensityContext = React.createContext("default");
54
+ const densityClasses = {
55
+ compact: "bison-density-compact",
56
+ default: "bison-density-default",
57
+ spacious: "bison-density-spacious"
58
+ };
59
+ function DensityProvider({ children, density = "default" }) {
60
+ return /* @__PURE__ */ jsx(DensityContext.Provider, {
61
+ value: density,
62
+ children: /* @__PURE__ */ jsx("div", {
63
+ className: densityClasses[density],
64
+ children
65
+ })
66
+ });
67
+ }
68
+ function useDensity() {
69
+ return React.useContext(DensityContext);
70
+ }
71
+ //#endregion
72
+ //#region src/providers/bison-provider.tsx
73
+ function buildGoogleFontsUrl(fonts) {
74
+ return `https://fonts.googleapis.com/css2?${fonts.map((font) => {
75
+ const sortedWeights = [...font.weights ?? [
76
+ 400,
77
+ 500,
78
+ 600,
79
+ 700
80
+ ]].sort((a, b) => a - b);
81
+ if (font.italic) {
82
+ const ital = sortedWeights.flatMap((w) => [`0,${w}`, `1,${w}`]).join(";");
83
+ return `family=${font.family.replace(/ /g, "+")}:ital,wght@${ital}`;
84
+ }
85
+ return `family=${font.family.replace(/ /g, "+")}:wght@${sortedWeights.join(";")}`;
86
+ }).join("&")}&display=swap`;
87
+ }
88
+ function fontFamilyValue(font, fallback) {
89
+ return `"${font.family}", ${fallback}`;
90
+ }
91
+ function BisonProvider({ children, brandColors, radius = "rounded", shadow = "subtle", motion = "smooth", density = "default", defaultTheme = "system", storageKey = "bison-theme", bodyFont = {
92
+ family: "Inter",
93
+ weights: [
94
+ 400,
95
+ 500,
96
+ 600,
97
+ 700
98
+ ]
99
+ }, headingFont, monoFont = {
100
+ family: "JetBrains Mono",
101
+ weights: [
102
+ 400,
103
+ 500,
104
+ 600,
105
+ 700
106
+ ]
107
+ }, fontWeights = defaultFontWeights }) {
108
+ const resolvedHeadingFont = headingFont ?? bodyFont;
109
+ const lightPalette = React.useMemo(() => deriveLightPalette(brandColors), [brandColors]);
110
+ const darkPalette = React.useMemo(() => deriveDarkPalette(brandColors), [brandColors]);
111
+ const fontsUrl = React.useMemo(() => {
112
+ const fonts = [bodyFont];
113
+ if (headingFont && headingFont.family !== bodyFont.family) fonts.push(headingFont);
114
+ if (monoFont.family !== bodyFont.family) fonts.push(monoFont);
115
+ return buildGoogleFontsUrl(fonts);
116
+ }, [
117
+ bodyFont,
118
+ headingFont,
119
+ monoFont
120
+ ]);
121
+ const styleContent = React.useMemo(() => {
122
+ const radiusVars = radiusPresets[radius];
123
+ const shadowVars = shadowPresets[shadow];
124
+ const motionVars = motionPresets[motion];
125
+ const densityVars = densityPresets[density];
126
+ const fontVars = {
127
+ "--font-body": fontFamilyValue(bodyFont, "ui-sans-serif, system-ui, sans-serif"),
128
+ "--font-heading": fontFamilyValue(resolvedHeadingFont, "ui-sans-serif, system-ui, sans-serif"),
129
+ "--font-mono": fontFamilyValue(monoFont, "ui-monospace, monospace"),
130
+ "--font-weight-normal": String(fontWeights.normal),
131
+ "--font-weight-medium": String(fontWeights.medium),
132
+ "--font-weight-semibold": String(fontWeights.semibold),
133
+ "--font-weight-bold": String(fontWeights.bold)
134
+ };
135
+ const lightColorVars = Object.entries(lightPalette).map(([key, value]) => ` --${key}: ${value};`).join("\n");
136
+ const darkColorVars = Object.entries(darkPalette).map(([key, value]) => ` --${key}: ${value};`).join("\n");
137
+ return `:root {\n${lightColorVars}\n${[
138
+ ...Object.entries(radiusVars),
139
+ ...Object.entries(shadowVars),
140
+ ...Object.entries(motionVars),
141
+ ...Object.entries(densityVars),
142
+ ...Object.entries(fontVars)
143
+ ].map(([key, value]) => ` ${key}: ${value};`).join("\n")}\n font-family: var(--font-body);\n}\n\n.dark {\n${darkColorVars}\n}`;
144
+ }, [
145
+ radius,
146
+ shadow,
147
+ motion,
148
+ density,
149
+ bodyFont,
150
+ resolvedHeadingFont,
151
+ monoFont,
152
+ fontWeights,
153
+ lightPalette,
154
+ darkPalette
155
+ ]);
156
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
157
+ /* @__PURE__ */ jsx("link", {
158
+ rel: "preconnect",
159
+ href: "https://fonts.googleapis.com"
160
+ }),
161
+ /* @__PURE__ */ jsx("link", {
162
+ rel: "preconnect",
163
+ href: "https://fonts.gstatic.com",
164
+ crossOrigin: "anonymous"
165
+ }),
166
+ /* @__PURE__ */ jsx("link", {
167
+ rel: "stylesheet",
168
+ href: fontsUrl
169
+ }),
170
+ /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: styleContent } }),
171
+ /* @__PURE__ */ jsx(ThemeProvider, {
172
+ defaultTheme,
173
+ storageKey,
174
+ children: /* @__PURE__ */ jsx(DensityProvider, {
175
+ density,
176
+ children
177
+ })
178
+ })
179
+ ] });
180
+ }
181
+ //#endregion
182
+ //#region src/form/form.tsx
183
+ const FormContext = React.createContext(void 0);
184
+ function useFormContext() {
185
+ return React.useContext(FormContext);
186
+ }
187
+ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children, className, ...props }, ref) => {
188
+ const [errors, setErrors] = React.useState({});
189
+ const [touched, setTouched] = React.useState({});
190
+ const [isSubmitting, setIsSubmitting] = React.useState(false);
191
+ const setFieldError = React.useCallback((name, error) => {
192
+ setErrors((prev) => ({
193
+ ...prev,
194
+ [name]: error
195
+ }));
196
+ }, []);
197
+ const clearFieldError = React.useCallback((name) => {
198
+ setErrors((prev) => {
199
+ const next = { ...prev };
200
+ delete next[name];
201
+ return next;
202
+ });
203
+ }, []);
204
+ const setFieldTouched = React.useCallback((name) => {
205
+ setTouched((prev) => ({
206
+ ...prev,
207
+ [name]: true
208
+ }));
209
+ }, []);
210
+ const handleSubmit = React.useCallback(async (e) => {
211
+ e.preventDefault();
212
+ setIsSubmitting(true);
213
+ setErrors({});
214
+ const formData = new FormData(e.currentTarget);
215
+ const data = Object.fromEntries(formData.entries());
216
+ if (schema) try {
217
+ schema.parse(data);
218
+ } catch (err) {
219
+ const zodError = err;
220
+ const fieldErrors = {};
221
+ for (const issue of zodError.issues) {
222
+ const path = issue.path.join(".");
223
+ if (!fieldErrors[path]) fieldErrors[path] = issue.message;
224
+ }
225
+ setErrors(fieldErrors);
226
+ setIsSubmitting(false);
227
+ return;
228
+ }
229
+ try {
230
+ await onSubmit?.(data);
231
+ } finally {
232
+ setIsSubmitting(false);
233
+ }
234
+ }, [onSubmit, schema]);
235
+ const contextValue = React.useMemo(() => ({
236
+ errors,
237
+ touched,
238
+ setFieldError,
239
+ clearFieldError,
240
+ setFieldTouched,
241
+ isSubmitting,
242
+ formMode
243
+ }), [
244
+ errors,
245
+ touched,
246
+ setFieldError,
247
+ clearFieldError,
248
+ setFieldTouched,
249
+ isSubmitting,
250
+ formMode
251
+ ]);
252
+ return /* @__PURE__ */ jsx(FormContext.Provider, {
253
+ value: contextValue,
254
+ children: /* @__PURE__ */ jsx("form", {
255
+ ref,
256
+ onSubmit: handleSubmit,
257
+ className,
258
+ ...props,
259
+ children
260
+ })
261
+ });
262
+ });
263
+ Form.displayName = "Form";
264
+ //#endregion
265
+ //#region src/form/form-field.tsx
266
+ function FormField({ name, label, description, required, className, children }) {
267
+ const error = useFormContext()?.errors[name];
268
+ return /* @__PURE__ */ jsxs("div", {
269
+ className: cn("space-y-2", className),
270
+ children: [
271
+ label && /* @__PURE__ */ jsxs("label", {
272
+ htmlFor: name,
273
+ className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
274
+ children: [label, required && /* @__PURE__ */ jsx("span", {
275
+ className: "text-destructive ml-1",
276
+ children: "*"
277
+ })]
278
+ }),
279
+ children,
280
+ description && !error && /* @__PURE__ */ jsx("p", {
281
+ className: "text-sm text-muted-foreground",
282
+ children: description
283
+ }),
284
+ error && /* @__PURE__ */ jsx("p", {
285
+ className: "text-sm text-destructive",
286
+ children: error
287
+ })
288
+ ]
289
+ });
290
+ }
291
+ //#endregion
292
+ //#region src/form/form-error.tsx
293
+ function FormError({ message, className }) {
294
+ if (!message) return null;
295
+ return /* @__PURE__ */ jsx("div", {
296
+ className: cn("rounded-md border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive", className),
297
+ role: "alert",
298
+ children: message
299
+ });
300
+ }
301
+ //#endregion
302
+ //#region src/components/button.tsx
303
+ const buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors duration-fast ease-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
304
+ variants: {
305
+ variant: {
306
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
307
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
308
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
309
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
310
+ ghost: "hover:bg-accent hover:text-accent-foreground",
311
+ link: "text-primary underline-offset-4 hover:underline"
312
+ },
313
+ size: {
314
+ sm: "h-[var(--density-height-sm)] px-3 text-xs rounded-sm",
315
+ md: "h-[var(--density-height-md)] px-4 py-2",
316
+ lg: "h-[var(--density-height-lg)] px-8 text-base rounded-lg",
317
+ icon: "h-[var(--density-height-md)] w-[var(--density-height-md)]"
318
+ }
319
+ },
320
+ defaultVariants: {
321
+ variant: "default",
322
+ size: "md"
323
+ }
324
+ });
325
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
326
+ return /* @__PURE__ */ jsx(asChild ? Slot.Slot : "button", {
327
+ className: cn(buttonVariants({
328
+ variant,
329
+ size,
330
+ className
331
+ })),
332
+ ref,
333
+ ...props
334
+ });
335
+ });
336
+ Button.displayName = "Button";
337
+ //#endregion
338
+ //#region src/components/input.tsx
339
+ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
340
+ return /* @__PURE__ */ jsx("input", {
341
+ type,
342
+ className: cn("flex h-[var(--density-height-md)] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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", className),
343
+ ref,
344
+ ...props
345
+ });
346
+ });
347
+ Input.displayName = "Input";
348
+ //#endregion
349
+ //#region src/components/textarea.tsx
350
+ const Textarea = React.forwardRef(({ className, ...props }, ref) => {
351
+ return /* @__PURE__ */ jsx("textarea", {
352
+ className: cn("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", className),
353
+ ref,
354
+ ...props
355
+ });
356
+ });
357
+ Textarea.displayName = "Textarea";
358
+ //#endregion
359
+ //#region src/components/label.tsx
360
+ const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
361
+ const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Label$1.Root, {
362
+ ref,
363
+ className: cn(labelVariants(), className),
364
+ ...props
365
+ }));
366
+ Label.displayName = Label$1.Root.displayName;
367
+ //#endregion
368
+ //#region src/components/select.tsx
369
+ const Select = Select$1.Root;
370
+ const SelectGroup = Select$1.Group;
371
+ const SelectValue = Select$1.Value;
372
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Select$1.Trigger, {
373
+ ref,
374
+ className: cn("flex h-[var(--density-height-md)] w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className),
375
+ ...props,
376
+ children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
377
+ asChild: true,
378
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" })
379
+ })]
380
+ }));
381
+ SelectTrigger.displayName = Select$1.Trigger.displayName;
382
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollUpButton, {
383
+ ref,
384
+ className: cn("flex cursor-default items-center justify-center py-1", className),
385
+ ...props,
386
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
387
+ }));
388
+ SelectScrollUpButton.displayName = Select$1.ScrollUpButton.displayName;
389
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollDownButton, {
390
+ ref,
391
+ className: cn("flex cursor-default items-center justify-center py-1", className),
392
+ ...props,
393
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
394
+ }));
395
+ SelectScrollDownButton.displayName = Select$1.ScrollDownButton.displayName;
396
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsxs(Select$1.Content, {
397
+ ref,
398
+ className: cn("relative z-[var(--z-popover)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", 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", className),
399
+ position,
400
+ ...props,
401
+ children: [
402
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
403
+ /* @__PURE__ */ jsx(Select$1.Viewport, {
404
+ className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
405
+ children
406
+ }),
407
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
408
+ ]
409
+ }) }));
410
+ SelectContent.displayName = Select$1.Content.displayName;
411
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Label, {
412
+ ref,
413
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
414
+ ...props
415
+ }));
416
+ SelectLabel.displayName = Select$1.Label.displayName;
417
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Select$1.Item, {
418
+ ref,
419
+ className: cn("relative flex w-full 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", className),
420
+ ...props,
421
+ children: [/* @__PURE__ */ jsx("span", {
422
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
423
+ children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
424
+ }), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
425
+ }));
426
+ SelectItem.displayName = Select$1.Item.displayName;
427
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Separator, {
428
+ ref,
429
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
430
+ ...props
431
+ }));
432
+ SelectSeparator.displayName = Select$1.Separator.displayName;
433
+ //#endregion
434
+ //#region src/components/checkbox.tsx
435
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Checkbox$1.Root, {
436
+ ref,
437
+ className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className),
438
+ ...props,
439
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
440
+ className: cn("flex items-center justify-center text-current"),
441
+ children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
442
+ })
443
+ }));
444
+ Checkbox.displayName = Checkbox$1.Root.displayName;
445
+ //#endregion
446
+ //#region src/components/radio-group.tsx
447
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup$1.Root, {
448
+ className: cn("grid gap-2", className),
449
+ ...props,
450
+ ref
451
+ }));
452
+ RadioGroup.displayName = RadioGroup$1.Root.displayName;
453
+ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup$1.Item, {
454
+ ref,
455
+ className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
456
+ ...props,
457
+ children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
458
+ className: "flex items-center justify-center",
459
+ children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" })
460
+ })
461
+ }));
462
+ RadioGroupItem.displayName = RadioGroup$1.Item.displayName;
463
+ //#endregion
464
+ //#region src/components/switch.tsx
465
+ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Switch$1.Root, {
466
+ className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast ease-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className),
467
+ ...props,
468
+ ref,
469
+ children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast ease-default data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
470
+ }));
471
+ Switch.displayName = Switch$1.Root.displayName;
472
+ //#endregion
473
+ //#region src/components/slider.tsx
474
+ const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Slider$1.Root, {
475
+ ref,
476
+ className: cn("relative flex w-full touch-none select-none items-center", className),
477
+ ...props,
478
+ children: [/* @__PURE__ */ jsx(Slider$1.Track, {
479
+ className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
480
+ children: /* @__PURE__ */ jsx(Slider$1.Range, { className: "absolute h-full bg-primary" })
481
+ }), /* @__PURE__ */ jsx(Slider$1.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" })]
482
+ }));
483
+ Slider.displayName = Slider$1.Root.displayName;
484
+ //#endregion
485
+ //#region src/components/card.tsx
486
+ const Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
487
+ ref,
488
+ className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className),
489
+ ...props
490
+ }));
491
+ Card.displayName = "Card";
492
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
493
+ ref,
494
+ className: cn("flex flex-col space-y-1.5 p-[var(--density-padding-xl)]", className),
495
+ ...props
496
+ }));
497
+ CardHeader.displayName = "CardHeader";
498
+ const CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", {
499
+ ref,
500
+ className: cn("text-2xl font-semibold leading-none tracking-tight", className),
501
+ ...props
502
+ }));
503
+ CardTitle.displayName = "CardTitle";
504
+ const CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", {
505
+ ref,
506
+ className: cn("text-sm text-muted-foreground", className),
507
+ ...props
508
+ }));
509
+ CardDescription.displayName = "CardDescription";
510
+ const CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
511
+ ref,
512
+ className: cn("p-[var(--density-padding-xl)] pt-0", className),
513
+ ...props
514
+ }));
515
+ CardContent.displayName = "CardContent";
516
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
517
+ ref,
518
+ className: cn("flex items-center p-[var(--density-padding-xl)] pt-0", className),
519
+ ...props
520
+ }));
521
+ CardFooter.displayName = "CardFooter";
522
+ //#endregion
523
+ //#region src/components/badge.tsx
524
+ const badgeVariants = cva("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", {
525
+ variants: { variant: {
526
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
527
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
528
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
529
+ outline: "text-foreground"
530
+ } },
531
+ defaultVariants: { variant: "default" }
532
+ });
533
+ function Badge({ className, variant, ...props }) {
534
+ return /* @__PURE__ */ jsx("div", {
535
+ className: cn(badgeVariants({ variant }), className),
536
+ ...props
537
+ });
538
+ }
539
+ //#endregion
540
+ //#region src/components/avatar.tsx
541
+ const Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Avatar$1.Root, {
542
+ ref,
543
+ className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
544
+ ...props
545
+ }));
546
+ Avatar.displayName = Avatar$1.Root.displayName;
547
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Avatar$1.Image, {
548
+ ref,
549
+ className: cn("aspect-square h-full w-full", className),
550
+ ...props
551
+ }));
552
+ AvatarImage.displayName = Avatar$1.Image.displayName;
553
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Avatar$1.Fallback, {
554
+ ref,
555
+ className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
556
+ ...props
557
+ }));
558
+ AvatarFallback.displayName = Avatar$1.Fallback.displayName;
559
+ //#endregion
560
+ //#region src/components/separator.tsx
561
+ const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(Separator$1.Root, {
562
+ ref,
563
+ decorative,
564
+ orientation,
565
+ className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
566
+ ...props
567
+ }));
568
+ Separator.displayName = Separator$1.Root.displayName;
569
+ //#endregion
570
+ //#region src/components/dialog.tsx
571
+ const Dialog = Dialog$1.Root;
572
+ const DialogTrigger = Dialog$1.Trigger;
573
+ const DialogPortal = Dialog$1.Portal;
574
+ const DialogClose = Dialog$1.Close;
575
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Overlay, {
576
+ ref,
577
+ className: cn("fixed inset-0 z-[var(--z-modal-backdrop)] 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", className),
578
+ ...props
579
+ }));
580
+ DialogOverlay.displayName = Dialog$1.Overlay.displayName;
581
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
582
+ ref,
583
+ className: cn("fixed left-[50%] top-[50%] z-[var(--z-modal)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-normal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg", className),
584
+ ...props,
585
+ children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
586
+ className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
587
+ children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
588
+ className: "sr-only",
589
+ children: "Close"
590
+ })]
591
+ })]
592
+ })] }));
593
+ DialogContent.displayName = Dialog$1.Content.displayName;
594
+ const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
595
+ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
596
+ ...props
597
+ });
598
+ DialogHeader.displayName = "DialogHeader";
599
+ const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
600
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
601
+ ...props
602
+ });
603
+ DialogFooter.displayName = "DialogFooter";
604
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Title, {
605
+ ref,
606
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
607
+ ...props
608
+ }));
609
+ DialogTitle.displayName = Dialog$1.Title.displayName;
610
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Description, {
611
+ ref,
612
+ className: cn("text-sm text-muted-foreground", className),
613
+ ...props
614
+ }));
615
+ DialogDescription.displayName = Dialog$1.Description.displayName;
616
+ //#endregion
617
+ //#region src/components/alert-dialog.tsx
618
+ const AlertDialog = AlertDialog$1.Root;
619
+ const AlertDialogTrigger = AlertDialog$1.Trigger;
620
+ const AlertDialogPortal = AlertDialog$1.Portal;
621
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Overlay, {
622
+ className: cn("fixed inset-0 z-[var(--z-modal-backdrop)] 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", className),
623
+ ...props,
624
+ ref
625
+ }));
626
+ AlertDialogOverlay.displayName = AlertDialog$1.Overlay.displayName;
627
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
628
+ ref,
629
+ className: cn("fixed left-[50%] top-[50%] z-[var(--z-modal)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-normal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg", className),
630
+ ...props
631
+ })] }));
632
+ AlertDialogContent.displayName = AlertDialog$1.Content.displayName;
633
+ const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
634
+ className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
635
+ ...props
636
+ });
637
+ const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
638
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
639
+ ...props
640
+ });
641
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Title, {
642
+ ref,
643
+ className: cn("text-lg font-semibold", className),
644
+ ...props
645
+ }));
646
+ AlertDialogTitle.displayName = AlertDialog$1.Title.displayName;
647
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Description, {
648
+ ref,
649
+ className: cn("text-sm text-muted-foreground", className),
650
+ ...props
651
+ }));
652
+ AlertDialogDescription.displayName = AlertDialog$1.Description.displayName;
653
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Action, {
654
+ ref,
655
+ className: cn(buttonVariants(), className),
656
+ ...props
657
+ }));
658
+ AlertDialogAction.displayName = AlertDialog$1.Action.displayName;
659
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Cancel, {
660
+ ref,
661
+ className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
662
+ ...props
663
+ }));
664
+ AlertDialogCancel.displayName = AlertDialog$1.Cancel.displayName;
665
+ //#endregion
666
+ //#region src/components/sheet.tsx
667
+ const Sheet = Dialog$1.Root;
668
+ const SheetTrigger = Dialog$1.Trigger;
669
+ const SheetClose = Dialog$1.Close;
670
+ const SheetPortal = Dialog$1.Portal;
671
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Overlay, {
672
+ className: cn("fixed inset-0 z-[var(--z-modal-backdrop)] 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", className),
673
+ ...props,
674
+ ref
675
+ }));
676
+ SheetOverlay.displayName = Dialog$1.Overlay.displayName;
677
+ const sheetVariants = cva("fixed z-[var(--z-modal)] 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-slow data-[state=open]:duration-normal", {
678
+ variants: { side: {
679
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
680
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
681
+ 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",
682
+ 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"
683
+ } },
684
+ defaultVariants: { side: "right" }
685
+ });
686
+ const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
687
+ ref,
688
+ className: cn(sheetVariants({ side }), className),
689
+ ...props,
690
+ children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
691
+ 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",
692
+ children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
693
+ className: "sr-only",
694
+ children: "Close"
695
+ })]
696
+ })]
697
+ })] }));
698
+ SheetContent.displayName = Dialog$1.Content.displayName;
699
+ const SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
700
+ className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
701
+ ...props
702
+ });
703
+ const SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
704
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
705
+ ...props
706
+ });
707
+ const SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Title, {
708
+ ref,
709
+ className: cn("text-lg font-semibold text-foreground", className),
710
+ ...props
711
+ }));
712
+ SheetTitle.displayName = Dialog$1.Title.displayName;
713
+ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Description, {
714
+ ref,
715
+ className: cn("text-sm text-muted-foreground", className),
716
+ ...props
717
+ }));
718
+ SheetDescription.displayName = Dialog$1.Description.displayName;
719
+ //#endregion
720
+ //#region src/components/popover.tsx
721
+ const Popover = Popover$1.Root;
722
+ const PopoverTrigger = Popover$1.Trigger;
723
+ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Content, {
724
+ ref,
725
+ align,
726
+ sideOffset,
727
+ className: cn("z-[var(--z-popover)] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
728
+ ...props
729
+ }) }));
730
+ PopoverContent.displayName = Popover$1.Content.displayName;
731
+ //#endregion
732
+ //#region src/components/dropdown-menu.tsx
733
+ const DropdownMenu = DropdownMenu$1.Root;
734
+ const DropdownMenuTrigger = DropdownMenu$1.Trigger;
735
+ const DropdownMenuGroup = DropdownMenu$1.Group;
736
+ const DropdownMenuPortal = DropdownMenu$1.Portal;
737
+ const DropdownMenuSub = DropdownMenu$1.Sub;
738
+ const DropdownMenuRadioGroup = DropdownMenu$1.RadioGroup;
739
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger, {
740
+ ref,
741
+ className: cn("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", inset && "pl-8", className),
742
+ ...props,
743
+ children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })]
744
+ }));
745
+ DropdownMenuSubTrigger.displayName = DropdownMenu$1.SubTrigger.displayName;
746
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.SubContent, {
747
+ ref,
748
+ className: cn("z-[var(--z-dropdown)] 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", className),
749
+ ...props
750
+ }));
751
+ DropdownMenuSubContent.displayName = DropdownMenu$1.SubContent.displayName;
752
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu$1.Content, {
753
+ ref,
754
+ sideOffset,
755
+ className: cn("z-[var(--z-dropdown)] 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", className),
756
+ ...props
757
+ }) }));
758
+ DropdownMenuContent.displayName = DropdownMenu$1.Content.displayName;
759
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.Item, {
760
+ ref,
761
+ className: cn("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", inset && "pl-8", className),
762
+ ...props
763
+ }));
764
+ DropdownMenuItem.displayName = DropdownMenu$1.Item.displayName;
765
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem, {
766
+ ref,
767
+ className: cn("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", className),
768
+ checked,
769
+ ...props,
770
+ children: [/* @__PURE__ */ jsx("span", {
771
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
772
+ children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
773
+ }), children]
774
+ }));
775
+ DropdownMenuCheckboxItem.displayName = DropdownMenu$1.CheckboxItem.displayName;
776
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem, {
777
+ ref,
778
+ className: cn("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", className),
779
+ ...props,
780
+ children: [/* @__PURE__ */ jsx("span", {
781
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
782
+ children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) })
783
+ }), children]
784
+ }));
785
+ DropdownMenuRadioItem.displayName = DropdownMenu$1.RadioItem.displayName;
786
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.Label, {
787
+ ref,
788
+ className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
789
+ ...props
790
+ }));
791
+ DropdownMenuLabel.displayName = DropdownMenu$1.Label.displayName;
792
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.Separator, {
793
+ ref,
794
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
795
+ ...props
796
+ }));
797
+ DropdownMenuSeparator.displayName = DropdownMenu$1.Separator.displayName;
798
+ const DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", {
799
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
800
+ ...props
801
+ });
802
+ //#endregion
803
+ //#region src/components/tooltip.tsx
804
+ const TooltipProvider = Tooltip$1.Provider;
805
+ const Tooltip = Tooltip$1.Root;
806
+ const TooltipTrigger = Tooltip$1.Trigger;
807
+ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Content, {
808
+ ref,
809
+ sideOffset,
810
+ className: cn("z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
811
+ ...props
812
+ }));
813
+ TooltipContent.displayName = Tooltip$1.Content.displayName;
814
+ //#endregion
815
+ //#region src/components/toast.tsx
816
+ function Toaster({ position = "bottom-right", richColors = true, closeButton = true, ...props }) {
817
+ return /* @__PURE__ */ jsx(Toaster$1, {
818
+ position,
819
+ richColors,
820
+ closeButton,
821
+ toastOptions: { classNames: {
822
+ toast: "group border-border bg-background text-foreground shadow-lg",
823
+ description: "text-muted-foreground",
824
+ actionButton: "bg-primary text-primary-foreground",
825
+ cancelButton: "bg-muted text-muted-foreground"
826
+ } },
827
+ ...props
828
+ });
829
+ }
830
+ //#endregion
831
+ //#region src/components/tabs.tsx
832
+ const Tabs = Tabs$1.Root;
833
+ const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.List, {
834
+ ref,
835
+ className: cn("inline-flex h-[var(--density-height-md)] items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className),
836
+ ...props
837
+ }));
838
+ TabsList.displayName = Tabs$1.List.displayName;
839
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.Trigger, {
840
+ ref,
841
+ className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className),
842
+ ...props
843
+ }));
844
+ TabsTrigger.displayName = Tabs$1.Trigger.displayName;
845
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.Content, {
846
+ ref,
847
+ className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
848
+ ...props
849
+ }));
850
+ TabsContent.displayName = Tabs$1.Content.displayName;
851
+ //#endregion
852
+ //#region src/components/accordion.tsx
853
+ const Accordion = Accordion$1.Root;
854
+ const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Item, {
855
+ ref,
856
+ className: cn("border-b", className),
857
+ ...props
858
+ }));
859
+ AccordionItem.displayName = "AccordionItem";
860
+ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Header, {
861
+ className: "flex",
862
+ children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
863
+ ref,
864
+ className: cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className),
865
+ ...props,
866
+ children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-normal" })]
867
+ })
868
+ }));
869
+ AccordionTrigger.displayName = Accordion$1.Trigger.displayName;
870
+ const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Content, {
871
+ ref,
872
+ className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
873
+ ...props,
874
+ children: /* @__PURE__ */ jsx("div", {
875
+ className: cn("pb-4 pt-0", className),
876
+ children
877
+ })
878
+ }));
879
+ AccordionContent.displayName = Accordion$1.Content.displayName;
880
+ //#endregion
881
+ //#region src/components/table.tsx
882
+ const Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
883
+ className: "relative w-full overflow-auto",
884
+ children: /* @__PURE__ */ jsx("table", {
885
+ ref,
886
+ className: cn("w-full caption-bottom text-sm", className),
887
+ ...props
888
+ })
889
+ }));
890
+ Table.displayName = "Table";
891
+ const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
892
+ ref,
893
+ className: cn("[&_tr]:border-b", className),
894
+ ...props
895
+ }));
896
+ TableHeader.displayName = "TableHeader";
897
+ const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
898
+ ref,
899
+ className: cn("[&_tr:last-child]:border-0", className),
900
+ ...props
901
+ }));
902
+ TableBody.displayName = "TableBody";
903
+ const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
904
+ ref,
905
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
906
+ ...props
907
+ }));
908
+ TableFooter.displayName = "TableFooter";
909
+ const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", {
910
+ ref,
911
+ className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
912
+ ...props
913
+ }));
914
+ TableRow.displayName = "TableRow";
915
+ const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", {
916
+ ref,
917
+ className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className),
918
+ ...props
919
+ }));
920
+ TableHead.displayName = "TableHead";
921
+ const TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", {
922
+ ref,
923
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
924
+ ...props
925
+ }));
926
+ TableCell.displayName = "TableCell";
927
+ const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
928
+ ref,
929
+ className: cn("mt-4 text-sm text-muted-foreground", className),
930
+ ...props
931
+ }));
932
+ TableCaption.displayName = "TableCaption";
933
+ //#endregion
934
+ //#region src/components/progress.tsx
935
+ const Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(Progress$1.Root, {
936
+ ref,
937
+ className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
938
+ ...props,
939
+ children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
940
+ className: "h-full w-full flex-1 bg-primary transition-all duration-normal ease-default",
941
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
942
+ })
943
+ }));
944
+ Progress.displayName = Progress$1.Root.displayName;
945
+ //#endregion
946
+ //#region src/components/scroll-area.tsx
947
+ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
948
+ ref,
949
+ className: cn("relative overflow-hidden", className),
950
+ ...props,
951
+ children: [
952
+ /* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
953
+ className: "h-full w-full rounded-[inherit]",
954
+ children
955
+ }),
956
+ /* @__PURE__ */ jsx(ScrollBar, {}),
957
+ /* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
958
+ ]
959
+ }));
960
+ ScrollArea.displayName = ScrollArea$1.Root.displayName;
961
+ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(ScrollArea$1.ScrollAreaScrollbar, {
962
+ ref,
963
+ orientation,
964
+ className: cn("flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", className),
965
+ ...props,
966
+ children: /* @__PURE__ */ jsx(ScrollArea$1.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
967
+ }));
968
+ ScrollBar.displayName = ScrollArea$1.ScrollAreaScrollbar.displayName;
969
+ //#endregion
970
+ //#region src/components/skeleton.tsx
971
+ function Skeleton({ className, ...props }) {
972
+ return /* @__PURE__ */ jsx("div", {
973
+ className: cn("animate-pulse rounded-md bg-muted", className),
974
+ ...props
975
+ });
976
+ }
977
+ //#endregion
978
+ //#region src/components/spinner.tsx
979
+ const spinnerVariants = cva("animate-spin text-muted-foreground", {
980
+ variants: { size: {
981
+ sm: "h-4 w-4",
982
+ md: "h-6 w-6",
983
+ lg: "h-8 w-8"
984
+ } },
985
+ defaultVariants: { size: "md" }
986
+ });
987
+ function Spinner({ className, size, ...props }) {
988
+ return /* @__PURE__ */ jsx(Loader2, {
989
+ className: cn(spinnerVariants({ size }), className),
990
+ ...props
991
+ });
992
+ }
993
+ //#endregion
994
+ //#region src/components/context-menu.tsx
995
+ const ContextMenu = ContextMenu$1.Root;
996
+ const ContextMenuTrigger = ContextMenu$1.Trigger;
997
+ const ContextMenuGroup = ContextMenu$1.Group;
998
+ const ContextMenuPortal = ContextMenu$1.Portal;
999
+ const ContextMenuSub = ContextMenu$1.Sub;
1000
+ const ContextMenuRadioGroup = ContextMenu$1.RadioGroup;
1001
+ const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.SubTrigger, {
1002
+ ref,
1003
+ className: cn("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", inset && "pl-8", className),
1004
+ ...props,
1005
+ children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })]
1006
+ }));
1007
+ ContextMenuSubTrigger.displayName = ContextMenu$1.SubTrigger.displayName;
1008
+ const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.SubContent, {
1009
+ ref,
1010
+ className: cn("z-[var(--z-dropdown)] 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", className),
1011
+ ...props
1012
+ }));
1013
+ ContextMenuSubContent.displayName = ContextMenu$1.SubContent.displayName;
1014
+ const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Content, {
1015
+ ref,
1016
+ className: cn("z-[var(--z-dropdown)] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
1017
+ ...props
1018
+ }) }));
1019
+ ContextMenuContent.displayName = ContextMenu$1.Content.displayName;
1020
+ const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Item, {
1021
+ ref,
1022
+ className: cn("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", inset && "pl-8", className),
1023
+ ...props
1024
+ }));
1025
+ ContextMenuItem.displayName = ContextMenu$1.Item.displayName;
1026
+ const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
1027
+ ref,
1028
+ className: cn("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", className),
1029
+ checked,
1030
+ ...props,
1031
+ children: [/* @__PURE__ */ jsx("span", {
1032
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1033
+ children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
1034
+ }), children]
1035
+ }));
1036
+ ContextMenuCheckboxItem.displayName = ContextMenu$1.CheckboxItem.displayName;
1037
+ const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
1038
+ ref,
1039
+ className: cn("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", className),
1040
+ ...props,
1041
+ children: [/* @__PURE__ */ jsx("span", {
1042
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1043
+ children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) })
1044
+ }), children]
1045
+ }));
1046
+ ContextMenuRadioItem.displayName = ContextMenu$1.RadioItem.displayName;
1047
+ const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Label, {
1048
+ ref,
1049
+ className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
1050
+ ...props
1051
+ }));
1052
+ ContextMenuLabel.displayName = ContextMenu$1.Label.displayName;
1053
+ const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
1054
+ ref,
1055
+ className: cn("-mx-1 my-1 h-px bg-border", className),
1056
+ ...props
1057
+ }));
1058
+ ContextMenuSeparator.displayName = ContextMenu$1.Separator.displayName;
1059
+ const ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", {
1060
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
1061
+ ...props
1062
+ });
1063
+ //#endregion
1064
+ //#region src/components/navigation-menu.tsx
1065
+ const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
1066
+ ref,
1067
+ className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className),
1068
+ ...props,
1069
+ children: [children, /* @__PURE__ */ jsx(NavigationMenuViewport, {})]
1070
+ }));
1071
+ NavigationMenu.displayName = NavigationMenu$1.Root.displayName;
1072
+ const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.List, {
1073
+ ref,
1074
+ className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className),
1075
+ ...props
1076
+ }));
1077
+ NavigationMenuList.displayName = NavigationMenu$1.List.displayName;
1078
+ const NavigationMenuItem = NavigationMenu$1.Item;
1079
+ const navigationMenuTriggerStyle = cva("group inline-flex h-[var(--density-height-md)] 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");
1080
+ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
1081
+ ref,
1082
+ className: cn(navigationMenuTriggerStyle(), "group", className),
1083
+ ...props,
1084
+ children: [
1085
+ children,
1086
+ " ",
1087
+ /* @__PURE__ */ jsx(ChevronDown, {
1088
+ className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
1089
+ "aria-hidden": "true"
1090
+ })
1091
+ ]
1092
+ }));
1093
+ NavigationMenuTrigger.displayName = NavigationMenu$1.Trigger.displayName;
1094
+ const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
1095
+ ref,
1096
+ className: cn("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", className),
1097
+ ...props
1098
+ }));
1099
+ NavigationMenuContent.displayName = NavigationMenu$1.Content.displayName;
1100
+ const NavigationMenuLink = NavigationMenu$1.Link;
1101
+ const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1102
+ className: cn("absolute left-0 top-full flex justify-center"),
1103
+ children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, {
1104
+ className: cn("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)]", className),
1105
+ ref,
1106
+ ...props
1107
+ })
1108
+ }));
1109
+ NavigationMenuViewport.displayName = NavigationMenu$1.Viewport.displayName;
1110
+ const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Indicator, {
1111
+ ref,
1112
+ className: cn("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", className),
1113
+ ...props,
1114
+ children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
1115
+ }));
1116
+ NavigationMenuIndicator.displayName = NavigationMenu$1.Indicator.displayName;
1117
+ //#endregion
1118
+ //#region src/components/breadcrumb.tsx
1119
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", {
1120
+ ref,
1121
+ "aria-label": "breadcrumb",
1122
+ ...props
1123
+ }));
1124
+ Breadcrumb.displayName = "Breadcrumb";
1125
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ol", {
1126
+ ref,
1127
+ className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className),
1128
+ ...props
1129
+ }));
1130
+ BreadcrumbList.displayName = "BreadcrumbList";
1131
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", {
1132
+ ref,
1133
+ className: cn("inline-flex items-center gap-1.5", className),
1134
+ ...props
1135
+ }));
1136
+ BreadcrumbItem.displayName = "BreadcrumbItem";
1137
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
1138
+ return /* @__PURE__ */ jsx(asChild ? Slot.Slot : "a", {
1139
+ ref,
1140
+ className: cn("transition-colors hover:text-foreground", className),
1141
+ ...props
1142
+ });
1143
+ });
1144
+ BreadcrumbLink.displayName = "BreadcrumbLink";
1145
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
1146
+ ref,
1147
+ role: "link",
1148
+ "aria-disabled": "true",
1149
+ "aria-current": "page",
1150
+ className: cn("font-normal text-foreground", className),
1151
+ ...props
1152
+ }));
1153
+ BreadcrumbPage.displayName = "BreadcrumbPage";
1154
+ const BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx("li", {
1155
+ role: "presentation",
1156
+ "aria-hidden": "true",
1157
+ className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
1158
+ ...props,
1159
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
1160
+ });
1161
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
1162
+ const BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
1163
+ role: "presentation",
1164
+ "aria-hidden": "true",
1165
+ className: cn("flex h-9 w-9 items-center justify-center", className),
1166
+ ...props,
1167
+ children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
1168
+ className: "sr-only",
1169
+ children: "More"
1170
+ })]
1171
+ });
1172
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
1173
+ //#endregion
1174
+ //#region src/components/pagination.tsx
1175
+ const Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx("nav", {
1176
+ role: "navigation",
1177
+ "aria-label": "pagination",
1178
+ className: cn("mx-auto flex w-full justify-center", className),
1179
+ ...props
1180
+ });
1181
+ Pagination.displayName = "Pagination";
1182
+ const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", {
1183
+ ref,
1184
+ className: cn("flex flex-row items-center gap-1", className),
1185
+ ...props
1186
+ }));
1187
+ PaginationContent.displayName = "PaginationContent";
1188
+ const PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", {
1189
+ ref,
1190
+ className: cn("", className),
1191
+ ...props
1192
+ }));
1193
+ PaginationItem.displayName = "PaginationItem";
1194
+ const PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx("a", {
1195
+ "aria-current": isActive ? "page" : void 0,
1196
+ className: cn(buttonVariants({
1197
+ variant: isActive ? "outline" : "ghost",
1198
+ size
1199
+ }), className),
1200
+ ...props
1201
+ });
1202
+ PaginationLink.displayName = "PaginationLink";
1203
+ const PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs(PaginationLink, {
1204
+ "aria-label": "Go to previous page",
1205
+ size: "md",
1206
+ className: cn("gap-1 pl-2.5", className),
1207
+ ...props,
1208
+ children: [/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
1209
+ });
1210
+ PaginationPrevious.displayName = "PaginationPrevious";
1211
+ const PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs(PaginationLink, {
1212
+ "aria-label": "Go to next page",
1213
+ size: "md",
1214
+ className: cn("gap-1 pr-2.5", className),
1215
+ ...props,
1216
+ children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })]
1217
+ });
1218
+ PaginationNext.displayName = "PaginationNext";
1219
+ const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
1220
+ "aria-hidden": true,
1221
+ className: cn("flex h-9 w-9 items-center justify-center", className),
1222
+ ...props,
1223
+ children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
1224
+ className: "sr-only",
1225
+ children: "More pages"
1226
+ })]
1227
+ });
1228
+ PaginationEllipsis.displayName = "PaginationEllipsis";
1229
+ //#endregion
1230
+ //#region src/components/command.tsx
1231
+ const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1, {
1232
+ ref,
1233
+ className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
1234
+ ...props
1235
+ }));
1236
+ Command.displayName = Command$1.displayName;
1237
+ const CommandDialog = ({ children, ...props }) => /* @__PURE__ */ jsx(Dialog, {
1238
+ ...props,
1239
+ children: /* @__PURE__ */ jsx(DialogContent, {
1240
+ className: "overflow-hidden p-0 shadow-lg",
1241
+ children: /* @__PURE__ */ jsx(Command, {
1242
+ className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
1243
+ children
1244
+ })
1245
+ })
1246
+ });
1247
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", {
1248
+ className: "flex items-center border-b px-3",
1249
+ "cmdk-input-wrapper": "",
1250
+ children: [/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
1251
+ ref,
1252
+ className: cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
1253
+ ...props
1254
+ })]
1255
+ }));
1256
+ CommandInput.displayName = Command$1.Input.displayName;
1257
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.List, {
1258
+ ref,
1259
+ className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
1260
+ ...props
1261
+ }));
1262
+ CommandList.displayName = Command$1.List.displayName;
1263
+ const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, {
1264
+ ref,
1265
+ className: "py-6 text-center text-sm",
1266
+ ...props
1267
+ }));
1268
+ CommandEmpty.displayName = Command$1.Empty.displayName;
1269
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Group, {
1270
+ ref,
1271
+ className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
1272
+ ...props
1273
+ }));
1274
+ CommandGroup.displayName = Command$1.Group.displayName;
1275
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
1276
+ ref,
1277
+ className: cn("-mx-1 h-px bg-border", className),
1278
+ ...props
1279
+ }));
1280
+ CommandSeparator.displayName = Command$1.Separator.displayName;
1281
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Item, {
1282
+ ref,
1283
+ className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", className),
1284
+ ...props
1285
+ }));
1286
+ CommandItem.displayName = Command$1.Item.displayName;
1287
+ const CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", {
1288
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
1289
+ ...props
1290
+ });
1291
+ //#endregion
1292
+ //#region src/components/aspect-ratio.tsx
1293
+ const AspectRatio = AspectRatio$1.Root;
1294
+ //#endregion
1295
+ //#region src/blocks/auth/social-providers.tsx
1296
+ const providerConfig = {
1297
+ google: {
1298
+ label: "Google",
1299
+ icon: /* @__PURE__ */ jsxs("svg", {
1300
+ className: "h-4 w-4",
1301
+ viewBox: "0 0 24 24",
1302
+ fill: "none",
1303
+ children: [
1304
+ /* @__PURE__ */ jsx("path", {
1305
+ d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",
1306
+ fill: "#4285F4"
1307
+ }),
1308
+ /* @__PURE__ */ jsx("path", {
1309
+ d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",
1310
+ fill: "#34A853"
1311
+ }),
1312
+ /* @__PURE__ */ jsx("path", {
1313
+ d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",
1314
+ fill: "#FBBC05"
1315
+ }),
1316
+ /* @__PURE__ */ jsx("path", {
1317
+ d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",
1318
+ fill: "#EA4335"
1319
+ })
1320
+ ]
1321
+ })
1322
+ },
1323
+ github: {
1324
+ label: "GitHub",
1325
+ icon: /* @__PURE__ */ jsx("svg", {
1326
+ className: "h-4 w-4",
1327
+ viewBox: "0 0 24 24",
1328
+ fill: "currentColor",
1329
+ children: /* @__PURE__ */ jsx("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" })
1330
+ })
1331
+ },
1332
+ apple: {
1333
+ label: "Apple",
1334
+ icon: /* @__PURE__ */ jsx("svg", {
1335
+ className: "h-4 w-4",
1336
+ viewBox: "0 0 24 24",
1337
+ fill: "currentColor",
1338
+ children: /* @__PURE__ */ jsx("path", { d: "M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" })
1339
+ })
1340
+ }
1341
+ };
1342
+ function SocialProviders({ providers, onSocialLogin, loading, disabled, className }) {
1343
+ return /* @__PURE__ */ jsx("div", {
1344
+ className: cn("grid gap-2", className),
1345
+ children: providers.map((provider) => {
1346
+ const config = providerConfig[provider];
1347
+ return /* @__PURE__ */ jsxs(Button, {
1348
+ variant: "outline",
1349
+ type: "button",
1350
+ disabled: loading || disabled,
1351
+ onClick: () => onSocialLogin(provider),
1352
+ className: "w-full",
1353
+ children: [config.icon, /* @__PURE__ */ jsxs("span", {
1354
+ className: "ml-2",
1355
+ children: ["Continue with ", config.label]
1356
+ })]
1357
+ }, provider);
1358
+ })
1359
+ });
1360
+ }
1361
+ //#endregion
1362
+ //#region src/blocks/auth/sign-in-block.tsx
1363
+ function SignInBlock({ onSubmit, onForgotPassword, onSocialLogin, socialProviders = [], loading = false, error, disabled = false, title = "Sign in", description = "Enter your credentials to access your account", signUpHref, onSignUp, className }) {
1364
+ const [rememberMe, setRememberMe] = React.useState(false);
1365
+ const handleSubmit = async (e) => {
1366
+ e.preventDefault();
1367
+ const formData = new FormData(e.currentTarget);
1368
+ await onSubmit({
1369
+ email: formData.get("email"),
1370
+ password: formData.get("password"),
1371
+ rememberMe
1372
+ });
1373
+ };
1374
+ return /* @__PURE__ */ jsxs(Card, {
1375
+ className: cn("w-full max-w-md mx-auto", className),
1376
+ children: [/* @__PURE__ */ jsxs(CardHeader, {
1377
+ className: "text-center",
1378
+ children: [/* @__PURE__ */ jsx(CardTitle, { children: title }), /* @__PURE__ */ jsx(CardDescription, { children: description })]
1379
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
1380
+ className: "space-y-4",
1381
+ children: [
1382
+ socialProviders.length > 0 && onSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SocialProviders, {
1383
+ providers: socialProviders,
1384
+ onSocialLogin,
1385
+ loading,
1386
+ disabled
1387
+ }), /* @__PURE__ */ jsxs("div", {
1388
+ className: "relative",
1389
+ children: [/* @__PURE__ */ jsx("div", {
1390
+ className: "absolute inset-0 flex items-center",
1391
+ children: /* @__PURE__ */ jsx(Separator, { className: "w-full" })
1392
+ }), /* @__PURE__ */ jsx("div", {
1393
+ className: "relative flex justify-center text-xs uppercase",
1394
+ children: /* @__PURE__ */ jsx("span", {
1395
+ className: "bg-card px-2 text-muted-foreground",
1396
+ children: "Or continue with"
1397
+ })
1398
+ })]
1399
+ })] }),
1400
+ /* @__PURE__ */ jsx(FormError, { message: error }),
1401
+ /* @__PURE__ */ jsxs("form", {
1402
+ onSubmit: handleSubmit,
1403
+ className: "space-y-4",
1404
+ children: [
1405
+ /* @__PURE__ */ jsxs("div", {
1406
+ className: "space-y-2",
1407
+ children: [/* @__PURE__ */ jsx(Label, {
1408
+ htmlFor: "email",
1409
+ children: "Email"
1410
+ }), /* @__PURE__ */ jsx(Input, {
1411
+ id: "email",
1412
+ name: "email",
1413
+ type: "email",
1414
+ placeholder: "name@example.com",
1415
+ required: true,
1416
+ disabled: loading || disabled,
1417
+ autoComplete: "email"
1418
+ })]
1419
+ }),
1420
+ /* @__PURE__ */ jsxs("div", {
1421
+ className: "space-y-2",
1422
+ children: [/* @__PURE__ */ jsxs("div", {
1423
+ className: "flex items-center justify-between",
1424
+ children: [/* @__PURE__ */ jsx(Label, {
1425
+ htmlFor: "password",
1426
+ children: "Password"
1427
+ }), onForgotPassword && /* @__PURE__ */ jsx("button", {
1428
+ type: "button",
1429
+ onClick: onForgotPassword,
1430
+ className: "text-sm text-primary hover:underline",
1431
+ children: "Forgot password?"
1432
+ })]
1433
+ }), /* @__PURE__ */ jsx(Input, {
1434
+ id: "password",
1435
+ name: "password",
1436
+ type: "password",
1437
+ required: true,
1438
+ disabled: loading || disabled,
1439
+ autoComplete: "current-password"
1440
+ })]
1441
+ }),
1442
+ /* @__PURE__ */ jsxs("div", {
1443
+ className: "flex items-center space-x-2",
1444
+ children: [/* @__PURE__ */ jsx(Checkbox, {
1445
+ id: "remember",
1446
+ checked: rememberMe,
1447
+ onCheckedChange: (checked) => setRememberMe(checked === true),
1448
+ disabled: loading || disabled
1449
+ }), /* @__PURE__ */ jsx("label", {
1450
+ htmlFor: "remember",
1451
+ className: "text-sm text-muted-foreground cursor-pointer",
1452
+ children: "Remember me"
1453
+ })]
1454
+ }),
1455
+ /* @__PURE__ */ jsxs(Button, {
1456
+ type: "submit",
1457
+ className: "w-full",
1458
+ disabled: loading || disabled,
1459
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
1460
+ size: "sm",
1461
+ className: "mr-2"
1462
+ }) : null, "Sign in"]
1463
+ })
1464
+ ]
1465
+ }),
1466
+ (signUpHref || onSignUp) && /* @__PURE__ */ jsxs("p", {
1467
+ className: "text-center text-sm text-muted-foreground",
1468
+ children: [
1469
+ "Don't have an account?",
1470
+ " ",
1471
+ onSignUp ? /* @__PURE__ */ jsx("button", {
1472
+ type: "button",
1473
+ onClick: onSignUp,
1474
+ className: "text-primary hover:underline font-medium",
1475
+ children: "Sign up"
1476
+ }) : /* @__PURE__ */ jsx("a", {
1477
+ href: signUpHref,
1478
+ className: "text-primary hover:underline font-medium",
1479
+ children: "Sign up"
1480
+ })
1481
+ ]
1482
+ })
1483
+ ]
1484
+ }) })]
1485
+ });
1486
+ }
1487
+ //#endregion
1488
+ //#region src/blocks/auth/sign-up-block.tsx
1489
+ function SignUpBlock({ onSubmit, onSocialLogin, socialProviders = [], loading = false, error, disabled = false, title = "Create an account", description = "Enter your details to get started", signInHref, onSignIn, termsHref = "#", privacyHref = "#", className }) {
1490
+ const [termsAccepted, setTermsAccepted] = React.useState(false);
1491
+ const handleSubmit = async (e) => {
1492
+ e.preventDefault();
1493
+ const formData = new FormData(e.currentTarget);
1494
+ await onSubmit({
1495
+ name: formData.get("name"),
1496
+ email: formData.get("email"),
1497
+ password: formData.get("password"),
1498
+ confirmPassword: formData.get("confirmPassword"),
1499
+ termsAccepted
1500
+ });
1501
+ };
1502
+ return /* @__PURE__ */ jsxs(Card, {
1503
+ className: cn("w-full max-w-md mx-auto", className),
1504
+ children: [/* @__PURE__ */ jsxs(CardHeader, {
1505
+ className: "text-center",
1506
+ children: [/* @__PURE__ */ jsx(CardTitle, { children: title }), /* @__PURE__ */ jsx(CardDescription, { children: description })]
1507
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
1508
+ className: "space-y-4",
1509
+ children: [
1510
+ socialProviders.length > 0 && onSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SocialProviders, {
1511
+ providers: socialProviders,
1512
+ onSocialLogin,
1513
+ loading,
1514
+ disabled
1515
+ }), /* @__PURE__ */ jsxs("div", {
1516
+ className: "relative",
1517
+ children: [/* @__PURE__ */ jsx("div", {
1518
+ className: "absolute inset-0 flex items-center",
1519
+ children: /* @__PURE__ */ jsx(Separator, { className: "w-full" })
1520
+ }), /* @__PURE__ */ jsx("div", {
1521
+ className: "relative flex justify-center text-xs uppercase",
1522
+ children: /* @__PURE__ */ jsx("span", {
1523
+ className: "bg-card px-2 text-muted-foreground",
1524
+ children: "Or continue with"
1525
+ })
1526
+ })]
1527
+ })] }),
1528
+ /* @__PURE__ */ jsx(FormError, { message: error }),
1529
+ /* @__PURE__ */ jsxs("form", {
1530
+ onSubmit: handleSubmit,
1531
+ className: "space-y-4",
1532
+ children: [
1533
+ /* @__PURE__ */ jsxs("div", {
1534
+ className: "space-y-2",
1535
+ children: [/* @__PURE__ */ jsx(Label, {
1536
+ htmlFor: "name",
1537
+ children: "Full name"
1538
+ }), /* @__PURE__ */ jsx(Input, {
1539
+ id: "name",
1540
+ name: "name",
1541
+ placeholder: "John Doe",
1542
+ required: true,
1543
+ disabled: loading || disabled,
1544
+ autoComplete: "name"
1545
+ })]
1546
+ }),
1547
+ /* @__PURE__ */ jsxs("div", {
1548
+ className: "space-y-2",
1549
+ children: [/* @__PURE__ */ jsx(Label, {
1550
+ htmlFor: "email",
1551
+ children: "Email"
1552
+ }), /* @__PURE__ */ jsx(Input, {
1553
+ id: "email",
1554
+ name: "email",
1555
+ type: "email",
1556
+ placeholder: "name@example.com",
1557
+ required: true,
1558
+ disabled: loading || disabled,
1559
+ autoComplete: "email"
1560
+ })]
1561
+ }),
1562
+ /* @__PURE__ */ jsxs("div", {
1563
+ className: "space-y-2",
1564
+ children: [/* @__PURE__ */ jsx(Label, {
1565
+ htmlFor: "password",
1566
+ children: "Password"
1567
+ }), /* @__PURE__ */ jsx(Input, {
1568
+ id: "password",
1569
+ name: "password",
1570
+ type: "password",
1571
+ required: true,
1572
+ disabled: loading || disabled,
1573
+ autoComplete: "new-password"
1574
+ })]
1575
+ }),
1576
+ /* @__PURE__ */ jsxs("div", {
1577
+ className: "space-y-2",
1578
+ children: [/* @__PURE__ */ jsx(Label, {
1579
+ htmlFor: "confirmPassword",
1580
+ children: "Confirm password"
1581
+ }), /* @__PURE__ */ jsx(Input, {
1582
+ id: "confirmPassword",
1583
+ name: "confirmPassword",
1584
+ type: "password",
1585
+ required: true,
1586
+ disabled: loading || disabled,
1587
+ autoComplete: "new-password"
1588
+ })]
1589
+ }),
1590
+ /* @__PURE__ */ jsxs("div", {
1591
+ className: "flex items-start space-x-2",
1592
+ children: [/* @__PURE__ */ jsx(Checkbox, {
1593
+ id: "terms",
1594
+ checked: termsAccepted,
1595
+ onCheckedChange: (checked) => setTermsAccepted(checked === true),
1596
+ disabled: loading || disabled,
1597
+ className: "mt-0.5"
1598
+ }), /* @__PURE__ */ jsxs("label", {
1599
+ htmlFor: "terms",
1600
+ className: "text-sm text-muted-foreground cursor-pointer",
1601
+ children: [
1602
+ "I agree to the",
1603
+ " ",
1604
+ /* @__PURE__ */ jsx("a", {
1605
+ href: termsHref,
1606
+ className: "text-primary hover:underline",
1607
+ children: "terms of service"
1608
+ }),
1609
+ " ",
1610
+ "and",
1611
+ " ",
1612
+ /* @__PURE__ */ jsx("a", {
1613
+ href: privacyHref,
1614
+ className: "text-primary hover:underline",
1615
+ children: "privacy policy"
1616
+ })
1617
+ ]
1618
+ })]
1619
+ }),
1620
+ /* @__PURE__ */ jsxs(Button, {
1621
+ type: "submit",
1622
+ className: "w-full",
1623
+ disabled: loading || disabled || !termsAccepted,
1624
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
1625
+ size: "sm",
1626
+ className: "mr-2"
1627
+ }) : null, "Create account"]
1628
+ })
1629
+ ]
1630
+ }),
1631
+ (signInHref || onSignIn) && /* @__PURE__ */ jsxs("p", {
1632
+ className: "text-center text-sm text-muted-foreground",
1633
+ children: [
1634
+ "Already have an account?",
1635
+ " ",
1636
+ onSignIn ? /* @__PURE__ */ jsx("button", {
1637
+ type: "button",
1638
+ onClick: onSignIn,
1639
+ className: "text-primary hover:underline font-medium",
1640
+ children: "Sign in"
1641
+ }) : /* @__PURE__ */ jsx("a", {
1642
+ href: signInHref,
1643
+ className: "text-primary hover:underline font-medium",
1644
+ children: "Sign in"
1645
+ })
1646
+ ]
1647
+ })
1648
+ ]
1649
+ }) })]
1650
+ });
1651
+ }
1652
+ //#endregion
1653
+ //#region src/blocks/auth/forgot-password-block.tsx
1654
+ function ForgotPasswordBlock({ onSubmit, onBack, loading = false, error, disabled = false, success = false, title = "Forgot password", description = "Enter your email and we'll send you a reset link", className }) {
1655
+ const handleSubmit = async (e) => {
1656
+ e.preventDefault();
1657
+ await onSubmit({ email: new FormData(e.currentTarget).get("email") });
1658
+ };
1659
+ return /* @__PURE__ */ jsxs(Card, {
1660
+ className: cn("w-full max-w-md mx-auto", className),
1661
+ children: [/* @__PURE__ */ jsx(CardHeader, {
1662
+ className: "text-center",
1663
+ children: success ? /* @__PURE__ */ jsxs(Fragment, { children: [
1664
+ /* @__PURE__ */ jsx("div", {
1665
+ className: "mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",
1666
+ children: /* @__PURE__ */ jsx(Mail, { className: "h-6 w-6 text-primary" })
1667
+ }),
1668
+ /* @__PURE__ */ jsx(CardTitle, { children: "Check your email" }),
1669
+ /* @__PURE__ */ jsx(CardDescription, { children: "We've sent a password reset link to your email address." })
1670
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CardTitle, { children: title }), /* @__PURE__ */ jsx(CardDescription, { children: description })] })
1671
+ }), !success && /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
1672
+ className: "space-y-4",
1673
+ children: [
1674
+ /* @__PURE__ */ jsx(FormError, { message: error }),
1675
+ /* @__PURE__ */ jsxs("form", {
1676
+ onSubmit: handleSubmit,
1677
+ className: "space-y-4",
1678
+ children: [/* @__PURE__ */ jsxs("div", {
1679
+ className: "space-y-2",
1680
+ children: [/* @__PURE__ */ jsx(Label, {
1681
+ htmlFor: "email",
1682
+ children: "Email"
1683
+ }), /* @__PURE__ */ jsx(Input, {
1684
+ id: "email",
1685
+ name: "email",
1686
+ type: "email",
1687
+ placeholder: "name@example.com",
1688
+ required: true,
1689
+ disabled: loading || disabled,
1690
+ autoComplete: "email"
1691
+ })]
1692
+ }), /* @__PURE__ */ jsxs(Button, {
1693
+ type: "submit",
1694
+ className: "w-full",
1695
+ disabled: loading || disabled,
1696
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
1697
+ size: "sm",
1698
+ className: "mr-2"
1699
+ }) : null, "Send reset link"]
1700
+ })]
1701
+ }),
1702
+ onBack && /* @__PURE__ */ jsxs("button", {
1703
+ type: "button",
1704
+ onClick: onBack,
1705
+ className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mx-auto",
1706
+ children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), " Back to sign in"]
1707
+ })
1708
+ ]
1709
+ }) })]
1710
+ });
1711
+ }
1712
+ //#endregion
1713
+ //#region src/blocks/auth/reset-password-block.tsx
1714
+ function ResetPasswordBlock({ onSubmit, loading = false, error, disabled = false, title = "Reset password", description = "Enter your new password below", className }) {
1715
+ const handleSubmit = async (e) => {
1716
+ e.preventDefault();
1717
+ const formData = new FormData(e.currentTarget);
1718
+ await onSubmit({
1719
+ password: formData.get("password"),
1720
+ confirmPassword: formData.get("confirmPassword")
1721
+ });
1722
+ };
1723
+ return /* @__PURE__ */ jsxs(Card, {
1724
+ className: cn("w-full max-w-md mx-auto", className),
1725
+ children: [/* @__PURE__ */ jsxs(CardHeader, {
1726
+ className: "text-center",
1727
+ children: [/* @__PURE__ */ jsx(CardTitle, { children: title }), /* @__PURE__ */ jsx(CardDescription, { children: description })]
1728
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
1729
+ className: "space-y-4",
1730
+ children: [/* @__PURE__ */ jsx(FormError, { message: error }), /* @__PURE__ */ jsxs("form", {
1731
+ onSubmit: handleSubmit,
1732
+ className: "space-y-4",
1733
+ children: [
1734
+ /* @__PURE__ */ jsxs("div", {
1735
+ className: "space-y-2",
1736
+ children: [/* @__PURE__ */ jsx(Label, {
1737
+ htmlFor: "password",
1738
+ children: "New password"
1739
+ }), /* @__PURE__ */ jsx(Input, {
1740
+ id: "password",
1741
+ name: "password",
1742
+ type: "password",
1743
+ required: true,
1744
+ disabled: loading || disabled,
1745
+ autoComplete: "new-password"
1746
+ })]
1747
+ }),
1748
+ /* @__PURE__ */ jsxs("div", {
1749
+ className: "space-y-2",
1750
+ children: [/* @__PURE__ */ jsx(Label, {
1751
+ htmlFor: "confirmPassword",
1752
+ children: "Confirm new password"
1753
+ }), /* @__PURE__ */ jsx(Input, {
1754
+ id: "confirmPassword",
1755
+ name: "confirmPassword",
1756
+ type: "password",
1757
+ required: true,
1758
+ disabled: loading || disabled,
1759
+ autoComplete: "new-password"
1760
+ })]
1761
+ }),
1762
+ /* @__PURE__ */ jsxs(Button, {
1763
+ type: "submit",
1764
+ className: "w-full",
1765
+ disabled: loading || disabled,
1766
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
1767
+ size: "sm",
1768
+ className: "mr-2"
1769
+ }) : null, "Reset password"]
1770
+ })
1771
+ ]
1772
+ })]
1773
+ }) })]
1774
+ });
1775
+ }
1776
+ //#endregion
1777
+ //#region src/blocks/auth/verify-block.tsx
1778
+ function VerifyBlock({ onVerify, onResend, codeLength = 6, loading = false, error, disabled = false, title = "Verify your account", description = "Enter the verification code sent to your email", resendCooldown = 60, className }) {
1779
+ const [code, setCode] = React.useState(Array(codeLength).fill(""));
1780
+ const [countdown, setCountdown] = React.useState(0);
1781
+ const inputRefs = React.useRef([]);
1782
+ React.useEffect(() => {
1783
+ if (countdown > 0) {
1784
+ const timer = setTimeout(() => setCountdown(countdown - 1), 1e3);
1785
+ return () => clearTimeout(timer);
1786
+ }
1787
+ }, [countdown]);
1788
+ const handleChange = (index, value) => {
1789
+ if (!/^\d*$/.test(value)) return;
1790
+ const newCode = [...code];
1791
+ newCode[index] = value.slice(-1);
1792
+ setCode(newCode);
1793
+ if (value && index < codeLength - 1) inputRefs.current[index + 1]?.focus();
1794
+ const fullCode = newCode.join("");
1795
+ if (fullCode.length === codeLength && newCode.every(Boolean)) onVerify(fullCode);
1796
+ };
1797
+ const handleKeyDown = (index, e) => {
1798
+ if (e.key === "Backspace" && !code[index] && index > 0) inputRefs.current[index - 1]?.focus();
1799
+ };
1800
+ const handlePaste = (e) => {
1801
+ e.preventDefault();
1802
+ const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, codeLength);
1803
+ const newCode = [...code];
1804
+ for (let i = 0; i < pasted.length; i++) newCode[i] = pasted[i];
1805
+ setCode(newCode);
1806
+ if (pasted.length === codeLength) onVerify(pasted);
1807
+ else inputRefs.current[pasted.length]?.focus();
1808
+ };
1809
+ const handleResend = async () => {
1810
+ setCountdown(resendCooldown);
1811
+ await onResend?.();
1812
+ };
1813
+ return /* @__PURE__ */ jsxs(Card, {
1814
+ className: cn("w-full max-w-md mx-auto", className),
1815
+ children: [/* @__PURE__ */ jsxs(CardHeader, {
1816
+ className: "text-center",
1817
+ children: [/* @__PURE__ */ jsx(CardTitle, { children: title }), /* @__PURE__ */ jsx(CardDescription, { children: description })]
1818
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
1819
+ className: "space-y-4",
1820
+ children: [
1821
+ /* @__PURE__ */ jsx(FormError, { message: error }),
1822
+ /* @__PURE__ */ jsx("div", {
1823
+ className: "flex justify-center gap-2",
1824
+ onPaste: handlePaste,
1825
+ children: code.map((digit, index) => /* @__PURE__ */ jsx(Input, {
1826
+ ref: (el) => {
1827
+ inputRefs.current[index] = el;
1828
+ },
1829
+ type: "text",
1830
+ inputMode: "numeric",
1831
+ maxLength: 1,
1832
+ value: digit,
1833
+ onChange: (e) => handleChange(index, e.target.value),
1834
+ onKeyDown: (e) => handleKeyDown(index, e),
1835
+ disabled: loading || disabled,
1836
+ className: "h-12 w-12 text-center text-lg font-semibold",
1837
+ autoFocus: index === 0
1838
+ }, index))
1839
+ }),
1840
+ loading && /* @__PURE__ */ jsx("div", {
1841
+ className: "flex justify-center",
1842
+ children: /* @__PURE__ */ jsx(Spinner, { size: "sm" })
1843
+ }),
1844
+ onResend && /* @__PURE__ */ jsx("div", {
1845
+ className: "text-center",
1846
+ children: countdown > 0 ? /* @__PURE__ */ jsxs("p", {
1847
+ className: "text-sm text-muted-foreground",
1848
+ children: [
1849
+ "Resend code in ",
1850
+ countdown,
1851
+ "s"
1852
+ ]
1853
+ }) : /* @__PURE__ */ jsx(Button, {
1854
+ variant: "ghost",
1855
+ size: "sm",
1856
+ onClick: handleResend,
1857
+ disabled: loading || disabled,
1858
+ children: "Resend code"
1859
+ })
1860
+ })
1861
+ ]
1862
+ }) })]
1863
+ });
1864
+ }
1865
+ //#endregion
1866
+ //#region src/blocks/error/not-found-block.tsx
1867
+ function NotFoundBlock({ title = "Page not found", message = "Sorry, we couldn't find the page you're looking for. It may have been moved or deleted.", homeHref = "/", onGoHome, className }) {
1868
+ return /* @__PURE__ */ jsxs("div", {
1869
+ className: cn("flex min-h-[60vh] flex-col items-center justify-center text-center px-4", className),
1870
+ children: [
1871
+ /* @__PURE__ */ jsx("div", {
1872
+ className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-muted",
1873
+ children: /* @__PURE__ */ jsx(FileQuestion, { className: "h-12 w-12 text-muted-foreground" })
1874
+ }),
1875
+ /* @__PURE__ */ jsx("h1", {
1876
+ className: "text-4xl font-bold tracking-tight mb-2",
1877
+ children: "404"
1878
+ }),
1879
+ /* @__PURE__ */ jsx("h2", {
1880
+ className: "text-xl font-semibold mb-2",
1881
+ children: title
1882
+ }),
1883
+ /* @__PURE__ */ jsx("p", {
1884
+ className: "text-muted-foreground max-w-md mb-8",
1885
+ children: message
1886
+ }),
1887
+ onGoHome ? /* @__PURE__ */ jsx(Button, {
1888
+ onClick: onGoHome,
1889
+ children: "Go back home"
1890
+ }) : /* @__PURE__ */ jsx(Button, {
1891
+ asChild: true,
1892
+ children: /* @__PURE__ */ jsx("a", {
1893
+ href: homeHref,
1894
+ children: "Go back home"
1895
+ })
1896
+ })
1897
+ ]
1898
+ });
1899
+ }
1900
+ //#endregion
1901
+ //#region src/blocks/error/server-error-block.tsx
1902
+ function ServerErrorBlock({ title = "Something went wrong", message = "An unexpected error occurred. Our team has been notified and is working on a fix.", onRetry, homeHref = "/", onGoHome, className }) {
1903
+ return /* @__PURE__ */ jsxs("div", {
1904
+ className: cn("flex min-h-[60vh] flex-col items-center justify-center text-center px-4", className),
1905
+ children: [
1906
+ /* @__PURE__ */ jsx("div", {
1907
+ className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-destructive/10",
1908
+ children: /* @__PURE__ */ jsx(ServerCrash, { className: "h-12 w-12 text-destructive" })
1909
+ }),
1910
+ /* @__PURE__ */ jsx("h1", {
1911
+ className: "text-4xl font-bold tracking-tight mb-2",
1912
+ children: "500"
1913
+ }),
1914
+ /* @__PURE__ */ jsx("h2", {
1915
+ className: "text-xl font-semibold mb-2",
1916
+ children: title
1917
+ }),
1918
+ /* @__PURE__ */ jsx("p", {
1919
+ className: "text-muted-foreground max-w-md mb-8",
1920
+ children: message
1921
+ }),
1922
+ /* @__PURE__ */ jsxs("div", {
1923
+ className: "flex gap-3",
1924
+ children: [onRetry && /* @__PURE__ */ jsx(Button, {
1925
+ onClick: onRetry,
1926
+ children: "Try again"
1927
+ }), onGoHome ? /* @__PURE__ */ jsx(Button, {
1928
+ variant: "outline",
1929
+ onClick: onGoHome,
1930
+ children: "Go home"
1931
+ }) : /* @__PURE__ */ jsx(Button, {
1932
+ variant: "outline",
1933
+ asChild: true,
1934
+ children: /* @__PURE__ */ jsx("a", {
1935
+ href: homeHref,
1936
+ children: "Go home"
1937
+ })
1938
+ })]
1939
+ })
1940
+ ]
1941
+ });
1942
+ }
1943
+ //#endregion
1944
+ //#region src/blocks/error/maintenance-block.tsx
1945
+ function MaintenanceBlock({ title = "Under maintenance", message = "We're performing scheduled maintenance to improve your experience. We'll be back shortly.", estimatedReturn, className }) {
1946
+ return /* @__PURE__ */ jsxs("div", {
1947
+ className: cn("flex min-h-[60vh] flex-col items-center justify-center text-center px-4", className),
1948
+ children: [
1949
+ /* @__PURE__ */ jsx("div", {
1950
+ className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-muted",
1951
+ children: /* @__PURE__ */ jsx(Wrench, { className: "h-12 w-12 text-muted-foreground" })
1952
+ }),
1953
+ /* @__PURE__ */ jsx("h2", {
1954
+ className: "text-xl font-semibold mb-2",
1955
+ children: title
1956
+ }),
1957
+ /* @__PURE__ */ jsx("p", {
1958
+ className: "text-muted-foreground max-w-md mb-4",
1959
+ children: message
1960
+ }),
1961
+ estimatedReturn && /* @__PURE__ */ jsxs("p", {
1962
+ className: "text-sm text-muted-foreground",
1963
+ children: ["Estimated return: ", /* @__PURE__ */ jsx("span", {
1964
+ className: "font-medium text-foreground",
1965
+ children: estimatedReturn
1966
+ })]
1967
+ })
1968
+ ]
1969
+ });
1970
+ }
1971
+ //#endregion
1972
+ //#region src/blocks/error/empty-state-block.tsx
1973
+ function EmptyStateBlock({ icon: Icon = Inbox, title = "No results found", description = "There's nothing here yet. Get started by creating your first item.", actionLabel, onAction, className }) {
1974
+ return /* @__PURE__ */ jsxs("div", {
1975
+ className: cn("flex flex-col items-center justify-center text-center py-16 px-4", className),
1976
+ children: [
1977
+ /* @__PURE__ */ jsx("div", {
1978
+ className: "mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-muted",
1979
+ children: /* @__PURE__ */ jsx(Icon, { className: "h-8 w-8 text-muted-foreground" })
1980
+ }),
1981
+ /* @__PURE__ */ jsx("h3", {
1982
+ className: "text-lg font-semibold mb-1",
1983
+ children: title
1984
+ }),
1985
+ /* @__PURE__ */ jsx("p", {
1986
+ className: "text-sm text-muted-foreground max-w-sm mb-6",
1987
+ children: description
1988
+ }),
1989
+ actionLabel && onAction && /* @__PURE__ */ jsx(Button, {
1990
+ onClick: onAction,
1991
+ children: actionLabel
1992
+ })
1993
+ ]
1994
+ });
1995
+ }
1996
+ //#endregion
1997
+ //#region src/blocks/layout/page-shell.tsx
1998
+ function PageShell({ children, sidebar, header, footer, sidebarWidth = "16rem", sidebarCollapsed = false, className }) {
1999
+ return /* @__PURE__ */ jsxs("div", {
2000
+ className: cn("flex min-h-screen flex-col", className),
2001
+ children: [
2002
+ header,
2003
+ /* @__PURE__ */ jsxs("div", {
2004
+ className: "flex flex-1",
2005
+ children: [sidebar && /* @__PURE__ */ jsx("aside", {
2006
+ className: cn("hidden border-r bg-card transition-all duration-normal ease-default md:block", sidebarCollapsed && "w-16"),
2007
+ style: sidebarCollapsed ? void 0 : { width: sidebarWidth },
2008
+ children: sidebar
2009
+ }), /* @__PURE__ */ jsx("main", {
2010
+ className: "flex-1 overflow-auto",
2011
+ children
2012
+ })]
2013
+ }),
2014
+ footer
2015
+ ]
2016
+ });
2017
+ }
2018
+ //#endregion
2019
+ //#region src/blocks/layout/header-block.tsx
2020
+ function HeaderBlock({ logo, nav, actions, onMenuToggle, sticky = true, className }) {
2021
+ return /* @__PURE__ */ jsxs("header", {
2022
+ className: cn("flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6", sticky && "sticky top-0 z-[var(--z-sticky)]", className),
2023
+ children: [
2024
+ onMenuToggle && /* @__PURE__ */ jsxs(Button, {
2025
+ variant: "ghost",
2026
+ size: "icon",
2027
+ className: "md:hidden",
2028
+ onClick: onMenuToggle,
2029
+ children: [/* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" }), /* @__PURE__ */ jsx("span", {
2030
+ className: "sr-only",
2031
+ children: "Toggle menu"
2032
+ })]
2033
+ }),
2034
+ logo && /* @__PURE__ */ jsx("div", {
2035
+ className: "flex items-center gap-2 font-semibold",
2036
+ children: logo
2037
+ }),
2038
+ nav && /* @__PURE__ */ jsx("nav", {
2039
+ className: "hidden md:flex items-center gap-6 text-sm font-medium flex-1",
2040
+ children: nav
2041
+ }),
2042
+ actions && /* @__PURE__ */ jsx("div", {
2043
+ className: "ml-auto flex items-center gap-2",
2044
+ children: actions
2045
+ })
2046
+ ]
2047
+ });
2048
+ }
2049
+ //#endregion
2050
+ //#region src/blocks/layout/sidebar-block.tsx
2051
+ function SidebarItemComponent({ item, collapsed }) {
2052
+ return /* @__PURE__ */ jsxs(item.href ? "a" : "button", {
2053
+ href: item.href,
2054
+ onClick: item.onClick,
2055
+ className: cn("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground", item.active && "bg-accent text-accent-foreground", collapsed && "justify-center px-2"),
2056
+ children: [item.icon && /* @__PURE__ */ jsx("span", {
2057
+ className: "flex h-5 w-5 shrink-0 items-center justify-center",
2058
+ children: item.icon
2059
+ }), !collapsed && /* @__PURE__ */ jsx("span", { children: item.label })]
2060
+ });
2061
+ }
2062
+ function SidebarBlock({ sections, header, footer, collapsed = false, className }) {
2063
+ return /* @__PURE__ */ jsxs("div", {
2064
+ className: cn("flex h-full flex-col", className),
2065
+ children: [
2066
+ header && /* @__PURE__ */ jsx("div", {
2067
+ className: cn("border-b p-4", collapsed && "p-2"),
2068
+ children: header
2069
+ }),
2070
+ /* @__PURE__ */ jsx("nav", {
2071
+ className: "flex-1 space-y-4 overflow-y-auto p-4",
2072
+ children: sections.map((section, sIdx) => /* @__PURE__ */ jsxs("div", {
2073
+ className: "space-y-1",
2074
+ children: [section.title && !collapsed && /* @__PURE__ */ jsx("p", {
2075
+ className: "px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",
2076
+ children: section.title
2077
+ }), section.items.map((item, iIdx) => /* @__PURE__ */ jsx(SidebarItemComponent, {
2078
+ item,
2079
+ collapsed
2080
+ }, iIdx))]
2081
+ }, sIdx))
2082
+ }),
2083
+ footer && /* @__PURE__ */ jsx("div", {
2084
+ className: cn("border-t p-4", collapsed && "p-2"),
2085
+ children: footer
2086
+ })
2087
+ ]
2088
+ });
2089
+ }
2090
+ //#endregion
2091
+ //#region src/blocks/layout/footer-block.tsx
2092
+ function FooterBlock({ copyright, links = [], logo, className }) {
2093
+ return /* @__PURE__ */ jsx("footer", {
2094
+ className: cn("border-t bg-background", className),
2095
+ children: /* @__PURE__ */ jsxs("div", {
2096
+ className: "flex flex-col items-center gap-4 px-4 py-6 md:flex-row md:justify-between md:px-6",
2097
+ children: [/* @__PURE__ */ jsxs("div", {
2098
+ className: "flex items-center gap-2",
2099
+ children: [logo, copyright && /* @__PURE__ */ jsx("p", {
2100
+ className: "text-sm text-muted-foreground",
2101
+ children: copyright
2102
+ })]
2103
+ }), links.length > 0 && /* @__PURE__ */ jsx("nav", {
2104
+ className: "flex gap-4",
2105
+ children: links.map((link) => /* @__PURE__ */ jsx("a", {
2106
+ href: link.href,
2107
+ className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
2108
+ children: link.label
2109
+ }, link.href))
2110
+ })]
2111
+ })
2112
+ });
2113
+ }
2114
+ //#endregion
2115
+ //#region src/blocks/settings/profile-settings-block.tsx
2116
+ function ProfileSettingsBlock({ initialData, onSave, onAvatarChange, loading = false, error, disabled = false, className }) {
2117
+ const fileInputRef = React.useRef(null);
2118
+ const handleSubmit = async (e) => {
2119
+ e.preventDefault();
2120
+ const formData = new FormData(e.currentTarget);
2121
+ await onSave({
2122
+ name: formData.get("name"),
2123
+ email: formData.get("email"),
2124
+ bio: formData.get("bio"),
2125
+ avatarUrl: initialData.avatarUrl
2126
+ });
2127
+ };
2128
+ const handleAvatarClick = () => {
2129
+ fileInputRef.current?.click();
2130
+ };
2131
+ const handleFileChange = (e) => {
2132
+ const file = e.target.files?.[0];
2133
+ if (file && onAvatarChange) onAvatarChange(file);
2134
+ };
2135
+ const initials = initialData.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
2136
+ return /* @__PURE__ */ jsxs(Card, {
2137
+ className: cn("w-full max-w-2xl", className),
2138
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsx(CardTitle, { children: "Profile" }), /* @__PURE__ */ jsx(CardDescription, { children: "Manage your personal information" })] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
2139
+ className: "space-y-6",
2140
+ children: [
2141
+ /* @__PURE__ */ jsx(FormError, { message: error }),
2142
+ /* @__PURE__ */ jsxs("div", {
2143
+ className: "flex items-center gap-4",
2144
+ children: [/* @__PURE__ */ jsxs("div", {
2145
+ className: "relative group",
2146
+ children: [
2147
+ /* @__PURE__ */ jsxs(Avatar, {
2148
+ className: "h-20 w-20",
2149
+ children: [initialData.avatarUrl && /* @__PURE__ */ jsx(AvatarImage, {
2150
+ src: initialData.avatarUrl,
2151
+ alt: initialData.name
2152
+ }), /* @__PURE__ */ jsx(AvatarFallback, {
2153
+ className: "text-lg",
2154
+ children: initials
2155
+ })]
2156
+ }),
2157
+ onAvatarChange && /* @__PURE__ */ jsx("button", {
2158
+ type: "button",
2159
+ onClick: handleAvatarClick,
2160
+ disabled: loading || disabled,
2161
+ className: "absolute inset-0 flex items-center justify-center rounded-full bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",
2162
+ children: /* @__PURE__ */ jsx(Camera, { className: "h-5 w-5 text-white" })
2163
+ }),
2164
+ /* @__PURE__ */ jsx("input", {
2165
+ ref: fileInputRef,
2166
+ type: "file",
2167
+ accept: "image/*",
2168
+ className: "hidden",
2169
+ onChange: handleFileChange
2170
+ })
2171
+ ]
2172
+ }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
2173
+ className: "font-medium",
2174
+ children: initialData.name
2175
+ }), /* @__PURE__ */ jsx("p", {
2176
+ className: "text-sm text-muted-foreground",
2177
+ children: initialData.email
2178
+ })] })]
2179
+ }),
2180
+ /* @__PURE__ */ jsxs("form", {
2181
+ onSubmit: handleSubmit,
2182
+ className: "space-y-4",
2183
+ children: [
2184
+ /* @__PURE__ */ jsxs("div", {
2185
+ className: "grid gap-4 sm:grid-cols-2",
2186
+ children: [/* @__PURE__ */ jsxs("div", {
2187
+ className: "space-y-2",
2188
+ children: [/* @__PURE__ */ jsx(Label, {
2189
+ htmlFor: "name",
2190
+ children: "Name"
2191
+ }), /* @__PURE__ */ jsx(Input, {
2192
+ id: "name",
2193
+ name: "name",
2194
+ defaultValue: initialData.name,
2195
+ required: true,
2196
+ disabled: loading || disabled
2197
+ })]
2198
+ }), /* @__PURE__ */ jsxs("div", {
2199
+ className: "space-y-2",
2200
+ children: [/* @__PURE__ */ jsx(Label, {
2201
+ htmlFor: "email",
2202
+ children: "Email"
2203
+ }), /* @__PURE__ */ jsx(Input, {
2204
+ id: "email",
2205
+ name: "email",
2206
+ type: "email",
2207
+ defaultValue: initialData.email,
2208
+ required: true,
2209
+ disabled: loading || disabled
2210
+ })]
2211
+ })]
2212
+ }),
2213
+ /* @__PURE__ */ jsxs("div", {
2214
+ className: "space-y-2",
2215
+ children: [/* @__PURE__ */ jsx(Label, {
2216
+ htmlFor: "bio",
2217
+ children: "Bio"
2218
+ }), /* @__PURE__ */ jsx(Textarea, {
2219
+ id: "bio",
2220
+ name: "bio",
2221
+ defaultValue: initialData.bio,
2222
+ placeholder: "Tell us about yourself...",
2223
+ disabled: loading || disabled,
2224
+ rows: 3
2225
+ })]
2226
+ }),
2227
+ /* @__PURE__ */ jsx("div", {
2228
+ className: "flex justify-end",
2229
+ children: /* @__PURE__ */ jsxs(Button, {
2230
+ type: "submit",
2231
+ disabled: loading || disabled,
2232
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
2233
+ size: "sm",
2234
+ className: "mr-2"
2235
+ }) : null, "Save changes"]
2236
+ })
2237
+ })
2238
+ ]
2239
+ })
2240
+ ]
2241
+ }) })]
2242
+ });
2243
+ }
2244
+ //#endregion
2245
+ //#region src/blocks/settings/account-settings-block.tsx
2246
+ function AccountSettingsBlock({ onChangePassword, onDeleteAccount, loading = false, error, disabled = false, className }) {
2247
+ const handlePasswordSubmit = async (e) => {
2248
+ e.preventDefault();
2249
+ const formData = new FormData(e.currentTarget);
2250
+ await onChangePassword({
2251
+ currentPassword: formData.get("currentPassword"),
2252
+ newPassword: formData.get("newPassword"),
2253
+ confirmPassword: formData.get("confirmPassword")
2254
+ });
2255
+ e.currentTarget.reset();
2256
+ };
2257
+ return /* @__PURE__ */ jsxs("div", {
2258
+ className: cn("w-full max-w-2xl space-y-6", className),
2259
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsx(CardTitle, { children: "Change password" }), /* @__PURE__ */ jsx(CardDescription, { children: "Update your password to keep your account secure" })] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
2260
+ className: "space-y-4",
2261
+ children: [/* @__PURE__ */ jsx(FormError, { message: error }), /* @__PURE__ */ jsxs("form", {
2262
+ onSubmit: handlePasswordSubmit,
2263
+ className: "space-y-4",
2264
+ children: [
2265
+ /* @__PURE__ */ jsxs("div", {
2266
+ className: "space-y-2",
2267
+ children: [/* @__PURE__ */ jsx(Label, {
2268
+ htmlFor: "currentPassword",
2269
+ children: "Current password"
2270
+ }), /* @__PURE__ */ jsx(Input, {
2271
+ id: "currentPassword",
2272
+ name: "currentPassword",
2273
+ type: "password",
2274
+ required: true,
2275
+ disabled: loading || disabled,
2276
+ autoComplete: "current-password"
2277
+ })]
2278
+ }),
2279
+ /* @__PURE__ */ jsxs("div", {
2280
+ className: "space-y-2",
2281
+ children: [/* @__PURE__ */ jsx(Label, {
2282
+ htmlFor: "newPassword",
2283
+ children: "New password"
2284
+ }), /* @__PURE__ */ jsx(Input, {
2285
+ id: "newPassword",
2286
+ name: "newPassword",
2287
+ type: "password",
2288
+ required: true,
2289
+ disabled: loading || disabled,
2290
+ autoComplete: "new-password"
2291
+ })]
2292
+ }),
2293
+ /* @__PURE__ */ jsxs("div", {
2294
+ className: "space-y-2",
2295
+ children: [/* @__PURE__ */ jsx(Label, {
2296
+ htmlFor: "confirmPassword",
2297
+ children: "Confirm new password"
2298
+ }), /* @__PURE__ */ jsx(Input, {
2299
+ id: "confirmPassword",
2300
+ name: "confirmPassword",
2301
+ type: "password",
2302
+ required: true,
2303
+ disabled: loading || disabled,
2304
+ autoComplete: "new-password"
2305
+ })]
2306
+ }),
2307
+ /* @__PURE__ */ jsx("div", {
2308
+ className: "flex justify-end",
2309
+ children: /* @__PURE__ */ jsxs(Button, {
2310
+ type: "submit",
2311
+ disabled: loading || disabled,
2312
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
2313
+ size: "sm",
2314
+ className: "mr-2"
2315
+ }) : null, "Update password"]
2316
+ })
2317
+ })
2318
+ ]
2319
+ })]
2320
+ }) })] }), onDeleteAccount && /* @__PURE__ */ jsxs(Card, {
2321
+ className: "border-destructive/50",
2322
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsx(CardTitle, {
2323
+ className: "text-destructive",
2324
+ children: "Danger zone"
2325
+ }), /* @__PURE__ */ jsx(CardDescription, { children: "Permanently delete your account and all associated data" })] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsx(AlertDialogTrigger, {
2326
+ asChild: true,
2327
+ children: /* @__PURE__ */ jsx(Button, {
2328
+ variant: "destructive",
2329
+ disabled: loading || disabled,
2330
+ children: "Delete account"
2331
+ })
2332
+ }), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Are you absolutely sure?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This action cannot be undone. This will permanently delete your account and remove all your data from our servers." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
2333
+ onClick: onDeleteAccount,
2334
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2335
+ children: "Delete account"
2336
+ })] })] })] }) })]
2337
+ })]
2338
+ });
2339
+ }
2340
+ //#endregion
2341
+ //#region src/blocks/settings/notification-settings-block.tsx
2342
+ function NotificationSettingsBlock({ groups, onSave, loading = false, error, disabled = false, className }) {
2343
+ const [values, setValues] = React.useState(() => {
2344
+ const initial = {};
2345
+ for (const group of groups) for (const setting of group.settings) initial[setting.id] = setting.enabled;
2346
+ return initial;
2347
+ });
2348
+ const handleToggle = (id, checked) => {
2349
+ setValues((prev) => ({
2350
+ ...prev,
2351
+ [id]: checked
2352
+ }));
2353
+ };
2354
+ const handleSave = async () => {
2355
+ await onSave(values);
2356
+ };
2357
+ return /* @__PURE__ */ jsxs("div", {
2358
+ className: cn("w-full max-w-2xl space-y-6", className),
2359
+ children: [
2360
+ /* @__PURE__ */ jsx(FormError, { message: error }),
2361
+ groups.map((group, gIdx) => /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsx(CardTitle, {
2362
+ className: "text-lg",
2363
+ children: group.title
2364
+ }), group.description && /* @__PURE__ */ jsx(CardDescription, { children: group.description })] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
2365
+ className: "space-y-4",
2366
+ children: group.settings.map((setting) => /* @__PURE__ */ jsxs("div", {
2367
+ className: "flex items-center justify-between gap-4",
2368
+ children: [/* @__PURE__ */ jsxs("div", {
2369
+ className: "space-y-0.5",
2370
+ children: [/* @__PURE__ */ jsx("p", {
2371
+ className: "text-sm font-medium",
2372
+ children: setting.label
2373
+ }), /* @__PURE__ */ jsx("p", {
2374
+ className: "text-sm text-muted-foreground",
2375
+ children: setting.description
2376
+ })]
2377
+ }), /* @__PURE__ */ jsx(Switch, {
2378
+ checked: values[setting.id],
2379
+ onCheckedChange: (checked) => handleToggle(setting.id, checked),
2380
+ disabled: loading || disabled
2381
+ })]
2382
+ }, setting.id))
2383
+ }) })] }, gIdx)),
2384
+ /* @__PURE__ */ jsx("div", {
2385
+ className: "flex justify-end",
2386
+ children: /* @__PURE__ */ jsxs(Button, {
2387
+ onClick: handleSave,
2388
+ disabled: loading || disabled,
2389
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
2390
+ size: "sm",
2391
+ className: "mr-2"
2392
+ }) : null, "Save preferences"]
2393
+ })
2394
+ })
2395
+ ]
2396
+ });
2397
+ }
2398
+ //#endregion
2399
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, Label, MaintenanceBlock, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, RadioGroup, RadioGroupItem, ResetPasswordBlock, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarBlock, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, spinnerVariants, toast, useDensity, useFormContext, useTheme };
2400
+
2401
+ //# sourceMappingURL=index.mjs.map