@doscientos/ui 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -32,12 +32,12 @@ function useAutosave({
32
32
  }, []);
33
33
  useEffect(() => {
34
34
  if (!enabled) return;
35
- const snapshot2 = serializeRef.current(data);
35
+ const snapshot = serializeRef.current(data);
36
36
  if (lastSaved.current === null) {
37
- lastSaved.current = snapshot2;
37
+ lastSaved.current = snapshot;
38
38
  return;
39
39
  }
40
- if (snapshot2 === lastSaved.current) return;
40
+ if (snapshot === lastSaved.current) return;
41
41
  const timeout = window.setTimeout(() => void save(data), debounceMs);
42
42
  return () => window.clearTimeout(timeout);
43
43
  }, [data, debounceMs, enabled, save]);
@@ -142,44 +142,150 @@ function getTextMatchParts(text, query) {
142
142
  }
143
143
 
144
144
  // src/ui/accordion/accordion.tsx
145
- import { Disclosure as AriaDisclosure, DisclosureGroup as AriaDisclosureGroup, DisclosurePanel as AriaDisclosurePanel, Button } from "react-aria-components";
146
- import { ChevronDown } from "lucide-react";
147
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
145
+ import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
146
+ import {
147
+ DisclosurePanel as AccordionContentPrimitive,
148
+ Heading as AccordionHeaderPrimitive,
149
+ Disclosure as AccordionItemPrimitive,
150
+ DisclosureGroup as AccordionPrimitive,
151
+ Button as AccordionTriggerPrimitive
152
+ } from "react-aria-components";
153
+ import { jsx, jsxs } from "react/jsx-runtime";
148
154
  function Accordion({ className, ...props }) {
149
- return /* @__PURE__ */ jsx(AriaDisclosureGroup, { "data-slot": "accordion", className: cn("flex w-full flex-col", className), ...props });
155
+ return /* @__PURE__ */ jsx(
156
+ AccordionPrimitive,
157
+ {
158
+ "data-slot": "accordion",
159
+ className: cn("flex w-full flex-col", className),
160
+ ...props
161
+ }
162
+ );
150
163
  }
151
164
  function AccordionItem({ className, ...props }) {
152
- return /* @__PURE__ */ jsx(AriaDisclosure, { "data-slot": "accordion-item", className: cn("border-b border-border last:border-0", className), ...props });
165
+ return /* @__PURE__ */ jsx(
166
+ AccordionItemPrimitive,
167
+ {
168
+ "data-slot": "accordion-item",
169
+ className: cn("border-border not-last:border-b", className),
170
+ ...props
171
+ }
172
+ );
153
173
  }
154
- function AccordionTrigger({ className, children, ...props }) {
155
- return /* @__PURE__ */ jsx(Button, { "data-slot": "accordion-trigger", className: cn("group/accordion-trigger flex w-full items-center justify-between py-3 text-left text-sm font-medium outline-none transition-colors hover:text-primary focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props, children: (values) => /* @__PURE__ */ jsxs(Fragment, { children: [
156
- /* @__PURE__ */ jsx("span", { children: typeof children === "function" ? children(values) : children }),
157
- /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "size-4 transition-transform group-data-expanded/accordion-trigger:rotate-180 motion-reduce:transition-none" })
158
- ] }) });
174
+ function AccordionTrigger({
175
+ className,
176
+ children,
177
+ ...props
178
+ }) {
179
+ return /* @__PURE__ */ jsx(AccordionHeaderPrimitive, { className: "flex", children: /* @__PURE__ */ jsxs(
180
+ AccordionTriggerPrimitive,
181
+ {
182
+ slot: "trigger",
183
+ "data-slot": "accordion-trigger",
184
+ className: cn(
185
+ "group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
186
+ className
187
+ ),
188
+ ...props,
189
+ children: [
190
+ children,
191
+ /* @__PURE__ */ jsx(
192
+ ChevronDownIcon,
193
+ {
194
+ "data-slot": "accordion-trigger-icon",
195
+ className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
196
+ }
197
+ ),
198
+ /* @__PURE__ */ jsx(
199
+ ChevronUpIcon,
200
+ {
201
+ "data-slot": "accordion-trigger-icon",
202
+ className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ ) });
159
208
  }
160
- function AccordionContent({ className, ...props }) {
161
- return /* @__PURE__ */ jsx(AriaDisclosurePanel, { "data-slot": "accordion-content", className: cn("overflow-hidden pb-3 text-sm text-muted-foreground", className), ...props });
209
+ function AccordionContent({ className, children, ...props }) {
210
+ return /* @__PURE__ */ jsx(
211
+ AccordionContentPrimitive,
212
+ {
213
+ "data-slot": "accordion-content",
214
+ className: "h-(--disclosure-panel-height) overflow-clip text-sm transition-[height] data-open:animate-accordion-down data-closed:animate-accordion-up",
215
+ ...props,
216
+ children: /* @__PURE__ */ jsx(
217
+ "div",
218
+ {
219
+ className: cn(
220
+ "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
221
+ className
222
+ ),
223
+ children
224
+ }
225
+ )
226
+ }
227
+ );
162
228
  }
163
229
 
164
230
  // src/ui/alert/alert.tsx
231
+ import { cva } from "class-variance-authority";
165
232
  import { jsx as jsx2 } from "react/jsx-runtime";
166
- var variants = {
167
- default: "border-border bg-card text-foreground",
168
- destructive: "border-destructive/30 bg-destructive/5 text-destructive",
169
- success: "border-success/30 bg-success/5 text-success",
170
- warning: "border-warning/30 bg-warning/5 text-warning"
171
- };
172
- function Alert({ className, variant = "default", ...props }) {
173
- return /* @__PURE__ */ jsx2("div", { role: "alert", "data-slot": "alert", "data-variant": variant, className: cn("grid w-full gap-1 rounded-lg border px-3 py-2.5 text-sm [&>svg]:size-4", variants[variant], className), ...props });
233
+ var alertVariants = cva(
234
+ "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",
235
+ {
236
+ variants: {
237
+ variant: {
238
+ default: "bg-card text-card-foreground",
239
+ info: "border-info/30 bg-info/5 text-info",
240
+ success: "border-success/30 bg-success/5 text-success",
241
+ warning: "border-warning/30 bg-warning/5 text-warning",
242
+ destructive: "border-destructive/30 bg-destructive/5 text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
243
+ }
244
+ },
245
+ defaultVariants: {
246
+ variant: "default"
247
+ }
248
+ }
249
+ );
250
+ function Alert({ className, variant, ...props }) {
251
+ return /* @__PURE__ */ jsx2(
252
+ "div",
253
+ {
254
+ "data-slot": "alert",
255
+ role: "alert",
256
+ className: cn(alertVariants({ variant }), className),
257
+ ...props
258
+ }
259
+ );
174
260
  }
175
261
  function AlertTitle({ className, ...props }) {
176
- return /* @__PURE__ */ jsx2("div", { "data-slot": "alert-title", className: cn("font-medium", className), ...props });
262
+ return /* @__PURE__ */ jsx2(
263
+ "div",
264
+ {
265
+ "data-slot": "alert-title",
266
+ className: cn(
267
+ "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
268
+ className
269
+ ),
270
+ ...props
271
+ }
272
+ );
177
273
  }
178
274
  function AlertDescription({ className, ...props }) {
179
- return /* @__PURE__ */ jsx2("div", { "data-slot": "alert-description", className: cn("text-sm opacity-90", className), ...props });
275
+ return /* @__PURE__ */ jsx2(
276
+ "div",
277
+ {
278
+ "data-slot": "alert-description",
279
+ className: cn(
280
+ "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",
281
+ className
282
+ ),
283
+ ...props
284
+ }
285
+ );
180
286
  }
181
- function AlertAction({ className, children, ...props }) {
182
- return /* @__PURE__ */ jsx2("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props, children });
287
+ function AlertAction({ className, ...props }) {
288
+ return /* @__PURE__ */ jsx2("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props });
183
289
  }
184
290
 
185
291
  // src/ui/app-shell/app-shell.tsx
@@ -297,24 +403,51 @@ function AvatarGroupCount({ className, ...props }) {
297
403
  }
298
404
 
299
405
  // src/ui/badge/badge.tsx
300
- import { cva } from "class-variance-authority";
406
+ import { cva as cva2 } from "class-variance-authority";
407
+ import { Link } from "react-aria-components";
301
408
  import { jsx as jsx5 } from "react/jsx-runtime";
302
- var badgeVariants = cva("inline-flex w-fit items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", {
303
- variants: {
304
- variant: {
305
- default: "bg-primary text-primary-foreground",
306
- secondary: "bg-secondary text-secondary-foreground",
307
- neutral: "bg-muted text-muted-foreground",
308
- success: "bg-success/10 text-success",
309
- warning: "bg-warning/10 text-warning",
310
- destructive: "bg-destructive/10 text-destructive",
311
- outline: "border border-border text-foreground"
312
- }
313
- },
314
- defaultVariants: { variant: "default" }
315
- });
409
+ var badgeVariants = cva2(
410
+ "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",
411
+ {
412
+ variants: {
413
+ variant: {
414
+ default: "bg-primary text-primary-foreground",
415
+ secondary: "bg-secondary text-secondary-foreground",
416
+ neutral: "bg-muted text-muted-foreground",
417
+ success: "bg-success/10 text-success",
418
+ warning: "bg-warning/10 text-warning",
419
+ info: "bg-info/10 text-info",
420
+ danger: "bg-destructive/10 text-destructive",
421
+ destructive: "bg-destructive text-destructive-foreground",
422
+ outline: "border border-border text-foreground",
423
+ ghost: "text-foreground hover:bg-muted",
424
+ link: "text-primary underline-offset-4 hover:underline"
425
+ }
426
+ },
427
+ defaultVariants: { variant: "default" }
428
+ }
429
+ );
316
430
  function Badge({ className, variant, ...props }) {
317
- return /* @__PURE__ */ jsx5("span", { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props });
431
+ return /* @__PURE__ */ jsx5(
432
+ "span",
433
+ {
434
+ "data-slot": "badge",
435
+ "data-variant": variant ?? "default",
436
+ className: cn(badgeVariants({ variant }), className),
437
+ ...props
438
+ }
439
+ );
440
+ }
441
+ function BadgeLink({ className, variant, ...props }) {
442
+ return /* @__PURE__ */ jsx5(
443
+ Link,
444
+ {
445
+ "data-slot": "badge",
446
+ "data-variant": variant ?? "default",
447
+ className: cn(badgeVariants({ variant }), className),
448
+ ...props
449
+ }
450
+ );
318
451
  }
319
452
 
320
453
  // src/ui/breadcrumb/breadcrumb.tsx
@@ -336,101 +469,306 @@ function BreadcrumbSeparator({ children = "/", className, ...props }) {
336
469
  return /* @__PURE__ */ jsx6("span", { "data-slot": "breadcrumb-separator", "aria-hidden": "true", className: cn("text-muted-foreground/60", className), ...props, children });
337
470
  }
338
471
 
339
- // src/ui/button-group/button-group.tsx
340
- import { jsx as jsx7 } from "react/jsx-runtime";
341
- function ButtonGroup({ className, ...props }) {
342
- return /* @__PURE__ */ jsx7("div", { role: "group", "data-slot": "button-group", className: cn("inline-flex items-center gap-2", className), ...props });
343
- }
344
- function ButtonGroupText({ className, ...props }) {
345
- return /* @__PURE__ */ jsx7("span", { "data-slot": "button-group-text", className: cn("text-sm text-muted-foreground", className), ...props });
346
- }
347
-
348
472
  // src/ui/button/button.tsx
349
- import { cva as cva2 } from "class-variance-authority";
350
- import { Button as AriaButton } from "react-aria-components";
351
- import { jsx as jsx8 } from "react/jsx-runtime";
352
- var buttonVariants = cva2(
353
- "inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-transparent text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,transform] duration-150 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 data-pressed:scale-[0.98] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none motion-reduce:data-pressed:transform-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
473
+ import { cva as cva3 } from "class-variance-authority";
474
+ import {
475
+ Button as ButtonPrimitive,
476
+ Link as LinkPrimitive
477
+ } from "react-aria-components";
478
+ import { jsx as jsx7 } from "react/jsx-runtime";
479
+ var buttonVariants = cva3(
480
+ "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 active:not-aria-[haspopup]:translate-y-px 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",
354
481
  {
355
482
  variants: {
356
483
  variant: {
357
- default: "bg-primary text-primary-foreground hover:bg-primary/85",
358
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
359
- outline: "border-border bg-background text-foreground hover:bg-muted",
360
- ghost: "text-foreground hover:bg-muted",
361
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20",
484
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
485
+ 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",
486
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
487
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
488
+ 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",
362
489
  link: "text-primary underline-offset-4 hover:underline"
363
490
  },
364
491
  size: {
365
- xs: "h-6 px-2 text-xs",
366
- sm: "h-7 px-2.5 text-xs",
367
- default: "h-8 px-3",
368
- lg: "h-10 px-4",
369
- icon: "size-8 p-0"
492
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
493
+ 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",
494
+ 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",
495
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
496
+ icon: "size-8",
497
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
498
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
499
+ "icon-lg": "size-9"
370
500
  }
371
501
  },
372
- defaultVariants: { variant: "default", size: "default" }
502
+ defaultVariants: {
503
+ variant: "default",
504
+ size: "default"
505
+ }
373
506
  }
374
507
  );
375
- function Button2({ className, variant, size, ...props }) {
376
- return /* @__PURE__ */ jsx8(AriaButton, { "data-slot": "button", className: cn(buttonVariants({ variant, size }), className), ...props });
508
+ function Button({ className, variant = "default", size = "default", ...props }) {
509
+ return /* @__PURE__ */ jsx7(
510
+ ButtonPrimitive,
511
+ {
512
+ "data-slot": "button",
513
+ "data-variant": variant,
514
+ "data-size": size,
515
+ className: cn(buttonVariants({ variant, size, className })),
516
+ ...props
517
+ }
518
+ );
519
+ }
520
+ function LinkButton({
521
+ className,
522
+ variant = "default",
523
+ size = "default",
524
+ ...props
525
+ }) {
526
+ return /* @__PURE__ */ jsx7(
527
+ LinkPrimitive,
528
+ {
529
+ "data-slot": "button",
530
+ "data-variant": variant,
531
+ "data-size": size,
532
+ className: cn(buttonVariants({ variant, size, className })),
533
+ ...props
534
+ }
535
+ );
377
536
  }
378
537
 
379
- // src/ui/card/card.tsx
538
+ // src/ui/button-group/button-group.tsx
539
+ import { cva as cva4 } from "class-variance-authority";
540
+
541
+ // src/ui/separator/separator.tsx
542
+ import { Separator as SeparatorPrimitive } from "react-aria-components";
543
+ import { jsx as jsx8 } from "react/jsx-runtime";
544
+ function Separator({ className, orientation = "horizontal", ...props }) {
545
+ return /* @__PURE__ */ jsx8(
546
+ SeparatorPrimitive,
547
+ {
548
+ "data-slot": "separator",
549
+ orientation,
550
+ className: cn(
551
+ "block shrink-0 border-0 bg-border aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=vertical]:w-px aria-[orientation=vertical]:self-stretch [:is(hr)]:h-px [:is(hr)]:w-full",
552
+ className
553
+ ),
554
+ ...props
555
+ }
556
+ );
557
+ }
558
+
559
+ // src/ui/button-group/button-group.tsx
380
560
  import { jsx as jsx9 } from "react/jsx-runtime";
381
- function Card({ className, ...props }) {
382
- return /* @__PURE__ */ jsx9("section", { "data-slot": "card", className: cn("rounded-xl border border-border bg-card text-foreground shadow-sm", className), ...props });
561
+ var buttonGroupVariants = cva4(
562
+ "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",
563
+ {
564
+ variants: {
565
+ orientation: {
566
+ horizontal: "**:data-slot:rounded-r-none [&_[data-slot]~[data-slot]]:rounded-l-none [&_[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",
567
+ vertical: "flex-col **:data-slot:rounded-b-none [&_[data-slot]~[data-slot]]:rounded-t-none [&_[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"
568
+ }
569
+ },
570
+ defaultVariants: {
571
+ orientation: "horizontal"
572
+ }
573
+ }
574
+ );
575
+ function ButtonGroup({
576
+ className,
577
+ orientation,
578
+ ...props
579
+ }) {
580
+ return (
581
+ // biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
582
+ /* @__PURE__ */ jsx9(
583
+ "div",
584
+ {
585
+ role: "group",
586
+ "data-slot": "button-group",
587
+ "data-orientation": orientation,
588
+ className: cn(buttonGroupVariants({ orientation }), className),
589
+ ...props
590
+ }
591
+ )
592
+ );
593
+ }
594
+ function ButtonGroupText({
595
+ className,
596
+ render,
597
+ ...props
598
+ }) {
599
+ if (render) {
600
+ const renderProps = {
601
+ "data-slot": "button-group-text",
602
+ className: cn(
603
+ "flex items-center gap-2 rounded-lg border border-border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
604
+ className
605
+ ),
606
+ ...props
607
+ };
608
+ return render(renderProps);
609
+ }
610
+ return /* @__PURE__ */ jsx9(
611
+ "div",
612
+ {
613
+ "data-slot": "button-group-text",
614
+ className: cn(
615
+ "flex items-center gap-2 rounded-lg border border-border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
616
+ className
617
+ ),
618
+ ...props
619
+ }
620
+ );
621
+ }
622
+ function ButtonGroupSeparator({
623
+ className,
624
+ orientation = "vertical",
625
+ ...props
626
+ }) {
627
+ return /* @__PURE__ */ jsx9(
628
+ Separator,
629
+ {
630
+ "data-slot": "button-group-separator",
631
+ orientation,
632
+ className: cn(
633
+ "relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
634
+ className
635
+ ),
636
+ ...props
637
+ }
638
+ );
639
+ }
640
+
641
+ // src/ui/card/card.tsx
642
+ import { jsx as jsx10 } from "react/jsx-runtime";
643
+ function Card({ className, size = "default", ...props }) {
644
+ return /* @__PURE__ */ jsx10(
645
+ "div",
646
+ {
647
+ "data-slot": "card",
648
+ "data-size": size,
649
+ className: cn(
650
+ "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl border border-border bg-card py-(--card-spacing) text-sm text-card-foreground shadow-sm [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
651
+ className
652
+ ),
653
+ ...props
654
+ }
655
+ );
383
656
  }
384
657
  function CardHeader({ className, ...props }) {
385
- return /* @__PURE__ */ jsx9("header", { "data-slot": "card-header", className: cn("flex flex-col gap-1.5 p-5", className), ...props });
658
+ return /* @__PURE__ */ jsx10(
659
+ "div",
660
+ {
661
+ "data-slot": "card-header",
662
+ className: cn(
663
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
664
+ className
665
+ ),
666
+ ...props
667
+ }
668
+ );
386
669
  }
387
670
  function CardTitle({ className, ...props }) {
388
- return /* @__PURE__ */ jsx9("h2", { "data-slot": "card-title", className: cn("text-base font-semibold", className), ...props });
671
+ return /* @__PURE__ */ jsx10(
672
+ "div",
673
+ {
674
+ "data-slot": "card-title",
675
+ className: cn(
676
+ "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
677
+ className
678
+ ),
679
+ ...props
680
+ }
681
+ );
389
682
  }
390
683
  function CardDescription({ className, ...props }) {
391
- return /* @__PURE__ */ jsx9("p", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props });
684
+ return /* @__PURE__ */ jsx10(
685
+ "div",
686
+ {
687
+ "data-slot": "card-description",
688
+ className: cn("text-sm text-muted-foreground", className),
689
+ ...props
690
+ }
691
+ );
692
+ }
693
+ function CardAction({ className, ...props }) {
694
+ return /* @__PURE__ */ jsx10(
695
+ "div",
696
+ {
697
+ "data-slot": "card-action",
698
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
699
+ ...props
700
+ }
701
+ );
392
702
  }
393
703
  function CardContent({ className, ...props }) {
394
- return /* @__PURE__ */ jsx9("div", { "data-slot": "card-content", className: cn("p-5 pt-0", className), ...props });
704
+ return /* @__PURE__ */ jsx10("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props });
395
705
  }
396
706
  function CardFooter({ className, ...props }) {
397
- return /* @__PURE__ */ jsx9("footer", { "data-slot": "card-footer", className: cn("flex items-center gap-2 border-t border-border p-5", className), ...props });
707
+ return /* @__PURE__ */ jsx10(
708
+ "div",
709
+ {
710
+ "data-slot": "card-footer",
711
+ className: cn(
712
+ "flex items-center rounded-b-xl border-t border-border bg-muted/50 p-(--card-spacing)",
713
+ className
714
+ ),
715
+ ...props
716
+ }
717
+ );
398
718
  }
399
719
 
400
720
  // src/ui/checkbox/checkbox.tsx
721
+ import { Check } from "lucide-react";
401
722
  import {
402
723
  Checkbox as AriaCheckbox
403
724
  } from "react-aria-components";
404
- import { Check } from "lucide-react";
405
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
725
+ import { Fragment, jsx as jsx11, jsxs as jsxs2 } from "react/jsx-runtime";
406
726
  function Checkbox({ className, children, ...props }) {
407
- return /* @__PURE__ */ jsx10(AriaCheckbox, { "data-slot": "checkbox", className: cn("group inline-flex items-center gap-2 text-sm text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ jsxs2(Fragment2, { children: [
408
- /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", 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", children: /* @__PURE__ */ jsx10(Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" }) }),
409
- typeof children === "function" ? children(state) : children
410
- ] }) });
727
+ return /* @__PURE__ */ jsx11(
728
+ AriaCheckbox,
729
+ {
730
+ "data-slot": "checkbox",
731
+ className: cn(
732
+ "group inline-flex items-center gap-2 text-sm text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50",
733
+ className
734
+ ),
735
+ ...props,
736
+ children: (state) => /* @__PURE__ */ jsxs2(Fragment, { children: [
737
+ /* @__PURE__ */ jsx11(
738
+ "span",
739
+ {
740
+ "aria-hidden": "true",
741
+ 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",
742
+ children: /* @__PURE__ */ jsx11(Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
743
+ }
744
+ ),
745
+ typeof children === "function" ? children(state) : children
746
+ ] })
747
+ }
748
+ );
411
749
  }
412
750
 
413
751
  // src/ui/combobox/combobox.tsx
414
- import { Fragment as Fragment3, useMemo, useState as useState5 } from "react";
752
+ import { Fragment as Fragment2, useMemo, useState as useState5 } from "react";
415
753
  import { ComboBox as AriaComboBox, ComboBoxValue, FieldError, Input, Label, ListBox, ListBoxItem, Popover, Text } from "react-aria-components";
416
- import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
754
+ import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
417
755
  var Combobox = AriaComboBox;
418
756
  function ComboboxInput({ className, ...props }) {
419
- return /* @__PURE__ */ jsx11(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 });
757
+ return /* @__PURE__ */ jsx12(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 });
420
758
  }
421
759
  function ComboboxContent({ className, ...props }) {
422
- return /* @__PURE__ */ jsx11(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 });
760
+ return /* @__PURE__ */ jsx12(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 });
423
761
  }
424
762
  function ComboboxList({ className, emptyState, ...props }) {
425
- return /* @__PURE__ */ jsx11(ListBox, { "data-slot": "combobox-list", className: cn("max-h-64 overflow-y-auto", className), renderEmptyState: emptyState ? () => emptyState : void 0, ...props });
763
+ return /* @__PURE__ */ jsx12(ListBox, { "data-slot": "combobox-list", className: cn("max-h-64 overflow-y-auto", className), renderEmptyState: emptyState ? () => emptyState : void 0, ...props });
426
764
  }
427
765
  function ComboboxItem({ className, children, ...props }) {
428
- return /* @__PURE__ */ jsx11(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 });
766
+ return /* @__PURE__ */ jsx12(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 });
429
767
  }
430
768
  function HighlightMatch({ text, query, className }) {
431
- return /* @__PURE__ */ jsx11("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ jsx11("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ jsx11(Fragment3, { children: part.text }, `${part.text}-${index}`)) });
769
+ return /* @__PURE__ */ jsx12("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ jsx12("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ jsx12(Fragment2, { children: part.text }, `${part.text}-${index}`)) });
432
770
  }
433
- function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ jsx11("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
771
+ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ jsx12("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
434
772
  const [internalInputValue, setInternalInputValue] = useState5("");
435
773
  const inputValue = controlledInputValue ?? internalInputValue;
436
774
  const setInputValue = (value) => {
@@ -455,37 +793,37 @@ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inp
455
793
  if (item) setInputValue(getItemLabel(item));
456
794
  onSelectionChange?.(key, item);
457
795
  }, children: [
458
- label && /* @__PURE__ */ jsx11(Label, { className: "text-sm font-medium text-foreground", children: label }),
796
+ label && /* @__PURE__ */ jsx12(Label, { className: "text-sm font-medium text-foreground", children: label }),
459
797
  /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
460
798
  suggestionLabel && /* @__PURE__ */ jsxs3("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: [
461
- /* @__PURE__ */ jsx11("span", { className: "text-transparent", children: inputValue }),
799
+ /* @__PURE__ */ jsx12("span", { className: "text-transparent", children: inputValue }),
462
800
  suggestionLabel.slice(inputValue.length)
463
801
  ] }),
464
- /* @__PURE__ */ jsx11(ComboboxInput, { "aria-autocomplete": suggestionLabel ? "both" : "list", placeholder, onKeyDown: handleKeyDown, className: "relative z-10 bg-transparent" })
802
+ /* @__PURE__ */ jsx12(ComboboxInput, { "aria-autocomplete": suggestionLabel ? "both" : "list", placeholder, onKeyDown: handleKeyDown, className: "relative z-10 bg-transparent" })
465
803
  ] }),
466
- description && /* @__PURE__ */ jsx11(Text, { slot: "description", className: "text-xs text-muted-foreground", children: description }),
467
- errorMessage && /* @__PURE__ */ jsx11(FieldError, { className: "text-xs text-destructive", children: errorMessage }),
468
- /* @__PURE__ */ jsx11(ComboboxContent, { children: /* @__PURE__ */ jsx11(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ jsx11(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ jsx11(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
804
+ description && /* @__PURE__ */ jsx12(Text, { slot: "description", className: "text-xs text-muted-foreground", children: description }),
805
+ errorMessage && /* @__PURE__ */ jsx12(FieldError, { className: "text-xs text-destructive", children: errorMessage }),
806
+ /* @__PURE__ */ jsx12(ComboboxContent, { children: /* @__PURE__ */ jsx12(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ jsx12(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ jsx12(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
469
807
  ] });
470
808
  }
471
809
 
472
810
  // src/ui/command/command.tsx
473
811
  import { ComboBox as AriaComboBox2, Input as AriaInput, ListBox as ListBox2, ListBoxItem as ListBoxItem2, Popover as Popover2 } from "react-aria-components";
474
- import { jsx as jsx12 } from "react/jsx-runtime";
812
+ import { jsx as jsx13 } from "react/jsx-runtime";
475
813
  function Command({ className, ...props }) {
476
- return /* @__PURE__ */ jsx12(AriaComboBox2, { "data-slot": "command", className: cn("w-full", className), ...props });
814
+ return /* @__PURE__ */ jsx13(AriaComboBox2, { "data-slot": "command", className: cn("w-full", className), ...props });
477
815
  }
478
816
  function CommandInput({ className, ...props }) {
479
- return /* @__PURE__ */ jsx12(AriaInput, { "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 });
817
+ return /* @__PURE__ */ jsx13(AriaInput, { "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 });
480
818
  }
481
819
  function CommandContent({ className, ...props }) {
482
- return /* @__PURE__ */ jsx12(Popover2, { "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 });
820
+ return /* @__PURE__ */ jsx13(Popover2, { "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 });
483
821
  }
484
822
  function CommandList({ className, ...props }) {
485
- return /* @__PURE__ */ jsx12(ListBox2, { "data-slot": "command-list", className: cn("max-h-72 overflow-y-auto", className), ...props });
823
+ return /* @__PURE__ */ jsx13(ListBox2, { "data-slot": "command-list", className: cn("max-h-72 overflow-y-auto", className), ...props });
486
824
  }
487
825
  function CommandItem({ className, ...props }) {
488
- return /* @__PURE__ */ jsx12(ListBoxItem2, { "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 });
826
+ return /* @__PURE__ */ jsx13(ListBoxItem2, { "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 });
489
827
  }
490
828
 
491
829
  // src/ui/modal-dialog/modal-dialog.tsx
@@ -497,7 +835,7 @@ import {
497
835
  ModalOverlay,
498
836
  Text as Text2
499
837
  } from "react-aria-components";
500
- import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
838
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
501
839
  var sizeClasses = {
502
840
  sm: "w-[min(calc(100dvw-2rem),24rem)]",
503
841
  md: "w-[min(calc(100dvw-2rem),28rem)]",
@@ -517,14 +855,14 @@ function ModalDialog({
517
855
  ...props
518
856
  }) {
519
857
  const layoutClass = children ? footer ? "grid-rows-[auto_minmax(0,1fr)_auto]" : "grid-rows-[auto_minmax(0,1fr)]" : "grid-rows-[auto_auto]";
520
- return /* @__PURE__ */ jsx13(
858
+ return /* @__PURE__ */ jsx14(
521
859
  ModalOverlay,
522
860
  {
523
861
  isOpen: open,
524
862
  onOpenChange,
525
863
  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",
526
864
  ...props,
527
- children: /* @__PURE__ */ jsx13(
865
+ children: /* @__PURE__ */ jsx14(
528
866
  Modal,
529
867
  {
530
868
  className: cn(
@@ -532,33 +870,33 @@ function ModalDialog({
532
870
  sizeClasses[size],
533
871
  className
534
872
  ),
535
- children: /* @__PURE__ */ jsx13(
873
+ children: /* @__PURE__ */ jsx14(
536
874
  AriaDialog,
537
875
  {
538
876
  className: cn(
539
877
  "grid max-h-[calc(100dvh-2rem)] overflow-hidden rounded-xl bg-background text-foreground shadow-xl outline-none",
540
878
  layoutClass
541
879
  ),
542
- children: ({ close }) => /* @__PURE__ */ jsxs4(Fragment4, { children: [
880
+ children: ({ close }) => /* @__PURE__ */ jsxs4(Fragment3, { children: [
543
881
  /* @__PURE__ */ jsxs4("header", { "data-slot": "modal-dialog-header", className: "flex items-start gap-3 border-b border-border px-5 py-4", children: [
544
882
  /* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
545
- /* @__PURE__ */ jsx13(Heading, { slot: "title", className: "font-heading text-base leading-none font-medium", children: title }),
546
- description ? /* @__PURE__ */ jsx13(Text2, { slot: "description", className: "mt-2 text-sm text-muted-foreground", children: description }) : null
883
+ /* @__PURE__ */ jsx14(Heading, { slot: "title", className: "font-heading text-base leading-none font-medium", children: title }),
884
+ description ? /* @__PURE__ */ jsx14(Text2, { slot: "description", className: "mt-2 text-sm text-muted-foreground", children: description }) : null
547
885
  ] }),
548
- showCloseButton ? /* @__PURE__ */ jsx13(
549
- Button2,
886
+ showCloseButton ? /* @__PURE__ */ jsx14(
887
+ Button,
550
888
  {
551
889
  "aria-label": "Cerrar di\xE1logo",
552
890
  variant: "ghost",
553
891
  size: "icon",
554
892
  className: "-mr-2 -mt-1",
555
893
  onPress: close,
556
- children: /* @__PURE__ */ jsx13(X, { "aria-hidden": "true", className: "size-4" })
894
+ children: /* @__PURE__ */ jsx14(X, { "aria-hidden": "true", className: "size-4" })
557
895
  }
558
896
  ) : null
559
897
  ] }),
560
- children ? /* @__PURE__ */ jsx13("div", { "data-slot": "modal-dialog-body", className: "min-h-0 overflow-y-auto px-5 py-4", children }) : null,
561
- footer ? /* @__PURE__ */ jsx13(
898
+ children ? /* @__PURE__ */ jsx14("div", { "data-slot": "modal-dialog-body", className: "min-h-0 overflow-y-auto px-5 py-4", children }) : null,
899
+ footer ? /* @__PURE__ */ jsx14(
562
900
  "footer",
563
901
  {
564
902
  "data-slot": "modal-dialog-footer",
@@ -579,7 +917,7 @@ function ModalDialog({
579
917
  }
580
918
 
581
919
  // src/ui/confirm-dialog/confirm-dialog.tsx
582
- import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
920
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
583
921
  function ConfirmDialog({
584
922
  open,
585
923
  onOpenChange,
@@ -591,7 +929,7 @@ function ConfirmDialog({
591
929
  pending = false,
592
930
  onConfirm
593
931
  }) {
594
- return /* @__PURE__ */ jsx14(
932
+ return /* @__PURE__ */ jsx15(
595
933
  ModalDialog,
596
934
  {
597
935
  open,
@@ -599,9 +937,9 @@ function ConfirmDialog({
599
937
  title,
600
938
  description,
601
939
  showCloseButton: false,
602
- footer: /* @__PURE__ */ jsxs5(Fragment5, { children: [
603
- /* @__PURE__ */ jsx14(Button2, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
604
- /* @__PURE__ */ jsx14(Button2, { variant: destructive ? "destructive" : "default", isDisabled: pending, onPress: onConfirm, children: confirmLabel })
940
+ footer: /* @__PURE__ */ jsxs5(Fragment4, { children: [
941
+ /* @__PURE__ */ jsx15(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
942
+ /* @__PURE__ */ jsx15(Button, { variant: destructive ? "destructive" : "default", isDisabled: pending, onPress: onConfirm, children: confirmLabel })
605
943
  ] })
606
944
  }
607
945
  );
@@ -609,79 +947,475 @@ function ConfirmDialog({
609
947
 
610
948
  // src/ui/drawer/drawer.tsx
611
949
  import { Dialog as AriaDialog2, Modal as Modal2, ModalOverlay as ModalOverlay2 } from "react-aria-components";
612
- import { jsx as jsx15 } from "react/jsx-runtime";
950
+ import { jsx as jsx16 } from "react/jsx-runtime";
613
951
  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" };
614
952
  function Drawer({ children, side = "right", className, ...props }) {
615
- return /* @__PURE__ */ jsx15(ModalOverlay2, { 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__ */ jsx15(Modal2, { 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__ */ jsx15(AriaDialog2, { "data-slot": "drawer", className: "outline-none", children }) }) });
953
+ return /* @__PURE__ */ jsx16(ModalOverlay2, { 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__ */ jsx16(Modal2, { 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__ */ jsx16(AriaDialog2, { "data-slot": "drawer", className: "outline-none", children }) }) });
616
954
  }
617
955
  function DrawerHeader({ className, ...props }) {
618
- return /* @__PURE__ */ jsx15("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
956
+ return /* @__PURE__ */ jsx16("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
619
957
  }
620
958
  function DrawerFooter({ className, ...props }) {
621
- return /* @__PURE__ */ jsx15("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 });
959
+ return /* @__PURE__ */ jsx16("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 });
622
960
  }
623
961
  function DrawerTitle({ className, ...props }) {
624
- return /* @__PURE__ */ jsx15("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
962
+ return /* @__PURE__ */ jsx16("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
625
963
  }
626
964
  function DrawerDescription({ className, ...props }) {
627
- return /* @__PURE__ */ jsx15("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
965
+ return /* @__PURE__ */ jsx16("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
628
966
  }
629
967
 
630
968
  // src/ui/dropdown-menu/dropdown-menu.tsx
631
- import { Menu as AriaMenu, MenuItem as AriaMenuItem, MenuTrigger as AriaMenuTrigger, Popover as AriaPopover, Separator as AriaSeparator } from "react-aria-components";
632
- import { jsx as jsx16 } from "react/jsx-runtime";
633
- var DropdownMenu = AriaMenu;
634
- var DropdownMenuTrigger = AriaMenuTrigger;
635
- function DropdownMenuContent({ className, ...props }) {
636
- return /* @__PURE__ */ jsx16(AriaPopover, { "data-slot": "dropdown-menu-content", offset: 6, className: cn("min-w-40 overflow-hidden 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 });
969
+ import "react";
970
+ import { cva as cva5 } from "class-variance-authority";
971
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
972
+ import {
973
+ composeRenderProps,
974
+ Header as HeaderPrimitive,
975
+ MenuItem as MenuItemPrimitive,
976
+ Menu as MenuPrimitive,
977
+ MenuSection as MenuSectionPrimitive,
978
+ MenuTrigger as MenuTriggerPrimitive,
979
+ Popover as PopoverPrimitive,
980
+ Separator as SeparatorPrimitive2,
981
+ SubmenuTrigger as SubmenuTriggerPrimitive
982
+ } from "react-aria-components";
983
+ import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
984
+ function DropdownMenuTrigger({
985
+ ...props
986
+ }) {
987
+ return /* @__PURE__ */ jsx17(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
637
988
  }
638
- function DropdownMenuItem({ className, ...props }) {
639
- return /* @__PURE__ */ jsx16(AriaMenuItem, { "data-slot": "dropdown-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 });
989
+ function DropdownMenu({
990
+ "data-slot": dataSlot = "dropdown-menu-content",
991
+ placement = "bottom start",
992
+ offset = 4,
993
+ crossOffset = 0,
994
+ className,
995
+ children,
996
+ ...props
997
+ }) {
998
+ return /* @__PURE__ */ jsx17(
999
+ PopoverPrimitive,
1000
+ {
1001
+ "data-slot": dataSlot,
1002
+ placement,
1003
+ offset,
1004
+ crossOffset,
1005
+ 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),
1006
+ children: /* @__PURE__ */ jsx17(
1007
+ MenuPrimitive,
1008
+ {
1009
+ className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
1010
+ ...props,
1011
+ children
1012
+ }
1013
+ )
1014
+ }
1015
+ );
1016
+ }
1017
+ function DropdownMenuGroup({
1018
+ ...props
1019
+ }) {
1020
+ return /* @__PURE__ */ jsx17(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
640
1021
  }
641
- function DropdownMenuSeparator({ className, ...props }) {
642
- return /* @__PURE__ */ jsx16(AriaSeparator, { "data-slot": "dropdown-menu-separator", className: cn("my-1 h-px bg-border", className), ...props });
1022
+ function DropdownMenuLabel({
1023
+ className,
1024
+ inset,
1025
+ ...props
1026
+ }) {
1027
+ return /* @__PURE__ */ jsx17(
1028
+ HeaderPrimitive,
1029
+ {
1030
+ "data-slot": "dropdown-menu-label",
1031
+ "data-inset": inset,
1032
+ className: cn(
1033
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
1034
+ className
1035
+ ),
1036
+ ...props
1037
+ }
1038
+ );
1039
+ }
1040
+ var dropdownMenuItemVariants = cva5(
1041
+ "group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1042
+ {
1043
+ variants: {
1044
+ selectionMode: {
1045
+ none: "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-muted focus:text-foreground not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
1046
+ single: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4",
1047
+ multiple: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4"
1048
+ }
1049
+ }
1050
+ }
1051
+ );
1052
+ function DropdownMenuItem({
1053
+ className,
1054
+ inset,
1055
+ variant = "default",
1056
+ children,
1057
+ ...props
1058
+ }) {
1059
+ return /* @__PURE__ */ jsx17(
1060
+ MenuItemPrimitive,
1061
+ {
1062
+ "data-slot": "dropdown-menu-item",
1063
+ "data-inset": inset,
1064
+ "data-variant": variant,
1065
+ textValue: typeof children === "string" ? children : props.textValue,
1066
+ className: composeRenderProps(
1067
+ className,
1068
+ (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
1069
+ ),
1070
+ ...props,
1071
+ children: composeRenderProps(
1072
+ children,
1073
+ (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs6(Fragment5, { children: [
1074
+ selectionMode !== "none" ? /* @__PURE__ */ jsx17(
1075
+ "span",
1076
+ {
1077
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
1078
+ "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
1079
+ children: isSelected ? /* @__PURE__ */ jsx17(CheckIcon, {}) : null
1080
+ }
1081
+ ) : null,
1082
+ children2
1083
+ ] })
1084
+ )
1085
+ }
1086
+ );
1087
+ }
1088
+ function DropdownMenuSub({
1089
+ ...props
1090
+ }) {
1091
+ return /* @__PURE__ */ jsx17(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
1092
+ }
1093
+ function DropdownMenuSubTrigger({
1094
+ className,
1095
+ inset,
1096
+ children,
1097
+ ...props
1098
+ }) {
1099
+ return /* @__PURE__ */ jsx17(
1100
+ MenuItemPrimitive,
1101
+ {
1102
+ "data-slot": "dropdown-menu-sub-trigger",
1103
+ "data-inset": inset,
1104
+ textValue: typeof children === "string" ? children : props.textValue,
1105
+ className: cn(
1106
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 data-open:bg-muted data-open:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1107
+ className
1108
+ ),
1109
+ ...props,
1110
+ children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs6(Fragment5, { children: [
1111
+ children2,
1112
+ /* @__PURE__ */ jsx17(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
1113
+ ] }))
1114
+ }
1115
+ );
1116
+ }
1117
+ function DropdownMenuSubContent({
1118
+ placement = "end top",
1119
+ crossOffset = -3,
1120
+ offset = 0,
1121
+ className,
1122
+ ...props
1123
+ }) {
1124
+ return /* @__PURE__ */ jsx17(
1125
+ DropdownMenu,
1126
+ {
1127
+ "data-slot": "dropdown-menu-sub-content",
1128
+ className: cn("w-auto min-w-24 rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg", className),
1129
+ placement,
1130
+ crossOffset,
1131
+ offset,
1132
+ ...props
1133
+ }
1134
+ );
1135
+ }
1136
+ function DropdownMenuSeparator({
1137
+ className,
1138
+ ...props
1139
+ }) {
1140
+ return /* @__PURE__ */ jsx17(
1141
+ SeparatorPrimitive2,
1142
+ {
1143
+ "data-slot": "dropdown-menu-separator",
1144
+ className: cn("-mx-1 my-1 h-px bg-border", className),
1145
+ ...props
1146
+ }
1147
+ );
1148
+ }
1149
+ function DropdownMenuShortcut({
1150
+ className,
1151
+ ...props
1152
+ }) {
1153
+ return /* @__PURE__ */ jsx17(
1154
+ "span",
1155
+ {
1156
+ "data-slot": "dropdown-menu-shortcut",
1157
+ className: cn(
1158
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-foreground",
1159
+ className
1160
+ ),
1161
+ ...props
1162
+ }
1163
+ );
643
1164
  }
644
1165
 
645
1166
  // src/ui/empty-state/empty-state.tsx
646
- import { jsx as jsx17 } from "react/jsx-runtime";
1167
+ import { cva as cva6 } from "class-variance-authority";
1168
+ import { jsx as jsx18 } from "react/jsx-runtime";
647
1169
  function EmptyState({ className, ...props }) {
648
- return /* @__PURE__ */ jsx17("div", { "data-slot": "empty-state", className: cn("flex min-h-44 w-full flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border p-6 text-center", className), ...props });
1170
+ return /* @__PURE__ */ jsx18(
1171
+ "div",
1172
+ {
1173
+ "data-slot": "empty-state",
1174
+ className: cn(
1175
+ "flex min-h-44 w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border border-dashed border-border p-6 text-center text-balance",
1176
+ className
1177
+ ),
1178
+ ...props
1179
+ }
1180
+ );
1181
+ }
1182
+ function EmptyStateHeader({ className, ...props }) {
1183
+ return /* @__PURE__ */ jsx18(
1184
+ "div",
1185
+ {
1186
+ "data-slot": "empty-state-header",
1187
+ className: cn("flex max-w-sm flex-col items-center gap-2", className),
1188
+ ...props
1189
+ }
1190
+ );
1191
+ }
1192
+ var emptyStateMediaVariants = cva6(
1193
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
1194
+ {
1195
+ variants: {
1196
+ variant: {
1197
+ default: "bg-transparent",
1198
+ icon: "size-8 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
1199
+ }
1200
+ },
1201
+ defaultVariants: { variant: "default" }
1202
+ }
1203
+ );
1204
+ function EmptyStateMedia({
1205
+ className,
1206
+ variant = "default",
1207
+ ...props
1208
+ }) {
1209
+ return /* @__PURE__ */ jsx18(
1210
+ "div",
1211
+ {
1212
+ "data-slot": "empty-state-media",
1213
+ "data-variant": variant,
1214
+ className: cn(emptyStateMediaVariants({ variant }), className),
1215
+ ...props
1216
+ }
1217
+ );
649
1218
  }
650
1219
  function EmptyStateTitle({ className, ...props }) {
651
- return /* @__PURE__ */ jsx17("h3", { "data-slot": "empty-state-title", className: cn("text-sm font-medium text-foreground", className), ...props });
1220
+ return /* @__PURE__ */ jsx18(
1221
+ "h3",
1222
+ {
1223
+ "data-slot": "empty-state-title",
1224
+ className: cn("text-sm font-medium tracking-tight text-foreground", className),
1225
+ ...props
1226
+ }
1227
+ );
652
1228
  }
653
1229
  function EmptyStateDescription({ className, ...props }) {
654
- return /* @__PURE__ */ jsx17("p", { "data-slot": "empty-state-description", className: cn("max-w-sm text-sm text-muted-foreground", className), ...props });
1230
+ return /* @__PURE__ */ jsx18(
1231
+ "p",
1232
+ {
1233
+ "data-slot": "empty-state-description",
1234
+ className: cn(
1235
+ "max-w-sm text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
1236
+ className
1237
+ ),
1238
+ ...props
1239
+ }
1240
+ );
1241
+ }
1242
+ function EmptyStateContent({ className, ...props }) {
1243
+ return /* @__PURE__ */ jsx18(
1244
+ "div",
1245
+ {
1246
+ "data-slot": "empty-state-content",
1247
+ className: cn(
1248
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm",
1249
+ className
1250
+ ),
1251
+ ...props
1252
+ }
1253
+ );
655
1254
  }
656
1255
 
1256
+ // src/ui/field/field.tsx
1257
+ import { cva as cva7 } from "class-variance-authority";
1258
+
657
1259
  // src/ui/label/label.tsx
658
1260
  import { forwardRef } from "react";
659
1261
  import { Label as LabelPrimitive } from "react-aria-components";
660
- import { jsx as jsx18 } from "react/jsx-runtime";
1262
+ import { jsx as jsx19 } from "react/jsx-runtime";
661
1263
  var Label2 = forwardRef(function Label3({ className, ...props }, ref) {
662
- return /* @__PURE__ */ jsx18(LabelPrimitive, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
1264
+ return /* @__PURE__ */ jsx19(LabelPrimitive, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
663
1265
  });
664
1266
 
665
1267
  // src/ui/field/field.tsx
666
- import { jsx as jsx19 } from "react/jsx-runtime";
667
- function Field({ className, ...props }) {
668
- return /* @__PURE__ */ jsx19("div", { "data-slot": "field", className: cn("flex w-full flex-col gap-2", className), ...props });
1268
+ import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
1269
+ function FieldSet({ className, ...props }) {
1270
+ return /* @__PURE__ */ jsx20("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
1271
+ }
1272
+ function FieldLegend({
1273
+ className,
1274
+ variant = "legend",
1275
+ ...props
1276
+ }) {
1277
+ return /* @__PURE__ */ jsx20(
1278
+ "legend",
1279
+ {
1280
+ "data-slot": "field-legend",
1281
+ "data-variant": variant,
1282
+ className: cn(
1283
+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
1284
+ className
1285
+ ),
1286
+ ...props
1287
+ }
1288
+ );
1289
+ }
1290
+ function FieldGroup({ className, ...props }) {
1291
+ return /* @__PURE__ */ jsx20(
1292
+ "div",
1293
+ {
1294
+ "data-slot": "field-group",
1295
+ className: cn(
1296
+ "group/field-group @container/field-group flex w-full flex-col gap-5",
1297
+ className
1298
+ ),
1299
+ ...props
1300
+ }
1301
+ );
1302
+ }
1303
+ var fieldVariants = cva7(
1304
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
1305
+ {
1306
+ variants: {
1307
+ orientation: {
1308
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
1309
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto",
1310
+ 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"
1311
+ }
1312
+ },
1313
+ defaultVariants: { orientation: "vertical" }
1314
+ }
1315
+ );
1316
+ function Field({ className, orientation = "vertical", ...props }) {
1317
+ return (
1318
+ // biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
1319
+ /* @__PURE__ */ jsx20(
1320
+ "div",
1321
+ {
1322
+ role: "group",
1323
+ "data-slot": "field",
1324
+ "data-orientation": orientation,
1325
+ className: cn(fieldVariants({ orientation }), className),
1326
+ ...props
1327
+ }
1328
+ )
1329
+ );
1330
+ }
1331
+ function FieldContent({ className, ...props }) {
1332
+ return /* @__PURE__ */ jsx20(
1333
+ "div",
1334
+ {
1335
+ "data-slot": "field-content",
1336
+ className: cn("flex flex-1 flex-col gap-0.5 leading-snug", className),
1337
+ ...props
1338
+ }
1339
+ );
669
1340
  }
670
1341
  function FieldLabel({ className, ...props }) {
671
- return /* @__PURE__ */ jsx19(Label2, { "data-slot": "field-label", className: cn("text-foreground", className), ...props });
1342
+ return /* @__PURE__ */ jsx20(
1343
+ Label2,
1344
+ {
1345
+ "data-slot": "field-label",
1346
+ className: cn(
1347
+ "flex w-fit gap-2 leading-snug text-foreground group-data-[disabled=true]/field:opacity-50",
1348
+ className
1349
+ ),
1350
+ ...props
1351
+ }
1352
+ );
1353
+ }
1354
+ function FieldTitle({ className, ...props }) {
1355
+ return /* @__PURE__ */ jsx20(
1356
+ "div",
1357
+ {
1358
+ "data-slot": "field-title",
1359
+ className: cn("flex w-fit items-center gap-2 text-sm font-medium", className),
1360
+ ...props
1361
+ }
1362
+ );
672
1363
  }
673
1364
  function FieldDescription({ className, ...props }) {
674
- return /* @__PURE__ */ jsx19("p", { "data-slot": "field-description", className: cn("text-sm text-muted-foreground", className), ...props });
1365
+ return /* @__PURE__ */ jsx20(
1366
+ "p",
1367
+ {
1368
+ "data-slot": "field-description",
1369
+ className: cn(
1370
+ "text-left text-sm leading-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
1371
+ className
1372
+ ),
1373
+ ...props
1374
+ }
1375
+ );
1376
+ }
1377
+ function FieldSeparator({ className, children, ...props }) {
1378
+ return /* @__PURE__ */ jsxs7(
1379
+ "div",
1380
+ {
1381
+ "data-slot": "field-separator",
1382
+ "data-content": Boolean(children) || void 0,
1383
+ className: cn("relative -my-2 h-5 text-sm", className),
1384
+ ...props,
1385
+ children: [
1386
+ /* @__PURE__ */ jsx20(Separator, { className: "absolute inset-0 top-1/2" }),
1387
+ children ? /* @__PURE__ */ jsx20(
1388
+ "span",
1389
+ {
1390
+ "data-slot": "field-separator-content",
1391
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
1392
+ children
1393
+ }
1394
+ ) : null
1395
+ ]
1396
+ }
1397
+ );
675
1398
  }
676
- function FieldError2({ className, children, ...props }) {
677
- if (!children) return null;
678
- return /* @__PURE__ */ jsx19("p", { role: "alert", "data-slot": "field-error", className: cn("text-sm text-destructive", className), ...props, children });
1399
+ function FieldError2({ className, children, errors, ...props }) {
1400
+ const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
1401
+ const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx20("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx20("li", { children: message }, message)) }) : null);
1402
+ if (!content) return null;
1403
+ return /* @__PURE__ */ jsx20(
1404
+ "div",
1405
+ {
1406
+ role: "alert",
1407
+ "data-slot": "field-error",
1408
+ className: cn("text-sm text-destructive", className),
1409
+ ...props,
1410
+ children: content
1411
+ }
1412
+ );
679
1413
  }
680
1414
 
681
1415
  // src/ui/form-feedback/form-feedback.tsx
682
1416
  import { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef3, useState as useState6 } from "react";
683
1417
  import { CheckCircle, LoaderCircle, CircleAlert } from "lucide-react";
684
- import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
1418
+ import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
685
1419
  function useFormFeedback(options) {
686
1420
  const resetMs = options?.successResetMs ?? 2500;
687
1421
  const [state, setState] = useState6({ status: "idle" });
@@ -711,53 +1445,108 @@ function useFormFeedback(options) {
711
1445
  return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
712
1446
  }
713
1447
  function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
714
- if (state.status === "idle") return /* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
1448
+ if (state.status === "idle") return /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
715
1449
  const error = state.status === "error";
716
1450
  const success = state.status === "success";
717
- return /* @__PURE__ */ jsxs6("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: [
718
- state.status === "pending" && /* @__PURE__ */ jsx20(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
719
- success && /* @__PURE__ */ jsx20(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
720
- error && /* @__PURE__ */ jsx20(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
721
- /* @__PURE__ */ jsx20("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
1451
+ return /* @__PURE__ */ jsxs8("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: [
1452
+ state.status === "pending" && /* @__PURE__ */ jsx21(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
1453
+ success && /* @__PURE__ */ jsx21(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
1454
+ error && /* @__PURE__ */ jsx21(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
1455
+ /* @__PURE__ */ jsx21("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
722
1456
  ] });
723
1457
  }
724
1458
 
725
1459
  // src/ui/form-row/form-row.tsx
726
- import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
1460
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
727
1461
  function FormRow({ label, htmlFor, required, hint, error, className, children }) {
728
1462
  const hintId = hint ? `${htmlFor}-hint` : void 0;
729
1463
  const errorId = error ? `${htmlFor}-error` : void 0;
730
- return /* @__PURE__ */ jsxs7("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
731
- /* @__PURE__ */ jsxs7("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
1464
+ return /* @__PURE__ */ jsxs9("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
1465
+ /* @__PURE__ */ jsxs9("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
732
1466
  label,
733
- required && /* @__PURE__ */ jsxs7(Fragment6, { children: [
734
- /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
735
- /* @__PURE__ */ jsx21("span", { className: "sr-only", children: " (obligatorio)" })
1467
+ required && /* @__PURE__ */ jsxs9(Fragment6, { children: [
1468
+ /* @__PURE__ */ jsx22("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
1469
+ /* @__PURE__ */ jsx22("span", { className: "sr-only", children: " (obligatorio)" })
736
1470
  ] })
737
1471
  ] }),
738
1472
  children,
739
- hint && /* @__PURE__ */ jsx21("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
740
- error && /* @__PURE__ */ jsx21("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
1473
+ hint && /* @__PURE__ */ jsx22("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
1474
+ error && /* @__PURE__ */ jsx22("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
741
1475
  ] });
742
1476
  }
743
1477
 
744
1478
  // src/ui/icon-button/icon-button.tsx
745
- import { Link } from "react-aria-components";
1479
+ import { Link as Link2 } from "react-aria-components";
746
1480
 
747
1481
  // src/ui/tooltip/tooltip.tsx
1482
+ import * as React2 from "react";
748
1483
  import {
749
- Tooltip as AriaTooltip,
750
- TooltipTrigger as AriaTooltipTrigger
1484
+ Focusable,
1485
+ OverlayArrow,
1486
+ Tooltip as TooltipPrimitive,
1487
+ TooltipTrigger as TooltipTriggerPrimitive
751
1488
  } from "react-aria-components";
752
- import { jsx as jsx22 } from "react/jsx-runtime";
753
- var TooltipTrigger = AriaTooltipTrigger;
754
- function Tooltip({ className, ...props }) {
755
- return /* @__PURE__ */ jsx22(AriaTooltip, { "data-slot": "tooltip", offset: 6, className: cn("max-w-xs rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background shadow-md outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
1489
+ import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
1490
+ function TooltipTrigger({
1491
+ delay = 0,
1492
+ children,
1493
+ ...props
1494
+ }) {
1495
+ const [trigger, tooltip] = React2.Children.toArray(children);
1496
+ return /* @__PURE__ */ jsxs10(
1497
+ TooltipTriggerPrimitive,
1498
+ {
1499
+ "data-slot": "tooltip-trigger",
1500
+ delay,
1501
+ ...props,
1502
+ children: [
1503
+ /* @__PURE__ */ jsx23(Focusable, { children: trigger }),
1504
+ tooltip
1505
+ ]
1506
+ }
1507
+ );
1508
+ }
1509
+ function Tooltip({
1510
+ className,
1511
+ placement = "top",
1512
+ offset = 4,
1513
+ crossOffset = 0,
1514
+ children,
1515
+ ...props
1516
+ }) {
1517
+ return /* @__PURE__ */ jsxs10(
1518
+ TooltipPrimitive,
1519
+ {
1520
+ "data-slot": "tooltip-content",
1521
+ placement,
1522
+ offset,
1523
+ crossOffset,
1524
+ className: cn(
1525
+ "z-50 inline-flex w-fit max-w-xs origin-(--trigger-anchor-point) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm",
1526
+ className
1527
+ ),
1528
+ ...props,
1529
+ children: [
1530
+ children,
1531
+ /* @__PURE__ */ jsx23(
1532
+ OverlayArrow,
1533
+ {
1534
+ className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
1535
+ style: ({ placement: placement2, defaultStyle }) => ({
1536
+ ...defaultStyle,
1537
+ rotate: "0deg",
1538
+ translate: "0 0",
1539
+ transform: placement2 === "bottom" ? "translate(-50%, calc(50% + 2px)) rotate(45deg)" : placement2 === "top" ? "translate(-50%, calc(-50% - 2px)) rotate(45deg)" : placement2 === "left" ? "translate(calc(-50% - 2px), -50%) rotate(45deg)" : "translate(calc(50% + 2px), -50%) rotate(45deg)"
1540
+ })
1541
+ }
1542
+ )
1543
+ ]
1544
+ }
1545
+ );
756
1546
  }
757
- var TooltipContent = Tooltip;
758
1547
 
759
1548
  // src/ui/icon-button/icon-button.tsx
760
- import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
1549
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
761
1550
  function IconButton({
762
1551
  label,
763
1552
  children,
@@ -770,9 +1559,9 @@ function IconButton({
770
1559
  buttonVariants({ variant, size: "icon" }),
771
1560
  className
772
1561
  );
773
- return /* @__PURE__ */ jsxs8(TooltipTrigger, { children: [
774
- href ? /* @__PURE__ */ jsx23(
775
- Link,
1562
+ return /* @__PURE__ */ jsxs11(TooltipTrigger, { children: [
1563
+ href ? /* @__PURE__ */ jsx24(
1564
+ Link2,
776
1565
  {
777
1566
  "data-slot": "icon-button",
778
1567
  "aria-label": label,
@@ -780,8 +1569,8 @@ function IconButton({
780
1569
  className: linkClassName,
781
1570
  children
782
1571
  }
783
- ) : /* @__PURE__ */ jsx23(
784
- Button2,
1572
+ ) : /* @__PURE__ */ jsx24(
1573
+ Button,
785
1574
  {
786
1575
  "data-slot": "icon-button",
787
1576
  "aria-label": label,
@@ -792,125 +1581,359 @@ function IconButton({
792
1581
  children
793
1582
  }
794
1583
  ),
795
- /* @__PURE__ */ jsx23(Tooltip, { children: label })
1584
+ /* @__PURE__ */ jsx24(Tooltip, { children: label })
796
1585
  ] });
797
1586
  }
798
1587
 
799
- // src/ui/input-group/input-group.tsx
800
- import { cva as cva3 } from "class-variance-authority";
801
-
802
1588
  // src/ui/input/input.tsx
803
1589
  import { forwardRef as forwardRef2 } from "react";
804
1590
  import { Input as AriaInput2 } from "react-aria-components";
805
- import { jsx as jsx24 } from "react/jsx-runtime";
1591
+ import { jsx as jsx25 } from "react/jsx-runtime";
806
1592
  var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
807
- return /* @__PURE__ */ jsx24(AriaInput2, { 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 });
1593
+ return /* @__PURE__ */ jsx25(AriaInput2, { 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 });
808
1594
  });
809
1595
  var Input3 = InputImpl;
810
1596
 
1597
+ // src/ui/input-group/input-group.tsx
1598
+ import { cva as cva8 } from "class-variance-authority";
1599
+
811
1600
  // src/ui/textarea/textarea.tsx
812
1601
  import { forwardRef as forwardRef3 } from "react";
813
1602
  import { TextArea as AriaTextArea } from "react-aria-components";
814
- import { jsx as jsx25 } from "react/jsx-runtime";
1603
+ import { jsx as jsx26 } from "react/jsx-runtime";
815
1604
  var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
816
- return /* @__PURE__ */ jsx25(AriaTextArea, { 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 });
1605
+ return /* @__PURE__ */ jsx26(AriaTextArea, { 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 });
817
1606
  });
818
1607
  var Textarea2 = TextareaImpl;
819
1608
 
820
1609
  // src/ui/input-group/input-group.tsx
821
- import { jsx as jsx26 } from "react/jsx-runtime";
1610
+ import { jsx as jsx27 } from "react/jsx-runtime";
822
1611
  function InputGroup({ className, ...props }) {
823
- return /* @__PURE__ */ jsx26("div", { role: "group", "data-slot": "input-group", className: cn("group/input-group flex min-h-8 w-full min-w-0 items-center rounded-lg border border-border transition-colors 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", className), ...props });
1612
+ return (
1613
+ // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
1614
+ /* @__PURE__ */ jsx27(
1615
+ "div",
1616
+ {
1617
+ role: "group",
1618
+ "data-slot": "input-group",
1619
+ className: cn(
1620
+ "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",
1621
+ className
1622
+ ),
1623
+ ...props
1624
+ }
1625
+ )
1626
+ );
824
1627
  }
825
- var addonVariants = cva3("flex items-center justify-center gap-2 px-2 text-sm text-muted-foreground", { variants: { align: { "inline-start": "order-first", "inline-end": "order-last", "block-start": "w-full justify-start border-b py-2", "block-end": "w-full justify-start border-t py-2" } }, defaultVariants: { align: "inline-start" } });
826
- function InputGroupAddon({ className, align, ...props }) {
827
- return /* @__PURE__ */ jsx26("div", { "data-slot": "input-group-addon", "data-align": align, className: cn(addonVariants({ align }), className), ...props });
1628
+ var inputGroupAddonVariants = cva8(
1629
+ "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",
1630
+ {
1631
+ variants: {
1632
+ align: {
1633
+ "inline-start": "order-first pl-2",
1634
+ "inline-end": "order-last pr-2",
1635
+ "block-start": "order-first w-full justify-start px-2.5 pt-2",
1636
+ "block-end": "order-last w-full justify-start px-2.5 pb-2"
1637
+ }
1638
+ },
1639
+ defaultVariants: { align: "inline-start" }
1640
+ }
1641
+ );
1642
+ function InputGroupAddon({
1643
+ className,
1644
+ align = "inline-start",
1645
+ onClick,
1646
+ ...props
1647
+ }) {
1648
+ return (
1649
+ // biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
1650
+ /* @__PURE__ */ jsx27(
1651
+ "div",
1652
+ {
1653
+ role: "group",
1654
+ "data-slot": "input-group-addon",
1655
+ "data-align": align,
1656
+ className: cn(inputGroupAddonVariants({ align }), className),
1657
+ onClick: (event) => {
1658
+ onClick?.(event);
1659
+ if (!event.defaultPrevented && !event.target.closest("button"))
1660
+ event.currentTarget.parentElement?.querySelector("input, textarea")?.focus();
1661
+ },
1662
+ ...props
1663
+ }
1664
+ )
1665
+ );
828
1666
  }
829
- function InputGroupButton({ className, ...props }) {
830
- return /* @__PURE__ */ jsx26(Button2, { "data-slot": "input-group-button", size: "icon", variant: "ghost", className: cn("size-7 shrink-0", className), ...props });
1667
+ var inputGroupButtonVariants = cva8("shrink-0 shadow-none", {
1668
+ variants: {
1669
+ size: { xs: "h-6 px-1.5 text-xs", sm: "h-7 px-2", "icon-xs": "size-6", "icon-sm": "size-7" }
1670
+ },
1671
+ defaultVariants: { size: "xs" }
1672
+ });
1673
+ function InputGroupButton({
1674
+ className,
1675
+ type = "button",
1676
+ variant = "ghost",
1677
+ size = "xs",
1678
+ ...props
1679
+ }) {
1680
+ const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
1681
+ return /* @__PURE__ */ jsx27(
1682
+ Button,
1683
+ {
1684
+ "data-slot": "input-group-button",
1685
+ type,
1686
+ size: buttonSize,
1687
+ variant,
1688
+ className: cn(inputGroupButtonVariants({ size }), className),
1689
+ ...props
1690
+ }
1691
+ );
831
1692
  }
832
1693
  function InputGroupText({ className, ...props }) {
833
- return /* @__PURE__ */ jsx26("span", { "data-slot": "input-group-text", className: cn("px-2 text-sm text-muted-foreground", className), ...props });
1694
+ return /* @__PURE__ */ jsx27(
1695
+ "span",
1696
+ {
1697
+ "data-slot": "input-group-text",
1698
+ className: cn(
1699
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4",
1700
+ className
1701
+ ),
1702
+ ...props
1703
+ }
1704
+ );
834
1705
  }
835
1706
  function InputGroupInput({ className, ...props }) {
836
- return /* @__PURE__ */ jsx26(Input3, { "data-slot": "input-group-control", className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0", className), ...props });
1707
+ return /* @__PURE__ */ jsx27(
1708
+ Input3,
1709
+ {
1710
+ "data-slot": "input-group-control",
1711
+ className: cn(
1712
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0",
1713
+ className
1714
+ ),
1715
+ ...props
1716
+ }
1717
+ );
837
1718
  }
838
1719
  function InputGroupTextarea({ className, ...props }) {
839
- return /* @__PURE__ */ jsx26(Textarea2, { "data-slot": "input-group-control", className: cn("flex-1 resize-none rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0", className), ...props });
1720
+ return /* @__PURE__ */ jsx27(
1721
+ Textarea2,
1722
+ {
1723
+ "data-slot": "input-group-control",
1724
+ className: cn(
1725
+ "flex-1 resize-none rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0",
1726
+ className
1727
+ ),
1728
+ ...props
1729
+ }
1730
+ );
840
1731
  }
841
1732
 
842
1733
  // src/ui/kbd/kbd.tsx
843
- import { jsx as jsx27 } from "react/jsx-runtime";
1734
+ import { jsx as jsx28 } from "react/jsx-runtime";
844
1735
  function Kbd({ className, ...props }) {
845
- return /* @__PURE__ */ jsx27("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 });
1736
+ return /* @__PURE__ */ jsx28("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 });
846
1737
  }
847
1738
  function KbdGroup({ className, ...props }) {
848
- return /* @__PURE__ */ jsx27("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
1739
+ return /* @__PURE__ */ jsx28("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
849
1740
  }
850
1741
 
851
1742
  // src/ui/loading-overlay/loading-overlay.tsx
852
1743
  import { LoaderCircle as LoaderCircle2 } from "lucide-react";
853
- import { jsx as jsx28, jsxs as jsxs9 } from "react/jsx-runtime";
1744
+ import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
854
1745
  function LoadingOverlay({ label = "Cargando", className, ...props }) {
855
- return /* @__PURE__ */ jsx28("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__ */ jsxs9("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
856
- /* @__PURE__ */ jsx28(LoaderCircle2, { className: "animate-spin", "aria-hidden": "true" }),
857
- /* @__PURE__ */ jsx28("span", { children: label })
1746
+ return /* @__PURE__ */ jsx29("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__ */ jsxs12("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
1747
+ /* @__PURE__ */ jsx29(LoaderCircle2, { className: "animate-spin", "aria-hidden": "true" }),
1748
+ /* @__PURE__ */ jsx29("span", { children: label })
858
1749
  ] }) });
859
1750
  }
860
1751
 
861
1752
  // src/ui/menu/menu.tsx
862
1753
  import {
863
- Menu as AriaMenu2,
864
- MenuItem as AriaMenuItem2,
865
- MenuTrigger as AriaMenuTrigger2,
1754
+ Menu as AriaMenu,
1755
+ MenuItem as AriaMenuItem,
1756
+ MenuTrigger as AriaMenuTrigger,
866
1757
  Popover as Popover3
867
1758
  } from "react-aria-components";
868
- import { jsx as jsx29 } from "react/jsx-runtime";
869
- var MenuTrigger = AriaMenuTrigger2;
1759
+ import { jsx as jsx30 } from "react/jsx-runtime";
1760
+ var MenuTrigger = AriaMenuTrigger;
870
1761
  function MenuContent({ className, ...props }) {
871
- return /* @__PURE__ */ jsx29(Popover3, { "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 });
1762
+ return /* @__PURE__ */ jsx30(Popover3, { "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 });
872
1763
  }
873
1764
  function Menu({ className, ...props }) {
874
- return /* @__PURE__ */ jsx29(AriaMenu2, { "data-slot": "menu", className: cn("outline-none", className), ...props });
1765
+ return /* @__PURE__ */ jsx30(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
875
1766
  }
876
1767
  function MenuItem({ className, children, ...props }) {
877
- return /* @__PURE__ */ jsx29(AriaMenuItem2, { "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 });
1768
+ return /* @__PURE__ */ jsx30(AriaMenuItem, { "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 });
878
1769
  }
879
1770
 
1771
+ // src/ui/otp-input/otp-input.tsx
1772
+ import {
1773
+ forwardRef as forwardRef4,
1774
+ useImperativeHandle,
1775
+ useRef as useRef4,
1776
+ useState as useState7
1777
+ } from "react";
1778
+ import { Input as AriaInput3 } from "react-aria-components";
1779
+ import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
1780
+ function normalizeOtp(value, length) {
1781
+ return value.replace(/[^0-9]/g, "").slice(0, length);
1782
+ }
1783
+ var OtpInputImpl = forwardRef4(function OtpInput({
1784
+ length = 6,
1785
+ value,
1786
+ defaultValue = "",
1787
+ onChange,
1788
+ onComplete,
1789
+ className,
1790
+ inputClassName,
1791
+ disabled,
1792
+ onBlur,
1793
+ onFocus,
1794
+ onKeyUp,
1795
+ onSelect,
1796
+ ...props
1797
+ }, forwardedRef) {
1798
+ const slotCount = Math.max(1, Math.floor(length));
1799
+ const controlled = value !== void 0;
1800
+ const [internalValue, setInternalValue] = useState7(() => normalizeOtp(defaultValue, slotCount));
1801
+ const code = normalizeOtp(controlled ? value : internalValue, slotCount);
1802
+ const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
1803
+ const inputRef = useRef4(null);
1804
+ const [focused, setFocused] = useState7(false);
1805
+ const [selectionStart, setSelectionStart] = useState7(0);
1806
+ const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
1807
+ const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
1808
+ useImperativeHandle(forwardedRef, () => inputRef.current);
1809
+ function updateSelection(input) {
1810
+ setSelectionStart(input.selectionStart ?? code.length);
1811
+ }
1812
+ function commitValue(rawValue) {
1813
+ const nextValue = normalizeOtp(rawValue, slotCount);
1814
+ if (!controlled) setInternalValue(nextValue);
1815
+ if (nextValue === code) return;
1816
+ onChange?.(nextValue);
1817
+ if (nextValue.length === slotCount) onComplete?.(nextValue);
1818
+ }
1819
+ function handlePointerDown(event) {
1820
+ if (disabled) return;
1821
+ event.preventDefault();
1822
+ const input = inputRef.current;
1823
+ if (!input) return;
1824
+ const bounds = event.currentTarget.getBoundingClientRect();
1825
+ const offset = bounds.width > 0 ? (event.clientX - bounds.left) / bounds.width : 1;
1826
+ const position = Math.min(Math.max(Math.floor(offset * slotCount), 0), code.length);
1827
+ input.focus();
1828
+ input.setSelectionRange(position, position);
1829
+ setSelectionStart(position);
1830
+ }
1831
+ return /* @__PURE__ */ jsxs13(
1832
+ "div",
1833
+ {
1834
+ "data-slot": "otp-input",
1835
+ "data-disabled": disabled || void 0,
1836
+ "data-invalid": invalid || void 0,
1837
+ className: cn("relative inline-grid max-w-full gap-2", className),
1838
+ style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
1839
+ onPointerDown: handlePointerDown,
1840
+ children: [
1841
+ /* @__PURE__ */ jsx31(
1842
+ AriaInput3,
1843
+ {
1844
+ ...props,
1845
+ ref: inputRef,
1846
+ type: "text",
1847
+ inputMode: props.inputMode ?? "numeric",
1848
+ autoComplete: props.autoComplete ?? "one-time-code",
1849
+ pattern: props.pattern ?? "[0-9]*",
1850
+ maxLength: slotCount,
1851
+ value: code,
1852
+ disabled,
1853
+ "data-slot": "otp-input-control",
1854
+ className: cn(
1855
+ "absolute inset-0 z-10 size-full cursor-text appearance-none rounded-lg border-0 bg-transparent text-base text-transparent caret-transparent outline-none selection:bg-transparent disabled:cursor-not-allowed",
1856
+ inputClassName
1857
+ ),
1858
+ onChange: (event) => {
1859
+ commitValue(event.currentTarget.value);
1860
+ updateSelection(event.currentTarget);
1861
+ },
1862
+ onFocus: (event) => {
1863
+ setFocused(true);
1864
+ updateSelection(event.currentTarget);
1865
+ onFocus?.(event);
1866
+ },
1867
+ onBlur: (event) => {
1868
+ setFocused(false);
1869
+ onBlur?.(event);
1870
+ },
1871
+ onSelect: (event) => {
1872
+ updateSelection(event.currentTarget);
1873
+ onSelect?.(event);
1874
+ },
1875
+ onKeyUp: (event) => {
1876
+ updateSelection(event.currentTarget);
1877
+ onKeyUp?.(event);
1878
+ }
1879
+ }
1880
+ ),
1881
+ slots.map((slot, index) => /* @__PURE__ */ jsx31(
1882
+ "span",
1883
+ {
1884
+ "aria-hidden": "true",
1885
+ "data-slot": "otp-input-slot",
1886
+ "data-active": focused && index === activeIndex || void 0,
1887
+ className: cn(
1888
+ "pointer-events-none grid size-10 place-items-center rounded-lg border border-border bg-background text-base font-medium tabular-nums text-foreground transition-[border-color,box-shadow]",
1889
+ focused && index === activeIndex && "border-ring ring-3 ring-ring/50",
1890
+ invalid && "border-destructive",
1891
+ disabled && "opacity-50"
1892
+ ),
1893
+ children: code[index] ?? ""
1894
+ },
1895
+ slot
1896
+ ))
1897
+ ]
1898
+ }
1899
+ );
1900
+ });
1901
+ var OtpInput2 = OtpInputImpl;
1902
+
880
1903
  // src/ui/page-header/page-header.tsx
881
- import { jsx as jsx30 } from "react/jsx-runtime";
1904
+ import { jsx as jsx32 } from "react/jsx-runtime";
882
1905
  function PageHeader({ className, ...props }) {
883
- return /* @__PURE__ */ jsx30("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 });
1906
+ return /* @__PURE__ */ jsx32("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 });
884
1907
  }
885
1908
  function PageHeaderHeading({ className, ...props }) {
886
- return /* @__PURE__ */ jsx30("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
1909
+ return /* @__PURE__ */ jsx32("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
887
1910
  }
888
1911
  function PageHeaderTitle({ className, ...props }) {
889
- return /* @__PURE__ */ jsx30("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
1912
+ return /* @__PURE__ */ jsx32("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
890
1913
  }
891
1914
  function PageHeaderDescription({ className, ...props }) {
892
- return /* @__PURE__ */ jsx30("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
1915
+ return /* @__PURE__ */ jsx32("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
893
1916
  }
894
1917
  function PageHeaderActions({ className, ...props }) {
895
- return /* @__PURE__ */ jsx30("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
1918
+ return /* @__PURE__ */ jsx32("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
896
1919
  }
897
1920
 
898
1921
  // src/ui/pagination/pagination.tsx
899
1922
  import { ChevronLeft, ChevronRight } from "lucide-react";
900
- import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
1923
+ import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
901
1924
  function Pagination({ page, pageCount, onPageChange, className }) {
902
1925
  const pages = Array.from({ length: pageCount }, (_, index) => index + 1);
903
- return /* @__PURE__ */ jsxs10("nav", { "aria-label": "Paginaci\xF3n", className: cn("flex items-center justify-between gap-4", className), children: [
904
- /* @__PURE__ */ jsxs10("p", { className: "text-sm text-muted-foreground", children: [
1926
+ return /* @__PURE__ */ jsxs14("nav", { "aria-label": "Paginaci\xF3n", className: cn("flex items-center justify-between gap-4", className), children: [
1927
+ /* @__PURE__ */ jsxs14("p", { className: "text-sm text-muted-foreground", children: [
905
1928
  "P\xE1gina ",
906
1929
  page,
907
1930
  " de ",
908
1931
  pageCount
909
1932
  ] }),
910
- /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
911
- /* @__PURE__ */ jsx31(Button2, { "aria-label": "P\xE1gina anterior", isDisabled: page <= 1, onPress: () => onPageChange(page - 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx31(ChevronLeft, {}) }),
912
- pages.map((item) => /* @__PURE__ */ jsx31(Button2, { "aria-current": item === page ? "page" : void 0, "aria-label": `P\xE1gina ${item}`, onPress: () => onPageChange(item), size: "icon", variant: item === page ? "secondary" : "ghost", children: item }, item)),
913
- /* @__PURE__ */ jsx31(Button2, { "aria-label": "P\xE1gina siguiente", isDisabled: page >= pageCount, onPress: () => onPageChange(page + 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx31(ChevronRight, {}) })
1933
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1", children: [
1934
+ /* @__PURE__ */ jsx33(Button, { "aria-label": "P\xE1gina anterior", isDisabled: page <= 1, onPress: () => onPageChange(page - 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx33(ChevronLeft, {}) }),
1935
+ pages.map((item) => /* @__PURE__ */ jsx33(Button, { "aria-current": item === page ? "page" : void 0, "aria-label": `P\xE1gina ${item}`, onPress: () => onPageChange(item), size: "icon", variant: item === page ? "secondary" : "ghost", children: item }, item)),
1936
+ /* @__PURE__ */ jsx33(Button, { "aria-label": "P\xE1gina siguiente", isDisabled: page >= pageCount, onPress: () => onPageChange(page + 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx33(ChevronRight, {}) })
914
1937
  ] })
915
1938
  ] });
916
1939
  }
@@ -918,24 +1941,24 @@ function Pagination({ page, pageCount, onPageChange, className }) {
918
1941
  // src/ui/popover/popover.tsx
919
1942
  import {
920
1943
  DialogTrigger as AriaDialogTrigger,
921
- Popover as AriaPopover2
1944
+ Popover as AriaPopover
922
1945
  } from "react-aria-components";
923
- import { jsx as jsx32 } from "react/jsx-runtime";
1946
+ import { jsx as jsx34 } from "react/jsx-runtime";
924
1947
  var PopoverTrigger = AriaDialogTrigger;
925
1948
  function Popover4({ className, ...props }) {
926
- return /* @__PURE__ */ jsx32(AriaPopover2, { "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 });
1949
+ return /* @__PURE__ */ jsx34(AriaPopover, { "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 });
927
1950
  }
928
1951
  var PopoverContent = Popover4;
929
1952
 
930
1953
  // src/ui/quantity-input/quantity-input.tsx
931
1954
  import { Minus, Plus } from "lucide-react";
932
1955
  import {
933
- Button as AriaButton2,
1956
+ Button as AriaButton,
934
1957
  Group as AriaGroup,
935
- Input as AriaInput3,
1958
+ Input as AriaInput4,
936
1959
  NumberField as AriaNumberField
937
1960
  } from "react-aria-components";
938
- import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
1961
+ import { jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
939
1962
  function QuantityInput({
940
1963
  className,
941
1964
  inputClassName,
@@ -945,7 +1968,7 @@ function QuantityInput({
945
1968
  step = 1,
946
1969
  ...props
947
1970
  }) {
948
- return /* @__PURE__ */ jsx33(
1971
+ return /* @__PURE__ */ jsx35(
949
1972
  AriaNumberField,
950
1973
  {
951
1974
  ...props,
@@ -953,15 +1976,15 @@ function QuantityInput({
953
1976
  step,
954
1977
  "data-slot": "quantity-input",
955
1978
  className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
956
- children: /* @__PURE__ */ jsxs11(
1979
+ children: /* @__PURE__ */ jsxs15(
957
1980
  AriaGroup,
958
1981
  {
959
1982
  "data-slot": "quantity-input-group",
960
1983
  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",
961
1984
  children: [
962
- /* @__PURE__ */ jsx33(AriaButton2, { 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__ */ jsx33(Minus, { "aria-hidden": "true", className: "size-4" }) }),
963
- /* @__PURE__ */ jsx33(AriaInput3, { "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) }),
964
- /* @__PURE__ */ jsx33(AriaButton2, { 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__ */ jsx33(Plus, { "aria-hidden": "true", className: "size-4" }) })
1985
+ /* @__PURE__ */ jsx35(AriaButton, { 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__ */ jsx35(Minus, { "aria-hidden": "true", className: "size-4" }) }),
1986
+ /* @__PURE__ */ jsx35(AriaInput4, { "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) }),
1987
+ /* @__PURE__ */ jsx35(AriaButton, { 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__ */ jsx35(Plus, { "aria-hidden": "true", className: "size-4" }) })
965
1988
  ]
966
1989
  }
967
1990
  )
@@ -972,55 +1995,182 @@ function QuantityInput({
972
1995
  // src/ui/search-field/search-field.tsx
973
1996
  import {
974
1997
  SearchField as AriaSearchField,
975
- Button as Button3,
1998
+ Button as Button2,
976
1999
  Input as Input4
977
2000
  } from "react-aria-components";
978
2001
  import { X as X2 } from "lucide-react";
979
- import { jsx as jsx34 } from "react/jsx-runtime";
2002
+ import { jsx as jsx36 } from "react/jsx-runtime";
980
2003
  var SearchField = AriaSearchField;
981
2004
  function SearchInput({ className, ...props }) {
982
- return /* @__PURE__ */ jsx34(Input4, { "data-slot": "search-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", className), ...props });
2005
+ return /* @__PURE__ */ jsx36(Input4, { "data-slot": "search-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", className), ...props });
983
2006
  }
984
- function SearchClearButton({ className, children = /* @__PURE__ */ jsx34(X2, { "aria-hidden": "true", className: "size-4" }), ...props }) {
985
- return /* @__PURE__ */ jsx34(Button3, { slot: "clear", "data-slot": "search-clear", className: cn("absolute top-1/2 right-1 rounded p-1 text-muted-foreground outline-none hover:bg-muted data-focus-visible:ring-2 data-focus-visible:ring-ring", className), ...props, children });
2007
+ function SearchClearButton({ className, children = /* @__PURE__ */ jsx36(X2, { "aria-hidden": "true", className: "size-4" }), ...props }) {
2008
+ return /* @__PURE__ */ jsx36(Button2, { slot: "clear", "data-slot": "search-clear", className: cn("absolute top-1/2 right-1 rounded p-1 text-muted-foreground outline-none hover:bg-muted data-focus-visible:ring-2 data-focus-visible:ring-ring", className), ...props, children });
986
2009
  }
987
2010
 
988
2011
  // src/ui/select/select.tsx
989
2012
  import {
990
- Button as AriaButton3,
2013
+ Button as AriaButton2,
991
2014
  Select as AriaSelect,
992
2015
  SelectValue as AriaSelectValue,
993
2016
  ListBox as ListBox3,
994
2017
  ListBoxItem as ListBoxItem3,
995
2018
  Popover as Popover5
996
2019
  } from "react-aria-components";
997
- import { ChevronDown as ChevronDown2 } from "lucide-react";
998
- import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
2020
+ import { ChevronDown } from "lucide-react";
2021
+ import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
999
2022
  var Select = AriaSelect;
1000
2023
  function SelectTrigger({ className, children, ...props }) {
1001
- return /* @__PURE__ */ jsx35(AriaButton3, { "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__ */ jsxs12(Fragment7, { children: [
2024
+ return /* @__PURE__ */ jsx37(AriaButton2, { "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__ */ jsxs16(Fragment7, { children: [
1002
2025
  typeof children === "function" ? children(state) : children,
1003
- /* @__PURE__ */ jsx35(ChevronDown2, { "aria-hidden": "true", className: "ml-auto size-4 text-muted-foreground transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none" })
2026
+ /* @__PURE__ */ jsx37(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" })
1004
2027
  ] }) });
1005
2028
  }
1006
2029
  function SelectValue({ className, ...props }) {
1007
- return /* @__PURE__ */ jsx35(AriaSelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
2030
+ return /* @__PURE__ */ jsx37(AriaSelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
1008
2031
  }
1009
2032
  function SelectContent({ className, ...props }) {
1010
- return /* @__PURE__ */ jsx35(Popover5, { "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 });
2033
+ return /* @__PURE__ */ jsx37(Popover5, { "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 });
1011
2034
  }
1012
2035
  function SelectList({ className, ...props }) {
1013
- return /* @__PURE__ */ jsx35(ListBox3, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
2036
+ return /* @__PURE__ */ jsx37(ListBox3, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
1014
2037
  }
1015
2038
  function SelectItem({ className, children, ...props }) {
1016
- return /* @__PURE__ */ jsx35(ListBoxItem3, { "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 });
2039
+ return /* @__PURE__ */ jsx37(ListBoxItem3, { "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 });
1017
2040
  }
1018
2041
 
1019
- // src/ui/separator/separator.tsx
1020
- import { Separator as AriaSeparator2 } from "react-aria-components";
1021
- import { jsx as jsx36 } from "react/jsx-runtime";
1022
- function Separator({ className, orientation = "horizontal", ...props }) {
1023
- return /* @__PURE__ */ jsx36(AriaSeparator2, { "data-slot": "separator", orientation, className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className), ...props });
2042
+ // src/ui/sheet/sheet.tsx
2043
+ import { XIcon } from "lucide-react";
2044
+ import {
2045
+ Heading as Heading2,
2046
+ ModalOverlay as ModalOverlayPrimitive,
2047
+ Modal as ModalPrimitive,
2048
+ Dialog as SheetPrimitive,
2049
+ DialogTrigger as SheetTriggerPrimitive,
2050
+ Text as Text3
2051
+ } from "react-aria-components";
2052
+ import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
2053
+ function SheetTrigger({ ...props }) {
2054
+ return /* @__PURE__ */ jsx38(SheetTriggerPrimitive, { "data-slot": "sheet-trigger", ...props });
2055
+ }
2056
+ function SheetClose({ className, variant = "outline", size = "default", ...props }) {
2057
+ return /* @__PURE__ */ jsx38(
2058
+ Button,
2059
+ {
2060
+ slot: "close",
2061
+ "data-slot": "sheet-close",
2062
+ variant,
2063
+ size,
2064
+ className: cn(className),
2065
+ ...props
2066
+ }
2067
+ );
2068
+ }
2069
+ function SheetOverlay({
2070
+ className,
2071
+ children,
2072
+ ...props
2073
+ }) {
2074
+ return /* @__PURE__ */ jsx38(
2075
+ ModalOverlayPrimitive,
2076
+ {
2077
+ "data-slot": "sheet-overlay",
2078
+ isDismissable: true,
2079
+ className: cn(
2080
+ "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-entering:opacity-0 data-exiting:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
2081
+ className
2082
+ ),
2083
+ ...props,
2084
+ children
2085
+ }
2086
+ );
2087
+ }
2088
+ function Sheet({
2089
+ className,
2090
+ children,
2091
+ side = "right",
2092
+ showCloseButton = true,
2093
+ ...props
2094
+ }) {
2095
+ return /* @__PURE__ */ jsx38(SheetOverlay, { ...props, children: /* @__PURE__ */ jsx38(
2096
+ ModalPrimitive,
2097
+ {
2098
+ "data-slot": "sheet-content",
2099
+ "data-side": side,
2100
+ className: cn(
2101
+ "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",
2102
+ className
2103
+ ),
2104
+ children: /* @__PURE__ */ jsxs17(
2105
+ SheetPrimitive,
2106
+ {
2107
+ "data-slot": "sheet",
2108
+ className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
2109
+ children: [
2110
+ children,
2111
+ showCloseButton && /* @__PURE__ */ jsxs17(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
2112
+ /* @__PURE__ */ jsx38(XIcon, {}),
2113
+ /* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Cerrar" })
2114
+ ] })
2115
+ ]
2116
+ }
2117
+ )
2118
+ }
2119
+ ) });
2120
+ }
2121
+ function SheetContent({
2122
+ className,
2123
+ children,
2124
+ side = "right",
2125
+ showCloseButton = true,
2126
+ ...props
2127
+ }) {
2128
+ return /* @__PURE__ */ jsx38(Sheet, { className, side, showCloseButton, ...props, children });
2129
+ }
2130
+ function SheetHeader({ className, ...props }) {
2131
+ return /* @__PURE__ */ jsx38(
2132
+ "div",
2133
+ {
2134
+ "data-slot": "sheet-header",
2135
+ className: cn("flex flex-col gap-0.5 p-4", className),
2136
+ ...props
2137
+ }
2138
+ );
2139
+ }
2140
+ function SheetFooter({ className, ...props }) {
2141
+ return /* @__PURE__ */ jsx38(
2142
+ "div",
2143
+ {
2144
+ "data-slot": "sheet-footer",
2145
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2146
+ ...props
2147
+ }
2148
+ );
2149
+ }
2150
+ function SheetTitle({ className, ...props }) {
2151
+ return /* @__PURE__ */ jsx38(
2152
+ Heading2,
2153
+ {
2154
+ slot: "title",
2155
+ "data-slot": "sheet-title",
2156
+ className: cn("text-base font-medium text-foreground", className),
2157
+ ...props
2158
+ }
2159
+ );
2160
+ }
2161
+ function SheetDescription({
2162
+ className,
2163
+ ...props
2164
+ }) {
2165
+ return /* @__PURE__ */ jsx38(
2166
+ Text3,
2167
+ {
2168
+ slot: "description",
2169
+ "data-slot": "sheet-description",
2170
+ className: cn("text-sm text-muted-foreground", className),
2171
+ ...props
2172
+ }
2173
+ );
1024
2174
  }
1025
2175
 
1026
2176
  // src/ui/sidebar/sidebar.tsx
@@ -1034,10 +2184,10 @@ import {
1034
2184
  createContext as createContext2,
1035
2185
  useContext as useContext2,
1036
2186
  useMemo as useMemo2,
1037
- useState as useState7
2187
+ useState as useState8
1038
2188
  } from "react";
1039
- import { Link as Link2 } from "react-aria-components";
1040
- import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs13 } from "react/jsx-runtime";
2189
+ import { Link as Link3 } from "react-aria-components";
2190
+ import { Fragment as Fragment8, jsx as jsx39, jsxs as jsxs18 } from "react/jsx-runtime";
1041
2191
  var SidebarContext = createContext2(null);
1042
2192
  function useSidebar() {
1043
2193
  const context = useContext2(SidebarContext);
@@ -1049,7 +2199,7 @@ function SidebarProvider({
1049
2199
  defaultCollapsed = false,
1050
2200
  children
1051
2201
  }) {
1052
- const [collapsed, setCollapsed] = useState7(defaultCollapsed);
2202
+ const [collapsed, setCollapsed] = useState8(defaultCollapsed);
1053
2203
  const value = useMemo2(
1054
2204
  () => ({
1055
2205
  collapsed,
@@ -1058,14 +2208,14 @@ function SidebarProvider({
1058
2208
  }),
1059
2209
  [collapsed]
1060
2210
  );
1061
- return /* @__PURE__ */ jsx37(SidebarContext.Provider, { value, children });
2211
+ return /* @__PURE__ */ jsx39(SidebarContext.Provider, { value, children });
1062
2212
  }
1063
2213
  function Sidebar({
1064
2214
  className,
1065
2215
  ...props
1066
2216
  }) {
1067
2217
  const { collapsed } = useSidebar();
1068
- return /* @__PURE__ */ jsx37(
2218
+ return /* @__PURE__ */ jsx39(
1069
2219
  "aside",
1070
2220
  {
1071
2221
  "data-slot": "sidebar",
@@ -1082,7 +2232,7 @@ function SidebarHeader({
1082
2232
  className,
1083
2233
  ...props
1084
2234
  }) {
1085
- return /* @__PURE__ */ jsx37(
2235
+ return /* @__PURE__ */ jsx39(
1086
2236
  "div",
1087
2237
  {
1088
2238
  "data-slot": "sidebar-header",
@@ -1097,7 +2247,7 @@ function SidebarSearch({
1097
2247
  className,
1098
2248
  ...props
1099
2249
  }) {
1100
- return /* @__PURE__ */ jsxs13(
2250
+ return /* @__PURE__ */ jsxs18(
1101
2251
  "button",
1102
2252
  {
1103
2253
  type: "button",
@@ -1108,9 +2258,9 @@ function SidebarSearch({
1108
2258
  ),
1109
2259
  ...props,
1110
2260
  children: [
1111
- /* @__PURE__ */ jsx37(Search, { className: "size-4 shrink-0" }),
1112
- /* @__PURE__ */ jsx37("span", { className: "flex-1 text-left", children: label }),
1113
- /* @__PURE__ */ jsx37("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
2261
+ /* @__PURE__ */ jsx39(Search, { className: "size-4 shrink-0" }),
2262
+ /* @__PURE__ */ jsx39("span", { className: "flex-1 text-left", children: label }),
2263
+ /* @__PURE__ */ jsx39("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
1114
2264
  ]
1115
2265
  }
1116
2266
  );
@@ -1119,7 +2269,7 @@ function SidebarContent({
1119
2269
  className,
1120
2270
  ...props
1121
2271
  }) {
1122
- return /* @__PURE__ */ jsx37(
2272
+ return /* @__PURE__ */ jsx39(
1123
2273
  "nav",
1124
2274
  {
1125
2275
  "data-slot": "sidebar-content",
@@ -1133,7 +2283,7 @@ function SidebarFooter({
1133
2283
  className,
1134
2284
  ...props
1135
2285
  }) {
1136
- return /* @__PURE__ */ jsx37(
2286
+ return /* @__PURE__ */ jsx39(
1137
2287
  "div",
1138
2288
  {
1139
2289
  "data-slot": "sidebar-footer",
@@ -1152,14 +2302,14 @@ function SidebarGroup({
1152
2302
  ...props
1153
2303
  }) {
1154
2304
  const { collapsed } = useSidebar();
1155
- return /* @__PURE__ */ jsxs13(
2305
+ return /* @__PURE__ */ jsxs18(
1156
2306
  "section",
1157
2307
  {
1158
2308
  "data-slot": "sidebar-group",
1159
2309
  className: cn("mb-4 last:mb-0", className),
1160
2310
  ...props,
1161
2311
  children: [
1162
- label && /* @__PURE__ */ jsx37(
2312
+ label && /* @__PURE__ */ jsx39(
1163
2313
  "h2",
1164
2314
  {
1165
2315
  className: cn(
@@ -1185,8 +2335,8 @@ function SidebarItem({
1185
2335
  }) {
1186
2336
  const { collapsed } = useSidebar();
1187
2337
  const content = typeof children === "function" ? label : children ?? label;
1188
- return /* @__PURE__ */ jsx37(
1189
- Link2,
2338
+ return /* @__PURE__ */ jsx39(
2339
+ Link3,
1190
2340
  {
1191
2341
  "data-slot": "sidebar-item",
1192
2342
  "aria-current": active ? "page" : void 0,
@@ -1197,16 +2347,16 @@ function SidebarItem({
1197
2347
  typeof className === "function" ? className : className
1198
2348
  ),
1199
2349
  ...props,
1200
- children: (values) => /* @__PURE__ */ jsxs13(Fragment8, { children: [
1201
- /* @__PURE__ */ jsx37("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
1202
- /* @__PURE__ */ jsx37(
2350
+ children: (values) => /* @__PURE__ */ jsxs18(Fragment8, { children: [
2351
+ /* @__PURE__ */ jsx39("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
2352
+ /* @__PURE__ */ jsx39(
1203
2353
  "span",
1204
2354
  {
1205
2355
  className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
1206
2356
  children: typeof children === "function" ? children(values) : content
1207
2357
  }
1208
2358
  ),
1209
- badge && !collapsed && /* @__PURE__ */ jsx37("span", { className: "text-xs text-muted-foreground", children: badge })
2359
+ badge && !collapsed && /* @__PURE__ */ jsx39("span", { className: "text-xs text-muted-foreground", children: badge })
1210
2360
  ] })
1211
2361
  }
1212
2362
  );
@@ -1215,7 +2365,7 @@ function SidebarSeparator({
1215
2365
  className,
1216
2366
  ...props
1217
2367
  }) {
1218
- return /* @__PURE__ */ jsx37(
2368
+ return /* @__PURE__ */ jsx39(
1219
2369
  "hr",
1220
2370
  {
1221
2371
  "data-slot": "sidebar-separator",
@@ -1226,8 +2376,8 @@ function SidebarSeparator({
1226
2376
  }
1227
2377
  function SidebarTrigger({ className, ...props }) {
1228
2378
  const { collapsed, toggle } = useSidebar();
1229
- return /* @__PURE__ */ jsx37(
1230
- Button2,
2379
+ return /* @__PURE__ */ jsx39(
2380
+ Button,
1231
2381
  {
1232
2382
  "aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
1233
2383
  onPress: toggle,
@@ -1235,7 +2385,7 @@ function SidebarTrigger({ className, ...props }) {
1235
2385
  variant: "ghost",
1236
2386
  className: cn("ml-auto", className),
1237
2387
  ...props,
1238
- children: collapsed ? /* @__PURE__ */ jsx37(ChevronRight2, {}) : /* @__PURE__ */ jsx37(ChevronLeft2, {})
2388
+ children: collapsed ? /* @__PURE__ */ jsx39(ChevronRight2, {}) : /* @__PURE__ */ jsx39(ChevronLeft2, {})
1239
2389
  }
1240
2390
  );
1241
2391
  }
@@ -1244,7 +2394,7 @@ function SidebarRail({
1244
2394
  ...props
1245
2395
  }) {
1246
2396
  const { toggle } = useSidebar();
1247
- return /* @__PURE__ */ jsx37(
2397
+ return /* @__PURE__ */ jsx39(
1248
2398
  "button",
1249
2399
  {
1250
2400
  type: "button",
@@ -1259,34 +2409,34 @@ function SidebarRail({
1259
2409
  );
1260
2410
  }
1261
2411
  function SidebarMore({ className, ...props }) {
1262
- return /* @__PURE__ */ jsx37(
1263
- Button2,
2412
+ return /* @__PURE__ */ jsx39(
2413
+ Button,
1264
2414
  {
1265
2415
  "aria-label": "M\xE1s opciones",
1266
2416
  size: "icon",
1267
2417
  variant: "ghost",
1268
2418
  className: cn("size-7", className),
1269
2419
  ...props,
1270
- children: /* @__PURE__ */ jsx37(Ellipsis, {})
2420
+ children: /* @__PURE__ */ jsx39(Ellipsis, {})
1271
2421
  }
1272
2422
  );
1273
2423
  }
1274
2424
 
1275
2425
  // src/ui/skeleton/skeleton.tsx
1276
- import { jsx as jsx38 } from "react/jsx-runtime";
2426
+ import { jsx as jsx40 } from "react/jsx-runtime";
1277
2427
  function Skeleton({ className, ...props }) {
1278
- return /* @__PURE__ */ jsx38("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
2428
+ return /* @__PURE__ */ jsx40("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
1279
2429
  }
1280
2430
 
1281
2431
  // src/ui/submit-button/submit-button.tsx
1282
2432
  import { useFormStatus } from "react-dom";
1283
2433
  import { LoaderCircle as LoaderCircle3 } from "lucide-react";
1284
- import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs14 } from "react/jsx-runtime";
2434
+ import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
1285
2435
  function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
1286
2436
  const { pending } = useFormStatus();
1287
2437
  const busy = pending || loading;
1288
- return /* @__PURE__ */ jsx39(Button2, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ jsxs14(Fragment9, { children: [
1289
- /* @__PURE__ */ jsx39(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2438
+ return /* @__PURE__ */ jsx41(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
2439
+ /* @__PURE__ */ jsx41(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
1290
2440
  pendingLabel
1291
2441
  ] }) : children });
1292
2442
  }
@@ -1296,14 +2446,14 @@ import {
1296
2446
  SwitchButton as AriaSwitchButton,
1297
2447
  SwitchField as AriaSwitchField
1298
2448
  } from "react-aria-components";
1299
- import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs15 } from "react/jsx-runtime";
2449
+ import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
1300
2450
  var sizeStyles = {
1301
2451
  sm: { track: "h-5 w-9 p-0.5", thumb: "size-4", travel: "group-data-selected/switch:translate-x-4" },
1302
2452
  md: { track: "h-6 w-11 p-0.5", thumb: "size-5", travel: "group-data-selected/switch:translate-x-5" }
1303
2453
  };
1304
2454
  function Switch({ className, children, size = "sm", ...props }) {
1305
2455
  const styles = sizeStyles[size];
1306
- return /* @__PURE__ */ jsx40(AriaSwitchField, { ...props, children: /* @__PURE__ */ jsx40(
2456
+ return /* @__PURE__ */ jsx42(AriaSwitchField, { ...props, children: /* @__PURE__ */ jsx42(
1307
2457
  AriaSwitchButton,
1308
2458
  {
1309
2459
  "data-slot": "switch",
@@ -1313,8 +2463,8 @@ function Switch({ className, children, size = "sm", ...props }) {
1313
2463
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1314
2464
  typeof className === "function" ? className(state) : className
1315
2465
  ),
1316
- children: (state) => /* @__PURE__ */ jsxs15(Fragment10, { children: [
1317
- /* @__PURE__ */ jsx40(
2466
+ children: (state) => /* @__PURE__ */ jsxs20(Fragment10, { children: [
2467
+ /* @__PURE__ */ jsx42(
1318
2468
  "span",
1319
2469
  {
1320
2470
  "aria-hidden": "true",
@@ -1329,7 +2479,7 @@ function Switch({ className, children, size = "sm", ...props }) {
1329
2479
  "motion-reduce:transition-none",
1330
2480
  styles.track
1331
2481
  ),
1332
- children: /* @__PURE__ */ jsx40(
2482
+ children: /* @__PURE__ */ jsx42(
1333
2483
  "span",
1334
2484
  {
1335
2485
  className: cn(
@@ -1344,34 +2494,92 @@ function Switch({ className, children, size = "sm", ...props }) {
1344
2494
  )
1345
2495
  }
1346
2496
  ),
1347
- children != null && /* @__PURE__ */ jsx40("span", { className: "select-none font-medium leading-5 text-foreground", children: typeof children === "function" ? children(state) : children })
2497
+ children != null && /* @__PURE__ */ jsx42("span", { className: "select-none font-medium leading-5 text-foreground", children: typeof children === "function" ? children(state) : children })
1348
2498
  ] })
1349
2499
  }
1350
2500
  ) });
1351
2501
  }
1352
2502
 
1353
2503
  // src/ui/table/table.tsx
1354
- import { jsx as jsx41 } from "react/jsx-runtime";
2504
+ import { jsx as jsx43 } from "react/jsx-runtime";
1355
2505
  function Table({ className, ...props }) {
1356
- return /* @__PURE__ */ jsx41("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx41("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) });
2506
+ return /* @__PURE__ */ jsx43("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx43(
2507
+ "table",
2508
+ {
2509
+ "data-slot": "table",
2510
+ className: cn("w-full caption-bottom text-sm", className),
2511
+ ...props
2512
+ }
2513
+ ) });
1357
2514
  }
1358
2515
  function TableHeader({ className, ...props }) {
1359
- return /* @__PURE__ */ jsx41("thead", { "data-slot": "table-header", className: cn("border-b border-border", className), ...props });
2516
+ return /* @__PURE__ */ jsx43("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
1360
2517
  }
1361
2518
  function TableBody({ className, ...props }) {
1362
- return /* @__PURE__ */ jsx41("tbody", { "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className), ...props });
2519
+ return /* @__PURE__ */ jsx43(
2520
+ "tbody",
2521
+ {
2522
+ "data-slot": "table-body",
2523
+ className: cn("[&_tr:last-child]:border-0", className),
2524
+ ...props
2525
+ }
2526
+ );
1363
2527
  }
1364
2528
  function TableRow({ className, ...props }) {
1365
- return /* @__PURE__ */ jsx41("tr", { "data-slot": "table-row", className: cn("border-b border-border transition-colors hover:bg-muted/50", className), ...props });
2529
+ return /* @__PURE__ */ jsx43(
2530
+ "tr",
2531
+ {
2532
+ "data-slot": "table-row",
2533
+ className: cn(
2534
+ "border-b border-border transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
2535
+ className
2536
+ ),
2537
+ ...props
2538
+ }
2539
+ );
1366
2540
  }
1367
2541
  function TableHead({ className, ...props }) {
1368
- return /* @__PURE__ */ jsx41("th", { "data-slot": "table-head", className: cn("h-10 px-3 text-left align-middle text-xs font-medium text-muted-foreground", className), ...props });
2542
+ return /* @__PURE__ */ jsx43(
2543
+ "th",
2544
+ {
2545
+ "data-slot": "table-head",
2546
+ className: cn(
2547
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
2548
+ className
2549
+ ),
2550
+ ...props
2551
+ }
2552
+ );
1369
2553
  }
1370
2554
  function TableCell({ className, ...props }) {
1371
- return /* @__PURE__ */ jsx41("td", { "data-slot": "table-cell", className: cn("p-3 align-middle", className), ...props });
2555
+ return /* @__PURE__ */ jsx43(
2556
+ "td",
2557
+ {
2558
+ "data-slot": "table-cell",
2559
+ className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
2560
+ ...props
2561
+ }
2562
+ );
1372
2563
  }
1373
2564
  function TableCaption({ className, ...props }) {
1374
- return /* @__PURE__ */ jsx41("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props });
2565
+ return /* @__PURE__ */ jsx43(
2566
+ "caption",
2567
+ {
2568
+ "data-slot": "table-caption",
2569
+ className: cn("mt-4 text-sm text-muted-foreground", className),
2570
+ ...props
2571
+ }
2572
+ );
2573
+ }
2574
+ function TableFooter({ className, ...props }) {
2575
+ return /* @__PURE__ */ jsx43(
2576
+ "tfoot",
2577
+ {
2578
+ "data-slot": "table-footer",
2579
+ className: cn("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
2580
+ ...props
2581
+ }
2582
+ );
1375
2583
  }
1376
2584
 
1377
2585
  // src/ui/tabs/tabs.tsx
@@ -1381,122 +2589,102 @@ import {
1381
2589
  TabPanel as AriaTabPanel,
1382
2590
  TabPanels as AriaTabPanels,
1383
2591
  Tabs as AriaTabs,
1384
- composeRenderProps
2592
+ composeRenderProps as composeRenderProps2
1385
2593
  } from "react-aria-components";
1386
- import { jsx as jsx42 } from "react/jsx-runtime";
2594
+ import { jsx as jsx44 } from "react/jsx-runtime";
1387
2595
  function Tabs({ className, ...props }) {
1388
- return /* @__PURE__ */ jsx42(AriaTabs, { "data-slot": "tabs", className: composeRenderProps(className, (value) => cn("flex flex-col gap-2", value)), ...props });
2596
+ return /* @__PURE__ */ jsx44(AriaTabs, { "data-slot": "tabs", className: composeRenderProps2(className, (value) => cn("flex flex-col gap-2", value)), ...props });
1389
2597
  }
1390
2598
  function TabsList({ className, ...props }) {
1391
- return /* @__PURE__ */ jsx42(AriaTabList, { "data-slot": "tabs-list", className: composeRenderProps(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
2599
+ return /* @__PURE__ */ jsx44(AriaTabList, { "data-slot": "tabs-list", className: composeRenderProps2(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
1392
2600
  }
1393
2601
  function TabsTrigger({ className, ...props }) {
1394
- return /* @__PURE__ */ jsx42(AriaTab, { "data-slot": "tabs-trigger", className: 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 });
2602
+ return /* @__PURE__ */ jsx44(AriaTab, { "data-slot": "tabs-trigger", className: composeRenderProps2(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 });
1395
2603
  }
1396
2604
  function TabsPanels({ className, ...props }) {
1397
- return /* @__PURE__ */ jsx42(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
2605
+ return /* @__PURE__ */ jsx44(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
1398
2606
  }
1399
2607
  function TabsContent({ className, ...props }) {
1400
- return /* @__PURE__ */ jsx42(AriaTabPanel, { "data-slot": "tabs-content", className: composeRenderProps(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
2608
+ return /* @__PURE__ */ jsx44(AriaTabPanel, { "data-slot": "tabs-content", className: composeRenderProps2(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
1401
2609
  }
1402
2610
 
1403
2611
  // src/ui/toast/toast.tsx
1404
- import { useEffect as useEffect5, useSyncExternalStore } from "react";
1405
- import { CheckCircle as CheckCircle2, Info, CircleAlert as CircleAlert2, XCircle, X as X3 } from "lucide-react";
1406
- import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
1407
- var records = [];
1408
- var listeners = /* @__PURE__ */ new Set();
1409
- var snapshot = () => records;
1410
- var emit = () => listeners.forEach((listener) => listener());
1411
- var subscribe = (listener) => {
1412
- listeners.add(listener);
1413
- return () => listeners.delete(listener);
1414
- };
1415
- var remove = (id) => {
1416
- records = records.filter((record) => record.id !== id);
1417
- emit();
1418
- };
1419
- function create(options) {
1420
- const id = `${Date.now()}-${Math.random().toString(36).slice(2)}`;
1421
- records = [...records, { ...options, id, state: "open", variant: options.variant ?? "default", duration: options.duration ?? 5e3, position: options.position ?? "bottom-right" }];
1422
- emit();
1423
- return id;
1424
- }
1425
- function dismiss(id) {
1426
- if (!records.some((record) => record.id === id && record.state === "open")) return;
1427
- records = records.map((record) => record.id === id ? { ...record, state: "closing" } : record);
1428
- emit();
1429
- window.setTimeout(() => remove(id), 180);
2612
+ import { useEffect as useEffect5 } from "react";
2613
+ import { sileo, Toaster as SileoToaster } from "sileo";
2614
+ import { Fragment as Fragment11, jsx as jsx45, jsxs as jsxs21 } from "react/jsx-runtime";
2615
+ function toSileoOptions({ title, description, duration, position, action }) {
2616
+ return {
2617
+ title,
2618
+ description,
2619
+ duration: duration === 0 ? null : duration,
2620
+ position,
2621
+ button: action ? { title: action.label, onClick: action.onPress } : void 0
2622
+ };
1430
2623
  }
1431
- function update(id, patch) {
1432
- records = records.map((record) => record.id === id ? { ...record, ...patch, state: "open" } : record);
1433
- emit();
2624
+ function create(options) {
2625
+ const sileoOptions = toSileoOptions(options);
2626
+ if (options.action) return sileo.action(sileoOptions);
2627
+ if (options.variant === "success") return sileo.success(sileoOptions);
2628
+ if (options.variant === "error") return sileo.error(sileoOptions);
2629
+ if (options.variant === "warning") return sileo.warning(sileoOptions);
2630
+ if (options.variant === "info") return sileo.info(sileoOptions);
2631
+ return sileo.show(sileoOptions);
1434
2632
  }
1435
2633
  var toast = Object.assign((options) => create(options), {
1436
2634
  success: (title, options) => create({ ...options, title, variant: "success" }),
1437
2635
  error: (title, options) => create({ ...options, title, variant: "error" }),
1438
2636
  warning: (title, options) => create({ ...options, title, variant: "warning" }),
1439
2637
  info: (title, options) => create({ ...options, title, variant: "info" }),
1440
- dismiss,
2638
+ dismiss: (id) => sileo.dismiss(id),
1441
2639
  promise: (promise, options) => {
1442
- const id = create({ title: options.loading, description: options.description, variant: "default", duration: 0, position: options.position });
1443
- promise.then((value) => update(id, { title: typeof options.success === "function" ? options.success(value) : options.success, variant: "success", duration: 4e3 })).catch((error) => update(id, { title: typeof options.error === "function" ? options.error(error) : options.error, variant: "error", duration: 6e3 }));
1444
- return promise;
2640
+ const shared = { description: options.description, position: options.position };
2641
+ return sileo.promise(promise, {
2642
+ loading: { ...shared, title: options.loading },
2643
+ success: (value) => ({ ...shared, title: typeof options.success === "function" ? options.success(value) : options.success }),
2644
+ error: (error) => ({ ...shared, title: typeof options.error === "function" ? options.error(error) : options.error }),
2645
+ position: options.position
2646
+ });
1445
2647
  }
1446
2648
  });
1447
2649
  function useToast() {
1448
2650
  return toast;
1449
2651
  }
1450
2652
  function ToastProvider({ children }) {
1451
- return /* @__PURE__ */ jsxs16(Fragment11, { children: [
2653
+ return /* @__PURE__ */ jsxs21(Fragment11, { children: [
1452
2654
  children,
1453
- /* @__PURE__ */ jsx43(Toaster, {})
2655
+ /* @__PURE__ */ jsx45(Toaster, {})
1454
2656
  ] });
1455
2657
  }
1456
- var positionClasses = {
1457
- "top-left": "top-4 left-4 items-start",
1458
- "top-center": "top-4 left-1/2 -translate-x-1/2 items-center",
1459
- "top-right": "top-4 right-4 items-end",
1460
- "bottom-left": "bottom-4 left-4 items-start",
1461
- "bottom-center": "bottom-4 left-1/2 -translate-x-1/2 items-center",
1462
- "bottom-right": "bottom-4 right-4 items-end"
1463
- };
1464
- function Toaster({ position = "bottom-right" }) {
1465
- return /* @__PURE__ */ jsx43(Fragment11, { children: Object.keys(positionClasses).map((item) => /* @__PURE__ */ jsx43(ToastViewport, { position: item, visiblePosition: position }, item)) });
2658
+ function Toaster({ position }) {
2659
+ return /* @__PURE__ */ jsx45(SileoToaster, { position });
1466
2660
  }
1467
2661
  function ToastViewport({ position, visiblePosition, className }) {
1468
- const toasts = useSyncExternalStore(subscribe, snapshot, snapshot).filter((item) => item.position === position);
1469
- if (visiblePosition && position !== visiblePosition && toasts.length === 0) return null;
1470
- return /* @__PURE__ */ jsx43("div", { "aria-label": `Notificaciones ${position}`, className: cn("pointer-events-none fixed z-50 flex w-[min(24rem,calc(100vw-2rem))] flex-col gap-2", positionClasses[position], className), children: toasts.map((item) => /* @__PURE__ */ jsx43(Toast, { ...item, onDismiss: () => dismiss(item.id) }, item.id)) });
2662
+ void className;
2663
+ if (visiblePosition && visiblePosition !== position) return null;
2664
+ return /* @__PURE__ */ jsx45(Toaster, { position });
1471
2665
  }
1472
- function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, onDismiss }) {
2666
+ function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
1473
2667
  useEffect5(() => {
1474
- if (state !== "open" || duration <= 0) return;
1475
- const timeout = window.setTimeout(() => dismiss(id), duration);
1476
- return () => window.clearTimeout(timeout);
1477
- }, [duration, id, state]);
1478
- const Icon = variant === "success" ? CheckCircle2 : variant === "error" ? XCircle : variant === "warning" ? CircleAlert2 : variant === "info" ? Info : Info;
1479
- return /* @__PURE__ */ jsx43("div", { role: variant === "error" ? "alert" : "status", "data-state": state, className: cn("pointer-events-auto w-full overflow-hidden rounded-xl border border-border/80 bg-background/95 p-3.5 text-foreground shadow-xl shadow-black/10 backdrop-blur-md animate-ui-toast-in", "data-[state=closing]:animate-ui-toast-out motion-reduce:animate-none", variant === "success" && "border-success/30", variant === "error" && "border-destructive/30", variant === "warning" && "border-warning/40"), children: /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-3", children: [
1480
- /* @__PURE__ */ jsx43(Icon, { "aria-hidden": "true", className: cn("mt-0.5 size-5 shrink-0", variant === "success" && "text-success", variant === "error" && "text-destructive", variant === "warning" && "text-warning", variant === "info" && "text-primary") }),
1481
- /* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
1482
- /* @__PURE__ */ jsx43("p", { className: "animate-ui-toast-title text-sm font-semibold", children: title }),
1483
- description && /* @__PURE__ */ jsx43("p", { className: "mt-1 max-h-20 animate-ui-toast-description overflow-hidden text-sm leading-5 text-muted-foreground data-[state=closing]:max-h-0", "data-state": state, children: description }),
1484
- action && /* @__PURE__ */ jsx43(Button2, { size: "sm", variant: "link", onPress: action.onPress, className: "mt-1 h-auto px-0", children: action.label })
1485
- ] }),
1486
- /* @__PURE__ */ jsx43(Button2, { "aria-label": "Cerrar notificaci\xF3n", onPress: onDismiss, size: "icon", variant: "ghost", className: "-mr-2 -mt-2 size-7", children: /* @__PURE__ */ jsx43(X3, {}) })
1487
- ] }) });
2668
+ if (state !== "open") return;
2669
+ const toastId = create({ title, description, variant, action, duration, position });
2670
+ return () => {
2671
+ sileo.dismiss(toastId);
2672
+ onDismiss?.();
2673
+ };
2674
+ }, [action, description, duration, id, onDismiss, position, state, title, variant]);
2675
+ return null;
1488
2676
  }
1489
2677
 
1490
2678
  // src/ui/toolbar/toolbar.tsx
1491
- import { jsx as jsx44 } from "react/jsx-runtime";
2679
+ import { jsx as jsx46 } from "react/jsx-runtime";
1492
2680
  function Toolbar({ className, ...props }) {
1493
- return /* @__PURE__ */ jsx44("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
2681
+ return /* @__PURE__ */ jsx46("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
1494
2682
  }
1495
2683
  function ToolbarGroup({ className, ...props }) {
1496
- return /* @__PURE__ */ jsx44("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
2684
+ return /* @__PURE__ */ jsx46("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
1497
2685
  }
1498
2686
  function ToolbarSpacer({ className, ...props }) {
1499
- return /* @__PURE__ */ jsx44("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
2687
+ return /* @__PURE__ */ jsx46("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
1500
2688
  }
1501
2689
  export {
1502
2690
  Accordion,
@@ -1521,15 +2709,18 @@ export {
1521
2709
  AvatarGroupCount,
1522
2710
  AvatarImage,
1523
2711
  Badge,
2712
+ BadgeLink,
1524
2713
  Breadcrumb,
1525
2714
  BreadcrumbLink,
1526
2715
  BreadcrumbPage,
1527
2716
  BreadcrumbSeparator,
1528
2717
  Breadcrumbs,
1529
- Button2 as Button,
2718
+ Button,
1530
2719
  ButtonGroup,
2720
+ ButtonGroupSeparator,
1531
2721
  ButtonGroupText,
1532
2722
  Card,
2723
+ CardAction,
1533
2724
  CardContent,
1534
2725
  CardDescription,
1535
2726
  CardFooter,
@@ -1554,17 +2745,31 @@ export {
1554
2745
  DrawerHeader,
1555
2746
  DrawerTitle,
1556
2747
  DropdownMenu,
1557
- DropdownMenuContent,
2748
+ DropdownMenuGroup,
1558
2749
  DropdownMenuItem,
2750
+ DropdownMenuLabel,
1559
2751
  DropdownMenuSeparator,
2752
+ DropdownMenuShortcut,
2753
+ DropdownMenuSub,
2754
+ DropdownMenuSubContent,
2755
+ DropdownMenuSubTrigger,
1560
2756
  DropdownMenuTrigger,
1561
2757
  EmptyState,
2758
+ EmptyStateContent,
1562
2759
  EmptyStateDescription,
2760
+ EmptyStateHeader,
2761
+ EmptyStateMedia,
1563
2762
  EmptyStateTitle,
1564
2763
  Field,
2764
+ FieldContent,
1565
2765
  FieldDescription,
1566
2766
  FieldError2 as FieldError,
2767
+ FieldGroup,
1567
2768
  FieldLabel,
2769
+ FieldLegend,
2770
+ FieldSeparator,
2771
+ FieldSet,
2772
+ FieldTitle,
1568
2773
  FormFeedback,
1569
2774
  FormRow,
1570
2775
  HighlightMatch,
@@ -1579,12 +2784,14 @@ export {
1579
2784
  Kbd,
1580
2785
  KbdGroup,
1581
2786
  Label2 as Label,
2787
+ LinkButton,
1582
2788
  LoadingOverlay,
1583
2789
  Menu,
1584
2790
  MenuContent,
1585
2791
  MenuItem,
1586
2792
  MenuTrigger,
1587
2793
  ModalDialog,
2794
+ OtpInput2 as OtpInput,
1588
2795
  PageHeader,
1589
2796
  PageHeaderActions,
1590
2797
  PageHeaderDescription,
@@ -1605,6 +2812,14 @@ export {
1605
2812
  SelectTrigger,
1606
2813
  SelectValue,
1607
2814
  Separator,
2815
+ Sheet,
2816
+ SheetClose,
2817
+ SheetContent,
2818
+ SheetDescription,
2819
+ SheetFooter,
2820
+ SheetHeader,
2821
+ SheetTitle,
2822
+ SheetTrigger,
1608
2823
  Sidebar,
1609
2824
  SidebarContent,
1610
2825
  SidebarFooter,
@@ -1624,6 +2839,7 @@ export {
1624
2839
  TableBody,
1625
2840
  TableCaption,
1626
2841
  TableCell,
2842
+ TableFooter,
1627
2843
  TableHead,
1628
2844
  TableHeader,
1629
2845
  TableRow,
@@ -1641,13 +2857,17 @@ export {
1641
2857
  ToolbarGroup,
1642
2858
  ToolbarSpacer,
1643
2859
  Tooltip,
1644
- TooltipContent,
1645
2860
  TooltipTrigger,
2861
+ alertVariants,
1646
2862
  badgeVariants,
2863
+ buttonGroupVariants,
1647
2864
  buttonVariants,
1648
2865
  cn,
2866
+ emptyStateMediaVariants,
2867
+ fieldVariants,
1649
2868
  formSnapshot,
1650
2869
  getTextMatchParts,
2870
+ inputGroupAddonVariants,
1651
2871
  toast,
1652
2872
  useAutosave,
1653
2873
  useDebouncedValue,