@doscientos/ui 0.1.18 → 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 +425 -258
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -4
- package/dist/index.d.ts +41 -4
- package/dist/index.js +391 -228
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -959,24 +959,177 @@ function ConfirmDialog({
|
|
|
959
959
|
);
|
|
960
960
|
}
|
|
961
961
|
|
|
962
|
+
// src/ui/dialog/dialog.tsx
|
|
963
|
+
import { XIcon } from "lucide-react";
|
|
964
|
+
import * as React2 from "react";
|
|
965
|
+
import {
|
|
966
|
+
Dialog as AriaDialog2,
|
|
967
|
+
Heading as Heading2,
|
|
968
|
+
Modal as Modal2,
|
|
969
|
+
ModalOverlay as ModalOverlay2,
|
|
970
|
+
Text as Text3
|
|
971
|
+
} from "react-aria-components";
|
|
972
|
+
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
973
|
+
var DialogContext = React2.createContext(null);
|
|
974
|
+
function useDialogContext() {
|
|
975
|
+
const context = React2.useContext(DialogContext);
|
|
976
|
+
if (!context) throw new Error("Dialog components must be rendered within Dialog.");
|
|
977
|
+
return context;
|
|
978
|
+
}
|
|
979
|
+
function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledOpen }) {
|
|
980
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
|
|
981
|
+
const open = controlledOpen ?? uncontrolledOpen;
|
|
982
|
+
const setOpen = React2.useCallback(
|
|
983
|
+
(nextOpen) => {
|
|
984
|
+
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
985
|
+
onOpenChange?.(nextOpen);
|
|
986
|
+
},
|
|
987
|
+
[controlledOpen, onOpenChange]
|
|
988
|
+
);
|
|
989
|
+
return /* @__PURE__ */ jsx16(DialogContext.Provider, { value: { open, setOpen }, children });
|
|
990
|
+
}
|
|
991
|
+
function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
992
|
+
const { setOpen } = useDialogContext();
|
|
993
|
+
const handleClick = (event) => {
|
|
994
|
+
onClick?.(event);
|
|
995
|
+
if (!event.defaultPrevented) setOpen(true);
|
|
996
|
+
};
|
|
997
|
+
if (asChild && React2.isValidElement(children)) {
|
|
998
|
+
const child = children;
|
|
999
|
+
return React2.cloneElement(child, {
|
|
1000
|
+
...props,
|
|
1001
|
+
"data-slot": "dialog-trigger",
|
|
1002
|
+
onClick: (event) => {
|
|
1003
|
+
child.props.onClick?.(event);
|
|
1004
|
+
handleClick(event);
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
return /* @__PURE__ */ jsx16(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
1009
|
+
}
|
|
1010
|
+
function DialogPortal({ children }) {
|
|
1011
|
+
return /* @__PURE__ */ jsx16(Fragment5, { children });
|
|
1012
|
+
}
|
|
1013
|
+
function DialogOverlay({ children, className, ...props }) {
|
|
1014
|
+
const { open, setOpen } = useDialogContext();
|
|
1015
|
+
if (!open) return null;
|
|
1016
|
+
return /* @__PURE__ */ jsx16(
|
|
1017
|
+
ModalOverlay2,
|
|
1018
|
+
{
|
|
1019
|
+
"data-slot": "dialog-overlay",
|
|
1020
|
+
isDismissable: true,
|
|
1021
|
+
isOpen: open,
|
|
1022
|
+
onOpenChange: setOpen,
|
|
1023
|
+
className: cn(
|
|
1024
|
+
"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",
|
|
1025
|
+
className
|
|
1026
|
+
),
|
|
1027
|
+
...props,
|
|
1028
|
+
children
|
|
1029
|
+
}
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
function DialogContent({
|
|
1033
|
+
children,
|
|
1034
|
+
className,
|
|
1035
|
+
onOverlayClick,
|
|
1036
|
+
showCloseButton = true,
|
|
1037
|
+
...props
|
|
1038
|
+
}) {
|
|
1039
|
+
const { setOpen } = useDialogContext();
|
|
1040
|
+
return /* @__PURE__ */ jsx16(DialogPortal, { children: /* @__PURE__ */ jsx16(
|
|
1041
|
+
DialogOverlay,
|
|
1042
|
+
{
|
|
1043
|
+
onClick: (event) => {
|
|
1044
|
+
if (event.target === event.currentTarget) onOverlayClick?.(event);
|
|
1045
|
+
},
|
|
1046
|
+
children: /* @__PURE__ */ jsx16(
|
|
1047
|
+
Modal2,
|
|
1048
|
+
{
|
|
1049
|
+
className: cn(
|
|
1050
|
+
"w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
|
|
1051
|
+
className
|
|
1052
|
+
),
|
|
1053
|
+
children: /* @__PURE__ */ jsxs6(
|
|
1054
|
+
AriaDialog2,
|
|
1055
|
+
{
|
|
1056
|
+
"data-slot": "dialog-content",
|
|
1057
|
+
className: cn(
|
|
1058
|
+
"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",
|
|
1059
|
+
className
|
|
1060
|
+
),
|
|
1061
|
+
...props,
|
|
1062
|
+
children: [
|
|
1063
|
+
children,
|
|
1064
|
+
showCloseButton ? /* @__PURE__ */ jsx16(
|
|
1065
|
+
Button,
|
|
1066
|
+
{
|
|
1067
|
+
"aria-label": "Cerrar di\xE1logo",
|
|
1068
|
+
"data-slot": "dialog-close",
|
|
1069
|
+
variant: "ghost",
|
|
1070
|
+
className: "absolute top-2 right-2",
|
|
1071
|
+
size: "icon-sm",
|
|
1072
|
+
onPress: () => setOpen(false),
|
|
1073
|
+
children: /* @__PURE__ */ jsx16(XIcon, {})
|
|
1074
|
+
}
|
|
1075
|
+
) : null
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1079
|
+
}
|
|
1080
|
+
)
|
|
1081
|
+
}
|
|
1082
|
+
) });
|
|
1083
|
+
}
|
|
1084
|
+
function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
1085
|
+
const { setOpen } = useDialogContext();
|
|
1086
|
+
if (asChild && React2.isValidElement(children)) {
|
|
1087
|
+
const child = children;
|
|
1088
|
+
return React2.cloneElement(child, {
|
|
1089
|
+
...props,
|
|
1090
|
+
"data-slot": "dialog-close",
|
|
1091
|
+
onClick: (event) => {
|
|
1092
|
+
child.props.onClick?.(event);
|
|
1093
|
+
if (!event.defaultPrevented) setOpen(false);
|
|
1094
|
+
}
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
return /* @__PURE__ */ jsx16(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
|
|
1098
|
+
}
|
|
1099
|
+
function DialogHeader({ className, ...props }) {
|
|
1100
|
+
return /* @__PURE__ */ jsx16("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1101
|
+
}
|
|
1102
|
+
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1103
|
+
return /* @__PURE__ */ jsxs6("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: [
|
|
1104
|
+
children,
|
|
1105
|
+
showCloseButton ? /* @__PURE__ */ jsx16(DialogClose, { variant: "outline", children: "Cerrar" }) : null
|
|
1106
|
+
] });
|
|
1107
|
+
}
|
|
1108
|
+
function DialogTitle({ className, ...props }) {
|
|
1109
|
+
return /* @__PURE__ */ jsx16(Heading2, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
|
|
1110
|
+
}
|
|
1111
|
+
function DialogDescription({ className, ...props }) {
|
|
1112
|
+
return /* @__PURE__ */ jsx16(Text3, { 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 });
|
|
1113
|
+
}
|
|
1114
|
+
|
|
962
1115
|
// src/ui/drawer/drawer.tsx
|
|
963
|
-
import { Dialog as
|
|
964
|
-
import { jsx as
|
|
1116
|
+
import { Dialog as AriaDialog3, Modal as Modal3, ModalOverlay as ModalOverlay3 } from "react-aria-components";
|
|
1117
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
965
1118
|
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" };
|
|
966
1119
|
function Drawer({ children, side = "right", className, ...props }) {
|
|
967
|
-
return /* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ jsx17(ModalOverlay3, { 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__ */ jsx17(Modal3, { 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__ */ jsx17(AriaDialog3, { "data-slot": "drawer", className: "outline-none", children }) }) });
|
|
968
1121
|
}
|
|
969
1122
|
function DrawerHeader({ className, ...props }) {
|
|
970
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ jsx17("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
971
1124
|
}
|
|
972
1125
|
function DrawerFooter({ className, ...props }) {
|
|
973
|
-
return /* @__PURE__ */
|
|
1126
|
+
return /* @__PURE__ */ jsx17("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 });
|
|
974
1127
|
}
|
|
975
1128
|
function DrawerTitle({ className, ...props }) {
|
|
976
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ jsx17("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
|
|
977
1130
|
}
|
|
978
1131
|
function DrawerDescription({ className, ...props }) {
|
|
979
|
-
return /* @__PURE__ */
|
|
1132
|
+
return /* @__PURE__ */ jsx17("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
980
1133
|
}
|
|
981
1134
|
|
|
982
1135
|
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
@@ -994,11 +1147,11 @@ import {
|
|
|
994
1147
|
Separator as SeparatorPrimitive2,
|
|
995
1148
|
SubmenuTrigger as SubmenuTriggerPrimitive
|
|
996
1149
|
} from "react-aria-components";
|
|
997
|
-
import { Fragment as
|
|
1150
|
+
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
998
1151
|
function DropdownMenuTrigger({
|
|
999
1152
|
...props
|
|
1000
1153
|
}) {
|
|
1001
|
-
return /* @__PURE__ */
|
|
1154
|
+
return /* @__PURE__ */ jsx18(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1002
1155
|
}
|
|
1003
1156
|
function DropdownMenu({
|
|
1004
1157
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -1009,7 +1162,7 @@ function DropdownMenu({
|
|
|
1009
1162
|
children,
|
|
1010
1163
|
...props
|
|
1011
1164
|
}) {
|
|
1012
|
-
return /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ jsx18(
|
|
1013
1166
|
PopoverPrimitive,
|
|
1014
1167
|
{
|
|
1015
1168
|
"data-slot": dataSlot,
|
|
@@ -1017,7 +1170,7 @@ function DropdownMenu({
|
|
|
1017
1170
|
offset,
|
|
1018
1171
|
crossOffset,
|
|
1019
1172
|
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),
|
|
1020
|
-
children: /* @__PURE__ */
|
|
1173
|
+
children: /* @__PURE__ */ jsx18(
|
|
1021
1174
|
MenuPrimitive,
|
|
1022
1175
|
{
|
|
1023
1176
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
@@ -1031,14 +1184,14 @@ function DropdownMenu({
|
|
|
1031
1184
|
function DropdownMenuGroup({
|
|
1032
1185
|
...props
|
|
1033
1186
|
}) {
|
|
1034
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ jsx18(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
|
|
1035
1188
|
}
|
|
1036
1189
|
function DropdownMenuLabel({
|
|
1037
1190
|
className,
|
|
1038
1191
|
inset,
|
|
1039
1192
|
...props
|
|
1040
1193
|
}) {
|
|
1041
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ jsx18(
|
|
1042
1195
|
HeaderPrimitive,
|
|
1043
1196
|
{
|
|
1044
1197
|
"data-slot": "dropdown-menu-label",
|
|
@@ -1070,7 +1223,7 @@ function DropdownMenuItem({
|
|
|
1070
1223
|
children,
|
|
1071
1224
|
...props
|
|
1072
1225
|
}) {
|
|
1073
|
-
return /* @__PURE__ */
|
|
1226
|
+
return /* @__PURE__ */ jsx18(
|
|
1074
1227
|
MenuItemPrimitive,
|
|
1075
1228
|
{
|
|
1076
1229
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1084,13 +1237,13 @@ function DropdownMenuItem({
|
|
|
1084
1237
|
...props,
|
|
1085
1238
|
children: composeRenderProps(
|
|
1086
1239
|
children,
|
|
1087
|
-
(children2, { isSelected, selectionMode }) => /* @__PURE__ */
|
|
1088
|
-
selectionMode !== "none" ? /* @__PURE__ */
|
|
1240
|
+
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
1241
|
+
selectionMode !== "none" ? /* @__PURE__ */ jsx18(
|
|
1089
1242
|
"span",
|
|
1090
1243
|
{
|
|
1091
1244
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1092
1245
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
1093
|
-
children: isSelected ? /* @__PURE__ */
|
|
1246
|
+
children: isSelected ? /* @__PURE__ */ jsx18(CheckIcon, {}) : null
|
|
1094
1247
|
}
|
|
1095
1248
|
) : null,
|
|
1096
1249
|
children2
|
|
@@ -1102,7 +1255,7 @@ function DropdownMenuItem({
|
|
|
1102
1255
|
function DropdownMenuSub({
|
|
1103
1256
|
...props
|
|
1104
1257
|
}) {
|
|
1105
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ jsx18(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1106
1259
|
}
|
|
1107
1260
|
function DropdownMenuSubTrigger({
|
|
1108
1261
|
className,
|
|
@@ -1110,7 +1263,7 @@ function DropdownMenuSubTrigger({
|
|
|
1110
1263
|
children,
|
|
1111
1264
|
...props
|
|
1112
1265
|
}) {
|
|
1113
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ jsx18(
|
|
1114
1267
|
MenuItemPrimitive,
|
|
1115
1268
|
{
|
|
1116
1269
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -1121,9 +1274,9 @@ function DropdownMenuSubTrigger({
|
|
|
1121
1274
|
className
|
|
1122
1275
|
),
|
|
1123
1276
|
...props,
|
|
1124
|
-
children: composeRenderProps(children, (children2) => /* @__PURE__ */
|
|
1277
|
+
children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
1125
1278
|
children2,
|
|
1126
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ jsx18(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
1127
1280
|
] }))
|
|
1128
1281
|
}
|
|
1129
1282
|
);
|
|
@@ -1135,7 +1288,7 @@ function DropdownMenuSubContent({
|
|
|
1135
1288
|
className,
|
|
1136
1289
|
...props
|
|
1137
1290
|
}) {
|
|
1138
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ jsx18(
|
|
1139
1292
|
DropdownMenu,
|
|
1140
1293
|
{
|
|
1141
1294
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1151,7 +1304,7 @@ function DropdownMenuSeparator({
|
|
|
1151
1304
|
className,
|
|
1152
1305
|
...props
|
|
1153
1306
|
}) {
|
|
1154
|
-
return /* @__PURE__ */
|
|
1307
|
+
return /* @__PURE__ */ jsx18(
|
|
1155
1308
|
SeparatorPrimitive2,
|
|
1156
1309
|
{
|
|
1157
1310
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -1164,7 +1317,7 @@ function DropdownMenuShortcut({
|
|
|
1164
1317
|
className,
|
|
1165
1318
|
...props
|
|
1166
1319
|
}) {
|
|
1167
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ jsx18(
|
|
1168
1321
|
"span",
|
|
1169
1322
|
{
|
|
1170
1323
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1179,9 +1332,9 @@ function DropdownMenuShortcut({
|
|
|
1179
1332
|
|
|
1180
1333
|
// src/ui/empty-state/empty-state.tsx
|
|
1181
1334
|
import { cva as cva7 } from "class-variance-authority";
|
|
1182
|
-
import { jsx as
|
|
1335
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1183
1336
|
function EmptyState({ className, ...props }) {
|
|
1184
|
-
return /* @__PURE__ */
|
|
1337
|
+
return /* @__PURE__ */ jsx19(
|
|
1185
1338
|
"div",
|
|
1186
1339
|
{
|
|
1187
1340
|
"data-slot": "empty-state",
|
|
@@ -1194,7 +1347,7 @@ function EmptyState({ className, ...props }) {
|
|
|
1194
1347
|
);
|
|
1195
1348
|
}
|
|
1196
1349
|
function EmptyStateHeader({ className, ...props }) {
|
|
1197
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ jsx19(
|
|
1198
1351
|
"div",
|
|
1199
1352
|
{
|
|
1200
1353
|
"data-slot": "empty-state-header",
|
|
@@ -1220,7 +1373,7 @@ function EmptyStateMedia({
|
|
|
1220
1373
|
variant = "default",
|
|
1221
1374
|
...props
|
|
1222
1375
|
}) {
|
|
1223
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ jsx19(
|
|
1224
1377
|
"div",
|
|
1225
1378
|
{
|
|
1226
1379
|
"data-slot": "empty-state-media",
|
|
@@ -1231,7 +1384,7 @@ function EmptyStateMedia({
|
|
|
1231
1384
|
);
|
|
1232
1385
|
}
|
|
1233
1386
|
function EmptyStateTitle({ className, ...props }) {
|
|
1234
|
-
return /* @__PURE__ */
|
|
1387
|
+
return /* @__PURE__ */ jsx19(
|
|
1235
1388
|
"h3",
|
|
1236
1389
|
{
|
|
1237
1390
|
"data-slot": "empty-state-title",
|
|
@@ -1241,7 +1394,7 @@ function EmptyStateTitle({ className, ...props }) {
|
|
|
1241
1394
|
);
|
|
1242
1395
|
}
|
|
1243
1396
|
function EmptyStateDescription({ className, ...props }) {
|
|
1244
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ jsx19(
|
|
1245
1398
|
"p",
|
|
1246
1399
|
{
|
|
1247
1400
|
"data-slot": "empty-state-description",
|
|
@@ -1254,7 +1407,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
1254
1407
|
);
|
|
1255
1408
|
}
|
|
1256
1409
|
function EmptyStateContent({ className, ...props }) {
|
|
1257
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsx19(
|
|
1258
1411
|
"div",
|
|
1259
1412
|
{
|
|
1260
1413
|
"data-slot": "empty-state-content",
|
|
@@ -1273,22 +1426,22 @@ import { cva as cva8 } from "class-variance-authority";
|
|
|
1273
1426
|
// src/ui/label/label.tsx
|
|
1274
1427
|
import { forwardRef } from "react";
|
|
1275
1428
|
import { Label as LabelPrimitive } from "react-aria-components";
|
|
1276
|
-
import { jsx as
|
|
1429
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1277
1430
|
var Label2 = forwardRef(function Label3({ className, ...props }, ref) {
|
|
1278
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ jsx20(LabelPrimitive, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
|
|
1279
1432
|
});
|
|
1280
1433
|
|
|
1281
1434
|
// src/ui/field/field.tsx
|
|
1282
|
-
import { jsx as
|
|
1435
|
+
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1283
1436
|
function FieldSet({ className, ...props }) {
|
|
1284
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ jsx21("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
1285
1438
|
}
|
|
1286
1439
|
function FieldLegend({
|
|
1287
1440
|
className,
|
|
1288
1441
|
variant = "legend",
|
|
1289
1442
|
...props
|
|
1290
1443
|
}) {
|
|
1291
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx21(
|
|
1292
1445
|
"legend",
|
|
1293
1446
|
{
|
|
1294
1447
|
"data-slot": "field-legend",
|
|
@@ -1302,7 +1455,7 @@ function FieldLegend({
|
|
|
1302
1455
|
);
|
|
1303
1456
|
}
|
|
1304
1457
|
function FieldGroup({ className, ...props }) {
|
|
1305
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ jsx21(
|
|
1306
1459
|
"div",
|
|
1307
1460
|
{
|
|
1308
1461
|
"data-slot": "field-group",
|
|
@@ -1330,7 +1483,7 @@ var fieldVariants = cva8(
|
|
|
1330
1483
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
1331
1484
|
return (
|
|
1332
1485
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
1333
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ jsx21(
|
|
1334
1487
|
"div",
|
|
1335
1488
|
{
|
|
1336
1489
|
role: "group",
|
|
@@ -1343,7 +1496,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1343
1496
|
);
|
|
1344
1497
|
}
|
|
1345
1498
|
function FieldContent({ className, ...props }) {
|
|
1346
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ jsx21(
|
|
1347
1500
|
"div",
|
|
1348
1501
|
{
|
|
1349
1502
|
"data-slot": "field-content",
|
|
@@ -1353,7 +1506,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1353
1506
|
);
|
|
1354
1507
|
}
|
|
1355
1508
|
function FieldLabel({ className, ...props }) {
|
|
1356
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ jsx21(
|
|
1357
1510
|
Label2,
|
|
1358
1511
|
{
|
|
1359
1512
|
"data-slot": "field-label",
|
|
@@ -1366,7 +1519,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1366
1519
|
);
|
|
1367
1520
|
}
|
|
1368
1521
|
function FieldTitle({ className, ...props }) {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ jsx21(
|
|
1370
1523
|
"div",
|
|
1371
1524
|
{
|
|
1372
1525
|
"data-slot": "field-title",
|
|
@@ -1376,7 +1529,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1376
1529
|
);
|
|
1377
1530
|
}
|
|
1378
1531
|
function FieldDescription({ className, ...props }) {
|
|
1379
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ jsx21(
|
|
1380
1533
|
"p",
|
|
1381
1534
|
{
|
|
1382
1535
|
"data-slot": "field-description",
|
|
@@ -1389,7 +1542,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1389
1542
|
);
|
|
1390
1543
|
}
|
|
1391
1544
|
function FieldSeparator({ className, children, ...props }) {
|
|
1392
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ jsxs8(
|
|
1393
1546
|
"div",
|
|
1394
1547
|
{
|
|
1395
1548
|
"data-slot": "field-separator",
|
|
@@ -1397,8 +1550,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1397
1550
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
1398
1551
|
...props,
|
|
1399
1552
|
children: [
|
|
1400
|
-
/* @__PURE__ */
|
|
1401
|
-
children ? /* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ jsx21(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1554
|
+
children ? /* @__PURE__ */ jsx21(
|
|
1402
1555
|
"span",
|
|
1403
1556
|
{
|
|
1404
1557
|
"data-slot": "field-separator-content",
|
|
@@ -1412,9 +1565,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1412
1565
|
}
|
|
1413
1566
|
function FieldError2({ className, children, errors, ...props }) {
|
|
1414
1567
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
1415
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */
|
|
1568
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx21("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx21("li", { children: message }, message)) }) : null);
|
|
1416
1569
|
if (!content) return null;
|
|
1417
|
-
return /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ jsx21(
|
|
1418
1571
|
"div",
|
|
1419
1572
|
{
|
|
1420
1573
|
role: "alert",
|
|
@@ -1427,65 +1580,65 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
1427
1580
|
}
|
|
1428
1581
|
|
|
1429
1582
|
// src/ui/form-feedback/form-feedback.tsx
|
|
1430
|
-
import { useCallback as
|
|
1583
|
+
import { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef3, useState as useState7 } from "react";
|
|
1431
1584
|
import { CheckCircle, LoaderCircle, CircleAlert } from "lucide-react";
|
|
1432
|
-
import { jsx as
|
|
1585
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1433
1586
|
function useFormFeedback(options) {
|
|
1434
1587
|
const resetMs = options?.successResetMs ?? 2500;
|
|
1435
|
-
const [state, setState] =
|
|
1588
|
+
const [state, setState] = useState7({ status: "idle" });
|
|
1436
1589
|
const timer = useRef3(null);
|
|
1437
|
-
const clearTimer =
|
|
1590
|
+
const clearTimer = useCallback4(() => {
|
|
1438
1591
|
if (timer.current) clearTimeout(timer.current);
|
|
1439
1592
|
timer.current = null;
|
|
1440
1593
|
}, []);
|
|
1441
1594
|
useEffect4(() => () => clearTimer(), [clearTimer]);
|
|
1442
|
-
const setPending =
|
|
1595
|
+
const setPending = useCallback4(() => {
|
|
1443
1596
|
clearTimer();
|
|
1444
1597
|
setState({ status: "pending" });
|
|
1445
1598
|
}, [clearTimer]);
|
|
1446
|
-
const setSuccess =
|
|
1599
|
+
const setSuccess = useCallback4((message) => {
|
|
1447
1600
|
clearTimer();
|
|
1448
1601
|
setState({ status: "success", message });
|
|
1449
1602
|
if (resetMs > 0) timer.current = setTimeout(() => setState({ status: "idle" }), resetMs);
|
|
1450
1603
|
}, [clearTimer, resetMs]);
|
|
1451
|
-
const setError =
|
|
1604
|
+
const setError = useCallback4((message) => {
|
|
1452
1605
|
clearTimer();
|
|
1453
1606
|
setState({ status: "error", message });
|
|
1454
1607
|
}, [clearTimer]);
|
|
1455
|
-
const reset =
|
|
1608
|
+
const reset = useCallback4(() => {
|
|
1456
1609
|
clearTimer();
|
|
1457
1610
|
setState({ status: "idle" });
|
|
1458
1611
|
}, [clearTimer]);
|
|
1459
1612
|
return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
|
|
1460
1613
|
}
|
|
1461
1614
|
function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
|
|
1462
|
-
if (state.status === "idle") return /* @__PURE__ */
|
|
1615
|
+
if (state.status === "idle") return /* @__PURE__ */ jsx22("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
1463
1616
|
const error = state.status === "error";
|
|
1464
1617
|
const success = state.status === "success";
|
|
1465
|
-
return /* @__PURE__ */
|
|
1466
|
-
state.status === "pending" && /* @__PURE__ */
|
|
1467
|
-
success && /* @__PURE__ */
|
|
1468
|
-
error && /* @__PURE__ */
|
|
1469
|
-
/* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ jsxs9("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: [
|
|
1619
|
+
state.status === "pending" && /* @__PURE__ */ jsx22(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
1620
|
+
success && /* @__PURE__ */ jsx22(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1621
|
+
error && /* @__PURE__ */ jsx22(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1622
|
+
/* @__PURE__ */ jsx22("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
1470
1623
|
] });
|
|
1471
1624
|
}
|
|
1472
1625
|
|
|
1473
1626
|
// src/ui/form-row/form-row.tsx
|
|
1474
|
-
import { Fragment as
|
|
1627
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1475
1628
|
function FormRow({ label, htmlFor, required, hint, error, className, children }) {
|
|
1476
1629
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
1477
1630
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
1478
|
-
return /* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ jsxs10("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
1632
|
+
/* @__PURE__ */ jsxs10("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
|
|
1480
1633
|
label,
|
|
1481
|
-
required && /* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1634
|
+
required && /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
1635
|
+
/* @__PURE__ */ jsx23("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
|
|
1636
|
+
/* @__PURE__ */ jsx23("span", { className: "sr-only", children: " (obligatorio)" })
|
|
1484
1637
|
] })
|
|
1485
1638
|
] }),
|
|
1486
1639
|
children,
|
|
1487
|
-
hint && /* @__PURE__ */
|
|
1488
|
-
error && /* @__PURE__ */
|
|
1640
|
+
hint && /* @__PURE__ */ jsx23("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
|
|
1641
|
+
error && /* @__PURE__ */ jsx23("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
|
|
1489
1642
|
] });
|
|
1490
1643
|
}
|
|
1491
1644
|
|
|
@@ -1493,28 +1646,28 @@ function FormRow({ label, htmlFor, required, hint, error, className, children })
|
|
|
1493
1646
|
import { Link as Link2 } from "react-aria-components";
|
|
1494
1647
|
|
|
1495
1648
|
// src/ui/tooltip/tooltip.tsx
|
|
1496
|
-
import * as
|
|
1649
|
+
import * as React4 from "react";
|
|
1497
1650
|
import {
|
|
1498
1651
|
Focusable,
|
|
1499
1652
|
OverlayArrow,
|
|
1500
1653
|
Tooltip as TooltipPrimitive,
|
|
1501
1654
|
TooltipTrigger as TooltipTriggerPrimitive
|
|
1502
1655
|
} from "react-aria-components";
|
|
1503
|
-
import { jsx as
|
|
1656
|
+
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1504
1657
|
function TooltipTrigger({
|
|
1505
1658
|
delay = 0,
|
|
1506
1659
|
children,
|
|
1507
1660
|
...props
|
|
1508
1661
|
}) {
|
|
1509
|
-
const [trigger, tooltip] =
|
|
1510
|
-
return /* @__PURE__ */
|
|
1662
|
+
const [trigger, tooltip] = React4.Children.toArray(children);
|
|
1663
|
+
return /* @__PURE__ */ jsxs11(
|
|
1511
1664
|
TooltipTriggerPrimitive,
|
|
1512
1665
|
{
|
|
1513
1666
|
"data-slot": "tooltip-trigger",
|
|
1514
1667
|
delay,
|
|
1515
1668
|
...props,
|
|
1516
1669
|
children: [
|
|
1517
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx24(Focusable, { children: trigger }),
|
|
1518
1671
|
tooltip
|
|
1519
1672
|
]
|
|
1520
1673
|
}
|
|
@@ -1528,7 +1681,7 @@ function Tooltip({
|
|
|
1528
1681
|
children,
|
|
1529
1682
|
...props
|
|
1530
1683
|
}) {
|
|
1531
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ jsxs11(
|
|
1532
1685
|
TooltipPrimitive,
|
|
1533
1686
|
{
|
|
1534
1687
|
"data-slot": "tooltip-content",
|
|
@@ -1542,7 +1695,7 @@ function Tooltip({
|
|
|
1542
1695
|
...props,
|
|
1543
1696
|
children: [
|
|
1544
1697
|
children,
|
|
1545
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ jsx24(
|
|
1546
1699
|
OverlayArrow,
|
|
1547
1700
|
{
|
|
1548
1701
|
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
|
|
@@ -1560,7 +1713,7 @@ function Tooltip({
|
|
|
1560
1713
|
}
|
|
1561
1714
|
|
|
1562
1715
|
// src/ui/icon-button/icon-button.tsx
|
|
1563
|
-
import { jsx as
|
|
1716
|
+
import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1564
1717
|
function IconButton({
|
|
1565
1718
|
label,
|
|
1566
1719
|
children,
|
|
@@ -1573,8 +1726,8 @@ function IconButton({
|
|
|
1573
1726
|
buttonVariants({ variant, size: "icon" }),
|
|
1574
1727
|
className
|
|
1575
1728
|
);
|
|
1576
|
-
return /* @__PURE__ */
|
|
1577
|
-
href ? /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsxs12(TooltipTrigger, { children: [
|
|
1730
|
+
href ? /* @__PURE__ */ jsx25(
|
|
1578
1731
|
Link2,
|
|
1579
1732
|
{
|
|
1580
1733
|
"data-slot": "icon-button",
|
|
@@ -1583,7 +1736,7 @@ function IconButton({
|
|
|
1583
1736
|
className: linkClassName,
|
|
1584
1737
|
children
|
|
1585
1738
|
}
|
|
1586
|
-
) : /* @__PURE__ */
|
|
1739
|
+
) : /* @__PURE__ */ jsx25(
|
|
1587
1740
|
Button,
|
|
1588
1741
|
{
|
|
1589
1742
|
"data-slot": "icon-button",
|
|
@@ -1595,7 +1748,7 @@ function IconButton({
|
|
|
1595
1748
|
children
|
|
1596
1749
|
}
|
|
1597
1750
|
),
|
|
1598
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ jsx25(Tooltip, { children: label })
|
|
1599
1752
|
] });
|
|
1600
1753
|
}
|
|
1601
1754
|
|
|
@@ -1605,27 +1758,27 @@ import { cva as cva9 } from "class-variance-authority";
|
|
|
1605
1758
|
// src/ui/input/input.tsx
|
|
1606
1759
|
import { forwardRef as forwardRef2 } from "react";
|
|
1607
1760
|
import { Input as AriaInput2 } from "react-aria-components";
|
|
1608
|
-
import { jsx as
|
|
1761
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1609
1762
|
var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
|
|
1610
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ jsx26(AriaInput2, { ref, type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
1611
1764
|
});
|
|
1612
1765
|
var Input3 = InputImpl;
|
|
1613
1766
|
|
|
1614
1767
|
// src/ui/textarea/textarea.tsx
|
|
1615
1768
|
import { forwardRef as forwardRef3 } from "react";
|
|
1616
1769
|
import { TextArea as AriaTextArea } from "react-aria-components";
|
|
1617
|
-
import { jsx as
|
|
1770
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1618
1771
|
var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
|
|
1619
|
-
return /* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsx27(AriaTextArea, { ref, "data-slot": "textarea", className: cn("min-h-20 w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
1620
1773
|
});
|
|
1621
1774
|
var Textarea2 = TextareaImpl;
|
|
1622
1775
|
|
|
1623
1776
|
// src/ui/input-group/input-group.tsx
|
|
1624
|
-
import { jsx as
|
|
1777
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1625
1778
|
function InputGroup({ className, ...props }) {
|
|
1626
1779
|
return (
|
|
1627
1780
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
1628
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ jsx28(
|
|
1629
1782
|
"div",
|
|
1630
1783
|
{
|
|
1631
1784
|
role: "group",
|
|
@@ -1661,7 +1814,7 @@ function InputGroupAddon({
|
|
|
1661
1814
|
}) {
|
|
1662
1815
|
return (
|
|
1663
1816
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
1664
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ jsx28(
|
|
1665
1818
|
"div",
|
|
1666
1819
|
{
|
|
1667
1820
|
role: "group",
|
|
@@ -1692,7 +1845,7 @@ function InputGroupButton({
|
|
|
1692
1845
|
...props
|
|
1693
1846
|
}) {
|
|
1694
1847
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1848
|
+
return /* @__PURE__ */ jsx28(
|
|
1696
1849
|
Button,
|
|
1697
1850
|
{
|
|
1698
1851
|
"data-slot": "input-group-button",
|
|
@@ -1705,7 +1858,7 @@ function InputGroupButton({
|
|
|
1705
1858
|
);
|
|
1706
1859
|
}
|
|
1707
1860
|
function InputGroupText({ className, ...props }) {
|
|
1708
|
-
return /* @__PURE__ */
|
|
1861
|
+
return /* @__PURE__ */ jsx28(
|
|
1709
1862
|
"span",
|
|
1710
1863
|
{
|
|
1711
1864
|
"data-slot": "input-group-text",
|
|
@@ -1718,7 +1871,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
1718
1871
|
);
|
|
1719
1872
|
}
|
|
1720
1873
|
function InputGroupInput({ className, ...props }) {
|
|
1721
|
-
return /* @__PURE__ */
|
|
1874
|
+
return /* @__PURE__ */ jsx28(
|
|
1722
1875
|
Input3,
|
|
1723
1876
|
{
|
|
1724
1877
|
"data-slot": "input-group-control",
|
|
@@ -1731,7 +1884,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
1731
1884
|
);
|
|
1732
1885
|
}
|
|
1733
1886
|
function InputGroupTextarea({ className, ...props }) {
|
|
1734
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ jsx28(
|
|
1735
1888
|
Textarea2,
|
|
1736
1889
|
{
|
|
1737
1890
|
"data-slot": "input-group-control",
|
|
@@ -1745,21 +1898,21 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
1745
1898
|
}
|
|
1746
1899
|
|
|
1747
1900
|
// src/ui/kbd/kbd.tsx
|
|
1748
|
-
import { jsx as
|
|
1901
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1749
1902
|
function Kbd({ className, ...props }) {
|
|
1750
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx29("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 });
|
|
1751
1904
|
}
|
|
1752
1905
|
function KbdGroup({ className, ...props }) {
|
|
1753
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ jsx29("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
|
|
1754
1907
|
}
|
|
1755
1908
|
|
|
1756
1909
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
1757
1910
|
import { LoaderCircle as LoaderCircle2 } from "lucide-react";
|
|
1758
|
-
import { jsx as
|
|
1911
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1759
1912
|
function LoadingOverlay({ label = "Cargando", className, ...props }) {
|
|
1760
|
-
return /* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1762
|
-
/* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ jsx30("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__ */ jsxs13("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
|
|
1914
|
+
/* @__PURE__ */ jsx30(LoaderCircle2, { className: "animate-spin", "aria-hidden": "true" }),
|
|
1915
|
+
/* @__PURE__ */ jsx30("span", { children: label })
|
|
1763
1916
|
] }) });
|
|
1764
1917
|
}
|
|
1765
1918
|
|
|
@@ -1770,16 +1923,16 @@ import {
|
|
|
1770
1923
|
MenuTrigger as AriaMenuTrigger,
|
|
1771
1924
|
Popover as Popover3
|
|
1772
1925
|
} from "react-aria-components";
|
|
1773
|
-
import { jsx as
|
|
1926
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1774
1927
|
var MenuTrigger = AriaMenuTrigger;
|
|
1775
1928
|
function MenuContent({ className, ...props }) {
|
|
1776
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ jsx31(Popover3, { "data-slot": "menu-content", className: cn("min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
1777
1930
|
}
|
|
1778
1931
|
function Menu({ className, ...props }) {
|
|
1779
|
-
return /* @__PURE__ */
|
|
1932
|
+
return /* @__PURE__ */ jsx31(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
1780
1933
|
}
|
|
1781
1934
|
function MenuItem({ className, children, ...props }) {
|
|
1782
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsx31(AriaMenuItem, { "data-slot": "menu-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
1783
1936
|
}
|
|
1784
1937
|
|
|
1785
1938
|
// src/ui/otp-input/otp-input.tsx
|
|
@@ -1787,10 +1940,10 @@ import {
|
|
|
1787
1940
|
forwardRef as forwardRef4,
|
|
1788
1941
|
useImperativeHandle,
|
|
1789
1942
|
useRef as useRef4,
|
|
1790
|
-
useState as
|
|
1943
|
+
useState as useState8
|
|
1791
1944
|
} from "react";
|
|
1792
1945
|
import { Input as AriaInput3 } from "react-aria-components";
|
|
1793
|
-
import { jsx as
|
|
1946
|
+
import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1794
1947
|
function normalizeOtp(value, length) {
|
|
1795
1948
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
1796
1949
|
}
|
|
@@ -1811,12 +1964,12 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1811
1964
|
}, forwardedRef) {
|
|
1812
1965
|
const slotCount = Math.max(1, Math.floor(length));
|
|
1813
1966
|
const controlled = value !== void 0;
|
|
1814
|
-
const [internalValue, setInternalValue] =
|
|
1967
|
+
const [internalValue, setInternalValue] = useState8(() => normalizeOtp(defaultValue, slotCount));
|
|
1815
1968
|
const code = normalizeOtp(controlled ? value : internalValue, slotCount);
|
|
1816
1969
|
const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
|
|
1817
1970
|
const inputRef = useRef4(null);
|
|
1818
|
-
const [focused, setFocused] =
|
|
1819
|
-
const [selectionStart, setSelectionStart] =
|
|
1971
|
+
const [focused, setFocused] = useState8(false);
|
|
1972
|
+
const [selectionStart, setSelectionStart] = useState8(0);
|
|
1820
1973
|
const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
|
|
1821
1974
|
const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
|
|
1822
1975
|
useImperativeHandle(forwardedRef, () => inputRef.current);
|
|
@@ -1842,7 +1995,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1842
1995
|
input.setSelectionRange(position, position);
|
|
1843
1996
|
setSelectionStart(position);
|
|
1844
1997
|
}
|
|
1845
|
-
return /* @__PURE__ */
|
|
1998
|
+
return /* @__PURE__ */ jsxs14(
|
|
1846
1999
|
"div",
|
|
1847
2000
|
{
|
|
1848
2001
|
"data-slot": "otp-input",
|
|
@@ -1852,7 +2005,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1852
2005
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
1853
2006
|
onPointerDown: handlePointerDown,
|
|
1854
2007
|
children: [
|
|
1855
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ jsx32(
|
|
1856
2009
|
AriaInput3,
|
|
1857
2010
|
{
|
|
1858
2011
|
...props,
|
|
@@ -1892,7 +2045,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1892
2045
|
}
|
|
1893
2046
|
}
|
|
1894
2047
|
),
|
|
1895
|
-
slots.map((slot, index) => /* @__PURE__ */
|
|
2048
|
+
slots.map((slot, index) => /* @__PURE__ */ jsx32(
|
|
1896
2049
|
"span",
|
|
1897
2050
|
{
|
|
1898
2051
|
"aria-hidden": "true",
|
|
@@ -1915,39 +2068,39 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1915
2068
|
var OtpInput2 = OtpInputImpl;
|
|
1916
2069
|
|
|
1917
2070
|
// src/ui/page-header/page-header.tsx
|
|
1918
|
-
import { jsx as
|
|
2071
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1919
2072
|
function PageHeader({ className, ...props }) {
|
|
1920
|
-
return /* @__PURE__ */
|
|
2073
|
+
return /* @__PURE__ */ jsx33("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 });
|
|
1921
2074
|
}
|
|
1922
2075
|
function PageHeaderHeading({ className, ...props }) {
|
|
1923
|
-
return /* @__PURE__ */
|
|
2076
|
+
return /* @__PURE__ */ jsx33("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
1924
2077
|
}
|
|
1925
2078
|
function PageHeaderTitle({ className, ...props }) {
|
|
1926
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ jsx33("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
|
|
1927
2080
|
}
|
|
1928
2081
|
function PageHeaderDescription({ className, ...props }) {
|
|
1929
|
-
return /* @__PURE__ */
|
|
2082
|
+
return /* @__PURE__ */ jsx33("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
|
|
1930
2083
|
}
|
|
1931
2084
|
function PageHeaderActions({ className, ...props }) {
|
|
1932
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ jsx33("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
|
|
1933
2086
|
}
|
|
1934
2087
|
|
|
1935
2088
|
// src/ui/pagination/pagination.tsx
|
|
1936
2089
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
1937
|
-
import { jsx as
|
|
2090
|
+
import { jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1938
2091
|
function Pagination({ page, pageCount, onPageChange, className }) {
|
|
1939
2092
|
const pages = Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ jsxs15("nav", { "aria-label": "Paginaci\xF3n", className: cn("flex items-center justify-between gap-4", className), children: [
|
|
2094
|
+
/* @__PURE__ */ jsxs15("p", { className: "text-sm text-muted-foreground", children: [
|
|
1942
2095
|
"P\xE1gina ",
|
|
1943
2096
|
page,
|
|
1944
2097
|
" de ",
|
|
1945
2098
|
pageCount
|
|
1946
2099
|
] }),
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
/* @__PURE__ */
|
|
1949
|
-
pages.map((item) => /* @__PURE__ */
|
|
1950
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
|
|
2101
|
+
/* @__PURE__ */ jsx34(Button, { "aria-label": "P\xE1gina anterior", isDisabled: page <= 1, onPress: () => onPageChange(page - 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx34(ChevronLeft, {}) }),
|
|
2102
|
+
pages.map((item) => /* @__PURE__ */ jsx34(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)),
|
|
2103
|
+
/* @__PURE__ */ jsx34(Button, { "aria-label": "P\xE1gina siguiente", isDisabled: page >= pageCount, onPress: () => onPageChange(page + 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx34(ChevronRight, {}) })
|
|
1951
2104
|
] })
|
|
1952
2105
|
] });
|
|
1953
2106
|
}
|
|
@@ -1957,10 +2110,10 @@ import {
|
|
|
1957
2110
|
DialogTrigger as AriaDialogTrigger,
|
|
1958
2111
|
Popover as AriaPopover
|
|
1959
2112
|
} from "react-aria-components";
|
|
1960
|
-
import { jsx as
|
|
2113
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1961
2114
|
var PopoverTrigger = AriaDialogTrigger;
|
|
1962
2115
|
function Popover4({ className, ...props }) {
|
|
1963
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ jsx35(AriaPopover, { "data-slot": "popover", offset: 6, className: cn("min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
1964
2117
|
}
|
|
1965
2118
|
var PopoverContent = Popover4;
|
|
1966
2119
|
|
|
@@ -1972,7 +2125,7 @@ import {
|
|
|
1972
2125
|
Input as AriaInput4,
|
|
1973
2126
|
NumberField as AriaNumberField
|
|
1974
2127
|
} from "react-aria-components";
|
|
1975
|
-
import { jsx as
|
|
2128
|
+
import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1976
2129
|
function QuantityInput({
|
|
1977
2130
|
className,
|
|
1978
2131
|
inputClassName,
|
|
@@ -1982,7 +2135,7 @@ function QuantityInput({
|
|
|
1982
2135
|
step = 1,
|
|
1983
2136
|
...props
|
|
1984
2137
|
}) {
|
|
1985
|
-
return /* @__PURE__ */
|
|
2138
|
+
return /* @__PURE__ */ jsx36(
|
|
1986
2139
|
AriaNumberField,
|
|
1987
2140
|
{
|
|
1988
2141
|
...props,
|
|
@@ -1990,15 +2143,15 @@ function QuantityInput({
|
|
|
1990
2143
|
step,
|
|
1991
2144
|
"data-slot": "quantity-input",
|
|
1992
2145
|
className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
1993
|
-
children: /* @__PURE__ */
|
|
2146
|
+
children: /* @__PURE__ */ jsxs16(
|
|
1994
2147
|
AriaGroup,
|
|
1995
2148
|
{
|
|
1996
2149
|
"data-slot": "quantity-input-group",
|
|
1997
2150
|
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",
|
|
1998
2151
|
children: [
|
|
1999
|
-
/* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ jsx36(AriaButton, { slot: "decrement", "aria-label": decrementAriaLabel, "data-slot": "quantity-input-decrement", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-r border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ jsx36(Minus, { "aria-hidden": "true", className: "size-4" }) }),
|
|
2153
|
+
/* @__PURE__ */ jsx36(AriaInput4, { "data-slot": "quantity-input-value", className: cn("w-14 min-w-0 bg-transparent px-1 text-center text-sm tabular-nums outline-none", inputClassName) }),
|
|
2154
|
+
/* @__PURE__ */ jsx36(AriaButton, { slot: "increment", "aria-label": incrementAriaLabel, "data-slot": "quantity-input-increment", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-l border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ jsx36(Plus, { "aria-hidden": "true", className: "size-4" }) })
|
|
2002
2155
|
]
|
|
2003
2156
|
}
|
|
2004
2157
|
)
|
|
@@ -2013,13 +2166,13 @@ import {
|
|
|
2013
2166
|
Input as Input4
|
|
2014
2167
|
} from "react-aria-components";
|
|
2015
2168
|
import { X as X2 } from "lucide-react";
|
|
2016
|
-
import { jsx as
|
|
2169
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2017
2170
|
var SearchField = AriaSearchField;
|
|
2018
2171
|
function SearchInput({ className, ...props }) {
|
|
2019
|
-
return /* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ jsx37(Input4, { "data-slot": "search-input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
|
|
2020
2173
|
}
|
|
2021
|
-
function SearchClearButton({ className, children = /* @__PURE__ */
|
|
2022
|
-
return /* @__PURE__ */
|
|
2174
|
+
function SearchClearButton({ className, children = /* @__PURE__ */ jsx37(X2, { "aria-hidden": "true", className: "size-4" }), ...props }) {
|
|
2175
|
+
return /* @__PURE__ */ jsx37(Button2, { slot: "clear", "data-slot": "search-clear", className: cn("absolute top-1/2 right-1 rounded p-1 text-muted-foreground outline-none hover:bg-muted data-focus-visible:ring-2 data-focus-visible:ring-ring", className), ...props, children });
|
|
2023
2176
|
}
|
|
2024
2177
|
|
|
2025
2178
|
// src/ui/select/select.tsx
|
|
@@ -2032,43 +2185,43 @@ import {
|
|
|
2032
2185
|
Popover as Popover5
|
|
2033
2186
|
} from "react-aria-components";
|
|
2034
2187
|
import { ChevronDown } from "lucide-react";
|
|
2035
|
-
import { Fragment as
|
|
2188
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2036
2189
|
var Select = AriaSelect;
|
|
2037
2190
|
function SelectTrigger({ className, children, ...props }) {
|
|
2038
|
-
return /* @__PURE__ */
|
|
2191
|
+
return /* @__PURE__ */ jsx38(AriaButton2, { "data-slot": "select-trigger", className: cn("group/select-trigger flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
2039
2192
|
typeof children === "function" ? children(state) : children,
|
|
2040
|
-
/* @__PURE__ */
|
|
2193
|
+
/* @__PURE__ */ jsx38(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" })
|
|
2041
2194
|
] }) });
|
|
2042
2195
|
}
|
|
2043
2196
|
function SelectValue({ className, ...props }) {
|
|
2044
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ jsx38(AriaSelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
|
|
2045
2198
|
}
|
|
2046
2199
|
function SelectContent({ className, ...props }) {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ jsx38(Popover5, { "data-slot": "select-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2048
2201
|
}
|
|
2049
2202
|
function SelectList({ className, ...props }) {
|
|
2050
|
-
return /* @__PURE__ */
|
|
2203
|
+
return /* @__PURE__ */ jsx38(ListBox3, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
|
|
2051
2204
|
}
|
|
2052
2205
|
function SelectItem({ className, children, ...props }) {
|
|
2053
|
-
return /* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ jsx38(ListBoxItem3, { "data-slot": "select-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2054
2207
|
}
|
|
2055
2208
|
|
|
2056
2209
|
// src/ui/sheet/sheet.tsx
|
|
2057
|
-
import { XIcon } from "lucide-react";
|
|
2210
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
2058
2211
|
import {
|
|
2059
|
-
Heading as
|
|
2212
|
+
Heading as Heading3,
|
|
2060
2213
|
ModalOverlay as ModalOverlayPrimitive,
|
|
2061
2214
|
Modal as ModalPrimitive,
|
|
2062
2215
|
Dialog as SheetPrimitive,
|
|
2063
2216
|
DialogTrigger as SheetTriggerPrimitive,
|
|
2064
|
-
Text as
|
|
2217
|
+
Text as Text4
|
|
2065
2218
|
} from "react-aria-components";
|
|
2066
|
-
import { jsx as
|
|
2219
|
+
import { jsx as jsx39, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2067
2220
|
function SheetTrigger({ ...props }) {
|
|
2068
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ jsx39(SheetTriggerPrimitive, { "data-slot": "sheet-trigger", ...props });
|
|
2069
2222
|
}
|
|
2070
2223
|
function SheetClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2071
|
-
return /* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ jsx39(
|
|
2072
2225
|
Button,
|
|
2073
2226
|
{
|
|
2074
2227
|
slot: "close",
|
|
@@ -2085,7 +2238,7 @@ function SheetOverlay({
|
|
|
2085
2238
|
children,
|
|
2086
2239
|
...props
|
|
2087
2240
|
}) {
|
|
2088
|
-
return /* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ jsx39(
|
|
2089
2242
|
ModalOverlayPrimitive,
|
|
2090
2243
|
{
|
|
2091
2244
|
"data-slot": "sheet-overlay",
|
|
@@ -2106,7 +2259,7 @@ function Sheet({
|
|
|
2106
2259
|
showCloseButton = true,
|
|
2107
2260
|
...props
|
|
2108
2261
|
}) {
|
|
2109
|
-
return /* @__PURE__ */
|
|
2262
|
+
return /* @__PURE__ */ jsx39(SheetOverlay, { ...props, children: /* @__PURE__ */ jsx39(
|
|
2110
2263
|
ModalPrimitive,
|
|
2111
2264
|
{
|
|
2112
2265
|
"data-slot": "sheet-content",
|
|
@@ -2115,16 +2268,16 @@ function Sheet({
|
|
|
2115
2268
|
"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",
|
|
2116
2269
|
className
|
|
2117
2270
|
),
|
|
2118
|
-
children: /* @__PURE__ */
|
|
2271
|
+
children: /* @__PURE__ */ jsxs18(
|
|
2119
2272
|
SheetPrimitive,
|
|
2120
2273
|
{
|
|
2121
2274
|
"data-slot": "sheet",
|
|
2122
2275
|
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2123
2276
|
children: [
|
|
2124
2277
|
children,
|
|
2125
|
-
showCloseButton && /* @__PURE__ */
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2278
|
+
showCloseButton && /* @__PURE__ */ jsxs18(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2279
|
+
/* @__PURE__ */ jsx39(XIcon2, {}),
|
|
2280
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Cerrar" })
|
|
2128
2281
|
] })
|
|
2129
2282
|
]
|
|
2130
2283
|
}
|
|
@@ -2139,10 +2292,10 @@ function SheetContent({
|
|
|
2139
2292
|
showCloseButton = true,
|
|
2140
2293
|
...props
|
|
2141
2294
|
}) {
|
|
2142
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsx39(Sheet, { className, side, showCloseButton, ...props, children });
|
|
2143
2296
|
}
|
|
2144
2297
|
function SheetHeader({ className, ...props }) {
|
|
2145
|
-
return /* @__PURE__ */
|
|
2298
|
+
return /* @__PURE__ */ jsx39(
|
|
2146
2299
|
"div",
|
|
2147
2300
|
{
|
|
2148
2301
|
"data-slot": "sheet-header",
|
|
@@ -2152,7 +2305,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
2152
2305
|
);
|
|
2153
2306
|
}
|
|
2154
2307
|
function SheetFooter({ className, ...props }) {
|
|
2155
|
-
return /* @__PURE__ */
|
|
2308
|
+
return /* @__PURE__ */ jsx39(
|
|
2156
2309
|
"div",
|
|
2157
2310
|
{
|
|
2158
2311
|
"data-slot": "sheet-footer",
|
|
@@ -2162,8 +2315,8 @@ function SheetFooter({ className, ...props }) {
|
|
|
2162
2315
|
);
|
|
2163
2316
|
}
|
|
2164
2317
|
function SheetTitle({ className, ...props }) {
|
|
2165
|
-
return /* @__PURE__ */
|
|
2166
|
-
|
|
2318
|
+
return /* @__PURE__ */ jsx39(
|
|
2319
|
+
Heading3,
|
|
2167
2320
|
{
|
|
2168
2321
|
slot: "title",
|
|
2169
2322
|
"data-slot": "sheet-title",
|
|
@@ -2176,8 +2329,8 @@ function SheetDescription({
|
|
|
2176
2329
|
className,
|
|
2177
2330
|
...props
|
|
2178
2331
|
}) {
|
|
2179
|
-
return /* @__PURE__ */
|
|
2180
|
-
|
|
2332
|
+
return /* @__PURE__ */ jsx39(
|
|
2333
|
+
Text4,
|
|
2181
2334
|
{
|
|
2182
2335
|
slot: "description",
|
|
2183
2336
|
"data-slot": "sheet-description",
|
|
@@ -2195,16 +2348,16 @@ import {
|
|
|
2195
2348
|
Search
|
|
2196
2349
|
} from "lucide-react";
|
|
2197
2350
|
import {
|
|
2198
|
-
createContext as
|
|
2199
|
-
useContext as
|
|
2351
|
+
createContext as createContext3,
|
|
2352
|
+
useContext as useContext3,
|
|
2200
2353
|
useMemo as useMemo2,
|
|
2201
|
-
useState as
|
|
2354
|
+
useState as useState9
|
|
2202
2355
|
} from "react";
|
|
2203
2356
|
import { Link as Link3 } from "react-aria-components";
|
|
2204
|
-
import { Fragment as
|
|
2205
|
-
var SidebarContext =
|
|
2357
|
+
import { Fragment as Fragment9, jsx as jsx40, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2358
|
+
var SidebarContext = createContext3(null);
|
|
2206
2359
|
function useSidebar() {
|
|
2207
|
-
const context =
|
|
2360
|
+
const context = useContext3(SidebarContext);
|
|
2208
2361
|
if (!context)
|
|
2209
2362
|
throw new Error("useSidebar must be used inside SidebarProvider");
|
|
2210
2363
|
return context;
|
|
@@ -2213,7 +2366,7 @@ function SidebarProvider({
|
|
|
2213
2366
|
defaultCollapsed = false,
|
|
2214
2367
|
children
|
|
2215
2368
|
}) {
|
|
2216
|
-
const [collapsed, setCollapsed] =
|
|
2369
|
+
const [collapsed, setCollapsed] = useState9(defaultCollapsed);
|
|
2217
2370
|
const value = useMemo2(
|
|
2218
2371
|
() => ({
|
|
2219
2372
|
collapsed,
|
|
@@ -2222,14 +2375,14 @@ function SidebarProvider({
|
|
|
2222
2375
|
}),
|
|
2223
2376
|
[collapsed]
|
|
2224
2377
|
);
|
|
2225
|
-
return /* @__PURE__ */
|
|
2378
|
+
return /* @__PURE__ */ jsx40(SidebarContext.Provider, { value, children });
|
|
2226
2379
|
}
|
|
2227
2380
|
function Sidebar({
|
|
2228
2381
|
className,
|
|
2229
2382
|
...props
|
|
2230
2383
|
}) {
|
|
2231
2384
|
const { collapsed } = useSidebar();
|
|
2232
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx40(
|
|
2233
2386
|
"aside",
|
|
2234
2387
|
{
|
|
2235
2388
|
"data-slot": "sidebar",
|
|
@@ -2246,7 +2399,7 @@ function SidebarHeader({
|
|
|
2246
2399
|
className,
|
|
2247
2400
|
...props
|
|
2248
2401
|
}) {
|
|
2249
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ jsx40(
|
|
2250
2403
|
"div",
|
|
2251
2404
|
{
|
|
2252
2405
|
"data-slot": "sidebar-header",
|
|
@@ -2261,7 +2414,7 @@ function SidebarSearch({
|
|
|
2261
2414
|
className,
|
|
2262
2415
|
...props
|
|
2263
2416
|
}) {
|
|
2264
|
-
return /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ jsxs19(
|
|
2265
2418
|
"button",
|
|
2266
2419
|
{
|
|
2267
2420
|
type: "button",
|
|
@@ -2272,9 +2425,9 @@ function SidebarSearch({
|
|
|
2272
2425
|
),
|
|
2273
2426
|
...props,
|
|
2274
2427
|
children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ jsx40(Search, { className: "size-4 shrink-0" }),
|
|
2429
|
+
/* @__PURE__ */ jsx40("span", { className: "flex-1 text-left", children: label }),
|
|
2430
|
+
/* @__PURE__ */ jsx40("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
|
|
2278
2431
|
]
|
|
2279
2432
|
}
|
|
2280
2433
|
);
|
|
@@ -2283,7 +2436,7 @@ function SidebarContent({
|
|
|
2283
2436
|
className,
|
|
2284
2437
|
...props
|
|
2285
2438
|
}) {
|
|
2286
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ jsx40(
|
|
2287
2440
|
"nav",
|
|
2288
2441
|
{
|
|
2289
2442
|
"data-slot": "sidebar-content",
|
|
@@ -2297,7 +2450,7 @@ function SidebarFooter({
|
|
|
2297
2450
|
className,
|
|
2298
2451
|
...props
|
|
2299
2452
|
}) {
|
|
2300
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ jsx40(
|
|
2301
2454
|
"div",
|
|
2302
2455
|
{
|
|
2303
2456
|
"data-slot": "sidebar-footer",
|
|
@@ -2316,14 +2469,14 @@ function SidebarGroup({
|
|
|
2316
2469
|
...props
|
|
2317
2470
|
}) {
|
|
2318
2471
|
const { collapsed } = useSidebar();
|
|
2319
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ jsxs19(
|
|
2320
2473
|
"section",
|
|
2321
2474
|
{
|
|
2322
2475
|
"data-slot": "sidebar-group",
|
|
2323
2476
|
className: cn("mb-4 last:mb-0", className),
|
|
2324
2477
|
...props,
|
|
2325
2478
|
children: [
|
|
2326
|
-
label && /* @__PURE__ */
|
|
2479
|
+
label && /* @__PURE__ */ jsx40(
|
|
2327
2480
|
"h2",
|
|
2328
2481
|
{
|
|
2329
2482
|
className: cn(
|
|
@@ -2349,7 +2502,7 @@ function SidebarItem({
|
|
|
2349
2502
|
}) {
|
|
2350
2503
|
const { collapsed } = useSidebar();
|
|
2351
2504
|
const content = typeof children === "function" ? label : children ?? label;
|
|
2352
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx40(
|
|
2353
2506
|
Link3,
|
|
2354
2507
|
{
|
|
2355
2508
|
"data-slot": "sidebar-item",
|
|
@@ -2361,16 +2514,16 @@ function SidebarItem({
|
|
|
2361
2514
|
typeof className === "function" ? className : className
|
|
2362
2515
|
),
|
|
2363
2516
|
...props,
|
|
2364
|
-
children: (values) => /* @__PURE__ */
|
|
2365
|
-
/* @__PURE__ */
|
|
2366
|
-
/* @__PURE__ */
|
|
2517
|
+
children: (values) => /* @__PURE__ */ jsxs19(Fragment9, { children: [
|
|
2518
|
+
/* @__PURE__ */ jsx40("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
2519
|
+
/* @__PURE__ */ jsx40(
|
|
2367
2520
|
"span",
|
|
2368
2521
|
{
|
|
2369
2522
|
className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
|
|
2370
2523
|
children: typeof children === "function" ? children(values) : content
|
|
2371
2524
|
}
|
|
2372
2525
|
),
|
|
2373
|
-
badge && !collapsed && /* @__PURE__ */
|
|
2526
|
+
badge && !collapsed && /* @__PURE__ */ jsx40("span", { className: "text-xs text-muted-foreground", children: badge })
|
|
2374
2527
|
] })
|
|
2375
2528
|
}
|
|
2376
2529
|
);
|
|
@@ -2379,7 +2532,7 @@ function SidebarSeparator({
|
|
|
2379
2532
|
className,
|
|
2380
2533
|
...props
|
|
2381
2534
|
}) {
|
|
2382
|
-
return /* @__PURE__ */
|
|
2535
|
+
return /* @__PURE__ */ jsx40(
|
|
2383
2536
|
"hr",
|
|
2384
2537
|
{
|
|
2385
2538
|
"data-slot": "sidebar-separator",
|
|
@@ -2390,7 +2543,7 @@ function SidebarSeparator({
|
|
|
2390
2543
|
}
|
|
2391
2544
|
function SidebarTrigger({ className, ...props }) {
|
|
2392
2545
|
const { collapsed, toggle } = useSidebar();
|
|
2393
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx40(
|
|
2394
2547
|
Button,
|
|
2395
2548
|
{
|
|
2396
2549
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -2399,7 +2552,7 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
2399
2552
|
variant: "ghost",
|
|
2400
2553
|
className: cn("ml-auto", className),
|
|
2401
2554
|
...props,
|
|
2402
|
-
children: collapsed ? /* @__PURE__ */
|
|
2555
|
+
children: collapsed ? /* @__PURE__ */ jsx40(ChevronRight2, {}) : /* @__PURE__ */ jsx40(ChevronLeft2, {})
|
|
2403
2556
|
}
|
|
2404
2557
|
);
|
|
2405
2558
|
}
|
|
@@ -2408,7 +2561,7 @@ function SidebarRail({
|
|
|
2408
2561
|
...props
|
|
2409
2562
|
}) {
|
|
2410
2563
|
const { toggle } = useSidebar();
|
|
2411
|
-
return /* @__PURE__ */
|
|
2564
|
+
return /* @__PURE__ */ jsx40(
|
|
2412
2565
|
"button",
|
|
2413
2566
|
{
|
|
2414
2567
|
type: "button",
|
|
@@ -2423,7 +2576,7 @@ function SidebarRail({
|
|
|
2423
2576
|
);
|
|
2424
2577
|
}
|
|
2425
2578
|
function SidebarMore({ className, ...props }) {
|
|
2426
|
-
return /* @__PURE__ */
|
|
2579
|
+
return /* @__PURE__ */ jsx40(
|
|
2427
2580
|
Button,
|
|
2428
2581
|
{
|
|
2429
2582
|
"aria-label": "M\xE1s opciones",
|
|
@@ -2431,26 +2584,26 @@ function SidebarMore({ className, ...props }) {
|
|
|
2431
2584
|
variant: "ghost",
|
|
2432
2585
|
className: cn("size-7", className),
|
|
2433
2586
|
...props,
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2587
|
+
children: /* @__PURE__ */ jsx40(Ellipsis, {})
|
|
2435
2588
|
}
|
|
2436
2589
|
);
|
|
2437
2590
|
}
|
|
2438
2591
|
|
|
2439
2592
|
// src/ui/skeleton/skeleton.tsx
|
|
2440
|
-
import { jsx as
|
|
2593
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2441
2594
|
function Skeleton({ className, ...props }) {
|
|
2442
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ jsx41("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
2443
2596
|
}
|
|
2444
2597
|
|
|
2445
2598
|
// src/ui/submit-button/submit-button.tsx
|
|
2446
2599
|
import { useFormStatus } from "react-dom";
|
|
2447
2600
|
import { LoaderCircle as LoaderCircle3 } from "lucide-react";
|
|
2448
|
-
import { Fragment as
|
|
2601
|
+
import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2449
2602
|
function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
|
|
2450
2603
|
const { pending } = useFormStatus();
|
|
2451
2604
|
const busy = pending || loading;
|
|
2452
|
-
return /* @__PURE__ */
|
|
2453
|
-
/* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ jsx42(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
2606
|
+
/* @__PURE__ */ jsx42(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2454
2607
|
pendingLabel
|
|
2455
2608
|
] }) : children });
|
|
2456
2609
|
}
|
|
@@ -2460,7 +2613,7 @@ import { useEffect as useEffect5, useRef as useRef5 } from "react";
|
|
|
2460
2613
|
import {
|
|
2461
2614
|
Switch as AriaSwitch
|
|
2462
2615
|
} from "react-aria-components";
|
|
2463
|
-
import { Fragment as
|
|
2616
|
+
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2464
2617
|
var switchSizes = {
|
|
2465
2618
|
sm: {
|
|
2466
2619
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -2516,7 +2669,7 @@ function Switch({
|
|
|
2516
2669
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
2517
2670
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
2518
2671
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
2519
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ jsx43(
|
|
2520
2673
|
AriaSwitch,
|
|
2521
2674
|
{
|
|
2522
2675
|
"data-slot": "switch",
|
|
@@ -2533,8 +2686,8 @@ function Switch({
|
|
|
2533
2686
|
children: (state) => {
|
|
2534
2687
|
const isThumbActive = state.isHovered || state.isPressed;
|
|
2535
2688
|
const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
2536
|
-
return /* @__PURE__ */
|
|
2537
|
-
/* @__PURE__ */
|
|
2689
|
+
return /* @__PURE__ */ jsxs21(Fragment11, { children: [
|
|
2690
|
+
/* @__PURE__ */ jsx43(
|
|
2538
2691
|
"span",
|
|
2539
2692
|
{
|
|
2540
2693
|
"aria-hidden": "true",
|
|
@@ -2548,7 +2701,7 @@ function Switch({
|
|
|
2548
2701
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
2549
2702
|
styles.control
|
|
2550
2703
|
),
|
|
2551
|
-
children: /* @__PURE__ */
|
|
2704
|
+
children: /* @__PURE__ */ jsx43(
|
|
2552
2705
|
"span",
|
|
2553
2706
|
{
|
|
2554
2707
|
"data-slot": "switch-thumb",
|
|
@@ -2568,9 +2721,9 @@ function Switch({
|
|
|
2568
2721
|
)
|
|
2569
2722
|
}
|
|
2570
2723
|
),
|
|
2571
|
-
children || description ? /* @__PURE__ */
|
|
2572
|
-
children ? /* @__PURE__ */
|
|
2573
|
-
description ? /* @__PURE__ */
|
|
2724
|
+
children || description ? /* @__PURE__ */ jsxs21("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
2725
|
+
children ? /* @__PURE__ */ jsx43("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
2726
|
+
description ? /* @__PURE__ */ jsx43("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
|
|
2574
2727
|
] }) : null
|
|
2575
2728
|
] });
|
|
2576
2729
|
}
|
|
@@ -2579,9 +2732,9 @@ function Switch({
|
|
|
2579
2732
|
}
|
|
2580
2733
|
|
|
2581
2734
|
// src/ui/table/table.tsx
|
|
2582
|
-
import { jsx as
|
|
2735
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2583
2736
|
function Table({ className, ...props }) {
|
|
2584
|
-
return /* @__PURE__ */
|
|
2737
|
+
return /* @__PURE__ */ jsx44("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx44(
|
|
2585
2738
|
"table",
|
|
2586
2739
|
{
|
|
2587
2740
|
"data-slot": "table",
|
|
@@ -2591,10 +2744,10 @@ function Table({ className, ...props }) {
|
|
|
2591
2744
|
) });
|
|
2592
2745
|
}
|
|
2593
2746
|
function TableHeader({ className, ...props }) {
|
|
2594
|
-
return /* @__PURE__ */
|
|
2747
|
+
return /* @__PURE__ */ jsx44("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
2595
2748
|
}
|
|
2596
2749
|
function TableBody({ className, ...props }) {
|
|
2597
|
-
return /* @__PURE__ */
|
|
2750
|
+
return /* @__PURE__ */ jsx44(
|
|
2598
2751
|
"tbody",
|
|
2599
2752
|
{
|
|
2600
2753
|
"data-slot": "table-body",
|
|
@@ -2604,7 +2757,7 @@ function TableBody({ className, ...props }) {
|
|
|
2604
2757
|
);
|
|
2605
2758
|
}
|
|
2606
2759
|
function TableRow({ className, ...props }) {
|
|
2607
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ jsx44(
|
|
2608
2761
|
"tr",
|
|
2609
2762
|
{
|
|
2610
2763
|
"data-slot": "table-row",
|
|
@@ -2617,7 +2770,7 @@ function TableRow({ className, ...props }) {
|
|
|
2617
2770
|
);
|
|
2618
2771
|
}
|
|
2619
2772
|
function TableHead({ className, ...props }) {
|
|
2620
|
-
return /* @__PURE__ */
|
|
2773
|
+
return /* @__PURE__ */ jsx44(
|
|
2621
2774
|
"th",
|
|
2622
2775
|
{
|
|
2623
2776
|
"data-slot": "table-head",
|
|
@@ -2630,7 +2783,7 @@ function TableHead({ className, ...props }) {
|
|
|
2630
2783
|
);
|
|
2631
2784
|
}
|
|
2632
2785
|
function TableCell({ className, ...props }) {
|
|
2633
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsx44(
|
|
2634
2787
|
"td",
|
|
2635
2788
|
{
|
|
2636
2789
|
"data-slot": "table-cell",
|
|
@@ -2640,7 +2793,7 @@ function TableCell({ className, ...props }) {
|
|
|
2640
2793
|
);
|
|
2641
2794
|
}
|
|
2642
2795
|
function TableCaption({ className, ...props }) {
|
|
2643
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ jsx44(
|
|
2644
2797
|
"caption",
|
|
2645
2798
|
{
|
|
2646
2799
|
"data-slot": "table-caption",
|
|
@@ -2650,7 +2803,7 @@ function TableCaption({ className, ...props }) {
|
|
|
2650
2803
|
);
|
|
2651
2804
|
}
|
|
2652
2805
|
function TableFooter({ className, ...props }) {
|
|
2653
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ jsx44(
|
|
2654
2807
|
"tfoot",
|
|
2655
2808
|
{
|
|
2656
2809
|
"data-slot": "table-footer",
|
|
@@ -2669,27 +2822,27 @@ import {
|
|
|
2669
2822
|
Tabs as AriaTabs,
|
|
2670
2823
|
composeRenderProps as composeRenderProps2
|
|
2671
2824
|
} from "react-aria-components";
|
|
2672
|
-
import { jsx as
|
|
2825
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2673
2826
|
function Tabs({ className, ...props }) {
|
|
2674
|
-
return /* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ jsx45(AriaTabs, { "data-slot": "tabs", className: composeRenderProps2(className, (value) => cn("flex flex-col gap-2", value)), ...props });
|
|
2675
2828
|
}
|
|
2676
2829
|
function TabsList({ className, ...props }) {
|
|
2677
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ jsx45(AriaTabList, { "data-slot": "tabs-list", className: composeRenderProps2(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
|
|
2678
2831
|
}
|
|
2679
2832
|
function TabsTrigger({ className, ...props }) {
|
|
2680
|
-
return /* @__PURE__ */
|
|
2833
|
+
return /* @__PURE__ */ jsx45(AriaTab, { "data-slot": "tabs-trigger", className: composeRenderProps2(className, (value) => cn("inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", value)), ...props });
|
|
2681
2834
|
}
|
|
2682
2835
|
function TabsPanels({ className, ...props }) {
|
|
2683
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ jsx45(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
2684
2837
|
}
|
|
2685
2838
|
function TabsContent({ className, ...props }) {
|
|
2686
|
-
return /* @__PURE__ */
|
|
2839
|
+
return /* @__PURE__ */ jsx45(AriaTabPanel, { "data-slot": "tabs-content", className: composeRenderProps2(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
|
|
2687
2840
|
}
|
|
2688
2841
|
|
|
2689
2842
|
// src/ui/toast/toast.tsx
|
|
2690
2843
|
import { useEffect as useEffect6 } from "react";
|
|
2691
2844
|
import { sileo, Toaster as SileoToaster } from "sileo";
|
|
2692
|
-
import { Fragment as
|
|
2845
|
+
import { Fragment as Fragment12, jsx as jsx46, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2693
2846
|
function toSileoOptions({ title, description, duration, position, action }) {
|
|
2694
2847
|
return {
|
|
2695
2848
|
title,
|
|
@@ -2728,18 +2881,18 @@ function useToast() {
|
|
|
2728
2881
|
return toast;
|
|
2729
2882
|
}
|
|
2730
2883
|
function ToastProvider({ children }) {
|
|
2731
|
-
return /* @__PURE__ */
|
|
2884
|
+
return /* @__PURE__ */ jsxs22(Fragment12, { children: [
|
|
2732
2885
|
children,
|
|
2733
|
-
/* @__PURE__ */
|
|
2886
|
+
/* @__PURE__ */ jsx46(Toaster, {})
|
|
2734
2887
|
] });
|
|
2735
2888
|
}
|
|
2736
2889
|
function Toaster({ position }) {
|
|
2737
|
-
return /* @__PURE__ */
|
|
2890
|
+
return /* @__PURE__ */ jsx46(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
2738
2891
|
}
|
|
2739
2892
|
function ToastViewport({ position, visiblePosition, className }) {
|
|
2740
2893
|
void className;
|
|
2741
2894
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
2742
|
-
return /* @__PURE__ */
|
|
2895
|
+
return /* @__PURE__ */ jsx46(Toaster, { position });
|
|
2743
2896
|
}
|
|
2744
2897
|
function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
|
|
2745
2898
|
useEffect6(() => {
|
|
@@ -2754,15 +2907,15 @@ function Toast({ id, title, description, variant = "default", action, state = "o
|
|
|
2754
2907
|
}
|
|
2755
2908
|
|
|
2756
2909
|
// src/ui/toolbar/toolbar.tsx
|
|
2757
|
-
import { jsx as
|
|
2910
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2758
2911
|
function Toolbar({ className, ...props }) {
|
|
2759
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ jsx47("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
2760
2913
|
}
|
|
2761
2914
|
function ToolbarGroup({ className, ...props }) {
|
|
2762
|
-
return /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ jsx47("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
|
|
2763
2916
|
}
|
|
2764
2917
|
function ToolbarSpacer({ className, ...props }) {
|
|
2765
|
-
return /* @__PURE__ */
|
|
2918
|
+
return /* @__PURE__ */ jsx47("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
2766
2919
|
}
|
|
2767
2920
|
export {
|
|
2768
2921
|
Accordion,
|
|
@@ -2817,6 +2970,16 @@ export {
|
|
|
2817
2970
|
CommandItem,
|
|
2818
2971
|
CommandList,
|
|
2819
2972
|
ConfirmDialog,
|
|
2973
|
+
Dialog,
|
|
2974
|
+
DialogClose,
|
|
2975
|
+
DialogContent,
|
|
2976
|
+
DialogDescription,
|
|
2977
|
+
DialogFooter,
|
|
2978
|
+
DialogHeader,
|
|
2979
|
+
DialogOverlay,
|
|
2980
|
+
DialogPortal,
|
|
2981
|
+
DialogTitle,
|
|
2982
|
+
DialogTrigger,
|
|
2820
2983
|
Drawer,
|
|
2821
2984
|
DrawerDescription,
|
|
2822
2985
|
DrawerFooter,
|