@doscientos/ui 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,43 @@
1
1
  "use client";
2
2
 
3
+ // src/hooks/use-async-action.ts
4
+ import { useCallback, useRef, useState } from "react";
5
+ function useAsyncAction(action) {
6
+ const [status, setStatus] = useState("idle");
7
+ const [error, setError] = useState(null);
8
+ const [data, setData] = useState(null);
9
+ const pendingRef = useRef(false);
10
+ const run = useCallback(
11
+ async (...args) => {
12
+ if (pendingRef.current) return null;
13
+ pendingRef.current = true;
14
+ setStatus("pending");
15
+ setError(null);
16
+ try {
17
+ const result = await action(...args);
18
+ setData(result);
19
+ setStatus("success");
20
+ return result;
21
+ } catch (cause) {
22
+ setError(cause instanceof Error ? cause : new Error("La acci\xF3n no se pudo completar."));
23
+ setStatus("error");
24
+ return null;
25
+ } finally {
26
+ pendingRef.current = false;
27
+ }
28
+ },
29
+ [action]
30
+ );
31
+ const reset = useCallback(() => {
32
+ setData(null);
33
+ setError(null);
34
+ setStatus("idle");
35
+ }, []);
36
+ return { data, error, isPending: status === "pending", reset, run, status };
37
+ }
38
+
3
39
  // src/hooks/use-autosave.ts
4
- import { useCallback, useEffect, useRef, useState } from "react";
40
+ import { useCallback as useCallback2, useEffect, useRef as useRef2, useState as useState2 } from "react";
5
41
  function useAutosave({
6
42
  data,
7
43
  onSave,
@@ -9,23 +45,27 @@ function useAutosave({
9
45
  enabled = true,
10
46
  serialize = JSON.stringify
11
47
  }) {
12
- const [status, setStatus] = useState("idle");
13
- const [error, setError] = useState(null);
14
- const lastSaved = useRef(null);
15
- const saveRef = useRef(onSave);
16
- const serializeRef = useRef(serialize);
48
+ const [status, setStatus] = useState2("idle");
49
+ const [error, setError] = useState2(null);
50
+ const lastSaved = useRef2(null);
51
+ const saveRef = useRef2(onSave);
52
+ const serializeRef = useRef2(serialize);
53
+ const latestSaveId = useRef2(0);
17
54
  useEffect(() => {
18
55
  saveRef.current = onSave;
19
56
  serializeRef.current = serialize;
20
57
  }, [onSave, serialize]);
21
- const save = useCallback(async (value) => {
58
+ const save = useCallback2(async (value) => {
59
+ const saveId = ++latestSaveId.current;
22
60
  setStatus("saving");
23
61
  setError(null);
24
62
  try {
25
63
  await saveRef.current(value);
64
+ if (saveId !== latestSaveId.current) return;
26
65
  lastSaved.current = serializeRef.current(value);
27
66
  setStatus("saved");
28
67
  } catch (cause) {
68
+ if (saveId !== latestSaveId.current) return;
29
69
  setError(cause instanceof Error ? cause : new Error("No se pudo guardar."));
30
70
  setStatus("error");
31
71
  }
@@ -44,11 +84,49 @@ function useAutosave({
44
84
  return { status, error, saveNow: () => save(data) };
45
85
  }
46
86
 
87
+ // src/hooks/use-clipboard.ts
88
+ import { useCallback as useCallback3, useEffect as useEffect2, useRef as useRef3, useState as useState3 } from "react";
89
+ function useClipboard({
90
+ resetMs = 1500,
91
+ onError
92
+ } = {}) {
93
+ const [status, setStatus] = useState3("idle");
94
+ const [error, setError] = useState3(null);
95
+ const timeoutRef = useRef3(null);
96
+ useEffect2(
97
+ () => () => {
98
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
99
+ },
100
+ []
101
+ );
102
+ const copy = useCallback3(
103
+ async (value) => {
104
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
105
+ try {
106
+ if (!navigator.clipboard?.writeText) throw new Error("El portapapeles no est\xE1 disponible.");
107
+ await navigator.clipboard.writeText(value);
108
+ setError(null);
109
+ setStatus("copied");
110
+ timeoutRef.current = setTimeout(() => setStatus("idle"), resetMs);
111
+ return true;
112
+ } catch (cause) {
113
+ const nextError = cause instanceof Error ? cause : new Error("No se pudo copiar.");
114
+ setError(nextError);
115
+ setStatus("error");
116
+ onError?.(nextError);
117
+ return false;
118
+ }
119
+ },
120
+ [onError, resetMs]
121
+ );
122
+ return { copy, error, status };
123
+ }
124
+
47
125
  // src/hooks/use-debounced-value.ts
48
- import { useEffect as useEffect2, useState as useState2 } from "react";
126
+ import { useEffect as useEffect3, useState as useState4 } from "react";
49
127
  function useDebouncedValue(value, delay = 250) {
50
- const [debouncedValue, setDebouncedValue] = useState2(value);
51
- useEffect2(() => {
128
+ const [debouncedValue, setDebouncedValue] = useState4(value);
129
+ useEffect3(() => {
52
130
  const timeout = window.setTimeout(() => setDebouncedValue(value), delay);
53
131
  return () => window.clearTimeout(timeout);
54
132
  }, [delay, value]);
@@ -56,7 +134,7 @@ function useDebouncedValue(value, delay = 250) {
56
134
  }
57
135
 
58
136
  // src/hooks/use-form-dirty.ts
59
- import { useCallback as useCallback2, useRef as useRef2, useState as useState3 } from "react";
137
+ import { useCallback as useCallback4, useRef as useRef4, useState as useState5 } from "react";
60
138
  function formSnapshot(form) {
61
139
  const entries = Array.from(new FormData(form), ([key, value]) => [
62
140
  key,
@@ -66,21 +144,21 @@ function formSnapshot(form) {
66
144
  return JSON.stringify(entries);
67
145
  }
68
146
  function useFormDirty() {
69
- const formElement = useRef2(null);
70
- const baseline = useRef2(null);
71
- const [isDirty, setIsDirty] = useState3(false);
72
- const recompute = useCallback2(() => {
147
+ const formElement = useRef4(null);
148
+ const baseline = useRef4(null);
149
+ const [isDirty, setIsDirty] = useState5(false);
150
+ const recompute = useCallback4(() => {
73
151
  if (formElement.current && baseline.current !== null) {
74
152
  setIsDirty(formSnapshot(formElement.current) !== baseline.current);
75
153
  }
76
154
  }, []);
77
- const reset = useCallback2(() => {
155
+ const reset = useCallback4(() => {
78
156
  if (formElement.current) {
79
157
  baseline.current = formSnapshot(formElement.current);
80
158
  setIsDirty(false);
81
159
  }
82
160
  }, []);
83
- const formRef = useCallback2(
161
+ const formRef = useCallback4(
84
162
  (form) => {
85
163
  if (formElement.current) {
86
164
  formElement.current.removeEventListener("input", recompute);
@@ -112,6 +190,52 @@ function cn(...inputs) {
112
190
  return twMerge(clsx(inputs));
113
191
  }
114
192
 
193
+ // src/lib/search-params.ts
194
+ function toSearchParams(input = "") {
195
+ if (typeof input === "string" || input instanceof URLSearchParams)
196
+ return new URLSearchParams(input);
197
+ if (Object.getPrototypeOf(input) === Object.prototype) {
198
+ const params = new URLSearchParams();
199
+ for (const [key, value] of Object.entries(input)) {
200
+ for (const item of Array.isArray(value) ? value : [value]) {
201
+ if (item !== void 0) params.append(key, item);
202
+ }
203
+ }
204
+ return params;
205
+ }
206
+ return new URLSearchParams(input.toString());
207
+ }
208
+ function updateSearchParams(current, updates) {
209
+ const params = toSearchParams(current);
210
+ for (const [key, value] of Object.entries(updates)) {
211
+ params.delete(key);
212
+ if (value === null || value === void 0 || value === "") continue;
213
+ for (const item of Array.isArray(value) ? value : [value]) {
214
+ if (item !== "") params.append(key, String(item));
215
+ }
216
+ }
217
+ return params;
218
+ }
219
+ function readSearchParam(params, key, fallback = "") {
220
+ return toSearchParams(params).get(key)?.trim() || fallback;
221
+ }
222
+ function readSearchParamArray(params, key) {
223
+ return toSearchParams(params).getAll(key).map((value) => value.trim()).filter(Boolean);
224
+ }
225
+ function readSearchParamInt(params, key, fallback = 1, options = {}) {
226
+ const rawValue = readSearchParam(params, key);
227
+ if (!rawValue) return fallback;
228
+ const value = Number(rawValue);
229
+ if (!Number.isSafeInteger(value)) return fallback;
230
+ const min = options.min ?? Number.NEGATIVE_INFINITY;
231
+ const max = options.max ?? Number.POSITIVE_INFINITY;
232
+ return value >= min && value <= max ? value : fallback;
233
+ }
234
+ function readSearchParamEnum(params, key, values, fallback) {
235
+ const value = readSearchParam(params, key);
236
+ return values.includes(value) ? value : fallback;
237
+ }
238
+
115
239
  // src/lib/text-match.ts
116
240
  function normalize(value) {
117
241
  return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase();
@@ -244,7 +368,7 @@ import "react";
244
368
  import "react-aria-components";
245
369
 
246
370
  // src/ui/button/button.tsx
247
- import { useState as useState4 } from "react";
371
+ import { useState as useState6 } from "react";
248
372
  import {
249
373
  Button as ButtonPrimitive,
250
374
  Link as LinkPrimitive
@@ -301,7 +425,7 @@ function getRipplePosition(event) {
301
425
  };
302
426
  }
303
427
  function useActionRipple(enabled) {
304
- const [ripple, setRipple] = useState4(null);
428
+ const [ripple, setRipple] = useState6(null);
305
429
  function triggerRipple(event) {
306
430
  if (!enabled) return;
307
431
  const position = getRipplePosition(event);
@@ -812,7 +936,7 @@ function AppShellContent({
812
936
  }
813
937
 
814
938
  // src/ui/avatar/avatar.tsx
815
- import { createContext as createContext2, useContext as useContext2, useEffect as useEffect3, useState as useState6 } from "react";
939
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect4, useState as useState8 } from "react";
816
940
  import { jsx as jsx7 } from "react/jsx-runtime";
817
941
  var sizes = {
818
942
  xs: "size-5 text-[10px]",
@@ -822,7 +946,7 @@ var sizes = {
822
946
  };
823
947
  var AvatarContext = createContext2(null);
824
948
  function Avatar({ className, size = "default", children, ...props }) {
825
- const [status, setStatus] = useState6("idle");
949
+ const [status, setStatus] = useState8("idle");
826
950
  return /* @__PURE__ */ jsx7(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ jsx7(
827
951
  "div",
828
952
  {
@@ -846,8 +970,8 @@ function AvatarImage({
846
970
  ...props
847
971
  }) {
848
972
  const avatar = useContext2(AvatarContext);
849
- const [failed, setFailed] = useState6(false);
850
- useEffect3(() => {
973
+ const [failed, setFailed] = useState8(false);
974
+ useEffect4(() => {
851
975
  setFailed(false);
852
976
  avatar?.setStatus(src ? "loading" : "idle");
853
977
  }, [avatar?.setStatus, src]);
@@ -1224,7 +1348,7 @@ function CardFooter({ className, ...props }) {
1224
1348
  }
1225
1349
 
1226
1350
  // src/ui/checkbox/checkbox.tsx
1227
- import { Check } from "lucide-react";
1351
+ import { Check, Minus } from "lucide-react";
1228
1352
  import {
1229
1353
  Checkbox as AriaCheckbox
1230
1354
  } from "react-aria-components";
@@ -1240,12 +1364,36 @@ function Checkbox({ className, children, ...props }) {
1240
1364
  ),
1241
1365
  ...props,
1242
1366
  children: (state) => /* @__PURE__ */ jsxs4(Fragment3, { children: [
1243
- /* @__PURE__ */ jsx13(
1367
+ /* @__PURE__ */ jsxs4(
1244
1368
  "span",
1245
1369
  {
1246
1370
  "aria-hidden": "true",
1247
- className: "border-border bg-background text-primary-foreground group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-ring/50 grid size-4 place-items-center rounded border transition-colors group-data-focus-visible:ring-3",
1248
- children: /* @__PURE__ */ jsx13(Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
1371
+ className: cn(
1372
+ "border-border bg-background text-primary-foreground group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-ring/50 grid size-4 place-items-center rounded border transition-colors group-data-focus-visible:ring-3",
1373
+ state.isIndeterminate && "border-primary bg-primary"
1374
+ ),
1375
+ children: [
1376
+ /* @__PURE__ */ jsx13(
1377
+ Minus,
1378
+ {
1379
+ "data-slot": "checkbox-indeterminate",
1380
+ className: cn(
1381
+ "size-3 transition-opacity motion-reduce:transition-none",
1382
+ state.isIndeterminate ? "opacity-100" : "opacity-0"
1383
+ )
1384
+ }
1385
+ ),
1386
+ /* @__PURE__ */ jsx13(
1387
+ Check,
1388
+ {
1389
+ "data-slot": "checkbox-check",
1390
+ className: cn(
1391
+ "absolute size-3 transition-opacity motion-reduce:transition-none",
1392
+ state.isSelected && !state.isIndeterminate ? "opacity-100" : "opacity-0"
1393
+ )
1394
+ }
1395
+ )
1396
+ ]
1249
1397
  }
1250
1398
  ),
1251
1399
  typeof children === "function" ? children(state) : children
@@ -1328,7 +1476,7 @@ function CollapsibleContent({ children, ...props }) {
1328
1476
  }
1329
1477
 
1330
1478
  // src/ui/combobox/combobox.tsx
1331
- import { Fragment as Fragment4, useMemo, useState as useState8 } from "react";
1479
+ import { Fragment as Fragment4, useMemo, useState as useState10 } from "react";
1332
1480
  import {
1333
1481
  ComboBox as AriaComboBox,
1334
1482
  ComboBoxValue,
@@ -1340,6 +1488,11 @@ import {
1340
1488
  Popover,
1341
1489
  Text as Text2
1342
1490
  } from "react-aria-components";
1491
+
1492
+ // src/lib/floating-surface.ts
1493
+ var floatingSurfaceClassName = "z-50 max-w-[calc(100vw-2rem)] shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out";
1494
+
1495
+ // src/ui/combobox/combobox.tsx
1343
1496
  import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
1344
1497
  var Combobox = AriaComboBox;
1345
1498
  function ComboboxInput({ className, ...props }) {
@@ -1361,7 +1514,8 @@ function ComboboxContent({ className, ...props }) {
1361
1514
  {
1362
1515
  "data-slot": "combobox-content",
1363
1516
  className: cn(
1364
- "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
1517
+ floatingSurfaceClassName,
1518
+ "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
1365
1519
  className
1366
1520
  ),
1367
1521
  ...props
@@ -1433,10 +1587,10 @@ function AutocompleteCombobox({
1433
1587
  suggestion = true,
1434
1588
  placeholder,
1435
1589
  className,
1436
- onKeyDown: _onKeyDown,
1590
+ onKeyDown,
1437
1591
  ...props
1438
1592
  }) {
1439
- const [internalInputValue, setInternalInputValue] = useState8("");
1593
+ const [internalInputValue, setInternalInputValue] = useState10("");
1440
1594
  const inputValue = controlledInputValue ?? internalInputValue;
1441
1595
  const setInputValue = (value) => {
1442
1596
  setInternalInputValue(value);
@@ -1461,6 +1615,8 @@ function AutocompleteCombobox({
1461
1615
  return true;
1462
1616
  };
1463
1617
  const handleKeyDown = (event) => {
1618
+ onKeyDown?.(event);
1619
+ if (event.defaultPrevented) return;
1464
1620
  if ((event.key === "Tab" || event.key === "Enter") && acceptSuggestion()) event.preventDefault();
1465
1621
  };
1466
1622
  return /* @__PURE__ */ jsxs5(
@@ -1542,7 +1698,8 @@ function CommandContent({ className, ...props }) {
1542
1698
  {
1543
1699
  "data-slot": "command-content",
1544
1700
  className: cn(
1545
- "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none",
1701
+ floatingSurfaceClassName,
1702
+ "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
1546
1703
  className
1547
1704
  ),
1548
1705
  ...props
@@ -1576,261 +1733,609 @@ function CommandItem({ className, ...props }) {
1576
1733
  );
1577
1734
  }
1578
1735
 
1579
- // src/ui/confirm-dialog/confirm-dialog.tsx
1580
- import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
1581
- function ConfirmDialog({
1582
- open,
1583
- onOpenChange,
1584
- title,
1585
- description,
1586
- confirmLabel = "Confirmar",
1587
- cancelLabel = "Cancelar",
1588
- destructive = false,
1589
- pending = false,
1590
- onConfirm
1591
- }) {
1592
- return /* @__PURE__ */ jsx17(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(AlertDialogContent, { children: [
1593
- /* @__PURE__ */ jsxs6(AlertDialogHeader, { children: [
1594
- /* @__PURE__ */ jsx17(AlertDialogTitle, { children: title }),
1595
- description ? /* @__PURE__ */ jsx17(AlertDialogDescription, { children: description }) : null
1596
- ] }),
1597
- /* @__PURE__ */ jsxs6(AlertDialogFooter, { children: [
1598
- /* @__PURE__ */ jsx17(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
1599
- /* @__PURE__ */ jsx17(
1600
- Button,
1601
- {
1602
- variant: destructive ? "destructive" : "default",
1603
- isDisabled: pending,
1604
- onPress: onConfirm,
1605
- children: confirmLabel
1606
- }
1607
- )
1608
- ] })
1609
- ] }) });
1610
- }
1611
-
1612
- // src/ui/danger-zone/danger-zone.tsx
1613
- import { ChevronDown, ShieldAlert } from "lucide-react";
1736
+ // src/ui/sheet/sheet.tsx
1737
+ import { XIcon as XIcon2 } from "lucide-react";
1614
1738
  import {
1615
- Button as DisclosureButton,
1616
- Disclosure,
1617
- DisclosurePanel,
1618
- Heading as Heading2
1739
+ Dialog as DrawerPrimitive,
1740
+ DialogTrigger as DrawerTriggerPrimitive,
1741
+ Heading as Heading2,
1742
+ ModalOverlay as ModalOverlayPrimitive,
1743
+ Modal as ModalPrimitive,
1744
+ Text as Text3
1619
1745
  } from "react-aria-components";
1620
- import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
1621
- function DangerZone({
1622
- title = "Zona de peligro",
1623
- description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
1624
- defaultOpen = false,
1625
- className,
1626
- children
1627
- }) {
1628
- return /* @__PURE__ */ jsx18(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs7(Card, { className: cn("border-destructive/30", className), children: [
1629
- /* @__PURE__ */ jsx18(Heading2, { className: "flex", children: /* @__PURE__ */ jsxs7(
1630
- DisclosureButton,
1631
- {
1632
- slot: "trigger",
1633
- "data-slot": "danger-zone-trigger",
1634
- className: "group/danger focus-visible:ring-ring/50 flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3",
1635
- children: [
1636
- /* @__PURE__ */ jsx18(ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
1637
- /* @__PURE__ */ jsxs7("span", { className: "flex flex-1 flex-col gap-0.5", children: [
1638
- /* @__PURE__ */ jsx18("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
1639
- /* @__PURE__ */ jsx18("span", { className: "text-muted-foreground text-xs", children: description })
1640
- ] }),
1641
- /* @__PURE__ */ jsx18(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
1642
- ]
1643
- }
1644
- ) }),
1645
- /* @__PURE__ */ jsx18(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx18(CardContent, { children }) })
1646
- ] }) });
1746
+ import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
1747
+ function DrawerTrigger({ ...props }) {
1748
+ return /* @__PURE__ */ jsx17(DrawerTriggerPrimitive, { "data-slot": "drawer-trigger", ...props });
1647
1749
  }
1648
-
1649
- // src/ui/doc-preview/doc-preview.tsx
1650
- import { FileText, Image } from "lucide-react";
1651
- import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
1652
- function DocPreview({ url, mimeType, name }) {
1653
- if (!url) return /* @__PURE__ */ jsx19(Fallback, { mimeType, reason: "no-url" });
1654
- if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
1655
- return /* @__PURE__ */ jsx19(
1656
- "iframe",
1657
- {
1658
- src: url,
1659
- title: name,
1660
- className: "w-full rounded-sm border-0",
1661
- style: { height: "75vh", minHeight: 400 }
1662
- }
1663
- );
1664
- }
1665
- if (mimeType?.startsWith("image/")) {
1666
- return /* @__PURE__ */ jsx19("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ jsx19("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
1667
- }
1668
- return /* @__PURE__ */ jsx19(Fallback, { mimeType, reason: "unsupported" });
1750
+ function DrawerClose({ className, variant = "outline", size = "default", ...props }) {
1751
+ return /* @__PURE__ */ jsx17(
1752
+ Button,
1753
+ {
1754
+ slot: "close",
1755
+ "data-slot": "drawer-close",
1756
+ variant,
1757
+ size,
1758
+ className: cn(className),
1759
+ ...props
1760
+ }
1761
+ );
1669
1762
  }
1670
- function Fallback({
1671
- mimeType,
1672
- reason
1763
+ function DrawerOverlay({
1764
+ className,
1765
+ children,
1766
+ ...props
1673
1767
  }) {
1674
- const Icon = mimeType?.startsWith("image/") ? Image : FileText;
1675
- const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
1676
- return /* @__PURE__ */ jsxs8("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
1677
- /* @__PURE__ */ jsx19(Icon, { className: "size-9 opacity-30" }),
1678
- /* @__PURE__ */ jsx19("p", { className: "text-sm", children: message }),
1679
- mimeType ? /* @__PURE__ */ jsx19("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
1680
- /* @__PURE__ */ jsx19("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
1681
- ] });
1682
- }
1683
-
1684
- // src/ui/dropdown-menu/dropdown-menu.tsx
1685
- import { cva as cva6 } from "class-variance-authority";
1686
- import { CheckIcon, ChevronRightIcon } from "lucide-react";
1687
- import "react";
1688
- import {
1689
- composeRenderProps,
1690
- Header as HeaderPrimitive,
1691
- MenuItem as MenuItemPrimitive,
1692
- Menu as MenuPrimitive,
1693
- MenuSection as MenuSectionPrimitive,
1694
- MenuTrigger as MenuTriggerPrimitive,
1695
- Popover as PopoverPrimitive,
1696
- Separator as SeparatorPrimitive2,
1697
- SubmenuTrigger as SubmenuTriggerPrimitive
1698
- } from "react-aria-components";
1699
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
1700
- function DropdownMenuTrigger({ ...props }) {
1701
- return /* @__PURE__ */ jsx20(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
1768
+ return /* @__PURE__ */ jsx17(
1769
+ ModalOverlayPrimitive,
1770
+ {
1771
+ "data-slot": "drawer-overlay",
1772
+ isDismissable: true,
1773
+ className: cn(
1774
+ "fixed inset-0 z-50 bg-black/10 motion-safe:transition-opacity motion-safe:duration-150 motion-safe:data-entering:opacity-0 motion-safe:data-exiting:opacity-0 motion-reduce:transition-none supports-backdrop-filter:backdrop-blur-xs",
1775
+ className
1776
+ ),
1777
+ ...props,
1778
+ children
1779
+ }
1780
+ );
1702
1781
  }
1703
- function DropdownMenuContent({
1704
- "data-slot": dataSlot = "dropdown-menu-content",
1705
- placement = "bottom start",
1706
- offset = 4,
1707
- crossOffset = 0,
1782
+ function DrawerContent({
1708
1783
  className,
1709
1784
  children,
1785
+ dialogProps,
1786
+ side = "right",
1787
+ showCloseButton = true,
1710
1788
  ...props
1711
1789
  }) {
1712
- return /* @__PURE__ */ jsx20(
1713
- PopoverPrimitive,
1790
+ return /* @__PURE__ */ jsx17(DrawerOverlay, { ...props, children: /* @__PURE__ */ jsx17(
1791
+ ModalPrimitive,
1714
1792
  {
1715
- "data-slot": dataSlot,
1716
- placement,
1717
- offset,
1718
- crossOffset,
1793
+ "data-slot": "drawer-content",
1794
+ "data-side": side,
1719
1795
  className: cn(
1720
- "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",
1796
+ "fixed z-50 flex max-h-svh flex-col gap-4 border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg motion-safe:transition motion-safe:duration-200 motion-safe:ease-in-out motion-safe:data-entering:opacity-0 motion-safe:data-exiting:opacity-0 motion-reduce:transition-none data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:pb-[env(safe-area-inset-bottom)] motion-safe:data-[side=bottom]:data-entering:translate-y-10 motion-safe: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 motion-safe:data-[side=left]:data-entering:-translate-x-10 motion-safe: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 motion-safe:data-[side=right]:data-entering:translate-x-10 motion-safe: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]:pt-[env(safe-area-inset-top)] motion-safe:data-[side=top]:data-entering:-translate-y-10 motion-safe:data-[side=top]:data-exiting:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
1721
1797
  className
1722
1798
  ),
1723
- children: /* @__PURE__ */ jsx20(
1724
- MenuPrimitive,
1799
+ children: /* @__PURE__ */ jsxs6(
1800
+ DrawerPrimitive,
1725
1801
  {
1726
- className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
1727
- ...props,
1728
- children
1802
+ "data-slot": "drawer",
1803
+ className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
1804
+ ...dialogProps,
1805
+ children: [
1806
+ children,
1807
+ showCloseButton && /* @__PURE__ */ jsxs6(DrawerClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
1808
+ /* @__PURE__ */ jsx17(XIcon2, {}),
1809
+ /* @__PURE__ */ jsx17("span", { className: "sr-only", children: "Cerrar" })
1810
+ ] })
1811
+ ]
1729
1812
  }
1730
1813
  )
1731
1814
  }
1732
- );
1815
+ ) });
1733
1816
  }
1734
- function DropdownMenu(props) {
1735
- if (!("trigger" in props)) return /* @__PURE__ */ jsx20(DropdownMenuContent, { ...props });
1817
+ function Drawer(props) {
1818
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx17(DrawerContent, { ...props });
1736
1819
  const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
1737
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx20(Button, { ...triggerProps, children: trigger }) : trigger;
1738
- return /* @__PURE__ */ jsxs9(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
1820
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx17(Button, { ...triggerProps, children: trigger }) : trigger;
1821
+ return /* @__PURE__ */ jsxs6(DrawerTrigger, { defaultOpen, isOpen, onOpenChange, children: [
1739
1822
  triggerElement,
1740
- /* @__PURE__ */ jsx20(DropdownMenuContent, { ...contentProps, children })
1823
+ /* @__PURE__ */ jsx17(DrawerContent, { ...contentProps, children })
1741
1824
  ] });
1742
1825
  }
1743
- function DropdownMenuGroup({
1744
- ...props
1745
- }) {
1746
- return /* @__PURE__ */ jsx20(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
1747
- }
1748
- function DropdownMenuLabel({
1749
- className,
1750
- inset,
1751
- ...props
1752
- }) {
1753
- return /* @__PURE__ */ jsx20(
1754
- HeaderPrimitive,
1826
+ function DrawerHeader({ className, ...props }) {
1827
+ return /* @__PURE__ */ jsx17(
1828
+ "div",
1755
1829
  {
1756
- "data-slot": "dropdown-menu-label",
1757
- "data-inset": inset,
1758
- className: cn(
1759
- "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
1760
- className
1761
- ),
1830
+ "data-slot": "drawer-header",
1831
+ className: cn("flex flex-col gap-0.5 p-4", className),
1762
1832
  ...props
1763
1833
  }
1764
1834
  );
1765
1835
  }
1766
- var dropdownMenuItemVariants = cva6(
1767
- "group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1768
- {
1769
- variants: {
1770
- selectionMode: {
1771
- none: "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-muted focus:text-foreground not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
1772
- single: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4",
1773
- multiple: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4"
1774
- }
1775
- }
1776
- }
1777
- );
1778
- function DropdownMenuItem({
1779
- className,
1780
- inset,
1781
- variant = "default",
1782
- children,
1783
- ...props
1784
- }) {
1785
- return /* @__PURE__ */ jsx20(
1786
- MenuItemPrimitive,
1836
+ function DrawerFooter({ className, ...props }) {
1837
+ return /* @__PURE__ */ jsx17(
1838
+ "div",
1787
1839
  {
1788
- "data-slot": "dropdown-menu-item",
1789
- "data-inset": inset,
1790
- "data-variant": variant,
1791
- textValue: typeof children === "string" ? children : props.textValue,
1792
- className: composeRenderProps(
1793
- className,
1794
- (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
1795
- ),
1796
- ...props,
1797
- children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs9(Fragment5, { children: [
1798
- selectionMode !== "none" ? /* @__PURE__ */ jsx20(
1799
- "span",
1800
- {
1801
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
1802
- "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
1803
- children: isSelected ? /* @__PURE__ */ jsx20(CheckIcon, {}) : null
1804
- }
1805
- ) : null,
1806
- children2
1807
- ] }))
1840
+ "data-slot": "drawer-footer",
1841
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
1842
+ ...props
1808
1843
  }
1809
1844
  );
1810
1845
  }
1811
- function DropdownMenuSub({ ...props }) {
1812
- return /* @__PURE__ */ jsx20(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
1846
+ function DrawerTitle({ className, ...props }) {
1847
+ return /* @__PURE__ */ jsx17(
1848
+ Heading2,
1849
+ {
1850
+ slot: "title",
1851
+ "data-slot": "drawer-title",
1852
+ className: cn("text-base font-medium text-foreground", className),
1853
+ ...props
1854
+ }
1855
+ );
1813
1856
  }
1814
- function DropdownMenuSubTrigger({
1857
+ function DrawerDescription({
1815
1858
  className,
1816
- inset,
1817
- children,
1818
1859
  ...props
1819
1860
  }) {
1820
- return /* @__PURE__ */ jsx20(
1821
- MenuItemPrimitive,
1861
+ return /* @__PURE__ */ jsx17(
1862
+ Text3,
1822
1863
  {
1823
- "data-slot": "dropdown-menu-sub-trigger",
1824
- "data-inset": inset,
1825
- textValue: typeof children === "string" ? children : props.textValue,
1864
+ slot: "description",
1865
+ "data-slot": "drawer-description",
1866
+ className: cn("text-sm text-muted-foreground", className),
1867
+ ...props
1868
+ }
1869
+ );
1870
+ }
1871
+ var Sheet = DrawerContent;
1872
+ var SheetClose = DrawerClose;
1873
+ var SheetContent = DrawerContent;
1874
+ var SheetDescription = DrawerDescription;
1875
+ var SheetFooter = DrawerFooter;
1876
+ var SheetHeader = DrawerHeader;
1877
+ var SheetTitle = DrawerTitle;
1878
+ var SheetTrigger = DrawerTrigger;
1879
+
1880
+ // src/ui/composition/composition.tsx
1881
+ import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
1882
+ function FilterBar({ className, ...props }) {
1883
+ return /* @__PURE__ */ jsx18(
1884
+ "div",
1885
+ {
1886
+ "data-slot": "filter-bar",
1887
+ className: cn("flex flex-wrap items-center gap-2", className),
1888
+ ...props
1889
+ }
1890
+ );
1891
+ }
1892
+ function FilterGroup({ className, ...props }) {
1893
+ return /* @__PURE__ */ jsx18(
1894
+ "div",
1895
+ {
1896
+ "data-slot": "filter-group",
1897
+ className: cn("flex flex-wrap items-center gap-2", className),
1898
+ ...props
1899
+ }
1900
+ );
1901
+ }
1902
+ function ActiveFilters({ className, ...props }) {
1903
+ return /* @__PURE__ */ jsx18(
1904
+ "div",
1905
+ {
1906
+ "data-slot": "active-filters",
1907
+ "aria-label": "Filtros activos",
1908
+ className: cn("flex flex-wrap items-center gap-1.5", className),
1909
+ ...props
1910
+ }
1911
+ );
1912
+ }
1913
+ function FilterChip({
1914
+ children,
1915
+ onRemove,
1916
+ ...props
1917
+ }) {
1918
+ return /* @__PURE__ */ jsxs7(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
1919
+ children,
1920
+ " \xD7"
1921
+ ] });
1922
+ }
1923
+ function SelectionToolbar({
1924
+ count,
1925
+ className,
1926
+ children,
1927
+ ...props
1928
+ }) {
1929
+ return /* @__PURE__ */ jsxs7(
1930
+ "div",
1931
+ {
1932
+ "data-slot": "selection-toolbar",
1933
+ className: cn(
1934
+ "flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
1935
+ className
1936
+ ),
1937
+ ...props,
1938
+ children: [
1939
+ /* @__PURE__ */ jsxs7("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
1940
+ count,
1941
+ " seleccionados"
1942
+ ] }),
1943
+ /* @__PURE__ */ jsx18("div", { className: "flex items-center gap-2", children })
1944
+ ]
1945
+ }
1946
+ );
1947
+ }
1948
+ function DescriptionList({ className, ...props }) {
1949
+ return /* @__PURE__ */ jsx18(
1950
+ "dl",
1951
+ {
1952
+ "data-slot": "description-list",
1953
+ className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
1954
+ ...props
1955
+ }
1956
+ );
1957
+ }
1958
+ function DescriptionItem({ className, ...props }) {
1959
+ return /* @__PURE__ */ jsx18("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
1960
+ }
1961
+ function DescriptionTerm({ className, ...props }) {
1962
+ return /* @__PURE__ */ jsx18(
1963
+ "dt",
1964
+ {
1965
+ "data-slot": "description-term",
1966
+ className: cn("text-xs font-medium text-muted-foreground", className),
1967
+ ...props
1968
+ }
1969
+ );
1970
+ }
1971
+ function DescriptionDetails({ className, ...props }) {
1972
+ return /* @__PURE__ */ jsx18(
1973
+ "dd",
1974
+ {
1975
+ "data-slot": "description-details",
1976
+ className: cn("mt-1 wrap-break-word text-sm", className),
1977
+ ...props
1978
+ }
1979
+ );
1980
+ }
1981
+ function DataViewState({ className, ...props }) {
1982
+ return /* @__PURE__ */ jsx18(
1983
+ "section",
1984
+ {
1985
+ "data-slot": "data-view-state",
1986
+ className: cn(
1987
+ "flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
1988
+ className
1989
+ ),
1990
+ ...props
1991
+ }
1992
+ );
1993
+ }
1994
+ function DataViewStateTitle({ children, className, ...props }) {
1995
+ return /* @__PURE__ */ jsx18("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
1996
+ }
1997
+ function DataViewStateDescription({ className, ...props }) {
1998
+ return /* @__PURE__ */ jsx18(
1999
+ "p",
2000
+ {
2001
+ "data-slot": "data-view-state-description",
2002
+ className: cn("text-sm text-muted-foreground", className),
2003
+ ...props
2004
+ }
2005
+ );
2006
+ }
2007
+ function DataViewStateActions({ className, ...props }) {
2008
+ return /* @__PURE__ */ jsx18(
2009
+ "div",
2010
+ {
2011
+ "data-slot": "data-view-state-actions",
2012
+ className: cn("flex items-center gap-2", className),
2013
+ ...props
2014
+ }
2015
+ );
2016
+ }
2017
+ function MetricGrid({ className, ...props }) {
2018
+ return /* @__PURE__ */ jsx18(
2019
+ "div",
2020
+ {
2021
+ "data-slot": "metric-grid",
2022
+ className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
2023
+ ...props
2024
+ }
2025
+ );
2026
+ }
2027
+ function DetailDrawer({ children, ...props }) {
2028
+ return /* @__PURE__ */ jsx18(DrawerContent, { ...props, children });
2029
+ }
2030
+ function DetailDrawerBody({ className, ...props }) {
2031
+ return /* @__PURE__ */ jsx18(
2032
+ "div",
2033
+ {
2034
+ "data-slot": "detail-drawer-body",
2035
+ className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
2036
+ ...props
2037
+ }
2038
+ );
2039
+ }
2040
+
2041
+ // src/ui/confirm-dialog/confirm-dialog.tsx
2042
+ import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
2043
+ function ConfirmDialog({
2044
+ open,
2045
+ onOpenChange,
2046
+ title,
2047
+ description,
2048
+ confirmLabel = "Confirmar",
2049
+ cancelLabel = "Cancelar",
2050
+ destructive = false,
2051
+ pending = false,
2052
+ onConfirm
2053
+ }) {
2054
+ return /* @__PURE__ */ jsx19(
2055
+ AlertDialog,
2056
+ {
2057
+ open,
2058
+ onOpenChange: (nextOpen) => {
2059
+ if (!pending || nextOpen) onOpenChange(nextOpen);
2060
+ },
2061
+ children: /* @__PURE__ */ jsxs8(AlertDialogContent, { children: [
2062
+ /* @__PURE__ */ jsxs8(AlertDialogHeader, { children: [
2063
+ /* @__PURE__ */ jsx19(AlertDialogTitle, { children: title }),
2064
+ description ? /* @__PURE__ */ jsx19(AlertDialogDescription, { children: description }) : null
2065
+ ] }),
2066
+ /* @__PURE__ */ jsxs8(AlertDialogFooter, { children: [
2067
+ /* @__PURE__ */ jsx19(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
2068
+ /* @__PURE__ */ jsx19(
2069
+ Button,
2070
+ {
2071
+ variant: destructive ? "destructive" : "default",
2072
+ isDisabled: pending,
2073
+ onPress: onConfirm,
2074
+ children: confirmLabel
2075
+ }
2076
+ )
2077
+ ] })
2078
+ ] })
2079
+ }
2080
+ );
2081
+ }
2082
+
2083
+ // src/ui/copy-button/copy-button.tsx
2084
+ import { Check as Check2, Copy } from "lucide-react";
2085
+ import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
2086
+ function CopyButton({
2087
+ value,
2088
+ children,
2089
+ copiedLabel = "Copiado",
2090
+ resetMs,
2091
+ onCopied,
2092
+ onCopyError,
2093
+ ...props
2094
+ }) {
2095
+ const { copy, status } = useClipboard({ resetMs, onError: onCopyError });
2096
+ const copied = status === "copied";
2097
+ const label = copied ? copiedLabel : children ?? "Copiar";
2098
+ return /* @__PURE__ */ jsxs9(
2099
+ Button,
2100
+ {
2101
+ "aria-label": typeof label === "string" ? label : void 0,
2102
+ onPress: () => {
2103
+ void copy(value).then((wasCopied) => {
2104
+ if (wasCopied) onCopied?.(value);
2105
+ });
2106
+ },
2107
+ ...props,
2108
+ children: [
2109
+ copied ? /* @__PURE__ */ jsx20(Check2, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ jsx20(Copy, { "aria-hidden": "true", className: "size-3.5" }),
2110
+ label
2111
+ ]
2112
+ }
2113
+ );
2114
+ }
2115
+
2116
+ // src/ui/danger-zone/danger-zone.tsx
2117
+ import { ChevronDown, ShieldAlert } from "lucide-react";
2118
+ import {
2119
+ Button as DisclosureButton,
2120
+ Disclosure,
2121
+ DisclosurePanel,
2122
+ Heading as Heading3
2123
+ } from "react-aria-components";
2124
+ import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
2125
+ function DangerZone({
2126
+ title = "Zona de peligro",
2127
+ description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
2128
+ defaultOpen = false,
2129
+ className,
2130
+ children
2131
+ }) {
2132
+ return /* @__PURE__ */ jsx21(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs10(Card, { className: cn("border-destructive/30", className), children: [
2133
+ /* @__PURE__ */ jsx21(Heading3, { className: "flex", children: /* @__PURE__ */ jsxs10(
2134
+ DisclosureButton,
2135
+ {
2136
+ slot: "trigger",
2137
+ "data-slot": "danger-zone-trigger",
2138
+ className: "group/danger focus-visible:ring-ring/50 flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3",
2139
+ children: [
2140
+ /* @__PURE__ */ jsx21(ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
2141
+ /* @__PURE__ */ jsxs10("span", { className: "flex flex-1 flex-col gap-0.5", children: [
2142
+ /* @__PURE__ */ jsx21("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
2143
+ /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground text-xs", children: description })
2144
+ ] }),
2145
+ /* @__PURE__ */ jsx21(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
2146
+ ]
2147
+ }
2148
+ ) }),
2149
+ /* @__PURE__ */ jsx21(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx21(CardContent, { children }) })
2150
+ ] }) });
2151
+ }
2152
+
2153
+ // src/ui/doc-preview/doc-preview.tsx
2154
+ import { FileText, Image } from "lucide-react";
2155
+ import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
2156
+ function DocPreview({ url, mimeType, name }) {
2157
+ if (!url) return /* @__PURE__ */ jsx22(Fallback, { mimeType, reason: "no-url" });
2158
+ if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
2159
+ return /* @__PURE__ */ jsx22(
2160
+ "iframe",
2161
+ {
2162
+ src: url,
2163
+ title: name,
2164
+ className: "w-full rounded-sm border-0",
2165
+ style: { height: "75vh", minHeight: 400 }
2166
+ }
2167
+ );
2168
+ }
2169
+ if (mimeType?.startsWith("image/")) {
2170
+ return /* @__PURE__ */ jsx22("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ jsx22("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
2171
+ }
2172
+ return /* @__PURE__ */ jsx22(Fallback, { mimeType, reason: "unsupported" });
2173
+ }
2174
+ function Fallback({
2175
+ mimeType,
2176
+ reason
2177
+ }) {
2178
+ const Icon = mimeType?.startsWith("image/") ? Image : FileText;
2179
+ const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
2180
+ return /* @__PURE__ */ jsxs11("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
2181
+ /* @__PURE__ */ jsx22(Icon, { className: "size-9 opacity-30" }),
2182
+ /* @__PURE__ */ jsx22("p", { className: "text-sm", children: message }),
2183
+ mimeType ? /* @__PURE__ */ jsx22("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
2184
+ /* @__PURE__ */ jsx22("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
2185
+ ] });
2186
+ }
2187
+
2188
+ // src/ui/dropdown-menu/dropdown-menu.tsx
2189
+ import { cva as cva6 } from "class-variance-authority";
2190
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
2191
+ import "react";
2192
+ import {
2193
+ composeRenderProps,
2194
+ Header as HeaderPrimitive,
2195
+ MenuItem as MenuItemPrimitive,
2196
+ Menu as MenuPrimitive,
2197
+ MenuSection as MenuSectionPrimitive,
2198
+ MenuTrigger as MenuTriggerPrimitive,
2199
+ Popover as PopoverPrimitive,
2200
+ Separator as SeparatorPrimitive2,
2201
+ SubmenuTrigger as SubmenuTriggerPrimitive
2202
+ } from "react-aria-components";
2203
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
2204
+ function DropdownMenuTrigger({ ...props }) {
2205
+ return /* @__PURE__ */ jsx23(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
2206
+ }
2207
+ function DropdownMenuContent({
2208
+ "data-slot": dataSlot = "dropdown-menu-content",
2209
+ placement = "bottom start",
2210
+ offset = 4,
2211
+ crossOffset = 0,
2212
+ className,
2213
+ children,
2214
+ ...props
2215
+ }) {
2216
+ return /* @__PURE__ */ jsx23(
2217
+ PopoverPrimitive,
2218
+ {
2219
+ "data-slot": dataSlot,
2220
+ placement,
2221
+ offset,
2222
+ crossOffset,
2223
+ className: cn(
2224
+ floatingSurfaceClassName,
2225
+ "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",
2226
+ className
2227
+ ),
2228
+ children: /* @__PURE__ */ jsx23(
2229
+ MenuPrimitive,
2230
+ {
2231
+ className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
2232
+ ...props,
2233
+ children
2234
+ }
2235
+ )
2236
+ }
2237
+ );
2238
+ }
2239
+ function DropdownMenu(props) {
2240
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx23(DropdownMenuContent, { ...props });
2241
+ const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
2242
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx23(Button, { ...triggerProps, children: trigger }) : trigger;
2243
+ return /* @__PURE__ */ jsxs12(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
2244
+ triggerElement,
2245
+ /* @__PURE__ */ jsx23(DropdownMenuContent, { ...contentProps, children })
2246
+ ] });
2247
+ }
2248
+ function DropdownMenuGroup({
2249
+ ...props
2250
+ }) {
2251
+ return /* @__PURE__ */ jsx23(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
2252
+ }
2253
+ function DropdownMenuLabel({
2254
+ className,
2255
+ inset,
2256
+ ...props
2257
+ }) {
2258
+ return /* @__PURE__ */ jsx23(
2259
+ HeaderPrimitive,
2260
+ {
2261
+ "data-slot": "dropdown-menu-label",
2262
+ "data-inset": inset,
2263
+ className: cn(
2264
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
2265
+ className
2266
+ ),
2267
+ ...props
2268
+ }
2269
+ );
2270
+ }
2271
+ var dropdownMenuItemVariants = cva6(
2272
+ "group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
2273
+ {
2274
+ variants: {
2275
+ selectionMode: {
2276
+ none: "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-muted focus:text-foreground not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
2277
+ single: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4",
2278
+ multiple: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4"
2279
+ }
2280
+ }
2281
+ }
2282
+ );
2283
+ function DropdownMenuItem({
2284
+ className,
2285
+ inset,
2286
+ variant = "default",
2287
+ children,
2288
+ ...props
2289
+ }) {
2290
+ return /* @__PURE__ */ jsx23(
2291
+ MenuItemPrimitive,
2292
+ {
2293
+ "data-slot": "dropdown-menu-item",
2294
+ "data-inset": inset,
2295
+ "data-variant": variant,
2296
+ textValue: typeof children === "string" ? children : props.textValue,
2297
+ className: composeRenderProps(
2298
+ className,
2299
+ (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
2300
+ ),
2301
+ ...props,
2302
+ children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
2303
+ selectionMode !== "none" ? /* @__PURE__ */ jsx23(
2304
+ "span",
2305
+ {
2306
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
2307
+ "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
2308
+ children: isSelected ? /* @__PURE__ */ jsx23(CheckIcon, {}) : null
2309
+ }
2310
+ ) : null,
2311
+ children2
2312
+ ] }))
2313
+ }
2314
+ );
2315
+ }
2316
+ function DropdownMenuSub({ ...props }) {
2317
+ return /* @__PURE__ */ jsx23(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
2318
+ }
2319
+ function DropdownMenuSubTrigger({
2320
+ className,
2321
+ inset,
2322
+ children,
2323
+ ...props
2324
+ }) {
2325
+ return /* @__PURE__ */ jsx23(
2326
+ MenuItemPrimitive,
2327
+ {
2328
+ "data-slot": "dropdown-menu-sub-trigger",
2329
+ "data-inset": inset,
2330
+ textValue: typeof children === "string" ? children : props.textValue,
1826
2331
  className: cn(
1827
2332
  "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 data-open:bg-muted data-open:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1828
2333
  className
1829
2334
  ),
1830
2335
  ...props,
1831
- children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs9(Fragment5, { children: [
2336
+ children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
1832
2337
  children2,
1833
- /* @__PURE__ */ jsx20(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
2338
+ /* @__PURE__ */ jsx23(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
1834
2339
  ] }))
1835
2340
  }
1836
2341
  );
@@ -1842,7 +2347,7 @@ function DropdownMenuSubContent({
1842
2347
  className,
1843
2348
  ...props
1844
2349
  }) {
1845
- return /* @__PURE__ */ jsx20(
2350
+ return /* @__PURE__ */ jsx23(
1846
2351
  DropdownMenuContent,
1847
2352
  {
1848
2353
  "data-slot": "dropdown-menu-sub-content",
@@ -1861,7 +2366,7 @@ function DropdownMenuSeparator({
1861
2366
  className,
1862
2367
  ...props
1863
2368
  }) {
1864
- return /* @__PURE__ */ jsx20(
2369
+ return /* @__PURE__ */ jsx23(
1865
2370
  SeparatorPrimitive2,
1866
2371
  {
1867
2372
  "data-slot": "dropdown-menu-separator",
@@ -1871,7 +2376,7 @@ function DropdownMenuSeparator({
1871
2376
  );
1872
2377
  }
1873
2378
  function DropdownMenuShortcut({ className, ...props }) {
1874
- return /* @__PURE__ */ jsx20(
2379
+ return /* @__PURE__ */ jsx23(
1875
2380
  "span",
1876
2381
  {
1877
2382
  "data-slot": "dropdown-menu-shortcut",
@@ -1900,9 +2405,9 @@ var emptyStateMediaVariants = cva7(
1900
2405
  );
1901
2406
 
1902
2407
  // src/ui/empty-state/empty-state.tsx
1903
- import { jsx as jsx21 } from "react/jsx-runtime";
2408
+ import { jsx as jsx24 } from "react/jsx-runtime";
1904
2409
  function EmptyState({ className, ...props }) {
1905
- return /* @__PURE__ */ jsx21(
2410
+ return /* @__PURE__ */ jsx24(
1906
2411
  "div",
1907
2412
  {
1908
2413
  "data-slot": "empty-state",
@@ -1915,7 +2420,7 @@ function EmptyState({ className, ...props }) {
1915
2420
  );
1916
2421
  }
1917
2422
  function EmptyStateHeader({ className, ...props }) {
1918
- return /* @__PURE__ */ jsx21(
2423
+ return /* @__PURE__ */ jsx24(
1919
2424
  "div",
1920
2425
  {
1921
2426
  "data-slot": "empty-state-header",
@@ -1929,7 +2434,7 @@ function EmptyStateMedia({
1929
2434
  variant = "default",
1930
2435
  ...props
1931
2436
  }) {
1932
- return /* @__PURE__ */ jsx21(
2437
+ return /* @__PURE__ */ jsx24(
1933
2438
  "div",
1934
2439
  {
1935
2440
  "data-slot": "empty-state-media",
@@ -1940,7 +2445,7 @@ function EmptyStateMedia({
1940
2445
  );
1941
2446
  }
1942
2447
  function EmptyStateTitle({ className, children, ...props }) {
1943
- return /* @__PURE__ */ jsx21(
2448
+ return /* @__PURE__ */ jsx24(
1944
2449
  "h3",
1945
2450
  {
1946
2451
  "data-slot": "empty-state-title",
@@ -1951,7 +2456,7 @@ function EmptyStateTitle({ className, children, ...props }) {
1951
2456
  );
1952
2457
  }
1953
2458
  function EmptyStateDescription({ className, ...props }) {
1954
- return /* @__PURE__ */ jsx21(
2459
+ return /* @__PURE__ */ jsx24(
1955
2460
  "p",
1956
2461
  {
1957
2462
  "data-slot": "empty-state-description",
@@ -1964,7 +2469,7 @@ function EmptyStateDescription({ className, ...props }) {
1964
2469
  );
1965
2470
  }
1966
2471
  function EmptyStateContent({ className, ...props }) {
1967
- return /* @__PURE__ */ jsx21(
2472
+ return /* @__PURE__ */ jsx24(
1968
2473
  "div",
1969
2474
  {
1970
2475
  "data-slot": "empty-state-content",
@@ -1977,13 +2482,120 @@ function EmptyStateContent({ className, ...props }) {
1977
2482
  );
1978
2483
  }
1979
2484
 
2485
+ // src/ui/error-boundary/error-boundary.tsx
2486
+ import { Component, Suspense } from "react";
2487
+
2488
+ // src/ui/error-state/error-state.tsx
2489
+ import { AlertCircle } from "lucide-react";
2490
+ import { jsx as jsx25 } from "react/jsx-runtime";
2491
+ function ErrorState({ className, ...props }) {
2492
+ return /* @__PURE__ */ jsx25(
2493
+ "section",
2494
+ {
2495
+ "data-slot": "error-state",
2496
+ role: "alert",
2497
+ className: cn(
2498
+ "flex min-h-32 flex-col items-center justify-center gap-3 rounded-xl border border-destructive/30 bg-destructive/5 p-6 text-center",
2499
+ className
2500
+ ),
2501
+ ...props
2502
+ }
2503
+ );
2504
+ }
2505
+ function ErrorStateIcon({
2506
+ className,
2507
+ ...props
2508
+ }) {
2509
+ return /* @__PURE__ */ jsx25(
2510
+ AlertCircle,
2511
+ {
2512
+ "data-slot": "error-state-icon",
2513
+ "aria-hidden": "true",
2514
+ className: cn("size-6 text-destructive", className),
2515
+ ...props
2516
+ }
2517
+ );
2518
+ }
2519
+ function ErrorStateTitle({ className, ...props }) {
2520
+ return /* @__PURE__ */ jsx25(
2521
+ "h2",
2522
+ {
2523
+ "data-slot": "error-state-title",
2524
+ className: cn("font-semibold text-foreground", className),
2525
+ ...props
2526
+ }
2527
+ );
2528
+ }
2529
+ function ErrorStateDescription({ className, ...props }) {
2530
+ return /* @__PURE__ */ jsx25(
2531
+ "p",
2532
+ {
2533
+ "data-slot": "error-state-description",
2534
+ className: cn("max-w-md text-sm text-muted-foreground", className),
2535
+ ...props
2536
+ }
2537
+ );
2538
+ }
2539
+ function ErrorStateActions({ className, ...props }) {
2540
+ return /* @__PURE__ */ jsx25(
2541
+ "div",
2542
+ {
2543
+ "data-slot": "error-state-actions",
2544
+ className: cn("flex items-center gap-2", className),
2545
+ ...props
2546
+ }
2547
+ );
2548
+ }
2549
+
2550
+ // src/ui/error-boundary/error-boundary.tsx
2551
+ import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2552
+ function changedResetKeys(previous = [], next = []) {
2553
+ return previous.length !== next.length || previous.some((value, index) => !Object.is(value, next[index]));
2554
+ }
2555
+ var Boundary = class extends Component {
2556
+ state = { error: null };
2557
+ static getDerivedStateFromError(error) {
2558
+ return { error };
2559
+ }
2560
+ componentDidCatch(error, info) {
2561
+ this.props.onError?.(error, info);
2562
+ }
2563
+ componentDidUpdate(previousProps) {
2564
+ if (this.state.error && changedResetKeys(previousProps.resetKeys, this.props.resetKeys))
2565
+ this.reset();
2566
+ }
2567
+ reset = () => this.setState({ error: null });
2568
+ render() {
2569
+ const { children, fallback } = this.props;
2570
+ if (!this.state.error) return children;
2571
+ if (typeof fallback === "function")
2572
+ return fallback({ error: this.state.error, reset: this.reset });
2573
+ if (fallback) return fallback;
2574
+ return /* @__PURE__ */ jsxs13(ErrorState, { children: [
2575
+ /* @__PURE__ */ jsx26(ErrorStateIcon, {}),
2576
+ /* @__PURE__ */ jsx26(ErrorStateTitle, { children: "No se pudo cargar este contenido" }),
2577
+ /* @__PURE__ */ jsx26(ErrorStateDescription, { children: "Prueba a cargarlo de nuevo." }),
2578
+ /* @__PURE__ */ jsx26(ErrorStateActions, { children: /* @__PURE__ */ jsx26(Button, { onPress: this.reset, children: "Reintentar" }) })
2579
+ ] });
2580
+ }
2581
+ };
2582
+ function ErrorBoundary(props) {
2583
+ return /* @__PURE__ */ jsx26(Boundary, { ...props });
2584
+ }
2585
+ function AsyncBoundary({
2586
+ pending = null,
2587
+ ...props
2588
+ }) {
2589
+ return /* @__PURE__ */ jsx26(ErrorBoundary, { ...props, children: /* @__PURE__ */ jsx26(Suspense, { fallback: pending, children: props.children }) });
2590
+ }
2591
+
1980
2592
  // src/ui/label/label.tsx
1981
2593
  import { forwardRef } from "react";
1982
2594
  import { Label as LabelPrimitive } from "react-aria-components";
1983
- import { jsx as jsx22 } from "react/jsx-runtime";
2595
+ import { jsx as jsx27 } from "react/jsx-runtime";
1984
2596
  var Label2 = forwardRef(
1985
2597
  function Label3({ className, ...props }, ref) {
1986
- return /* @__PURE__ */ jsx22(
2598
+ return /* @__PURE__ */ jsx27(
1987
2599
  LabelPrimitive,
1988
2600
  {
1989
2601
  ref,
@@ -2015,16 +2627,16 @@ var fieldVariants = cva8(
2015
2627
  );
2016
2628
 
2017
2629
  // src/ui/field/field.tsx
2018
- import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
2630
+ import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
2019
2631
  function FieldSet({ className, ...props }) {
2020
- return /* @__PURE__ */ jsx23("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2632
+ return /* @__PURE__ */ jsx28("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2021
2633
  }
2022
2634
  function FieldLegend({
2023
2635
  className,
2024
2636
  variant = "legend",
2025
2637
  ...props
2026
2638
  }) {
2027
- return /* @__PURE__ */ jsx23(
2639
+ return /* @__PURE__ */ jsx28(
2028
2640
  "legend",
2029
2641
  {
2030
2642
  "data-slot": "field-legend",
@@ -2038,7 +2650,7 @@ function FieldLegend({
2038
2650
  );
2039
2651
  }
2040
2652
  function FieldGroup({ className, ...props }) {
2041
- return /* @__PURE__ */ jsx23(
2653
+ return /* @__PURE__ */ jsx28(
2042
2654
  "div",
2043
2655
  {
2044
2656
  "data-slot": "field-group",
@@ -2053,7 +2665,7 @@ function FieldGroup({ className, ...props }) {
2053
2665
  function Field({ className, orientation = "vertical", ...props }) {
2054
2666
  return (
2055
2667
  // biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
2056
- /* @__PURE__ */ jsx23(
2668
+ /* @__PURE__ */ jsx28(
2057
2669
  "div",
2058
2670
  {
2059
2671
  role: "group",
@@ -2066,7 +2678,7 @@ function Field({ className, orientation = "vertical", ...props }) {
2066
2678
  );
2067
2679
  }
2068
2680
  function FieldContent({ className, ...props }) {
2069
- return /* @__PURE__ */ jsx23(
2681
+ return /* @__PURE__ */ jsx28(
2070
2682
  "div",
2071
2683
  {
2072
2684
  "data-slot": "field-content",
@@ -2076,7 +2688,7 @@ function FieldContent({ className, ...props }) {
2076
2688
  );
2077
2689
  }
2078
2690
  function FieldLabel({ className, ...props }) {
2079
- return /* @__PURE__ */ jsx23(
2691
+ return /* @__PURE__ */ jsx28(
2080
2692
  Label2,
2081
2693
  {
2082
2694
  "data-slot": "field-label",
@@ -2089,7 +2701,7 @@ function FieldLabel({ className, ...props }) {
2089
2701
  );
2090
2702
  }
2091
2703
  function FieldTitle({ className, ...props }) {
2092
- return /* @__PURE__ */ jsx23(
2704
+ return /* @__PURE__ */ jsx28(
2093
2705
  "div",
2094
2706
  {
2095
2707
  "data-slot": "field-title",
@@ -2099,7 +2711,7 @@ function FieldTitle({ className, ...props }) {
2099
2711
  );
2100
2712
  }
2101
2713
  function FieldDescription({ className, ...props }) {
2102
- return /* @__PURE__ */ jsx23(
2714
+ return /* @__PURE__ */ jsx28(
2103
2715
  "p",
2104
2716
  {
2105
2717
  "data-slot": "field-description",
@@ -2112,7 +2724,7 @@ function FieldDescription({ className, ...props }) {
2112
2724
  );
2113
2725
  }
2114
2726
  function FieldSeparator({ className, children, ...props }) {
2115
- return /* @__PURE__ */ jsxs10(
2727
+ return /* @__PURE__ */ jsxs14(
2116
2728
  "div",
2117
2729
  {
2118
2730
  "data-slot": "field-separator",
@@ -2120,8 +2732,8 @@ function FieldSeparator({ className, children, ...props }) {
2120
2732
  className: cn("relative -my-2 h-5 text-sm", className),
2121
2733
  ...props,
2122
2734
  children: [
2123
- /* @__PURE__ */ jsx23(Separator, { className: "absolute inset-0 top-1/2" }),
2124
- children ? /* @__PURE__ */ jsx23(
2735
+ /* @__PURE__ */ jsx28(Separator, { className: "absolute inset-0 top-1/2" }),
2736
+ children ? /* @__PURE__ */ jsx28(
2125
2737
  "span",
2126
2738
  {
2127
2739
  "data-slot": "field-separator-content",
@@ -2135,9 +2747,9 @@ function FieldSeparator({ className, children, ...props }) {
2135
2747
  }
2136
2748
  function FieldError2({ className, children, errors, ...props }) {
2137
2749
  const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
2138
- const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx23("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx23("li", { children: message }, message)) }) : null);
2750
+ const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx28("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx28("li", { children: message }, message)) }) : null);
2139
2751
  if (!content) return null;
2140
- return /* @__PURE__ */ jsx23(
2752
+ return /* @__PURE__ */ jsx28(
2141
2753
  "div",
2142
2754
  {
2143
2755
  role: "alert",
@@ -2151,7 +2763,7 @@ function FieldError2({ className, children, errors, ...props }) {
2151
2763
 
2152
2764
  // src/ui/form-feedback/form-feedback.tsx
2153
2765
  import { CheckCircle, CircleAlert, LoaderCircle } from "lucide-react";
2154
- import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2766
+ import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
2155
2767
  function FormFeedback({
2156
2768
  state,
2157
2769
  className,
@@ -2159,14 +2771,14 @@ function FormFeedback({
2159
2771
  successLabel = "Guardado"
2160
2772
  }) {
2161
2773
  if (state.status === "idle")
2162
- return /* @__PURE__ */ jsx24("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2774
+ return /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2163
2775
  const error = state.status === "error";
2164
2776
  const success = state.status === "success";
2165
- return /* @__PURE__ */ jsxs11(
2777
+ return /* @__PURE__ */ jsxs15(
2166
2778
  "span",
2167
2779
  {
2168
2780
  role: error ? "alert" : "status",
2169
- "aria-live": "polite",
2781
+ "aria-live": error ? "assertive" : "polite",
2170
2782
  className: cn(
2171
2783
  "inline-flex h-5 items-center gap-1.5 text-xs",
2172
2784
  error && "text-destructive",
@@ -2175,31 +2787,31 @@ function FormFeedback({
2175
2787
  className
2176
2788
  ),
2177
2789
  children: [
2178
- state.status === "pending" && /* @__PURE__ */ jsx24(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2179
- success && /* @__PURE__ */ jsx24(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2180
- error && /* @__PURE__ */ jsx24(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2181
- /* @__PURE__ */ jsx24("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2790
+ state.status === "pending" && /* @__PURE__ */ jsx29(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2791
+ success && /* @__PURE__ */ jsx29(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2792
+ error && /* @__PURE__ */ jsx29(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2793
+ /* @__PURE__ */ jsx29("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2182
2794
  ]
2183
2795
  }
2184
2796
  );
2185
2797
  }
2186
2798
 
2187
2799
  // src/ui/form-feedback/use-form-feedback.ts
2188
- import { useCallback as useCallback5, useEffect as useEffect4, useRef as useRef3, useState as useState9 } from "react";
2800
+ import { useCallback as useCallback7, useEffect as useEffect5, useRef as useRef5, useState as useState11 } from "react";
2189
2801
  function useFormFeedback(options) {
2190
2802
  const resetMs = options?.successResetMs ?? 2500;
2191
- const [state, setState] = useState9({ status: "idle" });
2192
- const timer = useRef3(null);
2193
- const clearTimer = useCallback5(() => {
2803
+ const [state, setState] = useState11({ status: "idle" });
2804
+ const timer = useRef5(null);
2805
+ const clearTimer = useCallback7(() => {
2194
2806
  if (timer.current) clearTimeout(timer.current);
2195
2807
  timer.current = null;
2196
2808
  }, []);
2197
- useEffect4(() => () => clearTimer(), [clearTimer]);
2198
- const setPending = useCallback5(() => {
2809
+ useEffect5(() => () => clearTimer(), [clearTimer]);
2810
+ const setPending = useCallback7(() => {
2199
2811
  clearTimer();
2200
2812
  setState({ status: "pending" });
2201
2813
  }, [clearTimer]);
2202
- const setSuccess = useCallback5(
2814
+ const setSuccess = useCallback7(
2203
2815
  (message) => {
2204
2816
  clearTimer();
2205
2817
  setState({ status: "success", message });
@@ -2207,14 +2819,14 @@ function useFormFeedback(options) {
2207
2819
  },
2208
2820
  [clearTimer, resetMs]
2209
2821
  );
2210
- const setError = useCallback5(
2822
+ const setError = useCallback7(
2211
2823
  (message) => {
2212
2824
  clearTimer();
2213
2825
  setState({ status: "error", message });
2214
2826
  },
2215
2827
  [clearTimer]
2216
2828
  );
2217
- const reset = useCallback5(() => {
2829
+ const reset = useCallback7(() => {
2218
2830
  clearTimer();
2219
2831
  setState({ status: "idle" });
2220
2832
  }, [clearTimer]);
@@ -2222,7 +2834,7 @@ function useFormFeedback(options) {
2222
2834
  }
2223
2835
 
2224
2836
  // src/ui/form-row/form-row.tsx
2225
- import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
2837
+ import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
2226
2838
  function FormRow({
2227
2839
  label,
2228
2840
  htmlFor,
@@ -2234,17 +2846,17 @@ function FormRow({
2234
2846
  }) {
2235
2847
  const hintId = hint ? `${htmlFor}-hint` : void 0;
2236
2848
  const errorId = error ? `${htmlFor}-error` : void 0;
2237
- return /* @__PURE__ */ jsxs12("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2238
- /* @__PURE__ */ jsxs12("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
2849
+ return /* @__PURE__ */ jsxs16("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2850
+ /* @__PURE__ */ jsxs16("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
2239
2851
  label,
2240
- required && /* @__PURE__ */ jsxs12(Fragment6, { children: [
2241
- /* @__PURE__ */ jsx25("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
2242
- /* @__PURE__ */ jsx25("span", { className: "sr-only", children: " (obligatorio)" })
2852
+ required && /* @__PURE__ */ jsxs16(Fragment6, { children: [
2853
+ /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
2854
+ /* @__PURE__ */ jsx30("span", { className: "sr-only", children: " (obligatorio)" })
2243
2855
  ] })
2244
2856
  ] }),
2245
2857
  children,
2246
- hint && /* @__PURE__ */ jsx25("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
2247
- error && /* @__PURE__ */ jsx25("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
2858
+ hint && /* @__PURE__ */ jsx30("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
2859
+ error && /* @__PURE__ */ jsx30("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
2248
2860
  ] });
2249
2861
  }
2250
2862
 
@@ -2257,17 +2869,17 @@ import {
2257
2869
  Tooltip as TooltipPrimitive,
2258
2870
  TooltipTrigger as TooltipTriggerPrimitive
2259
2871
  } from "react-aria-components";
2260
- import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2872
+ import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
2261
2873
  function TooltipTrigger({
2262
2874
  delay = 0,
2263
2875
  ...props
2264
2876
  }) {
2265
- return /* @__PURE__ */ jsx26(TooltipTriggerPrimitive, { "data-slot": "tooltip-trigger", delay, ...props });
2877
+ return /* @__PURE__ */ jsx31(TooltipTriggerPrimitive, { "data-slot": "tooltip-trigger", delay, ...props });
2266
2878
  }
2267
2879
  function Tooltip({ label, children, delay, ...props }) {
2268
- return /* @__PURE__ */ jsxs13(TooltipTrigger, { delay, children: [
2880
+ return /* @__PURE__ */ jsxs17(TooltipTrigger, { delay, children: [
2269
2881
  children,
2270
- /* @__PURE__ */ jsx26(TooltipContent, { ...props, children: label })
2882
+ /* @__PURE__ */ jsx31(TooltipContent, { ...props, children: label })
2271
2883
  ] });
2272
2884
  }
2273
2885
  function TooltipContent({
@@ -2278,7 +2890,7 @@ function TooltipContent({
2278
2890
  children,
2279
2891
  ...props
2280
2892
  }) {
2281
- return /* @__PURE__ */ jsxs13(
2893
+ return /* @__PURE__ */ jsxs17(
2282
2894
  TooltipPrimitive,
2283
2895
  {
2284
2896
  "data-slot": "tooltip-content",
@@ -2292,7 +2904,7 @@ function TooltipContent({
2292
2904
  ...props,
2293
2905
  children: [
2294
2906
  children,
2295
- /* @__PURE__ */ jsx26(
2907
+ /* @__PURE__ */ jsx31(
2296
2908
  OverlayArrow,
2297
2909
  {
2298
2910
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
@@ -2310,7 +2922,7 @@ function TooltipContent({
2310
2922
  }
2311
2923
 
2312
2924
  // src/ui/icon-button/icon-button.tsx
2313
- import { jsx as jsx27 } from "react/jsx-runtime";
2925
+ import { jsx as jsx32 } from "react/jsx-runtime";
2314
2926
  function IconButton({
2315
2927
  label,
2316
2928
  children,
@@ -2320,7 +2932,7 @@ function IconButton({
2320
2932
  ...props
2321
2933
  }) {
2322
2934
  const linkClassName = cn(buttonVariants({ variant, size: "icon" }), className);
2323
- return /* @__PURE__ */ jsx27(Tooltip, { label, children: href ? /* @__PURE__ */ jsx27(Link2, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ jsx27(
2935
+ return /* @__PURE__ */ jsx32(Tooltip, { label, children: href ? /* @__PURE__ */ jsx32(Link2, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ jsx32(
2324
2936
  Button,
2325
2937
  {
2326
2938
  "data-slot": "icon-button",
@@ -2340,9 +2952,9 @@ import { cva as cva10 } from "class-variance-authority";
2340
2952
  // src/ui/input/input.tsx
2341
2953
  import { forwardRef as forwardRef2 } from "react";
2342
2954
  import { Input as AriaInput2 } from "react-aria-components";
2343
- import { jsx as jsx28 } from "react/jsx-runtime";
2955
+ import { jsx as jsx33 } from "react/jsx-runtime";
2344
2956
  var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
2345
- return /* @__PURE__ */ jsx28(
2957
+ return /* @__PURE__ */ jsx33(
2346
2958
  AriaInput2,
2347
2959
  {
2348
2960
  ref,
@@ -2363,9 +2975,9 @@ import { forwardRef as forwardRef3 } from "react";
2363
2975
  import {
2364
2976
  TextArea as AriaTextArea
2365
2977
  } from "react-aria-components";
2366
- import { jsx as jsx29 } from "react/jsx-runtime";
2978
+ import { jsx as jsx34 } from "react/jsx-runtime";
2367
2979
  var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
2368
- return /* @__PURE__ */ jsx29(
2980
+ return /* @__PURE__ */ jsx34(
2369
2981
  AriaTextArea,
2370
2982
  {
2371
2983
  ref,
@@ -2398,11 +3010,11 @@ var inputGroupAddonVariants = cva9(
2398
3010
  );
2399
3011
 
2400
3012
  // src/ui/input-group/input-group.tsx
2401
- import { jsx as jsx30 } from "react/jsx-runtime";
3013
+ import { jsx as jsx35 } from "react/jsx-runtime";
2402
3014
  function InputGroup({ className, ...props }) {
2403
3015
  return (
2404
3016
  // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
2405
- /* @__PURE__ */ jsx30(
3017
+ /* @__PURE__ */ jsx35(
2406
3018
  "div",
2407
3019
  {
2408
3020
  role: "group",
@@ -2424,7 +3036,7 @@ function InputGroupAddon({
2424
3036
  }) {
2425
3037
  return (
2426
3038
  // biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
2427
- /* @__PURE__ */ jsx30(
3039
+ /* @__PURE__ */ jsx35(
2428
3040
  "div",
2429
3041
  {
2430
3042
  role: "group",
@@ -2455,7 +3067,7 @@ function InputGroupButton({
2455
3067
  ...props
2456
3068
  }) {
2457
3069
  const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
2458
- return /* @__PURE__ */ jsx30(
3070
+ return /* @__PURE__ */ jsx35(
2459
3071
  Button,
2460
3072
  {
2461
3073
  "data-slot": "input-group-button",
@@ -2468,7 +3080,7 @@ function InputGroupButton({
2468
3080
  );
2469
3081
  }
2470
3082
  function InputGroupText({ className, ...props }) {
2471
- return /* @__PURE__ */ jsx30(
3083
+ return /* @__PURE__ */ jsx35(
2472
3084
  "span",
2473
3085
  {
2474
3086
  "data-slot": "input-group-text",
@@ -2481,7 +3093,7 @@ function InputGroupText({ className, ...props }) {
2481
3093
  );
2482
3094
  }
2483
3095
  function InputGroupInput({ className, ...props }) {
2484
- return /* @__PURE__ */ jsx30(
3096
+ return /* @__PURE__ */ jsx35(
2485
3097
  Input3,
2486
3098
  {
2487
3099
  "data-slot": "input-group-control",
@@ -2494,7 +3106,7 @@ function InputGroupInput({ className, ...props }) {
2494
3106
  );
2495
3107
  }
2496
3108
  function InputGroupTextarea({ className, ...props }) {
2497
- return /* @__PURE__ */ jsx30(
3109
+ return /* @__PURE__ */ jsx35(
2498
3110
  Textarea2,
2499
3111
  {
2500
3112
  "data-slot": "input-group-control",
@@ -2508,7 +3120,7 @@ function InputGroupTextarea({ className, ...props }) {
2508
3120
  }
2509
3121
 
2510
3122
  // src/ui/kanban/kanban.tsx
2511
- import { jsx as jsx31 } from "react/jsx-runtime";
3123
+ import { jsx as jsx36 } from "react/jsx-runtime";
2512
3124
  var columnSize = {
2513
3125
  compact: "w-56",
2514
3126
  default: "w-72",
@@ -2520,13 +3132,13 @@ function KanbanViewport({
2520
3132
  contentClassName,
2521
3133
  ...props
2522
3134
  }) {
2523
- return /* @__PURE__ */ jsx31(
3135
+ return /* @__PURE__ */ jsx36(
2524
3136
  "div",
2525
3137
  {
2526
3138
  "data-slot": "kanban-viewport",
2527
3139
  className: cn("-mx-1 overflow-x-auto pb-3", className),
2528
3140
  ...props,
2529
- children: /* @__PURE__ */ jsx31(
3141
+ children: /* @__PURE__ */ jsx36(
2530
3142
  "div",
2531
3143
  {
2532
3144
  "data-slot": "kanban-viewport-content",
@@ -2542,7 +3154,7 @@ function KanbanColumn({
2542
3154
  size = "default",
2543
3155
  ...props
2544
3156
  }) {
2545
- return /* @__PURE__ */ jsx31(
3157
+ return /* @__PURE__ */ jsx36(
2546
3158
  "section",
2547
3159
  {
2548
3160
  "data-slot": "kanban-column",
@@ -2553,7 +3165,7 @@ function KanbanColumn({
2553
3165
  );
2554
3166
  }
2555
3167
  function KanbanColumnHeader({ className, ...props }) {
2556
- return /* @__PURE__ */ jsx31(
3168
+ return /* @__PURE__ */ jsx36(
2557
3169
  "header",
2558
3170
  {
2559
3171
  "data-slot": "kanban-column-header",
@@ -2563,7 +3175,7 @@ function KanbanColumnHeader({ className, ...props }) {
2563
3175
  );
2564
3176
  }
2565
3177
  function KanbanColumnTitle({ className, ...props }) {
2566
- return /* @__PURE__ */ jsx31(
3178
+ return /* @__PURE__ */ jsx36(
2567
3179
  "span",
2568
3180
  {
2569
3181
  "data-slot": "kanban-column-title",
@@ -2576,14 +3188,14 @@ function KanbanColumnTitle({ className, ...props }) {
2576
3188
  );
2577
3189
  }
2578
3190
  function KanbanColumnBody({ className, ...props }) {
2579
- return /* @__PURE__ */ jsx31("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
3191
+ return /* @__PURE__ */ jsx36("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
2580
3192
  }
2581
3193
  function KanbanEmpty({
2582
3194
  className,
2583
3195
  compact = false,
2584
3196
  ...props
2585
3197
  }) {
2586
- return /* @__PURE__ */ jsx31(
3198
+ return /* @__PURE__ */ jsx36(
2587
3199
  "p",
2588
3200
  {
2589
3201
  "data-slot": "kanban-empty",
@@ -2599,9 +3211,9 @@ function KanbanEmpty({
2599
3211
  }
2600
3212
 
2601
3213
  // src/ui/kbd/kbd.tsx
2602
- import { jsx as jsx32 } from "react/jsx-runtime";
3214
+ import { jsx as jsx37 } from "react/jsx-runtime";
2603
3215
  function Kbd({ className, ...props }) {
2604
- return /* @__PURE__ */ jsx32(
3216
+ return /* @__PURE__ */ jsx37(
2605
3217
  "kbd",
2606
3218
  {
2607
3219
  "data-slot": "kbd",
@@ -2614,7 +3226,7 @@ function Kbd({ className, ...props }) {
2614
3226
  );
2615
3227
  }
2616
3228
  function KbdGroup({ className, ...props }) {
2617
- return /* @__PURE__ */ jsx32(
3229
+ return /* @__PURE__ */ jsx37(
2618
3230
  "span",
2619
3231
  {
2620
3232
  "data-slot": "kbd-group",
@@ -2626,13 +3238,13 @@ function KbdGroup({ className, ...props }) {
2626
3238
 
2627
3239
  // src/ui/loading-overlay/loading-overlay.tsx
2628
3240
  import { LoaderCircle as LoaderCircle2 } from "lucide-react";
2629
- import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
3241
+ import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
2630
3242
  function LoadingOverlay({
2631
3243
  label = "Cargando",
2632
3244
  className,
2633
3245
  ...props
2634
3246
  }) {
2635
- return /* @__PURE__ */ jsx33(
3247
+ return /* @__PURE__ */ jsx38(
2636
3248
  "output",
2637
3249
  {
2638
3250
  "aria-live": "polite",
@@ -2641,9 +3253,9 @@ function LoadingOverlay({
2641
3253
  className
2642
3254
  ),
2643
3255
  ...props,
2644
- children: /* @__PURE__ */ jsxs14("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
2645
- /* @__PURE__ */ jsx33(LoaderCircle2, { className: "animate-spin", "aria-hidden": "true" }),
2646
- /* @__PURE__ */ jsx33("span", { children: label })
3256
+ children: /* @__PURE__ */ jsxs18("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
3257
+ /* @__PURE__ */ jsx38(LoaderCircle2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
3258
+ /* @__PURE__ */ jsx38("span", { children: label })
2647
3259
  ] })
2648
3260
  }
2649
3261
  );
@@ -2656,15 +3268,16 @@ import {
2656
3268
  MenuTrigger as AriaMenuTrigger,
2657
3269
  Popover as Popover3
2658
3270
  } from "react-aria-components";
2659
- import { jsx as jsx34 } from "react/jsx-runtime";
3271
+ import { jsx as jsx39 } from "react/jsx-runtime";
2660
3272
  var MenuTrigger = AriaMenuTrigger;
2661
3273
  function MenuContent({ className, ...props }) {
2662
- return /* @__PURE__ */ jsx34(
3274
+ return /* @__PURE__ */ jsx39(
2663
3275
  Popover3,
2664
3276
  {
2665
3277
  "data-slot": "menu-content",
2666
3278
  className: cn(
2667
- "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",
3279
+ floatingSurfaceClassName,
3280
+ "min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
2668
3281
  className
2669
3282
  ),
2670
3283
  ...props
@@ -2672,10 +3285,10 @@ function MenuContent({ className, ...props }) {
2672
3285
  );
2673
3286
  }
2674
3287
  function Menu({ className, ...props }) {
2675
- return /* @__PURE__ */ jsx34(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
3288
+ return /* @__PURE__ */ jsx39(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
2676
3289
  }
2677
3290
  function MenuItem({ className, children, ...props }) {
2678
- return /* @__PURE__ */ jsx34(
3291
+ return /* @__PURE__ */ jsx39(
2679
3292
  AriaMenuItem,
2680
3293
  {
2681
3294
  "data-slot": "menu-item",
@@ -2690,7 +3303,7 @@ function MenuItem({ className, children, ...props }) {
2690
3303
  }
2691
3304
 
2692
3305
  // src/ui/metric-card/metric-card.tsx
2693
- import { jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
3306
+ import { jsx as jsx40, jsxs as jsxs19 } from "react/jsx-runtime";
2694
3307
  function MetricCard({
2695
3308
  className,
2696
3309
  label,
@@ -2698,34 +3311,69 @@ function MetricCard({
2698
3311
  description,
2699
3312
  icon,
2700
3313
  tone = "default",
3314
+ trend,
3315
+ delta,
3316
+ loading = false,
3317
+ loadingLabel = "Cargando m\xE9trica",
2701
3318
  ...props
2702
3319
  }) {
2703
- return /* @__PURE__ */ jsx35(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ jsxs15(CardContent, { className: "flex items-start gap-3", children: [
2704
- icon ? /* @__PURE__ */ jsx35("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
2705
- /* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
2706
- /* @__PURE__ */ jsx35("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
2707
- /* @__PURE__ */ jsx35(
2708
- "strong",
2709
- {
2710
- "data-slot": "metric-card-value",
2711
- className: "mt-1 block text-2xl font-semibold tracking-tight",
2712
- children: value
2713
- }
2714
- ),
2715
- description ? /* @__PURE__ */ jsx35("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
2716
- ] })
2717
- ] }) });
3320
+ return /* @__PURE__ */ jsx40(
3321
+ Card,
3322
+ {
3323
+ "data-slot": "metric-card",
3324
+ "data-tone": tone,
3325
+ "data-trend": trend,
3326
+ "aria-busy": loading || void 0,
3327
+ className: cn("min-w-0", className),
3328
+ ...props,
3329
+ children: /* @__PURE__ */ jsxs19(CardContent, { className: "flex items-start gap-3", children: [
3330
+ icon ? /* @__PURE__ */ jsx40("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
3331
+ /* @__PURE__ */ jsxs19("div", { className: "min-w-0", children: [
3332
+ /* @__PURE__ */ jsx40("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
3333
+ /* @__PURE__ */ jsx40(
3334
+ "strong",
3335
+ {
3336
+ "data-slot": "metric-card-value",
3337
+ className: "mt-1 block text-2xl font-semibold tracking-tight",
3338
+ children: loading ? /* @__PURE__ */ jsx40(
3339
+ "span",
3340
+ {
3341
+ "data-slot": "metric-card-loading",
3342
+ "aria-label": loadingLabel,
3343
+ className: "bg-muted block h-7 w-24 animate-pulse rounded motion-reduce:animate-none"
3344
+ }
3345
+ ) : value
3346
+ }
3347
+ ),
3348
+ delta ? /* @__PURE__ */ jsx40(
3349
+ "span",
3350
+ {
3351
+ "data-slot": "metric-card-delta",
3352
+ className: cn(
3353
+ "mt-1 block text-xs",
3354
+ trend === "up" && "text-emerald-600",
3355
+ trend === "down" && "text-destructive",
3356
+ trend === "neutral" && "text-muted-foreground"
3357
+ ),
3358
+ children: delta
3359
+ }
3360
+ ) : null,
3361
+ description ? /* @__PURE__ */ jsx40("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
3362
+ ] })
3363
+ ] })
3364
+ }
3365
+ );
2718
3366
  }
2719
3367
 
2720
3368
  // src/ui/otp-input/otp-input.tsx
2721
3369
  import {
2722
3370
  forwardRef as forwardRef4,
2723
3371
  useImperativeHandle,
2724
- useRef as useRef4,
2725
- useState as useState10
3372
+ useRef as useRef6,
3373
+ useState as useState12
2726
3374
  } from "react";
2727
3375
  import { Input as AriaInput3 } from "react-aria-components";
2728
- import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
3376
+ import { jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
2729
3377
  function normalizeOtp(value, length) {
2730
3378
  return value.replace(/[^0-9]/g, "").slice(0, length);
2731
3379
  }
@@ -2744,14 +3392,14 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2744
3392
  onSelect,
2745
3393
  ...props
2746
3394
  }, forwardedRef) {
2747
- const slotCount = Math.max(1, Math.floor(length));
3395
+ const slotCount = Number.isFinite(length) ? Math.max(1, Math.floor(length)) : 6;
2748
3396
  const controlled = value !== void 0;
2749
- const [internalValue, setInternalValue] = useState10(() => normalizeOtp(defaultValue, slotCount));
3397
+ const [internalValue, setInternalValue] = useState12(() => normalizeOtp(defaultValue, slotCount));
2750
3398
  const code = normalizeOtp(controlled ? value : internalValue, slotCount);
2751
3399
  const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
2752
- const inputRef = useRef4(null);
2753
- const [focused, setFocused] = useState10(false);
2754
- const [selectionStart, setSelectionStart] = useState10(0);
3400
+ const inputRef = useRef6(null);
3401
+ const [focused, setFocused] = useState12(false);
3402
+ const [selectionStart, setSelectionStart] = useState12(0);
2755
3403
  const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
2756
3404
  const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
2757
3405
  useImperativeHandle(forwardedRef, () => inputRef.current);
@@ -2763,7 +3411,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2763
3411
  if (!controlled) setInternalValue(nextValue);
2764
3412
  if (nextValue === code) return;
2765
3413
  onChange?.(nextValue);
2766
- if (nextValue.length === slotCount) onComplete?.(nextValue);
3414
+ if (nextValue.length === slotCount && code.length < slotCount) onComplete?.(nextValue);
2767
3415
  }
2768
3416
  function handlePointerDown(event) {
2769
3417
  if (disabled) return;
@@ -2777,7 +3425,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2777
3425
  input.setSelectionRange(position, position);
2778
3426
  setSelectionStart(position);
2779
3427
  }
2780
- return /* @__PURE__ */ jsxs16(
3428
+ return /* @__PURE__ */ jsxs20(
2781
3429
  "div",
2782
3430
  {
2783
3431
  "data-slot": "otp-input",
@@ -2787,7 +3435,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2787
3435
  style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
2788
3436
  onPointerDown: handlePointerDown,
2789
3437
  children: [
2790
- /* @__PURE__ */ jsx36(
3438
+ /* @__PURE__ */ jsx41(
2791
3439
  AriaInput3,
2792
3440
  {
2793
3441
  ...props,
@@ -2827,7 +3475,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2827
3475
  }
2828
3476
  }
2829
3477
  ),
2830
- slots.map((slot, index) => /* @__PURE__ */ jsx36(
3478
+ slots.map((slot, index) => /* @__PURE__ */ jsx41(
2831
3479
  "span",
2832
3480
  {
2833
3481
  "aria-hidden": "true",
@@ -2850,9 +3498,9 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2850
3498
  var OtpInput2 = OtpInputImpl;
2851
3499
 
2852
3500
  // src/ui/page-header/page-header.tsx
2853
- import { jsx as jsx37 } from "react/jsx-runtime";
3501
+ import { jsx as jsx42 } from "react/jsx-runtime";
2854
3502
  function PageHeader({ className, ...props }) {
2855
- return /* @__PURE__ */ jsx37(
3503
+ return /* @__PURE__ */ jsx42(
2856
3504
  "header",
2857
3505
  {
2858
3506
  "data-slot": "page-header",
@@ -2865,10 +3513,10 @@ function PageHeader({ className, ...props }) {
2865
3513
  );
2866
3514
  }
2867
3515
  function PageHeaderHeading({ className, ...props }) {
2868
- return /* @__PURE__ */ jsx37("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
3516
+ return /* @__PURE__ */ jsx42("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
2869
3517
  }
2870
3518
  function PageHeaderTitle({ className, children, ...props }) {
2871
- return /* @__PURE__ */ jsx37(
3519
+ return /* @__PURE__ */ jsx42(
2872
3520
  "h1",
2873
3521
  {
2874
3522
  "data-slot": "page-header-title",
@@ -2879,7 +3527,7 @@ function PageHeaderTitle({ className, children, ...props }) {
2879
3527
  );
2880
3528
  }
2881
3529
  function PageHeaderDescription({ className, ...props }) {
2882
- return /* @__PURE__ */ jsx37(
3530
+ return /* @__PURE__ */ jsx42(
2883
3531
  "p",
2884
3532
  {
2885
3533
  "data-slot": "page-header-description",
@@ -2889,7 +3537,7 @@ function PageHeaderDescription({ className, ...props }) {
2889
3537
  );
2890
3538
  }
2891
3539
  function PageHeaderActions({ className, ...props }) {
2892
- return /* @__PURE__ */ jsx37(
3540
+ return /* @__PURE__ */ jsx42(
2893
3541
  "div",
2894
3542
  {
2895
3543
  "data-slot": "page-header-actions",
@@ -2898,11 +3546,54 @@ function PageHeaderActions({ className, ...props }) {
2898
3546
  }
2899
3547
  );
2900
3548
  }
3549
+ function SectionHeader({ className, ...props }) {
3550
+ return /* @__PURE__ */ jsx42(
3551
+ "div",
3552
+ {
3553
+ "data-slot": "section-header",
3554
+ className: cn("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", className),
3555
+ ...props
3556
+ }
3557
+ );
3558
+ }
3559
+ function SectionHeaderHeading({ className, ...props }) {
3560
+ return /* @__PURE__ */ jsx42("div", { "data-slot": "section-header-heading", className: cn("min-w-0", className), ...props });
3561
+ }
3562
+ function SectionHeaderTitle({ className, ...props }) {
3563
+ return /* @__PURE__ */ jsx42(
3564
+ "h2",
3565
+ {
3566
+ "data-slot": "section-header-title",
3567
+ className: cn("text-base font-semibold tracking-tight", className),
3568
+ ...props
3569
+ }
3570
+ );
3571
+ }
3572
+ function SectionHeaderDescription({ className, ...props }) {
3573
+ return /* @__PURE__ */ jsx42(
3574
+ "p",
3575
+ {
3576
+ "data-slot": "section-header-description",
3577
+ className: cn("mt-1 text-sm text-muted-foreground", className),
3578
+ ...props
3579
+ }
3580
+ );
3581
+ }
3582
+ function SectionHeaderActions({ className, ...props }) {
3583
+ return /* @__PURE__ */ jsx42(
3584
+ "div",
3585
+ {
3586
+ "data-slot": "section-header-actions",
3587
+ className: cn("flex shrink-0 items-center gap-2", className),
3588
+ ...props
3589
+ }
3590
+ );
3591
+ }
2901
3592
 
2902
3593
  // src/ui/pagination/pagination.tsx
2903
3594
  import { ChevronLeft, ChevronRight } from "lucide-react";
2904
3595
  import * as React6 from "react";
2905
- import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
3596
+ import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
2906
3597
  function visiblePages(page, pageCount, siblingCount) {
2907
3598
  return [
2908
3599
  .../* @__PURE__ */ new Set([
@@ -2912,6 +3603,13 @@ function visiblePages(page, pageCount, siblingCount) {
2912
3603
  ])
2913
3604
  ].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
2914
3605
  }
3606
+ function normalizedPageCount(pageCount) {
3607
+ return Number.isFinite(pageCount) ? Math.max(0, Math.floor(pageCount)) : 0;
3608
+ }
3609
+ function normalizedPage(page, pageCount) {
3610
+ if (!Number.isFinite(page)) return 1;
3611
+ return Math.min(Math.max(1, Math.floor(page)), pageCount);
3612
+ }
2915
3613
  function Pagination({
2916
3614
  page,
2917
3615
  pageCount,
@@ -2921,35 +3619,37 @@ function Pagination({
2921
3619
  siblingCount = 1,
2922
3620
  className
2923
3621
  }) {
2924
- if (pageCount <= 1) return null;
2925
- const pages = visiblePages(page, pageCount, siblingCount);
2926
- return /* @__PURE__ */ jsxs17(
3622
+ const totalPages = normalizedPageCount(pageCount);
3623
+ if (totalPages <= 1) return null;
3624
+ const currentPage = normalizedPage(page, totalPages);
3625
+ const pages = visiblePages(currentPage, totalPages, siblingCount);
3626
+ return /* @__PURE__ */ jsxs21(
2927
3627
  "nav",
2928
3628
  {
2929
3629
  "aria-label": ariaLabel,
2930
3630
  className: cn("flex flex-wrap items-center justify-between gap-4", className),
2931
3631
  children: [
2932
- /* @__PURE__ */ jsx38("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
2933
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1", children: [
2934
- /* @__PURE__ */ jsx38(
3632
+ /* @__PURE__ */ jsx43("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${currentPage} de ${totalPages}` }),
3633
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
3634
+ /* @__PURE__ */ jsx43(
2935
3635
  Button,
2936
3636
  {
2937
3637
  "aria-label": "P\xE1gina anterior",
2938
- isDisabled: page <= 1,
2939
- onPress: () => onPageChange(page - 1),
3638
+ isDisabled: currentPage <= 1,
3639
+ onPress: () => onPageChange(currentPage - 1),
2940
3640
  size: "icon",
2941
3641
  variant: "ghost",
2942
- children: /* @__PURE__ */ jsx38(ChevronLeft, {})
3642
+ children: /* @__PURE__ */ jsx43(ChevronLeft, {})
2943
3643
  }
2944
3644
  ),
2945
3645
  pages.map((item, index) => {
2946
3646
  const previousPage = pages[index - 1];
2947
- return /* @__PURE__ */ jsxs17(React6.Fragment, { children: [
2948
- previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ jsx38("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
2949
- /* @__PURE__ */ jsx38(
3647
+ return /* @__PURE__ */ jsxs21(React6.Fragment, { children: [
3648
+ previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ jsx43("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
3649
+ /* @__PURE__ */ jsx43(
2950
3650
  Button,
2951
3651
  {
2952
- "aria-current": item === page ? "page" : void 0,
3652
+ "aria-current": item === currentPage ? "page" : void 0,
2953
3653
  "aria-label": `P\xE1gina ${item}`,
2954
3654
  onPress: () => onPageChange(item),
2955
3655
  size: "icon",
@@ -2959,15 +3659,15 @@ function Pagination({
2959
3659
  )
2960
3660
  ] }, item);
2961
3661
  }),
2962
- /* @__PURE__ */ jsx38(
3662
+ /* @__PURE__ */ jsx43(
2963
3663
  Button,
2964
3664
  {
2965
3665
  "aria-label": "P\xE1gina siguiente",
2966
- isDisabled: page >= pageCount,
2967
- onPress: () => onPageChange(page + 1),
3666
+ isDisabled: currentPage >= totalPages,
3667
+ onPress: () => onPageChange(currentPage + 1),
2968
3668
  size: "icon",
2969
3669
  variant: "ghost",
2970
- children: /* @__PURE__ */ jsx38(ChevronRight, {})
3670
+ children: /* @__PURE__ */ jsx43(ChevronRight, {})
2971
3671
  }
2972
3672
  )
2973
3673
  ] })
@@ -2981,16 +3681,17 @@ import {
2981
3681
  DialogTrigger as AriaDialogTrigger,
2982
3682
  Popover as AriaPopover
2983
3683
  } from "react-aria-components";
2984
- import { jsx as jsx39, jsxs as jsxs18 } from "react/jsx-runtime";
3684
+ import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
2985
3685
  var PopoverTrigger = AriaDialogTrigger;
2986
3686
  function PopoverContent({ className, ...props }) {
2987
- return /* @__PURE__ */ jsx39(
3687
+ return /* @__PURE__ */ jsx44(
2988
3688
  AriaPopover,
2989
3689
  {
2990
3690
  "data-slot": "popover",
2991
3691
  offset: 6,
2992
3692
  className: cn(
2993
- "z-50 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",
3693
+ floatingSurfaceClassName,
3694
+ "min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground",
2994
3695
  className
2995
3696
  ),
2996
3697
  ...props
@@ -2998,24 +3699,24 @@ function PopoverContent({ className, ...props }) {
2998
3699
  );
2999
3700
  }
3000
3701
  function Popover4(props) {
3001
- if (!("trigger" in props)) return /* @__PURE__ */ jsx39(PopoverContent, { ...props });
3702
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx44(PopoverContent, { ...props });
3002
3703
  const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
3003
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx39(Button, { ...triggerProps, children: trigger }) : trigger;
3004
- return /* @__PURE__ */ jsxs18(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3704
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx44(Button, { ...triggerProps, children: trigger }) : trigger;
3705
+ return /* @__PURE__ */ jsxs22(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3005
3706
  triggerElement,
3006
- /* @__PURE__ */ jsx39(PopoverContent, { ...contentProps, children })
3707
+ /* @__PURE__ */ jsx44(PopoverContent, { ...contentProps, children })
3007
3708
  ] });
3008
3709
  }
3009
3710
 
3010
3711
  // src/ui/quantity-input/quantity-input.tsx
3011
- import { Minus, Plus } from "lucide-react";
3712
+ import { Minus as Minus2, Plus } from "lucide-react";
3012
3713
  import {
3013
3714
  Button as AriaButton,
3014
3715
  Group as AriaGroup,
3015
3716
  Input as AriaInput4,
3016
3717
  NumberField as AriaNumberField
3017
3718
  } from "react-aria-components";
3018
- import { jsx as jsx40, jsxs as jsxs19 } from "react/jsx-runtime";
3719
+ import { jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
3019
3720
  function QuantityInput({
3020
3721
  className,
3021
3722
  inputClassName,
@@ -3025,7 +3726,7 @@ function QuantityInput({
3025
3726
  step = 1,
3026
3727
  ...props
3027
3728
  }) {
3028
- return /* @__PURE__ */ jsx40(
3729
+ return /* @__PURE__ */ jsx45(
3029
3730
  AriaNumberField,
3030
3731
  {
3031
3732
  ...props,
@@ -3036,23 +3737,23 @@ function QuantityInput({
3036
3737
  "group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3037
3738
  className
3038
3739
  ),
3039
- children: /* @__PURE__ */ jsxs19(
3740
+ children: /* @__PURE__ */ jsxs23(
3040
3741
  AriaGroup,
3041
3742
  {
3042
3743
  "data-slot": "quantity-input-group",
3043
3744
  className: "border-border bg-background text-foreground focus-within:border-ring focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border transition-[border-color,box-shadow] focus-within:ring-3",
3044
3745
  children: [
3045
- /* @__PURE__ */ jsx40(
3746
+ /* @__PURE__ */ jsx45(
3046
3747
  AriaButton,
3047
3748
  {
3048
3749
  slot: "decrement",
3049
3750
  "aria-label": decrementAriaLabel,
3050
3751
  "data-slot": "quantity-input-decrement",
3051
3752
  className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-r transition-colors outline-none data-disabled:pointer-events-none",
3052
- children: /* @__PURE__ */ jsx40(Minus, { "aria-hidden": "true", className: "size-4" })
3753
+ children: /* @__PURE__ */ jsx45(Minus2, { "aria-hidden": "true", className: "size-4" })
3053
3754
  }
3054
3755
  ),
3055
- /* @__PURE__ */ jsx40(
3756
+ /* @__PURE__ */ jsx45(
3056
3757
  AriaInput4,
3057
3758
  {
3058
3759
  "data-slot": "quantity-input-value",
@@ -3062,14 +3763,14 @@ function QuantityInput({
3062
3763
  )
3063
3764
  }
3064
3765
  ),
3065
- /* @__PURE__ */ jsx40(
3766
+ /* @__PURE__ */ jsx45(
3066
3767
  AriaButton,
3067
3768
  {
3068
3769
  slot: "increment",
3069
3770
  "aria-label": incrementAriaLabel,
3070
3771
  "data-slot": "quantity-input-increment",
3071
3772
  className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-l transition-colors outline-none data-disabled:pointer-events-none",
3072
- children: /* @__PURE__ */ jsx40(Plus, { "aria-hidden": "true", className: "size-4" })
3773
+ children: /* @__PURE__ */ jsx45(Plus, { "aria-hidden": "true", className: "size-4" })
3073
3774
  }
3074
3775
  )
3075
3776
  ]
@@ -3089,10 +3790,10 @@ import {
3089
3790
  ListBoxItem as ListBoxItem3,
3090
3791
  Popover as Popover5
3091
3792
  } from "react-aria-components";
3092
- import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
3793
+ import { Fragment as Fragment8, jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
3093
3794
  var Select = AriaSelect;
3094
3795
  function SelectTrigger({ className, children, ...props }) {
3095
- return /* @__PURE__ */ jsx41(
3796
+ return /* @__PURE__ */ jsx46(
3096
3797
  AriaButton2,
3097
3798
  {
3098
3799
  "data-slot": "select-trigger",
@@ -3101,9 +3802,9 @@ function SelectTrigger({ className, children, ...props }) {
3101
3802
  className
3102
3803
  ),
3103
3804
  ...props,
3104
- children: (state) => /* @__PURE__ */ jsxs20(Fragment8, { children: [
3805
+ children: (state) => /* @__PURE__ */ jsxs24(Fragment8, { children: [
3105
3806
  typeof children === "function" ? children(state) : children,
3106
- /* @__PURE__ */ jsx41(
3807
+ /* @__PURE__ */ jsx46(
3107
3808
  ChevronDown2,
3108
3809
  {
3109
3810
  "aria-hidden": "true",
@@ -3115,7 +3816,7 @@ function SelectTrigger({ className, children, ...props }) {
3115
3816
  );
3116
3817
  }
3117
3818
  function SelectValue({ className, ...props }) {
3118
- return /* @__PURE__ */ jsx41(
3819
+ return /* @__PURE__ */ jsx46(
3119
3820
  AriaSelectValue,
3120
3821
  {
3121
3822
  "data-slot": "select-value",
@@ -3125,12 +3826,13 @@ function SelectValue({ className, ...props }) {
3125
3826
  );
3126
3827
  }
3127
3828
  function SelectContent({ className, ...props }) {
3128
- return /* @__PURE__ */ jsx41(
3829
+ return /* @__PURE__ */ jsx46(
3129
3830
  Popover5,
3130
3831
  {
3131
3832
  "data-slot": "select-content",
3132
3833
  className: cn(
3133
- "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",
3834
+ floatingSurfaceClassName,
3835
+ "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
3134
3836
  className
3135
3837
  ),
3136
3838
  ...props
@@ -3138,7 +3840,7 @@ function SelectContent({ className, ...props }) {
3138
3840
  );
3139
3841
  }
3140
3842
  function SelectList({ className, ...props }) {
3141
- return /* @__PURE__ */ jsx41(
3843
+ return /* @__PURE__ */ jsx46(
3142
3844
  ListBox3,
3143
3845
  {
3144
3846
  "data-slot": "select-list",
@@ -3152,7 +3854,7 @@ function SelectItem({
3152
3854
  children,
3153
3855
  ...props
3154
3856
  }) {
3155
- return /* @__PURE__ */ jsx41(
3857
+ return /* @__PURE__ */ jsx46(
3156
3858
  ListBoxItem3,
3157
3859
  {
3158
3860
  "data-slot": "select-item",
@@ -3166,165 +3868,9 @@ function SelectItem({
3166
3868
  );
3167
3869
  }
3168
3870
 
3169
- // src/ui/sheet/sheet.tsx
3170
- import { XIcon as XIcon2 } from "lucide-react";
3171
- import {
3172
- Heading as Heading3,
3173
- ModalOverlay as ModalOverlayPrimitive,
3174
- Modal as ModalPrimitive,
3175
- Dialog as SheetPrimitive,
3176
- DialogTrigger as SheetTriggerPrimitive,
3177
- Text as Text3
3178
- } from "react-aria-components";
3179
- import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
3180
- function SheetTrigger({ ...props }) {
3181
- return /* @__PURE__ */ jsx42(SheetTriggerPrimitive, { "data-slot": "sheet-trigger", ...props });
3182
- }
3183
- function SheetClose({ className, variant = "outline", size = "default", ...props }) {
3184
- return /* @__PURE__ */ jsx42(
3185
- Button,
3186
- {
3187
- slot: "close",
3188
- "data-slot": "sheet-close",
3189
- variant,
3190
- size,
3191
- className: cn(className),
3192
- ...props
3193
- }
3194
- );
3195
- }
3196
- function SheetOverlay({
3197
- className,
3198
- children,
3199
- ...props
3200
- }) {
3201
- return /* @__PURE__ */ jsx42(
3202
- ModalOverlayPrimitive,
3203
- {
3204
- "data-slot": "sheet-overlay",
3205
- isDismissable: true,
3206
- className: cn(
3207
- "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-entering:opacity-0 data-exiting:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
3208
- className
3209
- ),
3210
- ...props,
3211
- children
3212
- }
3213
- );
3214
- }
3215
- function Sheet({
3216
- className,
3217
- children,
3218
- side = "right",
3219
- showCloseButton = true,
3220
- ...props
3221
- }) {
3222
- return /* @__PURE__ */ jsx42(SheetOverlay, { ...props, children: /* @__PURE__ */ jsx42(
3223
- ModalPrimitive,
3224
- {
3225
- "data-slot": "sheet-content",
3226
- "data-side": side,
3227
- className: cn(
3228
- "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",
3229
- className
3230
- ),
3231
- children: /* @__PURE__ */ jsxs21(
3232
- SheetPrimitive,
3233
- {
3234
- "data-slot": "sheet",
3235
- className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
3236
- children: [
3237
- children,
3238
- showCloseButton && /* @__PURE__ */ jsxs21(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
3239
- /* @__PURE__ */ jsx42(XIcon2, {}),
3240
- /* @__PURE__ */ jsx42("span", { className: "sr-only", children: "Cerrar" })
3241
- ] })
3242
- ]
3243
- }
3244
- )
3245
- }
3246
- ) });
3247
- }
3248
- function SheetContent({
3249
- className,
3250
- children,
3251
- side = "right",
3252
- showCloseButton = true,
3253
- ...props
3254
- }) {
3255
- return /* @__PURE__ */ jsx42(Sheet, { className, side, showCloseButton, ...props, children });
3256
- }
3257
- function Drawer({
3258
- children,
3259
- trigger,
3260
- triggerProps,
3261
- defaultOpen,
3262
- isOpen,
3263
- onOpenChange,
3264
- ...contentProps
3265
- }) {
3266
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx42(Button, { ...triggerProps, children: trigger }) : trigger;
3267
- return /* @__PURE__ */ jsxs21(SheetTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3268
- triggerElement,
3269
- /* @__PURE__ */ jsx42(SheetContent, { ...contentProps, children })
3270
- ] });
3271
- }
3272
- function SheetHeader({ className, ...props }) {
3273
- return /* @__PURE__ */ jsx42(
3274
- "div",
3275
- {
3276
- "data-slot": "sheet-header",
3277
- className: cn("flex flex-col gap-0.5 p-4", className),
3278
- ...props
3279
- }
3280
- );
3281
- }
3282
- function SheetFooter({ className, ...props }) {
3283
- return /* @__PURE__ */ jsx42(
3284
- "div",
3285
- {
3286
- "data-slot": "sheet-footer",
3287
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
3288
- ...props
3289
- }
3290
- );
3291
- }
3292
- function SheetTitle({ className, ...props }) {
3293
- return /* @__PURE__ */ jsx42(
3294
- Heading3,
3295
- {
3296
- slot: "title",
3297
- "data-slot": "sheet-title",
3298
- className: cn("text-base font-medium text-foreground", className),
3299
- ...props
3300
- }
3301
- );
3302
- }
3303
- function SheetDescription({
3304
- className,
3305
- ...props
3306
- }) {
3307
- return /* @__PURE__ */ jsx42(
3308
- Text3,
3309
- {
3310
- slot: "description",
3311
- "data-slot": "sheet-description",
3312
- className: cn("text-sm text-muted-foreground", className),
3313
- ...props
3314
- }
3315
- );
3316
- }
3317
- var DrawerTrigger = SheetTrigger;
3318
- var DrawerContent = SheetContent;
3319
- var DrawerClose = SheetClose;
3320
- var DrawerHeader = SheetHeader;
3321
- var DrawerFooter = SheetFooter;
3322
- var DrawerTitle = SheetTitle;
3323
- var DrawerDescription = SheetDescription;
3324
-
3325
3871
  // src/ui/sidebar/sidebar.tsx
3326
3872
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2, Ellipsis, Search } from "lucide-react";
3327
- import { useMemo as useMemo2, useState as useState11 } from "react";
3873
+ import { useCallback as useCallback8, useMemo as useMemo2, useState as useState13 } from "react";
3328
3874
  import { Link as Link3 } from "react-aria-components";
3329
3875
 
3330
3876
  // src/ui/sidebar/sidebar-context.ts
@@ -3337,25 +3883,36 @@ function useSidebar() {
3337
3883
  }
3338
3884
 
3339
3885
  // src/ui/sidebar/sidebar.tsx
3340
- import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
3886
+ import { Fragment as Fragment9, jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
3341
3887
  function SidebarProvider({
3342
3888
  defaultCollapsed = false,
3889
+ collapsed: controlledCollapsed,
3890
+ onCollapsedChange,
3343
3891
  children
3344
3892
  }) {
3345
- const [collapsed, setCollapsed] = useState11(defaultCollapsed);
3893
+ const [uncontrolledCollapsed, setUncontrolledCollapsed] = useState13(defaultCollapsed);
3894
+ const collapsed = controlledCollapsed ?? uncontrolledCollapsed;
3895
+ const setCollapsed = useCallback8(
3896
+ (next) => {
3897
+ if (controlledCollapsed === void 0) setUncontrolledCollapsed(next);
3898
+ onCollapsedChange?.(next);
3899
+ },
3900
+ [controlledCollapsed, onCollapsedChange]
3901
+ );
3902
+ const toggle = useCallback8(() => setCollapsed(!collapsed), [collapsed, setCollapsed]);
3346
3903
  const value = useMemo2(
3347
3904
  () => ({
3348
3905
  collapsed,
3349
3906
  setCollapsed,
3350
- toggle: () => setCollapsed((current) => !current)
3907
+ toggle
3351
3908
  }),
3352
- [collapsed]
3909
+ [collapsed, setCollapsed, toggle]
3353
3910
  );
3354
- return /* @__PURE__ */ jsx43(SidebarContext.Provider, { value, children });
3911
+ return /* @__PURE__ */ jsx47(SidebarContext.Provider, { value, children });
3355
3912
  }
3356
3913
  function Sidebar({ className, ...props }) {
3357
3914
  const { collapsed } = useSidebar();
3358
- return /* @__PURE__ */ jsx43(
3915
+ return /* @__PURE__ */ jsx47(
3359
3916
  "aside",
3360
3917
  {
3361
3918
  "data-slot": "sidebar",
@@ -3369,7 +3926,7 @@ function Sidebar({ className, ...props }) {
3369
3926
  );
3370
3927
  }
3371
3928
  function SidebarHeader({ className, ...props }) {
3372
- return /* @__PURE__ */ jsx43(
3929
+ return /* @__PURE__ */ jsx47(
3373
3930
  "div",
3374
3931
  {
3375
3932
  "data-slot": "sidebar-header",
@@ -3384,7 +3941,7 @@ function SidebarSearch({
3384
3941
  className,
3385
3942
  ...props
3386
3943
  }) {
3387
- return /* @__PURE__ */ jsxs22(
3944
+ return /* @__PURE__ */ jsxs25(
3388
3945
  "button",
3389
3946
  {
3390
3947
  type: "button",
@@ -3395,15 +3952,15 @@ function SidebarSearch({
3395
3952
  ),
3396
3953
  ...props,
3397
3954
  children: [
3398
- /* @__PURE__ */ jsx43(Search, { className: "size-4 shrink-0" }),
3399
- /* @__PURE__ */ jsx43("span", { className: "flex-1 text-left", children: label }),
3400
- /* @__PURE__ */ jsx43("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
3955
+ /* @__PURE__ */ jsx47(Search, { className: "size-4 shrink-0" }),
3956
+ /* @__PURE__ */ jsx47("span", { className: "flex-1 text-left", children: label }),
3957
+ /* @__PURE__ */ jsx47("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
3401
3958
  ]
3402
3959
  }
3403
3960
  );
3404
3961
  }
3405
3962
  function SidebarContent({ className, ...props }) {
3406
- return /* @__PURE__ */ jsx43(
3963
+ return /* @__PURE__ */ jsx47(
3407
3964
  "nav",
3408
3965
  {
3409
3966
  "data-slot": "sidebar-content",
@@ -3414,7 +3971,7 @@ function SidebarContent({ className, ...props }) {
3414
3971
  );
3415
3972
  }
3416
3973
  function SidebarFooter({ className, ...props }) {
3417
- return /* @__PURE__ */ jsx43(
3974
+ return /* @__PURE__ */ jsx47(
3418
3975
  "div",
3419
3976
  {
3420
3977
  "data-slot": "sidebar-footer",
@@ -3430,8 +3987,8 @@ function SidebarGroup({
3430
3987
  ...props
3431
3988
  }) {
3432
3989
  const { collapsed } = useSidebar();
3433
- return /* @__PURE__ */ jsxs22("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
3434
- label && /* @__PURE__ */ jsx43(
3990
+ return /* @__PURE__ */ jsxs25("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
3991
+ label && /* @__PURE__ */ jsx47(
3435
3992
  "h2",
3436
3993
  {
3437
3994
  className: cn(
@@ -3455,7 +4012,7 @@ function SidebarItem({
3455
4012
  }) {
3456
4013
  const { collapsed } = useSidebar();
3457
4014
  const content = typeof children === "function" ? label : children ?? label;
3458
- return /* @__PURE__ */ jsx43(
4015
+ return /* @__PURE__ */ jsx47(
3459
4016
  Link3,
3460
4017
  {
3461
4018
  "data-slot": "sidebar-item",
@@ -3467,16 +4024,16 @@ function SidebarItem({
3467
4024
  typeof className === "function" ? className : className
3468
4025
  ),
3469
4026
  ...props,
3470
- children: (values) => /* @__PURE__ */ jsxs22(Fragment9, { children: [
3471
- /* @__PURE__ */ jsx43("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
3472
- /* @__PURE__ */ jsx43("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
3473
- badge && !collapsed && /* @__PURE__ */ jsx43("span", { className: "text-muted-foreground text-xs", children: badge })
4027
+ children: (values) => /* @__PURE__ */ jsxs25(Fragment9, { children: [
4028
+ /* @__PURE__ */ jsx47("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
4029
+ /* @__PURE__ */ jsx47("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
4030
+ badge && !collapsed && /* @__PURE__ */ jsx47("span", { className: "text-muted-foreground text-xs", children: badge })
3474
4031
  ] })
3475
4032
  }
3476
4033
  );
3477
4034
  }
3478
4035
  function SidebarSeparator({ className, ...props }) {
3479
- return /* @__PURE__ */ jsx43(
4036
+ return /* @__PURE__ */ jsx47(
3480
4037
  "hr",
3481
4038
  {
3482
4039
  "data-slot": "sidebar-separator",
@@ -3487,37 +4044,45 @@ function SidebarSeparator({ className, ...props }) {
3487
4044
  }
3488
4045
  function SidebarTrigger({ className, ...props }) {
3489
4046
  const { collapsed, toggle } = useSidebar();
3490
- return /* @__PURE__ */ jsx43(
4047
+ const { onPress, ...buttonProps } = props;
4048
+ return /* @__PURE__ */ jsx47(
3491
4049
  Button,
3492
4050
  {
3493
4051
  "aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
3494
- onPress: toggle,
4052
+ onPress: (event) => {
4053
+ onPress?.(event);
4054
+ toggle();
4055
+ },
3495
4056
  size: "icon",
3496
4057
  variant: "ghost",
3497
4058
  className: cn("ml-auto", className),
3498
- ...props,
3499
- children: collapsed ? /* @__PURE__ */ jsx43(ChevronRight2, {}) : /* @__PURE__ */ jsx43(ChevronLeft2, {})
4059
+ ...buttonProps,
4060
+ children: collapsed ? /* @__PURE__ */ jsx47(ChevronRight2, {}) : /* @__PURE__ */ jsx47(ChevronLeft2, {})
3500
4061
  }
3501
4062
  );
3502
4063
  }
3503
4064
  function SidebarRail({ className, ...props }) {
3504
4065
  const { toggle } = useSidebar();
3505
- return /* @__PURE__ */ jsx43(
4066
+ const { onClick, ...buttonProps } = props;
4067
+ return /* @__PURE__ */ jsx47(
3506
4068
  "button",
3507
4069
  {
3508
4070
  type: "button",
3509
4071
  "aria-label": "Alternar navegaci\xF3n",
3510
- onClick: toggle,
4072
+ onClick: (event) => {
4073
+ onClick?.(event);
4074
+ if (!event.defaultPrevented) toggle();
4075
+ },
3511
4076
  className: cn(
3512
4077
  "absolute inset-y-0 right-0 z-20 hidden w-1 -translate-x-1/2 cursor-ew-resize bg-transparent transition-colors hover:bg-border lg:block",
3513
4078
  className
3514
4079
  ),
3515
- ...props
4080
+ ...buttonProps
3516
4081
  }
3517
4082
  );
3518
4083
  }
3519
4084
  function SidebarMore({ className, ...props }) {
3520
- return /* @__PURE__ */ jsx43(
4085
+ return /* @__PURE__ */ jsx47(
3521
4086
  Button,
3522
4087
  {
3523
4088
  "aria-label": "M\xE1s opciones",
@@ -3525,15 +4090,15 @@ function SidebarMore({ className, ...props }) {
3525
4090
  variant: "ghost",
3526
4091
  className: cn("size-7", className),
3527
4092
  ...props,
3528
- children: /* @__PURE__ */ jsx43(Ellipsis, {})
4093
+ children: /* @__PURE__ */ jsx47(Ellipsis, {})
3529
4094
  }
3530
4095
  );
3531
4096
  }
3532
4097
 
3533
4098
  // src/ui/skeleton/skeleton.tsx
3534
- import { jsx as jsx44 } from "react/jsx-runtime";
4099
+ import { jsx as jsx48 } from "react/jsx-runtime";
3535
4100
  function Skeleton({ className, ...props }) {
3536
- return /* @__PURE__ */ jsx44(
4101
+ return /* @__PURE__ */ jsx48(
3537
4102
  "div",
3538
4103
  {
3539
4104
  "aria-hidden": "true",
@@ -3546,9 +4111,9 @@ function Skeleton({ className, ...props }) {
3546
4111
 
3547
4112
  // src/ui/submit-button/submit-button.tsx
3548
4113
  import { LoaderCircle as LoaderCircle3 } from "lucide-react";
3549
- import { useCallback as useCallback6, useLayoutEffect, useRef as useRef5 } from "react";
4114
+ import { useCallback as useCallback9, useLayoutEffect, useRef as useRef7 } from "react";
3550
4115
  import { useFormStatus } from "react-dom";
3551
- import { Fragment as Fragment10, jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
4116
+ import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
3552
4117
  function assignRef(ref, node) {
3553
4118
  if (typeof ref === "function") {
3554
4119
  ref(node);
@@ -3569,8 +4134,8 @@ function SubmitButton({
3569
4134
  const { pending } = useFormStatus();
3570
4135
  const busy = pending || loading;
3571
4136
  const label = loadingLabel ?? pendingLabel ?? "Guardando\u2026";
3572
- const buttonRef = useRef5(null);
3573
- const setButtonRef = useCallback6(
4137
+ const buttonRef = useRef7(null);
4138
+ const setButtonRef = useCallback9(
3574
4139
  (node) => {
3575
4140
  buttonRef.current = node;
3576
4141
  assignRef(forwardedRef, node);
@@ -3583,7 +4148,7 @@ function SubmitButton({
3583
4148
  if (busy) button.setAttribute("aria-busy", "true");
3584
4149
  else button.removeAttribute("aria-busy");
3585
4150
  }, [busy]);
3586
- return /* @__PURE__ */ jsx45(
4151
+ return /* @__PURE__ */ jsx49(
3587
4152
  Button,
3588
4153
  {
3589
4154
  ref: setButtonRef,
@@ -3592,8 +4157,8 @@ function SubmitButton({
3592
4157
  isDisabled: busy || isDisabled,
3593
4158
  "aria-busy": busy || void 0,
3594
4159
  ...props,
3595
- children: busy ? /* @__PURE__ */ jsxs23(Fragment10, { children: [
3596
- /* @__PURE__ */ jsx45(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
4160
+ children: busy ? /* @__PURE__ */ jsxs26(Fragment10, { children: [
4161
+ /* @__PURE__ */ jsx49(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 motion-safe:animate-spin" }),
3597
4162
  label
3598
4163
  ] }) : children
3599
4164
  }
@@ -3601,9 +4166,9 @@ function SubmitButton({
3601
4166
  }
3602
4167
 
3603
4168
  // src/ui/switch/switch.tsx
3604
- import { useEffect as useEffect5, useRef as useRef6 } from "react";
4169
+ import { useEffect as useEffect6, useRef as useRef8 } from "react";
3605
4170
  import { Switch as AriaSwitch } from "react-aria-components";
3606
- import { Fragment as Fragment11, jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
4171
+ import { Fragment as Fragment11, jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
3607
4172
  var switchSizes = {
3608
4173
  sm: {
3609
4174
  control: "h-4 w-[1.875rem] p-0.5",
@@ -3643,9 +4208,9 @@ function Switch({
3643
4208
  ...props
3644
4209
  }) {
3645
4210
  const styles = switchSizes[size];
3646
- const fallbackInputRef = useRef6(null);
4211
+ const fallbackInputRef = useRef8(null);
3647
4212
  const resolvedInputRef = inputRef ?? fallbackInputRef;
3648
- useEffect5(() => {
4213
+ useEffect6(() => {
3649
4214
  const input = resolvedInputRef.current;
3650
4215
  if (!input) return;
3651
4216
  const handleDirectionalKey = (event) => {
@@ -3660,7 +4225,7 @@ function Switch({
3660
4225
  ownerDocument.addEventListener("keydown", handleDirectionalKey);
3661
4226
  return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
3662
4227
  }, [isDisabled, isReadOnly, resolvedInputRef]);
3663
- return /* @__PURE__ */ jsx46(
4228
+ return /* @__PURE__ */ jsx50(
3664
4229
  AriaSwitch,
3665
4230
  {
3666
4231
  "data-slot": "switch",
@@ -3677,8 +4242,8 @@ function Switch({
3677
4242
  children: (state) => {
3678
4243
  const isThumbPressed = state.isPressed;
3679
4244
  const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
3680
- return /* @__PURE__ */ jsxs24(Fragment11, { children: [
3681
- /* @__PURE__ */ jsx46(
4245
+ return /* @__PURE__ */ jsxs27(Fragment11, { children: [
4246
+ /* @__PURE__ */ jsx50(
3682
4247
  "span",
3683
4248
  {
3684
4249
  "aria-hidden": "true",
@@ -3692,7 +4257,7 @@ function Switch({
3692
4257
  "group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
3693
4258
  styles.control
3694
4259
  ),
3695
- children: /* @__PURE__ */ jsx46(
4260
+ children: /* @__PURE__ */ jsx50(
3696
4261
  "span",
3697
4262
  {
3698
4263
  "data-slot": "switch-thumb",
@@ -3712,9 +4277,9 @@ function Switch({
3712
4277
  )
3713
4278
  }
3714
4279
  ),
3715
- children || description ? /* @__PURE__ */ jsxs24("span", { className: "grid gap-0.5 leading-tight", children: [
3716
- children ? /* @__PURE__ */ jsx46("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
3717
- description ? /* @__PURE__ */ jsx46(
4280
+ children || description ? /* @__PURE__ */ jsxs27("span", { className: "grid gap-0.5 leading-tight", children: [
4281
+ children ? /* @__PURE__ */ jsx50("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
4282
+ description ? /* @__PURE__ */ jsx50(
3718
4283
  "span",
3719
4284
  {
3720
4285
  "data-slot": "switch-description",
@@ -3730,9 +4295,9 @@ function Switch({
3730
4295
  }
3731
4296
 
3732
4297
  // src/ui/table/table.tsx
3733
- import { jsx as jsx47 } from "react/jsx-runtime";
4298
+ import { jsx as jsx51 } from "react/jsx-runtime";
3734
4299
  function Table({ className, ...props }) {
3735
- return /* @__PURE__ */ jsx47("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx47(
4300
+ return /* @__PURE__ */ jsx51("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx51(
3736
4301
  "table",
3737
4302
  {
3738
4303
  "data-slot": "table",
@@ -3742,10 +4307,10 @@ function Table({ className, ...props }) {
3742
4307
  ) });
3743
4308
  }
3744
4309
  function TableHeader({ className, ...props }) {
3745
- return /* @__PURE__ */ jsx47("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
4310
+ return /* @__PURE__ */ jsx51("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
3746
4311
  }
3747
4312
  function TableBody({ className, ...props }) {
3748
- return /* @__PURE__ */ jsx47(
4313
+ return /* @__PURE__ */ jsx51(
3749
4314
  "tbody",
3750
4315
  {
3751
4316
  "data-slot": "table-body",
@@ -3755,7 +4320,7 @@ function TableBody({ className, ...props }) {
3755
4320
  );
3756
4321
  }
3757
4322
  function TableRow({ className, ...props }) {
3758
- return /* @__PURE__ */ jsx47(
4323
+ return /* @__PURE__ */ jsx51(
3759
4324
  "tr",
3760
4325
  {
3761
4326
  "data-slot": "table-row",
@@ -3768,7 +4333,7 @@ function TableRow({ className, ...props }) {
3768
4333
  );
3769
4334
  }
3770
4335
  function TableHead({ className, ...props }) {
3771
- return /* @__PURE__ */ jsx47(
4336
+ return /* @__PURE__ */ jsx51(
3772
4337
  "th",
3773
4338
  {
3774
4339
  "data-slot": "table-head",
@@ -3781,7 +4346,7 @@ function TableHead({ className, ...props }) {
3781
4346
  );
3782
4347
  }
3783
4348
  function TableCell({ className, ...props }) {
3784
- return /* @__PURE__ */ jsx47(
4349
+ return /* @__PURE__ */ jsx51(
3785
4350
  "td",
3786
4351
  {
3787
4352
  "data-slot": "table-cell",
@@ -3791,7 +4356,7 @@ function TableCell({ className, ...props }) {
3791
4356
  );
3792
4357
  }
3793
4358
  function TableCaption({ className, ...props }) {
3794
- return /* @__PURE__ */ jsx47(
4359
+ return /* @__PURE__ */ jsx51(
3795
4360
  "caption",
3796
4361
  {
3797
4362
  "data-slot": "table-caption",
@@ -3801,7 +4366,7 @@ function TableCaption({ className, ...props }) {
3801
4366
  );
3802
4367
  }
3803
4368
  function TableFooter({ className, ...props }) {
3804
- return /* @__PURE__ */ jsx47(
4369
+ return /* @__PURE__ */ jsx51(
3805
4370
  "tfoot",
3806
4371
  {
3807
4372
  "data-slot": "table-footer",
@@ -3813,6 +4378,44 @@ function TableFooter({ className, ...props }) {
3813
4378
  }
3814
4379
  );
3815
4380
  }
4381
+ function TableToolbar({ className, ...props }) {
4382
+ return /* @__PURE__ */ jsx51(
4383
+ "div",
4384
+ {
4385
+ "data-slot": "table-toolbar",
4386
+ className: cn("flex flex-wrap items-center justify-between gap-2 py-2", className),
4387
+ ...props
4388
+ }
4389
+ );
4390
+ }
4391
+ function TableEmpty({
4392
+ colSpan = 1,
4393
+ className,
4394
+ children = "No hay resultados."
4395
+ }) {
4396
+ return /* @__PURE__ */ jsx51(TableRow, { "data-slot": "table-empty", children: /* @__PURE__ */ jsx51(
4397
+ TableCell,
4398
+ {
4399
+ colSpan,
4400
+ className: cn("h-24 text-center text-muted-foreground", className),
4401
+ children
4402
+ }
4403
+ ) });
4404
+ }
4405
+ function TableLoading({
4406
+ colSpan = 1,
4407
+ className,
4408
+ children = "Cargando\u2026"
4409
+ }) {
4410
+ return /* @__PURE__ */ jsx51(TableRow, { "data-slot": "table-loading", "aria-busy": "true", children: /* @__PURE__ */ jsx51(
4411
+ TableCell,
4412
+ {
4413
+ colSpan,
4414
+ className: cn("h-24 text-center text-muted-foreground", className),
4415
+ children
4416
+ }
4417
+ ) });
4418
+ }
3816
4419
 
3817
4420
  // src/ui/tabs/tabs.tsx
3818
4421
  import {
@@ -3823,9 +4426,9 @@ import {
3823
4426
  Tabs as AriaTabs,
3824
4427
  composeRenderProps as composeRenderProps2
3825
4428
  } from "react-aria-components";
3826
- import { jsx as jsx48 } from "react/jsx-runtime";
4429
+ import { jsx as jsx52 } from "react/jsx-runtime";
3827
4430
  function Tabs({ className, ...props }) {
3828
- return /* @__PURE__ */ jsx48(
4431
+ return /* @__PURE__ */ jsx52(
3829
4432
  AriaTabs,
3830
4433
  {
3831
4434
  "data-slot": "tabs",
@@ -3835,7 +4438,7 @@ function Tabs({ className, ...props }) {
3835
4438
  );
3836
4439
  }
3837
4440
  function TabsList({ className, ...props }) {
3838
- return /* @__PURE__ */ jsx48(
4441
+ return /* @__PURE__ */ jsx52(
3839
4442
  AriaTabList,
3840
4443
  {
3841
4444
  "data-slot": "tabs-list",
@@ -3851,7 +4454,7 @@ function TabsList({ className, ...props }) {
3851
4454
  );
3852
4455
  }
3853
4456
  function TabsTrigger({ className, ...props }) {
3854
- return /* @__PURE__ */ jsx48(
4457
+ return /* @__PURE__ */ jsx52(
3855
4458
  AriaTab,
3856
4459
  {
3857
4460
  "data-slot": "tabs-trigger",
@@ -3867,10 +4470,10 @@ function TabsTrigger({ className, ...props }) {
3867
4470
  );
3868
4471
  }
3869
4472
  function TabsPanels({ className, ...props }) {
3870
- return /* @__PURE__ */ jsx48(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
4473
+ return /* @__PURE__ */ jsx52(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
3871
4474
  }
3872
4475
  function TabsContent({ className, ...props }) {
3873
- return /* @__PURE__ */ jsx48(
4476
+ return /* @__PURE__ */ jsx52(
3874
4477
  AriaTabPanel,
3875
4478
  {
3876
4479
  "data-slot": "tabs-content",
@@ -3884,7 +4487,7 @@ function TabsContent({ className, ...props }) {
3884
4487
  }
3885
4488
 
3886
4489
  // src/ui/toast/toast.tsx
3887
- import { useEffect as useEffect6 } from "react";
4490
+ import { useEffect as useEffect7 } from "react";
3888
4491
  import { sileo as sileo2, Toaster as SileoToaster } from "sileo";
3889
4492
 
3890
4493
  // src/ui/toast/toast-store.ts
@@ -3934,15 +4537,15 @@ function useToast() {
3934
4537
  }
3935
4538
 
3936
4539
  // src/ui/toast/toast.tsx
3937
- import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
4540
+ import { Fragment as Fragment12, jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
3938
4541
  function ToastProvider({ children }) {
3939
- return /* @__PURE__ */ jsxs25(Fragment12, { children: [
4542
+ return /* @__PURE__ */ jsxs28(Fragment12, { children: [
3940
4543
  children,
3941
- /* @__PURE__ */ jsx49(Toaster, {})
4544
+ /* @__PURE__ */ jsx53(Toaster, {})
3942
4545
  ] });
3943
4546
  }
3944
4547
  function Toaster({ position }) {
3945
- return /* @__PURE__ */ jsx49(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
4548
+ return /* @__PURE__ */ jsx53(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
3946
4549
  }
3947
4550
  function ToastViewport({
3948
4551
  position,
@@ -3951,7 +4554,7 @@ function ToastViewport({
3951
4554
  }) {
3952
4555
  void className;
3953
4556
  if (visiblePosition && visiblePosition !== position) return null;
3954
- return /* @__PURE__ */ jsx49(Toaster, { position });
4557
+ return /* @__PURE__ */ jsx53(Toaster, { position });
3955
4558
  }
3956
4559
  function Toast({
3957
4560
  id,
@@ -3964,7 +4567,7 @@ function Toast({
3964
4567
  position,
3965
4568
  onDismiss
3966
4569
  }) {
3967
- useEffect6(() => {
4570
+ useEffect7(() => {
3968
4571
  if (state !== "open") return;
3969
4572
  const toastId = toast({ title, description, variant, action, duration, position });
3970
4573
  return () => {
@@ -3976,9 +4579,9 @@ function Toast({
3976
4579
  }
3977
4580
 
3978
4581
  // src/ui/toolbar/toolbar.tsx
3979
- import { jsx as jsx50 } from "react/jsx-runtime";
4582
+ import { jsx as jsx54 } from "react/jsx-runtime";
3980
4583
  function Toolbar({ className, ...props }) {
3981
- return /* @__PURE__ */ jsx50(
4584
+ return /* @__PURE__ */ jsx54(
3982
4585
  "div",
3983
4586
  {
3984
4587
  role: "toolbar",
@@ -3989,7 +4592,7 @@ function Toolbar({ className, ...props }) {
3989
4592
  );
3990
4593
  }
3991
4594
  function ToolbarGroup({ className, ...props }) {
3992
- return /* @__PURE__ */ jsx50(
4595
+ return /* @__PURE__ */ jsx54(
3993
4596
  "div",
3994
4597
  {
3995
4598
  "data-slot": "toolbar-group",
@@ -3999,13 +4602,14 @@ function ToolbarGroup({ className, ...props }) {
3999
4602
  );
4000
4603
  }
4001
4604
  function ToolbarSpacer({ className, ...props }) {
4002
- return /* @__PURE__ */ jsx50("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4605
+ return /* @__PURE__ */ jsx54("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4003
4606
  }
4004
4607
  export {
4005
4608
  Accordion,
4006
4609
  AccordionContent,
4007
4610
  AccordionItem,
4008
4611
  AccordionTrigger,
4612
+ ActiveFilters,
4009
4613
  Alert,
4010
4614
  AlertAction,
4011
4615
  AlertDescription,
@@ -4027,6 +4631,7 @@ export {
4027
4631
  AppShellMain,
4028
4632
  AppShellMobileHeader,
4029
4633
  AppShellSidebar,
4634
+ AsyncBoundary,
4030
4635
  AutocompleteCombobox,
4031
4636
  Avatar,
4032
4637
  AvatarBadge,
@@ -4068,7 +4673,20 @@ export {
4068
4673
  CommandItem,
4069
4674
  CommandList,
4070
4675
  ConfirmDialog,
4676
+ CopyButton,
4071
4677
  DangerZone,
4678
+ DataViewState,
4679
+ DataViewStateActions,
4680
+ DataViewStateDescription,
4681
+ DataViewStateTitle,
4682
+ DescriptionDetails,
4683
+ DescriptionItem,
4684
+ DescriptionList,
4685
+ DescriptionTerm,
4686
+ DetailDrawer,
4687
+ DetailDrawerBody,
4688
+ DrawerFooter as DetailDrawerFooter,
4689
+ DrawerHeader as DetailDrawerHeader,
4072
4690
  Dialog,
4073
4691
  DialogClose,
4074
4692
  DialogContent,
@@ -4106,6 +4724,12 @@ export {
4106
4724
  EmptyStateHeader,
4107
4725
  EmptyStateMedia,
4108
4726
  EmptyStateTitle,
4727
+ ErrorBoundary,
4728
+ ErrorState,
4729
+ ErrorStateActions,
4730
+ ErrorStateDescription,
4731
+ ErrorStateIcon,
4732
+ ErrorStateTitle,
4109
4733
  Field,
4110
4734
  FieldContent,
4111
4735
  FieldDescription,
@@ -4116,6 +4740,9 @@ export {
4116
4740
  FieldSeparator,
4117
4741
  FieldSet,
4118
4742
  FieldTitle,
4743
+ FilterBar,
4744
+ FilterChip,
4745
+ FilterGroup,
4119
4746
  FormFeedback,
4120
4747
  FormRow,
4121
4748
  HighlightMatch,
@@ -4143,6 +4770,7 @@ export {
4143
4770
  MenuItem,
4144
4771
  MenuTrigger,
4145
4772
  MetricCard,
4773
+ MetricGrid,
4146
4774
  OtpInput2 as OtpInput,
4147
4775
  PageHeader,
4148
4776
  PageHeaderActions,
@@ -4154,12 +4782,18 @@ export {
4154
4782
  PopoverContent,
4155
4783
  PopoverTrigger,
4156
4784
  QuantityInput,
4785
+ SectionHeader,
4786
+ SectionHeaderActions,
4787
+ SectionHeaderDescription,
4788
+ SectionHeaderHeading,
4789
+ SectionHeaderTitle,
4157
4790
  Select,
4158
4791
  SelectContent,
4159
4792
  SelectItem,
4160
4793
  SelectList,
4161
4794
  SelectTrigger,
4162
4795
  SelectValue,
4796
+ SelectionToolbar,
4163
4797
  Separator,
4164
4798
  Sheet,
4165
4799
  SheetClose,
@@ -4189,10 +4823,13 @@ export {
4189
4823
  TableBody,
4190
4824
  TableCaption,
4191
4825
  TableCell,
4826
+ TableEmpty,
4192
4827
  TableFooter,
4193
4828
  TableHead,
4194
4829
  TableHeader,
4830
+ TableLoading,
4195
4831
  TableRow,
4832
+ TableToolbar,
4196
4833
  Tabs,
4197
4834
  TabsContent,
4198
4835
  TabsList,
@@ -4220,8 +4857,16 @@ export {
4220
4857
  formSnapshot,
4221
4858
  getTextMatchParts,
4222
4859
  inputGroupAddonVariants,
4860
+ readSearchParam,
4861
+ readSearchParamArray,
4862
+ readSearchParamEnum,
4863
+ readSearchParamInt,
4864
+ toSearchParams,
4223
4865
  toast,
4866
+ updateSearchParams,
4867
+ useAsyncAction,
4224
4868
  useAutosave,
4869
+ useClipboard,
4225
4870
  useDebouncedValue,
4226
4871
  useFormDirty,
4227
4872
  useFormFeedback,