@doscientos/ui 0.1.23 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +762 -528
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +221 -32
- package/dist/index.d.ts +221 -32
- package/dist/index.js +728 -504
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,17 @@ __export(index_exports, {
|
|
|
38
38
|
Alert: () => Alert,
|
|
39
39
|
AlertAction: () => AlertAction,
|
|
40
40
|
AlertDescription: () => AlertDescription,
|
|
41
|
+
AlertDialog: () => AlertDialog,
|
|
42
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
43
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
44
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
45
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
46
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
47
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
48
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
49
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
50
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
51
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
41
52
|
AlertTitle: () => AlertTitle,
|
|
42
53
|
AppShell: () => AppShell,
|
|
43
54
|
AppShellContent: () => AppShellContent,
|
|
@@ -71,12 +82,15 @@ __export(index_exports, {
|
|
|
71
82
|
CardHeader: () => CardHeader,
|
|
72
83
|
CardTitle: () => CardTitle,
|
|
73
84
|
Checkbox: () => Checkbox,
|
|
85
|
+
Collapsible: () => Collapsible,
|
|
86
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
87
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
74
88
|
Combobox: () => Combobox,
|
|
75
89
|
ComboboxContent: () => ComboboxContent,
|
|
76
90
|
ComboboxInput: () => ComboboxInput,
|
|
77
91
|
ComboboxItem: () => ComboboxItem,
|
|
78
92
|
ComboboxList: () => ComboboxList,
|
|
79
|
-
ComboboxValue: () =>
|
|
93
|
+
ComboboxValue: () => import_react_aria_components8.ComboBoxValue,
|
|
80
94
|
Command: () => Command,
|
|
81
95
|
CommandContent: () => CommandContent,
|
|
82
96
|
CommandInput: () => CommandInput,
|
|
@@ -146,6 +160,7 @@ __export(index_exports, {
|
|
|
146
160
|
MenuContent: () => MenuContent,
|
|
147
161
|
MenuItem: () => MenuItem,
|
|
148
162
|
MenuTrigger: () => MenuTrigger,
|
|
163
|
+
MetricCard: () => MetricCard,
|
|
149
164
|
ModalDialog: () => ModalDialog,
|
|
150
165
|
OtpInput: () => OtpInput2,
|
|
151
166
|
PageHeader: () => PageHeader,
|
|
@@ -158,9 +173,6 @@ __export(index_exports, {
|
|
|
158
173
|
PopoverContent: () => PopoverContent,
|
|
159
174
|
PopoverTrigger: () => PopoverTrigger,
|
|
160
175
|
QuantityInput: () => QuantityInput,
|
|
161
|
-
SearchClearButton: () => SearchClearButton,
|
|
162
|
-
SearchField: () => SearchField,
|
|
163
|
-
SearchInput: () => SearchInput,
|
|
164
176
|
Select: () => Select,
|
|
165
177
|
SelectContent: () => SelectContent,
|
|
166
178
|
SelectItem: () => SelectItem,
|
|
@@ -467,10 +479,190 @@ function AccordionContent({
|
|
|
467
479
|
);
|
|
468
480
|
}
|
|
469
481
|
|
|
470
|
-
// src/ui/alert/alert.tsx
|
|
482
|
+
// src/ui/alert-dialog/alert-dialog.tsx
|
|
483
|
+
var React2 = __toESM(require("react"), 1);
|
|
484
|
+
var import_react_aria_components3 = require("react-aria-components");
|
|
485
|
+
|
|
486
|
+
// src/ui/button/button.tsx
|
|
471
487
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
488
|
+
var import_react4 = require("react");
|
|
489
|
+
var import_react_aria_components2 = require("react-aria-components");
|
|
472
490
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
473
|
-
var
|
|
491
|
+
var centeredRipplePosition = { x: "50%", y: "50%" };
|
|
492
|
+
function getRipplePosition(event) {
|
|
493
|
+
if (event.pointerType === "keyboard" || event.pointerType === "virtual") {
|
|
494
|
+
return centeredRipplePosition;
|
|
495
|
+
}
|
|
496
|
+
if (!(event.target instanceof Element) || event.x === void 0 || event.y === void 0) {
|
|
497
|
+
return centeredRipplePosition;
|
|
498
|
+
}
|
|
499
|
+
const bounds = event.target.getBoundingClientRect();
|
|
500
|
+
return {
|
|
501
|
+
x: `${event.x - bounds.left}px`,
|
|
502
|
+
y: `${event.y - bounds.top}px`
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function useActionRipple(enabled) {
|
|
506
|
+
const [ripple, setRipple] = (0, import_react4.useState)(null);
|
|
507
|
+
function triggerRipple(event) {
|
|
508
|
+
if (!enabled) return;
|
|
509
|
+
const position = getRipplePosition(event);
|
|
510
|
+
setRipple((currentRipple) => ({
|
|
511
|
+
id: (currentRipple?.id ?? 0) + 1,
|
|
512
|
+
position
|
|
513
|
+
}));
|
|
514
|
+
}
|
|
515
|
+
const rippleElement = ripple ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
516
|
+
"span",
|
|
517
|
+
{
|
|
518
|
+
"aria-hidden": "true",
|
|
519
|
+
"data-slot": "button-ripple",
|
|
520
|
+
className: "pointer-events-none absolute aspect-square w-full rounded-full bg-current animate-ui-ripple motion-reduce:hidden",
|
|
521
|
+
style: { left: ripple.position.x, top: ripple.position.y },
|
|
522
|
+
onAnimationEnd: () => setRipple((currentRipple) => currentRipple?.id === ripple.id ? null : currentRipple)
|
|
523
|
+
},
|
|
524
|
+
ripple.id
|
|
525
|
+
) : null;
|
|
526
|
+
return { ripple: rippleElement, triggerRipple };
|
|
527
|
+
}
|
|
528
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
529
|
+
cn(
|
|
530
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
531
|
+
actionRipple()
|
|
532
|
+
),
|
|
533
|
+
{
|
|
534
|
+
variants: {
|
|
535
|
+
variant: {
|
|
536
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
537
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
538
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
539
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
540
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
541
|
+
link: "text-primary underline-offset-4 hover:underline after:hidden"
|
|
542
|
+
},
|
|
543
|
+
size: {
|
|
544
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
545
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
546
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
547
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
548
|
+
icon: "size-8",
|
|
549
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
550
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
551
|
+
"icon-lg": "size-9"
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
defaultVariants: {
|
|
555
|
+
variant: "default",
|
|
556
|
+
size: "default"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
function Button({ className, variant = "default", size = "default", children, disabled, isDisabled, onClick, onPress, ...props }) {
|
|
561
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
563
|
+
import_react_aria_components2.Button,
|
|
564
|
+
{
|
|
565
|
+
"data-slot": "button",
|
|
566
|
+
"data-variant": variant,
|
|
567
|
+
"data-size": size,
|
|
568
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
569
|
+
onClick,
|
|
570
|
+
isDisabled: isDisabled ?? disabled,
|
|
571
|
+
onPress: (event) => {
|
|
572
|
+
onPress?.(event);
|
|
573
|
+
triggerRipple(event);
|
|
574
|
+
},
|
|
575
|
+
...props,
|
|
576
|
+
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
577
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
578
|
+
ripple
|
|
579
|
+
] })
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
function LinkButton({
|
|
584
|
+
className,
|
|
585
|
+
variant = "default",
|
|
586
|
+
size = "default",
|
|
587
|
+
children,
|
|
588
|
+
onClick,
|
|
589
|
+
onPress,
|
|
590
|
+
...props
|
|
591
|
+
}) {
|
|
592
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
594
|
+
import_react_aria_components2.Link,
|
|
595
|
+
{
|
|
596
|
+
"data-slot": "button",
|
|
597
|
+
"data-variant": variant,
|
|
598
|
+
"data-size": size,
|
|
599
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
600
|
+
onClick,
|
|
601
|
+
onPress: (event) => {
|
|
602
|
+
onPress?.(event);
|
|
603
|
+
triggerRipple(event);
|
|
604
|
+
},
|
|
605
|
+
...props,
|
|
606
|
+
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
607
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
608
|
+
ripple
|
|
609
|
+
] })
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// src/ui/alert-dialog/alert-dialog.tsx
|
|
615
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
616
|
+
var AlertDialogContext = React2.createContext(null);
|
|
617
|
+
function useAlertDialogContext() {
|
|
618
|
+
const context = React2.useContext(AlertDialogContext);
|
|
619
|
+
if (!context) throw new Error("AlertDialog components must be rendered within AlertDialog.");
|
|
620
|
+
return context;
|
|
621
|
+
}
|
|
622
|
+
function AlertDialog({ children, open, onOpenChange }) {
|
|
623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogContext.Provider, { value: { open, setOpen: onOpenChange }, children });
|
|
624
|
+
}
|
|
625
|
+
function AlertDialogPortal({ children }) {
|
|
626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children });
|
|
627
|
+
}
|
|
628
|
+
function AlertDialogTrigger({ children, ...props }) {
|
|
629
|
+
const { setOpen } = useAlertDialogContext();
|
|
630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
631
|
+
}
|
|
632
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
633
|
+
const { open, setOpen } = useAlertDialogContext();
|
|
634
|
+
if (!open) return null;
|
|
635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.ModalOverlay, { "data-slot": "alert-dialog-overlay", isDismissable: true, isOpen: open, onOpenChange: setOpen, className: cn("fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", className), ...props });
|
|
636
|
+
}
|
|
637
|
+
function AlertDialogContent({ className, size = "default", children }) {
|
|
638
|
+
const { open, setOpen } = useAlertDialogContext();
|
|
639
|
+
if (!open) return null;
|
|
640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.ModalOverlay, { isDismissable: true, isOpen: open, onOpenChange: setOpen, className: "fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Modal, { className: cn("w-full max-w-[calc(100%-2rem)] outline-none", size === "sm" ? "sm:max-w-xs" : "sm:max-w-sm", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Dialog, { role: "alertdialog", "data-slot": "alert-dialog-content", className: "grid gap-4 rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none", children }) }) }) });
|
|
641
|
+
}
|
|
642
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
|
|
644
|
+
}
|
|
645
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "alert-dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className), ...props });
|
|
647
|
+
}
|
|
648
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Heading, { slot: "title", "data-slot": "alert-dialog-title", className: cn("font-heading text-base font-medium", className), ...props });
|
|
650
|
+
}
|
|
651
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_aria_components3.Text, { slot: "description", "data-slot": "alert-dialog-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
653
|
+
}
|
|
654
|
+
function AlertDialogAction({ className, ...props }) {
|
|
655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-action", className: cn(className), ...props });
|
|
656
|
+
}
|
|
657
|
+
function AlertDialogCancel({ children = "Cancelar", onClick, ...props }) {
|
|
658
|
+
const { setOpen } = useAlertDialogContext();
|
|
659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { "data-slot": "alert-dialog-cancel", variant: "outline", onClick, onPress: () => setOpen(false), ...props, children });
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// src/ui/alert/alert.tsx
|
|
663
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
664
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
665
|
+
var alertVariants = (0, import_class_variance_authority3.cva)(
|
|
474
666
|
"group/alert relative grid w-full gap-0.5 rounded-lg border border-border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
475
667
|
{
|
|
476
668
|
variants: {
|
|
@@ -488,7 +680,7 @@ var alertVariants = (0, import_class_variance_authority2.cva)(
|
|
|
488
680
|
}
|
|
489
681
|
);
|
|
490
682
|
function Alert({ className, variant, ...props }) {
|
|
491
|
-
return /* @__PURE__ */ (0,
|
|
683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
492
684
|
"div",
|
|
493
685
|
{
|
|
494
686
|
"data-slot": "alert",
|
|
@@ -499,7 +691,7 @@ function Alert({ className, variant, ...props }) {
|
|
|
499
691
|
);
|
|
500
692
|
}
|
|
501
693
|
function AlertTitle({ className, ...props }) {
|
|
502
|
-
return /* @__PURE__ */ (0,
|
|
694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
503
695
|
"div",
|
|
504
696
|
{
|
|
505
697
|
"data-slot": "alert-title",
|
|
@@ -512,7 +704,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
512
704
|
);
|
|
513
705
|
}
|
|
514
706
|
function AlertDescription({ className, ...props }) {
|
|
515
|
-
return /* @__PURE__ */ (0,
|
|
707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
516
708
|
"div",
|
|
517
709
|
{
|
|
518
710
|
"data-slot": "alert-description",
|
|
@@ -525,17 +717,17 @@ function AlertDescription({ className, ...props }) {
|
|
|
525
717
|
);
|
|
526
718
|
}
|
|
527
719
|
function AlertAction({ className, ...props }) {
|
|
528
|
-
return /* @__PURE__ */ (0,
|
|
720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props });
|
|
529
721
|
}
|
|
530
722
|
|
|
531
723
|
// src/ui/app-shell/app-shell.tsx
|
|
532
|
-
var
|
|
724
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
533
725
|
function AppShell({
|
|
534
726
|
className,
|
|
535
727
|
sidebarBreakpoint = "md",
|
|
536
728
|
...props
|
|
537
729
|
}) {
|
|
538
|
-
return /* @__PURE__ */ (0,
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
539
731
|
"div",
|
|
540
732
|
{
|
|
541
733
|
"data-slot": "app-shell",
|
|
@@ -546,7 +738,7 @@ function AppShell({
|
|
|
546
738
|
);
|
|
547
739
|
}
|
|
548
740
|
function AppShellSidebar({ className, ...props }) {
|
|
549
|
-
return /* @__PURE__ */ (0,
|
|
741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
550
742
|
"aside",
|
|
551
743
|
{
|
|
552
744
|
"data-slot": "app-shell-sidebar",
|
|
@@ -556,10 +748,10 @@ function AppShellSidebar({ className, ...props }) {
|
|
|
556
748
|
);
|
|
557
749
|
}
|
|
558
750
|
function AppShellMain({ className, ...props }) {
|
|
559
|
-
return /* @__PURE__ */ (0,
|
|
751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("main", { "data-slot": "app-shell-main", className: cn("bg-background", className), ...props });
|
|
560
752
|
}
|
|
561
753
|
function AppShellHeader({ className, ...props }) {
|
|
562
|
-
return /* @__PURE__ */ (0,
|
|
754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
563
755
|
"header",
|
|
564
756
|
{
|
|
565
757
|
"data-slot": "app-shell-header",
|
|
@@ -572,7 +764,7 @@ function AppShellMobileHeader({
|
|
|
572
764
|
className,
|
|
573
765
|
...props
|
|
574
766
|
}) {
|
|
575
|
-
return /* @__PURE__ */ (0,
|
|
767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
576
768
|
"header",
|
|
577
769
|
{
|
|
578
770
|
"data-slot": "app-shell-mobile-header",
|
|
@@ -588,7 +780,7 @@ function AppShellContent({
|
|
|
588
780
|
scrollable = true,
|
|
589
781
|
...props
|
|
590
782
|
}) {
|
|
591
|
-
return /* @__PURE__ */ (0,
|
|
783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
592
784
|
"div",
|
|
593
785
|
{
|
|
594
786
|
"data-slot": "app-shell-content",
|
|
@@ -602,23 +794,23 @@ function AppShellContent({
|
|
|
602
794
|
}
|
|
603
795
|
|
|
604
796
|
// src/ui/avatar/avatar.tsx
|
|
605
|
-
var
|
|
606
|
-
var
|
|
797
|
+
var import_react5 = require("react");
|
|
798
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
607
799
|
var sizes = { xs: "size-5 text-[10px]", sm: "size-6 text-xs", default: "size-8 text-sm", lg: "size-10 text-base" };
|
|
608
|
-
var AvatarContext = (0,
|
|
800
|
+
var AvatarContext = (0, import_react5.createContext)(null);
|
|
609
801
|
function Avatar({ className, size = "default", children, ...props }) {
|
|
610
|
-
const [status, setStatus] = (0,
|
|
611
|
-
return /* @__PURE__ */ (0,
|
|
802
|
+
const [status, setStatus] = (0, import_react5.useState)("idle");
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex shrink-0 overflow-hidden rounded-full bg-muted text-muted-foreground", sizes[size], className), ...props, children }) });
|
|
612
804
|
}
|
|
613
805
|
function AvatarImage({ className, src, onError, onLoad, ...props }) {
|
|
614
|
-
const avatar = (0,
|
|
615
|
-
const [failed, setFailed] = (0,
|
|
616
|
-
(0,
|
|
806
|
+
const avatar = (0, import_react5.useContext)(AvatarContext);
|
|
807
|
+
const [failed, setFailed] = (0, import_react5.useState)(false);
|
|
808
|
+
(0, import_react5.useEffect)(() => {
|
|
617
809
|
setFailed(false);
|
|
618
810
|
avatar?.setStatus(src ? "loading" : "idle");
|
|
619
811
|
}, [avatar?.setStatus, src]);
|
|
620
812
|
if (failed || avatar?.status === "error") return null;
|
|
621
|
-
return /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { "data-slot": "avatar-image", src, className: cn("aspect-square size-full object-cover", className), onLoad: (event) => {
|
|
622
814
|
avatar?.setStatus("loaded");
|
|
623
815
|
onLoad?.(event);
|
|
624
816
|
}, onError: (event) => {
|
|
@@ -628,25 +820,25 @@ function AvatarImage({ className, src, onError, onLoad, ...props }) {
|
|
|
628
820
|
}, ...props });
|
|
629
821
|
}
|
|
630
822
|
function AvatarFallback({ className, ...props }) {
|
|
631
|
-
const avatar = (0,
|
|
823
|
+
const avatar = (0, import_react5.useContext)(AvatarContext);
|
|
632
824
|
if (avatar?.status === "loaded") return null;
|
|
633
|
-
return /* @__PURE__ */ (0,
|
|
825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center font-medium", className), ...props });
|
|
634
826
|
}
|
|
635
827
|
function AvatarBadge({ className, ...props }) {
|
|
636
|
-
return /* @__PURE__ */ (0,
|
|
828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 size-2.5 rounded-full bg-success ring-2 ring-background", className), ...props });
|
|
637
829
|
}
|
|
638
830
|
function AvatarGroup({ className, ...props }) {
|
|
639
|
-
return /* @__PURE__ */ (0,
|
|
831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "data-slot": "avatar-group", className: cn("flex -space-x-2 [&>[data-slot=avatar]]:ring-2 [&>[data-slot=avatar]]:ring-background", className), ...props });
|
|
640
832
|
}
|
|
641
833
|
function AvatarGroupCount({ className, ...props }) {
|
|
642
|
-
return /* @__PURE__ */ (0,
|
|
834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "avatar-group-count", className: cn("flex size-8 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground ring-2 ring-background", className), ...props });
|
|
643
835
|
}
|
|
644
836
|
|
|
645
837
|
// src/ui/badge/badge.tsx
|
|
646
|
-
var
|
|
647
|
-
var
|
|
648
|
-
var
|
|
649
|
-
var badgeVariants = (0,
|
|
838
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
839
|
+
var import_react_aria_components4 = require("react-aria-components");
|
|
840
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
841
|
+
var badgeVariants = (0, import_class_variance_authority4.cva)(
|
|
650
842
|
"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",
|
|
651
843
|
{
|
|
652
844
|
variants: {
|
|
@@ -668,7 +860,7 @@ var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
|
668
860
|
}
|
|
669
861
|
);
|
|
670
862
|
function Badge({ className, variant, ...props }) {
|
|
671
|
-
return /* @__PURE__ */ (0,
|
|
863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
672
864
|
"span",
|
|
673
865
|
{
|
|
674
866
|
"data-slot": "badge",
|
|
@@ -679,8 +871,8 @@ function Badge({ className, variant, ...props }) {
|
|
|
679
871
|
);
|
|
680
872
|
}
|
|
681
873
|
function BadgeLink({ className, variant, ...props }) {
|
|
682
|
-
return /* @__PURE__ */ (0,
|
|
683
|
-
|
|
874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
875
|
+
import_react_aria_components4.Link,
|
|
684
876
|
{
|
|
685
877
|
"data-slot": "badge",
|
|
686
878
|
"data-variant": variant ?? "default",
|
|
@@ -691,33 +883,33 @@ function BadgeLink({ className, variant, ...props }) {
|
|
|
691
883
|
}
|
|
692
884
|
|
|
693
885
|
// src/ui/breadcrumb/breadcrumb.tsx
|
|
694
|
-
var
|
|
695
|
-
var
|
|
886
|
+
var import_react_aria_components5 = require("react-aria-components");
|
|
887
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
696
888
|
function Breadcrumbs({ className, ...props }) {
|
|
697
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Breadcrumbs, { "data-slot": "breadcrumbs", className: cn("flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", className), ...props });
|
|
698
890
|
}
|
|
699
891
|
function Breadcrumb({ className, ...props }) {
|
|
700
|
-
return /* @__PURE__ */ (0,
|
|
892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Breadcrumb, { "data-slot": "breadcrumb", className: cn("inline-flex items-center gap-1.5", className), ...props });
|
|
701
893
|
}
|
|
702
894
|
function BreadcrumbLink({ className, ...props }) {
|
|
703
|
-
return /* @__PURE__ */ (0,
|
|
895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Link, { "data-slot": "breadcrumb-link", className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
704
896
|
}
|
|
705
897
|
function BreadcrumbPage({ className, ...props }) {
|
|
706
|
-
return /* @__PURE__ */ (0,
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": "breadcrumb-page", "aria-current": "page", className: cn("font-medium text-foreground", className), ...props });
|
|
707
899
|
}
|
|
708
900
|
function BreadcrumbSeparator({ children = "/", className, ...props }) {
|
|
709
|
-
return /* @__PURE__ */ (0,
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": "breadcrumb-separator", "aria-hidden": "true", className: cn("text-muted-foreground/60", className), ...props, children });
|
|
710
902
|
}
|
|
711
903
|
|
|
712
904
|
// src/ui/button-group/button-group.tsx
|
|
713
|
-
var
|
|
905
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
714
906
|
|
|
715
907
|
// src/ui/separator/separator.tsx
|
|
716
|
-
var
|
|
717
|
-
var
|
|
908
|
+
var import_react_aria_components6 = require("react-aria-components");
|
|
909
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
718
910
|
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
719
|
-
return /* @__PURE__ */ (0,
|
|
720
|
-
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
912
|
+
import_react_aria_components6.Separator,
|
|
721
913
|
{
|
|
722
914
|
"data-slot": "separator",
|
|
723
915
|
orientation,
|
|
@@ -731,11 +923,11 @@ function Separator({ className, orientation = "horizontal", ...props }) {
|
|
|
731
923
|
}
|
|
732
924
|
|
|
733
925
|
// src/ui/button-group/button-group.tsx
|
|
734
|
-
var
|
|
926
|
+
var import_jsx_runtime10 = (
|
|
735
927
|
// biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
|
|
736
928
|
require("react/jsx-runtime")
|
|
737
929
|
);
|
|
738
|
-
var buttonGroupVariants = (0,
|
|
930
|
+
var buttonGroupVariants = (0, import_class_variance_authority5.cva)(
|
|
739
931
|
"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",
|
|
740
932
|
{
|
|
741
933
|
variants: {
|
|
@@ -754,7 +946,7 @@ function ButtonGroup({
|
|
|
754
946
|
orientation,
|
|
755
947
|
...props
|
|
756
948
|
}) {
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
758
950
|
"div",
|
|
759
951
|
{
|
|
760
952
|
role: "group",
|
|
@@ -781,7 +973,7 @@ function ButtonGroupText({
|
|
|
781
973
|
};
|
|
782
974
|
return render(renderProps);
|
|
783
975
|
}
|
|
784
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
785
977
|
"div",
|
|
786
978
|
{
|
|
787
979
|
"data-slot": "button-group-text",
|
|
@@ -798,7 +990,7 @@ function ButtonGroupSeparator({
|
|
|
798
990
|
orientation = "vertical",
|
|
799
991
|
...props
|
|
800
992
|
}) {
|
|
801
|
-
return /* @__PURE__ */ (0,
|
|
993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
802
994
|
Separator,
|
|
803
995
|
{
|
|
804
996
|
"data-slot": "button-group-separator",
|
|
@@ -812,114 +1004,10 @@ function ButtonGroupSeparator({
|
|
|
812
1004
|
);
|
|
813
1005
|
}
|
|
814
1006
|
|
|
815
|
-
// src/ui/button/button.tsx
|
|
816
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
817
|
-
var import_react5 = require("react");
|
|
818
|
-
var import_react_aria_components5 = require("react-aria-components");
|
|
819
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
820
|
-
function useActionRipple(enabled) {
|
|
821
|
-
const [rippleId, setRippleId] = (0, import_react5.useState)(0);
|
|
822
|
-
function triggerRipple() {
|
|
823
|
-
if (enabled) setRippleId((currentId) => currentId + 1);
|
|
824
|
-
}
|
|
825
|
-
const ripple = rippleId ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
826
|
-
"span",
|
|
827
|
-
{
|
|
828
|
-
"aria-hidden": "true",
|
|
829
|
-
"data-slot": "button-ripple",
|
|
830
|
-
className: "pointer-events-none absolute top-1/2 left-1/2 aspect-square w-full rounded-full bg-current animate-ui-ripple motion-reduce:hidden",
|
|
831
|
-
onAnimationEnd: () => setRippleId(0)
|
|
832
|
-
},
|
|
833
|
-
rippleId
|
|
834
|
-
) : null;
|
|
835
|
-
return { ripple, triggerRipple };
|
|
836
|
-
}
|
|
837
|
-
var buttonVariants = (0, import_class_variance_authority5.cva)(
|
|
838
|
-
cn(
|
|
839
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
840
|
-
actionRipple()
|
|
841
|
-
),
|
|
842
|
-
{
|
|
843
|
-
variants: {
|
|
844
|
-
variant: {
|
|
845
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
846
|
-
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",
|
|
847
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
848
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
849
|
-
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",
|
|
850
|
-
link: "text-primary underline-offset-4 hover:underline after:hidden"
|
|
851
|
-
},
|
|
852
|
-
size: {
|
|
853
|
-
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
854
|
-
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",
|
|
855
|
-
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",
|
|
856
|
-
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
857
|
-
icon: "size-8",
|
|
858
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
859
|
-
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
860
|
-
"icon-lg": "size-9"
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
defaultVariants: {
|
|
864
|
-
variant: "default",
|
|
865
|
-
size: "default"
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
);
|
|
869
|
-
function Button({ className, variant = "default", size = "default", onClick, children, ...props }) {
|
|
870
|
-
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
871
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
872
|
-
import_react_aria_components5.Button,
|
|
873
|
-
{
|
|
874
|
-
"data-slot": "button",
|
|
875
|
-
"data-variant": variant,
|
|
876
|
-
"data-size": size,
|
|
877
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
878
|
-
onClick: (event) => {
|
|
879
|
-
onClick?.(event);
|
|
880
|
-
triggerRipple();
|
|
881
|
-
},
|
|
882
|
-
...props,
|
|
883
|
-
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
884
|
-
typeof children === "function" ? children(renderProps) : children,
|
|
885
|
-
ripple
|
|
886
|
-
] })
|
|
887
|
-
}
|
|
888
|
-
);
|
|
889
|
-
}
|
|
890
|
-
function LinkButton({
|
|
891
|
-
className,
|
|
892
|
-
variant = "default",
|
|
893
|
-
size = "default",
|
|
894
|
-
onClick,
|
|
895
|
-
children,
|
|
896
|
-
...props
|
|
897
|
-
}) {
|
|
898
|
-
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
899
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
900
|
-
import_react_aria_components5.Link,
|
|
901
|
-
{
|
|
902
|
-
"data-slot": "button",
|
|
903
|
-
"data-variant": variant,
|
|
904
|
-
"data-size": size,
|
|
905
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
906
|
-
onClick: (event) => {
|
|
907
|
-
onClick?.(event);
|
|
908
|
-
triggerRipple();
|
|
909
|
-
},
|
|
910
|
-
...props,
|
|
911
|
-
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
912
|
-
typeof children === "function" ? children(renderProps) : children,
|
|
913
|
-
ripple
|
|
914
|
-
] })
|
|
915
|
-
}
|
|
916
|
-
);
|
|
917
|
-
}
|
|
918
|
-
|
|
919
1007
|
// src/ui/card/card.tsx
|
|
920
|
-
var
|
|
1008
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
921
1009
|
function Card({ className, size = "default", ...props }) {
|
|
922
|
-
return /* @__PURE__ */ (0,
|
|
1010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
923
1011
|
"div",
|
|
924
1012
|
{
|
|
925
1013
|
"data-slot": "card",
|
|
@@ -933,7 +1021,7 @@ function Card({ className, size = "default", ...props }) {
|
|
|
933
1021
|
);
|
|
934
1022
|
}
|
|
935
1023
|
function CardHeader({ className, ...props }) {
|
|
936
|
-
return /* @__PURE__ */ (0,
|
|
1024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
937
1025
|
"div",
|
|
938
1026
|
{
|
|
939
1027
|
"data-slot": "card-header",
|
|
@@ -946,7 +1034,7 @@ function CardHeader({ className, ...props }) {
|
|
|
946
1034
|
);
|
|
947
1035
|
}
|
|
948
1036
|
function CardTitle({ className, ...props }) {
|
|
949
|
-
return /* @__PURE__ */ (0,
|
|
1037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
950
1038
|
"div",
|
|
951
1039
|
{
|
|
952
1040
|
"data-slot": "card-title",
|
|
@@ -959,7 +1047,7 @@ function CardTitle({ className, ...props }) {
|
|
|
959
1047
|
);
|
|
960
1048
|
}
|
|
961
1049
|
function CardDescription({ className, ...props }) {
|
|
962
|
-
return /* @__PURE__ */ (0,
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
963
1051
|
"div",
|
|
964
1052
|
{
|
|
965
1053
|
"data-slot": "card-description",
|
|
@@ -969,7 +1057,7 @@ function CardDescription({ className, ...props }) {
|
|
|
969
1057
|
);
|
|
970
1058
|
}
|
|
971
1059
|
function CardAction({ className, ...props }) {
|
|
972
|
-
return /* @__PURE__ */ (0,
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
973
1061
|
"div",
|
|
974
1062
|
{
|
|
975
1063
|
"data-slot": "card-action",
|
|
@@ -979,10 +1067,10 @@ function CardAction({ className, ...props }) {
|
|
|
979
1067
|
);
|
|
980
1068
|
}
|
|
981
1069
|
function CardContent({ className, ...props }) {
|
|
982
|
-
return /* @__PURE__ */ (0,
|
|
1070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props });
|
|
983
1071
|
}
|
|
984
1072
|
function CardFooter({ className, ...props }) {
|
|
985
|
-
return /* @__PURE__ */ (0,
|
|
1073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
986
1074
|
"div",
|
|
987
1075
|
{
|
|
988
1076
|
"data-slot": "card-footer",
|
|
@@ -997,11 +1085,11 @@ function CardFooter({ className, ...props }) {
|
|
|
997
1085
|
|
|
998
1086
|
// src/ui/checkbox/checkbox.tsx
|
|
999
1087
|
var import_lucide_react2 = require("lucide-react");
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
1088
|
+
var import_react_aria_components7 = require("react-aria-components");
|
|
1089
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1002
1090
|
function Checkbox({ className, children, ...props }) {
|
|
1003
|
-
return /* @__PURE__ */ (0,
|
|
1004
|
-
|
|
1091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1092
|
+
import_react_aria_components7.Checkbox,
|
|
1005
1093
|
{
|
|
1006
1094
|
"data-slot": "checkbox",
|
|
1007
1095
|
className: cn(
|
|
@@ -1009,13 +1097,13 @@ function Checkbox({ className, children, ...props }) {
|
|
|
1009
1097
|
className
|
|
1010
1098
|
),
|
|
1011
1099
|
...props,
|
|
1012
|
-
children: (state) => /* @__PURE__ */ (0,
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
1100
|
+
children: (state) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1014
1102
|
"span",
|
|
1015
1103
|
{
|
|
1016
1104
|
"aria-hidden": "true",
|
|
1017
1105
|
className: "grid size-4 place-items-center rounded border border-border bg-background text-primary-foreground transition-colors group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-3 group-data-focus-visible:ring-ring/50",
|
|
1018
|
-
children: /* @__PURE__ */ (0,
|
|
1106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react2.Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
|
|
1019
1107
|
}
|
|
1020
1108
|
),
|
|
1021
1109
|
typeof children === "function" ? children(state) : children
|
|
@@ -1024,27 +1112,95 @@ function Checkbox({ className, children, ...props }) {
|
|
|
1024
1112
|
);
|
|
1025
1113
|
}
|
|
1026
1114
|
|
|
1115
|
+
// src/ui/collapsible/collapsible.tsx
|
|
1116
|
+
var React3 = __toESM(require("react"), 1);
|
|
1117
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1118
|
+
var CollapsibleContext = React3.createContext(null);
|
|
1119
|
+
function useCollapsibleContext() {
|
|
1120
|
+
const context = React3.useContext(CollapsibleContext);
|
|
1121
|
+
if (!context) throw new Error("Collapsible components must be rendered within Collapsible.");
|
|
1122
|
+
return context;
|
|
1123
|
+
}
|
|
1124
|
+
function Collapsible({
|
|
1125
|
+
children,
|
|
1126
|
+
defaultOpen = false,
|
|
1127
|
+
onOpenChange,
|
|
1128
|
+
open: controlledOpen,
|
|
1129
|
+
...props
|
|
1130
|
+
}) {
|
|
1131
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React3.useState(defaultOpen);
|
|
1132
|
+
const contentId = React3.useId();
|
|
1133
|
+
const open = controlledOpen ?? uncontrolledOpen;
|
|
1134
|
+
const setOpen = React3.useCallback(
|
|
1135
|
+
(nextOpen) => {
|
|
1136
|
+
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
1137
|
+
onOpenChange?.(nextOpen);
|
|
1138
|
+
},
|
|
1139
|
+
[controlledOpen, onOpenChange]
|
|
1140
|
+
);
|
|
1141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollapsibleContext.Provider, { value: { contentId, open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", ...props, children }) });
|
|
1142
|
+
}
|
|
1143
|
+
function CollapsibleTrigger({ asChild = false, children, onClick, ...props }) {
|
|
1144
|
+
const { contentId, open, setOpen } = useCollapsibleContext();
|
|
1145
|
+
const handleClick = (event) => {
|
|
1146
|
+
onClick?.(event);
|
|
1147
|
+
if (!event.defaultPrevented) setOpen(!open);
|
|
1148
|
+
};
|
|
1149
|
+
if (asChild && React3.isValidElement(children)) {
|
|
1150
|
+
const child = children;
|
|
1151
|
+
return React3.cloneElement(child, {
|
|
1152
|
+
...props,
|
|
1153
|
+
"aria-controls": contentId,
|
|
1154
|
+
"aria-expanded": open,
|
|
1155
|
+
"data-slot": "collapsible-trigger",
|
|
1156
|
+
"data-state": open ? "open" : "closed",
|
|
1157
|
+
onClick: (event) => {
|
|
1158
|
+
child.props.onClick?.(event);
|
|
1159
|
+
handleClick(event);
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1164
|
+
"button",
|
|
1165
|
+
{
|
|
1166
|
+
type: "button",
|
|
1167
|
+
"data-slot": "collapsible-trigger",
|
|
1168
|
+
"data-state": open ? "open" : "closed",
|
|
1169
|
+
"aria-controls": contentId,
|
|
1170
|
+
"aria-expanded": open,
|
|
1171
|
+
onClick: handleClick,
|
|
1172
|
+
...props,
|
|
1173
|
+
children
|
|
1174
|
+
}
|
|
1175
|
+
);
|
|
1176
|
+
}
|
|
1177
|
+
function CollapsibleContent({ children, ...props }) {
|
|
1178
|
+
const { contentId, open } = useCollapsibleContext();
|
|
1179
|
+
if (!open) return null;
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id: contentId, "data-slot": "collapsible-content", "data-state": "open", ...props, children });
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1027
1183
|
// src/ui/combobox/combobox.tsx
|
|
1028
1184
|
var import_react6 = require("react");
|
|
1029
|
-
var
|
|
1030
|
-
var
|
|
1031
|
-
var Combobox =
|
|
1185
|
+
var import_react_aria_components8 = require("react-aria-components");
|
|
1186
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1187
|
+
var Combobox = import_react_aria_components8.ComboBox;
|
|
1032
1188
|
function ComboboxInput({ className, ...props }) {
|
|
1033
|
-
return /* @__PURE__ */ (0,
|
|
1189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Input, { "data-slot": "combobox-input", className: cn("h-9 w-full rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
|
|
1034
1190
|
}
|
|
1035
1191
|
function ComboboxContent({ className, ...props }) {
|
|
1036
|
-
return /* @__PURE__ */ (0,
|
|
1192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Popover, { "data-slot": "combobox-content", className: cn("max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
1037
1193
|
}
|
|
1038
1194
|
function ComboboxList({ className, emptyState, ...props }) {
|
|
1039
|
-
return /* @__PURE__ */ (0,
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.ListBox, { "data-slot": "combobox-list", className: cn("max-h-64 overflow-y-auto", className), renderEmptyState: emptyState ? () => emptyState : void 0, ...props });
|
|
1040
1196
|
}
|
|
1041
1197
|
function ComboboxItem({ className, children, ...props }) {
|
|
1042
|
-
return /* @__PURE__ */ (0,
|
|
1198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.ListBoxItem, { "data-slot": "combobox-item", className: cn("flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
1043
1199
|
}
|
|
1044
1200
|
function HighlightMatch({ text, query, className }) {
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react6.Fragment, { children: part.text }, `${part.text}-${index}`)) });
|
|
1046
1202
|
}
|
|
1047
|
-
function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ (0,
|
|
1203
|
+
function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
|
|
1048
1204
|
const [internalInputValue, setInternalInputValue] = (0, import_react6.useState)("");
|
|
1049
1205
|
const inputValue = controlledInputValue ?? internalInputValue;
|
|
1050
1206
|
const setInputValue = (value) => {
|
|
@@ -1064,48 +1220,48 @@ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inp
|
|
|
1064
1220
|
const handleKeyDown = (event) => {
|
|
1065
1221
|
if ((event.key === "Tab" || event.key === "Enter") && acceptSuggestion()) event.preventDefault();
|
|
1066
1222
|
};
|
|
1067
|
-
return /* @__PURE__ */ (0,
|
|
1223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_aria_components8.ComboBox, { ...props, className: cn("group/combobox flex w-full flex-col gap-1.5", className), items: filteredItems, selectedKey, inputValue, onInputChange: setInputValue, onSelectionChange: (key) => {
|
|
1068
1224
|
const item = filteredItems.find((candidate) => String(getItemKey(candidate)) === String(key));
|
|
1069
1225
|
if (item) setInputValue(getItemLabel(item));
|
|
1070
1226
|
onSelectionChange?.(key, item);
|
|
1071
1227
|
}, children: [
|
|
1072
|
-
label && /* @__PURE__ */ (0,
|
|
1073
|
-
/* @__PURE__ */ (0,
|
|
1074
|
-
suggestionLabel && /* @__PURE__ */ (0,
|
|
1075
|
-
/* @__PURE__ */ (0,
|
|
1228
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Label, { className: "text-sm font-medium text-foreground", children: label }),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
|
|
1230
|
+
suggestionLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 left-2.5 z-0 flex items-center whitespace-pre text-sm text-muted-foreground/60", children: [
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-transparent", children: inputValue }),
|
|
1076
1232
|
suggestionLabel.slice(inputValue.length)
|
|
1077
1233
|
] }),
|
|
1078
|
-
/* @__PURE__ */ (0,
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxInput, { "aria-autocomplete": suggestionLabel ? "both" : "list", placeholder, onKeyDown: handleKeyDown, className: "relative z-10 bg-transparent" })
|
|
1079
1235
|
] }),
|
|
1080
|
-
description && /* @__PURE__ */ (0,
|
|
1081
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1082
|
-
/* @__PURE__ */ (0,
|
|
1236
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.Text, { slot: "description", className: "text-xs text-muted-foreground", children: description }),
|
|
1237
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components8.FieldError, { className: "text-xs text-destructive", children: errorMessage }),
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
|
|
1083
1239
|
] });
|
|
1084
1240
|
}
|
|
1085
1241
|
|
|
1086
1242
|
// src/ui/command/command.tsx
|
|
1087
|
-
var
|
|
1088
|
-
var
|
|
1243
|
+
var import_react_aria_components9 = require("react-aria-components");
|
|
1244
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1089
1245
|
function Command({ className, ...props }) {
|
|
1090
|
-
return /* @__PURE__ */ (0,
|
|
1246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ComboBox, { "data-slot": "command", className: cn("w-full", className), ...props });
|
|
1091
1247
|
}
|
|
1092
1248
|
function CommandInput({ className, ...props }) {
|
|
1093
|
-
return /* @__PURE__ */ (0,
|
|
1249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Input, { "data-slot": "command-input", className: cn("h-9 w-full border-0 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground", className), ...props });
|
|
1094
1250
|
}
|
|
1095
1251
|
function CommandContent({ className, ...props }) {
|
|
1096
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.Popover, { "data-slot": "command-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none", className), ...props });
|
|
1097
1253
|
}
|
|
1098
1254
|
function CommandList({ className, ...props }) {
|
|
1099
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ListBox, { "data-slot": "command-list", className: cn("max-h-72 overflow-y-auto", className), ...props });
|
|
1100
1256
|
}
|
|
1101
1257
|
function CommandItem({ className, ...props }) {
|
|
1102
|
-
return /* @__PURE__ */ (0,
|
|
1258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components9.ListBoxItem, { "data-slot": "command-item", className: cn("flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props });
|
|
1103
1259
|
}
|
|
1104
1260
|
|
|
1105
1261
|
// src/ui/modal-dialog/modal-dialog.tsx
|
|
1106
1262
|
var import_lucide_react3 = require("lucide-react");
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1263
|
+
var import_react_aria_components10 = require("react-aria-components");
|
|
1264
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1109
1265
|
var sizeClasses = {
|
|
1110
1266
|
sm: "w-[min(calc(100dvw-2rem),24rem)]",
|
|
1111
1267
|
md: "w-[min(calc(100dvw-2rem),28rem)]",
|
|
@@ -1125,35 +1281,35 @@ function ModalDialog({
|
|
|
1125
1281
|
...props
|
|
1126
1282
|
}) {
|
|
1127
1283
|
const layoutClass = children ? footer ? "grid-rows-[auto_minmax(0,1fr)_auto]" : "grid-rows-[auto_minmax(0,1fr)]" : "grid-rows-[auto_auto]";
|
|
1128
|
-
return /* @__PURE__ */ (0,
|
|
1129
|
-
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1285
|
+
import_react_aria_components10.ModalOverlay,
|
|
1130
1286
|
{
|
|
1131
1287
|
isOpen: open,
|
|
1132
1288
|
onOpenChange,
|
|
1133
1289
|
className: "fixed inset-0 z-50 grid place-items-center bg-black/20 p-4 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out",
|
|
1134
1290
|
...props,
|
|
1135
|
-
children: /* @__PURE__ */ (0,
|
|
1136
|
-
|
|
1291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1292
|
+
import_react_aria_components10.Modal,
|
|
1137
1293
|
{
|
|
1138
1294
|
className: cn(
|
|
1139
1295
|
"max-h-[calc(100dvh-2rem)] outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
|
|
1140
1296
|
sizeClasses[size],
|
|
1141
1297
|
className
|
|
1142
1298
|
),
|
|
1143
|
-
children: /* @__PURE__ */ (0,
|
|
1144
|
-
|
|
1299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1300
|
+
import_react_aria_components10.Dialog,
|
|
1145
1301
|
{
|
|
1146
1302
|
className: cn(
|
|
1147
1303
|
"grid max-h-[calc(100dvh-2rem)] overflow-hidden rounded-xl bg-background text-foreground shadow-xl outline-none",
|
|
1148
1304
|
layoutClass
|
|
1149
1305
|
),
|
|
1150
|
-
children: ({ close }) => /* @__PURE__ */ (0,
|
|
1151
|
-
/* @__PURE__ */ (0,
|
|
1152
|
-
/* @__PURE__ */ (0,
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1154
|
-
description ? /* @__PURE__ */ (0,
|
|
1306
|
+
children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { "data-slot": "modal-dialog-header", className: "flex items-start gap-3 border-b border-border px-5 py-4", children: [
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Heading, { slot: "title", className: "font-heading text-base leading-none font-medium", children: title }),
|
|
1310
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Text, { slot: "description", className: "mt-2 text-sm text-muted-foreground", children: description }) : null
|
|
1155
1311
|
] }),
|
|
1156
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1312
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1157
1313
|
Button,
|
|
1158
1314
|
{
|
|
1159
1315
|
"aria-label": "Cerrar di\xE1logo",
|
|
@@ -1161,12 +1317,12 @@ function ModalDialog({
|
|
|
1161
1317
|
size: "icon",
|
|
1162
1318
|
className: "-mr-2 -mt-1",
|
|
1163
1319
|
onPress: close,
|
|
1164
|
-
children: /* @__PURE__ */ (0,
|
|
1320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.X, { "aria-hidden": "true", className: "size-4" })
|
|
1165
1321
|
}
|
|
1166
1322
|
) : null
|
|
1167
1323
|
] }),
|
|
1168
|
-
children ? /* @__PURE__ */ (0,
|
|
1169
|
-
footer ? /* @__PURE__ */ (0,
|
|
1324
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-slot": "modal-dialog-body", className: "min-h-0 overflow-y-auto px-5 py-4", children }) : null,
|
|
1325
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1170
1326
|
"footer",
|
|
1171
1327
|
{
|
|
1172
1328
|
"data-slot": "modal-dialog-footer",
|
|
@@ -1187,7 +1343,7 @@ function ModalDialog({
|
|
|
1187
1343
|
}
|
|
1188
1344
|
|
|
1189
1345
|
// src/ui/confirm-dialog/confirm-dialog.tsx
|
|
1190
|
-
var
|
|
1346
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1191
1347
|
function ConfirmDialog({
|
|
1192
1348
|
open,
|
|
1193
1349
|
onOpenChange,
|
|
@@ -1199,7 +1355,7 @@ function ConfirmDialog({
|
|
|
1199
1355
|
pending = false,
|
|
1200
1356
|
onConfirm
|
|
1201
1357
|
}) {
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1203
1359
|
ModalDialog,
|
|
1204
1360
|
{
|
|
1205
1361
|
open,
|
|
@@ -1207,9 +1363,9 @@ function ConfirmDialog({
|
|
|
1207
1363
|
title,
|
|
1208
1364
|
description,
|
|
1209
1365
|
showCloseButton: false,
|
|
1210
|
-
footer: /* @__PURE__ */ (0,
|
|
1211
|
-
/* @__PURE__ */ (0,
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1366
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: destructive ? "destructive" : "default", isDisabled: pending, onPress: onConfirm, children: confirmLabel })
|
|
1213
1369
|
] })
|
|
1214
1370
|
}
|
|
1215
1371
|
);
|
|
@@ -1217,8 +1373,8 @@ function ConfirmDialog({
|
|
|
1217
1373
|
|
|
1218
1374
|
// src/ui/danger-zone/danger-zone.tsx
|
|
1219
1375
|
var import_lucide_react4 = require("lucide-react");
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1376
|
+
var import_react_aria_components11 = require("react-aria-components");
|
|
1377
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1222
1378
|
function DangerZone({
|
|
1223
1379
|
title = "Zona de peligro",
|
|
1224
1380
|
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
@@ -1226,49 +1382,49 @@ function DangerZone({
|
|
|
1226
1382
|
className,
|
|
1227
1383
|
children
|
|
1228
1384
|
}) {
|
|
1229
|
-
return /* @__PURE__ */ (0,
|
|
1230
|
-
/* @__PURE__ */ (0,
|
|
1231
|
-
|
|
1385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1387
|
+
import_react_aria_components11.Button,
|
|
1232
1388
|
{
|
|
1233
1389
|
slot: "trigger",
|
|
1234
1390
|
"data-slot": "danger-zone-trigger",
|
|
1235
1391
|
className: "group/danger flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
1236
1392
|
children: [
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1238
|
-
/* @__PURE__ */ (0,
|
|
1239
|
-
/* @__PURE__ */ (0,
|
|
1240
|
-
/* @__PURE__ */ (0,
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ShieldAlert, { className: "size-4 shrink-0 text-destructive" }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-heading text-base leading-snug font-medium text-destructive", children: title }),
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground", children: description })
|
|
1241
1397
|
] }),
|
|
1242
|
-
/* @__PURE__ */ (0,
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ChevronDown, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/danger:rotate-180" })
|
|
1243
1399
|
]
|
|
1244
1400
|
}
|
|
1245
1401
|
) }),
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardContent, { children }) })
|
|
1247
1403
|
] }) });
|
|
1248
1404
|
}
|
|
1249
1405
|
|
|
1250
1406
|
// src/ui/dialog/dialog.tsx
|
|
1251
1407
|
var import_lucide_react5 = require("lucide-react");
|
|
1252
|
-
var
|
|
1253
|
-
var
|
|
1254
|
-
var
|
|
1255
|
-
var DialogContext =
|
|
1408
|
+
var React4 = __toESM(require("react"), 1);
|
|
1409
|
+
var import_react_aria_components12 = require("react-aria-components");
|
|
1410
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1411
|
+
var DialogContext = React4.createContext(null);
|
|
1256
1412
|
function useDialogContext() {
|
|
1257
|
-
const context =
|
|
1413
|
+
const context = React4.useContext(DialogContext);
|
|
1258
1414
|
if (!context) throw new Error("Dialog components must be rendered within Dialog.");
|
|
1259
1415
|
return context;
|
|
1260
1416
|
}
|
|
1261
1417
|
function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledOpen }) {
|
|
1262
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
1418
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
|
|
1263
1419
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
1264
|
-
const setOpen =
|
|
1420
|
+
const setOpen = React4.useCallback(
|
|
1265
1421
|
(nextOpen) => {
|
|
1266
1422
|
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
1267
1423
|
onOpenChange?.(nextOpen);
|
|
1268
1424
|
},
|
|
1269
1425
|
[controlledOpen, onOpenChange]
|
|
1270
1426
|
);
|
|
1271
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogContext.Provider, { value: { open, setOpen }, children });
|
|
1272
1428
|
}
|
|
1273
1429
|
function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
1274
1430
|
const { setOpen } = useDialogContext();
|
|
@@ -1276,9 +1432,9 @@ function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
|
1276
1432
|
onClick?.(event);
|
|
1277
1433
|
if (!event.defaultPrevented) setOpen(true);
|
|
1278
1434
|
};
|
|
1279
|
-
if (asChild &&
|
|
1435
|
+
if (asChild && React4.isValidElement(children)) {
|
|
1280
1436
|
const child = children;
|
|
1281
|
-
return
|
|
1437
|
+
return React4.cloneElement(child, {
|
|
1282
1438
|
...props,
|
|
1283
1439
|
"data-slot": "dialog-trigger",
|
|
1284
1440
|
onClick: (event) => {
|
|
@@ -1287,16 +1443,16 @@ function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
|
1287
1443
|
}
|
|
1288
1444
|
});
|
|
1289
1445
|
}
|
|
1290
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
1291
1447
|
}
|
|
1292
1448
|
function DialogPortal({ children }) {
|
|
1293
|
-
return /* @__PURE__ */ (0,
|
|
1449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
|
|
1294
1450
|
}
|
|
1295
1451
|
function DialogOverlay({ children, className, ...props }) {
|
|
1296
1452
|
const { open, setOpen } = useDialogContext();
|
|
1297
1453
|
if (!open) return null;
|
|
1298
|
-
return /* @__PURE__ */ (0,
|
|
1299
|
-
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1455
|
+
import_react_aria_components12.ModalOverlay,
|
|
1300
1456
|
{
|
|
1301
1457
|
"data-slot": "dialog-overlay",
|
|
1302
1458
|
isDismissable: true,
|
|
@@ -1319,21 +1475,21 @@ function DialogContent({
|
|
|
1319
1475
|
...props
|
|
1320
1476
|
}) {
|
|
1321
1477
|
const { setOpen } = useDialogContext();
|
|
1322
|
-
return /* @__PURE__ */ (0,
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1323
1479
|
DialogOverlay,
|
|
1324
1480
|
{
|
|
1325
1481
|
onClick: (event) => {
|
|
1326
1482
|
if (event.target === event.currentTarget) onOverlayClick?.(event);
|
|
1327
1483
|
},
|
|
1328
|
-
children: /* @__PURE__ */ (0,
|
|
1329
|
-
|
|
1484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1485
|
+
import_react_aria_components12.Modal,
|
|
1330
1486
|
{
|
|
1331
1487
|
className: cn(
|
|
1332
1488
|
"w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
|
|
1333
1489
|
className
|
|
1334
1490
|
),
|
|
1335
|
-
children: /* @__PURE__ */ (0,
|
|
1336
|
-
|
|
1491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1492
|
+
import_react_aria_components12.Dialog,
|
|
1337
1493
|
{
|
|
1338
1494
|
"data-slot": "dialog-content",
|
|
1339
1495
|
className: cn(
|
|
@@ -1343,7 +1499,7 @@ function DialogContent({
|
|
|
1343
1499
|
...props,
|
|
1344
1500
|
children: [
|
|
1345
1501
|
children,
|
|
1346
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1502
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1347
1503
|
Button,
|
|
1348
1504
|
{
|
|
1349
1505
|
"aria-label": "Cerrar di\xE1logo",
|
|
@@ -1352,7 +1508,7 @@ function DialogContent({
|
|
|
1352
1508
|
className: "absolute top-2 right-2",
|
|
1353
1509
|
size: "icon-sm",
|
|
1354
1510
|
onPress: () => setOpen(false),
|
|
1355
|
-
children: /* @__PURE__ */ (0,
|
|
1511
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.XIcon, {})
|
|
1356
1512
|
}
|
|
1357
1513
|
) : null
|
|
1358
1514
|
]
|
|
@@ -1365,9 +1521,9 @@ function DialogContent({
|
|
|
1365
1521
|
}
|
|
1366
1522
|
function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
1367
1523
|
const { setOpen } = useDialogContext();
|
|
1368
|
-
if (asChild &&
|
|
1524
|
+
if (asChild && React4.isValidElement(children)) {
|
|
1369
1525
|
const child = children;
|
|
1370
|
-
return
|
|
1526
|
+
return React4.cloneElement(child, {
|
|
1371
1527
|
...props,
|
|
1372
1528
|
"data-slot": "dialog-close",
|
|
1373
1529
|
onClick: (event) => {
|
|
@@ -1376,31 +1532,31 @@ function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
|
1376
1532
|
}
|
|
1377
1533
|
});
|
|
1378
1534
|
}
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
|
|
1380
1536
|
}
|
|
1381
1537
|
function DialogHeader({ className, ...props }) {
|
|
1382
|
-
return /* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1383
1539
|
}
|
|
1384
1540
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "data-slot": "dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:flex-wrap sm:justify-end", className), ...props, children: [
|
|
1386
1542
|
children,
|
|
1387
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1543
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogClose, { variant: "outline", children: "Cerrar" }) : null
|
|
1388
1544
|
] });
|
|
1389
1545
|
}
|
|
1390
1546
|
function DialogTitle({ className, ...props }) {
|
|
1391
|
-
return /* @__PURE__ */ (0,
|
|
1547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components12.Heading, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
|
|
1392
1548
|
}
|
|
1393
1549
|
function DialogDescription({ className, ...props }) {
|
|
1394
|
-
return /* @__PURE__ */ (0,
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components12.Text, { slot: "description", "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props });
|
|
1395
1551
|
}
|
|
1396
1552
|
|
|
1397
1553
|
// src/ui/doc-preview/doc-preview.tsx
|
|
1398
1554
|
var import_lucide_react6 = require("lucide-react");
|
|
1399
|
-
var
|
|
1555
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1400
1556
|
function DocPreview({ url, mimeType, name }) {
|
|
1401
|
-
if (!url) return /* @__PURE__ */ (0,
|
|
1557
|
+
if (!url) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Fallback, { mimeType, reason: "no-url" });
|
|
1402
1558
|
if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
|
|
1403
|
-
return /* @__PURE__ */ (0,
|
|
1559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1404
1560
|
"iframe",
|
|
1405
1561
|
{
|
|
1406
1562
|
src: url,
|
|
@@ -1411,51 +1567,51 @@ function DocPreview({ url, mimeType, name }) {
|
|
|
1411
1567
|
);
|
|
1412
1568
|
}
|
|
1413
1569
|
if (mimeType?.startsWith("image/")) {
|
|
1414
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex justify-center rounded-sm bg-muted/30 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
|
|
1415
1571
|
}
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Fallback, { mimeType, reason: "unsupported" });
|
|
1417
1573
|
}
|
|
1418
1574
|
function Fallback({ mimeType, reason }) {
|
|
1419
1575
|
const Icon = mimeType?.startsWith("image/") ? import_lucide_react6.Image : import_lucide_react6.FileText;
|
|
1420
1576
|
const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
|
|
1421
|
-
return /* @__PURE__ */ (0,
|
|
1422
|
-
/* @__PURE__ */ (0,
|
|
1423
|
-
/* @__PURE__ */ (0,
|
|
1424
|
-
mimeType ? /* @__PURE__ */ (0,
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 py-14 text-muted-foreground", children: [
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { className: "size-9 opacity-30" }),
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm", children: message }),
|
|
1580
|
+
mimeType ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
|
|
1426
1582
|
] });
|
|
1427
1583
|
}
|
|
1428
1584
|
|
|
1429
1585
|
// src/ui/drawer/drawer.tsx
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1586
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
1587
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1432
1588
|
var sideStyles = { left: "inset-y-0 left-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", right: "inset-y-0 right-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", bottom: "inset-x-0 bottom-0 max-h-[85vh] w-full data-entering:animate-ui-surface-in" };
|
|
1433
1589
|
function Drawer({ children, side = "right", className, ...props }) {
|
|
1434
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.ModalOverlay, { isDismissable: true, className: "fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Modal, { className: cn("absolute grid gap-4 overflow-y-auto rounded-xl border border-border bg-background p-5 text-foreground shadow-xl outline-none", sideStyles[side], className), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Dialog, { "data-slot": "drawer", className: "outline-none", children }) }) });
|
|
1435
1591
|
}
|
|
1436
1592
|
function DrawerHeader({ className, ...props }) {
|
|
1437
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
1438
1594
|
}
|
|
1439
1595
|
function DrawerFooter({ className, ...props }) {
|
|
1440
|
-
return /* @__PURE__ */ (0,
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end", className), ...props });
|
|
1441
1597
|
}
|
|
1442
1598
|
function DrawerTitle({ className, ...props }) {
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Heading, { slot: "title", "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
|
|
1444
1600
|
}
|
|
1445
1601
|
function DrawerDescription({ className, ...props }) {
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
1447
1603
|
}
|
|
1448
1604
|
|
|
1449
1605
|
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
1450
|
-
var
|
|
1606
|
+
var React5 = require("react");
|
|
1451
1607
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
1452
1608
|
var import_lucide_react7 = require("lucide-react");
|
|
1453
|
-
var
|
|
1454
|
-
var
|
|
1609
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
1610
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1455
1611
|
function DropdownMenuTrigger({
|
|
1456
1612
|
...props
|
|
1457
1613
|
}) {
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1459
1615
|
}
|
|
1460
1616
|
function DropdownMenu({
|
|
1461
1617
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -1466,16 +1622,16 @@ function DropdownMenu({
|
|
|
1466
1622
|
children,
|
|
1467
1623
|
...props
|
|
1468
1624
|
}) {
|
|
1469
|
-
return /* @__PURE__ */ (0,
|
|
1470
|
-
|
|
1625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1626
|
+
import_react_aria_components14.Popover,
|
|
1471
1627
|
{
|
|
1472
1628
|
"data-slot": dataSlot,
|
|
1473
1629
|
placement,
|
|
1474
1630
|
offset,
|
|
1475
1631
|
crossOffset,
|
|
1476
1632
|
className: cn("z-50 w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className),
|
|
1477
|
-
children: /* @__PURE__ */ (0,
|
|
1478
|
-
|
|
1633
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1634
|
+
import_react_aria_components14.Menu,
|
|
1479
1635
|
{
|
|
1480
1636
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
1481
1637
|
...props,
|
|
@@ -1488,15 +1644,15 @@ function DropdownMenu({
|
|
|
1488
1644
|
function DropdownMenuGroup({
|
|
1489
1645
|
...props
|
|
1490
1646
|
}) {
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
|
|
1492
1648
|
}
|
|
1493
1649
|
function DropdownMenuLabel({
|
|
1494
1650
|
className,
|
|
1495
1651
|
inset,
|
|
1496
1652
|
...props
|
|
1497
1653
|
}) {
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
-
|
|
1654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1655
|
+
import_react_aria_components14.Header,
|
|
1500
1656
|
{
|
|
1501
1657
|
"data-slot": "dropdown-menu-label",
|
|
1502
1658
|
"data-inset": inset,
|
|
@@ -1527,27 +1683,27 @@ function DropdownMenuItem({
|
|
|
1527
1683
|
children,
|
|
1528
1684
|
...props
|
|
1529
1685
|
}) {
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
1531
|
-
|
|
1686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1687
|
+
import_react_aria_components14.MenuItem,
|
|
1532
1688
|
{
|
|
1533
1689
|
"data-slot": "dropdown-menu-item",
|
|
1534
1690
|
"data-inset": inset,
|
|
1535
1691
|
"data-variant": variant,
|
|
1536
1692
|
textValue: typeof children === "string" ? children : props.textValue,
|
|
1537
|
-
className: (0,
|
|
1693
|
+
className: (0, import_react_aria_components14.composeRenderProps)(
|
|
1538
1694
|
className,
|
|
1539
1695
|
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
1540
1696
|
),
|
|
1541
1697
|
...props,
|
|
1542
|
-
children: (0,
|
|
1698
|
+
children: (0, import_react_aria_components14.composeRenderProps)(
|
|
1543
1699
|
children,
|
|
1544
|
-
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0,
|
|
1545
|
-
selectionMode !== "none" ? /* @__PURE__ */ (0,
|
|
1700
|
+
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1701
|
+
selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1546
1702
|
"span",
|
|
1547
1703
|
{
|
|
1548
1704
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1549
1705
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
1550
|
-
children: isSelected ? /* @__PURE__ */ (0,
|
|
1706
|
+
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react7.CheckIcon, {}) : null
|
|
1551
1707
|
}
|
|
1552
1708
|
) : null,
|
|
1553
1709
|
children2
|
|
@@ -1559,7 +1715,7 @@ function DropdownMenuItem({
|
|
|
1559
1715
|
function DropdownMenuSub({
|
|
1560
1716
|
...props
|
|
1561
1717
|
}) {
|
|
1562
|
-
return /* @__PURE__ */ (0,
|
|
1718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1563
1719
|
}
|
|
1564
1720
|
function DropdownMenuSubTrigger({
|
|
1565
1721
|
className,
|
|
@@ -1567,8 +1723,8 @@ function DropdownMenuSubTrigger({
|
|
|
1567
1723
|
children,
|
|
1568
1724
|
...props
|
|
1569
1725
|
}) {
|
|
1570
|
-
return /* @__PURE__ */ (0,
|
|
1571
|
-
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1727
|
+
import_react_aria_components14.MenuItem,
|
|
1572
1728
|
{
|
|
1573
1729
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
1574
1730
|
"data-inset": inset,
|
|
@@ -1578,9 +1734,9 @@ function DropdownMenuSubTrigger({
|
|
|
1578
1734
|
className
|
|
1579
1735
|
),
|
|
1580
1736
|
...props,
|
|
1581
|
-
children: (0,
|
|
1737
|
+
children: (0, import_react_aria_components14.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1582
1738
|
children2,
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react7.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
1584
1740
|
] }))
|
|
1585
1741
|
}
|
|
1586
1742
|
);
|
|
@@ -1592,7 +1748,7 @@ function DropdownMenuSubContent({
|
|
|
1592
1748
|
className,
|
|
1593
1749
|
...props
|
|
1594
1750
|
}) {
|
|
1595
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1596
1752
|
DropdownMenu,
|
|
1597
1753
|
{
|
|
1598
1754
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1608,8 +1764,8 @@ function DropdownMenuSeparator({
|
|
|
1608
1764
|
className,
|
|
1609
1765
|
...props
|
|
1610
1766
|
}) {
|
|
1611
|
-
return /* @__PURE__ */ (0,
|
|
1612
|
-
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1768
|
+
import_react_aria_components14.Separator,
|
|
1613
1769
|
{
|
|
1614
1770
|
"data-slot": "dropdown-menu-separator",
|
|
1615
1771
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
@@ -1621,7 +1777,7 @@ function DropdownMenuShortcut({
|
|
|
1621
1777
|
className,
|
|
1622
1778
|
...props
|
|
1623
1779
|
}) {
|
|
1624
|
-
return /* @__PURE__ */ (0,
|
|
1780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1625
1781
|
"span",
|
|
1626
1782
|
{
|
|
1627
1783
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1636,9 +1792,9 @@ function DropdownMenuShortcut({
|
|
|
1636
1792
|
|
|
1637
1793
|
// src/ui/empty-state/empty-state.tsx
|
|
1638
1794
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1639
|
-
var
|
|
1795
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1640
1796
|
function EmptyState({ className, ...props }) {
|
|
1641
|
-
return /* @__PURE__ */ (0,
|
|
1797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1642
1798
|
"div",
|
|
1643
1799
|
{
|
|
1644
1800
|
"data-slot": "empty-state",
|
|
@@ -1651,7 +1807,7 @@ function EmptyState({ className, ...props }) {
|
|
|
1651
1807
|
);
|
|
1652
1808
|
}
|
|
1653
1809
|
function EmptyStateHeader({ className, ...props }) {
|
|
1654
|
-
return /* @__PURE__ */ (0,
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1655
1811
|
"div",
|
|
1656
1812
|
{
|
|
1657
1813
|
"data-slot": "empty-state-header",
|
|
@@ -1677,7 +1833,7 @@ function EmptyStateMedia({
|
|
|
1677
1833
|
variant = "default",
|
|
1678
1834
|
...props
|
|
1679
1835
|
}) {
|
|
1680
|
-
return /* @__PURE__ */ (0,
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1681
1837
|
"div",
|
|
1682
1838
|
{
|
|
1683
1839
|
"data-slot": "empty-state-media",
|
|
@@ -1688,7 +1844,7 @@ function EmptyStateMedia({
|
|
|
1688
1844
|
);
|
|
1689
1845
|
}
|
|
1690
1846
|
function EmptyStateTitle({ className, ...props }) {
|
|
1691
|
-
return /* @__PURE__ */ (0,
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1692
1848
|
"h3",
|
|
1693
1849
|
{
|
|
1694
1850
|
"data-slot": "empty-state-title",
|
|
@@ -1698,7 +1854,7 @@ function EmptyStateTitle({ className, ...props }) {
|
|
|
1698
1854
|
);
|
|
1699
1855
|
}
|
|
1700
1856
|
function EmptyStateDescription({ className, ...props }) {
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1702
1858
|
"p",
|
|
1703
1859
|
{
|
|
1704
1860
|
"data-slot": "empty-state-description",
|
|
@@ -1711,7 +1867,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
1711
1867
|
);
|
|
1712
1868
|
}
|
|
1713
1869
|
function EmptyStateContent({ className, ...props }) {
|
|
1714
|
-
return /* @__PURE__ */ (0,
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1715
1871
|
"div",
|
|
1716
1872
|
{
|
|
1717
1873
|
"data-slot": "empty-state-content",
|
|
@@ -1729,23 +1885,23 @@ var import_class_variance_authority8 = require("class-variance-authority");
|
|
|
1729
1885
|
|
|
1730
1886
|
// src/ui/label/label.tsx
|
|
1731
1887
|
var import_react7 = require("react");
|
|
1732
|
-
var
|
|
1733
|
-
var
|
|
1888
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
1889
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1734
1890
|
var Label2 = (0, import_react7.forwardRef)(function Label3({ className, ...props }, ref) {
|
|
1735
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components15.Label, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
|
|
1736
1892
|
});
|
|
1737
1893
|
|
|
1738
1894
|
// src/ui/field/field.tsx
|
|
1739
|
-
var
|
|
1895
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1740
1896
|
function FieldSet({ className, ...props }) {
|
|
1741
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
1742
1898
|
}
|
|
1743
1899
|
function FieldLegend({
|
|
1744
1900
|
className,
|
|
1745
1901
|
variant = "legend",
|
|
1746
1902
|
...props
|
|
1747
1903
|
}) {
|
|
1748
|
-
return /* @__PURE__ */ (0,
|
|
1904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1749
1905
|
"legend",
|
|
1750
1906
|
{
|
|
1751
1907
|
"data-slot": "field-legend",
|
|
@@ -1759,7 +1915,7 @@ function FieldLegend({
|
|
|
1759
1915
|
);
|
|
1760
1916
|
}
|
|
1761
1917
|
function FieldGroup({ className, ...props }) {
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1763
1919
|
"div",
|
|
1764
1920
|
{
|
|
1765
1921
|
"data-slot": "field-group",
|
|
@@ -1787,7 +1943,7 @@ var fieldVariants = (0, import_class_variance_authority8.cva)(
|
|
|
1787
1943
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
1788
1944
|
return (
|
|
1789
1945
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
1790
|
-
/* @__PURE__ */ (0,
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1791
1947
|
"div",
|
|
1792
1948
|
{
|
|
1793
1949
|
role: "group",
|
|
@@ -1800,7 +1956,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1800
1956
|
);
|
|
1801
1957
|
}
|
|
1802
1958
|
function FieldContent({ className, ...props }) {
|
|
1803
|
-
return /* @__PURE__ */ (0,
|
|
1959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1804
1960
|
"div",
|
|
1805
1961
|
{
|
|
1806
1962
|
"data-slot": "field-content",
|
|
@@ -1810,7 +1966,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1810
1966
|
);
|
|
1811
1967
|
}
|
|
1812
1968
|
function FieldLabel({ className, ...props }) {
|
|
1813
|
-
return /* @__PURE__ */ (0,
|
|
1969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1814
1970
|
Label2,
|
|
1815
1971
|
{
|
|
1816
1972
|
"data-slot": "field-label",
|
|
@@ -1823,7 +1979,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1823
1979
|
);
|
|
1824
1980
|
}
|
|
1825
1981
|
function FieldTitle({ className, ...props }) {
|
|
1826
|
-
return /* @__PURE__ */ (0,
|
|
1982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1827
1983
|
"div",
|
|
1828
1984
|
{
|
|
1829
1985
|
"data-slot": "field-title",
|
|
@@ -1833,7 +1989,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1833
1989
|
);
|
|
1834
1990
|
}
|
|
1835
1991
|
function FieldDescription({ className, ...props }) {
|
|
1836
|
-
return /* @__PURE__ */ (0,
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1837
1993
|
"p",
|
|
1838
1994
|
{
|
|
1839
1995
|
"data-slot": "field-description",
|
|
@@ -1846,7 +2002,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1846
2002
|
);
|
|
1847
2003
|
}
|
|
1848
2004
|
function FieldSeparator({ className, children, ...props }) {
|
|
1849
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1850
2006
|
"div",
|
|
1851
2007
|
{
|
|
1852
2008
|
"data-slot": "field-separator",
|
|
@@ -1854,8 +2010,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1854
2010
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
1855
2011
|
...props,
|
|
1856
2012
|
children: [
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1858
|
-
children ? /* @__PURE__ */ (0,
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2014
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1859
2015
|
"span",
|
|
1860
2016
|
{
|
|
1861
2017
|
"data-slot": "field-separator-content",
|
|
@@ -1869,9 +2025,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1869
2025
|
}
|
|
1870
2026
|
function FieldError2({ className, children, errors, ...props }) {
|
|
1871
2027
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
1872
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0,
|
|
2028
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { children: message }, message)) }) : null);
|
|
1873
2029
|
if (!content) return null;
|
|
1874
|
-
return /* @__PURE__ */ (0,
|
|
2030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1875
2031
|
"div",
|
|
1876
2032
|
{
|
|
1877
2033
|
role: "alert",
|
|
@@ -1886,7 +2042,7 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
1886
2042
|
// src/ui/form-feedback/form-feedback.tsx
|
|
1887
2043
|
var import_react8 = require("react");
|
|
1888
2044
|
var import_lucide_react8 = require("lucide-react");
|
|
1889
|
-
var
|
|
2045
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1890
2046
|
function useFormFeedback(options) {
|
|
1891
2047
|
const resetMs = options?.successResetMs ?? 2500;
|
|
1892
2048
|
const [state, setState] = (0, import_react8.useState)({ status: "idle" });
|
|
@@ -1916,57 +2072,57 @@ function useFormFeedback(options) {
|
|
|
1916
2072
|
return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
|
|
1917
2073
|
}
|
|
1918
2074
|
function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
|
|
1919
|
-
if (state.status === "idle") return /* @__PURE__ */ (0,
|
|
2075
|
+
if (state.status === "idle") return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
1920
2076
|
const error = state.status === "error";
|
|
1921
2077
|
const success = state.status === "success";
|
|
1922
|
-
return /* @__PURE__ */ (0,
|
|
1923
|
-
state.status === "pending" && /* @__PURE__ */ (0,
|
|
1924
|
-
success && /* @__PURE__ */ (0,
|
|
1925
|
-
error && /* @__PURE__ */ (0,
|
|
1926
|
-
/* @__PURE__ */ (0,
|
|
2078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { role: error ? "alert" : "status", "aria-live": "polite", className: cn("inline-flex h-5 items-center gap-1.5 text-xs", error && "text-destructive", success && "text-success", state.status === "pending" && "text-muted-foreground", className), children: [
|
|
2079
|
+
state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2080
|
+
success && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2081
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react8.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
1927
2083
|
] });
|
|
1928
2084
|
}
|
|
1929
2085
|
|
|
1930
2086
|
// src/ui/form-row/form-row.tsx
|
|
1931
|
-
var
|
|
2087
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1932
2088
|
function FormRow({ label, htmlFor, required, hint, error, className, children }) {
|
|
1933
2089
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
1934
2090
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
1935
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
2091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
|
|
1937
2093
|
label,
|
|
1938
|
-
required && /* @__PURE__ */ (0,
|
|
1939
|
-
/* @__PURE__ */ (0,
|
|
1940
|
-
/* @__PURE__ */ (0,
|
|
2094
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
|
|
1941
2097
|
] })
|
|
1942
2098
|
] }),
|
|
1943
2099
|
children,
|
|
1944
|
-
hint && /* @__PURE__ */ (0,
|
|
1945
|
-
error && /* @__PURE__ */ (0,
|
|
2100
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
|
|
2101
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
|
|
1946
2102
|
] });
|
|
1947
2103
|
}
|
|
1948
2104
|
|
|
1949
2105
|
// src/ui/icon-button/icon-button.tsx
|
|
1950
|
-
var
|
|
2106
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
1951
2107
|
|
|
1952
2108
|
// src/ui/tooltip/tooltip.tsx
|
|
1953
|
-
var
|
|
1954
|
-
var
|
|
1955
|
-
var
|
|
2109
|
+
var React6 = __toESM(require("react"), 1);
|
|
2110
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
2111
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1956
2112
|
function TooltipTrigger({
|
|
1957
2113
|
delay = 0,
|
|
1958
2114
|
children,
|
|
1959
2115
|
...props
|
|
1960
2116
|
}) {
|
|
1961
|
-
const [trigger, tooltip] =
|
|
1962
|
-
return /* @__PURE__ */ (0,
|
|
1963
|
-
|
|
2117
|
+
const [trigger, tooltip] = React6.Children.toArray(children);
|
|
2118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2119
|
+
import_react_aria_components16.TooltipTrigger,
|
|
1964
2120
|
{
|
|
1965
2121
|
"data-slot": "tooltip-trigger",
|
|
1966
2122
|
delay,
|
|
1967
2123
|
...props,
|
|
1968
2124
|
children: [
|
|
1969
|
-
/* @__PURE__ */ (0,
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components16.Focusable, { children: trigger }),
|
|
1970
2126
|
tooltip
|
|
1971
2127
|
]
|
|
1972
2128
|
}
|
|
@@ -1980,8 +2136,8 @@ function Tooltip({
|
|
|
1980
2136
|
children,
|
|
1981
2137
|
...props
|
|
1982
2138
|
}) {
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
1984
|
-
|
|
2139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2140
|
+
import_react_aria_components16.Tooltip,
|
|
1985
2141
|
{
|
|
1986
2142
|
"data-slot": "tooltip-content",
|
|
1987
2143
|
placement,
|
|
@@ -1994,8 +2150,8 @@ function Tooltip({
|
|
|
1994
2150
|
...props,
|
|
1995
2151
|
children: [
|
|
1996
2152
|
children,
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
1998
|
-
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2154
|
+
import_react_aria_components16.OverlayArrow,
|
|
1999
2155
|
{
|
|
2000
2156
|
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
|
|
2001
2157
|
style: ({ placement: placement2, defaultStyle }) => ({
|
|
@@ -2012,7 +2168,7 @@ function Tooltip({
|
|
|
2012
2168
|
}
|
|
2013
2169
|
|
|
2014
2170
|
// src/ui/icon-button/icon-button.tsx
|
|
2015
|
-
var
|
|
2171
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2016
2172
|
function IconButton({
|
|
2017
2173
|
label,
|
|
2018
2174
|
children,
|
|
@@ -2025,9 +2181,9 @@ function IconButton({
|
|
|
2025
2181
|
buttonVariants({ variant, size: "icon" }),
|
|
2026
2182
|
className
|
|
2027
2183
|
);
|
|
2028
|
-
return /* @__PURE__ */ (0,
|
|
2029
|
-
href ? /* @__PURE__ */ (0,
|
|
2030
|
-
|
|
2184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TooltipTrigger, { children: [
|
|
2185
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2186
|
+
import_react_aria_components17.Link,
|
|
2031
2187
|
{
|
|
2032
2188
|
"data-slot": "icon-button",
|
|
2033
2189
|
"aria-label": label,
|
|
@@ -2035,7 +2191,7 @@ function IconButton({
|
|
|
2035
2191
|
className: linkClassName,
|
|
2036
2192
|
children
|
|
2037
2193
|
}
|
|
2038
|
-
) : /* @__PURE__ */ (0,
|
|
2194
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2039
2195
|
Button,
|
|
2040
2196
|
{
|
|
2041
2197
|
"data-slot": "icon-button",
|
|
@@ -2047,7 +2203,7 @@ function IconButton({
|
|
|
2047
2203
|
children
|
|
2048
2204
|
}
|
|
2049
2205
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Tooltip, { children: label })
|
|
2051
2207
|
] });
|
|
2052
2208
|
}
|
|
2053
2209
|
|
|
@@ -2056,29 +2212,29 @@ var import_class_variance_authority9 = require("class-variance-authority");
|
|
|
2056
2212
|
|
|
2057
2213
|
// src/ui/input/input.tsx
|
|
2058
2214
|
var import_react9 = require("react");
|
|
2059
|
-
var
|
|
2060
|
-
var
|
|
2215
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
2216
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2061
2217
|
var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type, ...props }, ref) {
|
|
2062
|
-
return /* @__PURE__ */ (0,
|
|
2218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components18.Input, { ref, type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
2063
2219
|
});
|
|
2064
2220
|
var Input3 = InputImpl;
|
|
2065
2221
|
|
|
2066
2222
|
// src/ui/textarea/textarea.tsx
|
|
2067
2223
|
var import_react10 = require("react");
|
|
2068
|
-
var
|
|
2069
|
-
var
|
|
2224
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
2225
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2070
2226
|
var TextareaImpl = (0, import_react10.forwardRef)(function Textarea({ className, ...props }, ref) {
|
|
2071
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components19.TextArea, { ref, "data-slot": "textarea", className: cn("min-h-20 w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
2072
2228
|
});
|
|
2073
2229
|
var Textarea2 = TextareaImpl;
|
|
2074
2230
|
|
|
2075
2231
|
// src/ui/input-group/input-group.tsx
|
|
2076
|
-
var
|
|
2232
|
+
var import_jsx_runtime32 = (
|
|
2077
2233
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
2078
2234
|
require("react/jsx-runtime")
|
|
2079
2235
|
);
|
|
2080
2236
|
function InputGroup({ className, ...props }) {
|
|
2081
|
-
return /* @__PURE__ */ (0,
|
|
2237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2082
2238
|
"div",
|
|
2083
2239
|
{
|
|
2084
2240
|
role: "group",
|
|
@@ -2113,7 +2269,7 @@ function InputGroupAddon({
|
|
|
2113
2269
|
}) {
|
|
2114
2270
|
return (
|
|
2115
2271
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2117
2273
|
"div",
|
|
2118
2274
|
{
|
|
2119
2275
|
role: "group",
|
|
@@ -2144,7 +2300,7 @@ function InputGroupButton({
|
|
|
2144
2300
|
...props
|
|
2145
2301
|
}) {
|
|
2146
2302
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
2147
|
-
return /* @__PURE__ */ (0,
|
|
2303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2148
2304
|
Button,
|
|
2149
2305
|
{
|
|
2150
2306
|
"data-slot": "input-group-button",
|
|
@@ -2157,7 +2313,7 @@ function InputGroupButton({
|
|
|
2157
2313
|
);
|
|
2158
2314
|
}
|
|
2159
2315
|
function InputGroupText({ className, ...props }) {
|
|
2160
|
-
return /* @__PURE__ */ (0,
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2161
2317
|
"span",
|
|
2162
2318
|
{
|
|
2163
2319
|
"data-slot": "input-group-text",
|
|
@@ -2170,7 +2326,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
2170
2326
|
);
|
|
2171
2327
|
}
|
|
2172
2328
|
function InputGroupInput({ className, ...props }) {
|
|
2173
|
-
return /* @__PURE__ */ (0,
|
|
2329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2174
2330
|
Input3,
|
|
2175
2331
|
{
|
|
2176
2332
|
"data-slot": "input-group-control",
|
|
@@ -2183,7 +2339,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
2183
2339
|
);
|
|
2184
2340
|
}
|
|
2185
2341
|
function InputGroupTextarea({ className, ...props }) {
|
|
2186
|
-
return /* @__PURE__ */ (0,
|
|
2342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2187
2343
|
Textarea2,
|
|
2188
2344
|
{
|
|
2189
2345
|
"data-slot": "input-group-control",
|
|
@@ -2197,42 +2353,63 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
2197
2353
|
}
|
|
2198
2354
|
|
|
2199
2355
|
// src/ui/kbd/kbd.tsx
|
|
2200
|
-
var
|
|
2356
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2201
2357
|
function Kbd({ className, ...props }) {
|
|
2202
|
-
return /* @__PURE__ */ (0,
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", className), ...props });
|
|
2203
2359
|
}
|
|
2204
2360
|
function KbdGroup({ className, ...props }) {
|
|
2205
|
-
return /* @__PURE__ */ (0,
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
|
|
2206
2362
|
}
|
|
2207
2363
|
|
|
2208
2364
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
2209
2365
|
var import_lucide_react9 = require("lucide-react");
|
|
2210
|
-
var
|
|
2366
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2211
2367
|
function LoadingOverlay({ label = "Cargando", className, ...props }) {
|
|
2212
|
-
return /* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2214
|
-
/* @__PURE__ */ (0,
|
|
2368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { role: "status", "aria-live": "polite", className: cn("absolute inset-0 z-10 flex items-center justify-center bg-background/70 backdrop-blur-[2px]", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react9.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label })
|
|
2215
2371
|
] }) });
|
|
2216
2372
|
}
|
|
2217
2373
|
|
|
2218
2374
|
// src/ui/menu/menu.tsx
|
|
2219
|
-
var
|
|
2220
|
-
var
|
|
2221
|
-
var MenuTrigger =
|
|
2375
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
2376
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2377
|
+
var MenuTrigger = import_react_aria_components20.MenuTrigger;
|
|
2222
2378
|
function MenuContent({ className, ...props }) {
|
|
2223
|
-
return /* @__PURE__ */ (0,
|
|
2379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.Popover, { "data-slot": "menu-content", className: cn("min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2224
2380
|
}
|
|
2225
2381
|
function Menu({ className, ...props }) {
|
|
2226
|
-
return /* @__PURE__ */ (0,
|
|
2382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
2227
2383
|
}
|
|
2228
2384
|
function MenuItem({ className, children, ...props }) {
|
|
2229
|
-
return /* @__PURE__ */ (0,
|
|
2385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.MenuItem, { "data-slot": "menu-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
// src/ui/metric-card/metric-card.tsx
|
|
2389
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2390
|
+
function MetricCard({
|
|
2391
|
+
className,
|
|
2392
|
+
label,
|
|
2393
|
+
value,
|
|
2394
|
+
description,
|
|
2395
|
+
icon,
|
|
2396
|
+
tone = "default",
|
|
2397
|
+
...props
|
|
2398
|
+
}) {
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
|
|
2400
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "data-slot": "metric-card-icon", className: "shrink-0 text-muted-foreground", children: icon }) : null,
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "min-w-0", children: [
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "metric-card-label", className: "text-sm text-muted-foreground", children: label }),
|
|
2403
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { "data-slot": "metric-card-value", className: "mt-1 block text-2xl font-semibold tracking-tight", children: value }),
|
|
2404
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "metric-card-description", className: "mt-1 text-xs text-muted-foreground", children: description }) : null
|
|
2405
|
+
] })
|
|
2406
|
+
] }) });
|
|
2230
2407
|
}
|
|
2231
2408
|
|
|
2232
2409
|
// src/ui/otp-input/otp-input.tsx
|
|
2233
2410
|
var import_react11 = require("react");
|
|
2234
|
-
var
|
|
2235
|
-
var
|
|
2411
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
2412
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2236
2413
|
function normalizeOtp(value, length) {
|
|
2237
2414
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
2238
2415
|
}
|
|
@@ -2284,7 +2461,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2284
2461
|
input.setSelectionRange(position, position);
|
|
2285
2462
|
setSelectionStart(position);
|
|
2286
2463
|
}
|
|
2287
|
-
return /* @__PURE__ */ (0,
|
|
2464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2288
2465
|
"div",
|
|
2289
2466
|
{
|
|
2290
2467
|
"data-slot": "otp-input",
|
|
@@ -2294,8 +2471,8 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2294
2471
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
2295
2472
|
onPointerDown: handlePointerDown,
|
|
2296
2473
|
children: [
|
|
2297
|
-
/* @__PURE__ */ (0,
|
|
2298
|
-
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2475
|
+
import_react_aria_components21.Input,
|
|
2299
2476
|
{
|
|
2300
2477
|
...props,
|
|
2301
2478
|
ref: inputRef,
|
|
@@ -2334,7 +2511,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2334
2511
|
}
|
|
2335
2512
|
}
|
|
2336
2513
|
),
|
|
2337
|
-
slots.map((slot, index) => /* @__PURE__ */ (0,
|
|
2514
|
+
slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2338
2515
|
"span",
|
|
2339
2516
|
{
|
|
2340
2517
|
"aria-hidden": "true",
|
|
@@ -2357,56 +2534,113 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2357
2534
|
var OtpInput2 = OtpInputImpl;
|
|
2358
2535
|
|
|
2359
2536
|
// src/ui/page-header/page-header.tsx
|
|
2360
|
-
var
|
|
2537
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2361
2538
|
function PageHeader({ className, ...props }) {
|
|
2362
|
-
return /* @__PURE__ */ (0,
|
|
2539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("header", { "data-slot": "page-header", className: cn("flex flex-col gap-4 py-2 sm:flex-row sm:items-center sm:justify-between", className), ...props });
|
|
2363
2540
|
}
|
|
2364
2541
|
function PageHeaderHeading({ className, ...props }) {
|
|
2365
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
2366
2543
|
}
|
|
2367
2544
|
function PageHeaderTitle({ className, ...props }) {
|
|
2368
|
-
return /* @__PURE__ */ (0,
|
|
2545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
|
|
2369
2546
|
}
|
|
2370
2547
|
function PageHeaderDescription({ className, ...props }) {
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
|
|
2372
2549
|
}
|
|
2373
2550
|
function PageHeaderActions({ className, ...props }) {
|
|
2374
|
-
return /* @__PURE__ */ (0,
|
|
2551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
|
|
2375
2552
|
}
|
|
2376
2553
|
|
|
2377
2554
|
// src/ui/pagination/pagination.tsx
|
|
2378
2555
|
var import_lucide_react10 = require("lucide-react");
|
|
2379
|
-
var
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
return
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
page,
|
|
2386
|
-
" de ",
|
|
2556
|
+
var React7 = __toESM(require("react"), 1);
|
|
2557
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2558
|
+
function visiblePages(page, pageCount, siblingCount) {
|
|
2559
|
+
return [
|
|
2560
|
+
.../* @__PURE__ */ new Set([
|
|
2561
|
+
1,
|
|
2562
|
+
...Array.from({ length: siblingCount * 2 + 1 }, (_, index) => page - siblingCount + index),
|
|
2387
2563
|
pageCount
|
|
2388
|
-
]
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2564
|
+
])
|
|
2565
|
+
].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
|
|
2566
|
+
}
|
|
2567
|
+
function Pagination({
|
|
2568
|
+
page,
|
|
2569
|
+
pageCount,
|
|
2570
|
+
onPageChange,
|
|
2571
|
+
ariaLabel = "Paginaci\xF3n",
|
|
2572
|
+
summary,
|
|
2573
|
+
siblingCount = 1,
|
|
2574
|
+
className
|
|
2575
|
+
}) {
|
|
2576
|
+
if (pageCount <= 1) return null;
|
|
2577
|
+
const pages = visiblePages(page, pageCount, siblingCount);
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2579
|
+
"nav",
|
|
2580
|
+
{
|
|
2581
|
+
"aria-label": ariaLabel,
|
|
2582
|
+
className: cn("flex flex-wrap items-center justify-between gap-4", className),
|
|
2583
|
+
children: [
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-sm text-muted-foreground", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2587
|
+
Button,
|
|
2588
|
+
{
|
|
2589
|
+
"aria-label": "P\xE1gina anterior",
|
|
2590
|
+
isDisabled: page <= 1,
|
|
2591
|
+
onPress: () => onPageChange(page - 1),
|
|
2592
|
+
size: "icon",
|
|
2593
|
+
variant: "ghost",
|
|
2594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react10.ChevronLeft, {})
|
|
2595
|
+
}
|
|
2596
|
+
),
|
|
2597
|
+
pages.map((item, index) => {
|
|
2598
|
+
const previousPage = pages[index - 1];
|
|
2599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(React7.Fragment, { children: [
|
|
2600
|
+
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": "true", className: "px-1 text-muted-foreground", children: "\u2026" }) : null,
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2602
|
+
Button,
|
|
2603
|
+
{
|
|
2604
|
+
"aria-current": item === page ? "page" : void 0,
|
|
2605
|
+
"aria-label": `P\xE1gina ${item}`,
|
|
2606
|
+
onPress: () => onPageChange(item),
|
|
2607
|
+
size: "icon",
|
|
2608
|
+
variant: item === page ? "secondary" : "ghost",
|
|
2609
|
+
children: item
|
|
2610
|
+
}
|
|
2611
|
+
)
|
|
2612
|
+
] }, item);
|
|
2613
|
+
}),
|
|
2614
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2615
|
+
Button,
|
|
2616
|
+
{
|
|
2617
|
+
"aria-label": "P\xE1gina siguiente",
|
|
2618
|
+
isDisabled: page >= pageCount,
|
|
2619
|
+
onPress: () => onPageChange(page + 1),
|
|
2620
|
+
size: "icon",
|
|
2621
|
+
variant: "ghost",
|
|
2622
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react10.ChevronRight, {})
|
|
2623
|
+
}
|
|
2624
|
+
)
|
|
2625
|
+
] })
|
|
2626
|
+
]
|
|
2627
|
+
}
|
|
2628
|
+
);
|
|
2395
2629
|
}
|
|
2396
2630
|
|
|
2397
2631
|
// src/ui/popover/popover.tsx
|
|
2398
|
-
var
|
|
2399
|
-
var
|
|
2400
|
-
var PopoverTrigger =
|
|
2632
|
+
var import_react_aria_components22 = require("react-aria-components");
|
|
2633
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2634
|
+
var PopoverTrigger = import_react_aria_components22.DialogTrigger;
|
|
2401
2635
|
function Popover4({ className, ...props }) {
|
|
2402
|
-
return /* @__PURE__ */ (0,
|
|
2636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components22.Popover, { "data-slot": "popover", offset: 6, className: cn("min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2403
2637
|
}
|
|
2404
2638
|
var PopoverContent = Popover4;
|
|
2405
2639
|
|
|
2406
2640
|
// src/ui/quantity-input/quantity-input.tsx
|
|
2407
2641
|
var import_lucide_react11 = require("lucide-react");
|
|
2408
|
-
var
|
|
2409
|
-
var
|
|
2642
|
+
var import_react_aria_components23 = require("react-aria-components");
|
|
2643
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2410
2644
|
function QuantityInput({
|
|
2411
2645
|
className,
|
|
2412
2646
|
inputClassName,
|
|
@@ -2416,23 +2650,23 @@ function QuantityInput({
|
|
|
2416
2650
|
step = 1,
|
|
2417
2651
|
...props
|
|
2418
2652
|
}) {
|
|
2419
|
-
return /* @__PURE__ */ (0,
|
|
2420
|
-
|
|
2653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2654
|
+
import_react_aria_components23.NumberField,
|
|
2421
2655
|
{
|
|
2422
2656
|
...props,
|
|
2423
2657
|
minValue,
|
|
2424
2658
|
step,
|
|
2425
2659
|
"data-slot": "quantity-input",
|
|
2426
2660
|
className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
2427
|
-
children: /* @__PURE__ */ (0,
|
|
2428
|
-
|
|
2661
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2662
|
+
import_react_aria_components23.Group,
|
|
2429
2663
|
{
|
|
2430
2664
|
"data-slot": "quantity-input-group",
|
|
2431
2665
|
className: "flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border border-border bg-background text-foreground transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive",
|
|
2432
2666
|
children: [
|
|
2433
|
-
/* @__PURE__ */ (0,
|
|
2434
|
-
/* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Button, { slot: "decrement", "aria-label": decrementAriaLabel, "data-slot": "quantity-input-decrement", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-r border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.Minus, { "aria-hidden": "true", className: "size-4" }) }),
|
|
2668
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Input, { "data-slot": "quantity-input-value", className: cn("w-14 min-w-0 bg-transparent px-1 text-center text-sm tabular-nums outline-none", inputClassName) }),
|
|
2669
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components23.Button, { slot: "increment", "aria-label": incrementAriaLabel, "data-slot": "quantity-input-increment", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-l border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.Plus, { "aria-hidden": "true", className: "size-4" }) })
|
|
2436
2670
|
]
|
|
2437
2671
|
}
|
|
2438
2672
|
)
|
|
@@ -2440,51 +2674,39 @@ function QuantityInput({
|
|
|
2440
2674
|
);
|
|
2441
2675
|
}
|
|
2442
2676
|
|
|
2443
|
-
// src/ui/search-field/search-field.tsx
|
|
2444
|
-
var import_react_aria_components23 = require("react-aria-components");
|
|
2445
|
-
var import_lucide_react12 = require("lucide-react");
|
|
2446
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2447
|
-
var SearchField = import_react_aria_components23.SearchField;
|
|
2448
|
-
function SearchInput({ className, ...props }) {
|
|
2449
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components23.Input, { "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 });
|
|
2450
|
-
}
|
|
2451
|
-
function SearchClearButton({ className, children = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react12.X, { "aria-hidden": "true", className: "size-4" }), ...props }) {
|
|
2452
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components23.Button, { 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 });
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
2677
|
// src/ui/select/select.tsx
|
|
2456
2678
|
var import_react_aria_components24 = require("react-aria-components");
|
|
2457
|
-
var
|
|
2458
|
-
var
|
|
2679
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2680
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2459
2681
|
var Select = import_react_aria_components24.Select;
|
|
2460
2682
|
function SelectTrigger({ className, children, ...props }) {
|
|
2461
|
-
return /* @__PURE__ */ (0,
|
|
2683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.Button, { "data-slot": "select-trigger", className: cn("group/select-trigger flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2462
2684
|
typeof children === "function" ? children(state) : children,
|
|
2463
|
-
/* @__PURE__ */ (0,
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.ChevronDown, { "aria-hidden": "true", className: "ml-auto size-4 text-muted-foreground transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none" })
|
|
2464
2686
|
] }) });
|
|
2465
2687
|
}
|
|
2466
2688
|
function SelectValue({ className, ...props }) {
|
|
2467
|
-
return /* @__PURE__ */ (0,
|
|
2689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.SelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
|
|
2468
2690
|
}
|
|
2469
2691
|
function SelectContent({ className, ...props }) {
|
|
2470
|
-
return /* @__PURE__ */ (0,
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.Popover, { "data-slot": "select-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2471
2693
|
}
|
|
2472
2694
|
function SelectList({ className, ...props }) {
|
|
2473
|
-
return /* @__PURE__ */ (0,
|
|
2695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.ListBox, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
|
|
2474
2696
|
}
|
|
2475
2697
|
function SelectItem({ className, children, ...props }) {
|
|
2476
|
-
return /* @__PURE__ */ (0,
|
|
2698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components24.ListBoxItem, { "data-slot": "select-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2477
2699
|
}
|
|
2478
2700
|
|
|
2479
2701
|
// src/ui/sheet/sheet.tsx
|
|
2480
|
-
var
|
|
2702
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2481
2703
|
var import_react_aria_components25 = require("react-aria-components");
|
|
2482
|
-
var
|
|
2704
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2483
2705
|
function SheetTrigger({ ...props }) {
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_aria_components25.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
|
|
2485
2707
|
}
|
|
2486
2708
|
function SheetClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2487
|
-
return /* @__PURE__ */ (0,
|
|
2709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2488
2710
|
Button,
|
|
2489
2711
|
{
|
|
2490
2712
|
slot: "close",
|
|
@@ -2501,7 +2723,7 @@ function SheetOverlay({
|
|
|
2501
2723
|
children,
|
|
2502
2724
|
...props
|
|
2503
2725
|
}) {
|
|
2504
|
-
return /* @__PURE__ */ (0,
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2505
2727
|
import_react_aria_components25.ModalOverlay,
|
|
2506
2728
|
{
|
|
2507
2729
|
"data-slot": "sheet-overlay",
|
|
@@ -2522,7 +2744,7 @@ function Sheet({
|
|
|
2522
2744
|
showCloseButton = true,
|
|
2523
2745
|
...props
|
|
2524
2746
|
}) {
|
|
2525
|
-
return /* @__PURE__ */ (0,
|
|
2747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2526
2748
|
import_react_aria_components25.Modal,
|
|
2527
2749
|
{
|
|
2528
2750
|
"data-slot": "sheet-content",
|
|
@@ -2531,16 +2753,16 @@ function Sheet({
|
|
|
2531
2753
|
"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",
|
|
2532
2754
|
className
|
|
2533
2755
|
),
|
|
2534
|
-
children: /* @__PURE__ */ (0,
|
|
2756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2535
2757
|
import_react_aria_components25.Dialog,
|
|
2536
2758
|
{
|
|
2537
2759
|
"data-slot": "sheet",
|
|
2538
2760
|
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2539
2761
|
children: [
|
|
2540
2762
|
children,
|
|
2541
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
2542
|
-
/* @__PURE__ */ (0,
|
|
2543
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.XIcon, {}),
|
|
2765
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "sr-only", children: "Cerrar" })
|
|
2544
2766
|
] })
|
|
2545
2767
|
]
|
|
2546
2768
|
}
|
|
@@ -2555,10 +2777,10 @@ function SheetContent({
|
|
|
2555
2777
|
showCloseButton = true,
|
|
2556
2778
|
...props
|
|
2557
2779
|
}) {
|
|
2558
|
-
return /* @__PURE__ */ (0,
|
|
2780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
|
|
2559
2781
|
}
|
|
2560
2782
|
function SheetHeader({ className, ...props }) {
|
|
2561
|
-
return /* @__PURE__ */ (0,
|
|
2783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2562
2784
|
"div",
|
|
2563
2785
|
{
|
|
2564
2786
|
"data-slot": "sheet-header",
|
|
@@ -2568,7 +2790,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
2568
2790
|
);
|
|
2569
2791
|
}
|
|
2570
2792
|
function SheetFooter({ className, ...props }) {
|
|
2571
|
-
return /* @__PURE__ */ (0,
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2572
2794
|
"div",
|
|
2573
2795
|
{
|
|
2574
2796
|
"data-slot": "sheet-footer",
|
|
@@ -2578,7 +2800,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
2578
2800
|
);
|
|
2579
2801
|
}
|
|
2580
2802
|
function SheetTitle({ className, ...props }) {
|
|
2581
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2582
2804
|
import_react_aria_components25.Heading,
|
|
2583
2805
|
{
|
|
2584
2806
|
slot: "title",
|
|
@@ -2592,7 +2814,7 @@ function SheetDescription({
|
|
|
2592
2814
|
className,
|
|
2593
2815
|
...props
|
|
2594
2816
|
}) {
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2596
2818
|
import_react_aria_components25.Text,
|
|
2597
2819
|
{
|
|
2598
2820
|
slot: "description",
|
|
@@ -2604,10 +2826,10 @@ function SheetDescription({
|
|
|
2604
2826
|
}
|
|
2605
2827
|
|
|
2606
2828
|
// src/ui/sidebar/sidebar.tsx
|
|
2607
|
-
var
|
|
2829
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2608
2830
|
var import_react12 = require("react");
|
|
2609
2831
|
var import_react_aria_components26 = require("react-aria-components");
|
|
2610
|
-
var
|
|
2832
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2611
2833
|
var SidebarContext = (0, import_react12.createContext)(null);
|
|
2612
2834
|
function useSidebar() {
|
|
2613
2835
|
const context = (0, import_react12.useContext)(SidebarContext);
|
|
@@ -2628,14 +2850,14 @@ function SidebarProvider({
|
|
|
2628
2850
|
}),
|
|
2629
2851
|
[collapsed]
|
|
2630
2852
|
);
|
|
2631
|
-
return /* @__PURE__ */ (0,
|
|
2853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SidebarContext.Provider, { value, children });
|
|
2632
2854
|
}
|
|
2633
2855
|
function Sidebar({
|
|
2634
2856
|
className,
|
|
2635
2857
|
...props
|
|
2636
2858
|
}) {
|
|
2637
2859
|
const { collapsed } = useSidebar();
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2639
2861
|
"aside",
|
|
2640
2862
|
{
|
|
2641
2863
|
"data-slot": "sidebar",
|
|
@@ -2652,7 +2874,7 @@ function SidebarHeader({
|
|
|
2652
2874
|
className,
|
|
2653
2875
|
...props
|
|
2654
2876
|
}) {
|
|
2655
|
-
return /* @__PURE__ */ (0,
|
|
2877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2656
2878
|
"div",
|
|
2657
2879
|
{
|
|
2658
2880
|
"data-slot": "sidebar-header",
|
|
@@ -2667,7 +2889,7 @@ function SidebarSearch({
|
|
|
2667
2889
|
className,
|
|
2668
2890
|
...props
|
|
2669
2891
|
}) {
|
|
2670
|
-
return /* @__PURE__ */ (0,
|
|
2892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
2671
2893
|
"button",
|
|
2672
2894
|
{
|
|
2673
2895
|
type: "button",
|
|
@@ -2678,9 +2900,9 @@ function SidebarSearch({
|
|
|
2678
2900
|
),
|
|
2679
2901
|
...props,
|
|
2680
2902
|
children: [
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2682
|
-
/* @__PURE__ */ (0,
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.Search, { className: "size-4 shrink-0" }),
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
|
|
2684
2906
|
]
|
|
2685
2907
|
}
|
|
2686
2908
|
);
|
|
@@ -2689,7 +2911,7 @@ function SidebarContent({
|
|
|
2689
2911
|
className,
|
|
2690
2912
|
...props
|
|
2691
2913
|
}) {
|
|
2692
|
-
return /* @__PURE__ */ (0,
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2693
2915
|
"nav",
|
|
2694
2916
|
{
|
|
2695
2917
|
"data-slot": "sidebar-content",
|
|
@@ -2703,7 +2925,7 @@ function SidebarFooter({
|
|
|
2703
2925
|
className,
|
|
2704
2926
|
...props
|
|
2705
2927
|
}) {
|
|
2706
|
-
return /* @__PURE__ */ (0,
|
|
2928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2707
2929
|
"div",
|
|
2708
2930
|
{
|
|
2709
2931
|
"data-slot": "sidebar-footer",
|
|
@@ -2722,14 +2944,14 @@ function SidebarGroup({
|
|
|
2722
2944
|
...props
|
|
2723
2945
|
}) {
|
|
2724
2946
|
const { collapsed } = useSidebar();
|
|
2725
|
-
return /* @__PURE__ */ (0,
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
2726
2948
|
"section",
|
|
2727
2949
|
{
|
|
2728
2950
|
"data-slot": "sidebar-group",
|
|
2729
2951
|
className: cn("mb-4 last:mb-0", className),
|
|
2730
2952
|
...props,
|
|
2731
2953
|
children: [
|
|
2732
|
-
label && /* @__PURE__ */ (0,
|
|
2954
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2733
2955
|
"h2",
|
|
2734
2956
|
{
|
|
2735
2957
|
className: cn(
|
|
@@ -2755,7 +2977,7 @@ function SidebarItem({
|
|
|
2755
2977
|
}) {
|
|
2756
2978
|
const { collapsed } = useSidebar();
|
|
2757
2979
|
const content = typeof children === "function" ? label : children ?? label;
|
|
2758
|
-
return /* @__PURE__ */ (0,
|
|
2980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2759
2981
|
import_react_aria_components26.Link,
|
|
2760
2982
|
{
|
|
2761
2983
|
"data-slot": "sidebar-item",
|
|
@@ -2767,16 +2989,16 @@ function SidebarItem({
|
|
|
2767
2989
|
typeof className === "function" ? className : className
|
|
2768
2990
|
),
|
|
2769
2991
|
...props,
|
|
2770
|
-
children: (values) => /* @__PURE__ */ (0,
|
|
2771
|
-
/* @__PURE__ */ (0,
|
|
2772
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
children: (values) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2773
2995
|
"span",
|
|
2774
2996
|
{
|
|
2775
2997
|
className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
|
|
2776
2998
|
children: typeof children === "function" ? children(values) : content
|
|
2777
2999
|
}
|
|
2778
3000
|
),
|
|
2779
|
-
badge && !collapsed && /* @__PURE__ */ (0,
|
|
3001
|
+
badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xs text-muted-foreground", children: badge })
|
|
2780
3002
|
] })
|
|
2781
3003
|
}
|
|
2782
3004
|
);
|
|
@@ -2785,7 +3007,7 @@ function SidebarSeparator({
|
|
|
2785
3007
|
className,
|
|
2786
3008
|
...props
|
|
2787
3009
|
}) {
|
|
2788
|
-
return /* @__PURE__ */ (0,
|
|
3010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2789
3011
|
"hr",
|
|
2790
3012
|
{
|
|
2791
3013
|
"data-slot": "sidebar-separator",
|
|
@@ -2796,7 +3018,7 @@ function SidebarSeparator({
|
|
|
2796
3018
|
}
|
|
2797
3019
|
function SidebarTrigger({ className, ...props }) {
|
|
2798
3020
|
const { collapsed, toggle } = useSidebar();
|
|
2799
|
-
return /* @__PURE__ */ (0,
|
|
3021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2800
3022
|
Button,
|
|
2801
3023
|
{
|
|
2802
3024
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -2805,7 +3027,7 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
2805
3027
|
variant: "ghost",
|
|
2806
3028
|
className: cn("ml-auto", className),
|
|
2807
3029
|
...props,
|
|
2808
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
3030
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.ChevronLeft, {})
|
|
2809
3031
|
}
|
|
2810
3032
|
);
|
|
2811
3033
|
}
|
|
@@ -2814,7 +3036,7 @@ function SidebarRail({
|
|
|
2814
3036
|
...props
|
|
2815
3037
|
}) {
|
|
2816
3038
|
const { toggle } = useSidebar();
|
|
2817
|
-
return /* @__PURE__ */ (0,
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2818
3040
|
"button",
|
|
2819
3041
|
{
|
|
2820
3042
|
type: "button",
|
|
@@ -2829,7 +3051,7 @@ function SidebarRail({
|
|
|
2829
3051
|
);
|
|
2830
3052
|
}
|
|
2831
3053
|
function SidebarMore({ className, ...props }) {
|
|
2832
|
-
return /* @__PURE__ */ (0,
|
|
3054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2833
3055
|
Button,
|
|
2834
3056
|
{
|
|
2835
3057
|
"aria-label": "M\xE1s opciones",
|
|
@@ -2837,26 +3059,26 @@ function SidebarMore({ className, ...props }) {
|
|
|
2837
3059
|
variant: "ghost",
|
|
2838
3060
|
className: cn("size-7", className),
|
|
2839
3061
|
...props,
|
|
2840
|
-
children: /* @__PURE__ */ (0,
|
|
3062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react14.Ellipsis, {})
|
|
2841
3063
|
}
|
|
2842
3064
|
);
|
|
2843
3065
|
}
|
|
2844
3066
|
|
|
2845
3067
|
// src/ui/skeleton/skeleton.tsx
|
|
2846
|
-
var
|
|
3068
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2847
3069
|
function Skeleton({ className, ...props }) {
|
|
2848
|
-
return /* @__PURE__ */ (0,
|
|
3070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
2849
3071
|
}
|
|
2850
3072
|
|
|
2851
3073
|
// src/ui/submit-button/submit-button.tsx
|
|
2852
3074
|
var import_react_dom = require("react-dom");
|
|
2853
|
-
var
|
|
2854
|
-
var
|
|
3075
|
+
var import_lucide_react15 = require("lucide-react");
|
|
3076
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2855
3077
|
function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
|
|
2856
3078
|
const { pending } = (0, import_react_dom.useFormStatus)();
|
|
2857
3079
|
const busy = pending || loading;
|
|
2858
|
-
return /* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react15.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2860
3082
|
pendingLabel
|
|
2861
3083
|
] }) : children });
|
|
2862
3084
|
}
|
|
@@ -2864,7 +3086,7 @@ function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, child
|
|
|
2864
3086
|
// src/ui/switch/switch.tsx
|
|
2865
3087
|
var import_react13 = require("react");
|
|
2866
3088
|
var import_react_aria_components27 = require("react-aria-components");
|
|
2867
|
-
var
|
|
3089
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2868
3090
|
var switchSizes = {
|
|
2869
3091
|
sm: {
|
|
2870
3092
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -2920,7 +3142,7 @@ function Switch({
|
|
|
2920
3142
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
2921
3143
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
2922
3144
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
3145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2924
3146
|
import_react_aria_components27.Switch,
|
|
2925
3147
|
{
|
|
2926
3148
|
"data-slot": "switch",
|
|
@@ -2937,8 +3159,8 @@ function Switch({
|
|
|
2937
3159
|
children: (state) => {
|
|
2938
3160
|
const isThumbActive = state.isHovered || state.isPressed;
|
|
2939
3161
|
const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2942
3164
|
"span",
|
|
2943
3165
|
{
|
|
2944
3166
|
"aria-hidden": "true",
|
|
@@ -2952,7 +3174,7 @@ function Switch({
|
|
|
2952
3174
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
2953
3175
|
styles.control
|
|
2954
3176
|
),
|
|
2955
|
-
children: /* @__PURE__ */ (0,
|
|
3177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2956
3178
|
"span",
|
|
2957
3179
|
{
|
|
2958
3180
|
"data-slot": "switch-thumb",
|
|
@@ -2972,9 +3194,9 @@ function Switch({
|
|
|
2972
3194
|
)
|
|
2973
3195
|
}
|
|
2974
3196
|
),
|
|
2975
|
-
children || description ? /* @__PURE__ */ (0,
|
|
2976
|
-
children ? /* @__PURE__ */ (0,
|
|
2977
|
-
description ? /* @__PURE__ */ (0,
|
|
3197
|
+
children || description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
3198
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
3199
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
|
|
2978
3200
|
] }) : null
|
|
2979
3201
|
] });
|
|
2980
3202
|
}
|
|
@@ -2983,9 +3205,9 @@ function Switch({
|
|
|
2983
3205
|
}
|
|
2984
3206
|
|
|
2985
3207
|
// src/ui/table/table.tsx
|
|
2986
|
-
var
|
|
3208
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2987
3209
|
function Table({ className, ...props }) {
|
|
2988
|
-
return /* @__PURE__ */ (0,
|
|
3210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2989
3211
|
"table",
|
|
2990
3212
|
{
|
|
2991
3213
|
"data-slot": "table",
|
|
@@ -2995,10 +3217,10 @@ function Table({ className, ...props }) {
|
|
|
2995
3217
|
) });
|
|
2996
3218
|
}
|
|
2997
3219
|
function TableHeader({ className, ...props }) {
|
|
2998
|
-
return /* @__PURE__ */ (0,
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
2999
3221
|
}
|
|
3000
3222
|
function TableBody({ className, ...props }) {
|
|
3001
|
-
return /* @__PURE__ */ (0,
|
|
3223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3002
3224
|
"tbody",
|
|
3003
3225
|
{
|
|
3004
3226
|
"data-slot": "table-body",
|
|
@@ -3008,7 +3230,7 @@ function TableBody({ className, ...props }) {
|
|
|
3008
3230
|
);
|
|
3009
3231
|
}
|
|
3010
3232
|
function TableRow({ className, ...props }) {
|
|
3011
|
-
return /* @__PURE__ */ (0,
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3012
3234
|
"tr",
|
|
3013
3235
|
{
|
|
3014
3236
|
"data-slot": "table-row",
|
|
@@ -3021,7 +3243,7 @@ function TableRow({ className, ...props }) {
|
|
|
3021
3243
|
);
|
|
3022
3244
|
}
|
|
3023
3245
|
function TableHead({ className, ...props }) {
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3025
3247
|
"th",
|
|
3026
3248
|
{
|
|
3027
3249
|
"data-slot": "table-head",
|
|
@@ -3034,7 +3256,7 @@ function TableHead({ className, ...props }) {
|
|
|
3034
3256
|
);
|
|
3035
3257
|
}
|
|
3036
3258
|
function TableCell({ className, ...props }) {
|
|
3037
|
-
return /* @__PURE__ */ (0,
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3038
3260
|
"td",
|
|
3039
3261
|
{
|
|
3040
3262
|
"data-slot": "table-cell",
|
|
@@ -3044,7 +3266,7 @@ function TableCell({ className, ...props }) {
|
|
|
3044
3266
|
);
|
|
3045
3267
|
}
|
|
3046
3268
|
function TableCaption({ className, ...props }) {
|
|
3047
|
-
return /* @__PURE__ */ (0,
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3048
3270
|
"caption",
|
|
3049
3271
|
{
|
|
3050
3272
|
"data-slot": "table-caption",
|
|
@@ -3054,7 +3276,7 @@ function TableCaption({ className, ...props }) {
|
|
|
3054
3276
|
);
|
|
3055
3277
|
}
|
|
3056
3278
|
function TableFooter({ className, ...props }) {
|
|
3057
|
-
return /* @__PURE__ */ (0,
|
|
3279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3058
3280
|
"tfoot",
|
|
3059
3281
|
{
|
|
3060
3282
|
"data-slot": "table-footer",
|
|
@@ -3066,27 +3288,27 @@ function TableFooter({ className, ...props }) {
|
|
|
3066
3288
|
|
|
3067
3289
|
// src/ui/tabs/tabs.tsx
|
|
3068
3290
|
var import_react_aria_components28 = require("react-aria-components");
|
|
3069
|
-
var
|
|
3291
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3070
3292
|
function Tabs({ className, ...props }) {
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.Tabs, { "data-slot": "tabs", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("flex flex-col gap-2", value)), ...props });
|
|
3072
3294
|
}
|
|
3073
3295
|
function TabsList({ className, ...props }) {
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabList, { "data-slot": "tabs-list", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
|
|
3075
3297
|
}
|
|
3076
3298
|
function TabsTrigger({ className, ...props }) {
|
|
3077
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.Tab, { "data-slot": "tabs-trigger", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", value)), ...props });
|
|
3078
3300
|
}
|
|
3079
3301
|
function TabsPanels({ className, ...props }) {
|
|
3080
|
-
return /* @__PURE__ */ (0,
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
3081
3303
|
}
|
|
3082
3304
|
function TabsContent({ className, ...props }) {
|
|
3083
|
-
return /* @__PURE__ */ (0,
|
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_aria_components28.TabPanel, { "data-slot": "tabs-content", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
|
|
3084
3306
|
}
|
|
3085
3307
|
|
|
3086
3308
|
// src/ui/toast/toast.tsx
|
|
3087
3309
|
var import_react14 = require("react");
|
|
3088
3310
|
var import_sileo = require("sileo");
|
|
3089
|
-
var
|
|
3311
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3090
3312
|
function toSileoOptions({ title, description, duration, position, action }) {
|
|
3091
3313
|
return {
|
|
3092
3314
|
title,
|
|
@@ -3125,18 +3347,18 @@ function useToast() {
|
|
|
3125
3347
|
return toast;
|
|
3126
3348
|
}
|
|
3127
3349
|
function ToastProvider({ children }) {
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
3129
3351
|
children,
|
|
3130
|
-
/* @__PURE__ */ (0,
|
|
3352
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Toaster, {})
|
|
3131
3353
|
] });
|
|
3132
3354
|
}
|
|
3133
3355
|
function Toaster({ position }) {
|
|
3134
|
-
return /* @__PURE__ */ (0,
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_sileo.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
3135
3357
|
}
|
|
3136
3358
|
function ToastViewport({ position, visiblePosition, className }) {
|
|
3137
3359
|
void className;
|
|
3138
3360
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
3139
|
-
return /* @__PURE__ */ (0,
|
|
3361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Toaster, { position });
|
|
3140
3362
|
}
|
|
3141
3363
|
function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
|
|
3142
3364
|
(0, import_react14.useEffect)(() => {
|
|
@@ -3151,15 +3373,15 @@ function Toast({ id, title, description, variant = "default", action, state = "o
|
|
|
3151
3373
|
}
|
|
3152
3374
|
|
|
3153
3375
|
// src/ui/toolbar/toolbar.tsx
|
|
3154
|
-
var
|
|
3376
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3155
3377
|
function Toolbar({ className, ...props }) {
|
|
3156
|
-
return /* @__PURE__ */ (0,
|
|
3378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
3157
3379
|
}
|
|
3158
3380
|
function ToolbarGroup({ className, ...props }) {
|
|
3159
|
-
return /* @__PURE__ */ (0,
|
|
3381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
|
|
3160
3382
|
}
|
|
3161
3383
|
function ToolbarSpacer({ className, ...props }) {
|
|
3162
|
-
return /* @__PURE__ */ (0,
|
|
3384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
3163
3385
|
}
|
|
3164
3386
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3165
3387
|
0 && (module.exports = {
|
|
@@ -3170,6 +3392,17 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3170
3392
|
Alert,
|
|
3171
3393
|
AlertAction,
|
|
3172
3394
|
AlertDescription,
|
|
3395
|
+
AlertDialog,
|
|
3396
|
+
AlertDialogAction,
|
|
3397
|
+
AlertDialogCancel,
|
|
3398
|
+
AlertDialogContent,
|
|
3399
|
+
AlertDialogDescription,
|
|
3400
|
+
AlertDialogFooter,
|
|
3401
|
+
AlertDialogHeader,
|
|
3402
|
+
AlertDialogOverlay,
|
|
3403
|
+
AlertDialogPortal,
|
|
3404
|
+
AlertDialogTitle,
|
|
3405
|
+
AlertDialogTrigger,
|
|
3173
3406
|
AlertTitle,
|
|
3174
3407
|
AppShell,
|
|
3175
3408
|
AppShellContent,
|
|
@@ -3203,6 +3436,9 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3203
3436
|
CardHeader,
|
|
3204
3437
|
CardTitle,
|
|
3205
3438
|
Checkbox,
|
|
3439
|
+
Collapsible,
|
|
3440
|
+
CollapsibleContent,
|
|
3441
|
+
CollapsibleTrigger,
|
|
3206
3442
|
Combobox,
|
|
3207
3443
|
ComboboxContent,
|
|
3208
3444
|
ComboboxInput,
|
|
@@ -3278,6 +3514,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3278
3514
|
MenuContent,
|
|
3279
3515
|
MenuItem,
|
|
3280
3516
|
MenuTrigger,
|
|
3517
|
+
MetricCard,
|
|
3281
3518
|
ModalDialog,
|
|
3282
3519
|
OtpInput,
|
|
3283
3520
|
PageHeader,
|
|
@@ -3290,9 +3527,6 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3290
3527
|
PopoverContent,
|
|
3291
3528
|
PopoverTrigger,
|
|
3292
3529
|
QuantityInput,
|
|
3293
|
-
SearchClearButton,
|
|
3294
|
-
SearchField,
|
|
3295
|
-
SearchInput,
|
|
3296
3530
|
Select,
|
|
3297
3531
|
SelectContent,
|
|
3298
3532
|
SelectItem,
|