@doscientos/ui 0.1.28 → 0.1.30

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.cjs CHANGED
@@ -90,7 +90,7 @@ __export(index_exports, {
90
90
  ComboboxInput: () => ComboboxInput,
91
91
  ComboboxItem: () => ComboboxItem,
92
92
  ComboboxList: () => ComboboxList,
93
- ComboboxValue: () => import_react_aria_components8.ComboBoxValue,
93
+ ComboboxValue: () => import_react_aria_components9.ComboBoxValue,
94
94
  Command: () => Command,
95
95
  CommandContent: () => CommandContent,
96
96
  CommandInput: () => CommandInput,
@@ -106,15 +106,20 @@ __export(index_exports, {
106
106
  DialogHeader: () => DialogHeader,
107
107
  DialogOverlay: () => DialogOverlay,
108
108
  DialogPortal: () => DialogPortal,
109
+ DialogRoot: () => DialogRoot,
109
110
  DialogTitle: () => DialogTitle,
110
111
  DialogTrigger: () => DialogTrigger,
111
112
  DocPreview: () => DocPreview,
112
113
  Drawer: () => Drawer,
114
+ DrawerClose: () => DrawerClose,
115
+ DrawerContent: () => DrawerContent,
113
116
  DrawerDescription: () => DrawerDescription,
114
117
  DrawerFooter: () => DrawerFooter,
115
118
  DrawerHeader: () => DrawerHeader,
116
119
  DrawerTitle: () => DrawerTitle,
120
+ DrawerTrigger: () => DrawerTrigger,
117
121
  DropdownMenu: () => DropdownMenu,
122
+ DropdownMenuContent: () => DropdownMenuContent,
118
123
  DropdownMenuGroup: () => DropdownMenuGroup,
119
124
  DropdownMenuItem: () => DropdownMenuItem,
120
125
  DropdownMenuLabel: () => DropdownMenuLabel,
@@ -151,6 +156,12 @@ __export(index_exports, {
151
156
  InputGroupInput: () => InputGroupInput,
152
157
  InputGroupText: () => InputGroupText,
153
158
  InputGroupTextarea: () => InputGroupTextarea,
159
+ KanbanColumn: () => KanbanColumn,
160
+ KanbanColumnBody: () => KanbanColumnBody,
161
+ KanbanColumnHeader: () => KanbanColumnHeader,
162
+ KanbanColumnTitle: () => KanbanColumnTitle,
163
+ KanbanEmpty: () => KanbanEmpty,
164
+ KanbanViewport: () => KanbanViewport,
154
165
  Kbd: () => Kbd,
155
166
  KbdGroup: () => KbdGroup,
156
167
  Label: () => Label2,
@@ -161,7 +172,6 @@ __export(index_exports, {
161
172
  MenuItem: () => MenuItem,
162
173
  MenuTrigger: () => MenuTrigger,
163
174
  MetricCard: () => MetricCard,
164
- ModalDialog: () => ModalDialog,
165
175
  OtpInput: () => OtpInput2,
166
176
  PageHeader: () => PageHeader,
167
177
  PageHeaderActions: () => PageHeaderActions,
@@ -190,6 +200,7 @@ __export(index_exports, {
190
200
  SheetTrigger: () => SheetTrigger,
191
201
  Sidebar: () => Sidebar,
192
202
  SidebarContent: () => SidebarContent,
203
+ SidebarContext: () => SidebarContext,
193
204
  SidebarFooter: () => SidebarFooter,
194
205
  SidebarGroup: () => SidebarGroup,
195
206
  SidebarHeader: () => SidebarHeader,
@@ -225,6 +236,7 @@ __export(index_exports, {
225
236
  ToolbarGroup: () => ToolbarGroup,
226
237
  ToolbarSpacer: () => ToolbarSpacer,
227
238
  Tooltip: () => Tooltip,
239
+ TooltipContent: () => TooltipContent,
228
240
  TooltipTrigger: () => TooltipTrigger,
229
241
  actionRipple: () => actionRipple,
230
242
  alertVariants: () => alertVariants,
@@ -305,7 +317,10 @@ function useDebouncedValue(value, delay = 250) {
305
317
  // src/hooks/use-form-dirty.ts
306
318
  var import_react3 = require("react");
307
319
  function formSnapshot(form) {
308
- const entries = Array.from(new FormData(form), ([key, value]) => [key, typeof value === "string" ? value : value.name]);
320
+ const entries = Array.from(new FormData(form), ([key, value]) => [
321
+ key,
322
+ typeof value === "string" ? value : value.name
323
+ ]);
309
324
  entries.sort(([left], [right]) => left.localeCompare(right));
310
325
  return JSON.stringify(entries);
311
326
  }
@@ -324,29 +339,30 @@ function useFormDirty() {
324
339
  setIsDirty(false);
325
340
  }
326
341
  }, []);
327
- const formRef = (0, import_react3.useCallback)((form) => {
328
- if (formElement.current) {
329
- formElement.current.removeEventListener("input", recompute);
330
- formElement.current.removeEventListener("change", recompute);
331
- formElement.current.removeEventListener("reset", recompute);
332
- }
333
- formElement.current = form;
334
- if (form) {
335
- baseline.current = formSnapshot(form);
336
- setIsDirty(false);
337
- form.addEventListener("input", recompute);
338
- form.addEventListener("change", recompute);
339
- form.addEventListener("reset", recompute);
340
- }
341
- }, [recompute]);
342
+ const formRef = (0, import_react3.useCallback)(
343
+ (form) => {
344
+ if (formElement.current) {
345
+ formElement.current.removeEventListener("input", recompute);
346
+ formElement.current.removeEventListener("change", recompute);
347
+ formElement.current.removeEventListener("reset", recompute);
348
+ }
349
+ formElement.current = form;
350
+ if (form) {
351
+ baseline.current = formSnapshot(form);
352
+ setIsDirty(false);
353
+ form.addEventListener("input", recompute);
354
+ form.addEventListener("change", recompute);
355
+ form.addEventListener("reset", recompute);
356
+ }
357
+ },
358
+ [recompute]
359
+ );
342
360
  return { formRef, isDirty, markDirty: () => setIsDirty(true), reset };
343
361
  }
344
362
 
345
363
  // src/lib/action-ripple.ts
346
364
  var import_class_variance_authority = require("class-variance-authority");
347
- var actionRipple = (0, import_class_variance_authority.cva)(
348
- "relative isolate overflow-hidden"
349
- );
365
+ var actionRipple = (0, import_class_variance_authority.cva)("relative isolate overflow-hidden");
350
366
 
351
367
  // src/lib/cn.ts
352
368
  var import_clsx = require("clsx");
@@ -385,7 +401,8 @@ function getTextMatchParts(text, query) {
385
401
  const rangeStart = ranges[index]?.start;
386
402
  const rangeEnd = ranges[index + term.length - 1]?.end;
387
403
  if (rangeStart === void 0 || rangeEnd === void 0) break;
388
- if (rangeStart > sourceCursor) parts.push({ text: text.slice(sourceCursor, rangeStart), match: false });
404
+ if (rangeStart > sourceCursor)
405
+ parts.push({ text: text.slice(sourceCursor, rangeStart), match: false });
389
406
  parts.push({ text: text.slice(rangeStart, rangeEnd), match: true });
390
407
  sourceCursor = rangeEnd;
391
408
  index = normalized.indexOf(term, index + term.length);
@@ -395,8 +412,8 @@ function getTextMatchParts(text, query) {
395
412
  }
396
413
 
397
414
  // src/ui/accordion/accordion.tsx
398
- var React = require("react");
399
415
  var import_lucide_react = require("lucide-react");
416
+ var React = require("react");
400
417
  var import_react_aria_components = require("react-aria-components");
401
418
  var import_jsx_runtime = require("react/jsx-runtime");
402
419
  function Accordion({ className, ...props }) {
@@ -454,16 +471,12 @@ function AccordionTrigger({
454
471
  }
455
472
  ) });
456
473
  }
457
- function AccordionContent({
458
- className,
459
- children,
460
- ...props
461
- }) {
474
+ function AccordionContent({ className, children, ...props }) {
462
475
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
463
476
  import_react_aria_components.DisclosurePanel,
464
477
  {
465
478
  "data-slot": "accordion-content",
466
- className: "h-(--disclosure-panel-height) overflow-clip text-sm text-muted-foreground transition-[height] data-open:animate-accordion-down data-closed:animate-accordion-up",
479
+ className: "text-muted-foreground data-open:animate-accordion-down data-closed:animate-accordion-up h-(--disclosure-panel-height) overflow-clip text-sm transition-[height]",
467
480
  ...props,
468
481
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
469
482
  "div",
@@ -480,26 +493,61 @@ function AccordionContent({
480
493
  }
481
494
 
482
495
  // src/ui/alert-dialog/alert-dialog.tsx
483
- var React2 = __toESM(require("react"), 1);
484
- var import_react_aria_components3 = require("react-aria-components");
496
+ var React3 = require("react");
497
+ var import_react_aria_components4 = require("react-aria-components");
485
498
 
486
499
  // src/ui/button/button.tsx
487
- var import_class_variance_authority2 = require("class-variance-authority");
488
500
  var import_react4 = require("react");
489
501
  var import_react_aria_components2 = require("react-aria-components");
502
+
503
+ // src/ui/button/button-variants.ts
504
+ var import_class_variance_authority2 = require("class-variance-authority");
505
+ var buttonVariants = (0, import_class_variance_authority2.cva)(
506
+ cn(
507
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
508
+ actionRipple()
509
+ ),
510
+ {
511
+ variants: {
512
+ variant: {
513
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
514
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
515
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
516
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
517
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
518
+ link: "text-primary underline-offset-4 hover:underline after:hidden"
519
+ },
520
+ size: {
521
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
522
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
523
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
524
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
525
+ icon: "size-8",
526
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
527
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
528
+ "icon-lg": "size-9"
529
+ }
530
+ },
531
+ defaultVariants: {
532
+ variant: "default",
533
+ size: "default"
534
+ }
535
+ }
536
+ );
537
+
538
+ // src/ui/button/button.tsx
490
539
  var import_jsx_runtime2 = require("react/jsx-runtime");
491
540
  var centeredRipplePosition = { x: "50%", y: "50%" };
492
541
  function getRipplePosition(event) {
493
542
  if (event.pointerType === "keyboard" || event.pointerType === "virtual") {
494
543
  return centeredRipplePosition;
495
544
  }
496
- if (!(event.target instanceof Element) || event.x === void 0 || event.y === void 0) {
545
+ if (event.x === void 0 || event.y === void 0) {
497
546
  return centeredRipplePosition;
498
547
  }
499
- const bounds = event.target.getBoundingClientRect();
500
548
  return {
501
- x: `${event.x - bounds.left}px`,
502
- y: `${event.y - bounds.top}px`
549
+ x: `${event.x}px`,
550
+ y: `${event.y}px`
503
551
  };
504
552
  }
505
553
  function useActionRipple(enabled) {
@@ -517,7 +565,7 @@ function useActionRipple(enabled) {
517
565
  {
518
566
  "aria-hidden": "true",
519
567
  "data-slot": "button-ripple",
520
- className: "pointer-events-none absolute aspect-square w-full rounded-full bg-current animate-ui-ripple motion-reduce:hidden",
568
+ className: "animate-ui-ripple pointer-events-none absolute aspect-square w-full rounded-full motion-reduce:hidden",
521
569
  style: { left: ripple.position.x, top: ripple.position.y },
522
570
  onAnimationEnd: () => setRipple((currentRipple) => currentRipple?.id === ripple.id ? null : currentRipple)
523
571
  },
@@ -525,39 +573,17 @@ function useActionRipple(enabled) {
525
573
  ) : null;
526
574
  return { ripple: rippleElement, triggerRipple };
527
575
  }
528
- var buttonVariants = (0, import_class_variance_authority2.cva)(
529
- cn(
530
- "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
531
- actionRipple()
532
- ),
533
- {
534
- variants: {
535
- variant: {
536
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
537
- outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
538
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
539
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
540
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
541
- link: "text-primary underline-offset-4 hover:underline after:hidden"
542
- },
543
- size: {
544
- default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
545
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
546
- sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
547
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
548
- icon: "size-8",
549
- "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
550
- "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
551
- "icon-lg": "size-9"
552
- }
553
- },
554
- defaultVariants: {
555
- variant: "default",
556
- size: "default"
557
- }
558
- }
559
- );
560
- function Button({ className, variant = "default", size = "default", children, disabled, isDisabled, onClick, onPress, ...props }) {
576
+ function Button({
577
+ className,
578
+ variant = "default",
579
+ size = "default",
580
+ children,
581
+ disabled,
582
+ isDisabled,
583
+ onClick,
584
+ onPress,
585
+ ...props
586
+ }) {
561
587
  const { ripple, triggerRipple } = useActionRipple(variant !== "link");
562
588
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
563
589
  import_react_aria_components2.Button,
@@ -611,134 +637,370 @@ function LinkButton({
611
637
  );
612
638
  }
613
639
 
614
- // src/ui/alert-dialog/alert-dialog.tsx
640
+ // src/ui/dialog/dialog.tsx
641
+ var import_lucide_react2 = require("lucide-react");
642
+ var React2 = __toESM(require("react"), 1);
643
+ var import_react_aria_components3 = require("react-aria-components");
615
644
  var import_jsx_runtime3 = require("react/jsx-runtime");
616
- var AlertDialogContext = React2.createContext(null);
617
- function useAlertDialogContext() {
618
- const context = React2.useContext(AlertDialogContext);
619
- if (!context) throw new Error("AlertDialog components must be rendered within AlertDialog.");
645
+ var DialogContext = React2.createContext(null);
646
+ function useDialogContext() {
647
+ const context = React2.useContext(DialogContext);
648
+ if (!context) throw new Error("Dialog components must be rendered within Dialog.");
620
649
  return context;
621
650
  }
622
- function AlertDialog({ children, open, onOpenChange }) {
623
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogContext.Provider, { value: { open, setOpen: onOpenChange }, children });
624
- }
625
- function AlertDialogPortal({ children }) {
626
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children });
627
- }
628
- function AlertDialogTrigger({ children, ...props }) {
629
- const { setOpen } = useAlertDialogContext();
630
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-trigger", onPress: () => setOpen(true), ...props, children });
631
- }
632
- function AlertDialogOverlay({ className, ...props }) {
633
- const { open, setOpen } = useAlertDialogContext();
634
- if (!open) return null;
635
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.ModalOverlay, { "data-slot": "alert-dialog-overlay", isDismissable: true, isOpen: open, onOpenChange: setOpen, className: cn("fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", className), ...props });
636
- }
637
- function AlertDialogContent({ className, size = "default", children }) {
638
- const { open, setOpen } = useAlertDialogContext();
639
- if (!open) return null;
640
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.ModalOverlay, { isDismissable: true, isOpen: open, onOpenChange: setOpen, className: "fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Modal, { className: cn("w-full max-w-[calc(100%-2rem)] outline-none", size === "sm" ? "sm:max-w-xs" : "sm:max-w-sm", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Dialog, { role: "alertdialog", "data-slot": "alert-dialog-content", className: "grid gap-4 rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none", children }) }) }) });
641
- }
642
- function AlertDialogHeader({ className, ...props }) {
643
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
644
- }
645
- function AlertDialogFooter({ className, ...props }) {
646
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "alert-dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className), ...props });
647
- }
648
- function AlertDialogTitle({ className, ...props }) {
649
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Heading, { slot: "title", "data-slot": "alert-dialog-title", className: cn("font-heading text-base font-medium", className), ...props });
650
- }
651
- function AlertDialogDescription({ className, ...props }) {
652
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Text, { slot: "description", "data-slot": "alert-dialog-description", className: cn("text-sm text-muted-foreground", className), ...props });
653
- }
654
- function AlertDialogAction({ className, ...props }) {
655
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-action", className: cn(className), ...props });
656
- }
657
- function AlertDialogCancel({ children = "Cancelar", onClick, ...props }) {
658
- const { setOpen } = useAlertDialogContext();
659
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-cancel", variant: "outline", onClick, onPress: () => setOpen(false), ...props, children });
651
+ function DialogRoot({
652
+ children,
653
+ defaultOpen = false,
654
+ onOpenChange,
655
+ open: controlledOpen
656
+ }) {
657
+ const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
658
+ const open = controlledOpen ?? uncontrolledOpen;
659
+ const setOpen = React2.useCallback(
660
+ (nextOpen) => {
661
+ if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
662
+ onOpenChange?.(nextOpen);
663
+ },
664
+ [controlledOpen, onOpenChange]
665
+ );
666
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogContext.Provider, { value: { open, setOpen }, children });
660
667
  }
661
-
662
- // src/ui/alert/alert.tsx
663
- var import_class_variance_authority3 = require("class-variance-authority");
664
- var import_jsx_runtime4 = require("react/jsx-runtime");
665
- var alertVariants = (0, import_class_variance_authority3.cva)(
666
- "group/alert relative grid w-full gap-0.5 rounded-lg border border-border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
667
- {
668
- variants: {
669
- variant: {
670
- default: "bg-card text-card-foreground",
671
- info: "border-info/30 bg-info/5 text-info",
672
- success: "border-success/30 bg-success/5 text-success",
673
- warning: "border-warning/30 bg-warning/5 text-warning",
674
- destructive: "border-destructive/30 bg-destructive/5 text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
668
+ function DialogTrigger({
669
+ asChild = false,
670
+ children,
671
+ onClick,
672
+ ...props
673
+ }) {
674
+ const { setOpen } = useDialogContext();
675
+ const handleClick = (event) => {
676
+ onClick?.(event);
677
+ if (!event.defaultPrevented) setOpen(true);
678
+ };
679
+ if (asChild && React2.isValidElement(children)) {
680
+ const child = children;
681
+ return React2.cloneElement(child, {
682
+ ...props,
683
+ "data-slot": "dialog-trigger",
684
+ onClick: (event) => {
685
+ child.props.onClick?.(event);
686
+ handleClick(event);
675
687
  }
676
- },
677
- defaultVariants: {
678
- variant: "default"
679
- }
688
+ });
680
689
  }
681
- );
682
- function Alert({ className, variant, ...props }) {
683
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
684
- "div",
685
- {
686
- "data-slot": "alert",
687
- role: "alert",
688
- className: cn(alertVariants({ variant }), className),
689
- ...props
690
- }
691
- );
690
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
692
691
  }
693
- function AlertTitle({ className, ...props }) {
694
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
695
- "div",
696
- {
697
- "data-slot": "alert-title",
698
- className: cn(
699
- "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
700
- className
701
- ),
702
- ...props
703
- }
704
- );
692
+ function DialogPortal({ children }) {
693
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children });
705
694
  }
706
- function AlertDescription({ className, ...props }) {
707
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
708
- "div",
695
+ function DialogOverlay({ children, className, ...props }) {
696
+ const { open, setOpen } = useDialogContext();
697
+ if (!open) return null;
698
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
699
+ import_react_aria_components3.ModalOverlay,
709
700
  {
710
- "data-slot": "alert-description",
701
+ "data-slot": "dialog-overlay",
702
+ isDismissable: true,
703
+ isOpen: open,
704
+ onOpenChange: setOpen,
711
705
  className: cn(
712
- "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
706
+ "fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 supports-backdrop-filter:backdrop-blur-xs motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out",
713
707
  className
714
708
  ),
715
- ...props
709
+ ...props,
710
+ children
716
711
  }
717
712
  );
718
713
  }
719
- function AlertAction({ className, ...props }) {
720
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props });
714
+ function Dialog(props) {
715
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogRoot, { ...props });
716
+ const { children, trigger, triggerProps, defaultOpen, onOpenChange, open, ...contentProps } = props;
717
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DialogRoot, { defaultOpen, onOpenChange, open, children: [
718
+ typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogTrigger, { ...triggerProps, children: trigger }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogTrigger, { asChild: true, ...triggerProps, children: trigger }),
719
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogContent, { ...contentProps, children })
720
+ ] });
721
721
  }
722
-
723
- // src/ui/app-shell/app-shell.tsx
724
- var import_jsx_runtime5 = require("react/jsx-runtime");
725
- function AppShell({
722
+ function DialogContent({
723
+ children,
726
724
  className,
727
- sidebarBreakpoint = "md",
725
+ contentSlot = "dialog-content",
726
+ onOverlayClick,
727
+ overlaySlot = "dialog-overlay",
728
+ showCloseButton = true,
728
729
  ...props
729
730
  }) {
730
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
731
- "div",
731
+ const { setOpen } = useDialogContext();
732
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
733
+ DialogOverlay,
732
734
  {
733
- "data-slot": "app-shell",
734
- "data-sidebar-breakpoint": sidebarBreakpoint,
735
- className: cn("bg-background text-foreground", className),
736
- ...props
735
+ "data-slot": overlaySlot,
736
+ onClick: (event) => {
737
+ if (event.target === event.currentTarget) onOverlayClick?.(event);
738
+ },
739
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
740
+ import_react_aria_components3.Modal,
741
+ {
742
+ className: "motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out max-h-full min-h-0 w-full",
743
+ onClick: (event) => {
744
+ if (event.target === event.currentTarget) {
745
+ setOpen(false);
746
+ onOverlayClick?.(event);
747
+ }
748
+ },
749
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
750
+ import_react_aria_components3.Dialog,
751
+ {
752
+ "data-slot": contentSlot,
753
+ className: cn(
754
+ "relative mx-auto grid box-border max-h-full min-h-0 w-full max-w-[calc(100%-2rem)] gap-4 overflow-x-hidden overflow-y-auto rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none sm:max-w-sm",
755
+ className
756
+ ),
757
+ ...props,
758
+ children: [
759
+ children,
760
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
761
+ Button,
762
+ {
763
+ "aria-label": "Cerrar di\xE1logo",
764
+ "data-slot": "dialog-close",
765
+ variant: "ghost",
766
+ className: "absolute top-2 right-2",
767
+ size: "icon-sm",
768
+ onPress: () => setOpen(false),
769
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.XIcon, {})
770
+ }
771
+ ) : null
772
+ ]
773
+ }
774
+ )
775
+ }
776
+ )
737
777
  }
738
- );
778
+ ) });
739
779
  }
740
- function AppShellSidebar({ className, ...props }) {
741
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
780
+ function DialogClose({ asChild = false, children, onClick, ...props }) {
781
+ const { setOpen } = useDialogContext();
782
+ if (asChild && React2.isValidElement(children)) {
783
+ const child = children;
784
+ return React2.cloneElement(child, {
785
+ ...props,
786
+ "data-slot": "dialog-close",
787
+ onClick: (event) => {
788
+ child.props.onClick?.(event);
789
+ onClick?.(event);
790
+ if (!event.defaultPrevented) setOpen(false);
791
+ }
792
+ });
793
+ }
794
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
795
+ }
796
+ function DialogHeader({ className, ...props }) {
797
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
798
+ }
799
+ function DialogFooter({
800
+ className,
801
+ showCloseButton = false,
802
+ children,
803
+ ...props
804
+ }) {
805
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
806
+ "div",
807
+ {
808
+ "data-slot": "dialog-footer",
809
+ className: cn(
810
+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-border bg-muted/50 p-4 sm:flex-row sm:flex-wrap sm:justify-end",
811
+ className
812
+ ),
813
+ ...props,
814
+ children: [
815
+ children,
816
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogClose, { variant: "outline", children: "Cerrar" }) : null
817
+ ]
818
+ }
819
+ );
820
+ }
821
+ function DialogTitle({
822
+ className,
823
+ ...props
824
+ }) {
825
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
826
+ import_react_aria_components3.Heading,
827
+ {
828
+ slot: "title",
829
+ "data-slot": "dialog-title",
830
+ className: cn("font-heading text-base leading-none font-medium", className),
831
+ ...props
832
+ }
833
+ );
834
+ }
835
+ function DialogDescription({
836
+ className,
837
+ ...props
838
+ }) {
839
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
840
+ import_react_aria_components3.Text,
841
+ {
842
+ slot: "description",
843
+ "data-slot": "dialog-description",
844
+ className: cn(
845
+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
846
+ className
847
+ ),
848
+ ...props
849
+ }
850
+ );
851
+ }
852
+
853
+ // src/ui/alert-dialog/alert-dialog.tsx
854
+ var import_jsx_runtime4 = require("react/jsx-runtime");
855
+ function AlertDialog({ children, open, onOpenChange }) {
856
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog, { open, onOpenChange, children });
857
+ }
858
+ function AlertDialogPortal({ children }) {
859
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogPortal, { children });
860
+ }
861
+ function AlertDialogTrigger({
862
+ children,
863
+ ...props
864
+ }) {
865
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogTrigger, { "data-slot": "alert-dialog-trigger", ...props, children });
866
+ }
867
+ function AlertDialogOverlay({
868
+ className,
869
+ ...props
870
+ }) {
871
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogOverlay, { "data-slot": "alert-dialog-overlay", className, ...props });
872
+ }
873
+ function AlertDialogContent({
874
+ className,
875
+ size = "default",
876
+ children
877
+ }) {
878
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
879
+ DialogContent,
880
+ {
881
+ contentSlot: "alert-dialog-content",
882
+ overlaySlot: "alert-dialog-overlay",
883
+ role: "alertdialog",
884
+ showCloseButton: false,
885
+ className: cn(size === "sm" ? "sm:max-w-xs" : "sm:max-w-sm", className),
886
+ children
887
+ }
888
+ );
889
+ }
890
+ function AlertDialogHeader({ className, ...props }) {
891
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
892
+ DialogHeader,
893
+ {
894
+ "data-slot": "alert-dialog-header",
895
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
896
+ ...props
897
+ }
898
+ );
899
+ }
900
+ function AlertDialogFooter({ className, ...props }) {
901
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogFooter, { "data-slot": "alert-dialog-footer", className: cn(className), ...props });
902
+ }
903
+ function AlertDialogTitle({
904
+ className,
905
+ ...props
906
+ }) {
907
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogTitle, { "data-slot": "alert-dialog-title", className: cn(className), ...props });
908
+ }
909
+ function AlertDialogDescription({
910
+ className,
911
+ ...props
912
+ }) {
913
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogDescription, { "data-slot": "alert-dialog-description", className: cn(className), ...props });
914
+ }
915
+ function AlertDialogAction({ className, ...props }) {
916
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { "data-slot": "alert-dialog-action", className: cn(className), ...props });
917
+ }
918
+ function AlertDialogCancel({
919
+ children = "Cancelar",
920
+ onClick,
921
+ ...props
922
+ }) {
923
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { "data-slot": "alert-dialog-cancel", variant: "outline", onClick, ...props, children }) });
924
+ }
925
+
926
+ // src/ui/alert/alert-variants.ts
927
+ var import_class_variance_authority3 = require("class-variance-authority");
928
+ var alertVariants = (0, import_class_variance_authority3.cva)(
929
+ "group/alert relative grid w-full gap-0.5 rounded-lg border border-border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
930
+ {
931
+ variants: {
932
+ variant: {
933
+ default: "bg-card text-card-foreground",
934
+ info: "border-info/30 bg-info/5 text-info",
935
+ success: "border-success/30 bg-success/5 text-success",
936
+ warning: "border-warning/30 bg-warning/5 text-warning",
937
+ destructive: "border-destructive/30 bg-destructive/5 text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
938
+ }
939
+ },
940
+ defaultVariants: {
941
+ variant: "default"
942
+ }
943
+ }
944
+ );
945
+
946
+ // src/ui/alert/alert.tsx
947
+ var import_jsx_runtime5 = require("react/jsx-runtime");
948
+ function Alert({ className, variant, ...props }) {
949
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
950
+ "div",
951
+ {
952
+ "data-slot": "alert",
953
+ role: "alert",
954
+ className: cn(alertVariants({ variant }), className),
955
+ ...props
956
+ }
957
+ );
958
+ }
959
+ function AlertTitle({ className, ...props }) {
960
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
961
+ "div",
962
+ {
963
+ "data-slot": "alert-title",
964
+ className: cn(
965
+ "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
966
+ className
967
+ ),
968
+ ...props
969
+ }
970
+ );
971
+ }
972
+ function AlertDescription({ className, ...props }) {
973
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
974
+ "div",
975
+ {
976
+ "data-slot": "alert-description",
977
+ className: cn(
978
+ "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
979
+ className
980
+ ),
981
+ ...props
982
+ }
983
+ );
984
+ }
985
+ function AlertAction({ className, ...props }) {
986
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props });
987
+ }
988
+
989
+ // src/ui/app-shell/app-shell.tsx
990
+ var import_jsx_runtime6 = require("react/jsx-runtime");
991
+ function AppShell({ className, sidebarBreakpoint = "md", ...props }) {
992
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
993
+ "div",
994
+ {
995
+ "data-slot": "app-shell",
996
+ "data-sidebar-breakpoint": sidebarBreakpoint,
997
+ className: cn("bg-background text-foreground", className),
998
+ ...props
999
+ }
1000
+ );
1001
+ }
1002
+ function AppShellSidebar({ className, ...props }) {
1003
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
742
1004
  "aside",
743
1005
  {
744
1006
  "data-slot": "app-shell-sidebar",
@@ -748,10 +1010,10 @@ function AppShellSidebar({ className, ...props }) {
748
1010
  );
749
1011
  }
750
1012
  function AppShellMain({ className, ...props }) {
751
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("main", { "data-slot": "app-shell-main", className: cn("bg-background", className), ...props });
1013
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("main", { "data-slot": "app-shell-main", className: cn("bg-background", className), ...props });
752
1014
  }
753
1015
  function AppShellHeader({ className, ...props }) {
754
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1016
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
755
1017
  "header",
756
1018
  {
757
1019
  "data-slot": "app-shell-header",
@@ -760,15 +1022,15 @@ function AppShellHeader({ className, ...props }) {
760
1022
  }
761
1023
  );
762
1024
  }
763
- function AppShellMobileHeader({
764
- className,
765
- ...props
766
- }) {
767
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1025
+ function AppShellMobileHeader({ className, ...props }) {
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
768
1027
  "header",
769
1028
  {
770
1029
  "data-slot": "app-shell-mobile-header",
771
- className: cn("h-14 shrink-0 items-center gap-2 border-b border-border bg-background px-3", className),
1030
+ className: cn(
1031
+ "h-14 shrink-0 items-center gap-2 border-b border-border bg-background px-3",
1032
+ className
1033
+ ),
772
1034
  ...props
773
1035
  }
774
1036
  );
@@ -780,7 +1042,7 @@ function AppShellContent({
780
1042
  scrollable = true,
781
1043
  ...props
782
1044
  }) {
783
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
784
1046
  "div",
785
1047
  {
786
1048
  "data-slot": "app-shell-content",
@@ -795,14 +1057,38 @@ function AppShellContent({
795
1057
 
796
1058
  // src/ui/avatar/avatar.tsx
797
1059
  var import_react5 = require("react");
798
- var import_jsx_runtime6 = require("react/jsx-runtime");
799
- var sizes = { xs: "size-5 text-[10px]", sm: "size-6 text-xs", default: "size-8 text-sm", lg: "size-10 text-base" };
1060
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1061
+ var sizes = {
1062
+ xs: "size-5 text-[10px]",
1063
+ sm: "size-6 text-xs",
1064
+ default: "size-8 text-sm",
1065
+ lg: "size-10 text-base"
1066
+ };
800
1067
  var AvatarContext = (0, import_react5.createContext)(null);
801
1068
  function Avatar({ className, size = "default", children, ...props }) {
802
1069
  const [status, setStatus] = (0, import_react5.useState)("idle");
803
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex shrink-0 overflow-hidden rounded-full bg-muted text-muted-foreground", sizes[size], className), ...props, children }) });
1070
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1071
+ "div",
1072
+ {
1073
+ "data-slot": "avatar",
1074
+ "data-size": size,
1075
+ className: cn(
1076
+ "group/avatar relative flex shrink-0 overflow-hidden rounded-full bg-muted text-muted-foreground",
1077
+ sizes[size],
1078
+ className
1079
+ ),
1080
+ ...props,
1081
+ children
1082
+ }
1083
+ ) });
804
1084
  }
805
- function AvatarImage({ className, src, onError, onLoad, ...props }) {
1085
+ function AvatarImage({
1086
+ className,
1087
+ src,
1088
+ onError,
1089
+ onLoad,
1090
+ ...props
1091
+ }) {
806
1092
  const avatar = (0, import_react5.useContext)(AvatarContext);
807
1093
  const [failed, setFailed] = (0, import_react5.useState)(false);
808
1094
  (0, import_react5.useEffect)(() => {
@@ -810,34 +1096,83 @@ function AvatarImage({ className, src, onError, onLoad, ...props }) {
810
1096
  avatar?.setStatus(src ? "loading" : "idle");
811
1097
  }, [avatar?.setStatus, src]);
812
1098
  if (failed || avatar?.status === "error") return null;
813
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { "data-slot": "avatar-image", src, className: cn("aspect-square size-full object-cover", className), onLoad: (event) => {
814
- avatar?.setStatus("loaded");
815
- onLoad?.(event);
816
- }, onError: (event) => {
817
- setFailed(true);
818
- avatar?.setStatus("error");
819
- onError?.(event);
820
- }, ...props });
1099
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1100
+ "img",
1101
+ {
1102
+ "data-slot": "avatar-image",
1103
+ src,
1104
+ alt: "",
1105
+ className: cn("aspect-square size-full object-cover", className),
1106
+ onLoad: (event) => {
1107
+ avatar?.setStatus("loaded");
1108
+ onLoad?.(event);
1109
+ },
1110
+ onError: (event) => {
1111
+ setFailed(true);
1112
+ avatar?.setStatus("error");
1113
+ onError?.(event);
1114
+ },
1115
+ ...props
1116
+ }
1117
+ );
821
1118
  }
822
1119
  function AvatarFallback({ className, ...props }) {
823
1120
  const avatar = (0, import_react5.useContext)(AvatarContext);
824
1121
  if (avatar?.status === "loaded") return null;
825
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center font-medium", className), ...props });
1122
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1123
+ "span",
1124
+ {
1125
+ "data-slot": "avatar-fallback",
1126
+ className: cn("flex size-full items-center justify-center font-medium", className),
1127
+ ...props
1128
+ }
1129
+ );
826
1130
  }
827
1131
  function AvatarBadge({ className, ...props }) {
828
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 size-2.5 rounded-full bg-success ring-2 ring-background", className), ...props });
1132
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1133
+ "span",
1134
+ {
1135
+ "data-slot": "avatar-badge",
1136
+ className: cn(
1137
+ "absolute right-0 bottom-0 size-2.5 rounded-full bg-success ring-2 ring-background",
1138
+ className
1139
+ ),
1140
+ ...props
1141
+ }
1142
+ );
829
1143
  }
830
1144
  function AvatarGroup({ className, ...props }) {
831
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "data-slot": "avatar-group", className: cn("flex -space-x-2 [&>[data-slot=avatar]]:ring-2 [&>[data-slot=avatar]]:ring-background", className), ...props });
1145
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1146
+ "div",
1147
+ {
1148
+ "data-slot": "avatar-group",
1149
+ className: cn(
1150
+ "flex -space-x-2 [&>[data-slot=avatar]]:ring-2 [&>[data-slot=avatar]]:ring-background",
1151
+ className
1152
+ ),
1153
+ ...props
1154
+ }
1155
+ );
832
1156
  }
833
1157
  function AvatarGroupCount({ className, ...props }) {
834
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-group-count", className: cn("flex size-8 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground ring-2 ring-background", className), ...props });
1158
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1159
+ "span",
1160
+ {
1161
+ "data-slot": "avatar-group-count",
1162
+ className: cn(
1163
+ "flex size-8 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground ring-2 ring-background",
1164
+ className
1165
+ ),
1166
+ ...props
1167
+ }
1168
+ );
835
1169
  }
836
1170
 
837
1171
  // src/ui/badge/badge.tsx
1172
+ var import_react_aria_components5 = require("react-aria-components");
1173
+
1174
+ // src/ui/badge/badge-variants.ts
838
1175
  var import_class_variance_authority4 = require("class-variance-authority");
839
- var import_react_aria_components4 = require("react-aria-components");
840
- var import_jsx_runtime7 = require("react/jsx-runtime");
841
1176
  var badgeVariants = (0, import_class_variance_authority4.cva)(
842
1177
  "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3",
843
1178
  {
@@ -859,8 +1194,11 @@ var badgeVariants = (0, import_class_variance_authority4.cva)(
859
1194
  defaultVariants: { variant: "default" }
860
1195
  }
861
1196
  );
1197
+
1198
+ // src/ui/badge/badge.tsx
1199
+ var import_jsx_runtime8 = require("react/jsx-runtime");
862
1200
  function Badge({ className, variant, ...props }) {
863
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1201
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
864
1202
  "span",
865
1203
  {
866
1204
  "data-slot": "badge",
@@ -871,8 +1209,8 @@ function Badge({ className, variant, ...props }) {
871
1209
  );
872
1210
  }
873
1211
  function BadgeLink({ className, variant, ...props }) {
874
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
875
- import_react_aria_components4.Link,
1212
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1213
+ import_react_aria_components5.Link,
876
1214
  {
877
1215
  "data-slot": "badge",
878
1216
  "data-variant": variant ?? "default",
@@ -883,33 +1221,72 @@ function BadgeLink({ className, variant, ...props }) {
883
1221
  }
884
1222
 
885
1223
  // src/ui/breadcrumb/breadcrumb.tsx
886
- var import_react_aria_components5 = require("react-aria-components");
887
- var import_jsx_runtime8 = require("react/jsx-runtime");
1224
+ var import_react_aria_components6 = require("react-aria-components");
1225
+ var import_jsx_runtime9 = require("react/jsx-runtime");
888
1226
  function Breadcrumbs({ className, ...props }) {
889
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Breadcrumbs, { "data-slot": "breadcrumbs", className: cn("flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", className), ...props });
1227
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1228
+ import_react_aria_components6.Breadcrumbs,
1229
+ {
1230
+ "data-slot": "breadcrumbs",
1231
+ className: cn("flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", className),
1232
+ ...props
1233
+ }
1234
+ );
890
1235
  }
891
1236
  function Breadcrumb({ className, ...props }) {
892
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Breadcrumb, { "data-slot": "breadcrumb", className: cn("inline-flex items-center gap-1.5", className), ...props });
1237
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1238
+ import_react_aria_components6.Breadcrumb,
1239
+ {
1240
+ "data-slot": "breadcrumb",
1241
+ className: cn("inline-flex items-center gap-1.5", className),
1242
+ ...props
1243
+ }
1244
+ );
893
1245
  }
894
1246
  function BreadcrumbLink({ className, ...props }) {
895
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Link, { "data-slot": "breadcrumb-link", className: cn("transition-colors hover:text-foreground", className), ...props });
1247
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1248
+ import_react_aria_components6.Link,
1249
+ {
1250
+ "data-slot": "breadcrumb-link",
1251
+ className: cn("transition-colors hover:text-foreground", className),
1252
+ ...props
1253
+ }
1254
+ );
896
1255
  }
897
1256
  function BreadcrumbPage({ className, ...props }) {
898
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": "breadcrumb-page", "aria-current": "page", className: cn("font-medium text-foreground", className), ...props });
1257
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1258
+ "span",
1259
+ {
1260
+ "data-slot": "breadcrumb-page",
1261
+ "aria-current": "page",
1262
+ className: cn("font-medium text-foreground", className),
1263
+ ...props
1264
+ }
1265
+ );
899
1266
  }
900
- function BreadcrumbSeparator({ children = "/", className, ...props }) {
901
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": "breadcrumb-separator", "aria-hidden": "true", className: cn("text-muted-foreground/60", className), ...props, children });
1267
+ function BreadcrumbSeparator({
1268
+ children = "/",
1269
+ className,
1270
+ ...props
1271
+ }) {
1272
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1273
+ "span",
1274
+ {
1275
+ "data-slot": "breadcrumb-separator",
1276
+ "aria-hidden": "true",
1277
+ className: cn("text-muted-foreground/60", className),
1278
+ ...props,
1279
+ children
1280
+ }
1281
+ );
902
1282
  }
903
1283
 
904
- // src/ui/button-group/button-group.tsx
905
- var import_class_variance_authority5 = require("class-variance-authority");
906
-
907
1284
  // src/ui/separator/separator.tsx
908
- var import_react_aria_components6 = require("react-aria-components");
909
- var import_jsx_runtime9 = require("react/jsx-runtime");
1285
+ var import_react_aria_components7 = require("react-aria-components");
1286
+ var import_jsx_runtime10 = require("react/jsx-runtime");
910
1287
  function Separator({ className, orientation = "horizontal", ...props }) {
911
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
912
- import_react_aria_components6.Separator,
1288
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1289
+ import_react_aria_components7.Separator,
913
1290
  {
914
1291
  "data-slot": "separator",
915
1292
  orientation,
@@ -922,11 +1299,8 @@ function Separator({ className, orientation = "horizontal", ...props }) {
922
1299
  );
923
1300
  }
924
1301
 
925
- // src/ui/button-group/button-group.tsx
926
- var import_jsx_runtime10 = (
927
- // biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
928
- require("react/jsx-runtime")
929
- );
1302
+ // src/ui/button-group/button-group-variants.ts
1303
+ var import_class_variance_authority5 = require("class-variance-authority");
930
1304
  var buttonGroupVariants = (0, import_class_variance_authority5.cva)(
931
1305
  "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
932
1306
  {
@@ -941,12 +1315,18 @@ var buttonGroupVariants = (0, import_class_variance_authority5.cva)(
941
1315
  }
942
1316
  }
943
1317
  );
1318
+
1319
+ // src/ui/button-group/button-group.tsx
1320
+ var import_jsx_runtime11 = (
1321
+ // biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
1322
+ require("react/jsx-runtime")
1323
+ );
944
1324
  function ButtonGroup({
945
1325
  className,
946
1326
  orientation,
947
1327
  ...props
948
1328
  }) {
949
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1329
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
950
1330
  "div",
951
1331
  {
952
1332
  role: "group",
@@ -973,7 +1353,7 @@ function ButtonGroupText({
973
1353
  };
974
1354
  return render(renderProps);
975
1355
  }
976
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1356
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
977
1357
  "div",
978
1358
  {
979
1359
  "data-slot": "button-group-text",
@@ -990,7 +1370,7 @@ function ButtonGroupSeparator({
990
1370
  orientation = "vertical",
991
1371
  ...props
992
1372
  }) {
993
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1373
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
994
1374
  Separator,
995
1375
  {
996
1376
  "data-slot": "button-group-separator",
@@ -1005,9 +1385,9 @@ function ButtonGroupSeparator({
1005
1385
  }
1006
1386
 
1007
1387
  // src/ui/card/card.tsx
1008
- var import_jsx_runtime11 = require("react/jsx-runtime");
1388
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1009
1389
  function Card({ className, size = "default", ...props }) {
1010
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1390
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1011
1391
  "div",
1012
1392
  {
1013
1393
  "data-slot": "card",
@@ -1021,7 +1401,7 @@ function Card({ className, size = "default", ...props }) {
1021
1401
  );
1022
1402
  }
1023
1403
  function CardHeader({ className, ...props }) {
1024
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1404
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1025
1405
  "div",
1026
1406
  {
1027
1407
  "data-slot": "card-header",
@@ -1034,7 +1414,7 @@ function CardHeader({ className, ...props }) {
1034
1414
  );
1035
1415
  }
1036
1416
  function CardTitle({ className, ...props }) {
1037
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1417
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1038
1418
  "div",
1039
1419
  {
1040
1420
  "data-slot": "card-title",
@@ -1047,7 +1427,7 @@ function CardTitle({ className, ...props }) {
1047
1427
  );
1048
1428
  }
1049
1429
  function CardDescription({ className, ...props }) {
1050
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1430
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1051
1431
  "div",
1052
1432
  {
1053
1433
  "data-slot": "card-description",
@@ -1057,7 +1437,7 @@ function CardDescription({ className, ...props }) {
1057
1437
  );
1058
1438
  }
1059
1439
  function CardAction({ className, ...props }) {
1060
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1440
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1061
1441
  "div",
1062
1442
  {
1063
1443
  "data-slot": "card-action",
@@ -1067,10 +1447,10 @@ function CardAction({ className, ...props }) {
1067
1447
  );
1068
1448
  }
1069
1449
  function CardContent({ className, ...props }) {
1070
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props });
1450
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props });
1071
1451
  }
1072
1452
  function CardFooter({ className, ...props }) {
1073
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1453
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1074
1454
  "div",
1075
1455
  {
1076
1456
  "data-slot": "card-footer",
@@ -1084,12 +1464,12 @@ function CardFooter({ className, ...props }) {
1084
1464
  }
1085
1465
 
1086
1466
  // src/ui/checkbox/checkbox.tsx
1087
- var import_lucide_react2 = require("lucide-react");
1088
- var import_react_aria_components7 = require("react-aria-components");
1089
- var import_jsx_runtime12 = require("react/jsx-runtime");
1467
+ var import_lucide_react3 = require("lucide-react");
1468
+ var import_react_aria_components8 = require("react-aria-components");
1469
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1090
1470
  function Checkbox({ className, children, ...props }) {
1091
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1092
- import_react_aria_components7.Checkbox,
1471
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1472
+ import_react_aria_components8.Checkbox,
1093
1473
  {
1094
1474
  "data-slot": "checkbox",
1095
1475
  className: cn(
@@ -1097,13 +1477,13 @@ function Checkbox({ className, children, ...props }) {
1097
1477
  className
1098
1478
  ),
1099
1479
  ...props,
1100
- children: (state) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1101
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1480
+ children: (state) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1481
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1102
1482
  "span",
1103
1483
  {
1104
1484
  "aria-hidden": "true",
1105
- className: "grid size-4 place-items-center rounded border border-border bg-background text-primary-foreground transition-colors group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-3 group-data-focus-visible:ring-ring/50",
1106
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react2.Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
1485
+ className: "border-border bg-background text-primary-foreground group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-ring/50 grid size-4 place-items-center rounded border transition-colors group-data-focus-visible:ring-3",
1486
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
1107
1487
  }
1108
1488
  ),
1109
1489
  typeof children === "function" ? children(state) : children
@@ -1113,11 +1493,11 @@ function Checkbox({ className, children, ...props }) {
1113
1493
  }
1114
1494
 
1115
1495
  // src/ui/collapsible/collapsible.tsx
1116
- var React3 = __toESM(require("react"), 1);
1117
- var import_jsx_runtime13 = require("react/jsx-runtime");
1118
- var CollapsibleContext = React3.createContext(null);
1496
+ var React4 = __toESM(require("react"), 1);
1497
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1498
+ var CollapsibleContext = React4.createContext(null);
1119
1499
  function useCollapsibleContext() {
1120
- const context = React3.useContext(CollapsibleContext);
1500
+ const context = React4.useContext(CollapsibleContext);
1121
1501
  if (!context) throw new Error("Collapsible components must be rendered within Collapsible.");
1122
1502
  return context;
1123
1503
  }
@@ -1128,27 +1508,32 @@ function Collapsible({
1128
1508
  open: controlledOpen,
1129
1509
  ...props
1130
1510
  }) {
1131
- const [uncontrolledOpen, setUncontrolledOpen] = React3.useState(defaultOpen);
1132
- const contentId = React3.useId();
1511
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
1512
+ const contentId = React4.useId();
1133
1513
  const open = controlledOpen ?? uncontrolledOpen;
1134
- const setOpen = React3.useCallback(
1514
+ const setOpen = React4.useCallback(
1135
1515
  (nextOpen) => {
1136
1516
  if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
1137
1517
  onOpenChange?.(nextOpen);
1138
1518
  },
1139
1519
  [controlledOpen, onOpenChange]
1140
1520
  );
1141
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollapsibleContext.Provider, { value: { contentId, open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", ...props, children }) });
1521
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CollapsibleContext.Provider, { value: { contentId, open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", ...props, children }) });
1142
1522
  }
1143
- function CollapsibleTrigger({ asChild = false, children, onClick, ...props }) {
1523
+ function CollapsibleTrigger({
1524
+ asChild = false,
1525
+ children,
1526
+ onClick,
1527
+ ...props
1528
+ }) {
1144
1529
  const { contentId, open, setOpen } = useCollapsibleContext();
1145
1530
  const handleClick = (event) => {
1146
1531
  onClick?.(event);
1147
1532
  if (!event.defaultPrevented) setOpen(!open);
1148
1533
  };
1149
- if (asChild && React3.isValidElement(children)) {
1534
+ if (asChild && React4.isValidElement(children)) {
1150
1535
  const child = children;
1151
- return React3.cloneElement(child, {
1536
+ return React4.cloneElement(child, {
1152
1537
  ...props,
1153
1538
  "aria-controls": contentId,
1154
1539
  "aria-expanded": open,
@@ -1160,7 +1545,7 @@ function CollapsibleTrigger({ asChild = false, children, onClick, ...props }) {
1160
1545
  }
1161
1546
  });
1162
1547
  }
1163
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1548
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1164
1549
  "button",
1165
1550
  {
1166
1551
  type: "button",
@@ -1177,30 +1562,108 @@ function CollapsibleTrigger({ asChild = false, children, onClick, ...props }) {
1177
1562
  function CollapsibleContent({ children, ...props }) {
1178
1563
  const { contentId, open } = useCollapsibleContext();
1179
1564
  if (!open) return null;
1180
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id: contentId, "data-slot": "collapsible-content", "data-state": "open", ...props, children });
1565
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: contentId, "data-slot": "collapsible-content", "data-state": "open", ...props, children });
1181
1566
  }
1182
1567
 
1183
1568
  // src/ui/combobox/combobox.tsx
1184
1569
  var import_react6 = require("react");
1185
- var import_react_aria_components8 = require("react-aria-components");
1186
- var import_jsx_runtime14 = require("react/jsx-runtime");
1187
- var Combobox = import_react_aria_components8.ComboBox;
1570
+ var import_react_aria_components9 = require("react-aria-components");
1571
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1572
+ var Combobox = import_react_aria_components9.ComboBox;
1188
1573
  function ComboboxInput({ className, ...props }) {
1189
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Input, { "data-slot": "combobox-input", className: cn("h-9 w-full rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
1574
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1575
+ import_react_aria_components9.Input,
1576
+ {
1577
+ "data-slot": "combobox-input",
1578
+ className: cn(
1579
+ "h-9 w-full rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50",
1580
+ className
1581
+ ),
1582
+ ...props
1583
+ }
1584
+ );
1190
1585
  }
1191
1586
  function ComboboxContent({ className, ...props }) {
1192
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Popover, { "data-slot": "combobox-content", className: cn("max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
1587
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1588
+ import_react_aria_components9.Popover,
1589
+ {
1590
+ "data-slot": "combobox-content",
1591
+ className: cn(
1592
+ "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
1593
+ className
1594
+ ),
1595
+ ...props
1596
+ }
1597
+ );
1193
1598
  }
1194
- function ComboboxList({ className, emptyState, ...props }) {
1195
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.ListBox, { "data-slot": "combobox-list", className: cn("max-h-64 overflow-y-auto", className), renderEmptyState: emptyState ? () => emptyState : void 0, ...props });
1599
+ function ComboboxList({
1600
+ className,
1601
+ emptyState,
1602
+ ...props
1603
+ }) {
1604
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1605
+ import_react_aria_components9.ListBox,
1606
+ {
1607
+ "data-slot": "combobox-list",
1608
+ className: cn("max-h-64 overflow-y-auto", className),
1609
+ renderEmptyState: emptyState ? () => emptyState : void 0,
1610
+ ...props
1611
+ }
1612
+ );
1196
1613
  }
1197
- function ComboboxItem({ className, children, ...props }) {
1198
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.ListBoxItem, { "data-slot": "combobox-item", className: cn("flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
1614
+ function ComboboxItem({
1615
+ className,
1616
+ children,
1617
+ ...props
1618
+ }) {
1619
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1620
+ import_react_aria_components9.ListBoxItem,
1621
+ {
1622
+ "data-slot": "combobox-item",
1623
+ className: cn(
1624
+ "flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
1625
+ className
1626
+ ),
1627
+ ...props,
1628
+ children
1629
+ }
1630
+ );
1199
1631
  }
1200
- function HighlightMatch({ text, query, className }) {
1201
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react6.Fragment, { children: part.text }, `${part.text}-${index}`)) });
1632
+ function HighlightMatch({
1633
+ text,
1634
+ query,
1635
+ className
1636
+ }) {
1637
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className, children: getTextMatchParts(text, query).map(
1638
+ (part, index) => part.match ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1639
+ "mark",
1640
+ {
1641
+ className: "bg-accent text-accent-foreground rounded px-0.5",
1642
+ children: part.text
1643
+ },
1644
+ `${part.text}-${index}`
1645
+ ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react6.Fragment, { children: part.text }, `${part.text}-${index}`)
1646
+ ) });
1202
1647
  }
1203
- function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
1648
+ function AutocompleteCombobox({
1649
+ items,
1650
+ getItemKey,
1651
+ getItemLabel,
1652
+ renderItem,
1653
+ inputValue: controlledInputValue,
1654
+ onInputChange,
1655
+ selectedKey,
1656
+ onSelectionChange,
1657
+ label,
1658
+ description,
1659
+ errorMessage,
1660
+ emptyState = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-muted-foreground px-3 py-7 text-center text-sm", children: "No hay resultados." }),
1661
+ suggestion = true,
1662
+ placeholder,
1663
+ className,
1664
+ onKeyDown: _onKeyDown,
1665
+ ...props
1666
+ }) {
1204
1667
  const [internalInputValue, setInternalInputValue] = (0, import_react6.useState)("");
1205
1668
  const inputValue = controlledInputValue ?? internalInputValue;
1206
1669
  const setInputValue = (value) => {
@@ -1208,8 +1671,16 @@ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inp
1208
1671
  onInputChange?.(value);
1209
1672
  };
1210
1673
  const normalizedQuery = inputValue.trim().toLocaleLowerCase();
1211
- const filteredItems = (0, import_react6.useMemo)(() => normalizedQuery ? items.filter((item) => getItemLabel(item).toLocaleLowerCase().includes(normalizedQuery)) : [...items], [getItemLabel, items, normalizedQuery]);
1212
- const suggestedItem = (0, import_react6.useMemo)(() => !suggestion || !normalizedQuery ? void 0 : items.find((item) => getItemLabel(item).toLocaleLowerCase().startsWith(normalizedQuery) && getItemLabel(item).length > inputValue.length), [getItemLabel, inputValue.length, items, normalizedQuery, suggestion]);
1674
+ const filteredItems = (0, import_react6.useMemo)(
1675
+ () => normalizedQuery ? items.filter((item) => getItemLabel(item).toLocaleLowerCase().includes(normalizedQuery)) : [...items],
1676
+ [getItemLabel, items, normalizedQuery]
1677
+ );
1678
+ const suggestedItem = (0, import_react6.useMemo)(
1679
+ () => !suggestion || !normalizedQuery ? void 0 : items.find(
1680
+ (item) => getItemLabel(item).toLocaleLowerCase().startsWith(normalizedQuery) && getItemLabel(item).length > inputValue.length
1681
+ ),
1682
+ [getItemLabel, inputValue.length, items, normalizedQuery, suggestion]
1683
+ );
1213
1684
  const suggestionLabel = suggestedItem ? getItemLabel(suggestedItem) : void 0;
1214
1685
  const acceptSuggestion = () => {
1215
1686
  if (!suggestedItem || !suggestionLabel) return false;
@@ -1220,343 +1691,185 @@ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inp
1220
1691
  const handleKeyDown = (event) => {
1221
1692
  if ((event.key === "Tab" || event.key === "Enter") && acceptSuggestion()) event.preventDefault();
1222
1693
  };
1223
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_aria_components8.ComboBox, { ...props, className: cn("group/combobox flex w-full flex-col gap-1.5", className), items: filteredItems, selectedKey, inputValue, onInputChange: setInputValue, onSelectionChange: (key) => {
1224
- const item = filteredItems.find((candidate) => String(getItemKey(candidate)) === String(key));
1225
- if (item) setInputValue(getItemLabel(item));
1226
- onSelectionChange?.(key, item);
1227
- }, children: [
1228
- label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Label, { className: "text-sm font-medium text-foreground", children: label }),
1229
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
1230
- suggestionLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 left-2.5 z-0 flex items-center whitespace-pre text-sm text-muted-foreground/60", children: [
1231
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-transparent", children: inputValue }),
1232
- suggestionLabel.slice(inputValue.length)
1233
- ] }),
1234
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxInput, { "aria-autocomplete": suggestionLabel ? "both" : "list", placeholder, onKeyDown: handleKeyDown, className: "relative z-10 bg-transparent" })
1235
- ] }),
1236
- description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Text, { slot: "description", className: "text-xs text-muted-foreground", children: description }),
1237
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.FieldError, { className: "text-xs text-destructive", children: errorMessage }),
1238
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
1239
- ] });
1694
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1695
+ import_react_aria_components9.ComboBox,
1696
+ {
1697
+ ...props,
1698
+ className: cn("group/combobox flex w-full flex-col gap-1.5", className),
1699
+ items: filteredItems,
1700
+ selectedKey,
1701
+ inputValue,
1702
+ onInputChange: setInputValue,
1703
+ onSelectionChange: (key) => {
1704
+ const item = filteredItems.find(
1705
+ (candidate) => String(getItemKey(candidate)) === String(key)
1706
+ );
1707
+ if (item) setInputValue(getItemLabel(item));
1708
+ onSelectionChange?.(key, item);
1709
+ },
1710
+ children: [
1711
+ label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Label, { className: "text-foreground text-sm font-medium", children: label }),
1712
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative", children: [
1713
+ suggestionLabel && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1714
+ "span",
1715
+ {
1716
+ "aria-hidden": "true",
1717
+ className: "text-muted-foreground/60 pointer-events-none absolute inset-y-0 left-2.5 z-0 flex items-center text-sm whitespace-pre",
1718
+ children: [
1719
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-transparent", children: inputValue }),
1720
+ suggestionLabel.slice(inputValue.length)
1721
+ ]
1722
+ }
1723
+ ),
1724
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1725
+ ComboboxInput,
1726
+ {
1727
+ "aria-autocomplete": suggestionLabel ? "both" : "list",
1728
+ placeholder,
1729
+ onKeyDown: handleKeyDown,
1730
+ className: "relative z-10 bg-transparent"
1731
+ }
1732
+ )
1733
+ ] }),
1734
+ description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Text, { slot: "description", className: "text-muted-foreground text-xs", children: description }),
1735
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.FieldError, { className: "text-destructive text-xs", children: errorMessage }),
1736
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
1737
+ ]
1738
+ }
1739
+ );
1240
1740
  }
1241
1741
 
1242
1742
  // src/ui/command/command.tsx
1243
- var import_react_aria_components9 = require("react-aria-components");
1244
- var import_jsx_runtime15 = require("react/jsx-runtime");
1743
+ var import_react_aria_components10 = require("react-aria-components");
1744
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1245
1745
  function Command({ className, ...props }) {
1246
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ComboBox, { "data-slot": "command", className: cn("w-full", className), ...props });
1746
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.ComboBox, { "data-slot": "command", className: cn("w-full", className), ...props });
1247
1747
  }
1248
1748
  function CommandInput({ className, ...props }) {
1249
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Input, { "data-slot": "command-input", className: cn("h-9 w-full border-0 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground", className), ...props });
1250
- }
1251
- function CommandContent({ className, ...props }) {
1252
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Popover, { "data-slot": "command-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none", className), ...props });
1253
- }
1254
- function CommandList({ className, ...props }) {
1255
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ListBox, { "data-slot": "command-list", className: cn("max-h-72 overflow-y-auto", className), ...props });
1256
- }
1257
- function CommandItem({ className, ...props }) {
1258
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ListBoxItem, { "data-slot": "command-item", className: cn("flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props });
1259
- }
1260
-
1261
- // src/ui/modal-dialog/modal-dialog.tsx
1262
- var import_lucide_react3 = require("lucide-react");
1263
- var import_react_aria_components10 = require("react-aria-components");
1264
- var import_jsx_runtime16 = require("react/jsx-runtime");
1265
- var sizeClasses = {
1266
- sm: "w-[min(calc(100dvw-2rem),24rem)]",
1267
- md: "w-[min(calc(100dvw-2rem),28rem)]",
1268
- lg: "w-[min(calc(100dvw-2rem),36rem)]"
1269
- };
1270
- function ModalDialog({
1271
- open,
1272
- onOpenChange,
1273
- title,
1274
- description,
1275
- children,
1276
- footer,
1277
- size = "sm",
1278
- showCloseButton = true,
1279
- className,
1280
- footerClassName,
1281
- ...props
1282
- }) {
1283
- const layoutClass = children ? footer ? "grid-rows-[auto_minmax(0,1fr)_auto]" : "grid-rows-[auto_minmax(0,1fr)]" : "grid-rows-[auto_auto]";
1284
1749
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1285
- import_react_aria_components10.ModalOverlay,
1750
+ import_react_aria_components10.Input,
1286
1751
  {
1287
- isOpen: open,
1288
- onOpenChange,
1289
- className: "fixed inset-0 z-50 grid place-items-center bg-black/20 p-4 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out",
1290
- ...props,
1291
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1292
- import_react_aria_components10.Modal,
1293
- {
1294
- className: cn(
1295
- "max-h-[calc(100dvh-2rem)] outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
1296
- sizeClasses[size],
1297
- className
1298
- ),
1299
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1300
- import_react_aria_components10.Dialog,
1301
- {
1302
- className: cn(
1303
- "grid max-h-[calc(100dvh-2rem)] overflow-hidden rounded-xl bg-background text-foreground shadow-xl outline-none",
1304
- layoutClass
1305
- ),
1306
- children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1307
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { "data-slot": "modal-dialog-header", className: "flex items-start gap-3 border-b border-border px-5 py-4", children: [
1308
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "min-w-0 flex-1", children: [
1309
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Heading, { slot: "title", className: "font-heading text-base leading-none font-medium", children: title }),
1310
- description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Text, { slot: "description", className: "mt-2 text-sm text-muted-foreground", children: description }) : null
1311
- ] }),
1312
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1313
- Button,
1314
- {
1315
- "aria-label": "Cerrar di\xE1logo",
1316
- variant: "ghost",
1317
- size: "icon",
1318
- className: "-mr-2 -mt-1",
1319
- onPress: close,
1320
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.X, { "aria-hidden": "true", className: "size-4" })
1321
- }
1322
- ) : null
1323
- ] }),
1324
- children ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-slot": "modal-dialog-body", className: "min-h-0 overflow-y-auto px-5 py-4", children }) : null,
1325
- footer ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1326
- "footer",
1327
- {
1328
- "data-slot": "modal-dialog-footer",
1329
- className: cn(
1330
- "flex flex-col-reverse gap-2 border-t border-border bg-muted/50 px-5 py-4 sm:flex-row sm:flex-wrap sm:justify-end",
1331
- footerClassName
1332
- ),
1333
- children: footer
1334
- }
1335
- ) : null
1336
- ] })
1337
- }
1338
- )
1339
- }
1340
- )
1752
+ "data-slot": "command-input",
1753
+ className: cn(
1754
+ "h-9 w-full border-0 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground",
1755
+ className
1756
+ ),
1757
+ ...props
1341
1758
  }
1342
1759
  );
1343
1760
  }
1344
-
1345
- // src/ui/confirm-dialog/confirm-dialog.tsx
1346
- var import_jsx_runtime17 = require("react/jsx-runtime");
1347
- function ConfirmDialog({
1348
- open,
1349
- onOpenChange,
1350
- title,
1351
- description,
1352
- confirmLabel = "Confirmar",
1353
- cancelLabel = "Cancelar",
1354
- destructive = false,
1355
- pending = false,
1356
- onConfirm
1357
- }) {
1358
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1359
- ModalDialog,
1761
+ function CommandContent({ className, ...props }) {
1762
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1763
+ import_react_aria_components10.Popover,
1360
1764
  {
1361
- open,
1362
- onOpenChange,
1363
- title,
1364
- description,
1365
- showCloseButton: false,
1366
- footer: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1367
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
1368
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: destructive ? "destructive" : "default", isDisabled: pending, onPress: onConfirm, children: confirmLabel })
1369
- ] })
1765
+ "data-slot": "command-content",
1766
+ className: cn(
1767
+ "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none",
1768
+ className
1769
+ ),
1770
+ ...props
1370
1771
  }
1371
1772
  );
1372
1773
  }
1373
-
1374
- // src/ui/danger-zone/danger-zone.tsx
1375
- var import_lucide_react4 = require("lucide-react");
1376
- var import_react_aria_components11 = require("react-aria-components");
1377
- var import_jsx_runtime18 = require("react/jsx-runtime");
1378
- function DangerZone({
1379
- title = "Zona de peligro",
1380
- description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
1381
- defaultOpen = false,
1774
+ function CommandList({
1382
1775
  className,
1383
- children
1776
+ ...props
1384
1777
  }) {
1385
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
1386
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1387
- import_react_aria_components11.Button,
1388
- {
1389
- slot: "trigger",
1390
- "data-slot": "danger-zone-trigger",
1391
- className: "group/danger flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
1392
- children: [
1393
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ShieldAlert, { className: "size-4 shrink-0 text-destructive" }),
1394
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
1395
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-heading text-base leading-snug font-medium text-destructive", children: title }),
1396
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground", children: description })
1397
- ] }),
1398
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ChevronDown, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/danger:rotate-180" })
1399
- ]
1400
- }
1401
- ) }),
1402
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardContent, { children }) })
1403
- ] }) });
1404
- }
1405
-
1406
- // src/ui/dialog/dialog.tsx
1407
- var import_lucide_react5 = require("lucide-react");
1408
- var React4 = __toESM(require("react"), 1);
1409
- var import_react_aria_components12 = require("react-aria-components");
1410
- var import_jsx_runtime19 = require("react/jsx-runtime");
1411
- var DialogContext = React4.createContext(null);
1412
- function useDialogContext() {
1413
- const context = React4.useContext(DialogContext);
1414
- if (!context) throw new Error("Dialog components must be rendered within Dialog.");
1415
- return context;
1416
- }
1417
- function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledOpen }) {
1418
- const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
1419
- const open = controlledOpen ?? uncontrolledOpen;
1420
- const setOpen = React4.useCallback(
1421
- (nextOpen) => {
1422
- if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
1423
- onOpenChange?.(nextOpen);
1424
- },
1425
- [controlledOpen, onOpenChange]
1778
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1779
+ import_react_aria_components10.ListBox,
1780
+ {
1781
+ "data-slot": "command-list",
1782
+ className: cn("max-h-72 overflow-y-auto", className),
1783
+ ...props
1784
+ }
1426
1785
  );
1427
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogContext.Provider, { value: { open, setOpen }, children });
1428
- }
1429
- function DialogTrigger({ asChild = false, children, onClick, ...props }) {
1430
- const { setOpen } = useDialogContext();
1431
- const handleClick = (event) => {
1432
- onClick?.(event);
1433
- if (!event.defaultPrevented) setOpen(true);
1434
- };
1435
- if (asChild && React4.isValidElement(children)) {
1436
- const child = children;
1437
- return React4.cloneElement(child, {
1438
- ...props,
1439
- "data-slot": "dialog-trigger",
1440
- onClick: (event) => {
1441
- child.props.onClick?.(event);
1442
- handleClick(event);
1443
- }
1444
- });
1445
- }
1446
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
1447
1786
  }
1448
- function DialogPortal({ children }) {
1449
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
1450
- }
1451
- function DialogOverlay({ children, className, ...props }) {
1452
- const { open, setOpen } = useDialogContext();
1453
- if (!open) return null;
1454
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1455
- import_react_aria_components12.ModalOverlay,
1787
+ function CommandItem({ className, ...props }) {
1788
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1789
+ import_react_aria_components10.ListBoxItem,
1456
1790
  {
1457
- "data-slot": "dialog-overlay",
1458
- isDismissable: true,
1459
- isOpen: open,
1460
- onOpenChange: setOpen,
1791
+ "data-slot": "command-item",
1461
1792
  className: cn(
1462
- "fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 duration-100 supports-backdrop-filter:backdrop-blur-xs data-entering:animate-ui-overlay-in data-exiting:animate-ui-overlay-out",
1793
+ "flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
1463
1794
  className
1464
1795
  ),
1465
- ...props,
1466
- children
1796
+ ...props
1467
1797
  }
1468
1798
  );
1469
1799
  }
1470
- function DialogContent({
1471
- children,
1472
- className,
1473
- onOverlayClick,
1474
- showCloseButton = true,
1475
- ...props
1800
+
1801
+ // src/ui/confirm-dialog/confirm-dialog.tsx
1802
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1803
+ function ConfirmDialog({
1804
+ open,
1805
+ onOpenChange,
1806
+ title,
1807
+ description,
1808
+ confirmLabel = "Confirmar",
1809
+ cancelLabel = "Cancelar",
1810
+ destructive = false,
1811
+ pending = false,
1812
+ onConfirm
1476
1813
  }) {
1477
- const { setOpen } = useDialogContext();
1478
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1479
- DialogOverlay,
1480
- {
1481
- onClick: (event) => {
1482
- if (event.target === event.currentTarget) onOverlayClick?.(event);
1483
- },
1484
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1485
- import_react_aria_components12.Modal,
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogContent, { children: [
1815
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogHeader, { children: [
1816
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogTitle, { children: title }),
1817
+ description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogDescription, { children: description }) : null
1818
+ ] }),
1819
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogFooter, { children: [
1820
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
1821
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1822
+ Button,
1486
1823
  {
1487
- className: cn(
1488
- "w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
1489
- className
1490
- ),
1491
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1492
- import_react_aria_components12.Dialog,
1493
- {
1494
- "data-slot": "dialog-content",
1495
- className: cn(
1496
- "grid max-h-[calc(100dvh-2rem)] gap-4 overflow-y-auto rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none",
1497
- className
1498
- ),
1499
- ...props,
1500
- children: [
1501
- children,
1502
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1503
- Button,
1504
- {
1505
- "aria-label": "Cerrar di\xE1logo",
1506
- "data-slot": "dialog-close",
1507
- variant: "ghost",
1508
- className: "absolute top-2 right-2",
1509
- size: "icon-sm",
1510
- onPress: () => setOpen(false),
1511
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.XIcon, {})
1512
- }
1513
- ) : null
1514
- ]
1515
- }
1516
- )
1824
+ variant: destructive ? "destructive" : "default",
1825
+ isDisabled: pending,
1826
+ onPress: onConfirm,
1827
+ children: confirmLabel
1517
1828
  }
1518
1829
  )
1519
- }
1520
- ) });
1830
+ ] })
1831
+ ] }) });
1521
1832
  }
1522
- function DialogClose({ asChild = false, children, onClick, ...props }) {
1523
- const { setOpen } = useDialogContext();
1524
- if (asChild && React4.isValidElement(children)) {
1525
- const child = children;
1526
- return React4.cloneElement(child, {
1527
- ...props,
1528
- "data-slot": "dialog-close",
1529
- onClick: (event) => {
1530
- child.props.onClick?.(event);
1531
- if (!event.defaultPrevented) setOpen(false);
1833
+
1834
+ // src/ui/danger-zone/danger-zone.tsx
1835
+ var import_lucide_react4 = require("lucide-react");
1836
+ var import_react_aria_components11 = require("react-aria-components");
1837
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1838
+ function DangerZone({
1839
+ title = "Zona de peligro",
1840
+ description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
1841
+ defaultOpen = false,
1842
+ className,
1843
+ children
1844
+ }) {
1845
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
1846
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1847
+ import_react_aria_components11.Button,
1848
+ {
1849
+ slot: "trigger",
1850
+ "data-slot": "danger-zone-trigger",
1851
+ className: "group/danger focus-visible:ring-ring/50 flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3",
1852
+ children: [
1853
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
1854
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
1855
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
1856
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-muted-foreground text-xs", children: description })
1857
+ ] }),
1858
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
1859
+ ]
1532
1860
  }
1533
- });
1534
- }
1535
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
1536
- }
1537
- function DialogHeader({ className, ...props }) {
1538
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
1539
- }
1540
- function DialogFooter({ className, showCloseButton = false, children, ...props }) {
1541
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "data-slot": "dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:flex-wrap sm:justify-end", className), ...props, children: [
1542
- children,
1543
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogClose, { variant: "outline", children: "Cerrar" }) : null
1544
- ] });
1545
- }
1546
- function DialogTitle({ className, ...props }) {
1547
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components12.Heading, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
1548
- }
1549
- function DialogDescription({ className, ...props }) {
1550
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components12.Text, { slot: "description", "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props });
1861
+ ) }),
1862
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardContent, { children }) })
1863
+ ] }) });
1551
1864
  }
1552
1865
 
1553
1866
  // src/ui/doc-preview/doc-preview.tsx
1554
- var import_lucide_react6 = require("lucide-react");
1555
- var import_jsx_runtime20 = require("react/jsx-runtime");
1867
+ var import_lucide_react5 = require("lucide-react");
1868
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1556
1869
  function DocPreview({ url, mimeType, name }) {
1557
- if (!url) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Fallback, { mimeType, reason: "no-url" });
1870
+ if (!url) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Fallback, { mimeType, reason: "no-url" });
1558
1871
  if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
1559
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1872
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1560
1873
  "iframe",
1561
1874
  {
1562
1875
  src: url,
@@ -1567,53 +1880,34 @@ function DocPreview({ url, mimeType, name }) {
1567
1880
  );
1568
1881
  }
1569
1882
  if (mimeType?.startsWith("image/")) {
1570
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex justify-center rounded-sm bg-muted/30 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
1883
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
1571
1884
  }
1572
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Fallback, { mimeType, reason: "unsupported" });
1885
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Fallback, { mimeType, reason: "unsupported" });
1573
1886
  }
1574
- function Fallback({ mimeType, reason }) {
1575
- const Icon = mimeType?.startsWith("image/") ? import_lucide_react6.Image : import_lucide_react6.FileText;
1887
+ function Fallback({
1888
+ mimeType,
1889
+ reason
1890
+ }) {
1891
+ const Icon = mimeType?.startsWith("image/") ? import_lucide_react5.Image : import_lucide_react5.FileText;
1576
1892
  const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
1577
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 py-14 text-muted-foreground", children: [
1578
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { className: "size-9 opacity-30" }),
1579
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm", children: message }),
1580
- mimeType ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
1581
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
1893
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
1894
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { className: "size-9 opacity-30" }),
1895
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm", children: message }),
1896
+ mimeType ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
1897
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
1582
1898
  ] });
1583
1899
  }
1584
1900
 
1585
- // src/ui/drawer/drawer.tsx
1586
- var import_react_aria_components13 = require("react-aria-components");
1587
- var import_jsx_runtime21 = require("react/jsx-runtime");
1588
- var sideStyles = { left: "inset-y-0 left-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", right: "inset-y-0 right-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", bottom: "inset-x-0 bottom-0 max-h-[85vh] w-full data-entering:animate-ui-surface-in" };
1589
- function Drawer({ children, side = "right", className, ...props }) {
1590
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.ModalOverlay, { isDismissable: true, className: "fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Modal, { className: cn("absolute grid gap-4 overflow-y-auto rounded-xl border border-border bg-background p-5 text-foreground shadow-xl outline-none", sideStyles[side], className), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Dialog, { "data-slot": "drawer", className: "outline-none", children }) }) });
1591
- }
1592
- function DrawerHeader({ className, ...props }) {
1593
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
1594
- }
1595
- function DrawerFooter({ className, ...props }) {
1596
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end", className), ...props });
1597
- }
1598
- function DrawerTitle({ className, ...props }) {
1599
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Heading, { slot: "title", "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
1600
- }
1601
- function DrawerDescription({ className, ...props }) {
1602
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
1603
- }
1604
-
1605
1901
  // src/ui/dropdown-menu/dropdown-menu.tsx
1606
- var React5 = require("react");
1607
1902
  var import_class_variance_authority6 = require("class-variance-authority");
1608
- var import_lucide_react7 = require("lucide-react");
1609
- var import_react_aria_components14 = require("react-aria-components");
1610
- var import_jsx_runtime22 = require("react/jsx-runtime");
1611
- function DropdownMenuTrigger({
1612
- ...props
1613
- }) {
1614
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
1903
+ var import_lucide_react6 = require("lucide-react");
1904
+ var React5 = require("react");
1905
+ var import_react_aria_components12 = require("react-aria-components");
1906
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1907
+ function DropdownMenuTrigger({ ...props }) {
1908
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
1615
1909
  }
1616
- function DropdownMenu({
1910
+ function DropdownMenuContent({
1617
1911
  "data-slot": dataSlot = "dropdown-menu-content",
1618
1912
  placement = "bottom start",
1619
1913
  offset = 4,
@@ -1622,16 +1916,19 @@ function DropdownMenu({
1622
1916
  children,
1623
1917
  ...props
1624
1918
  }) {
1625
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1626
- import_react_aria_components14.Popover,
1919
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1920
+ import_react_aria_components12.Popover,
1627
1921
  {
1628
1922
  "data-slot": dataSlot,
1629
1923
  placement,
1630
1924
  offset,
1631
1925
  crossOffset,
1632
- className: cn("z-50 w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className),
1633
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1634
- import_react_aria_components14.Menu,
1926
+ className: cn(
1927
+ "z-50 w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
1928
+ className
1929
+ ),
1930
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1931
+ import_react_aria_components12.Menu,
1635
1932
  {
1636
1933
  className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
1637
1934
  ...props,
@@ -1641,18 +1938,27 @@ function DropdownMenu({
1641
1938
  }
1642
1939
  );
1643
1940
  }
1941
+ function DropdownMenu(props) {
1942
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuContent, { ...props });
1943
+ const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
1944
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
1945
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
1946
+ triggerElement,
1947
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuContent, { ...contentProps, children })
1948
+ ] });
1949
+ }
1644
1950
  function DropdownMenuGroup({
1645
1951
  ...props
1646
1952
  }) {
1647
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
1953
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
1648
1954
  }
1649
1955
  function DropdownMenuLabel({
1650
1956
  className,
1651
1957
  inset,
1652
1958
  ...props
1653
1959
  }) {
1654
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1655
- import_react_aria_components14.Header,
1960
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1961
+ import_react_aria_components12.Header,
1656
1962
  {
1657
1963
  "data-slot": "dropdown-menu-label",
1658
1964
  "data-inset": inset,
@@ -1683,39 +1989,34 @@ function DropdownMenuItem({
1683
1989
  children,
1684
1990
  ...props
1685
1991
  }) {
1686
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1687
- import_react_aria_components14.MenuItem,
1992
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1993
+ import_react_aria_components12.MenuItem,
1688
1994
  {
1689
1995
  "data-slot": "dropdown-menu-item",
1690
1996
  "data-inset": inset,
1691
1997
  "data-variant": variant,
1692
1998
  textValue: typeof children === "string" ? children : props.textValue,
1693
- className: (0, import_react_aria_components14.composeRenderProps)(
1999
+ className: (0, import_react_aria_components12.composeRenderProps)(
1694
2000
  className,
1695
2001
  (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
1696
2002
  ),
1697
2003
  ...props,
1698
- children: (0, import_react_aria_components14.composeRenderProps)(
1699
- children,
1700
- (children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1701
- selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1702
- "span",
1703
- {
1704
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
1705
- "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
1706
- children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react7.CheckIcon, {}) : null
1707
- }
1708
- ) : null,
1709
- children2
1710
- ] })
1711
- )
2004
+ children: (0, import_react_aria_components12.composeRenderProps)(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2005
+ selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2006
+ "span",
2007
+ {
2008
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
2009
+ "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
2010
+ children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.CheckIcon, {}) : null
2011
+ }
2012
+ ) : null,
2013
+ children2
2014
+ ] }))
1712
2015
  }
1713
2016
  );
1714
2017
  }
1715
- function DropdownMenuSub({
1716
- ...props
1717
- }) {
1718
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
2018
+ function DropdownMenuSub({ ...props }) {
2019
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
1719
2020
  }
1720
2021
  function DropdownMenuSubTrigger({
1721
2022
  className,
@@ -1723,8 +2024,8 @@ function DropdownMenuSubTrigger({
1723
2024
  children,
1724
2025
  ...props
1725
2026
  }) {
1726
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1727
- import_react_aria_components14.MenuItem,
2027
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2028
+ import_react_aria_components12.MenuItem,
1728
2029
  {
1729
2030
  "data-slot": "dropdown-menu-sub-trigger",
1730
2031
  "data-inset": inset,
@@ -1734,9 +2035,9 @@ function DropdownMenuSubTrigger({
1734
2035
  className
1735
2036
  ),
1736
2037
  ...props,
1737
- children: (0, import_react_aria_components14.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2038
+ children: (0, import_react_aria_components12.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
1738
2039
  children2,
1739
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react7.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
2040
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
1740
2041
  ] }))
1741
2042
  }
1742
2043
  );
@@ -1748,11 +2049,14 @@ function DropdownMenuSubContent({
1748
2049
  className,
1749
2050
  ...props
1750
2051
  }) {
1751
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1752
- DropdownMenu,
2052
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2053
+ DropdownMenuContent,
1753
2054
  {
1754
2055
  "data-slot": "dropdown-menu-sub-content",
1755
- className: cn("w-auto min-w-24 rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg", className),
2056
+ className: cn(
2057
+ "w-auto min-w-24 rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg",
2058
+ className
2059
+ ),
1756
2060
  placement,
1757
2061
  crossOffset,
1758
2062
  offset,
@@ -1764,8 +2068,8 @@ function DropdownMenuSeparator({
1764
2068
  className,
1765
2069
  ...props
1766
2070
  }) {
1767
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1768
- import_react_aria_components14.Separator,
2071
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2072
+ import_react_aria_components12.Separator,
1769
2073
  {
1770
2074
  "data-slot": "dropdown-menu-separator",
1771
2075
  className: cn("-mx-1 my-1 h-px bg-border", className),
@@ -1773,11 +2077,8 @@ function DropdownMenuSeparator({
1773
2077
  }
1774
2078
  );
1775
2079
  }
1776
- function DropdownMenuShortcut({
1777
- className,
1778
- ...props
1779
- }) {
1780
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2080
+ function DropdownMenuShortcut({ className, ...props }) {
2081
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1781
2082
  "span",
1782
2083
  {
1783
2084
  "data-slot": "dropdown-menu-shortcut",
@@ -1790,11 +2091,25 @@ function DropdownMenuShortcut({
1790
2091
  );
1791
2092
  }
1792
2093
 
1793
- // src/ui/empty-state/empty-state.tsx
2094
+ // src/ui/empty-state/empty-state-variants.ts
1794
2095
  var import_class_variance_authority7 = require("class-variance-authority");
1795
- var import_jsx_runtime23 = require("react/jsx-runtime");
2096
+ var emptyStateMediaVariants = (0, import_class_variance_authority7.cva)(
2097
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
2098
+ {
2099
+ variants: {
2100
+ variant: {
2101
+ default: "bg-transparent",
2102
+ icon: "size-8 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
2103
+ }
2104
+ },
2105
+ defaultVariants: { variant: "default" }
2106
+ }
2107
+ );
2108
+
2109
+ // src/ui/empty-state/empty-state.tsx
2110
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1796
2111
  function EmptyState({ className, ...props }) {
1797
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2112
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1798
2113
  "div",
1799
2114
  {
1800
2115
  "data-slot": "empty-state",
@@ -1807,7 +2122,7 @@ function EmptyState({ className, ...props }) {
1807
2122
  );
1808
2123
  }
1809
2124
  function EmptyStateHeader({ className, ...props }) {
1810
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2125
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1811
2126
  "div",
1812
2127
  {
1813
2128
  "data-slot": "empty-state-header",
@@ -1816,24 +2131,12 @@ function EmptyStateHeader({ className, ...props }) {
1816
2131
  }
1817
2132
  );
1818
2133
  }
1819
- var emptyStateMediaVariants = (0, import_class_variance_authority7.cva)(
1820
- "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
1821
- {
1822
- variants: {
1823
- variant: {
1824
- default: "bg-transparent",
1825
- icon: "size-8 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
1826
- }
1827
- },
1828
- defaultVariants: { variant: "default" }
1829
- }
1830
- );
1831
2134
  function EmptyStateMedia({
1832
2135
  className,
1833
2136
  variant = "default",
1834
2137
  ...props
1835
2138
  }) {
1836
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2139
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1837
2140
  "div",
1838
2141
  {
1839
2142
  "data-slot": "empty-state-media",
@@ -1843,18 +2146,19 @@ function EmptyStateMedia({
1843
2146
  }
1844
2147
  );
1845
2148
  }
1846
- function EmptyStateTitle({ className, ...props }) {
1847
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2149
+ function EmptyStateTitle({ className, children, ...props }) {
2150
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1848
2151
  "h3",
1849
2152
  {
1850
2153
  "data-slot": "empty-state-title",
1851
2154
  className: cn("text-sm font-medium tracking-tight text-foreground", className),
1852
- ...props
2155
+ ...props,
2156
+ children
1853
2157
  }
1854
2158
  );
1855
2159
  }
1856
2160
  function EmptyStateDescription({ className, ...props }) {
1857
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2161
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1858
2162
  "p",
1859
2163
  {
1860
2164
  "data-slot": "empty-state-description",
@@ -1867,7 +2171,7 @@ function EmptyStateDescription({ className, ...props }) {
1867
2171
  );
1868
2172
  }
1869
2173
  function EmptyStateContent({ className, ...props }) {
1870
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2174
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1871
2175
  "div",
1872
2176
  {
1873
2177
  "data-slot": "empty-state-content",
@@ -1880,28 +2184,54 @@ function EmptyStateContent({ className, ...props }) {
1880
2184
  );
1881
2185
  }
1882
2186
 
1883
- // src/ui/field/field.tsx
1884
- var import_class_variance_authority8 = require("class-variance-authority");
1885
-
1886
2187
  // src/ui/label/label.tsx
1887
2188
  var import_react7 = require("react");
1888
- var import_react_aria_components15 = require("react-aria-components");
1889
- var import_jsx_runtime24 = require("react/jsx-runtime");
1890
- var Label2 = (0, import_react7.forwardRef)(function Label3({ className, ...props }, ref) {
1891
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components15.Label, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
1892
- });
2189
+ var import_react_aria_components13 = require("react-aria-components");
2190
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2191
+ var Label2 = (0, import_react7.forwardRef)(
2192
+ function Label3({ className, ...props }, ref) {
2193
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2194
+ import_react_aria_components13.Label,
2195
+ {
2196
+ ref,
2197
+ "data-slot": "label",
2198
+ className: cn(
2199
+ "flex items-center gap-2 text-sm font-medium leading-none select-none",
2200
+ className
2201
+ ),
2202
+ ...props
2203
+ }
2204
+ );
2205
+ }
2206
+ );
2207
+
2208
+ // src/ui/field/field-variants.ts
2209
+ var import_class_variance_authority8 = require("class-variance-authority");
2210
+ var fieldVariants = (0, import_class_variance_authority8.cva)(
2211
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
2212
+ {
2213
+ variants: {
2214
+ orientation: {
2215
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
2216
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto",
2217
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto"
2218
+ }
2219
+ },
2220
+ defaultVariants: { orientation: "vertical" }
2221
+ }
2222
+ );
1893
2223
 
1894
2224
  // src/ui/field/field.tsx
1895
- var import_jsx_runtime25 = require("react/jsx-runtime");
2225
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1896
2226
  function FieldSet({ className, ...props }) {
1897
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2227
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
1898
2228
  }
1899
2229
  function FieldLegend({
1900
2230
  className,
1901
2231
  variant = "legend",
1902
2232
  ...props
1903
2233
  }) {
1904
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2234
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1905
2235
  "legend",
1906
2236
  {
1907
2237
  "data-slot": "field-legend",
@@ -1915,7 +2245,7 @@ function FieldLegend({
1915
2245
  );
1916
2246
  }
1917
2247
  function FieldGroup({ className, ...props }) {
1918
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2248
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1919
2249
  "div",
1920
2250
  {
1921
2251
  "data-slot": "field-group",
@@ -1927,23 +2257,10 @@ function FieldGroup({ className, ...props }) {
1927
2257
  }
1928
2258
  );
1929
2259
  }
1930
- var fieldVariants = (0, import_class_variance_authority8.cva)(
1931
- "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
1932
- {
1933
- variants: {
1934
- orientation: {
1935
- vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
1936
- horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto",
1937
- responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto"
1938
- }
1939
- },
1940
- defaultVariants: { orientation: "vertical" }
1941
- }
1942
- );
1943
2260
  function Field({ className, orientation = "vertical", ...props }) {
1944
2261
  return (
1945
2262
  // biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
1946
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2263
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1947
2264
  "div",
1948
2265
  {
1949
2266
  role: "group",
@@ -1956,7 +2273,7 @@ function Field({ className, orientation = "vertical", ...props }) {
1956
2273
  );
1957
2274
  }
1958
2275
  function FieldContent({ className, ...props }) {
1959
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2276
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1960
2277
  "div",
1961
2278
  {
1962
2279
  "data-slot": "field-content",
@@ -1966,7 +2283,7 @@ function FieldContent({ className, ...props }) {
1966
2283
  );
1967
2284
  }
1968
2285
  function FieldLabel({ className, ...props }) {
1969
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2286
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1970
2287
  Label2,
1971
2288
  {
1972
2289
  "data-slot": "field-label",
@@ -1979,7 +2296,7 @@ function FieldLabel({ className, ...props }) {
1979
2296
  );
1980
2297
  }
1981
2298
  function FieldTitle({ className, ...props }) {
1982
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2299
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1983
2300
  "div",
1984
2301
  {
1985
2302
  "data-slot": "field-title",
@@ -1989,7 +2306,7 @@ function FieldTitle({ className, ...props }) {
1989
2306
  );
1990
2307
  }
1991
2308
  function FieldDescription({ className, ...props }) {
1992
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2309
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1993
2310
  "p",
1994
2311
  {
1995
2312
  "data-slot": "field-description",
@@ -2002,7 +2319,7 @@ function FieldDescription({ className, ...props }) {
2002
2319
  );
2003
2320
  }
2004
2321
  function FieldSeparator({ className, children, ...props }) {
2005
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2322
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2006
2323
  "div",
2007
2324
  {
2008
2325
  "data-slot": "field-separator",
@@ -2010,12 +2327,12 @@ function FieldSeparator({ className, children, ...props }) {
2010
2327
  className: cn("relative -my-2 h-5 text-sm", className),
2011
2328
  ...props,
2012
2329
  children: [
2013
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
2014
- children ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2330
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
2331
+ children ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2015
2332
  "span",
2016
2333
  {
2017
2334
  "data-slot": "field-separator-content",
2018
- className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
2335
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
2019
2336
  children
2020
2337
  }
2021
2338
  ) : null
@@ -2025,9 +2342,9 @@ function FieldSeparator({ className, children, ...props }) {
2025
2342
  }
2026
2343
  function FieldError2({ className, children, errors, ...props }) {
2027
2344
  const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
2028
- const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { children: message }, message)) }) : null);
2345
+ const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: message }, message)) }) : null);
2029
2346
  if (!content) return null;
2030
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2347
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2031
2348
  "div",
2032
2349
  {
2033
2350
  role: "alert",
@@ -2040,9 +2357,42 @@ function FieldError2({ className, children, errors, ...props }) {
2040
2357
  }
2041
2358
 
2042
2359
  // src/ui/form-feedback/form-feedback.tsx
2360
+ var import_lucide_react7 = require("lucide-react");
2361
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2362
+ function FormFeedback({
2363
+ state,
2364
+ className,
2365
+ pendingLabel = "Guardando\u2026",
2366
+ successLabel = "Guardado"
2367
+ }) {
2368
+ if (state.status === "idle")
2369
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2370
+ const error = state.status === "error";
2371
+ const success = state.status === "success";
2372
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2373
+ "span",
2374
+ {
2375
+ role: error ? "alert" : "status",
2376
+ "aria-live": "polite",
2377
+ className: cn(
2378
+ "inline-flex h-5 items-center gap-1.5 text-xs",
2379
+ error && "text-destructive",
2380
+ success && "text-success",
2381
+ state.status === "pending" && "text-muted-foreground",
2382
+ className
2383
+ ),
2384
+ children: [
2385
+ state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2386
+ success && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2387
+ error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2388
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2389
+ ]
2390
+ }
2391
+ );
2392
+ }
2393
+
2394
+ // src/ui/form-feedback/use-form-feedback.ts
2043
2395
  var import_react8 = require("react");
2044
- var import_lucide_react8 = require("lucide-react");
2045
- var import_jsx_runtime26 = require("react/jsx-runtime");
2046
2396
  function useFormFeedback(options) {
2047
2397
  const resetMs = options?.successResetMs ?? 2500;
2048
2398
  const [state, setState] = (0, import_react8.useState)({ status: "idle" });
@@ -2056,79 +2406,74 @@ function useFormFeedback(options) {
2056
2406
  clearTimer();
2057
2407
  setState({ status: "pending" });
2058
2408
  }, [clearTimer]);
2059
- const setSuccess = (0, import_react8.useCallback)((message) => {
2060
- clearTimer();
2061
- setState({ status: "success", message });
2062
- if (resetMs > 0) timer.current = setTimeout(() => setState({ status: "idle" }), resetMs);
2063
- }, [clearTimer, resetMs]);
2064
- const setError = (0, import_react8.useCallback)((message) => {
2065
- clearTimer();
2066
- setState({ status: "error", message });
2067
- }, [clearTimer]);
2409
+ const setSuccess = (0, import_react8.useCallback)(
2410
+ (message) => {
2411
+ clearTimer();
2412
+ setState({ status: "success", message });
2413
+ if (resetMs > 0) timer.current = setTimeout(() => setState({ status: "idle" }), resetMs);
2414
+ },
2415
+ [clearTimer, resetMs]
2416
+ );
2417
+ const setError = (0, import_react8.useCallback)(
2418
+ (message) => {
2419
+ clearTimer();
2420
+ setState({ status: "error", message });
2421
+ },
2422
+ [clearTimer]
2423
+ );
2068
2424
  const reset = (0, import_react8.useCallback)(() => {
2069
2425
  clearTimer();
2070
- setState({ status: "idle" });
2071
- }, [clearTimer]);
2072
- return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
2073
- }
2074
- function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
2075
- if (state.status === "idle") return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2076
- const error = state.status === "error";
2077
- const success = state.status === "success";
2078
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { role: error ? "alert" : "status", "aria-live": "polite", className: cn("inline-flex h-5 items-center gap-1.5 text-xs", error && "text-destructive", success && "text-success", state.status === "pending" && "text-muted-foreground", className), children: [
2079
- state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2080
- success && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2081
- error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2082
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2083
- ] });
2426
+ setState({ status: "idle" });
2427
+ }, [clearTimer]);
2428
+ return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
2084
2429
  }
2085
2430
 
2086
2431
  // src/ui/form-row/form-row.tsx
2087
- var import_jsx_runtime27 = require("react/jsx-runtime");
2088
- function FormRow({ label, htmlFor, required, hint, error, className, children }) {
2432
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2433
+ function FormRow({
2434
+ label,
2435
+ htmlFor,
2436
+ required,
2437
+ hint,
2438
+ error,
2439
+ className,
2440
+ children
2441
+ }) {
2089
2442
  const hintId = hint ? `${htmlFor}-hint` : void 0;
2090
2443
  const errorId = error ? `${htmlFor}-error` : void 0;
2091
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
2444
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2445
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
2093
2446
  label,
2094
- required && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2095
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
2096
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
2447
+ required && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
2448
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
2449
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
2097
2450
  ] })
2098
2451
  ] }),
2099
2452
  children,
2100
- hint && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
2101
- error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
2453
+ hint && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
2454
+ error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
2102
2455
  ] });
2103
2456
  }
2104
2457
 
2105
2458
  // src/ui/icon-button/icon-button.tsx
2106
- var import_react_aria_components17 = require("react-aria-components");
2459
+ var import_react_aria_components15 = require("react-aria-components");
2107
2460
 
2108
2461
  // src/ui/tooltip/tooltip.tsx
2109
- var React6 = __toESM(require("react"), 1);
2110
- var import_react_aria_components16 = require("react-aria-components");
2111
- var import_jsx_runtime28 = require("react/jsx-runtime");
2462
+ var import_react_aria_components14 = require("react-aria-components");
2463
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2112
2464
  function TooltipTrigger({
2113
2465
  delay = 0,
2114
- children,
2115
2466
  ...props
2116
2467
  }) {
2117
- const [trigger, tooltip] = React6.Children.toArray(children);
2118
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2119
- import_react_aria_components16.TooltipTrigger,
2120
- {
2121
- "data-slot": "tooltip-trigger",
2122
- delay,
2123
- ...props,
2124
- children: [
2125
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components16.Focusable, { children: trigger }),
2126
- tooltip
2127
- ]
2128
- }
2129
- );
2468
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components14.TooltipTrigger, { "data-slot": "tooltip-trigger", delay, ...props });
2469
+ }
2470
+ function Tooltip({ label, children, delay, ...props }) {
2471
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TooltipTrigger, { delay, children: [
2472
+ children,
2473
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipContent, { ...props, children: label })
2474
+ ] });
2130
2475
  }
2131
- function Tooltip({
2476
+ function TooltipContent({
2132
2477
  className,
2133
2478
  placement = "top",
2134
2479
  offset = 4,
@@ -2136,8 +2481,8 @@ function Tooltip({
2136
2481
  children,
2137
2482
  ...props
2138
2483
  }) {
2139
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2140
- import_react_aria_components16.Tooltip,
2484
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2485
+ import_react_aria_components14.Tooltip,
2141
2486
  {
2142
2487
  "data-slot": "tooltip-content",
2143
2488
  placement,
@@ -2150,10 +2495,10 @@ function Tooltip({
2150
2495
  ...props,
2151
2496
  children: [
2152
2497
  children,
2153
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2154
- import_react_aria_components16.OverlayArrow,
2498
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2499
+ import_react_aria_components14.OverlayArrow,
2155
2500
  {
2156
- className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
2501
+ className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
2157
2502
  style: ({ placement: placement2, defaultStyle }) => ({
2158
2503
  ...defaultStyle,
2159
2504
  rotate: "0deg",
@@ -2168,7 +2513,7 @@ function Tooltip({
2168
2513
  }
2169
2514
 
2170
2515
  // src/ui/icon-button/icon-button.tsx
2171
- var import_jsx_runtime29 = require("react/jsx-runtime");
2516
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2172
2517
  function IconButton({
2173
2518
  label,
2174
2519
  children,
@@ -2177,76 +2522,67 @@ function IconButton({
2177
2522
  variant,
2178
2523
  ...props
2179
2524
  }) {
2180
- const linkClassName = cn(
2181
- buttonVariants({ variant, size: "icon" }),
2182
- className
2183
- );
2184
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TooltipTrigger, { children: [
2185
- href ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2186
- import_react_aria_components17.Link,
2187
- {
2188
- "data-slot": "icon-button",
2189
- "aria-label": label,
2190
- href,
2191
- className: linkClassName,
2192
- children
2193
- }
2194
- ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2195
- Button,
2196
- {
2197
- "data-slot": "icon-button",
2198
- "aria-label": label,
2199
- variant,
2200
- size: "icon",
2201
- className,
2202
- ...props,
2203
- children
2204
- }
2205
- ),
2206
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Tooltip, { children: label })
2207
- ] });
2525
+ const linkClassName = cn(buttonVariants({ variant, size: "icon" }), className);
2526
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Tooltip, { label, children: href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components15.Link, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2527
+ Button,
2528
+ {
2529
+ "data-slot": "icon-button",
2530
+ "aria-label": label,
2531
+ variant,
2532
+ size: "icon",
2533
+ className,
2534
+ ...props,
2535
+ children
2536
+ }
2537
+ ) });
2208
2538
  }
2209
2539
 
2210
2540
  // src/ui/input-group/input-group.tsx
2211
- var import_class_variance_authority9 = require("class-variance-authority");
2541
+ var import_class_variance_authority10 = require("class-variance-authority");
2212
2542
 
2213
2543
  // src/ui/input/input.tsx
2214
2544
  var import_react9 = require("react");
2215
- var import_react_aria_components18 = require("react-aria-components");
2216
- var import_jsx_runtime30 = require("react/jsx-runtime");
2545
+ var import_react_aria_components16 = require("react-aria-components");
2546
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2217
2547
  var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type, ...props }, ref) {
2218
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components18.Input, { ref, type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
2548
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2549
+ import_react_aria_components16.Input,
2550
+ {
2551
+ ref,
2552
+ type,
2553
+ "data-slot": "input",
2554
+ className: cn(
2555
+ "box-border h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive",
2556
+ className
2557
+ ),
2558
+ ...props
2559
+ }
2560
+ );
2219
2561
  });
2220
2562
  var Input3 = InputImpl;
2221
2563
 
2222
2564
  // src/ui/textarea/textarea.tsx
2223
2565
  var import_react10 = require("react");
2224
- var import_react_aria_components19 = require("react-aria-components");
2225
- var import_jsx_runtime31 = require("react/jsx-runtime");
2566
+ var import_react_aria_components17 = require("react-aria-components");
2567
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2226
2568
  var TextareaImpl = (0, import_react10.forwardRef)(function Textarea({ className, ...props }, ref) {
2227
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components19.TextArea, { ref, "data-slot": "textarea", className: cn("min-h-20 w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
2228
- });
2229
- var Textarea2 = TextareaImpl;
2230
-
2231
- // src/ui/input-group/input-group.tsx
2232
- var import_jsx_runtime32 = (
2233
- // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
2234
- require("react/jsx-runtime")
2235
- );
2236
- function InputGroup({ className, ...props }) {
2237
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2238
- "div",
2569
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2570
+ import_react_aria_components17.TextArea,
2239
2571
  {
2240
- role: "group",
2241
- "data-slot": "input-group",
2572
+ ref,
2573
+ "data-slot": "textarea",
2242
2574
  className: cn(
2243
- "group/input-group relative flex min-h-8 w-full min-w-0 items-center rounded-lg border border-border transition-colors outline-none has-disabled:bg-muted/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align^=block]]:h-auto has-[>[data-align^=block]]:flex-col",
2575
+ "box-border min-h-20 w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive",
2244
2576
  className
2245
2577
  ),
2246
2578
  ...props
2247
2579
  }
2248
2580
  );
2249
- }
2581
+ });
2582
+ var Textarea2 = TextareaImpl;
2583
+
2584
+ // src/ui/input-group/input-group-addon-variants.ts
2585
+ var import_class_variance_authority9 = require("class-variance-authority");
2250
2586
  var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
2251
2587
  "flex cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&_svg:not([class*='size-'])]:size-4",
2252
2588
  {
@@ -2261,6 +2597,26 @@ var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
2261
2597
  defaultVariants: { align: "inline-start" }
2262
2598
  }
2263
2599
  );
2600
+
2601
+ // src/ui/input-group/input-group.tsx
2602
+ var import_jsx_runtime30 = (
2603
+ // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
2604
+ require("react/jsx-runtime")
2605
+ );
2606
+ function InputGroup({ className, ...props }) {
2607
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2608
+ "div",
2609
+ {
2610
+ role: "group",
2611
+ "data-slot": "input-group",
2612
+ className: cn(
2613
+ "group/input-group relative flex min-h-8 w-full min-w-0 items-center rounded-lg border border-border transition-colors outline-none has-disabled:bg-muted/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align^=block]]:h-auto has-[>[data-align^=block]]:flex-col",
2614
+ className
2615
+ ),
2616
+ ...props
2617
+ }
2618
+ );
2619
+ }
2264
2620
  function InputGroupAddon({
2265
2621
  className,
2266
2622
  align = "inline-start",
@@ -2269,7 +2625,7 @@ function InputGroupAddon({
2269
2625
  }) {
2270
2626
  return (
2271
2627
  // biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
2272
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2628
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2273
2629
  "div",
2274
2630
  {
2275
2631
  role: "group",
@@ -2286,7 +2642,7 @@ function InputGroupAddon({
2286
2642
  )
2287
2643
  );
2288
2644
  }
2289
- var inputGroupButtonVariants = (0, import_class_variance_authority9.cva)("shrink-0 shadow-none", {
2645
+ var inputGroupButtonVariants = (0, import_class_variance_authority10.cva)("shrink-0 shadow-none", {
2290
2646
  variants: {
2291
2647
  size: { xs: "h-6 px-1.5 text-xs", sm: "h-7 px-2", "icon-xs": "size-6", "icon-sm": "size-7" }
2292
2648
  },
@@ -2300,7 +2656,7 @@ function InputGroupButton({
2300
2656
  ...props
2301
2657
  }) {
2302
2658
  const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
2303
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2659
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2304
2660
  Button,
2305
2661
  {
2306
2662
  "data-slot": "input-group-button",
@@ -2313,7 +2669,7 @@ function InputGroupButton({
2313
2669
  );
2314
2670
  }
2315
2671
  function InputGroupText({ className, ...props }) {
2316
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2672
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2317
2673
  "span",
2318
2674
  {
2319
2675
  "data-slot": "input-group-text",
@@ -2326,7 +2682,7 @@ function InputGroupText({ className, ...props }) {
2326
2682
  );
2327
2683
  }
2328
2684
  function InputGroupInput({ className, ...props }) {
2329
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2685
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2330
2686
  Input3,
2331
2687
  {
2332
2688
  "data-slot": "input-group-control",
@@ -2339,7 +2695,7 @@ function InputGroupInput({ className, ...props }) {
2339
2695
  );
2340
2696
  }
2341
2697
  function InputGroupTextarea({ className, ...props }) {
2342
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2698
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2343
2699
  Textarea2,
2344
2700
  {
2345
2701
  "data-slot": "input-group-control",
@@ -2352,41 +2708,185 @@ function InputGroupTextarea({ className, ...props }) {
2352
2708
  );
2353
2709
  }
2354
2710
 
2711
+ // src/ui/kanban/kanban.tsx
2712
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2713
+ var columnSize = {
2714
+ compact: "w-56",
2715
+ default: "w-72",
2716
+ wide: "w-80"
2717
+ };
2718
+ function KanbanViewport({
2719
+ children,
2720
+ className,
2721
+ contentClassName,
2722
+ ...props
2723
+ }) {
2724
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2725
+ "div",
2726
+ {
2727
+ "data-slot": "kanban-viewport",
2728
+ className: cn("-mx-1 overflow-x-auto pb-3", className),
2729
+ ...props,
2730
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2731
+ "div",
2732
+ {
2733
+ "data-slot": "kanban-viewport-content",
2734
+ className: cn("flex min-w-max items-start gap-3 px-1", contentClassName),
2735
+ children
2736
+ }
2737
+ )
2738
+ }
2739
+ );
2740
+ }
2741
+ function KanbanColumn({
2742
+ className,
2743
+ size = "default",
2744
+ ...props
2745
+ }) {
2746
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2747
+ "section",
2748
+ {
2749
+ "data-slot": "kanban-column",
2750
+ "data-size": size,
2751
+ className: cn("shrink-0 rounded-lg border border-border/70 p-2", columnSize[size], className),
2752
+ ...props
2753
+ }
2754
+ );
2755
+ }
2756
+ function KanbanColumnHeader({ className, ...props }) {
2757
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2758
+ "header",
2759
+ {
2760
+ "data-slot": "kanban-column-header",
2761
+ className: cn("mb-2 flex items-center justify-between gap-2 px-1 py-1", className),
2762
+ ...props
2763
+ }
2764
+ );
2765
+ }
2766
+ function KanbanColumnTitle({ className, ...props }) {
2767
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2768
+ "span",
2769
+ {
2770
+ "data-slot": "kanban-column-title",
2771
+ className: cn(
2772
+ "text-foreground truncate text-[11px] font-semibold tracking-wide uppercase",
2773
+ className
2774
+ ),
2775
+ ...props
2776
+ }
2777
+ );
2778
+ }
2779
+ function KanbanColumnBody({ className, ...props }) {
2780
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
2781
+ }
2782
+ function KanbanEmpty({
2783
+ className,
2784
+ compact = false,
2785
+ ...props
2786
+ }) {
2787
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2788
+ "p",
2789
+ {
2790
+ "data-slot": "kanban-empty",
2791
+ "data-compact": compact || void 0,
2792
+ className: cn(
2793
+ "border-border text-muted-foreground rounded-md border border-dashed py-6 text-center",
2794
+ compact ? "px-2 text-[11px]" : "px-3 text-xs",
2795
+ className
2796
+ ),
2797
+ ...props
2798
+ }
2799
+ );
2800
+ }
2801
+
2355
2802
  // src/ui/kbd/kbd.tsx
2356
- var import_jsx_runtime33 = require("react/jsx-runtime");
2803
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2357
2804
  function Kbd({ className, ...props }) {
2358
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", className), ...props });
2805
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2806
+ "kbd",
2807
+ {
2808
+ "data-slot": "kbd",
2809
+ className: cn(
2810
+ "pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none",
2811
+ className
2812
+ ),
2813
+ ...props
2814
+ }
2815
+ );
2359
2816
  }
2360
2817
  function KbdGroup({ className, ...props }) {
2361
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
2818
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2819
+ "span",
2820
+ {
2821
+ "data-slot": "kbd-group",
2822
+ className: cn("inline-flex items-center gap-1", className),
2823
+ ...props
2824
+ }
2825
+ );
2362
2826
  }
2363
2827
 
2364
2828
  // src/ui/loading-overlay/loading-overlay.tsx
2365
- var import_lucide_react9 = require("lucide-react");
2366
- var import_jsx_runtime34 = require("react/jsx-runtime");
2367
- function LoadingOverlay({ label = "Cargando", className, ...props }) {
2368
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { role: "status", "aria-live": "polite", className: cn("absolute inset-0 z-10 flex items-center justify-center bg-background/70 backdrop-blur-[2px]", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
2369
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react9.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
2370
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label })
2371
- ] }) });
2829
+ var import_lucide_react8 = require("lucide-react");
2830
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2831
+ function LoadingOverlay({
2832
+ label = "Cargando",
2833
+ className,
2834
+ ...props
2835
+ }) {
2836
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2837
+ "output",
2838
+ {
2839
+ "aria-live": "polite",
2840
+ className: cn(
2841
+ "absolute inset-0 z-10 flex items-center justify-center bg-background/70 backdrop-blur-[2px]",
2842
+ className
2843
+ ),
2844
+ ...props,
2845
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
2846
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react8.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
2847
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: label })
2848
+ ] })
2849
+ }
2850
+ );
2372
2851
  }
2373
2852
 
2374
2853
  // src/ui/menu/menu.tsx
2375
- var import_react_aria_components20 = require("react-aria-components");
2376
- var import_jsx_runtime35 = require("react/jsx-runtime");
2377
- var MenuTrigger = import_react_aria_components20.MenuTrigger;
2854
+ var import_react_aria_components18 = require("react-aria-components");
2855
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2856
+ var MenuTrigger = import_react_aria_components18.MenuTrigger;
2378
2857
  function MenuContent({ className, ...props }) {
2379
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.Popover, { "data-slot": "menu-content", className: cn("min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
2858
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2859
+ import_react_aria_components18.Popover,
2860
+ {
2861
+ "data-slot": "menu-content",
2862
+ className: cn(
2863
+ "min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
2864
+ className
2865
+ ),
2866
+ ...props
2867
+ }
2868
+ );
2380
2869
  }
2381
2870
  function Menu({ className, ...props }) {
2382
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
2871
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components18.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
2383
2872
  }
2384
2873
  function MenuItem({ className, children, ...props }) {
2385
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.MenuItem, { "data-slot": "menu-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
2874
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2875
+ import_react_aria_components18.MenuItem,
2876
+ {
2877
+ "data-slot": "menu-item",
2878
+ className: cn(
2879
+ "flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
2880
+ className
2881
+ ),
2882
+ ...props,
2883
+ children
2884
+ }
2885
+ );
2386
2886
  }
2387
2887
 
2388
2888
  // src/ui/metric-card/metric-card.tsx
2389
- var import_jsx_runtime36 = require("react/jsx-runtime");
2889
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2390
2890
  function MetricCard({
2391
2891
  className,
2392
2892
  label,
@@ -2396,20 +2896,27 @@ function MetricCard({
2396
2896
  tone = "default",
2397
2897
  ...props
2398
2898
  }) {
2399
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
2400
- icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "data-slot": "metric-card-icon", className: "shrink-0 text-muted-foreground", children: icon }) : null,
2401
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "min-w-0", children: [
2402
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "metric-card-label", className: "text-sm text-muted-foreground", children: label }),
2403
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { "data-slot": "metric-card-value", className: "mt-1 block text-2xl font-semibold tracking-tight", children: value }),
2404
- description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "metric-card-description", className: "mt-1 text-xs text-muted-foreground", children: description }) : null
2899
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
2900
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
2901
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0", children: [
2902
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
2903
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2904
+ "strong",
2905
+ {
2906
+ "data-slot": "metric-card-value",
2907
+ className: "mt-1 block text-2xl font-semibold tracking-tight",
2908
+ children: value
2909
+ }
2910
+ ),
2911
+ description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
2405
2912
  ] })
2406
2913
  ] }) });
2407
2914
  }
2408
2915
 
2409
2916
  // src/ui/otp-input/otp-input.tsx
2410
2917
  var import_react11 = require("react");
2411
- var import_react_aria_components21 = require("react-aria-components");
2412
- var import_jsx_runtime37 = require("react/jsx-runtime");
2918
+ var import_react_aria_components19 = require("react-aria-components");
2919
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2413
2920
  function normalizeOtp(value, length) {
2414
2921
  return value.replace(/[^0-9]/g, "").slice(0, length);
2415
2922
  }
@@ -2461,7 +2968,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2461
2968
  input.setSelectionRange(position, position);
2462
2969
  setSelectionStart(position);
2463
2970
  }
2464
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2971
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2465
2972
  "div",
2466
2973
  {
2467
2974
  "data-slot": "otp-input",
@@ -2471,8 +2978,8 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2471
2978
  style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
2472
2979
  onPointerDown: handlePointerDown,
2473
2980
  children: [
2474
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2475
- import_react_aria_components21.Input,
2981
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2982
+ import_react_aria_components19.Input,
2476
2983
  {
2477
2984
  ...props,
2478
2985
  ref: inputRef,
@@ -2511,7 +3018,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2511
3018
  }
2512
3019
  }
2513
3020
  ),
2514
- slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3021
+ slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2515
3022
  "span",
2516
3023
  {
2517
3024
  "aria-hidden": "true",
@@ -2534,27 +3041,59 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2534
3041
  var OtpInput2 = OtpInputImpl;
2535
3042
 
2536
3043
  // src/ui/page-header/page-header.tsx
2537
- var import_jsx_runtime38 = require("react/jsx-runtime");
3044
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2538
3045
  function PageHeader({ className, ...props }) {
2539
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("header", { "data-slot": "page-header", className: cn("flex flex-col gap-4 py-2 sm:flex-row sm:items-center sm:justify-between", className), ...props });
3046
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3047
+ "header",
3048
+ {
3049
+ "data-slot": "page-header",
3050
+ className: cn(
3051
+ "flex flex-col gap-4 py-2 sm:flex-row sm:items-center sm:justify-between",
3052
+ className
3053
+ ),
3054
+ ...props
3055
+ }
3056
+ );
2540
3057
  }
2541
3058
  function PageHeaderHeading({ className, ...props }) {
2542
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
3059
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
2543
3060
  }
2544
- function PageHeaderTitle({ className, ...props }) {
2545
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
3061
+ function PageHeaderTitle({ className, children, ...props }) {
3062
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3063
+ "h1",
3064
+ {
3065
+ "data-slot": "page-header-title",
3066
+ className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className),
3067
+ ...props,
3068
+ children
3069
+ }
3070
+ );
2546
3071
  }
2547
3072
  function PageHeaderDescription({ className, ...props }) {
2548
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
3073
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3074
+ "p",
3075
+ {
3076
+ "data-slot": "page-header-description",
3077
+ className: cn("mt-1 text-sm text-muted-foreground", className),
3078
+ ...props
3079
+ }
3080
+ );
2549
3081
  }
2550
3082
  function PageHeaderActions({ className, ...props }) {
2551
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
3083
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3084
+ "div",
3085
+ {
3086
+ "data-slot": "page-header-actions",
3087
+ className: cn("flex shrink-0 items-center gap-2", className),
3088
+ ...props
3089
+ }
3090
+ );
2552
3091
  }
2553
3092
 
2554
3093
  // src/ui/pagination/pagination.tsx
2555
- var import_lucide_react10 = require("lucide-react");
2556
- var React7 = __toESM(require("react"), 1);
2557
- var import_jsx_runtime39 = require("react/jsx-runtime");
3094
+ var import_lucide_react9 = require("lucide-react");
3095
+ var React6 = __toESM(require("react"), 1);
3096
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2558
3097
  function visiblePages(page, pageCount, siblingCount) {
2559
3098
  return [
2560
3099
  .../* @__PURE__ */ new Set([
@@ -2575,15 +3114,15 @@ function Pagination({
2575
3114
  }) {
2576
3115
  if (pageCount <= 1) return null;
2577
3116
  const pages = visiblePages(page, pageCount, siblingCount);
2578
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3117
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2579
3118
  "nav",
2580
3119
  {
2581
3120
  "aria-label": ariaLabel,
2582
3121
  className: cn("flex flex-wrap items-center justify-between gap-4", className),
2583
3122
  children: [
2584
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-sm text-muted-foreground", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
2585
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-1", children: [
2586
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3123
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
3124
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-1", children: [
3125
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2587
3126
  Button,
2588
3127
  {
2589
3128
  "aria-label": "P\xE1gina anterior",
@@ -2591,14 +3130,14 @@ function Pagination({
2591
3130
  onPress: () => onPageChange(page - 1),
2592
3131
  size: "icon",
2593
3132
  variant: "ghost",
2594
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react10.ChevronLeft, {})
3133
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react9.ChevronLeft, {})
2595
3134
  }
2596
3135
  ),
2597
3136
  pages.map((item, index) => {
2598
3137
  const previousPage = pages[index - 1];
2599
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(React7.Fragment, { children: [
2600
- previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": "true", className: "px-1 text-muted-foreground", children: "\u2026" }) : null,
2601
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3138
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(React6.Fragment, { children: [
3139
+ previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
3140
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2602
3141
  Button,
2603
3142
  {
2604
3143
  "aria-current": item === page ? "page" : void 0,
@@ -2611,7 +3150,7 @@ function Pagination({
2611
3150
  )
2612
3151
  ] }, item);
2613
3152
  }),
2614
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3153
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2615
3154
  Button,
2616
3155
  {
2617
3156
  "aria-label": "P\xE1gina siguiente",
@@ -2619,7 +3158,7 @@ function Pagination({
2619
3158
  onPress: () => onPageChange(page + 1),
2620
3159
  size: "icon",
2621
3160
  variant: "ghost",
2622
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react10.ChevronRight, {})
3161
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react9.ChevronRight, {})
2623
3162
  }
2624
3163
  )
2625
3164
  ] })
@@ -2629,18 +3168,37 @@ function Pagination({
2629
3168
  }
2630
3169
 
2631
3170
  // src/ui/popover/popover.tsx
2632
- var import_react_aria_components22 = require("react-aria-components");
2633
- var import_jsx_runtime40 = require("react/jsx-runtime");
2634
- var PopoverTrigger = import_react_aria_components22.DialogTrigger;
2635
- function Popover4({ className, ...props }) {
2636
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components22.Popover, { "data-slot": "popover", offset: 6, className: cn("min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
3171
+ var import_react_aria_components20 = require("react-aria-components");
3172
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3173
+ var PopoverTrigger = import_react_aria_components20.DialogTrigger;
3174
+ function PopoverContent({ className, ...props }) {
3175
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3176
+ import_react_aria_components20.Popover,
3177
+ {
3178
+ "data-slot": "popover",
3179
+ offset: 6,
3180
+ className: cn(
3181
+ "z-50 min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
3182
+ className
3183
+ ),
3184
+ ...props
3185
+ }
3186
+ );
3187
+ }
3188
+ function Popover4(props) {
3189
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PopoverContent, { ...props });
3190
+ const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
3191
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
3192
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3193
+ triggerElement,
3194
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PopoverContent, { ...contentProps, children })
3195
+ ] });
2637
3196
  }
2638
- var PopoverContent = Popover4;
2639
3197
 
2640
3198
  // src/ui/quantity-input/quantity-input.tsx
2641
- var import_lucide_react11 = require("lucide-react");
2642
- var import_react_aria_components23 = require("react-aria-components");
2643
- var import_jsx_runtime41 = require("react/jsx-runtime");
3199
+ var import_lucide_react10 = require("lucide-react");
3200
+ var import_react_aria_components21 = require("react-aria-components");
3201
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2644
3202
  function QuantityInput({
2645
3203
  className,
2646
3204
  inputClassName,
@@ -2650,23 +3208,53 @@ function QuantityInput({
2650
3208
  step = 1,
2651
3209
  ...props
2652
3210
  }) {
2653
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2654
- import_react_aria_components23.NumberField,
3211
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3212
+ import_react_aria_components21.NumberField,
2655
3213
  {
2656
3214
  ...props,
2657
3215
  minValue,
2658
3216
  step,
2659
3217
  "data-slot": "quantity-input",
2660
- className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
2661
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2662
- import_react_aria_components23.Group,
3218
+ className: cn(
3219
+ "group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3220
+ className
3221
+ ),
3222
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3223
+ import_react_aria_components21.Group,
2663
3224
  {
2664
3225
  "data-slot": "quantity-input-group",
2665
- className: "flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border border-border bg-background text-foreground transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive",
3226
+ className: "border-border bg-background text-foreground focus-within:border-ring focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border transition-[border-color,box-shadow] focus-within:ring-3",
2666
3227
  children: [
2667
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Button, { slot: "decrement", "aria-label": decrementAriaLabel, "data-slot": "quantity-input-decrement", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-r border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.Minus, { "aria-hidden": "true", className: "size-4" }) }),
2668
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Input, { "data-slot": "quantity-input-value", className: cn("w-14 min-w-0 bg-transparent px-1 text-center text-sm tabular-nums outline-none", inputClassName) }),
2669
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Button, { slot: "increment", "aria-label": incrementAriaLabel, "data-slot": "quantity-input-increment", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-l border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.Plus, { "aria-hidden": "true", className: "size-4" }) })
3228
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3229
+ import_react_aria_components21.Button,
3230
+ {
3231
+ slot: "decrement",
3232
+ "aria-label": decrementAriaLabel,
3233
+ "data-slot": "quantity-input-decrement",
3234
+ className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-r transition-colors outline-none data-disabled:pointer-events-none",
3235
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react10.Minus, { "aria-hidden": "true", className: "size-4" })
3236
+ }
3237
+ ),
3238
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3239
+ import_react_aria_components21.Input,
3240
+ {
3241
+ "data-slot": "quantity-input-value",
3242
+ className: cn(
3243
+ "w-14 min-w-0 bg-transparent px-1 text-center text-sm tabular-nums outline-none",
3244
+ inputClassName
3245
+ )
3246
+ }
3247
+ ),
3248
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3249
+ import_react_aria_components21.Button,
3250
+ {
3251
+ slot: "increment",
3252
+ "aria-label": incrementAriaLabel,
3253
+ "data-slot": "quantity-input-increment",
3254
+ className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-l transition-colors outline-none data-disabled:pointer-events-none",
3255
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react10.Plus, { "aria-hidden": "true", className: "size-4" })
3256
+ }
3257
+ )
2670
3258
  ]
2671
3259
  }
2672
3260
  )
@@ -2675,38 +3263,94 @@ function QuantityInput({
2675
3263
  }
2676
3264
 
2677
3265
  // src/ui/select/select.tsx
2678
- var import_react_aria_components24 = require("react-aria-components");
2679
- var import_lucide_react12 = require("lucide-react");
2680
- var import_jsx_runtime42 = require("react/jsx-runtime");
2681
- var Select = import_react_aria_components24.Select;
3266
+ var import_lucide_react11 = require("lucide-react");
3267
+ var import_react_aria_components22 = require("react-aria-components");
3268
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3269
+ var Select = import_react_aria_components22.Select;
2682
3270
  function SelectTrigger({ className, children, ...props }) {
2683
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.Button, { "data-slot": "select-trigger", className: cn("group/select-trigger flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
2684
- typeof children === "function" ? children(state) : children,
2685
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.ChevronDown, { "aria-hidden": "true", className: "ml-auto size-4 text-muted-foreground transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none" })
2686
- ] }) });
3271
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3272
+ import_react_aria_components22.Button,
3273
+ {
3274
+ "data-slot": "select-trigger",
3275
+ className: cn(
3276
+ "group/select-trigger box-border flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3277
+ className
3278
+ ),
3279
+ ...props,
3280
+ children: (state) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
3281
+ typeof children === "function" ? children(state) : children,
3282
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3283
+ import_lucide_react11.ChevronDown,
3284
+ {
3285
+ "aria-hidden": "true",
3286
+ className: "text-muted-foreground ml-auto size-4 transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none"
3287
+ }
3288
+ )
3289
+ ] })
3290
+ }
3291
+ );
2687
3292
  }
2688
3293
  function SelectValue({ className, ...props }) {
2689
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.SelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
3294
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3295
+ import_react_aria_components22.SelectValue,
3296
+ {
3297
+ "data-slot": "select-value",
3298
+ className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className),
3299
+ ...props
3300
+ }
3301
+ );
2690
3302
  }
2691
3303
  function SelectContent({ className, ...props }) {
2692
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.Popover, { "data-slot": "select-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
3304
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3305
+ import_react_aria_components22.Popover,
3306
+ {
3307
+ "data-slot": "select-content",
3308
+ className: cn(
3309
+ "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
3310
+ className
3311
+ ),
3312
+ ...props
3313
+ }
3314
+ );
2693
3315
  }
2694
3316
  function SelectList({ className, ...props }) {
2695
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.ListBox, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
3317
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3318
+ import_react_aria_components22.ListBox,
3319
+ {
3320
+ "data-slot": "select-list",
3321
+ className: cn("max-h-64 overflow-y-auto", className),
3322
+ ...props
3323
+ }
3324
+ );
2696
3325
  }
2697
- function SelectItem({ className, children, ...props }) {
2698
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.ListBoxItem, { "data-slot": "select-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
3326
+ function SelectItem({
3327
+ className,
3328
+ children,
3329
+ ...props
3330
+ }) {
3331
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3332
+ import_react_aria_components22.ListBoxItem,
3333
+ {
3334
+ "data-slot": "select-item",
3335
+ className: cn(
3336
+ "flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
3337
+ className
3338
+ ),
3339
+ ...props,
3340
+ children
3341
+ }
3342
+ );
2699
3343
  }
2700
3344
 
2701
3345
  // src/ui/sheet/sheet.tsx
2702
- var import_lucide_react13 = require("lucide-react");
2703
- var import_react_aria_components25 = require("react-aria-components");
2704
- var import_jsx_runtime43 = require("react/jsx-runtime");
3346
+ var import_lucide_react12 = require("lucide-react");
3347
+ var import_react_aria_components23 = require("react-aria-components");
3348
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2705
3349
  function SheetTrigger({ ...props }) {
2706
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_aria_components25.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
3350
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components23.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
2707
3351
  }
2708
3352
  function SheetClose({ className, variant = "outline", size = "default", ...props }) {
2709
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3353
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2710
3354
  Button,
2711
3355
  {
2712
3356
  slot: "close",
@@ -2723,8 +3367,8 @@ function SheetOverlay({
2723
3367
  children,
2724
3368
  ...props
2725
3369
  }) {
2726
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2727
- import_react_aria_components25.ModalOverlay,
3370
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3371
+ import_react_aria_components23.ModalOverlay,
2728
3372
  {
2729
3373
  "data-slot": "sheet-overlay",
2730
3374
  isDismissable: true,
@@ -2744,8 +3388,8 @@ function Sheet({
2744
3388
  showCloseButton = true,
2745
3389
  ...props
2746
3390
  }) {
2747
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2748
- import_react_aria_components25.Modal,
3391
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3392
+ import_react_aria_components23.Modal,
2749
3393
  {
2750
3394
  "data-slot": "sheet-content",
2751
3395
  "data-side": side,
@@ -2753,16 +3397,16 @@ function Sheet({
2753
3397
  "fixed z-50 flex flex-col gap-4 border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-entering:opacity-0 data-exiting:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-entering:translate-y-10 data-[side=bottom]:data-exiting:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-entering:-translate-x-10 data-[side=left]:data-exiting:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-entering:translate-x-10 data-[side=right]:data-exiting:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-entering:-translate-y-10 data-[side=top]:data-exiting:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
2754
3398
  className
2755
3399
  ),
2756
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2757
- import_react_aria_components25.Dialog,
3400
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3401
+ import_react_aria_components23.Dialog,
2758
3402
  {
2759
3403
  "data-slot": "sheet",
2760
3404
  className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
2761
3405
  children: [
2762
3406
  children,
2763
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
2764
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.XIcon, {}),
2765
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "sr-only", children: "Cerrar" })
3407
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
3408
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.XIcon, {}),
3409
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "sr-only", children: "Cerrar" })
2766
3410
  ] })
2767
3411
  ]
2768
3412
  }
@@ -2777,10 +3421,25 @@ function SheetContent({
2777
3421
  showCloseButton = true,
2778
3422
  ...props
2779
3423
  }) {
2780
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
3424
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
3425
+ }
3426
+ function Drawer({
3427
+ children,
3428
+ trigger,
3429
+ triggerProps,
3430
+ defaultOpen,
3431
+ isOpen,
3432
+ onOpenChange,
3433
+ ...contentProps
3434
+ }) {
3435
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
3436
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SheetTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3437
+ triggerElement,
3438
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SheetContent, { ...contentProps, children })
3439
+ ] });
2781
3440
  }
2782
3441
  function SheetHeader({ className, ...props }) {
2783
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3442
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2784
3443
  "div",
2785
3444
  {
2786
3445
  "data-slot": "sheet-header",
@@ -2790,7 +3449,7 @@ function SheetHeader({ className, ...props }) {
2790
3449
  );
2791
3450
  }
2792
3451
  function SheetFooter({ className, ...props }) {
2793
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3452
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2794
3453
  "div",
2795
3454
  {
2796
3455
  "data-slot": "sheet-footer",
@@ -2800,8 +3459,8 @@ function SheetFooter({ className, ...props }) {
2800
3459
  );
2801
3460
  }
2802
3461
  function SheetTitle({ className, ...props }) {
2803
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2804
- import_react_aria_components25.Heading,
3462
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3463
+ import_react_aria_components23.Heading,
2805
3464
  {
2806
3465
  slot: "title",
2807
3466
  "data-slot": "sheet-title",
@@ -2814,8 +3473,8 @@ function SheetDescription({
2814
3473
  className,
2815
3474
  ...props
2816
3475
  }) {
2817
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2818
- import_react_aria_components25.Text,
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3477
+ import_react_aria_components23.Text,
2819
3478
  {
2820
3479
  slot: "description",
2821
3480
  "data-slot": "sheet-description",
@@ -2824,25 +3483,36 @@ function SheetDescription({
2824
3483
  }
2825
3484
  );
2826
3485
  }
3486
+ var DrawerTrigger = SheetTrigger;
3487
+ var DrawerContent = SheetContent;
3488
+ var DrawerClose = SheetClose;
3489
+ var DrawerHeader = SheetHeader;
3490
+ var DrawerFooter = SheetFooter;
3491
+ var DrawerTitle = SheetTitle;
3492
+ var DrawerDescription = SheetDescription;
2827
3493
 
2828
3494
  // src/ui/sidebar/sidebar.tsx
2829
- var import_lucide_react14 = require("lucide-react");
3495
+ var import_lucide_react13 = require("lucide-react");
3496
+ var import_react13 = require("react");
3497
+ var import_react_aria_components24 = require("react-aria-components");
3498
+
3499
+ // src/ui/sidebar/sidebar-context.ts
2830
3500
  var import_react12 = require("react");
2831
- var import_react_aria_components26 = require("react-aria-components");
2832
- var import_jsx_runtime44 = require("react/jsx-runtime");
2833
3501
  var SidebarContext = (0, import_react12.createContext)(null);
2834
3502
  function useSidebar() {
2835
3503
  const context = (0, import_react12.useContext)(SidebarContext);
2836
- if (!context)
2837
- throw new Error("useSidebar must be used inside SidebarProvider");
3504
+ if (!context) throw new Error("useSidebar must be used inside SidebarProvider");
2838
3505
  return context;
2839
3506
  }
3507
+
3508
+ // src/ui/sidebar/sidebar.tsx
3509
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2840
3510
  function SidebarProvider({
2841
3511
  defaultCollapsed = false,
2842
3512
  children
2843
3513
  }) {
2844
- const [collapsed, setCollapsed] = (0, import_react12.useState)(defaultCollapsed);
2845
- const value = (0, import_react12.useMemo)(
3514
+ const [collapsed, setCollapsed] = (0, import_react13.useState)(defaultCollapsed);
3515
+ const value = (0, import_react13.useMemo)(
2846
3516
  () => ({
2847
3517
  collapsed,
2848
3518
  setCollapsed,
@@ -2850,14 +3520,11 @@ function SidebarProvider({
2850
3520
  }),
2851
3521
  [collapsed]
2852
3522
  );
2853
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SidebarContext.Provider, { value, children });
3523
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarContext.Provider, { value, children });
2854
3524
  }
2855
- function Sidebar({
2856
- className,
2857
- ...props
2858
- }) {
3525
+ function Sidebar({ className, ...props }) {
2859
3526
  const { collapsed } = useSidebar();
2860
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3527
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2861
3528
  "aside",
2862
3529
  {
2863
3530
  "data-slot": "sidebar",
@@ -2870,11 +3537,8 @@ function Sidebar({
2870
3537
  }
2871
3538
  );
2872
3539
  }
2873
- function SidebarHeader({
2874
- className,
2875
- ...props
2876
- }) {
2877
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3540
+ function SidebarHeader({ className, ...props }) {
3541
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2878
3542
  "div",
2879
3543
  {
2880
3544
  "data-slot": "sidebar-header",
@@ -2889,7 +3553,7 @@ function SidebarSearch({
2889
3553
  className,
2890
3554
  ...props
2891
3555
  }) {
2892
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3556
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2893
3557
  "button",
2894
3558
  {
2895
3559
  type: "button",
@@ -2900,18 +3564,15 @@ function SidebarSearch({
2900
3564
  ),
2901
3565
  ...props,
2902
3566
  children: [
2903
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.Search, { className: "size-4 shrink-0" }),
2904
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "flex-1 text-left", children: label }),
2905
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
3567
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.Search, { className: "size-4 shrink-0" }),
3568
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-left", children: label }),
3569
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
2906
3570
  ]
2907
3571
  }
2908
3572
  );
2909
3573
  }
2910
- function SidebarContent({
2911
- className,
2912
- ...props
2913
- }) {
2914
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3574
+ function SidebarContent({ className, ...props }) {
3575
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2915
3576
  "nav",
2916
3577
  {
2917
3578
  "data-slot": "sidebar-content",
@@ -2921,18 +3582,12 @@ function SidebarContent({
2921
3582
  }
2922
3583
  );
2923
3584
  }
2924
- function SidebarFooter({
2925
- className,
2926
- ...props
2927
- }) {
2928
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3585
+ function SidebarFooter({ className, ...props }) {
3586
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2929
3587
  "div",
2930
3588
  {
2931
3589
  "data-slot": "sidebar-footer",
2932
- className: cn(
2933
- "mt-auto flex flex-col gap-2 border-t border-border p-2",
2934
- className
2935
- ),
3590
+ className: cn("mt-auto flex flex-col gap-2 border-t border-border p-2", className),
2936
3591
  ...props
2937
3592
  }
2938
3593
  );
@@ -2944,27 +3599,19 @@ function SidebarGroup({
2944
3599
  ...props
2945
3600
  }) {
2946
3601
  const { collapsed } = useSidebar();
2947
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
2948
- "section",
2949
- {
2950
- "data-slot": "sidebar-group",
2951
- className: cn("mb-4 last:mb-0", className),
2952
- ...props,
2953
- children: [
2954
- label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2955
- "h2",
2956
- {
2957
- className: cn(
2958
- "mb-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",
2959
- collapsed && "sr-only"
2960
- ),
2961
- children: label
2962
- }
3602
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
3603
+ label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3604
+ "h2",
3605
+ {
3606
+ className: cn(
3607
+ "mb-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",
3608
+ collapsed && "sr-only"
2963
3609
  ),
2964
- children
2965
- ]
2966
- }
2967
- );
3610
+ children: label
3611
+ }
3612
+ ),
3613
+ children
3614
+ ] });
2968
3615
  }
2969
3616
  function SidebarItem({
2970
3617
  icon,
@@ -2977,8 +3624,8 @@ function SidebarItem({
2977
3624
  }) {
2978
3625
  const { collapsed } = useSidebar();
2979
3626
  const content = typeof children === "function" ? label : children ?? label;
2980
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2981
- import_react_aria_components26.Link,
3627
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3628
+ import_react_aria_components24.Link,
2982
3629
  {
2983
3630
  "data-slot": "sidebar-item",
2984
3631
  "aria-current": active ? "page" : void 0,
@@ -2989,25 +3636,16 @@ function SidebarItem({
2989
3636
  typeof className === "function" ? className : className
2990
3637
  ),
2991
3638
  ...props,
2992
- children: (values) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
2993
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
2994
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2995
- "span",
2996
- {
2997
- className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
2998
- children: typeof children === "function" ? children(values) : content
2999
- }
3000
- ),
3001
- badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xs text-muted-foreground", children: badge })
3639
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
3640
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
3641
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
3642
+ badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-muted-foreground text-xs", children: badge })
3002
3643
  ] })
3003
3644
  }
3004
3645
  );
3005
3646
  }
3006
- function SidebarSeparator({
3007
- className,
3008
- ...props
3009
- }) {
3010
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3647
+ function SidebarSeparator({ className, ...props }) {
3648
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3011
3649
  "hr",
3012
3650
  {
3013
3651
  "data-slot": "sidebar-separator",
@@ -3018,7 +3656,7 @@ function SidebarSeparator({
3018
3656
  }
3019
3657
  function SidebarTrigger({ className, ...props }) {
3020
3658
  const { collapsed, toggle } = useSidebar();
3021
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3659
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3022
3660
  Button,
3023
3661
  {
3024
3662
  "aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
@@ -3027,16 +3665,13 @@ function SidebarTrigger({ className, ...props }) {
3027
3665
  variant: "ghost",
3028
3666
  className: cn("ml-auto", className),
3029
3667
  ...props,
3030
- children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.ChevronLeft, {})
3668
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.ChevronLeft, {})
3031
3669
  }
3032
3670
  );
3033
3671
  }
3034
- function SidebarRail({
3035
- className,
3036
- ...props
3037
- }) {
3672
+ function SidebarRail({ className, ...props }) {
3038
3673
  const { toggle } = useSidebar();
3039
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3674
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3040
3675
  "button",
3041
3676
  {
3042
3677
  type: "button",
@@ -3051,7 +3686,7 @@ function SidebarRail({
3051
3686
  );
3052
3687
  }
3053
3688
  function SidebarMore({ className, ...props }) {
3054
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3689
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3055
3690
  Button,
3056
3691
  {
3057
3692
  "aria-label": "M\xE1s opciones",
@@ -3059,34 +3694,85 @@ function SidebarMore({ className, ...props }) {
3059
3694
  variant: "ghost",
3060
3695
  className: cn("size-7", className),
3061
3696
  ...props,
3062
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.Ellipsis, {})
3697
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.Ellipsis, {})
3063
3698
  }
3064
3699
  );
3065
3700
  }
3066
3701
 
3067
3702
  // src/ui/skeleton/skeleton.tsx
3068
- var import_jsx_runtime45 = require("react/jsx-runtime");
3703
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3069
3704
  function Skeleton({ className, ...props }) {
3070
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
3705
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3706
+ "div",
3707
+ {
3708
+ "aria-hidden": "true",
3709
+ "data-slot": "skeleton",
3710
+ className: cn("animate-pulse rounded-md bg-muted", className),
3711
+ ...props
3712
+ }
3713
+ );
3071
3714
  }
3072
3715
 
3073
3716
  // src/ui/submit-button/submit-button.tsx
3717
+ var import_lucide_react14 = require("lucide-react");
3718
+ var import_react14 = require("react");
3074
3719
  var import_react_dom = require("react-dom");
3075
- var import_lucide_react15 = require("lucide-react");
3076
- var import_jsx_runtime46 = require("react/jsx-runtime");
3077
- function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
3720
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3721
+ function assignRef(ref, node) {
3722
+ if (typeof ref === "function") {
3723
+ ref(node);
3724
+ } else if (ref) {
3725
+ ref.current = node;
3726
+ }
3727
+ }
3728
+ function SubmitButton({
3729
+ loadingLabel,
3730
+ pendingLabel,
3731
+ loading = false,
3732
+ children,
3733
+ isDisabled,
3734
+ ref: forwardedRef,
3735
+ size = "sm",
3736
+ ...props
3737
+ }) {
3078
3738
  const { pending } = (0, import_react_dom.useFormStatus)();
3079
3739
  const busy = pending || loading;
3080
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
3081
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react15.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
3082
- pendingLabel
3083
- ] }) : children });
3740
+ const label = loadingLabel ?? pendingLabel ?? "Guardando\u2026";
3741
+ const buttonRef = (0, import_react14.useRef)(null);
3742
+ const setButtonRef = (0, import_react14.useCallback)(
3743
+ (node) => {
3744
+ buttonRef.current = node;
3745
+ assignRef(forwardedRef, node);
3746
+ },
3747
+ [forwardedRef]
3748
+ );
3749
+ (0, import_react14.useLayoutEffect)(() => {
3750
+ const button = buttonRef.current;
3751
+ if (!button) return;
3752
+ if (busy) button.setAttribute("aria-busy", "true");
3753
+ else button.removeAttribute("aria-busy");
3754
+ }, [busy]);
3755
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3756
+ Button,
3757
+ {
3758
+ ref: setButtonRef,
3759
+ type: "submit",
3760
+ size,
3761
+ isDisabled: busy || isDisabled,
3762
+ "aria-busy": busy || void 0,
3763
+ ...props,
3764
+ children: busy ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
3765
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react14.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
3766
+ label
3767
+ ] }) : children
3768
+ }
3769
+ );
3084
3770
  }
3085
3771
 
3086
3772
  // src/ui/switch/switch.tsx
3087
- var import_react13 = require("react");
3088
- var import_react_aria_components27 = require("react-aria-components");
3089
- var import_jsx_runtime47 = require("react/jsx-runtime");
3773
+ var import_react15 = require("react");
3774
+ var import_react_aria_components25 = require("react-aria-components");
3775
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3090
3776
  var switchSizes = {
3091
3777
  sm: {
3092
3778
  control: "h-4 w-[1.875rem] p-0.5",
@@ -3126,13 +3812,14 @@ function Switch({
3126
3812
  ...props
3127
3813
  }) {
3128
3814
  const styles = switchSizes[size];
3129
- const fallbackInputRef = (0, import_react13.useRef)(null);
3815
+ const fallbackInputRef = (0, import_react15.useRef)(null);
3130
3816
  const resolvedInputRef = inputRef ?? fallbackInputRef;
3131
- (0, import_react13.useEffect)(() => {
3817
+ (0, import_react15.useEffect)(() => {
3132
3818
  const input = resolvedInputRef.current;
3133
3819
  if (!input) return;
3134
3820
  const handleDirectionalKey = (event) => {
3135
- if (event.target !== input || event.defaultPrevented || isDisabled || isReadOnly || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
3821
+ if (event.target !== input || event.defaultPrevented || isDisabled || isReadOnly || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
3822
+ return;
3136
3823
  const nextSelected = event.key === "ArrowRight" ? true : event.key === "ArrowLeft" ? false : null;
3137
3824
  if (nextSelected === null) return;
3138
3825
  event.preventDefault();
@@ -3142,8 +3829,8 @@ function Switch({
3142
3829
  ownerDocument.addEventListener("keydown", handleDirectionalKey);
3143
3830
  return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
3144
3831
  }, [isDisabled, isReadOnly, resolvedInputRef]);
3145
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3146
- import_react_aria_components27.Switch,
3832
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3833
+ import_react_aria_components25.Switch,
3147
3834
  {
3148
3835
  "data-slot": "switch",
3149
3836
  "data-size": size,
@@ -3157,10 +3844,10 @@ function Switch({
3157
3844
  ),
3158
3845
  ...props,
3159
3846
  children: (state) => {
3160
- const isThumbActive = state.isHovered || state.isPressed;
3161
- const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
3162
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3163
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3847
+ const isThumbPressed = state.isPressed;
3848
+ const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
3849
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
3850
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3164
3851
  "span",
3165
3852
  {
3166
3853
  "aria-hidden": "true",
@@ -3174,13 +3861,13 @@ function Switch({
3174
3861
  "group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
3175
3862
  styles.control
3176
3863
  ),
3177
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3864
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3178
3865
  "span",
3179
3866
  {
3180
3867
  "data-slot": "switch-thumb",
3181
3868
  style: {
3182
3869
  transform: `translate3d(${thumbOffset}, 0, 0)`,
3183
- width: isThumbActive ? styles.activeWidth : styles.idleWidth
3870
+ width: isThumbPressed ? styles.activeWidth : styles.idleWidth
3184
3871
  },
3185
3872
  className: cn(
3186
3873
  "grid shrink-0 place-items-center rounded-full border border-border/60 bg-background text-[0.625rem] text-muted-foreground shadow-sm",
@@ -3194,9 +3881,16 @@ function Switch({
3194
3881
  )
3195
3882
  }
3196
3883
  ),
3197
- children || description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
3198
- children ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
3199
- description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
3884
+ children || description ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
3885
+ children ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
3886
+ description ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3887
+ "span",
3888
+ {
3889
+ "data-slot": "switch-description",
3890
+ className: "text-muted-foreground text-xs font-normal",
3891
+ children: description
3892
+ }
3893
+ ) : null
3200
3894
  ] }) : null
3201
3895
  ] });
3202
3896
  }
@@ -3205,9 +3899,9 @@ function Switch({
3205
3899
  }
3206
3900
 
3207
3901
  // src/ui/table/table.tsx
3208
- var import_jsx_runtime48 = require("react/jsx-runtime");
3902
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3209
3903
  function Table({ className, ...props }) {
3210
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3904
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3211
3905
  "table",
3212
3906
  {
3213
3907
  "data-slot": "table",
@@ -3217,10 +3911,10 @@ function Table({ className, ...props }) {
3217
3911
  ) });
3218
3912
  }
3219
3913
  function TableHeader({ className, ...props }) {
3220
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
3914
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
3221
3915
  }
3222
3916
  function TableBody({ className, ...props }) {
3223
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3917
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3224
3918
  "tbody",
3225
3919
  {
3226
3920
  "data-slot": "table-body",
@@ -3230,7 +3924,7 @@ function TableBody({ className, ...props }) {
3230
3924
  );
3231
3925
  }
3232
3926
  function TableRow({ className, ...props }) {
3233
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3927
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3234
3928
  "tr",
3235
3929
  {
3236
3930
  "data-slot": "table-row",
@@ -3243,7 +3937,7 @@ function TableRow({ className, ...props }) {
3243
3937
  );
3244
3938
  }
3245
3939
  function TableHead({ className, ...props }) {
3246
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3940
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3247
3941
  "th",
3248
3942
  {
3249
3943
  "data-slot": "table-head",
@@ -3256,7 +3950,7 @@ function TableHead({ className, ...props }) {
3256
3950
  );
3257
3951
  }
3258
3952
  function TableCell({ className, ...props }) {
3259
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3953
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3260
3954
  "td",
3261
3955
  {
3262
3956
  "data-slot": "table-cell",
@@ -3266,7 +3960,7 @@ function TableCell({ className, ...props }) {
3266
3960
  );
3267
3961
  }
3268
3962
  function TableCaption({ className, ...props }) {
3269
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3963
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3270
3964
  "caption",
3271
3965
  {
3272
3966
  "data-slot": "table-caption",
@@ -3276,39 +3970,87 @@ function TableCaption({ className, ...props }) {
3276
3970
  );
3277
3971
  }
3278
3972
  function TableFooter({ className, ...props }) {
3279
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3973
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3280
3974
  "tfoot",
3281
3975
  {
3282
3976
  "data-slot": "table-footer",
3283
- className: cn("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
3977
+ className: cn(
3978
+ "border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
3979
+ className
3980
+ ),
3284
3981
  ...props
3285
3982
  }
3286
3983
  );
3287
3984
  }
3288
3985
 
3289
3986
  // src/ui/tabs/tabs.tsx
3290
- var import_react_aria_components28 = require("react-aria-components");
3291
- var import_jsx_runtime49 = require("react/jsx-runtime");
3987
+ var import_react_aria_components26 = require("react-aria-components");
3988
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3292
3989
  function Tabs({ className, ...props }) {
3293
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.Tabs, { "data-slot": "tabs", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("flex flex-col gap-2", value)), ...props });
3990
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3991
+ import_react_aria_components26.Tabs,
3992
+ {
3993
+ "data-slot": "tabs",
3994
+ className: (0, import_react_aria_components26.composeRenderProps)(className, (value) => cn("flex flex-col gap-2", value)),
3995
+ ...props
3996
+ }
3997
+ );
3294
3998
  }
3295
3999
  function TabsList({ className, ...props }) {
3296
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabList, { "data-slot": "tabs-list", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
4000
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4001
+ import_react_aria_components26.TabList,
4002
+ {
4003
+ "data-slot": "tabs-list",
4004
+ className: (0, import_react_aria_components26.composeRenderProps)(
4005
+ className,
4006
+ (value) => cn(
4007
+ "inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground",
4008
+ value
4009
+ )
4010
+ ),
4011
+ ...props
4012
+ }
4013
+ );
3297
4014
  }
3298
4015
  function TabsTrigger({ className, ...props }) {
3299
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.Tab, { "data-slot": "tabs-trigger", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", value)), ...props });
4016
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4017
+ import_react_aria_components26.Tab,
4018
+ {
4019
+ "data-slot": "tabs-trigger",
4020
+ className: (0, import_react_aria_components26.composeRenderProps)(
4021
+ className,
4022
+ (value) => cn(
4023
+ "inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50",
4024
+ value
4025
+ )
4026
+ ),
4027
+ ...props
4028
+ }
4029
+ );
3300
4030
  }
3301
4031
  function TabsPanels({ className, ...props }) {
3302
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
4032
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_aria_components26.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
3303
4033
  }
3304
4034
  function TabsContent({ className, ...props }) {
3305
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabPanel, { "data-slot": "tabs-content", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
4035
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4036
+ import_react_aria_components26.TabPanel,
4037
+ {
4038
+ "data-slot": "tabs-content",
4039
+ className: (0, import_react_aria_components26.composeRenderProps)(
4040
+ className,
4041
+ (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)
4042
+ ),
4043
+ ...props
4044
+ }
4045
+ );
3306
4046
  }
3307
4047
 
3308
4048
  // src/ui/toast/toast.tsx
3309
- var import_react14 = require("react");
4049
+ var import_react16 = require("react");
4050
+ var import_sileo2 = require("sileo");
4051
+
4052
+ // src/ui/toast/toast-store.ts
3310
4053
  var import_sileo = require("sileo");
3311
- var import_jsx_runtime50 = require("react/jsx-runtime");
3312
4054
  function toSileoOptions({ title, description, duration, position, action }) {
3313
4055
  return {
3314
4056
  title,
@@ -3337,8 +4079,14 @@ var toast = Object.assign((options) => create(options), {
3337
4079
  const shared = { description: options.description, position: options.position };
3338
4080
  return import_sileo.sileo.promise(promise, {
3339
4081
  loading: { ...shared, title: options.loading },
3340
- success: (value) => ({ ...shared, title: typeof options.success === "function" ? options.success(value) : options.success }),
3341
- error: (error) => ({ ...shared, title: typeof options.error === "function" ? options.error(error) : options.error }),
4082
+ success: (value) => ({
4083
+ ...shared,
4084
+ title: typeof options.success === "function" ? options.success(value) : options.success
4085
+ }),
4086
+ error: (error) => ({
4087
+ ...shared,
4088
+ title: typeof options.error === "function" ? options.error(error) : options.error
4089
+ }),
3342
4090
  position: options.position
3343
4091
  });
3344
4092
  }
@@ -3346,26 +4094,43 @@ var toast = Object.assign((options) => create(options), {
3346
4094
  function useToast() {
3347
4095
  return toast;
3348
4096
  }
4097
+
4098
+ // src/ui/toast/toast.tsx
4099
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3349
4100
  function ToastProvider({ children }) {
3350
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
4101
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3351
4102
  children,
3352
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Toaster, {})
4103
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Toaster, {})
3353
4104
  ] });
3354
4105
  }
3355
4106
  function Toaster({ position }) {
3356
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_sileo.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
4107
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_sileo2.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
3357
4108
  }
3358
- function ToastViewport({ position, visiblePosition, className }) {
4109
+ function ToastViewport({
4110
+ position,
4111
+ visiblePosition,
4112
+ className
4113
+ }) {
3359
4114
  void className;
3360
4115
  if (visiblePosition && visiblePosition !== position) return null;
3361
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Toaster, { position });
4116
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Toaster, { position });
3362
4117
  }
3363
- function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
3364
- (0, import_react14.useEffect)(() => {
4118
+ function Toast({
4119
+ id,
4120
+ title,
4121
+ description,
4122
+ variant = "default",
4123
+ action,
4124
+ state,
4125
+ duration = 0,
4126
+ position,
4127
+ onDismiss
4128
+ }) {
4129
+ (0, import_react16.useEffect)(() => {
3365
4130
  if (state !== "open") return;
3366
- const toastId = create({ title, description, variant, action, duration, position });
4131
+ const toastId = toast({ title, description, variant, action, duration, position });
3367
4132
  return () => {
3368
- import_sileo.sileo.dismiss(toastId);
4133
+ import_sileo2.sileo.dismiss(toastId);
3369
4134
  onDismiss?.();
3370
4135
  };
3371
4136
  }, [action, description, duration, id, onDismiss, position, state, title, variant]);
@@ -3373,15 +4138,30 @@ function Toast({ id, title, description, variant = "default", action, state = "o
3373
4138
  }
3374
4139
 
3375
4140
  // src/ui/toolbar/toolbar.tsx
3376
- var import_jsx_runtime51 = require("react/jsx-runtime");
4141
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3377
4142
  function Toolbar({ className, ...props }) {
3378
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
4143
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4144
+ "div",
4145
+ {
4146
+ role: "toolbar",
4147
+ "data-slot": "toolbar",
4148
+ className: cn("flex flex-wrap items-center gap-2", className),
4149
+ ...props
4150
+ }
4151
+ );
3379
4152
  }
3380
4153
  function ToolbarGroup({ className, ...props }) {
3381
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
4154
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4155
+ "div",
4156
+ {
4157
+ "data-slot": "toolbar-group",
4158
+ className: cn("flex items-center gap-2", className),
4159
+ ...props
4160
+ }
4161
+ );
3382
4162
  }
3383
4163
  function ToolbarSpacer({ className, ...props }) {
3384
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4164
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
3385
4165
  }
3386
4166
  // Annotate the CommonJS export names for ESM import in node:
3387
4167
  0 && (module.exports = {
@@ -3460,15 +4240,20 @@ function ToolbarSpacer({ className, ...props }) {
3460
4240
  DialogHeader,
3461
4241
  DialogOverlay,
3462
4242
  DialogPortal,
4243
+ DialogRoot,
3463
4244
  DialogTitle,
3464
4245
  DialogTrigger,
3465
4246
  DocPreview,
3466
4247
  Drawer,
4248
+ DrawerClose,
4249
+ DrawerContent,
3467
4250
  DrawerDescription,
3468
4251
  DrawerFooter,
3469
4252
  DrawerHeader,
3470
4253
  DrawerTitle,
4254
+ DrawerTrigger,
3471
4255
  DropdownMenu,
4256
+ DropdownMenuContent,
3472
4257
  DropdownMenuGroup,
3473
4258
  DropdownMenuItem,
3474
4259
  DropdownMenuLabel,
@@ -3505,6 +4290,12 @@ function ToolbarSpacer({ className, ...props }) {
3505
4290
  InputGroupInput,
3506
4291
  InputGroupText,
3507
4292
  InputGroupTextarea,
4293
+ KanbanColumn,
4294
+ KanbanColumnBody,
4295
+ KanbanColumnHeader,
4296
+ KanbanColumnTitle,
4297
+ KanbanEmpty,
4298
+ KanbanViewport,
3508
4299
  Kbd,
3509
4300
  KbdGroup,
3510
4301
  Label,
@@ -3515,7 +4306,6 @@ function ToolbarSpacer({ className, ...props }) {
3515
4306
  MenuItem,
3516
4307
  MenuTrigger,
3517
4308
  MetricCard,
3518
- ModalDialog,
3519
4309
  OtpInput,
3520
4310
  PageHeader,
3521
4311
  PageHeaderActions,
@@ -3544,6 +4334,7 @@ function ToolbarSpacer({ className, ...props }) {
3544
4334
  SheetTrigger,
3545
4335
  Sidebar,
3546
4336
  SidebarContent,
4337
+ SidebarContext,
3547
4338
  SidebarFooter,
3548
4339
  SidebarGroup,
3549
4340
  SidebarHeader,
@@ -3579,6 +4370,7 @@ function ToolbarSpacer({ className, ...props }) {
3579
4370
  ToolbarGroup,
3580
4371
  ToolbarSpacer,
3581
4372
  Tooltip,
4373
+ TooltipContent,
3582
4374
  TooltipTrigger,
3583
4375
  actionRipple,
3584
4376
  alertVariants,