@doscientos/ui 0.1.22 → 0.1.23
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 +423 -317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +360 -251
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ __export(index_exports, {
|
|
|
83
83
|
CommandItem: () => CommandItem,
|
|
84
84
|
CommandList: () => CommandList,
|
|
85
85
|
ConfirmDialog: () => ConfirmDialog,
|
|
86
|
+
DangerZone: () => DangerZone,
|
|
86
87
|
Dialog: () => Dialog,
|
|
87
88
|
DialogClose: () => DialogClose,
|
|
88
89
|
DialogContent: () => DialogContent,
|
|
@@ -93,6 +94,7 @@ __export(index_exports, {
|
|
|
93
94
|
DialogPortal: () => DialogPortal,
|
|
94
95
|
DialogTitle: () => DialogTitle,
|
|
95
96
|
DialogTrigger: () => DialogTrigger,
|
|
97
|
+
DocPreview: () => DocPreview,
|
|
96
98
|
Drawer: () => Drawer,
|
|
97
99
|
DrawerDescription: () => DrawerDescription,
|
|
98
100
|
DrawerFooter: () => DrawerFooter,
|
|
@@ -331,7 +333,7 @@ function useFormDirty() {
|
|
|
331
333
|
// src/lib/action-ripple.ts
|
|
332
334
|
var import_class_variance_authority = require("class-variance-authority");
|
|
333
335
|
var actionRipple = (0, import_class_variance_authority.cva)(
|
|
334
|
-
"relative isolate overflow-hidden
|
|
336
|
+
"relative isolate overflow-hidden"
|
|
335
337
|
);
|
|
336
338
|
|
|
337
339
|
// src/lib/cn.ts
|
|
@@ -812,8 +814,26 @@ function ButtonGroupSeparator({
|
|
|
812
814
|
|
|
813
815
|
// src/ui/button/button.tsx
|
|
814
816
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
817
|
+
var import_react5 = require("react");
|
|
815
818
|
var import_react_aria_components5 = require("react-aria-components");
|
|
816
819
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
820
|
+
function useActionRipple(enabled) {
|
|
821
|
+
const [rippleId, setRippleId] = (0, import_react5.useState)(0);
|
|
822
|
+
function triggerRipple() {
|
|
823
|
+
if (enabled) setRippleId((currentId) => currentId + 1);
|
|
824
|
+
}
|
|
825
|
+
const ripple = rippleId ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
826
|
+
"span",
|
|
827
|
+
{
|
|
828
|
+
"aria-hidden": "true",
|
|
829
|
+
"data-slot": "button-ripple",
|
|
830
|
+
className: "pointer-events-none absolute top-1/2 left-1/2 aspect-square w-full rounded-full bg-current animate-ui-ripple motion-reduce:hidden",
|
|
831
|
+
onAnimationEnd: () => setRippleId(0)
|
|
832
|
+
},
|
|
833
|
+
rippleId
|
|
834
|
+
) : null;
|
|
835
|
+
return { ripple, triggerRipple };
|
|
836
|
+
}
|
|
817
837
|
var buttonVariants = (0, import_class_variance_authority5.cva)(
|
|
818
838
|
cn(
|
|
819
839
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -846,7 +866,8 @@ var buttonVariants = (0, import_class_variance_authority5.cva)(
|
|
|
846
866
|
}
|
|
847
867
|
}
|
|
848
868
|
);
|
|
849
|
-
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
869
|
+
function Button({ className, variant = "default", size = "default", onClick, children, ...props }) {
|
|
870
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
850
871
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
851
872
|
import_react_aria_components5.Button,
|
|
852
873
|
{
|
|
@@ -854,7 +875,15 @@ function Button({ className, variant = "default", size = "default", ...props })
|
|
|
854
875
|
"data-variant": variant,
|
|
855
876
|
"data-size": size,
|
|
856
877
|
className: cn(buttonVariants({ variant, size, className })),
|
|
857
|
-
|
|
878
|
+
onClick: (event) => {
|
|
879
|
+
onClick?.(event);
|
|
880
|
+
triggerRipple();
|
|
881
|
+
},
|
|
882
|
+
...props,
|
|
883
|
+
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
884
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
885
|
+
ripple
|
|
886
|
+
] })
|
|
858
887
|
}
|
|
859
888
|
);
|
|
860
889
|
}
|
|
@@ -862,8 +891,11 @@ function LinkButton({
|
|
|
862
891
|
className,
|
|
863
892
|
variant = "default",
|
|
864
893
|
size = "default",
|
|
894
|
+
onClick,
|
|
895
|
+
children,
|
|
865
896
|
...props
|
|
866
897
|
}) {
|
|
898
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
867
899
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
868
900
|
import_react_aria_components5.Link,
|
|
869
901
|
{
|
|
@@ -871,7 +903,15 @@ function LinkButton({
|
|
|
871
903
|
"data-variant": variant,
|
|
872
904
|
"data-size": size,
|
|
873
905
|
className: cn(buttonVariants({ variant, size, className })),
|
|
874
|
-
|
|
906
|
+
onClick: (event) => {
|
|
907
|
+
onClick?.(event);
|
|
908
|
+
triggerRipple();
|
|
909
|
+
},
|
|
910
|
+
...props,
|
|
911
|
+
children: (renderProps) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
912
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
913
|
+
ripple
|
|
914
|
+
] })
|
|
875
915
|
}
|
|
876
916
|
);
|
|
877
917
|
}
|
|
@@ -985,7 +1025,7 @@ function Checkbox({ className, children, ...props }) {
|
|
|
985
1025
|
}
|
|
986
1026
|
|
|
987
1027
|
// src/ui/combobox/combobox.tsx
|
|
988
|
-
var
|
|
1028
|
+
var import_react6 = require("react");
|
|
989
1029
|
var import_react_aria_components7 = require("react-aria-components");
|
|
990
1030
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
991
1031
|
var Combobox = import_react_aria_components7.ComboBox;
|
|
@@ -1002,18 +1042,18 @@ function ComboboxItem({ className, children, ...props }) {
|
|
|
1002
1042
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_aria_components7.ListBoxItem, { "data-slot": "combobox-item", className: cn("flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
1003
1043
|
}
|
|
1004
1044
|
function HighlightMatch({ text, query, className }) {
|
|
1005
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react6.Fragment, { children: part.text }, `${part.text}-${index}`)) });
|
|
1006
1046
|
}
|
|
1007
1047
|
function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
|
|
1008
|
-
const [internalInputValue, setInternalInputValue] = (0,
|
|
1048
|
+
const [internalInputValue, setInternalInputValue] = (0, import_react6.useState)("");
|
|
1009
1049
|
const inputValue = controlledInputValue ?? internalInputValue;
|
|
1010
1050
|
const setInputValue = (value) => {
|
|
1011
1051
|
setInternalInputValue(value);
|
|
1012
1052
|
onInputChange?.(value);
|
|
1013
1053
|
};
|
|
1014
1054
|
const normalizedQuery = inputValue.trim().toLocaleLowerCase();
|
|
1015
|
-
const filteredItems = (0,
|
|
1016
|
-
const suggestedItem = (0,
|
|
1055
|
+
const filteredItems = (0, import_react6.useMemo)(() => normalizedQuery ? items.filter((item) => getItemLabel(item).toLocaleLowerCase().includes(normalizedQuery)) : [...items], [getItemLabel, items, normalizedQuery]);
|
|
1056
|
+
const suggestedItem = (0, import_react6.useMemo)(() => !suggestion || !normalizedQuery ? void 0 : items.find((item) => getItemLabel(item).toLocaleLowerCase().startsWith(normalizedQuery) && getItemLabel(item).length > inputValue.length), [getItemLabel, inputValue.length, items, normalizedQuery, suggestion]);
|
|
1017
1057
|
const suggestionLabel = suggestedItem ? getItemLabel(suggestedItem) : void 0;
|
|
1018
1058
|
const acceptSuggestion = () => {
|
|
1019
1059
|
if (!suggestedItem || !suggestionLabel) return false;
|
|
@@ -1175,11 +1215,43 @@ function ConfirmDialog({
|
|
|
1175
1215
|
);
|
|
1176
1216
|
}
|
|
1177
1217
|
|
|
1178
|
-
// src/ui/
|
|
1218
|
+
// src/ui/danger-zone/danger-zone.tsx
|
|
1179
1219
|
var import_lucide_react4 = require("lucide-react");
|
|
1180
|
-
var React2 = __toESM(require("react"), 1);
|
|
1181
1220
|
var import_react_aria_components10 = require("react-aria-components");
|
|
1182
1221
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1222
|
+
function DangerZone({
|
|
1223
|
+
title = "Zona de peligro",
|
|
1224
|
+
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
1225
|
+
defaultOpen = false,
|
|
1226
|
+
className,
|
|
1227
|
+
children
|
|
1228
|
+
}) {
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
|
|
1230
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1231
|
+
import_react_aria_components10.Button,
|
|
1232
|
+
{
|
|
1233
|
+
slot: "trigger",
|
|
1234
|
+
"data-slot": "danger-zone-trigger",
|
|
1235
|
+
className: "group/danger flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
1236
|
+
children: [
|
|
1237
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ShieldAlert, { className: "size-4 shrink-0 text-destructive" }),
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "font-heading text-base leading-snug font-medium text-destructive", children: title }),
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-muted-foreground", children: description })
|
|
1241
|
+
] }),
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/danger:rotate-180" })
|
|
1243
|
+
]
|
|
1244
|
+
}
|
|
1245
|
+
) }),
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components10.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CardContent, { children }) })
|
|
1247
|
+
] }) });
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// src/ui/dialog/dialog.tsx
|
|
1251
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1252
|
+
var React2 = __toESM(require("react"), 1);
|
|
1253
|
+
var import_react_aria_components11 = require("react-aria-components");
|
|
1254
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1183
1255
|
var DialogContext = React2.createContext(null);
|
|
1184
1256
|
function useDialogContext() {
|
|
1185
1257
|
const context = React2.useContext(DialogContext);
|
|
@@ -1196,7 +1268,7 @@ function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledO
|
|
|
1196
1268
|
},
|
|
1197
1269
|
[controlledOpen, onOpenChange]
|
|
1198
1270
|
);
|
|
1199
|
-
return /* @__PURE__ */ (0,
|
|
1271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogContext.Provider, { value: { open, setOpen }, children });
|
|
1200
1272
|
}
|
|
1201
1273
|
function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
1202
1274
|
const { setOpen } = useDialogContext();
|
|
@@ -1215,16 +1287,16 @@ function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
|
1215
1287
|
}
|
|
1216
1288
|
});
|
|
1217
1289
|
}
|
|
1218
|
-
return /* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
1219
1291
|
}
|
|
1220
1292
|
function DialogPortal({ children }) {
|
|
1221
|
-
return /* @__PURE__ */ (0,
|
|
1293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children });
|
|
1222
1294
|
}
|
|
1223
1295
|
function DialogOverlay({ children, className, ...props }) {
|
|
1224
1296
|
const { open, setOpen } = useDialogContext();
|
|
1225
1297
|
if (!open) return null;
|
|
1226
|
-
return /* @__PURE__ */ (0,
|
|
1227
|
-
|
|
1298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1299
|
+
import_react_aria_components11.ModalOverlay,
|
|
1228
1300
|
{
|
|
1229
1301
|
"data-slot": "dialog-overlay",
|
|
1230
1302
|
isDismissable: true,
|
|
@@ -1247,21 +1319,21 @@ function DialogContent({
|
|
|
1247
1319
|
...props
|
|
1248
1320
|
}) {
|
|
1249
1321
|
const { setOpen } = useDialogContext();
|
|
1250
|
-
return /* @__PURE__ */ (0,
|
|
1322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1251
1323
|
DialogOverlay,
|
|
1252
1324
|
{
|
|
1253
1325
|
onClick: (event) => {
|
|
1254
1326
|
if (event.target === event.currentTarget) onOverlayClick?.(event);
|
|
1255
1327
|
},
|
|
1256
|
-
children: /* @__PURE__ */ (0,
|
|
1257
|
-
|
|
1328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1329
|
+
import_react_aria_components11.Modal,
|
|
1258
1330
|
{
|
|
1259
1331
|
className: cn(
|
|
1260
1332
|
"w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
|
|
1261
1333
|
className
|
|
1262
1334
|
),
|
|
1263
|
-
children: /* @__PURE__ */ (0,
|
|
1264
|
-
|
|
1335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1336
|
+
import_react_aria_components11.Dialog,
|
|
1265
1337
|
{
|
|
1266
1338
|
"data-slot": "dialog-content",
|
|
1267
1339
|
className: cn(
|
|
@@ -1271,7 +1343,7 @@ function DialogContent({
|
|
|
1271
1343
|
...props,
|
|
1272
1344
|
children: [
|
|
1273
1345
|
children,
|
|
1274
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1346
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1275
1347
|
Button,
|
|
1276
1348
|
{
|
|
1277
1349
|
"aria-label": "Cerrar di\xE1logo",
|
|
@@ -1280,7 +1352,7 @@ function DialogContent({
|
|
|
1280
1352
|
className: "absolute top-2 right-2",
|
|
1281
1353
|
size: "icon-sm",
|
|
1282
1354
|
onPress: () => setOpen(false),
|
|
1283
|
-
children: /* @__PURE__ */ (0,
|
|
1355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.XIcon, {})
|
|
1284
1356
|
}
|
|
1285
1357
|
) : null
|
|
1286
1358
|
]
|
|
@@ -1304,54 +1376,86 @@ function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
|
1304
1376
|
}
|
|
1305
1377
|
});
|
|
1306
1378
|
}
|
|
1307
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
|
|
1308
1380
|
}
|
|
1309
1381
|
function DialogHeader({ className, ...props }) {
|
|
1310
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1311
1383
|
}
|
|
1312
1384
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.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
1386
|
children,
|
|
1315
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1387
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogClose, { variant: "outline", children: "Cerrar" }) : null
|
|
1316
1388
|
] });
|
|
1317
1389
|
}
|
|
1318
1390
|
function DialogTitle({ className, ...props }) {
|
|
1319
|
-
return /* @__PURE__ */ (0,
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components11.Heading, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
|
|
1320
1392
|
}
|
|
1321
1393
|
function DialogDescription({ className, ...props }) {
|
|
1322
|
-
return /* @__PURE__ */ (0,
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components11.Text, { slot: "description", "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props });
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
// src/ui/doc-preview/doc-preview.tsx
|
|
1398
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1399
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1400
|
+
function DocPreview({ url, mimeType, name }) {
|
|
1401
|
+
if (!url) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Fallback, { mimeType, reason: "no-url" });
|
|
1402
|
+
if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1404
|
+
"iframe",
|
|
1405
|
+
{
|
|
1406
|
+
src: url,
|
|
1407
|
+
title: name,
|
|
1408
|
+
className: "w-full rounded-sm border-0",
|
|
1409
|
+
style: { height: "75vh", minHeight: 400 }
|
|
1410
|
+
}
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1413
|
+
if (mimeType?.startsWith("image/")) {
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-center rounded-sm bg-muted/30 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
|
|
1415
|
+
}
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Fallback, { mimeType, reason: "unsupported" });
|
|
1417
|
+
}
|
|
1418
|
+
function Fallback({ mimeType, reason }) {
|
|
1419
|
+
const Icon = mimeType?.startsWith("image/") ? import_lucide_react6.Image : import_lucide_react6.FileText;
|
|
1420
|
+
const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
|
|
1421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 py-14 text-muted-foreground", children: [
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { className: "size-9 opacity-30" }),
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm", children: message }),
|
|
1424
|
+
mimeType ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
|
|
1426
|
+
] });
|
|
1323
1427
|
}
|
|
1324
1428
|
|
|
1325
1429
|
// src/ui/drawer/drawer.tsx
|
|
1326
|
-
var
|
|
1327
|
-
var
|
|
1430
|
+
var import_react_aria_components12 = require("react-aria-components");
|
|
1431
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1328
1432
|
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" };
|
|
1329
1433
|
function Drawer({ children, side = "right", className, ...props }) {
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components12.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_runtime19.jsx)(import_react_aria_components12.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_runtime19.jsx)(import_react_aria_components12.Dialog, { "data-slot": "drawer", className: "outline-none", children }) }) });
|
|
1331
1435
|
}
|
|
1332
1436
|
function DrawerHeader({ className, ...props }) {
|
|
1333
|
-
return /* @__PURE__ */ (0,
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
1334
1438
|
}
|
|
1335
1439
|
function DrawerFooter({ className, ...props }) {
|
|
1336
|
-
return /* @__PURE__ */ (0,
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.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 });
|
|
1337
1441
|
}
|
|
1338
1442
|
function DrawerTitle({ className, ...props }) {
|
|
1339
|
-
return /* @__PURE__ */ (0,
|
|
1443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
|
|
1340
1444
|
}
|
|
1341
1445
|
function DrawerDescription({ className, ...props }) {
|
|
1342
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
1343
1447
|
}
|
|
1344
1448
|
|
|
1345
1449
|
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
1346
1450
|
var React3 = require("react");
|
|
1347
1451
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
1348
|
-
var
|
|
1349
|
-
var
|
|
1350
|
-
var
|
|
1452
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1453
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
1454
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1351
1455
|
function DropdownMenuTrigger({
|
|
1352
1456
|
...props
|
|
1353
1457
|
}) {
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components13.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1355
1459
|
}
|
|
1356
1460
|
function DropdownMenu({
|
|
1357
1461
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -1362,16 +1466,16 @@ function DropdownMenu({
|
|
|
1362
1466
|
children,
|
|
1363
1467
|
...props
|
|
1364
1468
|
}) {
|
|
1365
|
-
return /* @__PURE__ */ (0,
|
|
1366
|
-
|
|
1469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1470
|
+
import_react_aria_components13.Popover,
|
|
1367
1471
|
{
|
|
1368
1472
|
"data-slot": dataSlot,
|
|
1369
1473
|
placement,
|
|
1370
1474
|
offset,
|
|
1371
1475
|
crossOffset,
|
|
1372
1476
|
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),
|
|
1373
|
-
children: /* @__PURE__ */ (0,
|
|
1374
|
-
|
|
1477
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1478
|
+
import_react_aria_components13.Menu,
|
|
1375
1479
|
{
|
|
1376
1480
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
1377
1481
|
...props,
|
|
@@ -1384,15 +1488,15 @@ function DropdownMenu({
|
|
|
1384
1488
|
function DropdownMenuGroup({
|
|
1385
1489
|
...props
|
|
1386
1490
|
}) {
|
|
1387
|
-
return /* @__PURE__ */ (0,
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components13.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
|
|
1388
1492
|
}
|
|
1389
1493
|
function DropdownMenuLabel({
|
|
1390
1494
|
className,
|
|
1391
1495
|
inset,
|
|
1392
1496
|
...props
|
|
1393
1497
|
}) {
|
|
1394
|
-
return /* @__PURE__ */ (0,
|
|
1395
|
-
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1499
|
+
import_react_aria_components13.Header,
|
|
1396
1500
|
{
|
|
1397
1501
|
"data-slot": "dropdown-menu-label",
|
|
1398
1502
|
"data-inset": inset,
|
|
@@ -1423,27 +1527,27 @@ function DropdownMenuItem({
|
|
|
1423
1527
|
children,
|
|
1424
1528
|
...props
|
|
1425
1529
|
}) {
|
|
1426
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
-
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1531
|
+
import_react_aria_components13.MenuItem,
|
|
1428
1532
|
{
|
|
1429
1533
|
"data-slot": "dropdown-menu-item",
|
|
1430
1534
|
"data-inset": inset,
|
|
1431
1535
|
"data-variant": variant,
|
|
1432
1536
|
textValue: typeof children === "string" ? children : props.textValue,
|
|
1433
|
-
className: (0,
|
|
1537
|
+
className: (0, import_react_aria_components13.composeRenderProps)(
|
|
1434
1538
|
className,
|
|
1435
1539
|
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
1436
1540
|
),
|
|
1437
1541
|
...props,
|
|
1438
|
-
children: (0,
|
|
1542
|
+
children: (0, import_react_aria_components13.composeRenderProps)(
|
|
1439
1543
|
children,
|
|
1440
|
-
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0,
|
|
1441
|
-
selectionMode !== "none" ? /* @__PURE__ */ (0,
|
|
1544
|
+
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
1545
|
+
selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1442
1546
|
"span",
|
|
1443
1547
|
{
|
|
1444
1548
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1445
1549
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
1446
|
-
children: isSelected ? /* @__PURE__ */ (0,
|
|
1550
|
+
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react7.CheckIcon, {}) : null
|
|
1447
1551
|
}
|
|
1448
1552
|
) : null,
|
|
1449
1553
|
children2
|
|
@@ -1455,7 +1559,7 @@ function DropdownMenuItem({
|
|
|
1455
1559
|
function DropdownMenuSub({
|
|
1456
1560
|
...props
|
|
1457
1561
|
}) {
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components13.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1459
1563
|
}
|
|
1460
1564
|
function DropdownMenuSubTrigger({
|
|
1461
1565
|
className,
|
|
@@ -1463,8 +1567,8 @@ function DropdownMenuSubTrigger({
|
|
|
1463
1567
|
children,
|
|
1464
1568
|
...props
|
|
1465
1569
|
}) {
|
|
1466
|
-
return /* @__PURE__ */ (0,
|
|
1467
|
-
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1571
|
+
import_react_aria_components13.MenuItem,
|
|
1468
1572
|
{
|
|
1469
1573
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
1470
1574
|
"data-inset": inset,
|
|
@@ -1474,9 +1578,9 @@ function DropdownMenuSubTrigger({
|
|
|
1474
1578
|
className
|
|
1475
1579
|
),
|
|
1476
1580
|
...props,
|
|
1477
|
-
children: (0,
|
|
1581
|
+
children: (0, import_react_aria_components13.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
1478
1582
|
children2,
|
|
1479
|
-
/* @__PURE__ */ (0,
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react7.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
1480
1584
|
] }))
|
|
1481
1585
|
}
|
|
1482
1586
|
);
|
|
@@ -1488,7 +1592,7 @@ function DropdownMenuSubContent({
|
|
|
1488
1592
|
className,
|
|
1489
1593
|
...props
|
|
1490
1594
|
}) {
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1492
1596
|
DropdownMenu,
|
|
1493
1597
|
{
|
|
1494
1598
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1504,8 +1608,8 @@ function DropdownMenuSeparator({
|
|
|
1504
1608
|
className,
|
|
1505
1609
|
...props
|
|
1506
1610
|
}) {
|
|
1507
|
-
return /* @__PURE__ */ (0,
|
|
1508
|
-
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1612
|
+
import_react_aria_components13.Separator,
|
|
1509
1613
|
{
|
|
1510
1614
|
"data-slot": "dropdown-menu-separator",
|
|
1511
1615
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
@@ -1517,7 +1621,7 @@ function DropdownMenuShortcut({
|
|
|
1517
1621
|
className,
|
|
1518
1622
|
...props
|
|
1519
1623
|
}) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1521
1625
|
"span",
|
|
1522
1626
|
{
|
|
1523
1627
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1532,9 +1636,9 @@ function DropdownMenuShortcut({
|
|
|
1532
1636
|
|
|
1533
1637
|
// src/ui/empty-state/empty-state.tsx
|
|
1534
1638
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1535
|
-
var
|
|
1639
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1536
1640
|
function EmptyState({ className, ...props }) {
|
|
1537
|
-
return /* @__PURE__ */ (0,
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1538
1642
|
"div",
|
|
1539
1643
|
{
|
|
1540
1644
|
"data-slot": "empty-state",
|
|
@@ -1547,7 +1651,7 @@ function EmptyState({ className, ...props }) {
|
|
|
1547
1651
|
);
|
|
1548
1652
|
}
|
|
1549
1653
|
function EmptyStateHeader({ className, ...props }) {
|
|
1550
|
-
return /* @__PURE__ */ (0,
|
|
1654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1551
1655
|
"div",
|
|
1552
1656
|
{
|
|
1553
1657
|
"data-slot": "empty-state-header",
|
|
@@ -1573,7 +1677,7 @@ function EmptyStateMedia({
|
|
|
1573
1677
|
variant = "default",
|
|
1574
1678
|
...props
|
|
1575
1679
|
}) {
|
|
1576
|
-
return /* @__PURE__ */ (0,
|
|
1680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1577
1681
|
"div",
|
|
1578
1682
|
{
|
|
1579
1683
|
"data-slot": "empty-state-media",
|
|
@@ -1584,7 +1688,7 @@ function EmptyStateMedia({
|
|
|
1584
1688
|
);
|
|
1585
1689
|
}
|
|
1586
1690
|
function EmptyStateTitle({ className, ...props }) {
|
|
1587
|
-
return /* @__PURE__ */ (0,
|
|
1691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1588
1692
|
"h3",
|
|
1589
1693
|
{
|
|
1590
1694
|
"data-slot": "empty-state-title",
|
|
@@ -1594,7 +1698,7 @@ function EmptyStateTitle({ className, ...props }) {
|
|
|
1594
1698
|
);
|
|
1595
1699
|
}
|
|
1596
1700
|
function EmptyStateDescription({ className, ...props }) {
|
|
1597
|
-
return /* @__PURE__ */ (0,
|
|
1701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1598
1702
|
"p",
|
|
1599
1703
|
{
|
|
1600
1704
|
"data-slot": "empty-state-description",
|
|
@@ -1607,7 +1711,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
1607
1711
|
);
|
|
1608
1712
|
}
|
|
1609
1713
|
function EmptyStateContent({ className, ...props }) {
|
|
1610
|
-
return /* @__PURE__ */ (0,
|
|
1714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1611
1715
|
"div",
|
|
1612
1716
|
{
|
|
1613
1717
|
"data-slot": "empty-state-content",
|
|
@@ -1624,24 +1728,24 @@ function EmptyStateContent({ className, ...props }) {
|
|
|
1624
1728
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1625
1729
|
|
|
1626
1730
|
// src/ui/label/label.tsx
|
|
1627
|
-
var
|
|
1628
|
-
var
|
|
1629
|
-
var
|
|
1630
|
-
var Label2 = (0,
|
|
1631
|
-
return /* @__PURE__ */ (0,
|
|
1731
|
+
var import_react7 = require("react");
|
|
1732
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
1733
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1734
|
+
var Label2 = (0, import_react7.forwardRef)(function Label3({ className, ...props }, ref) {
|
|
1735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.Label, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
|
|
1632
1736
|
});
|
|
1633
1737
|
|
|
1634
1738
|
// src/ui/field/field.tsx
|
|
1635
|
-
var
|
|
1739
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1636
1740
|
function FieldSet({ className, ...props }) {
|
|
1637
|
-
return /* @__PURE__ */ (0,
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
1638
1742
|
}
|
|
1639
1743
|
function FieldLegend({
|
|
1640
1744
|
className,
|
|
1641
1745
|
variant = "legend",
|
|
1642
1746
|
...props
|
|
1643
1747
|
}) {
|
|
1644
|
-
return /* @__PURE__ */ (0,
|
|
1748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1645
1749
|
"legend",
|
|
1646
1750
|
{
|
|
1647
1751
|
"data-slot": "field-legend",
|
|
@@ -1655,7 +1759,7 @@ function FieldLegend({
|
|
|
1655
1759
|
);
|
|
1656
1760
|
}
|
|
1657
1761
|
function FieldGroup({ className, ...props }) {
|
|
1658
|
-
return /* @__PURE__ */ (0,
|
|
1762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1659
1763
|
"div",
|
|
1660
1764
|
{
|
|
1661
1765
|
"data-slot": "field-group",
|
|
@@ -1683,7 +1787,7 @@ var fieldVariants = (0, import_class_variance_authority8.cva)(
|
|
|
1683
1787
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
1684
1788
|
return (
|
|
1685
1789
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
1686
|
-
/* @__PURE__ */ (0,
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1687
1791
|
"div",
|
|
1688
1792
|
{
|
|
1689
1793
|
role: "group",
|
|
@@ -1696,7 +1800,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1696
1800
|
);
|
|
1697
1801
|
}
|
|
1698
1802
|
function FieldContent({ className, ...props }) {
|
|
1699
|
-
return /* @__PURE__ */ (0,
|
|
1803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1700
1804
|
"div",
|
|
1701
1805
|
{
|
|
1702
1806
|
"data-slot": "field-content",
|
|
@@ -1706,7 +1810,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1706
1810
|
);
|
|
1707
1811
|
}
|
|
1708
1812
|
function FieldLabel({ className, ...props }) {
|
|
1709
|
-
return /* @__PURE__ */ (0,
|
|
1813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1710
1814
|
Label2,
|
|
1711
1815
|
{
|
|
1712
1816
|
"data-slot": "field-label",
|
|
@@ -1719,7 +1823,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1719
1823
|
);
|
|
1720
1824
|
}
|
|
1721
1825
|
function FieldTitle({ className, ...props }) {
|
|
1722
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1723
1827
|
"div",
|
|
1724
1828
|
{
|
|
1725
1829
|
"data-slot": "field-title",
|
|
@@ -1729,7 +1833,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1729
1833
|
);
|
|
1730
1834
|
}
|
|
1731
1835
|
function FieldDescription({ className, ...props }) {
|
|
1732
|
-
return /* @__PURE__ */ (0,
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1733
1837
|
"p",
|
|
1734
1838
|
{
|
|
1735
1839
|
"data-slot": "field-description",
|
|
@@ -1742,7 +1846,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1742
1846
|
);
|
|
1743
1847
|
}
|
|
1744
1848
|
function FieldSeparator({ className, children, ...props }) {
|
|
1745
|
-
return /* @__PURE__ */ (0,
|
|
1849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1746
1850
|
"div",
|
|
1747
1851
|
{
|
|
1748
1852
|
"data-slot": "field-separator",
|
|
@@ -1750,8 +1854,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1750
1854
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
1751
1855
|
...props,
|
|
1752
1856
|
children: [
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
1754
|
-
children ? /* @__PURE__ */ (0,
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1858
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1755
1859
|
"span",
|
|
1756
1860
|
{
|
|
1757
1861
|
"data-slot": "field-separator-content",
|
|
@@ -1765,9 +1869,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1765
1869
|
}
|
|
1766
1870
|
function FieldError2({ className, children, errors, ...props }) {
|
|
1767
1871
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
1768
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0,
|
|
1872
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: message }, message)) }) : null);
|
|
1769
1873
|
if (!content) return null;
|
|
1770
|
-
return /* @__PURE__ */ (0,
|
|
1874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1771
1875
|
"div",
|
|
1772
1876
|
{
|
|
1773
1877
|
role: "alert",
|
|
@@ -1780,89 +1884,89 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
1780
1884
|
}
|
|
1781
1885
|
|
|
1782
1886
|
// src/ui/form-feedback/form-feedback.tsx
|
|
1783
|
-
var
|
|
1784
|
-
var
|
|
1785
|
-
var
|
|
1887
|
+
var import_react8 = require("react");
|
|
1888
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1889
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1786
1890
|
function useFormFeedback(options) {
|
|
1787
1891
|
const resetMs = options?.successResetMs ?? 2500;
|
|
1788
|
-
const [state, setState] = (0,
|
|
1789
|
-
const timer = (0,
|
|
1790
|
-
const clearTimer = (0,
|
|
1892
|
+
const [state, setState] = (0, import_react8.useState)({ status: "idle" });
|
|
1893
|
+
const timer = (0, import_react8.useRef)(null);
|
|
1894
|
+
const clearTimer = (0, import_react8.useCallback)(() => {
|
|
1791
1895
|
if (timer.current) clearTimeout(timer.current);
|
|
1792
1896
|
timer.current = null;
|
|
1793
1897
|
}, []);
|
|
1794
|
-
(0,
|
|
1795
|
-
const setPending = (0,
|
|
1898
|
+
(0, import_react8.useEffect)(() => () => clearTimer(), [clearTimer]);
|
|
1899
|
+
const setPending = (0, import_react8.useCallback)(() => {
|
|
1796
1900
|
clearTimer();
|
|
1797
1901
|
setState({ status: "pending" });
|
|
1798
1902
|
}, [clearTimer]);
|
|
1799
|
-
const setSuccess = (0,
|
|
1903
|
+
const setSuccess = (0, import_react8.useCallback)((message) => {
|
|
1800
1904
|
clearTimer();
|
|
1801
1905
|
setState({ status: "success", message });
|
|
1802
1906
|
if (resetMs > 0) timer.current = setTimeout(() => setState({ status: "idle" }), resetMs);
|
|
1803
1907
|
}, [clearTimer, resetMs]);
|
|
1804
|
-
const setError = (0,
|
|
1908
|
+
const setError = (0, import_react8.useCallback)((message) => {
|
|
1805
1909
|
clearTimer();
|
|
1806
1910
|
setState({ status: "error", message });
|
|
1807
1911
|
}, [clearTimer]);
|
|
1808
|
-
const reset = (0,
|
|
1912
|
+
const reset = (0, import_react8.useCallback)(() => {
|
|
1809
1913
|
clearTimer();
|
|
1810
1914
|
setState({ status: "idle" });
|
|
1811
1915
|
}, [clearTimer]);
|
|
1812
1916
|
return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
|
|
1813
1917
|
}
|
|
1814
1918
|
function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
|
|
1815
|
-
if (state.status === "idle") return /* @__PURE__ */ (0,
|
|
1919
|
+
if (state.status === "idle") return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
1816
1920
|
const error = state.status === "error";
|
|
1817
1921
|
const success = state.status === "success";
|
|
1818
|
-
return /* @__PURE__ */ (0,
|
|
1819
|
-
state.status === "pending" && /* @__PURE__ */ (0,
|
|
1820
|
-
success && /* @__PURE__ */ (0,
|
|
1821
|
-
error && /* @__PURE__ */ (0,
|
|
1822
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.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: [
|
|
1923
|
+
state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
1924
|
+
success && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1925
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
1823
1927
|
] });
|
|
1824
1928
|
}
|
|
1825
1929
|
|
|
1826
1930
|
// src/ui/form-row/form-row.tsx
|
|
1827
|
-
var
|
|
1931
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1828
1932
|
function FormRow({ label, htmlFor, required, hint, error, className, children }) {
|
|
1829
1933
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
1830
1934
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
1831
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
|
|
1833
1937
|
label,
|
|
1834
|
-
required && /* @__PURE__ */ (0,
|
|
1835
|
-
/* @__PURE__ */ (0,
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
1938
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
|
|
1837
1941
|
] })
|
|
1838
1942
|
] }),
|
|
1839
1943
|
children,
|
|
1840
|
-
hint && /* @__PURE__ */ (0,
|
|
1841
|
-
error && /* @__PURE__ */ (0,
|
|
1944
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
|
|
1945
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
|
|
1842
1946
|
] });
|
|
1843
1947
|
}
|
|
1844
1948
|
|
|
1845
1949
|
// src/ui/icon-button/icon-button.tsx
|
|
1846
|
-
var
|
|
1950
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
1847
1951
|
|
|
1848
1952
|
// src/ui/tooltip/tooltip.tsx
|
|
1849
1953
|
var React4 = __toESM(require("react"), 1);
|
|
1850
|
-
var
|
|
1851
|
-
var
|
|
1954
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
1955
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1852
1956
|
function TooltipTrigger({
|
|
1853
1957
|
delay = 0,
|
|
1854
1958
|
children,
|
|
1855
1959
|
...props
|
|
1856
1960
|
}) {
|
|
1857
1961
|
const [trigger, tooltip] = React4.Children.toArray(children);
|
|
1858
|
-
return /* @__PURE__ */ (0,
|
|
1859
|
-
|
|
1962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1963
|
+
import_react_aria_components15.TooltipTrigger,
|
|
1860
1964
|
{
|
|
1861
1965
|
"data-slot": "tooltip-trigger",
|
|
1862
1966
|
delay,
|
|
1863
1967
|
...props,
|
|
1864
1968
|
children: [
|
|
1865
|
-
/* @__PURE__ */ (0,
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components15.Focusable, { children: trigger }),
|
|
1866
1970
|
tooltip
|
|
1867
1971
|
]
|
|
1868
1972
|
}
|
|
@@ -1876,8 +1980,8 @@ function Tooltip({
|
|
|
1876
1980
|
children,
|
|
1877
1981
|
...props
|
|
1878
1982
|
}) {
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1880
|
-
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1984
|
+
import_react_aria_components15.Tooltip,
|
|
1881
1985
|
{
|
|
1882
1986
|
"data-slot": "tooltip-content",
|
|
1883
1987
|
placement,
|
|
@@ -1890,8 +1994,8 @@ function Tooltip({
|
|
|
1890
1994
|
...props,
|
|
1891
1995
|
children: [
|
|
1892
1996
|
children,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
|
|
1997
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1998
|
+
import_react_aria_components15.OverlayArrow,
|
|
1895
1999
|
{
|
|
1896
2000
|
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
|
|
1897
2001
|
style: ({ placement: placement2, defaultStyle }) => ({
|
|
@@ -1908,7 +2012,7 @@ function Tooltip({
|
|
|
1908
2012
|
}
|
|
1909
2013
|
|
|
1910
2014
|
// src/ui/icon-button/icon-button.tsx
|
|
1911
|
-
var
|
|
2015
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1912
2016
|
function IconButton({
|
|
1913
2017
|
label,
|
|
1914
2018
|
children,
|
|
@@ -1921,9 +2025,9 @@ function IconButton({
|
|
|
1921
2025
|
buttonVariants({ variant, size: "icon" }),
|
|
1922
2026
|
className
|
|
1923
2027
|
);
|
|
1924
|
-
return /* @__PURE__ */ (0,
|
|
1925
|
-
href ? /* @__PURE__ */ (0,
|
|
1926
|
-
|
|
2028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TooltipTrigger, { children: [
|
|
2029
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2030
|
+
import_react_aria_components16.Link,
|
|
1927
2031
|
{
|
|
1928
2032
|
"data-slot": "icon-button",
|
|
1929
2033
|
"aria-label": label,
|
|
@@ -1931,7 +2035,7 @@ function IconButton({
|
|
|
1931
2035
|
className: linkClassName,
|
|
1932
2036
|
children
|
|
1933
2037
|
}
|
|
1934
|
-
) : /* @__PURE__ */ (0,
|
|
2038
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1935
2039
|
Button,
|
|
1936
2040
|
{
|
|
1937
2041
|
"data-slot": "icon-button",
|
|
@@ -1943,7 +2047,7 @@ function IconButton({
|
|
|
1943
2047
|
children
|
|
1944
2048
|
}
|
|
1945
2049
|
),
|
|
1946
|
-
/* @__PURE__ */ (0,
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Tooltip, { children: label })
|
|
1947
2051
|
] });
|
|
1948
2052
|
}
|
|
1949
2053
|
|
|
@@ -1951,30 +2055,30 @@ function IconButton({
|
|
|
1951
2055
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1952
2056
|
|
|
1953
2057
|
// src/ui/input/input.tsx
|
|
1954
|
-
var
|
|
1955
|
-
var
|
|
1956
|
-
var
|
|
1957
|
-
var InputImpl = (0,
|
|
1958
|
-
return /* @__PURE__ */ (0,
|
|
2058
|
+
var import_react9 = require("react");
|
|
2059
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
2060
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2061
|
+
var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type, ...props }, ref) {
|
|
2062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components17.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 });
|
|
1959
2063
|
});
|
|
1960
2064
|
var Input3 = InputImpl;
|
|
1961
2065
|
|
|
1962
2066
|
// src/ui/textarea/textarea.tsx
|
|
1963
|
-
var
|
|
1964
|
-
var
|
|
1965
|
-
var
|
|
1966
|
-
var TextareaImpl = (0,
|
|
1967
|
-
return /* @__PURE__ */ (0,
|
|
2067
|
+
var import_react10 = require("react");
|
|
2068
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
2069
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2070
|
+
var TextareaImpl = (0, import_react10.forwardRef)(function Textarea({ className, ...props }, ref) {
|
|
2071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components18.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 });
|
|
1968
2072
|
});
|
|
1969
2073
|
var Textarea2 = TextareaImpl;
|
|
1970
2074
|
|
|
1971
2075
|
// src/ui/input-group/input-group.tsx
|
|
1972
|
-
var
|
|
2076
|
+
var import_jsx_runtime30 = (
|
|
1973
2077
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
1974
2078
|
require("react/jsx-runtime")
|
|
1975
2079
|
);
|
|
1976
2080
|
function InputGroup({ className, ...props }) {
|
|
1977
|
-
return /* @__PURE__ */ (0,
|
|
2081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1978
2082
|
"div",
|
|
1979
2083
|
{
|
|
1980
2084
|
role: "group",
|
|
@@ -2009,7 +2113,7 @@ function InputGroupAddon({
|
|
|
2009
2113
|
}) {
|
|
2010
2114
|
return (
|
|
2011
2115
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
2012
|
-
/* @__PURE__ */ (0,
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2013
2117
|
"div",
|
|
2014
2118
|
{
|
|
2015
2119
|
role: "group",
|
|
@@ -2040,7 +2144,7 @@ function InputGroupButton({
|
|
|
2040
2144
|
...props
|
|
2041
2145
|
}) {
|
|
2042
2146
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
2043
|
-
return /* @__PURE__ */ (0,
|
|
2147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2044
2148
|
Button,
|
|
2045
2149
|
{
|
|
2046
2150
|
"data-slot": "input-group-button",
|
|
@@ -2053,7 +2157,7 @@ function InputGroupButton({
|
|
|
2053
2157
|
);
|
|
2054
2158
|
}
|
|
2055
2159
|
function InputGroupText({ className, ...props }) {
|
|
2056
|
-
return /* @__PURE__ */ (0,
|
|
2160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2057
2161
|
"span",
|
|
2058
2162
|
{
|
|
2059
2163
|
"data-slot": "input-group-text",
|
|
@@ -2066,7 +2170,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
2066
2170
|
);
|
|
2067
2171
|
}
|
|
2068
2172
|
function InputGroupInput({ className, ...props }) {
|
|
2069
|
-
return /* @__PURE__ */ (0,
|
|
2173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2070
2174
|
Input3,
|
|
2071
2175
|
{
|
|
2072
2176
|
"data-slot": "input-group-control",
|
|
@@ -2079,7 +2183,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
2079
2183
|
);
|
|
2080
2184
|
}
|
|
2081
2185
|
function InputGroupTextarea({ className, ...props }) {
|
|
2082
|
-
return /* @__PURE__ */ (0,
|
|
2186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2083
2187
|
Textarea2,
|
|
2084
2188
|
{
|
|
2085
2189
|
"data-slot": "input-group-control",
|
|
@@ -2093,46 +2197,46 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
2093
2197
|
}
|
|
2094
2198
|
|
|
2095
2199
|
// src/ui/kbd/kbd.tsx
|
|
2096
|
-
var
|
|
2200
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2097
2201
|
function Kbd({ className, ...props }) {
|
|
2098
|
-
return /* @__PURE__ */ (0,
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.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 });
|
|
2099
2203
|
}
|
|
2100
2204
|
function KbdGroup({ className, ...props }) {
|
|
2101
|
-
return /* @__PURE__ */ (0,
|
|
2205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
|
|
2102
2206
|
}
|
|
2103
2207
|
|
|
2104
2208
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
2105
|
-
var
|
|
2106
|
-
var
|
|
2209
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2210
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2107
2211
|
function LoadingOverlay({ label = "Cargando", className, ...props }) {
|
|
2108
|
-
return /* @__PURE__ */ (0,
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.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_runtime32.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: label })
|
|
2111
2215
|
] }) });
|
|
2112
2216
|
}
|
|
2113
2217
|
|
|
2114
2218
|
// src/ui/menu/menu.tsx
|
|
2115
|
-
var
|
|
2116
|
-
var
|
|
2117
|
-
var MenuTrigger =
|
|
2219
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
2220
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2221
|
+
var MenuTrigger = import_react_aria_components19.MenuTrigger;
|
|
2118
2222
|
function MenuContent({ className, ...props }) {
|
|
2119
|
-
return /* @__PURE__ */ (0,
|
|
2223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components19.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 });
|
|
2120
2224
|
}
|
|
2121
2225
|
function Menu({ className, ...props }) {
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components19.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
2123
2227
|
}
|
|
2124
2228
|
function MenuItem({ className, children, ...props }) {
|
|
2125
|
-
return /* @__PURE__ */ (0,
|
|
2229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components19.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 });
|
|
2126
2230
|
}
|
|
2127
2231
|
|
|
2128
2232
|
// src/ui/otp-input/otp-input.tsx
|
|
2129
|
-
var
|
|
2130
|
-
var
|
|
2131
|
-
var
|
|
2233
|
+
var import_react11 = require("react");
|
|
2234
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
2235
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2132
2236
|
function normalizeOtp(value, length) {
|
|
2133
2237
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
2134
2238
|
}
|
|
2135
|
-
var OtpInputImpl = (0,
|
|
2239
|
+
var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
2136
2240
|
length = 6,
|
|
2137
2241
|
value,
|
|
2138
2242
|
defaultValue = "",
|
|
@@ -2149,15 +2253,15 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2149
2253
|
}, forwardedRef) {
|
|
2150
2254
|
const slotCount = Math.max(1, Math.floor(length));
|
|
2151
2255
|
const controlled = value !== void 0;
|
|
2152
|
-
const [internalValue, setInternalValue] = (0,
|
|
2256
|
+
const [internalValue, setInternalValue] = (0, import_react11.useState)(() => normalizeOtp(defaultValue, slotCount));
|
|
2153
2257
|
const code = normalizeOtp(controlled ? value : internalValue, slotCount);
|
|
2154
2258
|
const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
|
|
2155
|
-
const inputRef = (0,
|
|
2156
|
-
const [focused, setFocused] = (0,
|
|
2157
|
-
const [selectionStart, setSelectionStart] = (0,
|
|
2259
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2260
|
+
const [focused, setFocused] = (0, import_react11.useState)(false);
|
|
2261
|
+
const [selectionStart, setSelectionStart] = (0, import_react11.useState)(0);
|
|
2158
2262
|
const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
|
|
2159
2263
|
const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
|
|
2160
|
-
(0,
|
|
2264
|
+
(0, import_react11.useImperativeHandle)(forwardedRef, () => inputRef.current);
|
|
2161
2265
|
function updateSelection(input) {
|
|
2162
2266
|
setSelectionStart(input.selectionStart ?? code.length);
|
|
2163
2267
|
}
|
|
@@ -2180,7 +2284,7 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2180
2284
|
input.setSelectionRange(position, position);
|
|
2181
2285
|
setSelectionStart(position);
|
|
2182
2286
|
}
|
|
2183
|
-
return /* @__PURE__ */ (0,
|
|
2287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2184
2288
|
"div",
|
|
2185
2289
|
{
|
|
2186
2290
|
"data-slot": "otp-input",
|
|
@@ -2190,8 +2294,8 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2190
2294
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
2191
2295
|
onPointerDown: handlePointerDown,
|
|
2192
2296
|
children: [
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2194
|
-
|
|
2297
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2298
|
+
import_react_aria_components20.Input,
|
|
2195
2299
|
{
|
|
2196
2300
|
...props,
|
|
2197
2301
|
ref: inputRef,
|
|
@@ -2230,7 +2334,7 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2230
2334
|
}
|
|
2231
2335
|
}
|
|
2232
2336
|
),
|
|
2233
|
-
slots.map((slot, index) => /* @__PURE__ */ (0,
|
|
2337
|
+
slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2234
2338
|
"span",
|
|
2235
2339
|
{
|
|
2236
2340
|
"aria-hidden": "true",
|
|
@@ -2253,56 +2357,56 @@ var OtpInputImpl = (0, import_react10.forwardRef)(function OtpInput({
|
|
|
2253
2357
|
var OtpInput2 = OtpInputImpl;
|
|
2254
2358
|
|
|
2255
2359
|
// src/ui/page-header/page-header.tsx
|
|
2256
|
-
var
|
|
2360
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2257
2361
|
function PageHeader({ className, ...props }) {
|
|
2258
|
-
return /* @__PURE__ */ (0,
|
|
2362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.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 });
|
|
2259
2363
|
}
|
|
2260
2364
|
function PageHeaderHeading({ className, ...props }) {
|
|
2261
|
-
return /* @__PURE__ */ (0,
|
|
2365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
2262
2366
|
}
|
|
2263
2367
|
function PageHeaderTitle({ className, ...props }) {
|
|
2264
|
-
return /* @__PURE__ */ (0,
|
|
2368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
|
|
2265
2369
|
}
|
|
2266
2370
|
function PageHeaderDescription({ className, ...props }) {
|
|
2267
|
-
return /* @__PURE__ */ (0,
|
|
2371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
|
|
2268
2372
|
}
|
|
2269
2373
|
function PageHeaderActions({ className, ...props }) {
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
|
|
2271
2375
|
}
|
|
2272
2376
|
|
|
2273
2377
|
// src/ui/pagination/pagination.tsx
|
|
2274
|
-
var
|
|
2275
|
-
var
|
|
2378
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2379
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2276
2380
|
function Pagination({ page, pageCount, onPageChange, className }) {
|
|
2277
2381
|
const pages = Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
2278
|
-
return /* @__PURE__ */ (0,
|
|
2279
|
-
/* @__PURE__ */ (0,
|
|
2382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("nav", { "aria-label": "Paginaci\xF3n", className: cn("flex items-center justify-between gap-4", className), children: [
|
|
2383
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
2280
2384
|
"P\xE1gina ",
|
|
2281
2385
|
page,
|
|
2282
2386
|
" de ",
|
|
2283
2387
|
pageCount
|
|
2284
2388
|
] }),
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
pages.map((item) => /* @__PURE__ */ (0,
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2389
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { "aria-label": "P\xE1gina anterior", isDisabled: page <= 1, onPress: () => onPageChange(page - 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react10.ChevronLeft, {}) }),
|
|
2391
|
+
pages.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.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)),
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { "aria-label": "P\xE1gina siguiente", isDisabled: page >= pageCount, onPress: () => onPageChange(page + 1), size: "icon", variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react10.ChevronRight, {}) })
|
|
2289
2393
|
] })
|
|
2290
2394
|
] });
|
|
2291
2395
|
}
|
|
2292
2396
|
|
|
2293
2397
|
// src/ui/popover/popover.tsx
|
|
2294
|
-
var
|
|
2295
|
-
var
|
|
2296
|
-
var PopoverTrigger =
|
|
2398
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
2399
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2400
|
+
var PopoverTrigger = import_react_aria_components21.DialogTrigger;
|
|
2297
2401
|
function Popover4({ className, ...props }) {
|
|
2298
|
-
return /* @__PURE__ */ (0,
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components21.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 });
|
|
2299
2403
|
}
|
|
2300
2404
|
var PopoverContent = Popover4;
|
|
2301
2405
|
|
|
2302
2406
|
// src/ui/quantity-input/quantity-input.tsx
|
|
2303
|
-
var
|
|
2304
|
-
var
|
|
2305
|
-
var
|
|
2407
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2408
|
+
var import_react_aria_components22 = require("react-aria-components");
|
|
2409
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2306
2410
|
function QuantityInput({
|
|
2307
2411
|
className,
|
|
2308
2412
|
inputClassName,
|
|
@@ -2312,23 +2416,23 @@ function QuantityInput({
|
|
|
2312
2416
|
step = 1,
|
|
2313
2417
|
...props
|
|
2314
2418
|
}) {
|
|
2315
|
-
return /* @__PURE__ */ (0,
|
|
2316
|
-
|
|
2419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2420
|
+
import_react_aria_components22.NumberField,
|
|
2317
2421
|
{
|
|
2318
2422
|
...props,
|
|
2319
2423
|
minValue,
|
|
2320
2424
|
step,
|
|
2321
2425
|
"data-slot": "quantity-input",
|
|
2322
2426
|
className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
2323
|
-
children: /* @__PURE__ */ (0,
|
|
2324
|
-
|
|
2427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2428
|
+
import_react_aria_components22.Group,
|
|
2325
2429
|
{
|
|
2326
2430
|
"data-slot": "quantity-input-group",
|
|
2327
2431
|
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",
|
|
2328
2432
|
children: [
|
|
2329
|
-
/* @__PURE__ */ (0,
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components22.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_runtime38.jsx)(import_lucide_react11.Minus, { "aria-hidden": "true", className: "size-4" }) }),
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components22.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) }),
|
|
2435
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components22.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_runtime38.jsx)(import_lucide_react11.Plus, { "aria-hidden": "true", className: "size-4" }) })
|
|
2332
2436
|
]
|
|
2333
2437
|
}
|
|
2334
2438
|
)
|
|
@@ -2337,50 +2441,50 @@ function QuantityInput({
|
|
|
2337
2441
|
}
|
|
2338
2442
|
|
|
2339
2443
|
// src/ui/search-field/search-field.tsx
|
|
2340
|
-
var
|
|
2341
|
-
var
|
|
2342
|
-
var
|
|
2343
|
-
var SearchField =
|
|
2444
|
+
var import_react_aria_components23 = require("react-aria-components");
|
|
2445
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2446
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2447
|
+
var SearchField = import_react_aria_components23.SearchField;
|
|
2344
2448
|
function SearchInput({ className, ...props }) {
|
|
2345
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components23.Input, { "data-slot": "search-input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
|
|
2346
2450
|
}
|
|
2347
|
-
function SearchClearButton({ className, children = /* @__PURE__ */ (0,
|
|
2348
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
+
function SearchClearButton({ className, children = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react12.X, { "aria-hidden": "true", className: "size-4" }), ...props }) {
|
|
2452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components23.Button, { slot: "clear", "data-slot": "search-clear", className: cn("absolute top-1/2 right-1 rounded p-1 text-muted-foreground outline-none hover:bg-muted data-focus-visible:ring-2 data-focus-visible:ring-ring", className), ...props, children });
|
|
2349
2453
|
}
|
|
2350
2454
|
|
|
2351
2455
|
// src/ui/select/select.tsx
|
|
2352
|
-
var
|
|
2353
|
-
var
|
|
2354
|
-
var
|
|
2355
|
-
var Select =
|
|
2456
|
+
var import_react_aria_components24 = require("react-aria-components");
|
|
2457
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2458
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2459
|
+
var Select = import_react_aria_components24.Select;
|
|
2356
2460
|
function SelectTrigger({ className, children, ...props }) {
|
|
2357
|
-
return /* @__PURE__ */ (0,
|
|
2461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components24.Button, { "data-slot": "select-trigger", className: cn("group/select-trigger flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
2358
2462
|
typeof children === "function" ? children(state) : children,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react13.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" })
|
|
2360
2464
|
] }) });
|
|
2361
2465
|
}
|
|
2362
2466
|
function SelectValue({ className, ...props }) {
|
|
2363
|
-
return /* @__PURE__ */ (0,
|
|
2467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components24.SelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
|
|
2364
2468
|
}
|
|
2365
2469
|
function SelectContent({ className, ...props }) {
|
|
2366
|
-
return /* @__PURE__ */ (0,
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components24.Popover, { "data-slot": "select-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2367
2471
|
}
|
|
2368
2472
|
function SelectList({ className, ...props }) {
|
|
2369
|
-
return /* @__PURE__ */ (0,
|
|
2473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components24.ListBox, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
|
|
2370
2474
|
}
|
|
2371
2475
|
function SelectItem({ className, children, ...props }) {
|
|
2372
|
-
return /* @__PURE__ */ (0,
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components24.ListBoxItem, { "data-slot": "select-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2373
2477
|
}
|
|
2374
2478
|
|
|
2375
2479
|
// src/ui/sheet/sheet.tsx
|
|
2376
|
-
var
|
|
2377
|
-
var
|
|
2378
|
-
var
|
|
2480
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2481
|
+
var import_react_aria_components25 = require("react-aria-components");
|
|
2482
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2379
2483
|
function SheetTrigger({ ...props }) {
|
|
2380
|
-
return /* @__PURE__ */ (0,
|
|
2484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components25.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
|
|
2381
2485
|
}
|
|
2382
2486
|
function SheetClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2383
|
-
return /* @__PURE__ */ (0,
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2384
2488
|
Button,
|
|
2385
2489
|
{
|
|
2386
2490
|
slot: "close",
|
|
@@ -2397,8 +2501,8 @@ function SheetOverlay({
|
|
|
2397
2501
|
children,
|
|
2398
2502
|
...props
|
|
2399
2503
|
}) {
|
|
2400
|
-
return /* @__PURE__ */ (0,
|
|
2401
|
-
|
|
2504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2505
|
+
import_react_aria_components25.ModalOverlay,
|
|
2402
2506
|
{
|
|
2403
2507
|
"data-slot": "sheet-overlay",
|
|
2404
2508
|
isDismissable: true,
|
|
@@ -2418,8 +2522,8 @@ function Sheet({
|
|
|
2418
2522
|
showCloseButton = true,
|
|
2419
2523
|
...props
|
|
2420
2524
|
}) {
|
|
2421
|
-
return /* @__PURE__ */ (0,
|
|
2422
|
-
|
|
2525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2526
|
+
import_react_aria_components25.Modal,
|
|
2423
2527
|
{
|
|
2424
2528
|
"data-slot": "sheet-content",
|
|
2425
2529
|
"data-side": side,
|
|
@@ -2427,16 +2531,16 @@ function Sheet({
|
|
|
2427
2531
|
"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",
|
|
2428
2532
|
className
|
|
2429
2533
|
),
|
|
2430
|
-
children: /* @__PURE__ */ (0,
|
|
2431
|
-
|
|
2534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2535
|
+
import_react_aria_components25.Dialog,
|
|
2432
2536
|
{
|
|
2433
2537
|
"data-slot": "sheet",
|
|
2434
2538
|
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2435
2539
|
children: [
|
|
2436
2540
|
children,
|
|
2437
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2439
|
-
/* @__PURE__ */ (0,
|
|
2541
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react14.XIcon, {}),
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", children: "Cerrar" })
|
|
2440
2544
|
] })
|
|
2441
2545
|
]
|
|
2442
2546
|
}
|
|
@@ -2451,10 +2555,10 @@ function SheetContent({
|
|
|
2451
2555
|
showCloseButton = true,
|
|
2452
2556
|
...props
|
|
2453
2557
|
}) {
|
|
2454
|
-
return /* @__PURE__ */ (0,
|
|
2558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
|
|
2455
2559
|
}
|
|
2456
2560
|
function SheetHeader({ className, ...props }) {
|
|
2457
|
-
return /* @__PURE__ */ (0,
|
|
2561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2458
2562
|
"div",
|
|
2459
2563
|
{
|
|
2460
2564
|
"data-slot": "sheet-header",
|
|
@@ -2464,7 +2568,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
2464
2568
|
);
|
|
2465
2569
|
}
|
|
2466
2570
|
function SheetFooter({ className, ...props }) {
|
|
2467
|
-
return /* @__PURE__ */ (0,
|
|
2571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2468
2572
|
"div",
|
|
2469
2573
|
{
|
|
2470
2574
|
"data-slot": "sheet-footer",
|
|
@@ -2474,8 +2578,8 @@ function SheetFooter({ className, ...props }) {
|
|
|
2474
2578
|
);
|
|
2475
2579
|
}
|
|
2476
2580
|
function SheetTitle({ className, ...props }) {
|
|
2477
|
-
return /* @__PURE__ */ (0,
|
|
2478
|
-
|
|
2581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2582
|
+
import_react_aria_components25.Heading,
|
|
2479
2583
|
{
|
|
2480
2584
|
slot: "title",
|
|
2481
2585
|
"data-slot": "sheet-title",
|
|
@@ -2488,8 +2592,8 @@ function SheetDescription({
|
|
|
2488
2592
|
className,
|
|
2489
2593
|
...props
|
|
2490
2594
|
}) {
|
|
2491
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
-
|
|
2595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2596
|
+
import_react_aria_components25.Text,
|
|
2493
2597
|
{
|
|
2494
2598
|
slot: "description",
|
|
2495
2599
|
"data-slot": "sheet-description",
|
|
@@ -2500,13 +2604,13 @@ function SheetDescription({
|
|
|
2500
2604
|
}
|
|
2501
2605
|
|
|
2502
2606
|
// src/ui/sidebar/sidebar.tsx
|
|
2503
|
-
var
|
|
2504
|
-
var
|
|
2505
|
-
var
|
|
2506
|
-
var
|
|
2507
|
-
var SidebarContext = (0,
|
|
2607
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2608
|
+
var import_react12 = require("react");
|
|
2609
|
+
var import_react_aria_components26 = require("react-aria-components");
|
|
2610
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2611
|
+
var SidebarContext = (0, import_react12.createContext)(null);
|
|
2508
2612
|
function useSidebar() {
|
|
2509
|
-
const context = (0,
|
|
2613
|
+
const context = (0, import_react12.useContext)(SidebarContext);
|
|
2510
2614
|
if (!context)
|
|
2511
2615
|
throw new Error("useSidebar must be used inside SidebarProvider");
|
|
2512
2616
|
return context;
|
|
@@ -2515,8 +2619,8 @@ function SidebarProvider({
|
|
|
2515
2619
|
defaultCollapsed = false,
|
|
2516
2620
|
children
|
|
2517
2621
|
}) {
|
|
2518
|
-
const [collapsed, setCollapsed] = (0,
|
|
2519
|
-
const value = (0,
|
|
2622
|
+
const [collapsed, setCollapsed] = (0, import_react12.useState)(defaultCollapsed);
|
|
2623
|
+
const value = (0, import_react12.useMemo)(
|
|
2520
2624
|
() => ({
|
|
2521
2625
|
collapsed,
|
|
2522
2626
|
setCollapsed,
|
|
@@ -2524,14 +2628,14 @@ function SidebarProvider({
|
|
|
2524
2628
|
}),
|
|
2525
2629
|
[collapsed]
|
|
2526
2630
|
);
|
|
2527
|
-
return /* @__PURE__ */ (0,
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SidebarContext.Provider, { value, children });
|
|
2528
2632
|
}
|
|
2529
2633
|
function Sidebar({
|
|
2530
2634
|
className,
|
|
2531
2635
|
...props
|
|
2532
2636
|
}) {
|
|
2533
2637
|
const { collapsed } = useSidebar();
|
|
2534
|
-
return /* @__PURE__ */ (0,
|
|
2638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2535
2639
|
"aside",
|
|
2536
2640
|
{
|
|
2537
2641
|
"data-slot": "sidebar",
|
|
@@ -2548,7 +2652,7 @@ function SidebarHeader({
|
|
|
2548
2652
|
className,
|
|
2549
2653
|
...props
|
|
2550
2654
|
}) {
|
|
2551
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2552
2656
|
"div",
|
|
2553
2657
|
{
|
|
2554
2658
|
"data-slot": "sidebar-header",
|
|
@@ -2563,7 +2667,7 @@ function SidebarSearch({
|
|
|
2563
2667
|
className,
|
|
2564
2668
|
...props
|
|
2565
2669
|
}) {
|
|
2566
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2567
2671
|
"button",
|
|
2568
2672
|
{
|
|
2569
2673
|
type: "button",
|
|
@@ -2574,9 +2678,9 @@ function SidebarSearch({
|
|
|
2574
2678
|
),
|
|
2575
2679
|
...props,
|
|
2576
2680
|
children: [
|
|
2577
|
-
/* @__PURE__ */ (0,
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2579
|
-
/* @__PURE__ */ (0,
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react15.Search, { className: "size-4 shrink-0" }),
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
|
|
2580
2684
|
]
|
|
2581
2685
|
}
|
|
2582
2686
|
);
|
|
@@ -2585,7 +2689,7 @@ function SidebarContent({
|
|
|
2585
2689
|
className,
|
|
2586
2690
|
...props
|
|
2587
2691
|
}) {
|
|
2588
|
-
return /* @__PURE__ */ (0,
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2589
2693
|
"nav",
|
|
2590
2694
|
{
|
|
2591
2695
|
"data-slot": "sidebar-content",
|
|
@@ -2599,7 +2703,7 @@ function SidebarFooter({
|
|
|
2599
2703
|
className,
|
|
2600
2704
|
...props
|
|
2601
2705
|
}) {
|
|
2602
|
-
return /* @__PURE__ */ (0,
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2603
2707
|
"div",
|
|
2604
2708
|
{
|
|
2605
2709
|
"data-slot": "sidebar-footer",
|
|
@@ -2618,14 +2722,14 @@ function SidebarGroup({
|
|
|
2618
2722
|
...props
|
|
2619
2723
|
}) {
|
|
2620
2724
|
const { collapsed } = useSidebar();
|
|
2621
|
-
return /* @__PURE__ */ (0,
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2622
2726
|
"section",
|
|
2623
2727
|
{
|
|
2624
2728
|
"data-slot": "sidebar-group",
|
|
2625
2729
|
className: cn("mb-4 last:mb-0", className),
|
|
2626
2730
|
...props,
|
|
2627
2731
|
children: [
|
|
2628
|
-
label && /* @__PURE__ */ (0,
|
|
2732
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2629
2733
|
"h2",
|
|
2630
2734
|
{
|
|
2631
2735
|
className: cn(
|
|
@@ -2651,8 +2755,8 @@ function SidebarItem({
|
|
|
2651
2755
|
}) {
|
|
2652
2756
|
const { collapsed } = useSidebar();
|
|
2653
2757
|
const content = typeof children === "function" ? label : children ?? label;
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
-
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2759
|
+
import_react_aria_components26.Link,
|
|
2656
2760
|
{
|
|
2657
2761
|
"data-slot": "sidebar-item",
|
|
2658
2762
|
"aria-current": active ? "page" : void 0,
|
|
@@ -2663,16 +2767,16 @@ function SidebarItem({
|
|
|
2663
2767
|
typeof className === "function" ? className : className
|
|
2664
2768
|
),
|
|
2665
2769
|
...props,
|
|
2666
|
-
children: (values) => /* @__PURE__ */ (0,
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2770
|
+
children: (values) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2669
2773
|
"span",
|
|
2670
2774
|
{
|
|
2671
2775
|
className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
|
|
2672
2776
|
children: typeof children === "function" ? children(values) : content
|
|
2673
2777
|
}
|
|
2674
2778
|
),
|
|
2675
|
-
badge && !collapsed && /* @__PURE__ */ (0,
|
|
2779
|
+
badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xs text-muted-foreground", children: badge })
|
|
2676
2780
|
] })
|
|
2677
2781
|
}
|
|
2678
2782
|
);
|
|
@@ -2681,7 +2785,7 @@ function SidebarSeparator({
|
|
|
2681
2785
|
className,
|
|
2682
2786
|
...props
|
|
2683
2787
|
}) {
|
|
2684
|
-
return /* @__PURE__ */ (0,
|
|
2788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2685
2789
|
"hr",
|
|
2686
2790
|
{
|
|
2687
2791
|
"data-slot": "sidebar-separator",
|
|
@@ -2692,7 +2796,7 @@ function SidebarSeparator({
|
|
|
2692
2796
|
}
|
|
2693
2797
|
function SidebarTrigger({ className, ...props }) {
|
|
2694
2798
|
const { collapsed, toggle } = useSidebar();
|
|
2695
|
-
return /* @__PURE__ */ (0,
|
|
2799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2696
2800
|
Button,
|
|
2697
2801
|
{
|
|
2698
2802
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -2701,7 +2805,7 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
2701
2805
|
variant: "ghost",
|
|
2702
2806
|
className: cn("ml-auto", className),
|
|
2703
2807
|
...props,
|
|
2704
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
2808
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react15.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react15.ChevronLeft, {})
|
|
2705
2809
|
}
|
|
2706
2810
|
);
|
|
2707
2811
|
}
|
|
@@ -2710,7 +2814,7 @@ function SidebarRail({
|
|
|
2710
2814
|
...props
|
|
2711
2815
|
}) {
|
|
2712
2816
|
const { toggle } = useSidebar();
|
|
2713
|
-
return /* @__PURE__ */ (0,
|
|
2817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2714
2818
|
"button",
|
|
2715
2819
|
{
|
|
2716
2820
|
type: "button",
|
|
@@ -2725,7 +2829,7 @@ function SidebarRail({
|
|
|
2725
2829
|
);
|
|
2726
2830
|
}
|
|
2727
2831
|
function SidebarMore({ className, ...props }) {
|
|
2728
|
-
return /* @__PURE__ */ (0,
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2729
2833
|
Button,
|
|
2730
2834
|
{
|
|
2731
2835
|
"aria-label": "M\xE1s opciones",
|
|
@@ -2733,34 +2837,34 @@ function SidebarMore({ className, ...props }) {
|
|
|
2733
2837
|
variant: "ghost",
|
|
2734
2838
|
className: cn("size-7", className),
|
|
2735
2839
|
...props,
|
|
2736
|
-
children: /* @__PURE__ */ (0,
|
|
2840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react15.Ellipsis, {})
|
|
2737
2841
|
}
|
|
2738
2842
|
);
|
|
2739
2843
|
}
|
|
2740
2844
|
|
|
2741
2845
|
// src/ui/skeleton/skeleton.tsx
|
|
2742
|
-
var
|
|
2846
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2743
2847
|
function Skeleton({ className, ...props }) {
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
2745
2849
|
}
|
|
2746
2850
|
|
|
2747
2851
|
// src/ui/submit-button/submit-button.tsx
|
|
2748
2852
|
var import_react_dom = require("react-dom");
|
|
2749
|
-
var
|
|
2750
|
-
var
|
|
2853
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2854
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2751
2855
|
function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
|
|
2752
2856
|
const { pending } = (0, import_react_dom.useFormStatus)();
|
|
2753
2857
|
const busy = pending || loading;
|
|
2754
|
-
return /* @__PURE__ */ (0,
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react16.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2756
2860
|
pendingLabel
|
|
2757
2861
|
] }) : children });
|
|
2758
2862
|
}
|
|
2759
2863
|
|
|
2760
2864
|
// src/ui/switch/switch.tsx
|
|
2761
|
-
var
|
|
2762
|
-
var
|
|
2763
|
-
var
|
|
2865
|
+
var import_react13 = require("react");
|
|
2866
|
+
var import_react_aria_components27 = require("react-aria-components");
|
|
2867
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2764
2868
|
var switchSizes = {
|
|
2765
2869
|
sm: {
|
|
2766
2870
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -2800,9 +2904,9 @@ function Switch({
|
|
|
2800
2904
|
...props
|
|
2801
2905
|
}) {
|
|
2802
2906
|
const styles = switchSizes[size];
|
|
2803
|
-
const fallbackInputRef = (0,
|
|
2907
|
+
const fallbackInputRef = (0, import_react13.useRef)(null);
|
|
2804
2908
|
const resolvedInputRef = inputRef ?? fallbackInputRef;
|
|
2805
|
-
(0,
|
|
2909
|
+
(0, import_react13.useEffect)(() => {
|
|
2806
2910
|
const input = resolvedInputRef.current;
|
|
2807
2911
|
if (!input) return;
|
|
2808
2912
|
const handleDirectionalKey = (event) => {
|
|
@@ -2816,8 +2920,8 @@ function Switch({
|
|
|
2816
2920
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
2817
2921
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
2818
2922
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
2819
|
-
return /* @__PURE__ */ (0,
|
|
2820
|
-
|
|
2923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2924
|
+
import_react_aria_components27.Switch,
|
|
2821
2925
|
{
|
|
2822
2926
|
"data-slot": "switch",
|
|
2823
2927
|
"data-size": size,
|
|
@@ -2833,8 +2937,8 @@ function Switch({
|
|
|
2833
2937
|
children: (state) => {
|
|
2834
2938
|
const isThumbActive = state.isHovered || state.isPressed;
|
|
2835
2939
|
const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
2836
|
-
return /* @__PURE__ */ (0,
|
|
2837
|
-
/* @__PURE__ */ (0,
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2838
2942
|
"span",
|
|
2839
2943
|
{
|
|
2840
2944
|
"aria-hidden": "true",
|
|
@@ -2848,7 +2952,7 @@ function Switch({
|
|
|
2848
2952
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
2849
2953
|
styles.control
|
|
2850
2954
|
),
|
|
2851
|
-
children: /* @__PURE__ */ (0,
|
|
2955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2852
2956
|
"span",
|
|
2853
2957
|
{
|
|
2854
2958
|
"data-slot": "switch-thumb",
|
|
@@ -2868,9 +2972,9 @@ function Switch({
|
|
|
2868
2972
|
)
|
|
2869
2973
|
}
|
|
2870
2974
|
),
|
|
2871
|
-
children || description ? /* @__PURE__ */ (0,
|
|
2872
|
-
children ? /* @__PURE__ */ (0,
|
|
2873
|
-
description ? /* @__PURE__ */ (0,
|
|
2975
|
+
children || description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
2976
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
2977
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
|
|
2874
2978
|
] }) : null
|
|
2875
2979
|
] });
|
|
2876
2980
|
}
|
|
@@ -2879,9 +2983,9 @@ function Switch({
|
|
|
2879
2983
|
}
|
|
2880
2984
|
|
|
2881
2985
|
// src/ui/table/table.tsx
|
|
2882
|
-
var
|
|
2986
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2883
2987
|
function Table({ className, ...props }) {
|
|
2884
|
-
return /* @__PURE__ */ (0,
|
|
2988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2885
2989
|
"table",
|
|
2886
2990
|
{
|
|
2887
2991
|
"data-slot": "table",
|
|
@@ -2891,10 +2995,10 @@ function Table({ className, ...props }) {
|
|
|
2891
2995
|
) });
|
|
2892
2996
|
}
|
|
2893
2997
|
function TableHeader({ className, ...props }) {
|
|
2894
|
-
return /* @__PURE__ */ (0,
|
|
2998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
2895
2999
|
}
|
|
2896
3000
|
function TableBody({ className, ...props }) {
|
|
2897
|
-
return /* @__PURE__ */ (0,
|
|
3001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2898
3002
|
"tbody",
|
|
2899
3003
|
{
|
|
2900
3004
|
"data-slot": "table-body",
|
|
@@ -2904,7 +3008,7 @@ function TableBody({ className, ...props }) {
|
|
|
2904
3008
|
);
|
|
2905
3009
|
}
|
|
2906
3010
|
function TableRow({ className, ...props }) {
|
|
2907
|
-
return /* @__PURE__ */ (0,
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2908
3012
|
"tr",
|
|
2909
3013
|
{
|
|
2910
3014
|
"data-slot": "table-row",
|
|
@@ -2917,7 +3021,7 @@ function TableRow({ className, ...props }) {
|
|
|
2917
3021
|
);
|
|
2918
3022
|
}
|
|
2919
3023
|
function TableHead({ className, ...props }) {
|
|
2920
|
-
return /* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2921
3025
|
"th",
|
|
2922
3026
|
{
|
|
2923
3027
|
"data-slot": "table-head",
|
|
@@ -2930,7 +3034,7 @@ function TableHead({ className, ...props }) {
|
|
|
2930
3034
|
);
|
|
2931
3035
|
}
|
|
2932
3036
|
function TableCell({ className, ...props }) {
|
|
2933
|
-
return /* @__PURE__ */ (0,
|
|
3037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2934
3038
|
"td",
|
|
2935
3039
|
{
|
|
2936
3040
|
"data-slot": "table-cell",
|
|
@@ -2940,7 +3044,7 @@ function TableCell({ className, ...props }) {
|
|
|
2940
3044
|
);
|
|
2941
3045
|
}
|
|
2942
3046
|
function TableCaption({ className, ...props }) {
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
3047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2944
3048
|
"caption",
|
|
2945
3049
|
{
|
|
2946
3050
|
"data-slot": "table-caption",
|
|
@@ -2950,7 +3054,7 @@ function TableCaption({ className, ...props }) {
|
|
|
2950
3054
|
);
|
|
2951
3055
|
}
|
|
2952
3056
|
function TableFooter({ className, ...props }) {
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2954
3058
|
"tfoot",
|
|
2955
3059
|
{
|
|
2956
3060
|
"data-slot": "table-footer",
|
|
@@ -2961,28 +3065,28 @@ function TableFooter({ className, ...props }) {
|
|
|
2961
3065
|
}
|
|
2962
3066
|
|
|
2963
3067
|
// src/ui/tabs/tabs.tsx
|
|
2964
|
-
var
|
|
2965
|
-
var
|
|
3068
|
+
var import_react_aria_components28 = require("react-aria-components");
|
|
3069
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2966
3070
|
function Tabs({ className, ...props }) {
|
|
2967
|
-
return /* @__PURE__ */ (0,
|
|
3071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components28.Tabs, { "data-slot": "tabs", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("flex flex-col gap-2", value)), ...props });
|
|
2968
3072
|
}
|
|
2969
3073
|
function TabsList({ className, ...props }) {
|
|
2970
|
-
return /* @__PURE__ */ (0,
|
|
3074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components28.TabList, { "data-slot": "tabs-list", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
|
|
2971
3075
|
}
|
|
2972
3076
|
function TabsTrigger({ className, ...props }) {
|
|
2973
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components28.Tab, { "data-slot": "tabs-trigger", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", value)), ...props });
|
|
2974
3078
|
}
|
|
2975
3079
|
function TabsPanels({ className, ...props }) {
|
|
2976
|
-
return /* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components28.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
2977
3081
|
}
|
|
2978
3082
|
function TabsContent({ className, ...props }) {
|
|
2979
|
-
return /* @__PURE__ */ (0,
|
|
3083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components28.TabPanel, { "data-slot": "tabs-content", className: (0, import_react_aria_components28.composeRenderProps)(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
|
|
2980
3084
|
}
|
|
2981
3085
|
|
|
2982
3086
|
// src/ui/toast/toast.tsx
|
|
2983
|
-
var
|
|
3087
|
+
var import_react14 = require("react");
|
|
2984
3088
|
var import_sileo = require("sileo");
|
|
2985
|
-
var
|
|
3089
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2986
3090
|
function toSileoOptions({ title, description, duration, position, action }) {
|
|
2987
3091
|
return {
|
|
2988
3092
|
title,
|
|
@@ -3021,21 +3125,21 @@ function useToast() {
|
|
|
3021
3125
|
return toast;
|
|
3022
3126
|
}
|
|
3023
3127
|
function ToastProvider({ children }) {
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
3025
3129
|
children,
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Toaster, {})
|
|
3027
3131
|
] });
|
|
3028
3132
|
}
|
|
3029
3133
|
function Toaster({ position }) {
|
|
3030
|
-
return /* @__PURE__ */ (0,
|
|
3134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_sileo.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
3031
3135
|
}
|
|
3032
3136
|
function ToastViewport({ position, visiblePosition, className }) {
|
|
3033
3137
|
void className;
|
|
3034
3138
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
3035
|
-
return /* @__PURE__ */ (0,
|
|
3139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Toaster, { position });
|
|
3036
3140
|
}
|
|
3037
3141
|
function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
|
|
3038
|
-
(0,
|
|
3142
|
+
(0, import_react14.useEffect)(() => {
|
|
3039
3143
|
if (state !== "open") return;
|
|
3040
3144
|
const toastId = create({ title, description, variant, action, duration, position });
|
|
3041
3145
|
return () => {
|
|
@@ -3047,15 +3151,15 @@ function Toast({ id, title, description, variant = "default", action, state = "o
|
|
|
3047
3151
|
}
|
|
3048
3152
|
|
|
3049
3153
|
// src/ui/toolbar/toolbar.tsx
|
|
3050
|
-
var
|
|
3154
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3051
3155
|
function Toolbar({ className, ...props }) {
|
|
3052
|
-
return /* @__PURE__ */ (0,
|
|
3156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
3053
3157
|
}
|
|
3054
3158
|
function ToolbarGroup({ className, ...props }) {
|
|
3055
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
|
|
3056
3160
|
}
|
|
3057
3161
|
function ToolbarSpacer({ className, ...props }) {
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
3059
3163
|
}
|
|
3060
3164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3061
3165
|
0 && (module.exports = {
|
|
@@ -3111,6 +3215,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3111
3215
|
CommandItem,
|
|
3112
3216
|
CommandList,
|
|
3113
3217
|
ConfirmDialog,
|
|
3218
|
+
DangerZone,
|
|
3114
3219
|
Dialog,
|
|
3115
3220
|
DialogClose,
|
|
3116
3221
|
DialogContent,
|
|
@@ -3121,6 +3226,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
3121
3226
|
DialogPortal,
|
|
3122
3227
|
DialogTitle,
|
|
3123
3228
|
DialogTrigger,
|
|
3229
|
+
DocPreview,
|
|
3124
3230
|
Drawer,
|
|
3125
3231
|
DrawerDescription,
|
|
3126
3232
|
DrawerFooter,
|