@doscientos/ui 0.1.17 → 0.1.19
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 +522 -344
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -17
- package/dist/index.d.ts +60 -17
- package/dist/index.js +488 -315
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,16 @@ __export(index_exports, {
|
|
|
83
83
|
CommandItem: () => CommandItem,
|
|
84
84
|
CommandList: () => CommandList,
|
|
85
85
|
ConfirmDialog: () => ConfirmDialog,
|
|
86
|
+
Dialog: () => Dialog,
|
|
87
|
+
DialogClose: () => DialogClose,
|
|
88
|
+
DialogContent: () => DialogContent,
|
|
89
|
+
DialogDescription: () => DialogDescription,
|
|
90
|
+
DialogFooter: () => DialogFooter,
|
|
91
|
+
DialogHeader: () => DialogHeader,
|
|
92
|
+
DialogOverlay: () => DialogOverlay,
|
|
93
|
+
DialogPortal: () => DialogPortal,
|
|
94
|
+
DialogTitle: () => DialogTitle,
|
|
95
|
+
DialogTrigger: () => DialogTrigger,
|
|
86
96
|
Drawer: () => Drawer,
|
|
87
97
|
DrawerDescription: () => DrawerDescription,
|
|
88
98
|
DrawerFooter: () => DrawerFooter,
|
|
@@ -202,6 +212,7 @@ __export(index_exports, {
|
|
|
202
212
|
ToolbarSpacer: () => ToolbarSpacer,
|
|
203
213
|
Tooltip: () => Tooltip,
|
|
204
214
|
TooltipTrigger: () => TooltipTrigger,
|
|
215
|
+
actionRipple: () => actionRipple,
|
|
205
216
|
alertVariants: () => alertVariants,
|
|
206
217
|
badgeVariants: () => badgeVariants,
|
|
207
218
|
buttonGroupVariants: () => buttonGroupVariants,
|
|
@@ -317,6 +328,12 @@ function useFormDirty() {
|
|
|
317
328
|
return { formRef, isDirty, markDirty: () => setIsDirty(true), reset };
|
|
318
329
|
}
|
|
319
330
|
|
|
331
|
+
// src/lib/action-ripple.ts
|
|
332
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
333
|
+
var actionRipple = (0, import_class_variance_authority.cva)(
|
|
334
|
+
"relative isolate overflow-hidden after:pointer-events-none after:absolute after:top-1/2 after:left-1/2 after:aspect-square after:w-full after:-translate-x-1/2 after:-translate-y-1/2 after:scale-0 after:rounded-full after:bg-current after:opacity-0 after:content-[''] after:transition-[scale,opacity] after:duration-300 after:ease-out active:after:scale-150 active:after:opacity-10 data-pressed:after:scale-150 data-pressed:after:opacity-10 motion-reduce:after:hidden"
|
|
335
|
+
);
|
|
336
|
+
|
|
320
337
|
// src/lib/cn.ts
|
|
321
338
|
var import_clsx = require("clsx");
|
|
322
339
|
var import_tailwind_merge = require("tailwind-merge");
|
|
@@ -449,9 +466,9 @@ function AccordionContent({
|
|
|
449
466
|
}
|
|
450
467
|
|
|
451
468
|
// src/ui/alert/alert.tsx
|
|
452
|
-
var
|
|
469
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
453
470
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
454
|
-
var alertVariants = (0,
|
|
471
|
+
var alertVariants = (0, import_class_variance_authority2.cva)(
|
|
455
472
|
"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",
|
|
456
473
|
{
|
|
457
474
|
variants: {
|
|
@@ -624,10 +641,10 @@ function AvatarGroupCount({ className, ...props }) {
|
|
|
624
641
|
}
|
|
625
642
|
|
|
626
643
|
// src/ui/badge/badge.tsx
|
|
627
|
-
var
|
|
644
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
628
645
|
var import_react_aria_components2 = require("react-aria-components");
|
|
629
646
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
630
|
-
var badgeVariants = (0,
|
|
647
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
631
648
|
"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",
|
|
632
649
|
{
|
|
633
650
|
variants: {
|
|
@@ -690,78 +707,15 @@ function BreadcrumbSeparator({ children = "/", className, ...props }) {
|
|
|
690
707
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "data-slot": "breadcrumb-separator", "aria-hidden": "true", className: cn("text-muted-foreground/60", className), ...props, children });
|
|
691
708
|
}
|
|
692
709
|
|
|
693
|
-
// src/ui/button/button.tsx
|
|
694
|
-
var import_class_variance_authority3 = require("class-variance-authority");
|
|
695
|
-
var import_react_aria_components4 = require("react-aria-components");
|
|
696
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
697
|
-
var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
698
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
699
|
-
{
|
|
700
|
-
variants: {
|
|
701
|
-
variant: {
|
|
702
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
703
|
-
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",
|
|
704
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
705
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
706
|
-
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",
|
|
707
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
708
|
-
},
|
|
709
|
-
size: {
|
|
710
|
-
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
711
|
-
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",
|
|
712
|
-
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",
|
|
713
|
-
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
714
|
-
icon: "size-8",
|
|
715
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
716
|
-
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
717
|
-
"icon-lg": "size-9"
|
|
718
|
-
}
|
|
719
|
-
},
|
|
720
|
-
defaultVariants: {
|
|
721
|
-
variant: "default",
|
|
722
|
-
size: "default"
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
);
|
|
726
|
-
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
728
|
-
import_react_aria_components4.Button,
|
|
729
|
-
{
|
|
730
|
-
"data-slot": "button",
|
|
731
|
-
"data-variant": variant,
|
|
732
|
-
"data-size": size,
|
|
733
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
734
|
-
...props
|
|
735
|
-
}
|
|
736
|
-
);
|
|
737
|
-
}
|
|
738
|
-
function LinkButton({
|
|
739
|
-
className,
|
|
740
|
-
variant = "default",
|
|
741
|
-
size = "default",
|
|
742
|
-
...props
|
|
743
|
-
}) {
|
|
744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
745
|
-
import_react_aria_components4.Link,
|
|
746
|
-
{
|
|
747
|
-
"data-slot": "button",
|
|
748
|
-
"data-variant": variant,
|
|
749
|
-
"data-size": size,
|
|
750
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
751
|
-
...props
|
|
752
|
-
}
|
|
753
|
-
);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
710
|
// src/ui/button-group/button-group.tsx
|
|
757
711
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
758
712
|
|
|
759
713
|
// src/ui/separator/separator.tsx
|
|
760
|
-
var
|
|
761
|
-
var
|
|
714
|
+
var import_react_aria_components4 = require("react-aria-components");
|
|
715
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
762
716
|
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
763
|
-
return /* @__PURE__ */ (0,
|
|
764
|
-
|
|
717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
718
|
+
import_react_aria_components4.Separator,
|
|
765
719
|
{
|
|
766
720
|
"data-slot": "separator",
|
|
767
721
|
orientation,
|
|
@@ -775,7 +729,7 @@ function Separator({ className, orientation = "horizontal", ...props }) {
|
|
|
775
729
|
}
|
|
776
730
|
|
|
777
731
|
// src/ui/button-group/button-group.tsx
|
|
778
|
-
var
|
|
732
|
+
var import_jsx_runtime8 = (
|
|
779
733
|
// biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
|
|
780
734
|
require("react/jsx-runtime")
|
|
781
735
|
);
|
|
@@ -798,7 +752,7 @@ function ButtonGroup({
|
|
|
798
752
|
orientation,
|
|
799
753
|
...props
|
|
800
754
|
}) {
|
|
801
|
-
return /* @__PURE__ */ (0,
|
|
755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
802
756
|
"div",
|
|
803
757
|
{
|
|
804
758
|
role: "group",
|
|
@@ -825,7 +779,7 @@ function ButtonGroupText({
|
|
|
825
779
|
};
|
|
826
780
|
return render(renderProps);
|
|
827
781
|
}
|
|
828
|
-
return /* @__PURE__ */ (0,
|
|
782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
829
783
|
"div",
|
|
830
784
|
{
|
|
831
785
|
"data-slot": "button-group-text",
|
|
@@ -842,7 +796,7 @@ function ButtonGroupSeparator({
|
|
|
842
796
|
orientation = "vertical",
|
|
843
797
|
...props
|
|
844
798
|
}) {
|
|
845
|
-
return /* @__PURE__ */ (0,
|
|
799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
846
800
|
Separator,
|
|
847
801
|
{
|
|
848
802
|
"data-slot": "button-group-separator",
|
|
@@ -856,6 +810,72 @@ function ButtonGroupSeparator({
|
|
|
856
810
|
);
|
|
857
811
|
}
|
|
858
812
|
|
|
813
|
+
// src/ui/button/button.tsx
|
|
814
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
815
|
+
var import_react_aria_components5 = require("react-aria-components");
|
|
816
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
817
|
+
var buttonVariants = (0, import_class_variance_authority5.cva)(
|
|
818
|
+
cn(
|
|
819
|
+
"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",
|
|
820
|
+
actionRipple()
|
|
821
|
+
),
|
|
822
|
+
{
|
|
823
|
+
variants: {
|
|
824
|
+
variant: {
|
|
825
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
826
|
+
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",
|
|
827
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
828
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
829
|
+
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",
|
|
830
|
+
link: "text-primary underline-offset-4 hover:underline after:hidden"
|
|
831
|
+
},
|
|
832
|
+
size: {
|
|
833
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
834
|
+
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",
|
|
835
|
+
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",
|
|
836
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
837
|
+
icon: "size-8",
|
|
838
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
839
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
840
|
+
"icon-lg": "size-9"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
defaultVariants: {
|
|
844
|
+
variant: "default",
|
|
845
|
+
size: "default"
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
);
|
|
849
|
+
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
851
|
+
import_react_aria_components5.Button,
|
|
852
|
+
{
|
|
853
|
+
"data-slot": "button",
|
|
854
|
+
"data-variant": variant,
|
|
855
|
+
"data-size": size,
|
|
856
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
857
|
+
...props
|
|
858
|
+
}
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
function LinkButton({
|
|
862
|
+
className,
|
|
863
|
+
variant = "default",
|
|
864
|
+
size = "default",
|
|
865
|
+
...props
|
|
866
|
+
}) {
|
|
867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
868
|
+
import_react_aria_components5.Link,
|
|
869
|
+
{
|
|
870
|
+
"data-slot": "button",
|
|
871
|
+
"data-variant": variant,
|
|
872
|
+
"data-size": size,
|
|
873
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
874
|
+
...props
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
859
879
|
// src/ui/card/card.tsx
|
|
860
880
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
861
881
|
function Card({ className, size = "default", ...props }) {
|
|
@@ -1155,36 +1175,183 @@ function ConfirmDialog({
|
|
|
1155
1175
|
);
|
|
1156
1176
|
}
|
|
1157
1177
|
|
|
1158
|
-
// src/ui/
|
|
1178
|
+
// src/ui/dialog/dialog.tsx
|
|
1179
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1180
|
+
var React2 = __toESM(require("react"), 1);
|
|
1159
1181
|
var import_react_aria_components10 = require("react-aria-components");
|
|
1160
1182
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1183
|
+
var DialogContext = React2.createContext(null);
|
|
1184
|
+
function useDialogContext() {
|
|
1185
|
+
const context = React2.useContext(DialogContext);
|
|
1186
|
+
if (!context) throw new Error("Dialog components must be rendered within Dialog.");
|
|
1187
|
+
return context;
|
|
1188
|
+
}
|
|
1189
|
+
function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledOpen }) {
|
|
1190
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
|
|
1191
|
+
const open = controlledOpen ?? uncontrolledOpen;
|
|
1192
|
+
const setOpen = React2.useCallback(
|
|
1193
|
+
(nextOpen) => {
|
|
1194
|
+
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
1195
|
+
onOpenChange?.(nextOpen);
|
|
1196
|
+
},
|
|
1197
|
+
[controlledOpen, onOpenChange]
|
|
1198
|
+
);
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogContext.Provider, { value: { open, setOpen }, children });
|
|
1200
|
+
}
|
|
1201
|
+
function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
1202
|
+
const { setOpen } = useDialogContext();
|
|
1203
|
+
const handleClick = (event) => {
|
|
1204
|
+
onClick?.(event);
|
|
1205
|
+
if (!event.defaultPrevented) setOpen(true);
|
|
1206
|
+
};
|
|
1207
|
+
if (asChild && React2.isValidElement(children)) {
|
|
1208
|
+
const child = children;
|
|
1209
|
+
return React2.cloneElement(child, {
|
|
1210
|
+
...props,
|
|
1211
|
+
"data-slot": "dialog-trigger",
|
|
1212
|
+
onClick: (event) => {
|
|
1213
|
+
child.props.onClick?.(event);
|
|
1214
|
+
handleClick(event);
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
1219
|
+
}
|
|
1220
|
+
function DialogPortal({ children }) {
|
|
1221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children });
|
|
1222
|
+
}
|
|
1223
|
+
function DialogOverlay({ children, className, ...props }) {
|
|
1224
|
+
const { open, setOpen } = useDialogContext();
|
|
1225
|
+
if (!open) return null;
|
|
1226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1227
|
+
import_react_aria_components10.ModalOverlay,
|
|
1228
|
+
{
|
|
1229
|
+
"data-slot": "dialog-overlay",
|
|
1230
|
+
isDismissable: true,
|
|
1231
|
+
isOpen: open,
|
|
1232
|
+
onOpenChange: setOpen,
|
|
1233
|
+
className: cn(
|
|
1234
|
+
"fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 duration-100 supports-backdrop-filter:backdrop-blur-xs data-entering:animate-ui-overlay-in data-exiting:animate-ui-overlay-out",
|
|
1235
|
+
className
|
|
1236
|
+
),
|
|
1237
|
+
...props,
|
|
1238
|
+
children
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
function DialogContent({
|
|
1243
|
+
children,
|
|
1244
|
+
className,
|
|
1245
|
+
onOverlayClick,
|
|
1246
|
+
showCloseButton = true,
|
|
1247
|
+
...props
|
|
1248
|
+
}) {
|
|
1249
|
+
const { setOpen } = useDialogContext();
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1251
|
+
DialogOverlay,
|
|
1252
|
+
{
|
|
1253
|
+
onClick: (event) => {
|
|
1254
|
+
if (event.target === event.currentTarget) onOverlayClick?.(event);
|
|
1255
|
+
},
|
|
1256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1257
|
+
import_react_aria_components10.Modal,
|
|
1258
|
+
{
|
|
1259
|
+
className: cn(
|
|
1260
|
+
"w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
|
|
1261
|
+
className
|
|
1262
|
+
),
|
|
1263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1264
|
+
import_react_aria_components10.Dialog,
|
|
1265
|
+
{
|
|
1266
|
+
"data-slot": "dialog-content",
|
|
1267
|
+
className: cn(
|
|
1268
|
+
"grid max-h-[calc(100dvh-2rem)] gap-4 overflow-y-auto rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none",
|
|
1269
|
+
className
|
|
1270
|
+
),
|
|
1271
|
+
...props,
|
|
1272
|
+
children: [
|
|
1273
|
+
children,
|
|
1274
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1275
|
+
Button,
|
|
1276
|
+
{
|
|
1277
|
+
"aria-label": "Cerrar di\xE1logo",
|
|
1278
|
+
"data-slot": "dialog-close",
|
|
1279
|
+
variant: "ghost",
|
|
1280
|
+
className: "absolute top-2 right-2",
|
|
1281
|
+
size: "icon-sm",
|
|
1282
|
+
onPress: () => setOpen(false),
|
|
1283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.XIcon, {})
|
|
1284
|
+
}
|
|
1285
|
+
) : null
|
|
1286
|
+
]
|
|
1287
|
+
}
|
|
1288
|
+
)
|
|
1289
|
+
}
|
|
1290
|
+
)
|
|
1291
|
+
}
|
|
1292
|
+
) });
|
|
1293
|
+
}
|
|
1294
|
+
function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
1295
|
+
const { setOpen } = useDialogContext();
|
|
1296
|
+
if (asChild && React2.isValidElement(children)) {
|
|
1297
|
+
const child = children;
|
|
1298
|
+
return React2.cloneElement(child, {
|
|
1299
|
+
...props,
|
|
1300
|
+
"data-slot": "dialog-close",
|
|
1301
|
+
onClick: (event) => {
|
|
1302
|
+
child.props.onClick?.(event);
|
|
1303
|
+
if (!event.defaultPrevented) setOpen(false);
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
|
|
1308
|
+
}
|
|
1309
|
+
function DialogHeader({ className, ...props }) {
|
|
1310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1311
|
+
}
|
|
1312
|
+
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.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: [
|
|
1314
|
+
children,
|
|
1315
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogClose, { variant: "outline", children: "Cerrar" }) : null
|
|
1316
|
+
] });
|
|
1317
|
+
}
|
|
1318
|
+
function DialogTitle({ className, ...props }) {
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Heading, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
|
|
1320
|
+
}
|
|
1321
|
+
function DialogDescription({ className, ...props }) {
|
|
1322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.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 });
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
// src/ui/drawer/drawer.tsx
|
|
1326
|
+
var import_react_aria_components11 = require("react-aria-components");
|
|
1327
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1161
1328
|
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" };
|
|
1162
1329
|
function Drawer({ children, side = "right", className, ...props }) {
|
|
1163
|
-
return /* @__PURE__ */ (0,
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components11.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_runtime17.jsx)(import_react_aria_components11.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_runtime17.jsx)(import_react_aria_components11.Dialog, { "data-slot": "drawer", className: "outline-none", children }) }) });
|
|
1164
1331
|
}
|
|
1165
1332
|
function DrawerHeader({ className, ...props }) {
|
|
1166
|
-
return /* @__PURE__ */ (0,
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
1167
1334
|
}
|
|
1168
1335
|
function DrawerFooter({ className, ...props }) {
|
|
1169
|
-
return /* @__PURE__ */ (0,
|
|
1336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.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 });
|
|
1170
1337
|
}
|
|
1171
1338
|
function DrawerTitle({ className, ...props }) {
|
|
1172
|
-
return /* @__PURE__ */ (0,
|
|
1339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
|
|
1173
1340
|
}
|
|
1174
1341
|
function DrawerDescription({ className, ...props }) {
|
|
1175
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
1176
1343
|
}
|
|
1177
1344
|
|
|
1178
1345
|
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1181
|
-
var
|
|
1182
|
-
var
|
|
1183
|
-
var
|
|
1346
|
+
var React3 = require("react");
|
|
1347
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
1348
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1349
|
+
var import_react_aria_components12 = require("react-aria-components");
|
|
1350
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1184
1351
|
function DropdownMenuTrigger({
|
|
1185
1352
|
...props
|
|
1186
1353
|
}) {
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components12.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1188
1355
|
}
|
|
1189
1356
|
function DropdownMenu({
|
|
1190
1357
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -1195,16 +1362,16 @@ function DropdownMenu({
|
|
|
1195
1362
|
children,
|
|
1196
1363
|
...props
|
|
1197
1364
|
}) {
|
|
1198
|
-
return /* @__PURE__ */ (0,
|
|
1199
|
-
|
|
1365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1366
|
+
import_react_aria_components12.Popover,
|
|
1200
1367
|
{
|
|
1201
1368
|
"data-slot": dataSlot,
|
|
1202
1369
|
placement,
|
|
1203
1370
|
offset,
|
|
1204
1371
|
crossOffset,
|
|
1205
1372
|
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),
|
|
1206
|
-
children: /* @__PURE__ */ (0,
|
|
1207
|
-
|
|
1373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1374
|
+
import_react_aria_components12.Menu,
|
|
1208
1375
|
{
|
|
1209
1376
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
1210
1377
|
...props,
|
|
@@ -1217,15 +1384,15 @@ function DropdownMenu({
|
|
|
1217
1384
|
function DropdownMenuGroup({
|
|
1218
1385
|
...props
|
|
1219
1386
|
}) {
|
|
1220
|
-
return /* @__PURE__ */ (0,
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components12.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
|
|
1221
1388
|
}
|
|
1222
1389
|
function DropdownMenuLabel({
|
|
1223
1390
|
className,
|
|
1224
1391
|
inset,
|
|
1225
1392
|
...props
|
|
1226
1393
|
}) {
|
|
1227
|
-
return /* @__PURE__ */ (0,
|
|
1228
|
-
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1395
|
+
import_react_aria_components12.Header,
|
|
1229
1396
|
{
|
|
1230
1397
|
"data-slot": "dropdown-menu-label",
|
|
1231
1398
|
"data-inset": inset,
|
|
@@ -1237,7 +1404,7 @@ function DropdownMenuLabel({
|
|
|
1237
1404
|
}
|
|
1238
1405
|
);
|
|
1239
1406
|
}
|
|
1240
|
-
var dropdownMenuItemVariants = (0,
|
|
1407
|
+
var dropdownMenuItemVariants = (0, import_class_variance_authority6.cva)(
|
|
1241
1408
|
"group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1242
1409
|
{
|
|
1243
1410
|
variants: {
|
|
@@ -1256,27 +1423,27 @@ function DropdownMenuItem({
|
|
|
1256
1423
|
children,
|
|
1257
1424
|
...props
|
|
1258
1425
|
}) {
|
|
1259
|
-
return /* @__PURE__ */ (0,
|
|
1260
|
-
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1427
|
+
import_react_aria_components12.MenuItem,
|
|
1261
1428
|
{
|
|
1262
1429
|
"data-slot": "dropdown-menu-item",
|
|
1263
1430
|
"data-inset": inset,
|
|
1264
1431
|
"data-variant": variant,
|
|
1265
1432
|
textValue: typeof children === "string" ? children : props.textValue,
|
|
1266
|
-
className: (0,
|
|
1433
|
+
className: (0, import_react_aria_components12.composeRenderProps)(
|
|
1267
1434
|
className,
|
|
1268
1435
|
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
1269
1436
|
),
|
|
1270
1437
|
...props,
|
|
1271
|
-
children: (0,
|
|
1438
|
+
children: (0, import_react_aria_components12.composeRenderProps)(
|
|
1272
1439
|
children,
|
|
1273
|
-
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0,
|
|
1274
|
-
selectionMode !== "none" ? /* @__PURE__ */ (0,
|
|
1440
|
+
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1441
|
+
selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1275
1442
|
"span",
|
|
1276
1443
|
{
|
|
1277
1444
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1278
1445
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
1279
|
-
children: isSelected ? /* @__PURE__ */ (0,
|
|
1446
|
+
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.CheckIcon, {}) : null
|
|
1280
1447
|
}
|
|
1281
1448
|
) : null,
|
|
1282
1449
|
children2
|
|
@@ -1288,7 +1455,7 @@ function DropdownMenuItem({
|
|
|
1288
1455
|
function DropdownMenuSub({
|
|
1289
1456
|
...props
|
|
1290
1457
|
}) {
|
|
1291
|
-
return /* @__PURE__ */ (0,
|
|
1458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components12.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1292
1459
|
}
|
|
1293
1460
|
function DropdownMenuSubTrigger({
|
|
1294
1461
|
className,
|
|
@@ -1296,8 +1463,8 @@ function DropdownMenuSubTrigger({
|
|
|
1296
1463
|
children,
|
|
1297
1464
|
...props
|
|
1298
1465
|
}) {
|
|
1299
|
-
return /* @__PURE__ */ (0,
|
|
1300
|
-
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1467
|
+
import_react_aria_components12.MenuItem,
|
|
1301
1468
|
{
|
|
1302
1469
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
1303
1470
|
"data-inset": inset,
|
|
@@ -1307,9 +1474,9 @@ function DropdownMenuSubTrigger({
|
|
|
1307
1474
|
className
|
|
1308
1475
|
),
|
|
1309
1476
|
...props,
|
|
1310
|
-
children: (0,
|
|
1477
|
+
children: (0, import_react_aria_components12.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1311
1478
|
children2,
|
|
1312
|
-
/* @__PURE__ */ (0,
|
|
1479
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
1313
1480
|
] }))
|
|
1314
1481
|
}
|
|
1315
1482
|
);
|
|
@@ -1321,7 +1488,7 @@ function DropdownMenuSubContent({
|
|
|
1321
1488
|
className,
|
|
1322
1489
|
...props
|
|
1323
1490
|
}) {
|
|
1324
|
-
return /* @__PURE__ */ (0,
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1325
1492
|
DropdownMenu,
|
|
1326
1493
|
{
|
|
1327
1494
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1337,8 +1504,8 @@ function DropdownMenuSeparator({
|
|
|
1337
1504
|
className,
|
|
1338
1505
|
...props
|
|
1339
1506
|
}) {
|
|
1340
|
-
return /* @__PURE__ */ (0,
|
|
1341
|
-
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1508
|
+
import_react_aria_components12.Separator,
|
|
1342
1509
|
{
|
|
1343
1510
|
"data-slot": "dropdown-menu-separator",
|
|
1344
1511
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
@@ -1350,7 +1517,7 @@ function DropdownMenuShortcut({
|
|
|
1350
1517
|
className,
|
|
1351
1518
|
...props
|
|
1352
1519
|
}) {
|
|
1353
|
-
return /* @__PURE__ */ (0,
|
|
1520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1354
1521
|
"span",
|
|
1355
1522
|
{
|
|
1356
1523
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1364,10 +1531,10 @@ function DropdownMenuShortcut({
|
|
|
1364
1531
|
}
|
|
1365
1532
|
|
|
1366
1533
|
// src/ui/empty-state/empty-state.tsx
|
|
1367
|
-
var
|
|
1368
|
-
var
|
|
1534
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1535
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1369
1536
|
function EmptyState({ className, ...props }) {
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1371
1538
|
"div",
|
|
1372
1539
|
{
|
|
1373
1540
|
"data-slot": "empty-state",
|
|
@@ -1380,7 +1547,7 @@ function EmptyState({ className, ...props }) {
|
|
|
1380
1547
|
);
|
|
1381
1548
|
}
|
|
1382
1549
|
function EmptyStateHeader({ className, ...props }) {
|
|
1383
|
-
return /* @__PURE__ */ (0,
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1384
1551
|
"div",
|
|
1385
1552
|
{
|
|
1386
1553
|
"data-slot": "empty-state-header",
|
|
@@ -1389,7 +1556,7 @@ function EmptyStateHeader({ className, ...props }) {
|
|
|
1389
1556
|
}
|
|
1390
1557
|
);
|
|
1391
1558
|
}
|
|
1392
|
-
var emptyStateMediaVariants = (0,
|
|
1559
|
+
var emptyStateMediaVariants = (0, import_class_variance_authority7.cva)(
|
|
1393
1560
|
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1394
1561
|
{
|
|
1395
1562
|
variants: {
|
|
@@ -1406,7 +1573,7 @@ function EmptyStateMedia({
|
|
|
1406
1573
|
variant = "default",
|
|
1407
1574
|
...props
|
|
1408
1575
|
}) {
|
|
1409
|
-
return /* @__PURE__ */ (0,
|
|
1576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1410
1577
|
"div",
|
|
1411
1578
|
{
|
|
1412
1579
|
"data-slot": "empty-state-media",
|
|
@@ -1417,7 +1584,7 @@ function EmptyStateMedia({
|
|
|
1417
1584
|
);
|
|
1418
1585
|
}
|
|
1419
1586
|
function EmptyStateTitle({ className, ...props }) {
|
|
1420
|
-
return /* @__PURE__ */ (0,
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1421
1588
|
"h3",
|
|
1422
1589
|
{
|
|
1423
1590
|
"data-slot": "empty-state-title",
|
|
@@ -1427,7 +1594,7 @@ function EmptyStateTitle({ className, ...props }) {
|
|
|
1427
1594
|
);
|
|
1428
1595
|
}
|
|
1429
1596
|
function EmptyStateDescription({ className, ...props }) {
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1431
1598
|
"p",
|
|
1432
1599
|
{
|
|
1433
1600
|
"data-slot": "empty-state-description",
|
|
@@ -1440,7 +1607,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
1440
1607
|
);
|
|
1441
1608
|
}
|
|
1442
1609
|
function EmptyStateContent({ className, ...props }) {
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1444
1611
|
"div",
|
|
1445
1612
|
{
|
|
1446
1613
|
"data-slot": "empty-state-content",
|
|
@@ -1454,27 +1621,27 @@ function EmptyStateContent({ className, ...props }) {
|
|
|
1454
1621
|
}
|
|
1455
1622
|
|
|
1456
1623
|
// src/ui/field/field.tsx
|
|
1457
|
-
var
|
|
1624
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1458
1625
|
|
|
1459
1626
|
// src/ui/label/label.tsx
|
|
1460
1627
|
var import_react6 = require("react");
|
|
1461
|
-
var
|
|
1462
|
-
var
|
|
1628
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
1629
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1463
1630
|
var Label2 = (0, import_react6.forwardRef)(function Label3({ className, ...props }, ref) {
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components13.Label, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
|
|
1465
1632
|
});
|
|
1466
1633
|
|
|
1467
1634
|
// src/ui/field/field.tsx
|
|
1468
|
-
var
|
|
1635
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1469
1636
|
function FieldSet({ className, ...props }) {
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
1471
1638
|
}
|
|
1472
1639
|
function FieldLegend({
|
|
1473
1640
|
className,
|
|
1474
1641
|
variant = "legend",
|
|
1475
1642
|
...props
|
|
1476
1643
|
}) {
|
|
1477
|
-
return /* @__PURE__ */ (0,
|
|
1644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1478
1645
|
"legend",
|
|
1479
1646
|
{
|
|
1480
1647
|
"data-slot": "field-legend",
|
|
@@ -1488,7 +1655,7 @@ function FieldLegend({
|
|
|
1488
1655
|
);
|
|
1489
1656
|
}
|
|
1490
1657
|
function FieldGroup({ className, ...props }) {
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1492
1659
|
"div",
|
|
1493
1660
|
{
|
|
1494
1661
|
"data-slot": "field-group",
|
|
@@ -1500,7 +1667,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1500
1667
|
}
|
|
1501
1668
|
);
|
|
1502
1669
|
}
|
|
1503
|
-
var fieldVariants = (0,
|
|
1670
|
+
var fieldVariants = (0, import_class_variance_authority8.cva)(
|
|
1504
1671
|
"group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
1505
1672
|
{
|
|
1506
1673
|
variants: {
|
|
@@ -1516,7 +1683,7 @@ var fieldVariants = (0, import_class_variance_authority7.cva)(
|
|
|
1516
1683
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
1517
1684
|
return (
|
|
1518
1685
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
1519
|
-
/* @__PURE__ */ (0,
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1520
1687
|
"div",
|
|
1521
1688
|
{
|
|
1522
1689
|
role: "group",
|
|
@@ -1529,7 +1696,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1529
1696
|
);
|
|
1530
1697
|
}
|
|
1531
1698
|
function FieldContent({ className, ...props }) {
|
|
1532
|
-
return /* @__PURE__ */ (0,
|
|
1699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1533
1700
|
"div",
|
|
1534
1701
|
{
|
|
1535
1702
|
"data-slot": "field-content",
|
|
@@ -1539,7 +1706,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1539
1706
|
);
|
|
1540
1707
|
}
|
|
1541
1708
|
function FieldLabel({ className, ...props }) {
|
|
1542
|
-
return /* @__PURE__ */ (0,
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1543
1710
|
Label2,
|
|
1544
1711
|
{
|
|
1545
1712
|
"data-slot": "field-label",
|
|
@@ -1552,7 +1719,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1552
1719
|
);
|
|
1553
1720
|
}
|
|
1554
1721
|
function FieldTitle({ className, ...props }) {
|
|
1555
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1556
1723
|
"div",
|
|
1557
1724
|
{
|
|
1558
1725
|
"data-slot": "field-title",
|
|
@@ -1562,7 +1729,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1562
1729
|
);
|
|
1563
1730
|
}
|
|
1564
1731
|
function FieldDescription({ className, ...props }) {
|
|
1565
|
-
return /* @__PURE__ */ (0,
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1566
1733
|
"p",
|
|
1567
1734
|
{
|
|
1568
1735
|
"data-slot": "field-description",
|
|
@@ -1575,7 +1742,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1575
1742
|
);
|
|
1576
1743
|
}
|
|
1577
1744
|
function FieldSeparator({ className, children, ...props }) {
|
|
1578
|
-
return /* @__PURE__ */ (0,
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1579
1746
|
"div",
|
|
1580
1747
|
{
|
|
1581
1748
|
"data-slot": "field-separator",
|
|
@@ -1583,8 +1750,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1583
1750
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
1584
1751
|
...props,
|
|
1585
1752
|
children: [
|
|
1586
|
-
/* @__PURE__ */ (0,
|
|
1587
|
-
children ? /* @__PURE__ */ (0,
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1754
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1588
1755
|
"span",
|
|
1589
1756
|
{
|
|
1590
1757
|
"data-slot": "field-separator-content",
|
|
@@ -1598,9 +1765,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1598
1765
|
}
|
|
1599
1766
|
function FieldError2({ className, children, errors, ...props }) {
|
|
1600
1767
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
1601
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0,
|
|
1768
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: message }, message)) }) : null);
|
|
1602
1769
|
if (!content) return null;
|
|
1603
|
-
return /* @__PURE__ */ (0,
|
|
1770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1604
1771
|
"div",
|
|
1605
1772
|
{
|
|
1606
1773
|
role: "alert",
|
|
@@ -1614,8 +1781,8 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
1614
1781
|
|
|
1615
1782
|
// src/ui/form-feedback/form-feedback.tsx
|
|
1616
1783
|
var import_react7 = require("react");
|
|
1617
|
-
var
|
|
1618
|
-
var
|
|
1784
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1785
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1619
1786
|
function useFormFeedback(options) {
|
|
1620
1787
|
const resetMs = options?.successResetMs ?? 2500;
|
|
1621
1788
|
const [state, setState] = (0, import_react7.useState)({ status: "idle" });
|
|
@@ -1645,57 +1812,57 @@ function useFormFeedback(options) {
|
|
|
1645
1812
|
return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
|
|
1646
1813
|
}
|
|
1647
1814
|
function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
|
|
1648
|
-
if (state.status === "idle") return /* @__PURE__ */ (0,
|
|
1815
|
+
if (state.status === "idle") return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
1649
1816
|
const error = state.status === "error";
|
|
1650
1817
|
const success = state.status === "success";
|
|
1651
|
-
return /* @__PURE__ */ (0,
|
|
1652
|
-
state.status === "pending" && /* @__PURE__ */ (0,
|
|
1653
|
-
success && /* @__PURE__ */ (0,
|
|
1654
|
-
error && /* @__PURE__ */ (0,
|
|
1655
|
-
/* @__PURE__ */ (0,
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
1819
|
+
state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
1820
|
+
success && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1821
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1822
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
1656
1823
|
] });
|
|
1657
1824
|
}
|
|
1658
1825
|
|
|
1659
1826
|
// src/ui/form-row/form-row.tsx
|
|
1660
|
-
var
|
|
1827
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1661
1828
|
function FormRow({ label, htmlFor, required, hint, error, className, children }) {
|
|
1662
1829
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
1663
1830
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1665
|
-
/* @__PURE__ */ (0,
|
|
1831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
1832
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
|
|
1666
1833
|
label,
|
|
1667
|
-
required && /* @__PURE__ */ (0,
|
|
1668
|
-
/* @__PURE__ */ (0,
|
|
1669
|
-
/* @__PURE__ */ (0,
|
|
1834
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
|
|
1836
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
|
|
1670
1837
|
] })
|
|
1671
1838
|
] }),
|
|
1672
1839
|
children,
|
|
1673
|
-
hint && /* @__PURE__ */ (0,
|
|
1674
|
-
error && /* @__PURE__ */ (0,
|
|
1840
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
|
|
1841
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
|
|
1675
1842
|
] });
|
|
1676
1843
|
}
|
|
1677
1844
|
|
|
1678
1845
|
// src/ui/icon-button/icon-button.tsx
|
|
1679
|
-
var
|
|
1846
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
1680
1847
|
|
|
1681
1848
|
// src/ui/tooltip/tooltip.tsx
|
|
1682
|
-
var
|
|
1683
|
-
var
|
|
1684
|
-
var
|
|
1849
|
+
var React4 = __toESM(require("react"), 1);
|
|
1850
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
1851
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1685
1852
|
function TooltipTrigger({
|
|
1686
1853
|
delay = 0,
|
|
1687
1854
|
children,
|
|
1688
1855
|
...props
|
|
1689
1856
|
}) {
|
|
1690
|
-
const [trigger, tooltip] =
|
|
1691
|
-
return /* @__PURE__ */ (0,
|
|
1692
|
-
|
|
1857
|
+
const [trigger, tooltip] = React4.Children.toArray(children);
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1859
|
+
import_react_aria_components14.TooltipTrigger,
|
|
1693
1860
|
{
|
|
1694
1861
|
"data-slot": "tooltip-trigger",
|
|
1695
1862
|
delay,
|
|
1696
1863
|
...props,
|
|
1697
1864
|
children: [
|
|
1698
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components14.Focusable, { children: trigger }),
|
|
1699
1866
|
tooltip
|
|
1700
1867
|
]
|
|
1701
1868
|
}
|
|
@@ -1709,8 +1876,8 @@ function Tooltip({
|
|
|
1709
1876
|
children,
|
|
1710
1877
|
...props
|
|
1711
1878
|
}) {
|
|
1712
|
-
return /* @__PURE__ */ (0,
|
|
1713
|
-
|
|
1879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1880
|
+
import_react_aria_components14.Tooltip,
|
|
1714
1881
|
{
|
|
1715
1882
|
"data-slot": "tooltip-content",
|
|
1716
1883
|
placement,
|
|
@@ -1723,8 +1890,8 @@ function Tooltip({
|
|
|
1723
1890
|
...props,
|
|
1724
1891
|
children: [
|
|
1725
1892
|
children,
|
|
1726
|
-
/* @__PURE__ */ (0,
|
|
1727
|
-
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1894
|
+
import_react_aria_components14.OverlayArrow,
|
|
1728
1895
|
{
|
|
1729
1896
|
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
|
|
1730
1897
|
style: ({ placement: placement2, defaultStyle }) => ({
|
|
@@ -1741,7 +1908,7 @@ function Tooltip({
|
|
|
1741
1908
|
}
|
|
1742
1909
|
|
|
1743
1910
|
// src/ui/icon-button/icon-button.tsx
|
|
1744
|
-
var
|
|
1911
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1745
1912
|
function IconButton({
|
|
1746
1913
|
label,
|
|
1747
1914
|
children,
|
|
@@ -1754,9 +1921,9 @@ function IconButton({
|
|
|
1754
1921
|
buttonVariants({ variant, size: "icon" }),
|
|
1755
1922
|
className
|
|
1756
1923
|
);
|
|
1757
|
-
return /* @__PURE__ */ (0,
|
|
1758
|
-
href ? /* @__PURE__ */ (0,
|
|
1759
|
-
|
|
1924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TooltipTrigger, { children: [
|
|
1925
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1926
|
+
import_react_aria_components15.Link,
|
|
1760
1927
|
{
|
|
1761
1928
|
"data-slot": "icon-button",
|
|
1762
1929
|
"aria-label": label,
|
|
@@ -1764,7 +1931,7 @@ function IconButton({
|
|
|
1764
1931
|
className: linkClassName,
|
|
1765
1932
|
children
|
|
1766
1933
|
}
|
|
1767
|
-
) : /* @__PURE__ */ (0,
|
|
1934
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1768
1935
|
Button,
|
|
1769
1936
|
{
|
|
1770
1937
|
"data-slot": "icon-button",
|
|
@@ -1776,38 +1943,38 @@ function IconButton({
|
|
|
1776
1943
|
children
|
|
1777
1944
|
}
|
|
1778
1945
|
),
|
|
1779
|
-
/* @__PURE__ */ (0,
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { children: label })
|
|
1780
1947
|
] });
|
|
1781
1948
|
}
|
|
1782
1949
|
|
|
1950
|
+
// src/ui/input-group/input-group.tsx
|
|
1951
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1952
|
+
|
|
1783
1953
|
// src/ui/input/input.tsx
|
|
1784
1954
|
var import_react8 = require("react");
|
|
1785
|
-
var
|
|
1786
|
-
var
|
|
1955
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
1956
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1787
1957
|
var InputImpl = (0, import_react8.forwardRef)(function Input2({ className, type, ...props }, ref) {
|
|
1788
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components16.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 });
|
|
1789
1959
|
});
|
|
1790
1960
|
var Input3 = InputImpl;
|
|
1791
1961
|
|
|
1792
|
-
// src/ui/input-group/input-group.tsx
|
|
1793
|
-
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1794
|
-
|
|
1795
1962
|
// src/ui/textarea/textarea.tsx
|
|
1796
1963
|
var import_react9 = require("react");
|
|
1797
|
-
var
|
|
1798
|
-
var
|
|
1964
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
1965
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1799
1966
|
var TextareaImpl = (0, import_react9.forwardRef)(function Textarea({ className, ...props }, ref) {
|
|
1800
|
-
return /* @__PURE__ */ (0,
|
|
1967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components17.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 });
|
|
1801
1968
|
});
|
|
1802
1969
|
var Textarea2 = TextareaImpl;
|
|
1803
1970
|
|
|
1804
1971
|
// src/ui/input-group/input-group.tsx
|
|
1805
|
-
var
|
|
1972
|
+
var import_jsx_runtime28 = (
|
|
1806
1973
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
1807
1974
|
require("react/jsx-runtime")
|
|
1808
1975
|
);
|
|
1809
1976
|
function InputGroup({ className, ...props }) {
|
|
1810
|
-
return /* @__PURE__ */ (0,
|
|
1977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1811
1978
|
"div",
|
|
1812
1979
|
{
|
|
1813
1980
|
role: "group",
|
|
@@ -1820,7 +1987,7 @@ function InputGroup({ className, ...props }) {
|
|
|
1820
1987
|
}
|
|
1821
1988
|
);
|
|
1822
1989
|
}
|
|
1823
|
-
var inputGroupAddonVariants = (0,
|
|
1990
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
|
|
1824
1991
|
"flex cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&_svg:not([class*='size-'])]:size-4",
|
|
1825
1992
|
{
|
|
1826
1993
|
variants: {
|
|
@@ -1842,7 +2009,7 @@ function InputGroupAddon({
|
|
|
1842
2009
|
}) {
|
|
1843
2010
|
return (
|
|
1844
2011
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
1845
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1846
2013
|
"div",
|
|
1847
2014
|
{
|
|
1848
2015
|
role: "group",
|
|
@@ -1859,7 +2026,7 @@ function InputGroupAddon({
|
|
|
1859
2026
|
)
|
|
1860
2027
|
);
|
|
1861
2028
|
}
|
|
1862
|
-
var inputGroupButtonVariants = (0,
|
|
2029
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority9.cva)("shrink-0 shadow-none", {
|
|
1863
2030
|
variants: {
|
|
1864
2031
|
size: { xs: "h-6 px-1.5 text-xs", sm: "h-7 px-2", "icon-xs": "size-6", "icon-sm": "size-7" }
|
|
1865
2032
|
},
|
|
@@ -1873,7 +2040,7 @@ function InputGroupButton({
|
|
|
1873
2040
|
...props
|
|
1874
2041
|
}) {
|
|
1875
2042
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
1876
|
-
return /* @__PURE__ */ (0,
|
|
2043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1877
2044
|
Button,
|
|
1878
2045
|
{
|
|
1879
2046
|
"data-slot": "input-group-button",
|
|
@@ -1886,7 +2053,7 @@ function InputGroupButton({
|
|
|
1886
2053
|
);
|
|
1887
2054
|
}
|
|
1888
2055
|
function InputGroupText({ className, ...props }) {
|
|
1889
|
-
return /* @__PURE__ */ (0,
|
|
2056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1890
2057
|
"span",
|
|
1891
2058
|
{
|
|
1892
2059
|
"data-slot": "input-group-text",
|
|
@@ -1899,7 +2066,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
1899
2066
|
);
|
|
1900
2067
|
}
|
|
1901
2068
|
function InputGroupInput({ className, ...props }) {
|
|
1902
|
-
return /* @__PURE__ */ (0,
|
|
2069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1903
2070
|
Input3,
|
|
1904
2071
|
{
|
|
1905
2072
|
"data-slot": "input-group-control",
|
|
@@ -1912,7 +2079,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
1912
2079
|
);
|
|
1913
2080
|
}
|
|
1914
2081
|
function InputGroupTextarea({ className, ...props }) {
|
|
1915
|
-
return /* @__PURE__ */ (0,
|
|
2082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1916
2083
|
Textarea2,
|
|
1917
2084
|
{
|
|
1918
2085
|
"data-slot": "input-group-control",
|
|
@@ -1926,42 +2093,42 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
1926
2093
|
}
|
|
1927
2094
|
|
|
1928
2095
|
// src/ui/kbd/kbd.tsx
|
|
1929
|
-
var
|
|
2096
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1930
2097
|
function Kbd({ className, ...props }) {
|
|
1931
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.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 });
|
|
1932
2099
|
}
|
|
1933
2100
|
function KbdGroup({ className, ...props }) {
|
|
1934
|
-
return /* @__PURE__ */ (0,
|
|
2101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
|
|
1935
2102
|
}
|
|
1936
2103
|
|
|
1937
2104
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
2105
|
+
var import_lucide_react7 = require("lucide-react");
|
|
2106
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1940
2107
|
function LoadingOverlay({ label = "Cargando", className, ...props }) {
|
|
1941
|
-
return /* @__PURE__ */ (0,
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
2108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.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_runtime30.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react7.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: label })
|
|
1944
2111
|
] }) });
|
|
1945
2112
|
}
|
|
1946
2113
|
|
|
1947
2114
|
// src/ui/menu/menu.tsx
|
|
1948
|
-
var
|
|
1949
|
-
var
|
|
1950
|
-
var MenuTrigger =
|
|
2115
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
2116
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2117
|
+
var MenuTrigger = import_react_aria_components18.MenuTrigger;
|
|
1951
2118
|
function MenuContent({ className, ...props }) {
|
|
1952
|
-
return /* @__PURE__ */ (0,
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components18.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 });
|
|
1953
2120
|
}
|
|
1954
2121
|
function Menu({ className, ...props }) {
|
|
1955
|
-
return /* @__PURE__ */ (0,
|
|
2122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components18.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
1956
2123
|
}
|
|
1957
2124
|
function MenuItem({ className, children, ...props }) {
|
|
1958
|
-
return /* @__PURE__ */ (0,
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components18.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 });
|
|
1959
2126
|
}
|
|
1960
2127
|
|
|
1961
2128
|
// src/ui/otp-input/otp-input.tsx
|
|
1962
2129
|
var import_react10 = require("react");
|
|
1963
|
-
var
|
|
1964
|
-
var
|
|
2130
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
2131
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1965
2132
|
function normalizeOtp(value, length) {
|
|
1966
2133
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
1967
2134
|
}
|
|
@@ -2013,7 +2180,7 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2013
2180
|
input.setSelectionRange(position, position);
|
|
2014
2181
|
setSelectionStart(position);
|
|
2015
2182
|
}
|
|
2016
|
-
return /* @__PURE__ */ (0,
|
|
2183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2017
2184
|
"div",
|
|
2018
2185
|
{
|
|
2019
2186
|
"data-slot": "otp-input",
|
|
@@ -2023,8 +2190,8 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2023
2190
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
2024
2191
|
onPointerDown: handlePointerDown,
|
|
2025
2192
|
children: [
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2027
|
-
|
|
2193
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2194
|
+
import_react_aria_components19.Input,
|
|
2028
2195
|
{
|
|
2029
2196
|
...props,
|
|
2030
2197
|
ref: inputRef,
|
|
@@ -2063,7 +2230,7 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2063
2230
|
}
|
|
2064
2231
|
}
|
|
2065
2232
|
),
|
|
2066
|
-
slots.map((slot, index) => /* @__PURE__ */ (0,
|
|
2233
|
+
slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2067
2234
|
"span",
|
|
2068
2235
|
{
|
|
2069
2236
|
"aria-hidden": "true",
|
|
@@ -2086,56 +2253,56 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2086
2253
|
var OtpInput2 = OtpInputImpl;
|
|
2087
2254
|
|
|
2088
2255
|
// src/ui/page-header/page-header.tsx
|
|
2089
|
-
var
|
|
2256
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2090
2257
|
function PageHeader({ className, ...props }) {
|
|
2091
|
-
return /* @__PURE__ */ (0,
|
|
2258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.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 });
|
|
2092
2259
|
}
|
|
2093
2260
|
function PageHeaderHeading({ className, ...props }) {
|
|
2094
|
-
return /* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
2095
2262
|
}
|
|
2096
2263
|
function PageHeaderTitle({ className, ...props }) {
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
|
|
2098
2265
|
}
|
|
2099
2266
|
function PageHeaderDescription({ className, ...props }) {
|
|
2100
|
-
return /* @__PURE__ */ (0,
|
|
2267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
|
|
2101
2268
|
}
|
|
2102
2269
|
function PageHeaderActions({ className, ...props }) {
|
|
2103
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
|
|
2104
2271
|
}
|
|
2105
2272
|
|
|
2106
2273
|
// src/ui/pagination/pagination.tsx
|
|
2107
|
-
var
|
|
2108
|
-
var
|
|
2274
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2275
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2109
2276
|
function Pagination({ page, pageCount, onPageChange, className }) {
|
|
2110
2277
|
const pages = Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
2111
|
-
return /* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": "Paginaci\xF3n", className: cn("flex items-center justify-between gap-4", className), children: [
|
|
2279
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
2113
2280
|
"P\xE1gina ",
|
|
2114
2281
|
page,
|
|
2115
2282
|
" de ",
|
|
2116
2283
|
pageCount
|
|
2117
2284
|
] }),
|
|
2118
|
-
/* @__PURE__ */ (0,
|
|
2119
|
-
/* @__PURE__ */ (0,
|
|
2120
|
-
pages.map((item) => /* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { "aria-label": "P\xE1gina anterior", isDisabled: page <= 1, onPress: () => onPageChange(page - 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react8.ChevronLeft, {}) }),
|
|
2287
|
+
pages.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { "aria-current": item === page ? "page" : void 0, "aria-label": `P\xE1gina ${item}`, onPress: () => onPageChange(item), size: "icon", variant: item === page ? "secondary" : "ghost", children: item }, item)),
|
|
2288
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { "aria-label": "P\xE1gina siguiente", isDisabled: page >= pageCount, onPress: () => onPageChange(page + 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react8.ChevronRight, {}) })
|
|
2122
2289
|
] })
|
|
2123
2290
|
] });
|
|
2124
2291
|
}
|
|
2125
2292
|
|
|
2126
2293
|
// src/ui/popover/popover.tsx
|
|
2127
|
-
var
|
|
2128
|
-
var
|
|
2129
|
-
var PopoverTrigger =
|
|
2294
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
2295
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2296
|
+
var PopoverTrigger = import_react_aria_components20.DialogTrigger;
|
|
2130
2297
|
function Popover4({ className, ...props }) {
|
|
2131
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components20.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 });
|
|
2132
2299
|
}
|
|
2133
2300
|
var PopoverContent = Popover4;
|
|
2134
2301
|
|
|
2135
2302
|
// src/ui/quantity-input/quantity-input.tsx
|
|
2136
|
-
var
|
|
2137
|
-
var
|
|
2138
|
-
var
|
|
2303
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2304
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
2305
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2139
2306
|
function QuantityInput({
|
|
2140
2307
|
className,
|
|
2141
2308
|
inputClassName,
|
|
@@ -2145,23 +2312,23 @@ function QuantityInput({
|
|
|
2145
2312
|
step = 1,
|
|
2146
2313
|
...props
|
|
2147
2314
|
}) {
|
|
2148
|
-
return /* @__PURE__ */ (0,
|
|
2149
|
-
|
|
2315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2316
|
+
import_react_aria_components21.NumberField,
|
|
2150
2317
|
{
|
|
2151
2318
|
...props,
|
|
2152
2319
|
minValue,
|
|
2153
2320
|
step,
|
|
2154
2321
|
"data-slot": "quantity-input",
|
|
2155
2322
|
className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
2156
|
-
children: /* @__PURE__ */ (0,
|
|
2157
|
-
|
|
2323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2324
|
+
import_react_aria_components21.Group,
|
|
2158
2325
|
{
|
|
2159
2326
|
"data-slot": "quantity-input-group",
|
|
2160
2327
|
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",
|
|
2161
2328
|
children: [
|
|
2162
|
-
/* @__PURE__ */ (0,
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components21.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_runtime36.jsx)(import_lucide_react9.Minus, { "aria-hidden": "true", className: "size-4" }) }),
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components21.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) }),
|
|
2331
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components21.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_runtime36.jsx)(import_lucide_react9.Plus, { "aria-hidden": "true", className: "size-4" }) })
|
|
2165
2332
|
]
|
|
2166
2333
|
}
|
|
2167
2334
|
)
|
|
@@ -2170,50 +2337,50 @@ function QuantityInput({
|
|
|
2170
2337
|
}
|
|
2171
2338
|
|
|
2172
2339
|
// src/ui/search-field/search-field.tsx
|
|
2173
|
-
var
|
|
2174
|
-
var
|
|
2175
|
-
var
|
|
2176
|
-
var SearchField =
|
|
2340
|
+
var import_react_aria_components22 = require("react-aria-components");
|
|
2341
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2342
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2343
|
+
var SearchField = import_react_aria_components22.SearchField;
|
|
2177
2344
|
function SearchInput({ className, ...props }) {
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components22.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 });
|
|
2179
2346
|
}
|
|
2180
|
-
function SearchClearButton({ className, children = /* @__PURE__ */ (0,
|
|
2181
|
-
return /* @__PURE__ */ (0,
|
|
2347
|
+
function SearchClearButton({ className, children = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react10.X, { "aria-hidden": "true", className: "size-4" }), ...props }) {
|
|
2348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components22.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 });
|
|
2182
2349
|
}
|
|
2183
2350
|
|
|
2184
2351
|
// src/ui/select/select.tsx
|
|
2185
|
-
var
|
|
2186
|
-
var
|
|
2187
|
-
var
|
|
2188
|
-
var Select =
|
|
2352
|
+
var import_react_aria_components23 = require("react-aria-components");
|
|
2353
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2354
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2355
|
+
var Select = import_react_aria_components23.Select;
|
|
2189
2356
|
function SelectTrigger({ className, children, ...props }) {
|
|
2190
|
-
return /* @__PURE__ */ (0,
|
|
2357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components23.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_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
2191
2358
|
typeof children === "function" ? children(state) : children,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2359
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.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" })
|
|
2193
2360
|
] }) });
|
|
2194
2361
|
}
|
|
2195
2362
|
function SelectValue({ className, ...props }) {
|
|
2196
|
-
return /* @__PURE__ */ (0,
|
|
2363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components23.SelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
|
|
2197
2364
|
}
|
|
2198
2365
|
function SelectContent({ className, ...props }) {
|
|
2199
|
-
return /* @__PURE__ */ (0,
|
|
2366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components23.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 });
|
|
2200
2367
|
}
|
|
2201
2368
|
function SelectList({ className, ...props }) {
|
|
2202
|
-
return /* @__PURE__ */ (0,
|
|
2369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components23.ListBox, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
|
|
2203
2370
|
}
|
|
2204
2371
|
function SelectItem({ className, children, ...props }) {
|
|
2205
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components23.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 });
|
|
2206
2373
|
}
|
|
2207
2374
|
|
|
2208
2375
|
// src/ui/sheet/sheet.tsx
|
|
2209
|
-
var
|
|
2210
|
-
var
|
|
2211
|
-
var
|
|
2376
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2377
|
+
var import_react_aria_components24 = require("react-aria-components");
|
|
2378
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2212
2379
|
function SheetTrigger({ ...props }) {
|
|
2213
|
-
return /* @__PURE__ */ (0,
|
|
2380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components24.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
|
|
2214
2381
|
}
|
|
2215
2382
|
function SheetClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2217
2384
|
Button,
|
|
2218
2385
|
{
|
|
2219
2386
|
slot: "close",
|
|
@@ -2230,8 +2397,8 @@ function SheetOverlay({
|
|
|
2230
2397
|
children,
|
|
2231
2398
|
...props
|
|
2232
2399
|
}) {
|
|
2233
|
-
return /* @__PURE__ */ (0,
|
|
2234
|
-
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2401
|
+
import_react_aria_components24.ModalOverlay,
|
|
2235
2402
|
{
|
|
2236
2403
|
"data-slot": "sheet-overlay",
|
|
2237
2404
|
isDismissable: true,
|
|
@@ -2251,8 +2418,8 @@ function Sheet({
|
|
|
2251
2418
|
showCloseButton = true,
|
|
2252
2419
|
...props
|
|
2253
2420
|
}) {
|
|
2254
|
-
return /* @__PURE__ */ (0,
|
|
2255
|
-
|
|
2421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2422
|
+
import_react_aria_components24.Modal,
|
|
2256
2423
|
{
|
|
2257
2424
|
"data-slot": "sheet-content",
|
|
2258
2425
|
"data-side": side,
|
|
@@ -2260,16 +2427,16 @@ function Sheet({
|
|
|
2260
2427
|
"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",
|
|
2261
2428
|
className
|
|
2262
2429
|
),
|
|
2263
|
-
children: /* @__PURE__ */ (0,
|
|
2264
|
-
|
|
2430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2431
|
+
import_react_aria_components24.Dialog,
|
|
2265
2432
|
{
|
|
2266
2433
|
"data-slot": "sheet",
|
|
2267
2434
|
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2268
2435
|
children: [
|
|
2269
2436
|
children,
|
|
2270
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2437
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react12.XIcon, {}),
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "sr-only", children: "Cerrar" })
|
|
2273
2440
|
] })
|
|
2274
2441
|
]
|
|
2275
2442
|
}
|
|
@@ -2284,10 +2451,10 @@ function SheetContent({
|
|
|
2284
2451
|
showCloseButton = true,
|
|
2285
2452
|
...props
|
|
2286
2453
|
}) {
|
|
2287
|
-
return /* @__PURE__ */ (0,
|
|
2454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
|
|
2288
2455
|
}
|
|
2289
2456
|
function SheetHeader({ className, ...props }) {
|
|
2290
|
-
return /* @__PURE__ */ (0,
|
|
2457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2291
2458
|
"div",
|
|
2292
2459
|
{
|
|
2293
2460
|
"data-slot": "sheet-header",
|
|
@@ -2297,7 +2464,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
2297
2464
|
);
|
|
2298
2465
|
}
|
|
2299
2466
|
function SheetFooter({ className, ...props }) {
|
|
2300
|
-
return /* @__PURE__ */ (0,
|
|
2467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2301
2468
|
"div",
|
|
2302
2469
|
{
|
|
2303
2470
|
"data-slot": "sheet-footer",
|
|
@@ -2307,8 +2474,8 @@ function SheetFooter({ className, ...props }) {
|
|
|
2307
2474
|
);
|
|
2308
2475
|
}
|
|
2309
2476
|
function SheetTitle({ className, ...props }) {
|
|
2310
|
-
return /* @__PURE__ */ (0,
|
|
2311
|
-
|
|
2477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2478
|
+
import_react_aria_components24.Heading,
|
|
2312
2479
|
{
|
|
2313
2480
|
slot: "title",
|
|
2314
2481
|
"data-slot": "sheet-title",
|
|
@@ -2321,8 +2488,8 @@ function SheetDescription({
|
|
|
2321
2488
|
className,
|
|
2322
2489
|
...props
|
|
2323
2490
|
}) {
|
|
2324
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
-
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2492
|
+
import_react_aria_components24.Text,
|
|
2326
2493
|
{
|
|
2327
2494
|
slot: "description",
|
|
2328
2495
|
"data-slot": "sheet-description",
|
|
@@ -2333,10 +2500,10 @@ function SheetDescription({
|
|
|
2333
2500
|
}
|
|
2334
2501
|
|
|
2335
2502
|
// src/ui/sidebar/sidebar.tsx
|
|
2336
|
-
var
|
|
2503
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2337
2504
|
var import_react11 = require("react");
|
|
2338
|
-
var
|
|
2339
|
-
var
|
|
2505
|
+
var import_react_aria_components25 = require("react-aria-components");
|
|
2506
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2340
2507
|
var SidebarContext = (0, import_react11.createContext)(null);
|
|
2341
2508
|
function useSidebar() {
|
|
2342
2509
|
const context = (0, import_react11.useContext)(SidebarContext);
|
|
@@ -2357,14 +2524,14 @@ function SidebarProvider({
|
|
|
2357
2524
|
}),
|
|
2358
2525
|
[collapsed]
|
|
2359
2526
|
);
|
|
2360
|
-
return /* @__PURE__ */ (0,
|
|
2527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SidebarContext.Provider, { value, children });
|
|
2361
2528
|
}
|
|
2362
2529
|
function Sidebar({
|
|
2363
2530
|
className,
|
|
2364
2531
|
...props
|
|
2365
2532
|
}) {
|
|
2366
2533
|
const { collapsed } = useSidebar();
|
|
2367
|
-
return /* @__PURE__ */ (0,
|
|
2534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2368
2535
|
"aside",
|
|
2369
2536
|
{
|
|
2370
2537
|
"data-slot": "sidebar",
|
|
@@ -2381,7 +2548,7 @@ function SidebarHeader({
|
|
|
2381
2548
|
className,
|
|
2382
2549
|
...props
|
|
2383
2550
|
}) {
|
|
2384
|
-
return /* @__PURE__ */ (0,
|
|
2551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2385
2552
|
"div",
|
|
2386
2553
|
{
|
|
2387
2554
|
"data-slot": "sidebar-header",
|
|
@@ -2396,7 +2563,7 @@ function SidebarSearch({
|
|
|
2396
2563
|
className,
|
|
2397
2564
|
...props
|
|
2398
2565
|
}) {
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2400
2567
|
"button",
|
|
2401
2568
|
{
|
|
2402
2569
|
type: "button",
|
|
@@ -2407,9 +2574,9 @@ function SidebarSearch({
|
|
|
2407
2574
|
),
|
|
2408
2575
|
...props,
|
|
2409
2576
|
children: [
|
|
2410
|
-
/* @__PURE__ */ (0,
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2577
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react13.Search, { className: "size-4 shrink-0" }),
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
|
|
2413
2580
|
]
|
|
2414
2581
|
}
|
|
2415
2582
|
);
|
|
@@ -2418,7 +2585,7 @@ function SidebarContent({
|
|
|
2418
2585
|
className,
|
|
2419
2586
|
...props
|
|
2420
2587
|
}) {
|
|
2421
|
-
return /* @__PURE__ */ (0,
|
|
2588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2422
2589
|
"nav",
|
|
2423
2590
|
{
|
|
2424
2591
|
"data-slot": "sidebar-content",
|
|
@@ -2432,7 +2599,7 @@ function SidebarFooter({
|
|
|
2432
2599
|
className,
|
|
2433
2600
|
...props
|
|
2434
2601
|
}) {
|
|
2435
|
-
return /* @__PURE__ */ (0,
|
|
2602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2436
2603
|
"div",
|
|
2437
2604
|
{
|
|
2438
2605
|
"data-slot": "sidebar-footer",
|
|
@@ -2451,14 +2618,14 @@ function SidebarGroup({
|
|
|
2451
2618
|
...props
|
|
2452
2619
|
}) {
|
|
2453
2620
|
const { collapsed } = useSidebar();
|
|
2454
|
-
return /* @__PURE__ */ (0,
|
|
2621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2455
2622
|
"section",
|
|
2456
2623
|
{
|
|
2457
2624
|
"data-slot": "sidebar-group",
|
|
2458
2625
|
className: cn("mb-4 last:mb-0", className),
|
|
2459
2626
|
...props,
|
|
2460
2627
|
children: [
|
|
2461
|
-
label && /* @__PURE__ */ (0,
|
|
2628
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2462
2629
|
"h2",
|
|
2463
2630
|
{
|
|
2464
2631
|
className: cn(
|
|
@@ -2484,8 +2651,8 @@ function SidebarItem({
|
|
|
2484
2651
|
}) {
|
|
2485
2652
|
const { collapsed } = useSidebar();
|
|
2486
2653
|
const content = typeof children === "function" ? label : children ?? label;
|
|
2487
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
-
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2655
|
+
import_react_aria_components25.Link,
|
|
2489
2656
|
{
|
|
2490
2657
|
"data-slot": "sidebar-item",
|
|
2491
2658
|
"aria-current": active ? "page" : void 0,
|
|
@@ -2496,16 +2663,16 @@ function SidebarItem({
|
|
|
2496
2663
|
typeof className === "function" ? className : className
|
|
2497
2664
|
),
|
|
2498
2665
|
...props,
|
|
2499
|
-
children: (values) => /* @__PURE__ */ (0,
|
|
2500
|
-
/* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2666
|
+
children: (values) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
2668
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2502
2669
|
"span",
|
|
2503
2670
|
{
|
|
2504
2671
|
className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
|
|
2505
2672
|
children: typeof children === "function" ? children(values) : content
|
|
2506
2673
|
}
|
|
2507
2674
|
),
|
|
2508
|
-
badge && !collapsed && /* @__PURE__ */ (0,
|
|
2675
|
+
badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-xs text-muted-foreground", children: badge })
|
|
2509
2676
|
] })
|
|
2510
2677
|
}
|
|
2511
2678
|
);
|
|
@@ -2514,7 +2681,7 @@ function SidebarSeparator({
|
|
|
2514
2681
|
className,
|
|
2515
2682
|
...props
|
|
2516
2683
|
}) {
|
|
2517
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2518
2685
|
"hr",
|
|
2519
2686
|
{
|
|
2520
2687
|
"data-slot": "sidebar-separator",
|
|
@@ -2525,7 +2692,7 @@ function SidebarSeparator({
|
|
|
2525
2692
|
}
|
|
2526
2693
|
function SidebarTrigger({ className, ...props }) {
|
|
2527
2694
|
const { collapsed, toggle } = useSidebar();
|
|
2528
|
-
return /* @__PURE__ */ (0,
|
|
2695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2529
2696
|
Button,
|
|
2530
2697
|
{
|
|
2531
2698
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -2534,7 +2701,7 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
2534
2701
|
variant: "ghost",
|
|
2535
2702
|
className: cn("ml-auto", className),
|
|
2536
2703
|
...props,
|
|
2537
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
2704
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react13.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react13.ChevronLeft, {})
|
|
2538
2705
|
}
|
|
2539
2706
|
);
|
|
2540
2707
|
}
|
|
@@ -2543,7 +2710,7 @@ function SidebarRail({
|
|
|
2543
2710
|
...props
|
|
2544
2711
|
}) {
|
|
2545
2712
|
const { toggle } = useSidebar();
|
|
2546
|
-
return /* @__PURE__ */ (0,
|
|
2713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2547
2714
|
"button",
|
|
2548
2715
|
{
|
|
2549
2716
|
type: "button",
|
|
@@ -2558,7 +2725,7 @@ function SidebarRail({
|
|
|
2558
2725
|
);
|
|
2559
2726
|
}
|
|
2560
2727
|
function SidebarMore({ className, ...props }) {
|
|
2561
|
-
return /* @__PURE__ */ (0,
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2562
2729
|
Button,
|
|
2563
2730
|
{
|
|
2564
2731
|
"aria-label": "M\xE1s opciones",
|
|
@@ -2566,34 +2733,34 @@ function SidebarMore({ className, ...props }) {
|
|
|
2566
2733
|
variant: "ghost",
|
|
2567
2734
|
className: cn("size-7", className),
|
|
2568
2735
|
...props,
|
|
2569
|
-
children: /* @__PURE__ */ (0,
|
|
2736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react13.Ellipsis, {})
|
|
2570
2737
|
}
|
|
2571
2738
|
);
|
|
2572
2739
|
}
|
|
2573
2740
|
|
|
2574
2741
|
// src/ui/skeleton/skeleton.tsx
|
|
2575
|
-
var
|
|
2742
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2576
2743
|
function Skeleton({ className, ...props }) {
|
|
2577
|
-
return /* @__PURE__ */ (0,
|
|
2744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
2578
2745
|
}
|
|
2579
2746
|
|
|
2580
2747
|
// src/ui/submit-button/submit-button.tsx
|
|
2581
2748
|
var import_react_dom = require("react-dom");
|
|
2582
|
-
var
|
|
2583
|
-
var
|
|
2749
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2750
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2584
2751
|
function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
|
|
2585
2752
|
const { pending } = (0, import_react_dom.useFormStatus)();
|
|
2586
2753
|
const busy = pending || loading;
|
|
2587
|
-
return /* @__PURE__ */ (0,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2755
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react14.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2589
2756
|
pendingLabel
|
|
2590
2757
|
] }) : children });
|
|
2591
2758
|
}
|
|
2592
2759
|
|
|
2593
2760
|
// src/ui/switch/switch.tsx
|
|
2594
2761
|
var import_react12 = require("react");
|
|
2595
|
-
var
|
|
2596
|
-
var
|
|
2762
|
+
var import_react_aria_components26 = require("react-aria-components");
|
|
2763
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2597
2764
|
var switchSizes = {
|
|
2598
2765
|
sm: {
|
|
2599
2766
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -2649,8 +2816,8 @@ function Switch({
|
|
|
2649
2816
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
2650
2817
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
2651
2818
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
2653
|
-
|
|
2819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2820
|
+
import_react_aria_components26.Switch,
|
|
2654
2821
|
{
|
|
2655
2822
|
"data-slot": "switch",
|
|
2656
2823
|
"data-size": size,
|
|
@@ -2666,8 +2833,8 @@ function Switch({
|
|
|
2666
2833
|
children: (state) => {
|
|
2667
2834
|
const isThumbActive = state.isHovered || state.isPressed;
|
|
2668
2835
|
const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
2669
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
-
/* @__PURE__ */ (0,
|
|
2836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2671
2838
|
"span",
|
|
2672
2839
|
{
|
|
2673
2840
|
"aria-hidden": "true",
|
|
@@ -2681,7 +2848,7 @@ function Switch({
|
|
|
2681
2848
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
2682
2849
|
styles.control
|
|
2683
2850
|
),
|
|
2684
|
-
children: /* @__PURE__ */ (0,
|
|
2851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2685
2852
|
"span",
|
|
2686
2853
|
{
|
|
2687
2854
|
"data-slot": "switch-thumb",
|
|
@@ -2701,9 +2868,9 @@ function Switch({
|
|
|
2701
2868
|
)
|
|
2702
2869
|
}
|
|
2703
2870
|
),
|
|
2704
|
-
children || description ? /* @__PURE__ */ (0,
|
|
2705
|
-
children ? /* @__PURE__ */ (0,
|
|
2706
|
-
description ? /* @__PURE__ */ (0,
|
|
2871
|
+
children || description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
2872
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
2873
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
|
|
2707
2874
|
] }) : null
|
|
2708
2875
|
] });
|
|
2709
2876
|
}
|
|
@@ -2712,9 +2879,9 @@ function Switch({
|
|
|
2712
2879
|
}
|
|
2713
2880
|
|
|
2714
2881
|
// src/ui/table/table.tsx
|
|
2715
|
-
var
|
|
2882
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2716
2883
|
function Table({ className, ...props }) {
|
|
2717
|
-
return /* @__PURE__ */ (0,
|
|
2884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2718
2885
|
"table",
|
|
2719
2886
|
{
|
|
2720
2887
|
"data-slot": "table",
|
|
@@ -2724,10 +2891,10 @@ function Table({ className, ...props }) {
|
|
|
2724
2891
|
) });
|
|
2725
2892
|
}
|
|
2726
2893
|
function TableHeader({ className, ...props }) {
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
2728
2895
|
}
|
|
2729
2896
|
function TableBody({ className, ...props }) {
|
|
2730
|
-
return /* @__PURE__ */ (0,
|
|
2897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2731
2898
|
"tbody",
|
|
2732
2899
|
{
|
|
2733
2900
|
"data-slot": "table-body",
|
|
@@ -2737,7 +2904,7 @@ function TableBody({ className, ...props }) {
|
|
|
2737
2904
|
);
|
|
2738
2905
|
}
|
|
2739
2906
|
function TableRow({ className, ...props }) {
|
|
2740
|
-
return /* @__PURE__ */ (0,
|
|
2907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2741
2908
|
"tr",
|
|
2742
2909
|
{
|
|
2743
2910
|
"data-slot": "table-row",
|
|
@@ -2750,7 +2917,7 @@ function TableRow({ className, ...props }) {
|
|
|
2750
2917
|
);
|
|
2751
2918
|
}
|
|
2752
2919
|
function TableHead({ className, ...props }) {
|
|
2753
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2754
2921
|
"th",
|
|
2755
2922
|
{
|
|
2756
2923
|
"data-slot": "table-head",
|
|
@@ -2763,7 +2930,7 @@ function TableHead({ className, ...props }) {
|
|
|
2763
2930
|
);
|
|
2764
2931
|
}
|
|
2765
2932
|
function TableCell({ className, ...props }) {
|
|
2766
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2767
2934
|
"td",
|
|
2768
2935
|
{
|
|
2769
2936
|
"data-slot": "table-cell",
|
|
@@ -2773,7 +2940,7 @@ function TableCell({ className, ...props }) {
|
|
|
2773
2940
|
);
|
|
2774
2941
|
}
|
|
2775
2942
|
function TableCaption({ className, ...props }) {
|
|
2776
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2777
2944
|
"caption",
|
|
2778
2945
|
{
|
|
2779
2946
|
"data-slot": "table-caption",
|
|
@@ -2783,7 +2950,7 @@ function TableCaption({ className, ...props }) {
|
|
|
2783
2950
|
);
|
|
2784
2951
|
}
|
|
2785
2952
|
function TableFooter({ className, ...props }) {
|
|
2786
|
-
return /* @__PURE__ */ (0,
|
|
2953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2787
2954
|
"tfoot",
|
|
2788
2955
|
{
|
|
2789
2956
|
"data-slot": "table-footer",
|
|
@@ -2794,28 +2961,28 @@ function TableFooter({ className, ...props }) {
|
|
|
2794
2961
|
}
|
|
2795
2962
|
|
|
2796
2963
|
// src/ui/tabs/tabs.tsx
|
|
2797
|
-
var
|
|
2798
|
-
var
|
|
2964
|
+
var import_react_aria_components27 = require("react-aria-components");
|
|
2965
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2799
2966
|
function Tabs({ className, ...props }) {
|
|
2800
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components27.Tabs, { "data-slot": "tabs", className: (0, import_react_aria_components27.composeRenderProps)(className, (value) => cn("flex flex-col gap-2", value)), ...props });
|
|
2801
2968
|
}
|
|
2802
2969
|
function TabsList({ className, ...props }) {
|
|
2803
|
-
return /* @__PURE__ */ (0,
|
|
2970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components27.TabList, { "data-slot": "tabs-list", className: (0, import_react_aria_components27.composeRenderProps)(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
|
|
2804
2971
|
}
|
|
2805
2972
|
function TabsTrigger({ className, ...props }) {
|
|
2806
|
-
return /* @__PURE__ */ (0,
|
|
2973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components27.Tab, { "data-slot": "tabs-trigger", className: (0, import_react_aria_components27.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 });
|
|
2807
2974
|
}
|
|
2808
2975
|
function TabsPanels({ className, ...props }) {
|
|
2809
|
-
return /* @__PURE__ */ (0,
|
|
2976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components27.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
2810
2977
|
}
|
|
2811
2978
|
function TabsContent({ className, ...props }) {
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components27.TabPanel, { "data-slot": "tabs-content", className: (0, import_react_aria_components27.composeRenderProps)(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
|
|
2813
2980
|
}
|
|
2814
2981
|
|
|
2815
2982
|
// src/ui/toast/toast.tsx
|
|
2816
2983
|
var import_react13 = require("react");
|
|
2817
2984
|
var import_sileo = require("sileo");
|
|
2818
|
-
var
|
|
2985
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2819
2986
|
function toSileoOptions({ title, description, duration, position, action }) {
|
|
2820
2987
|
return {
|
|
2821
2988
|
title,
|
|
@@ -2854,18 +3021,18 @@ function useToast() {
|
|
|
2854
3021
|
return toast;
|
|
2855
3022
|
}
|
|
2856
3023
|
function ToastProvider({ children }) {
|
|
2857
|
-
return /* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
2858
3025
|
children,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
3026
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Toaster, {})
|
|
2860
3027
|
] });
|
|
2861
3028
|
}
|
|
2862
3029
|
function Toaster({ position }) {
|
|
2863
|
-
return /* @__PURE__ */ (0,
|
|
3030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_sileo.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
2864
3031
|
}
|
|
2865
3032
|
function ToastViewport({ position, visiblePosition, className }) {
|
|
2866
3033
|
void className;
|
|
2867
3034
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
2868
|
-
return /* @__PURE__ */ (0,
|
|
3035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Toaster, { position });
|
|
2869
3036
|
}
|
|
2870
3037
|
function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
|
|
2871
3038
|
(0, import_react13.useEffect)(() => {
|
|
@@ -2880,15 +3047,15 @@ function Toast({ id, title, description, variant = "default", action, state = "o
|
|
|
2880
3047
|
}
|
|
2881
3048
|
|
|
2882
3049
|
// src/ui/toolbar/toolbar.tsx
|
|
2883
|
-
var
|
|
3050
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2884
3051
|
function Toolbar({ className, ...props }) {
|
|
2885
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
2886
3053
|
}
|
|
2887
3054
|
function ToolbarGroup({ className, ...props }) {
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
3055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
|
|
2889
3056
|
}
|
|
2890
3057
|
function ToolbarSpacer({ className, ...props }) {
|
|
2891
|
-
return /* @__PURE__ */ (0,
|
|
3058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
2892
3059
|
}
|
|
2893
3060
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2894
3061
|
0 && (module.exports = {
|
|
@@ -2944,6 +3111,16 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
2944
3111
|
CommandItem,
|
|
2945
3112
|
CommandList,
|
|
2946
3113
|
ConfirmDialog,
|
|
3114
|
+
Dialog,
|
|
3115
|
+
DialogClose,
|
|
3116
|
+
DialogContent,
|
|
3117
|
+
DialogDescription,
|
|
3118
|
+
DialogFooter,
|
|
3119
|
+
DialogHeader,
|
|
3120
|
+
DialogOverlay,
|
|
3121
|
+
DialogPortal,
|
|
3122
|
+
DialogTitle,
|
|
3123
|
+
DialogTrigger,
|
|
2947
3124
|
Drawer,
|
|
2948
3125
|
DrawerDescription,
|
|
2949
3126
|
DrawerFooter,
|
|
@@ -3063,6 +3240,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3063
3240
|
ToolbarSpacer,
|
|
3064
3241
|
Tooltip,
|
|
3065
3242
|
TooltipTrigger,
|
|
3243
|
+
actionRipple,
|
|
3066
3244
|
alertVariants,
|
|
3067
3245
|
badgeVariants,
|
|
3068
3246
|
buttonGroupVariants,
|