@doscientos/ui 0.1.31 → 0.1.33

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
@@ -1589,24 +1746,66 @@ function ConfirmDialog({
1589
1746
  pending = false,
1590
1747
  onConfirm
1591
1748
  }) {
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
- ] }) });
1749
+ return /* @__PURE__ */ jsx17(
1750
+ AlertDialog,
1751
+ {
1752
+ open,
1753
+ onOpenChange: (nextOpen) => {
1754
+ if (!pending || nextOpen) onOpenChange(nextOpen);
1755
+ },
1756
+ children: /* @__PURE__ */ jsxs6(AlertDialogContent, { children: [
1757
+ /* @__PURE__ */ jsxs6(AlertDialogHeader, { children: [
1758
+ /* @__PURE__ */ jsx17(AlertDialogTitle, { children: title }),
1759
+ description ? /* @__PURE__ */ jsx17(AlertDialogDescription, { children: description }) : null
1760
+ ] }),
1761
+ /* @__PURE__ */ jsxs6(AlertDialogFooter, { children: [
1762
+ /* @__PURE__ */ jsx17(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
1763
+ /* @__PURE__ */ jsx17(
1764
+ Button,
1765
+ {
1766
+ variant: destructive ? "destructive" : "default",
1767
+ isDisabled: pending,
1768
+ onPress: onConfirm,
1769
+ children: confirmLabel
1770
+ }
1771
+ )
1772
+ ] })
1773
+ ] })
1774
+ }
1775
+ );
1776
+ }
1777
+
1778
+ // src/ui/copy-button/copy-button.tsx
1779
+ import { Check as Check2, Copy } from "lucide-react";
1780
+ import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
1781
+ function CopyButton({
1782
+ value,
1783
+ children,
1784
+ copiedLabel = "Copiado",
1785
+ resetMs,
1786
+ onCopied,
1787
+ onCopyError,
1788
+ ...props
1789
+ }) {
1790
+ const { copy, status } = useClipboard({ resetMs, onError: onCopyError });
1791
+ const copied = status === "copied";
1792
+ const label = copied ? copiedLabel : children ?? "Copiar";
1793
+ return /* @__PURE__ */ jsxs7(
1794
+ Button,
1795
+ {
1796
+ "aria-label": typeof label === "string" ? label : void 0,
1797
+ onPress: () => {
1798
+ void copy(value).then((wasCopied) => {
1799
+ if (wasCopied) onCopied?.(value);
1800
+ });
1801
+ },
1802
+ ...props,
1803
+ children: [
1804
+ copied ? /* @__PURE__ */ jsx18(Check2, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ jsx18(Copy, { "aria-hidden": "true", className: "size-3.5" }),
1805
+ label
1806
+ ]
1807
+ }
1808
+ );
1610
1809
  }
1611
1810
 
1612
1811
  // src/ui/danger-zone/danger-zone.tsx
@@ -1617,7 +1816,7 @@ import {
1617
1816
  DisclosurePanel,
1618
1817
  Heading as Heading2
1619
1818
  } from "react-aria-components";
1620
- import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
1819
+ import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
1621
1820
  function DangerZone({
1622
1821
  title = "Zona de peligro",
1623
1822
  description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
@@ -1625,34 +1824,269 @@ function DangerZone({
1625
1824
  className,
1626
1825
  children
1627
1826
  }) {
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(
1827
+ return /* @__PURE__ */ jsx19(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs8(Card, { className: cn("border-destructive/30", className), children: [
1828
+ /* @__PURE__ */ jsx19(Heading2, { className: "flex", children: /* @__PURE__ */ jsxs8(
1630
1829
  DisclosureButton,
1631
1830
  {
1632
1831
  slot: "trigger",
1633
1832
  "data-slot": "danger-zone-trigger",
1634
1833
  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
1834
  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 })
1835
+ /* @__PURE__ */ jsx19(ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
1836
+ /* @__PURE__ */ jsxs8("span", { className: "flex flex-1 flex-col gap-0.5", children: [
1837
+ /* @__PURE__ */ jsx19("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
1838
+ /* @__PURE__ */ jsx19("span", { className: "text-muted-foreground text-xs", children: description })
1640
1839
  ] }),
1641
- /* @__PURE__ */ jsx18(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
1840
+ /* @__PURE__ */ jsx19(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
1642
1841
  ]
1643
1842
  }
1644
1843
  ) }),
1645
- /* @__PURE__ */ jsx18(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx18(CardContent, { children }) })
1844
+ /* @__PURE__ */ jsx19(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx19(CardContent, { children }) })
1646
1845
  ] }) });
1647
1846
  }
1648
1847
 
1848
+ // src/ui/data-view-state/data-view-state.tsx
1849
+ import { jsx as jsx20 } from "react/jsx-runtime";
1850
+ function DataViewState({ className, ...props }) {
1851
+ return /* @__PURE__ */ jsx20(
1852
+ "section",
1853
+ {
1854
+ "data-slot": "data-view-state",
1855
+ className: cn(
1856
+ "flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
1857
+ className
1858
+ ),
1859
+ ...props
1860
+ }
1861
+ );
1862
+ }
1863
+ function DataViewStateTitle({ children, className, ...props }) {
1864
+ return /* @__PURE__ */ jsx20("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
1865
+ }
1866
+ function DataViewStateDescription({ className, ...props }) {
1867
+ return /* @__PURE__ */ jsx20(
1868
+ "p",
1869
+ {
1870
+ "data-slot": "data-view-state-description",
1871
+ className: cn("text-sm text-muted-foreground", className),
1872
+ ...props
1873
+ }
1874
+ );
1875
+ }
1876
+ function DataViewStateActions({ className, ...props }) {
1877
+ return /* @__PURE__ */ jsx20(
1878
+ "div",
1879
+ {
1880
+ "data-slot": "data-view-state-actions",
1881
+ className: cn("flex items-center gap-2", className),
1882
+ ...props
1883
+ }
1884
+ );
1885
+ }
1886
+
1887
+ // src/ui/description-list/description-list.tsx
1888
+ import { jsx as jsx21 } from "react/jsx-runtime";
1889
+ function DescriptionList({ className, ...props }) {
1890
+ return /* @__PURE__ */ jsx21(
1891
+ "dl",
1892
+ {
1893
+ "data-slot": "description-list",
1894
+ className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
1895
+ ...props
1896
+ }
1897
+ );
1898
+ }
1899
+ function DescriptionItem({ className, ...props }) {
1900
+ return /* @__PURE__ */ jsx21("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
1901
+ }
1902
+ function DescriptionTerm({ className, ...props }) {
1903
+ return /* @__PURE__ */ jsx21(
1904
+ "dt",
1905
+ {
1906
+ "data-slot": "description-term",
1907
+ className: cn("text-xs font-medium text-muted-foreground", className),
1908
+ ...props
1909
+ }
1910
+ );
1911
+ }
1912
+ function DescriptionDetails({ className, ...props }) {
1913
+ return /* @__PURE__ */ jsx21(
1914
+ "dd",
1915
+ {
1916
+ "data-slot": "description-details",
1917
+ className: cn("mt-1 wrap-break-word text-sm", className),
1918
+ ...props
1919
+ }
1920
+ );
1921
+ }
1922
+
1923
+ // src/ui/drawer/drawer.tsx
1924
+ import { XIcon as XIcon2 } from "lucide-react";
1925
+ import {
1926
+ Dialog as DrawerPrimitive,
1927
+ DialogTrigger as DrawerTriggerPrimitive,
1928
+ Heading as Heading3,
1929
+ ModalOverlay as ModalOverlayPrimitive,
1930
+ Modal as ModalPrimitive,
1931
+ Text as Text3
1932
+ } from "react-aria-components";
1933
+ import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1934
+ function DrawerTrigger({ ...props }) {
1935
+ return /* @__PURE__ */ jsx22(DrawerTriggerPrimitive, { "data-slot": "drawer-trigger", ...props });
1936
+ }
1937
+ function DrawerClose({ className, variant = "outline", size = "default", ...props }) {
1938
+ return /* @__PURE__ */ jsx22(
1939
+ Button,
1940
+ {
1941
+ slot: "close",
1942
+ "data-slot": "drawer-close",
1943
+ variant,
1944
+ size,
1945
+ className: cn(className),
1946
+ ...props
1947
+ }
1948
+ );
1949
+ }
1950
+ function DrawerOverlay({
1951
+ className,
1952
+ children,
1953
+ ...props
1954
+ }) {
1955
+ return /* @__PURE__ */ jsx22(
1956
+ ModalOverlayPrimitive,
1957
+ {
1958
+ "data-slot": "drawer-overlay",
1959
+ isDismissable: true,
1960
+ className: cn(
1961
+ "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",
1962
+ className
1963
+ ),
1964
+ ...props,
1965
+ children
1966
+ }
1967
+ );
1968
+ }
1969
+ function DrawerContent({
1970
+ className,
1971
+ children,
1972
+ dialogProps,
1973
+ side = "right",
1974
+ showCloseButton = true,
1975
+ ...props
1976
+ }) {
1977
+ return /* @__PURE__ */ jsx22(DrawerOverlay, { ...props, children: /* @__PURE__ */ jsx22(
1978
+ ModalPrimitive,
1979
+ {
1980
+ "data-slot": "drawer-content",
1981
+ "data-side": side,
1982
+ className: cn(
1983
+ "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",
1984
+ className
1985
+ ),
1986
+ children: /* @__PURE__ */ jsxs9(
1987
+ DrawerPrimitive,
1988
+ {
1989
+ "data-slot": "drawer",
1990
+ className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
1991
+ ...dialogProps,
1992
+ children: [
1993
+ children,
1994
+ showCloseButton && /* @__PURE__ */ jsxs9(DrawerClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
1995
+ /* @__PURE__ */ jsx22(XIcon2, {}),
1996
+ /* @__PURE__ */ jsx22("span", { className: "sr-only", children: "Cerrar" })
1997
+ ] })
1998
+ ]
1999
+ }
2000
+ )
2001
+ }
2002
+ ) });
2003
+ }
2004
+ function Drawer(props) {
2005
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx22(DrawerContent, { ...props });
2006
+ const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
2007
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx22(Button, { ...triggerProps, children: trigger }) : trigger;
2008
+ return /* @__PURE__ */ jsxs9(DrawerTrigger, { defaultOpen, isOpen, onOpenChange, children: [
2009
+ triggerElement,
2010
+ /* @__PURE__ */ jsx22(DrawerContent, { ...contentProps, children })
2011
+ ] });
2012
+ }
2013
+ function DrawerHeader({ className, ...props }) {
2014
+ return /* @__PURE__ */ jsx22(
2015
+ "div",
2016
+ {
2017
+ "data-slot": "drawer-header",
2018
+ className: cn("flex flex-col gap-0.5 p-4", className),
2019
+ ...props
2020
+ }
2021
+ );
2022
+ }
2023
+ function DrawerFooter({ className, ...props }) {
2024
+ return /* @__PURE__ */ jsx22(
2025
+ "div",
2026
+ {
2027
+ "data-slot": "drawer-footer",
2028
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2029
+ ...props
2030
+ }
2031
+ );
2032
+ }
2033
+ function DrawerTitle({ className, ...props }) {
2034
+ return /* @__PURE__ */ jsx22(
2035
+ Heading3,
2036
+ {
2037
+ slot: "title",
2038
+ "data-slot": "drawer-title",
2039
+ className: cn("text-base font-medium text-foreground", className),
2040
+ ...props
2041
+ }
2042
+ );
2043
+ }
2044
+ function DrawerDescription({
2045
+ className,
2046
+ ...props
2047
+ }) {
2048
+ return /* @__PURE__ */ jsx22(
2049
+ Text3,
2050
+ {
2051
+ slot: "description",
2052
+ "data-slot": "drawer-description",
2053
+ className: cn("text-sm text-muted-foreground", className),
2054
+ ...props
2055
+ }
2056
+ );
2057
+ }
2058
+ var Sheet = DrawerContent;
2059
+ var SheetClose = DrawerClose;
2060
+ var SheetContent = DrawerContent;
2061
+ var SheetDescription = DrawerDescription;
2062
+ var SheetFooter = DrawerFooter;
2063
+ var SheetHeader = DrawerHeader;
2064
+ var SheetTitle = DrawerTitle;
2065
+ var SheetTrigger = DrawerTrigger;
2066
+
2067
+ // src/ui/detail-drawer/detail-drawer.tsx
2068
+ import { jsx as jsx23 } from "react/jsx-runtime";
2069
+ function DetailDrawer({ children, ...props }) {
2070
+ return /* @__PURE__ */ jsx23(DrawerContent, { ...props, children });
2071
+ }
2072
+ function DetailDrawerBody({ className, ...props }) {
2073
+ return /* @__PURE__ */ jsx23(
2074
+ "div",
2075
+ {
2076
+ "data-slot": "detail-drawer-body",
2077
+ className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
2078
+ ...props
2079
+ }
2080
+ );
2081
+ }
2082
+
1649
2083
  // src/ui/doc-preview/doc-preview.tsx
1650
2084
  import { FileText, Image } from "lucide-react";
1651
- import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
2085
+ import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
1652
2086
  function DocPreview({ url, mimeType, name }) {
1653
- if (!url) return /* @__PURE__ */ jsx19(Fallback, { mimeType, reason: "no-url" });
2087
+ if (!url) return /* @__PURE__ */ jsx24(Fallback, { mimeType, reason: "no-url" });
1654
2088
  if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
1655
- return /* @__PURE__ */ jsx19(
2089
+ return /* @__PURE__ */ jsx24(
1656
2090
  "iframe",
1657
2091
  {
1658
2092
  src: url,
@@ -1663,9 +2097,9 @@ function DocPreview({ url, mimeType, name }) {
1663
2097
  );
1664
2098
  }
1665
2099
  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" }) });
2100
+ return /* @__PURE__ */ jsx24("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ jsx24("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
1667
2101
  }
1668
- return /* @__PURE__ */ jsx19(Fallback, { mimeType, reason: "unsupported" });
2102
+ return /* @__PURE__ */ jsx24(Fallback, { mimeType, reason: "unsupported" });
1669
2103
  }
1670
2104
  function Fallback({
1671
2105
  mimeType,
@@ -1673,11 +2107,11 @@ function Fallback({
1673
2107
  }) {
1674
2108
  const Icon = mimeType?.startsWith("image/") ? Image : FileText;
1675
2109
  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." })
2110
+ return /* @__PURE__ */ jsxs10("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
2111
+ /* @__PURE__ */ jsx24(Icon, { className: "size-9 opacity-30" }),
2112
+ /* @__PURE__ */ jsx24("p", { className: "text-sm", children: message }),
2113
+ mimeType ? /* @__PURE__ */ jsx24("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
2114
+ /* @__PURE__ */ jsx24("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
1681
2115
  ] });
1682
2116
  }
1683
2117
 
@@ -1696,9 +2130,9 @@ import {
1696
2130
  Separator as SeparatorPrimitive2,
1697
2131
  SubmenuTrigger as SubmenuTriggerPrimitive
1698
2132
  } from "react-aria-components";
1699
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
2133
+ import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
1700
2134
  function DropdownMenuTrigger({ ...props }) {
1701
- return /* @__PURE__ */ jsx20(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
2135
+ return /* @__PURE__ */ jsx25(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
1702
2136
  }
1703
2137
  function DropdownMenuContent({
1704
2138
  "data-slot": dataSlot = "dropdown-menu-content",
@@ -1709,7 +2143,7 @@ function DropdownMenuContent({
1709
2143
  children,
1710
2144
  ...props
1711
2145
  }) {
1712
- return /* @__PURE__ */ jsx20(
2146
+ return /* @__PURE__ */ jsx25(
1713
2147
  PopoverPrimitive,
1714
2148
  {
1715
2149
  "data-slot": dataSlot,
@@ -1717,10 +2151,11 @@ function DropdownMenuContent({
1717
2151
  offset,
1718
2152
  crossOffset,
1719
2153
  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",
2154
+ floatingSurfaceClassName,
2155
+ "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",
1721
2156
  className
1722
2157
  ),
1723
- children: /* @__PURE__ */ jsx20(
2158
+ children: /* @__PURE__ */ jsx25(
1724
2159
  MenuPrimitive,
1725
2160
  {
1726
2161
  className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
@@ -1732,25 +2167,25 @@ function DropdownMenuContent({
1732
2167
  );
1733
2168
  }
1734
2169
  function DropdownMenu(props) {
1735
- if (!("trigger" in props)) return /* @__PURE__ */ jsx20(DropdownMenuContent, { ...props });
2170
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx25(DropdownMenuContent, { ...props });
1736
2171
  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: [
2172
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx25(Button, { ...triggerProps, children: trigger }) : trigger;
2173
+ return /* @__PURE__ */ jsxs11(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
1739
2174
  triggerElement,
1740
- /* @__PURE__ */ jsx20(DropdownMenuContent, { ...contentProps, children })
2175
+ /* @__PURE__ */ jsx25(DropdownMenuContent, { ...contentProps, children })
1741
2176
  ] });
1742
2177
  }
1743
2178
  function DropdownMenuGroup({
1744
2179
  ...props
1745
2180
  }) {
1746
- return /* @__PURE__ */ jsx20(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
2181
+ return /* @__PURE__ */ jsx25(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
1747
2182
  }
1748
2183
  function DropdownMenuLabel({
1749
2184
  className,
1750
2185
  inset,
1751
2186
  ...props
1752
2187
  }) {
1753
- return /* @__PURE__ */ jsx20(
2188
+ return /* @__PURE__ */ jsx25(
1754
2189
  HeaderPrimitive,
1755
2190
  {
1756
2191
  "data-slot": "dropdown-menu-label",
@@ -1782,7 +2217,7 @@ function DropdownMenuItem({
1782
2217
  children,
1783
2218
  ...props
1784
2219
  }) {
1785
- return /* @__PURE__ */ jsx20(
2220
+ return /* @__PURE__ */ jsx25(
1786
2221
  MenuItemPrimitive,
1787
2222
  {
1788
2223
  "data-slot": "dropdown-menu-item",
@@ -1794,13 +2229,13 @@ function DropdownMenuItem({
1794
2229
  (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
1795
2230
  ),
1796
2231
  ...props,
1797
- children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs9(Fragment5, { children: [
1798
- selectionMode !== "none" ? /* @__PURE__ */ jsx20(
2232
+ children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs11(Fragment5, { children: [
2233
+ selectionMode !== "none" ? /* @__PURE__ */ jsx25(
1799
2234
  "span",
1800
2235
  {
1801
2236
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
1802
2237
  "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
1803
- children: isSelected ? /* @__PURE__ */ jsx20(CheckIcon, {}) : null
2238
+ children: isSelected ? /* @__PURE__ */ jsx25(CheckIcon, {}) : null
1804
2239
  }
1805
2240
  ) : null,
1806
2241
  children2
@@ -1809,7 +2244,7 @@ function DropdownMenuItem({
1809
2244
  );
1810
2245
  }
1811
2246
  function DropdownMenuSub({ ...props }) {
1812
- return /* @__PURE__ */ jsx20(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
2247
+ return /* @__PURE__ */ jsx25(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
1813
2248
  }
1814
2249
  function DropdownMenuSubTrigger({
1815
2250
  className,
@@ -1817,7 +2252,7 @@ function DropdownMenuSubTrigger({
1817
2252
  children,
1818
2253
  ...props
1819
2254
  }) {
1820
- return /* @__PURE__ */ jsx20(
2255
+ return /* @__PURE__ */ jsx25(
1821
2256
  MenuItemPrimitive,
1822
2257
  {
1823
2258
  "data-slot": "dropdown-menu-sub-trigger",
@@ -1828,9 +2263,9 @@ function DropdownMenuSubTrigger({
1828
2263
  className
1829
2264
  ),
1830
2265
  ...props,
1831
- children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs9(Fragment5, { children: [
2266
+ children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs11(Fragment5, { children: [
1832
2267
  children2,
1833
- /* @__PURE__ */ jsx20(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
2268
+ /* @__PURE__ */ jsx25(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
1834
2269
  ] }))
1835
2270
  }
1836
2271
  );
@@ -1842,7 +2277,7 @@ function DropdownMenuSubContent({
1842
2277
  className,
1843
2278
  ...props
1844
2279
  }) {
1845
- return /* @__PURE__ */ jsx20(
2280
+ return /* @__PURE__ */ jsx25(
1846
2281
  DropdownMenuContent,
1847
2282
  {
1848
2283
  "data-slot": "dropdown-menu-sub-content",
@@ -1861,7 +2296,7 @@ function DropdownMenuSeparator({
1861
2296
  className,
1862
2297
  ...props
1863
2298
  }) {
1864
- return /* @__PURE__ */ jsx20(
2299
+ return /* @__PURE__ */ jsx25(
1865
2300
  SeparatorPrimitive2,
1866
2301
  {
1867
2302
  "data-slot": "dropdown-menu-separator",
@@ -1871,7 +2306,7 @@ function DropdownMenuSeparator({
1871
2306
  );
1872
2307
  }
1873
2308
  function DropdownMenuShortcut({ className, ...props }) {
1874
- return /* @__PURE__ */ jsx20(
2309
+ return /* @__PURE__ */ jsx25(
1875
2310
  "span",
1876
2311
  {
1877
2312
  "data-slot": "dropdown-menu-shortcut",
@@ -1900,9 +2335,9 @@ var emptyStateMediaVariants = cva7(
1900
2335
  );
1901
2336
 
1902
2337
  // src/ui/empty-state/empty-state.tsx
1903
- import { jsx as jsx21 } from "react/jsx-runtime";
2338
+ import { jsx as jsx26 } from "react/jsx-runtime";
1904
2339
  function EmptyState({ className, ...props }) {
1905
- return /* @__PURE__ */ jsx21(
2340
+ return /* @__PURE__ */ jsx26(
1906
2341
  "div",
1907
2342
  {
1908
2343
  "data-slot": "empty-state",
@@ -1915,7 +2350,7 @@ function EmptyState({ className, ...props }) {
1915
2350
  );
1916
2351
  }
1917
2352
  function EmptyStateHeader({ className, ...props }) {
1918
- return /* @__PURE__ */ jsx21(
2353
+ return /* @__PURE__ */ jsx26(
1919
2354
  "div",
1920
2355
  {
1921
2356
  "data-slot": "empty-state-header",
@@ -1929,7 +2364,7 @@ function EmptyStateMedia({
1929
2364
  variant = "default",
1930
2365
  ...props
1931
2366
  }) {
1932
- return /* @__PURE__ */ jsx21(
2367
+ return /* @__PURE__ */ jsx26(
1933
2368
  "div",
1934
2369
  {
1935
2370
  "data-slot": "empty-state-media",
@@ -1940,7 +2375,7 @@ function EmptyStateMedia({
1940
2375
  );
1941
2376
  }
1942
2377
  function EmptyStateTitle({ className, children, ...props }) {
1943
- return /* @__PURE__ */ jsx21(
2378
+ return /* @__PURE__ */ jsx26(
1944
2379
  "h3",
1945
2380
  {
1946
2381
  "data-slot": "empty-state-title",
@@ -1951,7 +2386,7 @@ function EmptyStateTitle({ className, children, ...props }) {
1951
2386
  );
1952
2387
  }
1953
2388
  function EmptyStateDescription({ className, ...props }) {
1954
- return /* @__PURE__ */ jsx21(
2389
+ return /* @__PURE__ */ jsx26(
1955
2390
  "p",
1956
2391
  {
1957
2392
  "data-slot": "empty-state-description",
@@ -1964,7 +2399,7 @@ function EmptyStateDescription({ className, ...props }) {
1964
2399
  );
1965
2400
  }
1966
2401
  function EmptyStateContent({ className, ...props }) {
1967
- return /* @__PURE__ */ jsx21(
2402
+ return /* @__PURE__ */ jsx26(
1968
2403
  "div",
1969
2404
  {
1970
2405
  "data-slot": "empty-state-content",
@@ -1977,19 +2412,126 @@ function EmptyStateContent({ className, ...props }) {
1977
2412
  );
1978
2413
  }
1979
2414
 
1980
- // src/ui/label/label.tsx
1981
- import { forwardRef } from "react";
1982
- import { Label as LabelPrimitive } from "react-aria-components";
1983
- import { jsx as jsx22 } from "react/jsx-runtime";
1984
- var Label2 = forwardRef(
1985
- function Label3({ className, ...props }, ref) {
1986
- return /* @__PURE__ */ jsx22(
1987
- LabelPrimitive,
1988
- {
1989
- ref,
1990
- "data-slot": "label",
1991
- className: cn(
1992
- "flex items-center gap-2 text-sm font-medium leading-none select-none",
2415
+ // src/ui/error-boundary/error-boundary.tsx
2416
+ import { Component, Suspense } from "react";
2417
+
2418
+ // src/ui/error-state/error-state.tsx
2419
+ import { AlertCircle } from "lucide-react";
2420
+ import { jsx as jsx27 } from "react/jsx-runtime";
2421
+ function ErrorState({ className, ...props }) {
2422
+ return /* @__PURE__ */ jsx27(
2423
+ "section",
2424
+ {
2425
+ "data-slot": "error-state",
2426
+ role: "alert",
2427
+ className: cn(
2428
+ "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",
2429
+ className
2430
+ ),
2431
+ ...props
2432
+ }
2433
+ );
2434
+ }
2435
+ function ErrorStateIcon({
2436
+ className,
2437
+ ...props
2438
+ }) {
2439
+ return /* @__PURE__ */ jsx27(
2440
+ AlertCircle,
2441
+ {
2442
+ "data-slot": "error-state-icon",
2443
+ "aria-hidden": "true",
2444
+ className: cn("size-6 text-destructive", className),
2445
+ ...props
2446
+ }
2447
+ );
2448
+ }
2449
+ function ErrorStateTitle({ className, ...props }) {
2450
+ return /* @__PURE__ */ jsx27(
2451
+ "h2",
2452
+ {
2453
+ "data-slot": "error-state-title",
2454
+ className: cn("font-semibold text-foreground", className),
2455
+ ...props
2456
+ }
2457
+ );
2458
+ }
2459
+ function ErrorStateDescription({ className, ...props }) {
2460
+ return /* @__PURE__ */ jsx27(
2461
+ "p",
2462
+ {
2463
+ "data-slot": "error-state-description",
2464
+ className: cn("max-w-md text-sm text-muted-foreground", className),
2465
+ ...props
2466
+ }
2467
+ );
2468
+ }
2469
+ function ErrorStateActions({ className, ...props }) {
2470
+ return /* @__PURE__ */ jsx27(
2471
+ "div",
2472
+ {
2473
+ "data-slot": "error-state-actions",
2474
+ className: cn("flex items-center gap-2", className),
2475
+ ...props
2476
+ }
2477
+ );
2478
+ }
2479
+
2480
+ // src/ui/error-boundary/error-boundary.tsx
2481
+ import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
2482
+ function changedResetKeys(previous = [], next = []) {
2483
+ return previous.length !== next.length || previous.some((value, index) => !Object.is(value, next[index]));
2484
+ }
2485
+ var Boundary = class extends Component {
2486
+ state = { error: null };
2487
+ static getDerivedStateFromError(error) {
2488
+ return { error };
2489
+ }
2490
+ componentDidCatch(error, info) {
2491
+ this.props.onError?.(error, info);
2492
+ }
2493
+ componentDidUpdate(previousProps) {
2494
+ if (this.state.error && changedResetKeys(previousProps.resetKeys, this.props.resetKeys))
2495
+ this.reset();
2496
+ }
2497
+ reset = () => this.setState({ error: null });
2498
+ render() {
2499
+ const { children, fallback } = this.props;
2500
+ if (!this.state.error) return children;
2501
+ if (typeof fallback === "function")
2502
+ return fallback({ error: this.state.error, reset: this.reset });
2503
+ if (fallback) return fallback;
2504
+ return /* @__PURE__ */ jsxs12(ErrorState, { children: [
2505
+ /* @__PURE__ */ jsx28(ErrorStateIcon, {}),
2506
+ /* @__PURE__ */ jsx28(ErrorStateTitle, { children: "No se pudo cargar este contenido" }),
2507
+ /* @__PURE__ */ jsx28(ErrorStateDescription, { children: "Prueba a cargarlo de nuevo." }),
2508
+ /* @__PURE__ */ jsx28(ErrorStateActions, { children: /* @__PURE__ */ jsx28(Button, { onPress: this.reset, children: "Reintentar" }) })
2509
+ ] });
2510
+ }
2511
+ };
2512
+ function ErrorBoundary(props) {
2513
+ return /* @__PURE__ */ jsx28(Boundary, { ...props });
2514
+ }
2515
+ function AsyncBoundary({
2516
+ pending = null,
2517
+ ...props
2518
+ }) {
2519
+ return /* @__PURE__ */ jsx28(ErrorBoundary, { ...props, children: /* @__PURE__ */ jsx28(Suspense, { fallback: pending, children: props.children }) });
2520
+ }
2521
+
2522
+ // src/ui/label/label.tsx
2523
+ import { forwardRef } from "react";
2524
+ import { Label as LabelPrimitive } from "react-aria-components";
2525
+ import { jsx as jsx29 } from "react/jsx-runtime";
2526
+ var Label2 = forwardRef(
2527
+ function Label3({ className, ...props }, ref) {
2528
+ return /* @__PURE__ */ jsx29(
2529
+ LabelPrimitive,
2530
+ {
2531
+ ref,
2532
+ "data-slot": "label",
2533
+ className: cn(
2534
+ "flex items-center gap-2 text-sm font-medium leading-none select-none",
1993
2535
  className
1994
2536
  ),
1995
2537
  ...props
@@ -2015,16 +2557,16 @@ var fieldVariants = cva8(
2015
2557
  );
2016
2558
 
2017
2559
  // src/ui/field/field.tsx
2018
- import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
2560
+ import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
2019
2561
  function FieldSet({ className, ...props }) {
2020
- return /* @__PURE__ */ jsx23("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2562
+ return /* @__PURE__ */ jsx30("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2021
2563
  }
2022
2564
  function FieldLegend({
2023
2565
  className,
2024
2566
  variant = "legend",
2025
2567
  ...props
2026
2568
  }) {
2027
- return /* @__PURE__ */ jsx23(
2569
+ return /* @__PURE__ */ jsx30(
2028
2570
  "legend",
2029
2571
  {
2030
2572
  "data-slot": "field-legend",
@@ -2038,7 +2580,7 @@ function FieldLegend({
2038
2580
  );
2039
2581
  }
2040
2582
  function FieldGroup({ className, ...props }) {
2041
- return /* @__PURE__ */ jsx23(
2583
+ return /* @__PURE__ */ jsx30(
2042
2584
  "div",
2043
2585
  {
2044
2586
  "data-slot": "field-group",
@@ -2053,7 +2595,7 @@ function FieldGroup({ className, ...props }) {
2053
2595
  function Field({ className, orientation = "vertical", ...props }) {
2054
2596
  return (
2055
2597
  // biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
2056
- /* @__PURE__ */ jsx23(
2598
+ /* @__PURE__ */ jsx30(
2057
2599
  "div",
2058
2600
  {
2059
2601
  role: "group",
@@ -2066,7 +2608,7 @@ function Field({ className, orientation = "vertical", ...props }) {
2066
2608
  );
2067
2609
  }
2068
2610
  function FieldContent({ className, ...props }) {
2069
- return /* @__PURE__ */ jsx23(
2611
+ return /* @__PURE__ */ jsx30(
2070
2612
  "div",
2071
2613
  {
2072
2614
  "data-slot": "field-content",
@@ -2076,7 +2618,7 @@ function FieldContent({ className, ...props }) {
2076
2618
  );
2077
2619
  }
2078
2620
  function FieldLabel({ className, ...props }) {
2079
- return /* @__PURE__ */ jsx23(
2621
+ return /* @__PURE__ */ jsx30(
2080
2622
  Label2,
2081
2623
  {
2082
2624
  "data-slot": "field-label",
@@ -2089,7 +2631,7 @@ function FieldLabel({ className, ...props }) {
2089
2631
  );
2090
2632
  }
2091
2633
  function FieldTitle({ className, ...props }) {
2092
- return /* @__PURE__ */ jsx23(
2634
+ return /* @__PURE__ */ jsx30(
2093
2635
  "div",
2094
2636
  {
2095
2637
  "data-slot": "field-title",
@@ -2099,7 +2641,7 @@ function FieldTitle({ className, ...props }) {
2099
2641
  );
2100
2642
  }
2101
2643
  function FieldDescription({ className, ...props }) {
2102
- return /* @__PURE__ */ jsx23(
2644
+ return /* @__PURE__ */ jsx30(
2103
2645
  "p",
2104
2646
  {
2105
2647
  "data-slot": "field-description",
@@ -2112,7 +2654,7 @@ function FieldDescription({ className, ...props }) {
2112
2654
  );
2113
2655
  }
2114
2656
  function FieldSeparator({ className, children, ...props }) {
2115
- return /* @__PURE__ */ jsxs10(
2657
+ return /* @__PURE__ */ jsxs13(
2116
2658
  "div",
2117
2659
  {
2118
2660
  "data-slot": "field-separator",
@@ -2120,8 +2662,8 @@ function FieldSeparator({ className, children, ...props }) {
2120
2662
  className: cn("relative -my-2 h-5 text-sm", className),
2121
2663
  ...props,
2122
2664
  children: [
2123
- /* @__PURE__ */ jsx23(Separator, { className: "absolute inset-0 top-1/2" }),
2124
- children ? /* @__PURE__ */ jsx23(
2665
+ /* @__PURE__ */ jsx30(Separator, { className: "absolute inset-0 top-1/2" }),
2666
+ children ? /* @__PURE__ */ jsx30(
2125
2667
  "span",
2126
2668
  {
2127
2669
  "data-slot": "field-separator-content",
@@ -2135,9 +2677,9 @@ function FieldSeparator({ className, children, ...props }) {
2135
2677
  }
2136
2678
  function FieldError2({ className, children, errors, ...props }) {
2137
2679
  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);
2680
+ const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx30("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx30("li", { children: message }, message)) }) : null);
2139
2681
  if (!content) return null;
2140
- return /* @__PURE__ */ jsx23(
2682
+ return /* @__PURE__ */ jsx30(
2141
2683
  "div",
2142
2684
  {
2143
2685
  role: "alert",
@@ -2149,9 +2691,53 @@ function FieldError2({ className, children, errors, ...props }) {
2149
2691
  );
2150
2692
  }
2151
2693
 
2694
+ // src/ui/filter-bar/filter-bar.tsx
2695
+ import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
2696
+ function FilterBar({ className, ...props }) {
2697
+ return /* @__PURE__ */ jsx31(
2698
+ "div",
2699
+ {
2700
+ "data-slot": "filter-bar",
2701
+ className: cn("flex flex-wrap items-center gap-2", className),
2702
+ ...props
2703
+ }
2704
+ );
2705
+ }
2706
+ function FilterGroup({ className, ...props }) {
2707
+ return /* @__PURE__ */ jsx31(
2708
+ "div",
2709
+ {
2710
+ "data-slot": "filter-group",
2711
+ className: cn("flex flex-wrap items-center gap-2", className),
2712
+ ...props
2713
+ }
2714
+ );
2715
+ }
2716
+ function ActiveFilters({ className, ...props }) {
2717
+ return /* @__PURE__ */ jsx31(
2718
+ "div",
2719
+ {
2720
+ "data-slot": "active-filters",
2721
+ "aria-label": "Filtros activos",
2722
+ className: cn("flex flex-wrap items-center gap-1.5", className),
2723
+ ...props
2724
+ }
2725
+ );
2726
+ }
2727
+ function FilterChip({
2728
+ children,
2729
+ onRemove,
2730
+ ...props
2731
+ }) {
2732
+ return /* @__PURE__ */ jsxs14(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
2733
+ children,
2734
+ " \xD7"
2735
+ ] });
2736
+ }
2737
+
2152
2738
  // src/ui/form-feedback/form-feedback.tsx
2153
2739
  import { CheckCircle, CircleAlert, LoaderCircle } from "lucide-react";
2154
- import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2740
+ import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
2155
2741
  function FormFeedback({
2156
2742
  state,
2157
2743
  className,
@@ -2159,14 +2745,14 @@ function FormFeedback({
2159
2745
  successLabel = "Guardado"
2160
2746
  }) {
2161
2747
  if (state.status === "idle")
2162
- return /* @__PURE__ */ jsx24("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2748
+ return /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2163
2749
  const error = state.status === "error";
2164
2750
  const success = state.status === "success";
2165
- return /* @__PURE__ */ jsxs11(
2751
+ return /* @__PURE__ */ jsxs15(
2166
2752
  "span",
2167
2753
  {
2168
2754
  role: error ? "alert" : "status",
2169
- "aria-live": "polite",
2755
+ "aria-live": error ? "assertive" : "polite",
2170
2756
  className: cn(
2171
2757
  "inline-flex h-5 items-center gap-1.5 text-xs",
2172
2758
  error && "text-destructive",
@@ -2175,31 +2761,31 @@ function FormFeedback({
2175
2761
  className
2176
2762
  ),
2177
2763
  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 })
2764
+ state.status === "pending" && /* @__PURE__ */ jsx32(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2765
+ success && /* @__PURE__ */ jsx32(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2766
+ error && /* @__PURE__ */ jsx32(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2767
+ /* @__PURE__ */ jsx32("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2182
2768
  ]
2183
2769
  }
2184
2770
  );
2185
2771
  }
2186
2772
 
2187
2773
  // src/ui/form-feedback/use-form-feedback.ts
2188
- import { useCallback as useCallback5, useEffect as useEffect4, useRef as useRef3, useState as useState9 } from "react";
2774
+ import { useCallback as useCallback7, useEffect as useEffect5, useRef as useRef5, useState as useState11 } from "react";
2189
2775
  function useFormFeedback(options) {
2190
2776
  const resetMs = options?.successResetMs ?? 2500;
2191
- const [state, setState] = useState9({ status: "idle" });
2192
- const timer = useRef3(null);
2193
- const clearTimer = useCallback5(() => {
2777
+ const [state, setState] = useState11({ status: "idle" });
2778
+ const timer = useRef5(null);
2779
+ const clearTimer = useCallback7(() => {
2194
2780
  if (timer.current) clearTimeout(timer.current);
2195
2781
  timer.current = null;
2196
2782
  }, []);
2197
- useEffect4(() => () => clearTimer(), [clearTimer]);
2198
- const setPending = useCallback5(() => {
2783
+ useEffect5(() => () => clearTimer(), [clearTimer]);
2784
+ const setPending = useCallback7(() => {
2199
2785
  clearTimer();
2200
2786
  setState({ status: "pending" });
2201
2787
  }, [clearTimer]);
2202
- const setSuccess = useCallback5(
2788
+ const setSuccess = useCallback7(
2203
2789
  (message) => {
2204
2790
  clearTimer();
2205
2791
  setState({ status: "success", message });
@@ -2207,14 +2793,14 @@ function useFormFeedback(options) {
2207
2793
  },
2208
2794
  [clearTimer, resetMs]
2209
2795
  );
2210
- const setError = useCallback5(
2796
+ const setError = useCallback7(
2211
2797
  (message) => {
2212
2798
  clearTimer();
2213
2799
  setState({ status: "error", message });
2214
2800
  },
2215
2801
  [clearTimer]
2216
2802
  );
2217
- const reset = useCallback5(() => {
2803
+ const reset = useCallback7(() => {
2218
2804
  clearTimer();
2219
2805
  setState({ status: "idle" });
2220
2806
  }, [clearTimer]);
@@ -2222,7 +2808,7 @@ function useFormFeedback(options) {
2222
2808
  }
2223
2809
 
2224
2810
  // src/ui/form-row/form-row.tsx
2225
- import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
2811
+ import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
2226
2812
  function FormRow({
2227
2813
  label,
2228
2814
  htmlFor,
@@ -2234,17 +2820,17 @@ function FormRow({
2234
2820
  }) {
2235
2821
  const hintId = hint ? `${htmlFor}-hint` : void 0;
2236
2822
  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: [
2823
+ return /* @__PURE__ */ jsxs16("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2824
+ /* @__PURE__ */ jsxs16("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
2239
2825
  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)" })
2826
+ required && /* @__PURE__ */ jsxs16(Fragment6, { children: [
2827
+ /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
2828
+ /* @__PURE__ */ jsx33("span", { className: "sr-only", children: " (obligatorio)" })
2243
2829
  ] })
2244
2830
  ] }),
2245
2831
  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 })
2832
+ hint && /* @__PURE__ */ jsx33("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
2833
+ error && /* @__PURE__ */ jsx33("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
2248
2834
  ] });
2249
2835
  }
2250
2836
 
@@ -2257,17 +2843,17 @@ import {
2257
2843
  Tooltip as TooltipPrimitive,
2258
2844
  TooltipTrigger as TooltipTriggerPrimitive
2259
2845
  } from "react-aria-components";
2260
- import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2846
+ import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
2261
2847
  function TooltipTrigger({
2262
2848
  delay = 0,
2263
2849
  ...props
2264
2850
  }) {
2265
- return /* @__PURE__ */ jsx26(TooltipTriggerPrimitive, { "data-slot": "tooltip-trigger", delay, ...props });
2851
+ return /* @__PURE__ */ jsx34(TooltipTriggerPrimitive, { "data-slot": "tooltip-trigger", delay, ...props });
2266
2852
  }
2267
2853
  function Tooltip({ label, children, delay, ...props }) {
2268
- return /* @__PURE__ */ jsxs13(TooltipTrigger, { delay, children: [
2854
+ return /* @__PURE__ */ jsxs17(TooltipTrigger, { delay, children: [
2269
2855
  children,
2270
- /* @__PURE__ */ jsx26(TooltipContent, { ...props, children: label })
2856
+ /* @__PURE__ */ jsx34(TooltipContent, { ...props, children: label })
2271
2857
  ] });
2272
2858
  }
2273
2859
  function TooltipContent({
@@ -2278,7 +2864,7 @@ function TooltipContent({
2278
2864
  children,
2279
2865
  ...props
2280
2866
  }) {
2281
- return /* @__PURE__ */ jsxs13(
2867
+ return /* @__PURE__ */ jsxs17(
2282
2868
  TooltipPrimitive,
2283
2869
  {
2284
2870
  "data-slot": "tooltip-content",
@@ -2292,7 +2878,7 @@ function TooltipContent({
2292
2878
  ...props,
2293
2879
  children: [
2294
2880
  children,
2295
- /* @__PURE__ */ jsx26(
2881
+ /* @__PURE__ */ jsx34(
2296
2882
  OverlayArrow,
2297
2883
  {
2298
2884
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
@@ -2310,7 +2896,7 @@ function TooltipContent({
2310
2896
  }
2311
2897
 
2312
2898
  // src/ui/icon-button/icon-button.tsx
2313
- import { jsx as jsx27 } from "react/jsx-runtime";
2899
+ import { jsx as jsx35 } from "react/jsx-runtime";
2314
2900
  function IconButton({
2315
2901
  label,
2316
2902
  children,
@@ -2320,7 +2906,7 @@ function IconButton({
2320
2906
  ...props
2321
2907
  }) {
2322
2908
  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(
2909
+ return /* @__PURE__ */ jsx35(Tooltip, { label, children: href ? /* @__PURE__ */ jsx35(Link2, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ jsx35(
2324
2910
  Button,
2325
2911
  {
2326
2912
  "data-slot": "icon-button",
@@ -2340,9 +2926,9 @@ import { cva as cva10 } from "class-variance-authority";
2340
2926
  // src/ui/input/input.tsx
2341
2927
  import { forwardRef as forwardRef2 } from "react";
2342
2928
  import { Input as AriaInput2 } from "react-aria-components";
2343
- import { jsx as jsx28 } from "react/jsx-runtime";
2929
+ import { jsx as jsx36 } from "react/jsx-runtime";
2344
2930
  var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
2345
- return /* @__PURE__ */ jsx28(
2931
+ return /* @__PURE__ */ jsx36(
2346
2932
  AriaInput2,
2347
2933
  {
2348
2934
  ref,
@@ -2363,9 +2949,9 @@ import { forwardRef as forwardRef3 } from "react";
2363
2949
  import {
2364
2950
  TextArea as AriaTextArea
2365
2951
  } from "react-aria-components";
2366
- import { jsx as jsx29 } from "react/jsx-runtime";
2952
+ import { jsx as jsx37 } from "react/jsx-runtime";
2367
2953
  var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
2368
- return /* @__PURE__ */ jsx29(
2954
+ return /* @__PURE__ */ jsx37(
2369
2955
  AriaTextArea,
2370
2956
  {
2371
2957
  ref,
@@ -2398,11 +2984,11 @@ var inputGroupAddonVariants = cva9(
2398
2984
  );
2399
2985
 
2400
2986
  // src/ui/input-group/input-group.tsx
2401
- import { jsx as jsx30 } from "react/jsx-runtime";
2987
+ import { jsx as jsx38 } from "react/jsx-runtime";
2402
2988
  function InputGroup({ className, ...props }) {
2403
2989
  return (
2404
2990
  // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
2405
- /* @__PURE__ */ jsx30(
2991
+ /* @__PURE__ */ jsx38(
2406
2992
  "div",
2407
2993
  {
2408
2994
  role: "group",
@@ -2424,7 +3010,7 @@ function InputGroupAddon({
2424
3010
  }) {
2425
3011
  return (
2426
3012
  // biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
2427
- /* @__PURE__ */ jsx30(
3013
+ /* @__PURE__ */ jsx38(
2428
3014
  "div",
2429
3015
  {
2430
3016
  role: "group",
@@ -2455,7 +3041,7 @@ function InputGroupButton({
2455
3041
  ...props
2456
3042
  }) {
2457
3043
  const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
2458
- return /* @__PURE__ */ jsx30(
3044
+ return /* @__PURE__ */ jsx38(
2459
3045
  Button,
2460
3046
  {
2461
3047
  "data-slot": "input-group-button",
@@ -2468,7 +3054,7 @@ function InputGroupButton({
2468
3054
  );
2469
3055
  }
2470
3056
  function InputGroupText({ className, ...props }) {
2471
- return /* @__PURE__ */ jsx30(
3057
+ return /* @__PURE__ */ jsx38(
2472
3058
  "span",
2473
3059
  {
2474
3060
  "data-slot": "input-group-text",
@@ -2481,7 +3067,7 @@ function InputGroupText({ className, ...props }) {
2481
3067
  );
2482
3068
  }
2483
3069
  function InputGroupInput({ className, ...props }) {
2484
- return /* @__PURE__ */ jsx30(
3070
+ return /* @__PURE__ */ jsx38(
2485
3071
  Input3,
2486
3072
  {
2487
3073
  "data-slot": "input-group-control",
@@ -2494,7 +3080,7 @@ function InputGroupInput({ className, ...props }) {
2494
3080
  );
2495
3081
  }
2496
3082
  function InputGroupTextarea({ className, ...props }) {
2497
- return /* @__PURE__ */ jsx30(
3083
+ return /* @__PURE__ */ jsx38(
2498
3084
  Textarea2,
2499
3085
  {
2500
3086
  "data-slot": "input-group-control",
@@ -2508,7 +3094,7 @@ function InputGroupTextarea({ className, ...props }) {
2508
3094
  }
2509
3095
 
2510
3096
  // src/ui/kanban/kanban.tsx
2511
- import { jsx as jsx31 } from "react/jsx-runtime";
3097
+ import { jsx as jsx39 } from "react/jsx-runtime";
2512
3098
  var columnSize = {
2513
3099
  compact: "w-56",
2514
3100
  default: "w-72",
@@ -2520,13 +3106,13 @@ function KanbanViewport({
2520
3106
  contentClassName,
2521
3107
  ...props
2522
3108
  }) {
2523
- return /* @__PURE__ */ jsx31(
3109
+ return /* @__PURE__ */ jsx39(
2524
3110
  "div",
2525
3111
  {
2526
3112
  "data-slot": "kanban-viewport",
2527
3113
  className: cn("-mx-1 overflow-x-auto pb-3", className),
2528
3114
  ...props,
2529
- children: /* @__PURE__ */ jsx31(
3115
+ children: /* @__PURE__ */ jsx39(
2530
3116
  "div",
2531
3117
  {
2532
3118
  "data-slot": "kanban-viewport-content",
@@ -2542,7 +3128,7 @@ function KanbanColumn({
2542
3128
  size = "default",
2543
3129
  ...props
2544
3130
  }) {
2545
- return /* @__PURE__ */ jsx31(
3131
+ return /* @__PURE__ */ jsx39(
2546
3132
  "section",
2547
3133
  {
2548
3134
  "data-slot": "kanban-column",
@@ -2553,7 +3139,7 @@ function KanbanColumn({
2553
3139
  );
2554
3140
  }
2555
3141
  function KanbanColumnHeader({ className, ...props }) {
2556
- return /* @__PURE__ */ jsx31(
3142
+ return /* @__PURE__ */ jsx39(
2557
3143
  "header",
2558
3144
  {
2559
3145
  "data-slot": "kanban-column-header",
@@ -2563,7 +3149,7 @@ function KanbanColumnHeader({ className, ...props }) {
2563
3149
  );
2564
3150
  }
2565
3151
  function KanbanColumnTitle({ className, ...props }) {
2566
- return /* @__PURE__ */ jsx31(
3152
+ return /* @__PURE__ */ jsx39(
2567
3153
  "span",
2568
3154
  {
2569
3155
  "data-slot": "kanban-column-title",
@@ -2576,14 +3162,14 @@ function KanbanColumnTitle({ className, ...props }) {
2576
3162
  );
2577
3163
  }
2578
3164
  function KanbanColumnBody({ className, ...props }) {
2579
- return /* @__PURE__ */ jsx31("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
3165
+ return /* @__PURE__ */ jsx39("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
2580
3166
  }
2581
3167
  function KanbanEmpty({
2582
3168
  className,
2583
3169
  compact = false,
2584
3170
  ...props
2585
3171
  }) {
2586
- return /* @__PURE__ */ jsx31(
3172
+ return /* @__PURE__ */ jsx39(
2587
3173
  "p",
2588
3174
  {
2589
3175
  "data-slot": "kanban-empty",
@@ -2599,9 +3185,9 @@ function KanbanEmpty({
2599
3185
  }
2600
3186
 
2601
3187
  // src/ui/kbd/kbd.tsx
2602
- import { jsx as jsx32 } from "react/jsx-runtime";
3188
+ import { jsx as jsx40 } from "react/jsx-runtime";
2603
3189
  function Kbd({ className, ...props }) {
2604
- return /* @__PURE__ */ jsx32(
3190
+ return /* @__PURE__ */ jsx40(
2605
3191
  "kbd",
2606
3192
  {
2607
3193
  "data-slot": "kbd",
@@ -2614,7 +3200,7 @@ function Kbd({ className, ...props }) {
2614
3200
  );
2615
3201
  }
2616
3202
  function KbdGroup({ className, ...props }) {
2617
- return /* @__PURE__ */ jsx32(
3203
+ return /* @__PURE__ */ jsx40(
2618
3204
  "span",
2619
3205
  {
2620
3206
  "data-slot": "kbd-group",
@@ -2626,13 +3212,13 @@ function KbdGroup({ className, ...props }) {
2626
3212
 
2627
3213
  // src/ui/loading-overlay/loading-overlay.tsx
2628
3214
  import { LoaderCircle as LoaderCircle2 } from "lucide-react";
2629
- import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
3215
+ import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
2630
3216
  function LoadingOverlay({
2631
3217
  label = "Cargando",
2632
3218
  className,
2633
3219
  ...props
2634
3220
  }) {
2635
- return /* @__PURE__ */ jsx33(
3221
+ return /* @__PURE__ */ jsx41(
2636
3222
  "output",
2637
3223
  {
2638
3224
  "aria-live": "polite",
@@ -2641,9 +3227,9 @@ function LoadingOverlay({
2641
3227
  className
2642
3228
  ),
2643
3229
  ...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 })
3230
+ 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: [
3231
+ /* @__PURE__ */ jsx41(LoaderCircle2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
3232
+ /* @__PURE__ */ jsx41("span", { children: label })
2647
3233
  ] })
2648
3234
  }
2649
3235
  );
@@ -2656,15 +3242,16 @@ import {
2656
3242
  MenuTrigger as AriaMenuTrigger,
2657
3243
  Popover as Popover3
2658
3244
  } from "react-aria-components";
2659
- import { jsx as jsx34 } from "react/jsx-runtime";
3245
+ import { jsx as jsx42 } from "react/jsx-runtime";
2660
3246
  var MenuTrigger = AriaMenuTrigger;
2661
3247
  function MenuContent({ className, ...props }) {
2662
- return /* @__PURE__ */ jsx34(
3248
+ return /* @__PURE__ */ jsx42(
2663
3249
  Popover3,
2664
3250
  {
2665
3251
  "data-slot": "menu-content",
2666
3252
  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",
3253
+ floatingSurfaceClassName,
3254
+ "min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
2668
3255
  className
2669
3256
  ),
2670
3257
  ...props
@@ -2672,10 +3259,10 @@ function MenuContent({ className, ...props }) {
2672
3259
  );
2673
3260
  }
2674
3261
  function Menu({ className, ...props }) {
2675
- return /* @__PURE__ */ jsx34(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
3262
+ return /* @__PURE__ */ jsx42(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
2676
3263
  }
2677
3264
  function MenuItem({ className, children, ...props }) {
2678
- return /* @__PURE__ */ jsx34(
3265
+ return /* @__PURE__ */ jsx42(
2679
3266
  AriaMenuItem,
2680
3267
  {
2681
3268
  "data-slot": "menu-item",
@@ -2690,7 +3277,7 @@ function MenuItem({ className, children, ...props }) {
2690
3277
  }
2691
3278
 
2692
3279
  // src/ui/metric-card/metric-card.tsx
2693
- import { jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
3280
+ import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
2694
3281
  function MetricCard({
2695
3282
  className,
2696
3283
  label,
@@ -2698,34 +3285,82 @@ function MetricCard({
2698
3285
  description,
2699
3286
  icon,
2700
3287
  tone = "default",
3288
+ trend,
3289
+ delta,
3290
+ loading = false,
3291
+ loadingLabel = "Cargando m\xE9trica",
2701
3292
  ...props
2702
3293
  }) {
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
- ] }) });
3294
+ return /* @__PURE__ */ jsx43(
3295
+ Card,
3296
+ {
3297
+ "data-slot": "metric-card",
3298
+ "data-tone": tone,
3299
+ "data-trend": trend,
3300
+ "aria-busy": loading || void 0,
3301
+ className: cn("min-w-0", className),
3302
+ ...props,
3303
+ children: /* @__PURE__ */ jsxs19(CardContent, { className: "flex items-start gap-3", children: [
3304
+ icon ? /* @__PURE__ */ jsx43("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
3305
+ /* @__PURE__ */ jsxs19("div", { className: "min-w-0", children: [
3306
+ /* @__PURE__ */ jsx43("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
3307
+ /* @__PURE__ */ jsx43(
3308
+ "strong",
3309
+ {
3310
+ "data-slot": "metric-card-value",
3311
+ className: "mt-1 block text-2xl font-semibold tracking-tight",
3312
+ children: loading ? /* @__PURE__ */ jsx43(
3313
+ "span",
3314
+ {
3315
+ "data-slot": "metric-card-loading",
3316
+ "aria-label": loadingLabel,
3317
+ className: "bg-muted block h-7 w-24 animate-pulse rounded motion-reduce:animate-none"
3318
+ }
3319
+ ) : value
3320
+ }
3321
+ ),
3322
+ delta ? /* @__PURE__ */ jsx43(
3323
+ "span",
3324
+ {
3325
+ "data-slot": "metric-card-delta",
3326
+ className: cn(
3327
+ "mt-1 block text-xs",
3328
+ trend === "up" && "text-emerald-600",
3329
+ trend === "down" && "text-destructive",
3330
+ trend === "neutral" && "text-muted-foreground"
3331
+ ),
3332
+ children: delta
3333
+ }
3334
+ ) : null,
3335
+ description ? /* @__PURE__ */ jsx43("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
3336
+ ] })
3337
+ ] })
3338
+ }
3339
+ );
3340
+ }
3341
+
3342
+ // src/ui/metric-grid/metric-grid.tsx
3343
+ import { jsx as jsx44 } from "react/jsx-runtime";
3344
+ function MetricGrid({ className, ...props }) {
3345
+ return /* @__PURE__ */ jsx44(
3346
+ "div",
3347
+ {
3348
+ "data-slot": "metric-grid",
3349
+ className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
3350
+ ...props
3351
+ }
3352
+ );
2718
3353
  }
2719
3354
 
2720
3355
  // src/ui/otp-input/otp-input.tsx
2721
3356
  import {
2722
3357
  forwardRef as forwardRef4,
2723
3358
  useImperativeHandle,
2724
- useRef as useRef4,
2725
- useState as useState10
3359
+ useRef as useRef6,
3360
+ useState as useState12
2726
3361
  } from "react";
2727
3362
  import { Input as AriaInput3 } from "react-aria-components";
2728
- import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
3363
+ import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
2729
3364
  function normalizeOtp(value, length) {
2730
3365
  return value.replace(/[^0-9]/g, "").slice(0, length);
2731
3366
  }
@@ -2744,14 +3379,14 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2744
3379
  onSelect,
2745
3380
  ...props
2746
3381
  }, forwardedRef) {
2747
- const slotCount = Math.max(1, Math.floor(length));
3382
+ const slotCount = Number.isFinite(length) ? Math.max(1, Math.floor(length)) : 6;
2748
3383
  const controlled = value !== void 0;
2749
- const [internalValue, setInternalValue] = useState10(() => normalizeOtp(defaultValue, slotCount));
3384
+ const [internalValue, setInternalValue] = useState12(() => normalizeOtp(defaultValue, slotCount));
2750
3385
  const code = normalizeOtp(controlled ? value : internalValue, slotCount);
2751
3386
  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);
3387
+ const inputRef = useRef6(null);
3388
+ const [focused, setFocused] = useState12(false);
3389
+ const [selectionStart, setSelectionStart] = useState12(0);
2755
3390
  const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
2756
3391
  const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
2757
3392
  useImperativeHandle(forwardedRef, () => inputRef.current);
@@ -2763,7 +3398,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2763
3398
  if (!controlled) setInternalValue(nextValue);
2764
3399
  if (nextValue === code) return;
2765
3400
  onChange?.(nextValue);
2766
- if (nextValue.length === slotCount) onComplete?.(nextValue);
3401
+ if (nextValue.length === slotCount && code.length < slotCount) onComplete?.(nextValue);
2767
3402
  }
2768
3403
  function handlePointerDown(event) {
2769
3404
  if (disabled) return;
@@ -2777,7 +3412,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2777
3412
  input.setSelectionRange(position, position);
2778
3413
  setSelectionStart(position);
2779
3414
  }
2780
- return /* @__PURE__ */ jsxs16(
3415
+ return /* @__PURE__ */ jsxs20(
2781
3416
  "div",
2782
3417
  {
2783
3418
  "data-slot": "otp-input",
@@ -2787,7 +3422,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2787
3422
  style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
2788
3423
  onPointerDown: handlePointerDown,
2789
3424
  children: [
2790
- /* @__PURE__ */ jsx36(
3425
+ /* @__PURE__ */ jsx45(
2791
3426
  AriaInput3,
2792
3427
  {
2793
3428
  ...props,
@@ -2827,7 +3462,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2827
3462
  }
2828
3463
  }
2829
3464
  ),
2830
- slots.map((slot, index) => /* @__PURE__ */ jsx36(
3465
+ slots.map((slot, index) => /* @__PURE__ */ jsx45(
2831
3466
  "span",
2832
3467
  {
2833
3468
  "aria-hidden": "true",
@@ -2850,9 +3485,9 @@ var OtpInputImpl = forwardRef4(function OtpInput({
2850
3485
  var OtpInput2 = OtpInputImpl;
2851
3486
 
2852
3487
  // src/ui/page-header/page-header.tsx
2853
- import { jsx as jsx37 } from "react/jsx-runtime";
3488
+ import { jsx as jsx46 } from "react/jsx-runtime";
2854
3489
  function PageHeader({ className, ...props }) {
2855
- return /* @__PURE__ */ jsx37(
3490
+ return /* @__PURE__ */ jsx46(
2856
3491
  "header",
2857
3492
  {
2858
3493
  "data-slot": "page-header",
@@ -2865,10 +3500,10 @@ function PageHeader({ className, ...props }) {
2865
3500
  );
2866
3501
  }
2867
3502
  function PageHeaderHeading({ className, ...props }) {
2868
- return /* @__PURE__ */ jsx37("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
3503
+ return /* @__PURE__ */ jsx46("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
2869
3504
  }
2870
3505
  function PageHeaderTitle({ className, children, ...props }) {
2871
- return /* @__PURE__ */ jsx37(
3506
+ return /* @__PURE__ */ jsx46(
2872
3507
  "h1",
2873
3508
  {
2874
3509
  "data-slot": "page-header-title",
@@ -2879,7 +3514,7 @@ function PageHeaderTitle({ className, children, ...props }) {
2879
3514
  );
2880
3515
  }
2881
3516
  function PageHeaderDescription({ className, ...props }) {
2882
- return /* @__PURE__ */ jsx37(
3517
+ return /* @__PURE__ */ jsx46(
2883
3518
  "p",
2884
3519
  {
2885
3520
  "data-slot": "page-header-description",
@@ -2889,7 +3524,7 @@ function PageHeaderDescription({ className, ...props }) {
2889
3524
  );
2890
3525
  }
2891
3526
  function PageHeaderActions({ className, ...props }) {
2892
- return /* @__PURE__ */ jsx37(
3527
+ return /* @__PURE__ */ jsx46(
2893
3528
  "div",
2894
3529
  {
2895
3530
  "data-slot": "page-header-actions",
@@ -2898,11 +3533,54 @@ function PageHeaderActions({ className, ...props }) {
2898
3533
  }
2899
3534
  );
2900
3535
  }
3536
+ function SectionHeader({ className, ...props }) {
3537
+ return /* @__PURE__ */ jsx46(
3538
+ "div",
3539
+ {
3540
+ "data-slot": "section-header",
3541
+ className: cn("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", className),
3542
+ ...props
3543
+ }
3544
+ );
3545
+ }
3546
+ function SectionHeaderHeading({ className, ...props }) {
3547
+ return /* @__PURE__ */ jsx46("div", { "data-slot": "section-header-heading", className: cn("min-w-0", className), ...props });
3548
+ }
3549
+ function SectionHeaderTitle({ className, ...props }) {
3550
+ return /* @__PURE__ */ jsx46(
3551
+ "h2",
3552
+ {
3553
+ "data-slot": "section-header-title",
3554
+ className: cn("text-base font-semibold tracking-tight", className),
3555
+ ...props
3556
+ }
3557
+ );
3558
+ }
3559
+ function SectionHeaderDescription({ className, ...props }) {
3560
+ return /* @__PURE__ */ jsx46(
3561
+ "p",
3562
+ {
3563
+ "data-slot": "section-header-description",
3564
+ className: cn("mt-1 text-sm text-muted-foreground", className),
3565
+ ...props
3566
+ }
3567
+ );
3568
+ }
3569
+ function SectionHeaderActions({ className, ...props }) {
3570
+ return /* @__PURE__ */ jsx46(
3571
+ "div",
3572
+ {
3573
+ "data-slot": "section-header-actions",
3574
+ className: cn("flex shrink-0 items-center gap-2", className),
3575
+ ...props
3576
+ }
3577
+ );
3578
+ }
2901
3579
 
2902
3580
  // src/ui/pagination/pagination.tsx
2903
3581
  import { ChevronLeft, ChevronRight } from "lucide-react";
2904
3582
  import * as React6 from "react";
2905
- import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
3583
+ import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
2906
3584
  function visiblePages(page, pageCount, siblingCount) {
2907
3585
  return [
2908
3586
  .../* @__PURE__ */ new Set([
@@ -2912,6 +3590,13 @@ function visiblePages(page, pageCount, siblingCount) {
2912
3590
  ])
2913
3591
  ].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
2914
3592
  }
3593
+ function normalizedPageCount(pageCount) {
3594
+ return Number.isFinite(pageCount) ? Math.max(0, Math.floor(pageCount)) : 0;
3595
+ }
3596
+ function normalizedPage(page, pageCount) {
3597
+ if (!Number.isFinite(page)) return 1;
3598
+ return Math.min(Math.max(1, Math.floor(page)), pageCount);
3599
+ }
2915
3600
  function Pagination({
2916
3601
  page,
2917
3602
  pageCount,
@@ -2921,35 +3606,37 @@ function Pagination({
2921
3606
  siblingCount = 1,
2922
3607
  className
2923
3608
  }) {
2924
- if (pageCount <= 1) return null;
2925
- const pages = visiblePages(page, pageCount, siblingCount);
2926
- return /* @__PURE__ */ jsxs17(
3609
+ const totalPages = normalizedPageCount(pageCount);
3610
+ if (totalPages <= 1) return null;
3611
+ const currentPage = normalizedPage(page, totalPages);
3612
+ const pages = visiblePages(currentPage, totalPages, siblingCount);
3613
+ return /* @__PURE__ */ jsxs21(
2927
3614
  "nav",
2928
3615
  {
2929
3616
  "aria-label": ariaLabel,
2930
3617
  className: cn("flex flex-wrap items-center justify-between gap-4", className),
2931
3618
  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(
3619
+ /* @__PURE__ */ jsx47("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${currentPage} de ${totalPages}` }),
3620
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
3621
+ /* @__PURE__ */ jsx47(
2935
3622
  Button,
2936
3623
  {
2937
3624
  "aria-label": "P\xE1gina anterior",
2938
- isDisabled: page <= 1,
2939
- onPress: () => onPageChange(page - 1),
3625
+ isDisabled: currentPage <= 1,
3626
+ onPress: () => onPageChange(currentPage - 1),
2940
3627
  size: "icon",
2941
3628
  variant: "ghost",
2942
- children: /* @__PURE__ */ jsx38(ChevronLeft, {})
3629
+ children: /* @__PURE__ */ jsx47(ChevronLeft, {})
2943
3630
  }
2944
3631
  ),
2945
3632
  pages.map((item, index) => {
2946
3633
  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(
3634
+ return /* @__PURE__ */ jsxs21(React6.Fragment, { children: [
3635
+ previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ jsx47("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
3636
+ /* @__PURE__ */ jsx47(
2950
3637
  Button,
2951
3638
  {
2952
- "aria-current": item === page ? "page" : void 0,
3639
+ "aria-current": item === currentPage ? "page" : void 0,
2953
3640
  "aria-label": `P\xE1gina ${item}`,
2954
3641
  onPress: () => onPageChange(item),
2955
3642
  size: "icon",
@@ -2959,15 +3646,15 @@ function Pagination({
2959
3646
  )
2960
3647
  ] }, item);
2961
3648
  }),
2962
- /* @__PURE__ */ jsx38(
3649
+ /* @__PURE__ */ jsx47(
2963
3650
  Button,
2964
3651
  {
2965
3652
  "aria-label": "P\xE1gina siguiente",
2966
- isDisabled: page >= pageCount,
2967
- onPress: () => onPageChange(page + 1),
3653
+ isDisabled: currentPage >= totalPages,
3654
+ onPress: () => onPageChange(currentPage + 1),
2968
3655
  size: "icon",
2969
3656
  variant: "ghost",
2970
- children: /* @__PURE__ */ jsx38(ChevronRight, {})
3657
+ children: /* @__PURE__ */ jsx47(ChevronRight, {})
2971
3658
  }
2972
3659
  )
2973
3660
  ] })
@@ -2981,16 +3668,17 @@ import {
2981
3668
  DialogTrigger as AriaDialogTrigger,
2982
3669
  Popover as AriaPopover
2983
3670
  } from "react-aria-components";
2984
- import { jsx as jsx39, jsxs as jsxs18 } from "react/jsx-runtime";
3671
+ import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
2985
3672
  var PopoverTrigger = AriaDialogTrigger;
2986
3673
  function PopoverContent({ className, ...props }) {
2987
- return /* @__PURE__ */ jsx39(
3674
+ return /* @__PURE__ */ jsx48(
2988
3675
  AriaPopover,
2989
3676
  {
2990
3677
  "data-slot": "popover",
2991
3678
  offset: 6,
2992
3679
  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",
3680
+ floatingSurfaceClassName,
3681
+ "min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground",
2994
3682
  className
2995
3683
  ),
2996
3684
  ...props
@@ -2998,24 +3686,24 @@ function PopoverContent({ className, ...props }) {
2998
3686
  );
2999
3687
  }
3000
3688
  function Popover4(props) {
3001
- if (!("trigger" in props)) return /* @__PURE__ */ jsx39(PopoverContent, { ...props });
3689
+ if (!("trigger" in props)) return /* @__PURE__ */ jsx48(PopoverContent, { ...props });
3002
3690
  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: [
3691
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx48(Button, { ...triggerProps, children: trigger }) : trigger;
3692
+ return /* @__PURE__ */ jsxs22(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3005
3693
  triggerElement,
3006
- /* @__PURE__ */ jsx39(PopoverContent, { ...contentProps, children })
3694
+ /* @__PURE__ */ jsx48(PopoverContent, { ...contentProps, children })
3007
3695
  ] });
3008
3696
  }
3009
3697
 
3010
3698
  // src/ui/quantity-input/quantity-input.tsx
3011
- import { Minus, Plus } from "lucide-react";
3699
+ import { Minus as Minus2, Plus } from "lucide-react";
3012
3700
  import {
3013
3701
  Button as AriaButton,
3014
3702
  Group as AriaGroup,
3015
3703
  Input as AriaInput4,
3016
3704
  NumberField as AriaNumberField
3017
3705
  } from "react-aria-components";
3018
- import { jsx as jsx40, jsxs as jsxs19 } from "react/jsx-runtime";
3706
+ import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
3019
3707
  function QuantityInput({
3020
3708
  className,
3021
3709
  inputClassName,
@@ -3025,7 +3713,7 @@ function QuantityInput({
3025
3713
  step = 1,
3026
3714
  ...props
3027
3715
  }) {
3028
- return /* @__PURE__ */ jsx40(
3716
+ return /* @__PURE__ */ jsx49(
3029
3717
  AriaNumberField,
3030
3718
  {
3031
3719
  ...props,
@@ -3036,23 +3724,23 @@ function QuantityInput({
3036
3724
  "group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3037
3725
  className
3038
3726
  ),
3039
- children: /* @__PURE__ */ jsxs19(
3727
+ children: /* @__PURE__ */ jsxs23(
3040
3728
  AriaGroup,
3041
3729
  {
3042
3730
  "data-slot": "quantity-input-group",
3043
3731
  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
3732
  children: [
3045
- /* @__PURE__ */ jsx40(
3733
+ /* @__PURE__ */ jsx49(
3046
3734
  AriaButton,
3047
3735
  {
3048
3736
  slot: "decrement",
3049
3737
  "aria-label": decrementAriaLabel,
3050
3738
  "data-slot": "quantity-input-decrement",
3051
3739
  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" })
3740
+ children: /* @__PURE__ */ jsx49(Minus2, { "aria-hidden": "true", className: "size-4" })
3053
3741
  }
3054
3742
  ),
3055
- /* @__PURE__ */ jsx40(
3743
+ /* @__PURE__ */ jsx49(
3056
3744
  AriaInput4,
3057
3745
  {
3058
3746
  "data-slot": "quantity-input-value",
@@ -3062,14 +3750,14 @@ function QuantityInput({
3062
3750
  )
3063
3751
  }
3064
3752
  ),
3065
- /* @__PURE__ */ jsx40(
3753
+ /* @__PURE__ */ jsx49(
3066
3754
  AriaButton,
3067
3755
  {
3068
3756
  slot: "increment",
3069
3757
  "aria-label": incrementAriaLabel,
3070
3758
  "data-slot": "quantity-input-increment",
3071
3759
  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" })
3760
+ children: /* @__PURE__ */ jsx49(Plus, { "aria-hidden": "true", className: "size-4" })
3073
3761
  }
3074
3762
  )
3075
3763
  ]
@@ -3089,10 +3777,10 @@ import {
3089
3777
  ListBoxItem as ListBoxItem3,
3090
3778
  Popover as Popover5
3091
3779
  } from "react-aria-components";
3092
- import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
3780
+ import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
3093
3781
  var Select = AriaSelect;
3094
3782
  function SelectTrigger({ className, children, ...props }) {
3095
- return /* @__PURE__ */ jsx41(
3783
+ return /* @__PURE__ */ jsx50(
3096
3784
  AriaButton2,
3097
3785
  {
3098
3786
  "data-slot": "select-trigger",
@@ -3101,9 +3789,9 @@ function SelectTrigger({ className, children, ...props }) {
3101
3789
  className
3102
3790
  ),
3103
3791
  ...props,
3104
- children: (state) => /* @__PURE__ */ jsxs20(Fragment8, { children: [
3792
+ children: (state) => /* @__PURE__ */ jsxs24(Fragment8, { children: [
3105
3793
  typeof children === "function" ? children(state) : children,
3106
- /* @__PURE__ */ jsx41(
3794
+ /* @__PURE__ */ jsx50(
3107
3795
  ChevronDown2,
3108
3796
  {
3109
3797
  "aria-hidden": "true",
@@ -3115,7 +3803,7 @@ function SelectTrigger({ className, children, ...props }) {
3115
3803
  );
3116
3804
  }
3117
3805
  function SelectValue({ className, ...props }) {
3118
- return /* @__PURE__ */ jsx41(
3806
+ return /* @__PURE__ */ jsx50(
3119
3807
  AriaSelectValue,
3120
3808
  {
3121
3809
  "data-slot": "select-value",
@@ -3125,12 +3813,13 @@ function SelectValue({ className, ...props }) {
3125
3813
  );
3126
3814
  }
3127
3815
  function SelectContent({ className, ...props }) {
3128
- return /* @__PURE__ */ jsx41(
3816
+ return /* @__PURE__ */ jsx50(
3129
3817
  Popover5,
3130
3818
  {
3131
3819
  "data-slot": "select-content",
3132
3820
  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",
3821
+ floatingSurfaceClassName,
3822
+ "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
3134
3823
  className
3135
3824
  ),
3136
3825
  ...props
@@ -3138,7 +3827,7 @@ function SelectContent({ className, ...props }) {
3138
3827
  );
3139
3828
  }
3140
3829
  function SelectList({ className, ...props }) {
3141
- return /* @__PURE__ */ jsx41(
3830
+ return /* @__PURE__ */ jsx50(
3142
3831
  ListBox3,
3143
3832
  {
3144
3833
  "data-slot": "select-list",
@@ -3152,7 +3841,7 @@ function SelectItem({
3152
3841
  children,
3153
3842
  ...props
3154
3843
  }) {
3155
- return /* @__PURE__ */ jsx41(
3844
+ return /* @__PURE__ */ jsx50(
3156
3845
  ListBoxItem3,
3157
3846
  {
3158
3847
  "data-slot": "select-item",
@@ -3166,165 +3855,37 @@ function SelectItem({
3166
3855
  );
3167
3856
  }
3168
3857
 
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({
3858
+ // src/ui/selection-toolbar/selection-toolbar.tsx
3859
+ import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
3860
+ function SelectionToolbar({
3861
+ count,
3197
3862
  className,
3198
3863
  children,
3199
3864
  ...props
3200
3865
  }) {
3201
- return /* @__PURE__ */ jsx42(
3202
- ModalOverlayPrimitive,
3866
+ return /* @__PURE__ */ jsxs25(
3867
+ "div",
3203
3868
  {
3204
- "data-slot": "sheet-overlay",
3205
- isDismissable: true,
3869
+ "data-slot": "selection-toolbar",
3206
3870
  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",
3871
+ "flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
3208
3872
  className
3209
3873
  ),
3210
3874
  ...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
3875
+ children: [
3876
+ /* @__PURE__ */ jsxs25("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
3877
+ count,
3878
+ " seleccionados"
3879
+ ] }),
3880
+ /* @__PURE__ */ jsx51("div", { className: "flex items-center gap-2", children })
3881
+ ]
3314
3882
  }
3315
3883
  );
3316
3884
  }
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
3885
 
3325
3886
  // src/ui/sidebar/sidebar.tsx
3326
3887
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2, Ellipsis, Search } from "lucide-react";
3327
- import { useMemo as useMemo2, useState as useState11 } from "react";
3888
+ import { useCallback as useCallback8, useMemo as useMemo2, useState as useState13 } from "react";
3328
3889
  import { Link as Link3 } from "react-aria-components";
3329
3890
 
3330
3891
  // src/ui/sidebar/sidebar-context.ts
@@ -3337,25 +3898,36 @@ function useSidebar() {
3337
3898
  }
3338
3899
 
3339
3900
  // src/ui/sidebar/sidebar.tsx
3340
- import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
3901
+ import { Fragment as Fragment9, jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
3341
3902
  function SidebarProvider({
3342
3903
  defaultCollapsed = false,
3904
+ collapsed: controlledCollapsed,
3905
+ onCollapsedChange,
3343
3906
  children
3344
3907
  }) {
3345
- const [collapsed, setCollapsed] = useState11(defaultCollapsed);
3908
+ const [uncontrolledCollapsed, setUncontrolledCollapsed] = useState13(defaultCollapsed);
3909
+ const collapsed = controlledCollapsed ?? uncontrolledCollapsed;
3910
+ const setCollapsed = useCallback8(
3911
+ (next) => {
3912
+ if (controlledCollapsed === void 0) setUncontrolledCollapsed(next);
3913
+ onCollapsedChange?.(next);
3914
+ },
3915
+ [controlledCollapsed, onCollapsedChange]
3916
+ );
3917
+ const toggle = useCallback8(() => setCollapsed(!collapsed), [collapsed, setCollapsed]);
3346
3918
  const value = useMemo2(
3347
3919
  () => ({
3348
3920
  collapsed,
3349
3921
  setCollapsed,
3350
- toggle: () => setCollapsed((current) => !current)
3922
+ toggle
3351
3923
  }),
3352
- [collapsed]
3924
+ [collapsed, setCollapsed, toggle]
3353
3925
  );
3354
- return /* @__PURE__ */ jsx43(SidebarContext.Provider, { value, children });
3926
+ return /* @__PURE__ */ jsx52(SidebarContext.Provider, { value, children });
3355
3927
  }
3356
3928
  function Sidebar({ className, ...props }) {
3357
3929
  const { collapsed } = useSidebar();
3358
- return /* @__PURE__ */ jsx43(
3930
+ return /* @__PURE__ */ jsx52(
3359
3931
  "aside",
3360
3932
  {
3361
3933
  "data-slot": "sidebar",
@@ -3369,7 +3941,7 @@ function Sidebar({ className, ...props }) {
3369
3941
  );
3370
3942
  }
3371
3943
  function SidebarHeader({ className, ...props }) {
3372
- return /* @__PURE__ */ jsx43(
3944
+ return /* @__PURE__ */ jsx52(
3373
3945
  "div",
3374
3946
  {
3375
3947
  "data-slot": "sidebar-header",
@@ -3384,7 +3956,7 @@ function SidebarSearch({
3384
3956
  className,
3385
3957
  ...props
3386
3958
  }) {
3387
- return /* @__PURE__ */ jsxs22(
3959
+ return /* @__PURE__ */ jsxs26(
3388
3960
  "button",
3389
3961
  {
3390
3962
  type: "button",
@@ -3395,15 +3967,15 @@ function SidebarSearch({
3395
3967
  ),
3396
3968
  ...props,
3397
3969
  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 })
3970
+ /* @__PURE__ */ jsx52(Search, { className: "size-4 shrink-0" }),
3971
+ /* @__PURE__ */ jsx52("span", { className: "flex-1 text-left", children: label }),
3972
+ /* @__PURE__ */ jsx52("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
3401
3973
  ]
3402
3974
  }
3403
3975
  );
3404
3976
  }
3405
3977
  function SidebarContent({ className, ...props }) {
3406
- return /* @__PURE__ */ jsx43(
3978
+ return /* @__PURE__ */ jsx52(
3407
3979
  "nav",
3408
3980
  {
3409
3981
  "data-slot": "sidebar-content",
@@ -3414,7 +3986,7 @@ function SidebarContent({ className, ...props }) {
3414
3986
  );
3415
3987
  }
3416
3988
  function SidebarFooter({ className, ...props }) {
3417
- return /* @__PURE__ */ jsx43(
3989
+ return /* @__PURE__ */ jsx52(
3418
3990
  "div",
3419
3991
  {
3420
3992
  "data-slot": "sidebar-footer",
@@ -3430,8 +4002,8 @@ function SidebarGroup({
3430
4002
  ...props
3431
4003
  }) {
3432
4004
  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(
4005
+ return /* @__PURE__ */ jsxs26("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
4006
+ label && /* @__PURE__ */ jsx52(
3435
4007
  "h2",
3436
4008
  {
3437
4009
  className: cn(
@@ -3455,7 +4027,7 @@ function SidebarItem({
3455
4027
  }) {
3456
4028
  const { collapsed } = useSidebar();
3457
4029
  const content = typeof children === "function" ? label : children ?? label;
3458
- return /* @__PURE__ */ jsx43(
4030
+ return /* @__PURE__ */ jsx52(
3459
4031
  Link3,
3460
4032
  {
3461
4033
  "data-slot": "sidebar-item",
@@ -3467,16 +4039,16 @@ function SidebarItem({
3467
4039
  typeof className === "function" ? className : className
3468
4040
  ),
3469
4041
  ...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 })
4042
+ children: (values) => /* @__PURE__ */ jsxs26(Fragment9, { children: [
4043
+ /* @__PURE__ */ jsx52("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
4044
+ /* @__PURE__ */ jsx52("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
4045
+ badge && !collapsed && /* @__PURE__ */ jsx52("span", { className: "text-muted-foreground text-xs", children: badge })
3474
4046
  ] })
3475
4047
  }
3476
4048
  );
3477
4049
  }
3478
4050
  function SidebarSeparator({ className, ...props }) {
3479
- return /* @__PURE__ */ jsx43(
4051
+ return /* @__PURE__ */ jsx52(
3480
4052
  "hr",
3481
4053
  {
3482
4054
  "data-slot": "sidebar-separator",
@@ -3487,37 +4059,45 @@ function SidebarSeparator({ className, ...props }) {
3487
4059
  }
3488
4060
  function SidebarTrigger({ className, ...props }) {
3489
4061
  const { collapsed, toggle } = useSidebar();
3490
- return /* @__PURE__ */ jsx43(
4062
+ const { onPress, ...buttonProps } = props;
4063
+ return /* @__PURE__ */ jsx52(
3491
4064
  Button,
3492
4065
  {
3493
4066
  "aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
3494
- onPress: toggle,
4067
+ onPress: (event) => {
4068
+ onPress?.(event);
4069
+ toggle();
4070
+ },
3495
4071
  size: "icon",
3496
4072
  variant: "ghost",
3497
4073
  className: cn("ml-auto", className),
3498
- ...props,
3499
- children: collapsed ? /* @__PURE__ */ jsx43(ChevronRight2, {}) : /* @__PURE__ */ jsx43(ChevronLeft2, {})
4074
+ ...buttonProps,
4075
+ children: collapsed ? /* @__PURE__ */ jsx52(ChevronRight2, {}) : /* @__PURE__ */ jsx52(ChevronLeft2, {})
3500
4076
  }
3501
4077
  );
3502
4078
  }
3503
4079
  function SidebarRail({ className, ...props }) {
3504
4080
  const { toggle } = useSidebar();
3505
- return /* @__PURE__ */ jsx43(
4081
+ const { onClick, ...buttonProps } = props;
4082
+ return /* @__PURE__ */ jsx52(
3506
4083
  "button",
3507
4084
  {
3508
4085
  type: "button",
3509
4086
  "aria-label": "Alternar navegaci\xF3n",
3510
- onClick: toggle,
4087
+ onClick: (event) => {
4088
+ onClick?.(event);
4089
+ if (!event.defaultPrevented) toggle();
4090
+ },
3511
4091
  className: cn(
3512
4092
  "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
4093
  className
3514
4094
  ),
3515
- ...props
4095
+ ...buttonProps
3516
4096
  }
3517
4097
  );
3518
4098
  }
3519
4099
  function SidebarMore({ className, ...props }) {
3520
- return /* @__PURE__ */ jsx43(
4100
+ return /* @__PURE__ */ jsx52(
3521
4101
  Button,
3522
4102
  {
3523
4103
  "aria-label": "M\xE1s opciones",
@@ -3525,15 +4105,15 @@ function SidebarMore({ className, ...props }) {
3525
4105
  variant: "ghost",
3526
4106
  className: cn("size-7", className),
3527
4107
  ...props,
3528
- children: /* @__PURE__ */ jsx43(Ellipsis, {})
4108
+ children: /* @__PURE__ */ jsx52(Ellipsis, {})
3529
4109
  }
3530
4110
  );
3531
4111
  }
3532
4112
 
3533
4113
  // src/ui/skeleton/skeleton.tsx
3534
- import { jsx as jsx44 } from "react/jsx-runtime";
4114
+ import { jsx as jsx53 } from "react/jsx-runtime";
3535
4115
  function Skeleton({ className, ...props }) {
3536
- return /* @__PURE__ */ jsx44(
4116
+ return /* @__PURE__ */ jsx53(
3537
4117
  "div",
3538
4118
  {
3539
4119
  "aria-hidden": "true",
@@ -3546,9 +4126,9 @@ function Skeleton({ className, ...props }) {
3546
4126
 
3547
4127
  // src/ui/submit-button/submit-button.tsx
3548
4128
  import { LoaderCircle as LoaderCircle3 } from "lucide-react";
3549
- import { useCallback as useCallback6, useLayoutEffect, useRef as useRef5 } from "react";
4129
+ import { useCallback as useCallback9, useLayoutEffect, useRef as useRef7 } from "react";
3550
4130
  import { useFormStatus } from "react-dom";
3551
- import { Fragment as Fragment10, jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
4131
+ import { Fragment as Fragment10, jsx as jsx54, jsxs as jsxs27 } from "react/jsx-runtime";
3552
4132
  function assignRef(ref, node) {
3553
4133
  if (typeof ref === "function") {
3554
4134
  ref(node);
@@ -3569,8 +4149,8 @@ function SubmitButton({
3569
4149
  const { pending } = useFormStatus();
3570
4150
  const busy = pending || loading;
3571
4151
  const label = loadingLabel ?? pendingLabel ?? "Guardando\u2026";
3572
- const buttonRef = useRef5(null);
3573
- const setButtonRef = useCallback6(
4152
+ const buttonRef = useRef7(null);
4153
+ const setButtonRef = useCallback9(
3574
4154
  (node) => {
3575
4155
  buttonRef.current = node;
3576
4156
  assignRef(forwardedRef, node);
@@ -3583,7 +4163,7 @@ function SubmitButton({
3583
4163
  if (busy) button.setAttribute("aria-busy", "true");
3584
4164
  else button.removeAttribute("aria-busy");
3585
4165
  }, [busy]);
3586
- return /* @__PURE__ */ jsx45(
4166
+ return /* @__PURE__ */ jsx54(
3587
4167
  Button,
3588
4168
  {
3589
4169
  ref: setButtonRef,
@@ -3592,8 +4172,8 @@ function SubmitButton({
3592
4172
  isDisabled: busy || isDisabled,
3593
4173
  "aria-busy": busy || void 0,
3594
4174
  ...props,
3595
- children: busy ? /* @__PURE__ */ jsxs23(Fragment10, { children: [
3596
- /* @__PURE__ */ jsx45(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
4175
+ children: busy ? /* @__PURE__ */ jsxs27(Fragment10, { children: [
4176
+ /* @__PURE__ */ jsx54(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 motion-safe:animate-spin" }),
3597
4177
  label
3598
4178
  ] }) : children
3599
4179
  }
@@ -3601,9 +4181,9 @@ function SubmitButton({
3601
4181
  }
3602
4182
 
3603
4183
  // src/ui/switch/switch.tsx
3604
- import { useEffect as useEffect5, useRef as useRef6 } from "react";
4184
+ import { useEffect as useEffect6, useRef as useRef8 } from "react";
3605
4185
  import { Switch as AriaSwitch } from "react-aria-components";
3606
- import { Fragment as Fragment11, jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
4186
+ import { Fragment as Fragment11, jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
3607
4187
  var switchSizes = {
3608
4188
  sm: {
3609
4189
  control: "h-4 w-[1.875rem] p-0.5",
@@ -3643,9 +4223,9 @@ function Switch({
3643
4223
  ...props
3644
4224
  }) {
3645
4225
  const styles = switchSizes[size];
3646
- const fallbackInputRef = useRef6(null);
4226
+ const fallbackInputRef = useRef8(null);
3647
4227
  const resolvedInputRef = inputRef ?? fallbackInputRef;
3648
- useEffect5(() => {
4228
+ useEffect6(() => {
3649
4229
  const input = resolvedInputRef.current;
3650
4230
  if (!input) return;
3651
4231
  const handleDirectionalKey = (event) => {
@@ -3660,7 +4240,7 @@ function Switch({
3660
4240
  ownerDocument.addEventListener("keydown", handleDirectionalKey);
3661
4241
  return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
3662
4242
  }, [isDisabled, isReadOnly, resolvedInputRef]);
3663
- return /* @__PURE__ */ jsx46(
4243
+ return /* @__PURE__ */ jsx55(
3664
4244
  AriaSwitch,
3665
4245
  {
3666
4246
  "data-slot": "switch",
@@ -3677,8 +4257,8 @@ function Switch({
3677
4257
  children: (state) => {
3678
4258
  const isThumbPressed = state.isPressed;
3679
4259
  const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
3680
- return /* @__PURE__ */ jsxs24(Fragment11, { children: [
3681
- /* @__PURE__ */ jsx46(
4260
+ return /* @__PURE__ */ jsxs28(Fragment11, { children: [
4261
+ /* @__PURE__ */ jsx55(
3682
4262
  "span",
3683
4263
  {
3684
4264
  "aria-hidden": "true",
@@ -3692,7 +4272,7 @@ function Switch({
3692
4272
  "group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
3693
4273
  styles.control
3694
4274
  ),
3695
- children: /* @__PURE__ */ jsx46(
4275
+ children: /* @__PURE__ */ jsx55(
3696
4276
  "span",
3697
4277
  {
3698
4278
  "data-slot": "switch-thumb",
@@ -3712,9 +4292,9 @@ function Switch({
3712
4292
  )
3713
4293
  }
3714
4294
  ),
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(
4295
+ children || description ? /* @__PURE__ */ jsxs28("span", { className: "grid gap-0.5 leading-tight", children: [
4296
+ children ? /* @__PURE__ */ jsx55("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
4297
+ description ? /* @__PURE__ */ jsx55(
3718
4298
  "span",
3719
4299
  {
3720
4300
  "data-slot": "switch-description",
@@ -3730,9 +4310,9 @@ function Switch({
3730
4310
  }
3731
4311
 
3732
4312
  // src/ui/table/table.tsx
3733
- import { jsx as jsx47 } from "react/jsx-runtime";
4313
+ import { jsx as jsx56 } from "react/jsx-runtime";
3734
4314
  function Table({ className, ...props }) {
3735
- return /* @__PURE__ */ jsx47("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx47(
4315
+ return /* @__PURE__ */ jsx56("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx56(
3736
4316
  "table",
3737
4317
  {
3738
4318
  "data-slot": "table",
@@ -3742,10 +4322,10 @@ function Table({ className, ...props }) {
3742
4322
  ) });
3743
4323
  }
3744
4324
  function TableHeader({ className, ...props }) {
3745
- return /* @__PURE__ */ jsx47("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
4325
+ return /* @__PURE__ */ jsx56("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
3746
4326
  }
3747
4327
  function TableBody({ className, ...props }) {
3748
- return /* @__PURE__ */ jsx47(
4328
+ return /* @__PURE__ */ jsx56(
3749
4329
  "tbody",
3750
4330
  {
3751
4331
  "data-slot": "table-body",
@@ -3755,7 +4335,7 @@ function TableBody({ className, ...props }) {
3755
4335
  );
3756
4336
  }
3757
4337
  function TableRow({ className, ...props }) {
3758
- return /* @__PURE__ */ jsx47(
4338
+ return /* @__PURE__ */ jsx56(
3759
4339
  "tr",
3760
4340
  {
3761
4341
  "data-slot": "table-row",
@@ -3768,7 +4348,7 @@ function TableRow({ className, ...props }) {
3768
4348
  );
3769
4349
  }
3770
4350
  function TableHead({ className, ...props }) {
3771
- return /* @__PURE__ */ jsx47(
4351
+ return /* @__PURE__ */ jsx56(
3772
4352
  "th",
3773
4353
  {
3774
4354
  "data-slot": "table-head",
@@ -3781,7 +4361,7 @@ function TableHead({ className, ...props }) {
3781
4361
  );
3782
4362
  }
3783
4363
  function TableCell({ className, ...props }) {
3784
- return /* @__PURE__ */ jsx47(
4364
+ return /* @__PURE__ */ jsx56(
3785
4365
  "td",
3786
4366
  {
3787
4367
  "data-slot": "table-cell",
@@ -3791,7 +4371,7 @@ function TableCell({ className, ...props }) {
3791
4371
  );
3792
4372
  }
3793
4373
  function TableCaption({ className, ...props }) {
3794
- return /* @__PURE__ */ jsx47(
4374
+ return /* @__PURE__ */ jsx56(
3795
4375
  "caption",
3796
4376
  {
3797
4377
  "data-slot": "table-caption",
@@ -3801,7 +4381,7 @@ function TableCaption({ className, ...props }) {
3801
4381
  );
3802
4382
  }
3803
4383
  function TableFooter({ className, ...props }) {
3804
- return /* @__PURE__ */ jsx47(
4384
+ return /* @__PURE__ */ jsx56(
3805
4385
  "tfoot",
3806
4386
  {
3807
4387
  "data-slot": "table-footer",
@@ -3813,6 +4393,44 @@ function TableFooter({ className, ...props }) {
3813
4393
  }
3814
4394
  );
3815
4395
  }
4396
+ function TableToolbar({ className, ...props }) {
4397
+ return /* @__PURE__ */ jsx56(
4398
+ "div",
4399
+ {
4400
+ "data-slot": "table-toolbar",
4401
+ className: cn("flex flex-wrap items-center justify-between gap-2 py-2", className),
4402
+ ...props
4403
+ }
4404
+ );
4405
+ }
4406
+ function TableEmpty({
4407
+ colSpan = 1,
4408
+ className,
4409
+ children = "No hay resultados."
4410
+ }) {
4411
+ return /* @__PURE__ */ jsx56(TableRow, { "data-slot": "table-empty", children: /* @__PURE__ */ jsx56(
4412
+ TableCell,
4413
+ {
4414
+ colSpan,
4415
+ className: cn("h-24 text-center text-muted-foreground", className),
4416
+ children
4417
+ }
4418
+ ) });
4419
+ }
4420
+ function TableLoading({
4421
+ colSpan = 1,
4422
+ className,
4423
+ children = "Cargando\u2026"
4424
+ }) {
4425
+ return /* @__PURE__ */ jsx56(TableRow, { "data-slot": "table-loading", "aria-busy": "true", children: /* @__PURE__ */ jsx56(
4426
+ TableCell,
4427
+ {
4428
+ colSpan,
4429
+ className: cn("h-24 text-center text-muted-foreground", className),
4430
+ children
4431
+ }
4432
+ ) });
4433
+ }
3816
4434
 
3817
4435
  // src/ui/tabs/tabs.tsx
3818
4436
  import {
@@ -3823,9 +4441,9 @@ import {
3823
4441
  Tabs as AriaTabs,
3824
4442
  composeRenderProps as composeRenderProps2
3825
4443
  } from "react-aria-components";
3826
- import { jsx as jsx48 } from "react/jsx-runtime";
4444
+ import { jsx as jsx57 } from "react/jsx-runtime";
3827
4445
  function Tabs({ className, ...props }) {
3828
- return /* @__PURE__ */ jsx48(
4446
+ return /* @__PURE__ */ jsx57(
3829
4447
  AriaTabs,
3830
4448
  {
3831
4449
  "data-slot": "tabs",
@@ -3835,7 +4453,7 @@ function Tabs({ className, ...props }) {
3835
4453
  );
3836
4454
  }
3837
4455
  function TabsList({ className, ...props }) {
3838
- return /* @__PURE__ */ jsx48(
4456
+ return /* @__PURE__ */ jsx57(
3839
4457
  AriaTabList,
3840
4458
  {
3841
4459
  "data-slot": "tabs-list",
@@ -3851,7 +4469,7 @@ function TabsList({ className, ...props }) {
3851
4469
  );
3852
4470
  }
3853
4471
  function TabsTrigger({ className, ...props }) {
3854
- return /* @__PURE__ */ jsx48(
4472
+ return /* @__PURE__ */ jsx57(
3855
4473
  AriaTab,
3856
4474
  {
3857
4475
  "data-slot": "tabs-trigger",
@@ -3867,10 +4485,10 @@ function TabsTrigger({ className, ...props }) {
3867
4485
  );
3868
4486
  }
3869
4487
  function TabsPanels({ className, ...props }) {
3870
- return /* @__PURE__ */ jsx48(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
4488
+ return /* @__PURE__ */ jsx57(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
3871
4489
  }
3872
4490
  function TabsContent({ className, ...props }) {
3873
- return /* @__PURE__ */ jsx48(
4491
+ return /* @__PURE__ */ jsx57(
3874
4492
  AriaTabPanel,
3875
4493
  {
3876
4494
  "data-slot": "tabs-content",
@@ -3884,7 +4502,7 @@ function TabsContent({ className, ...props }) {
3884
4502
  }
3885
4503
 
3886
4504
  // src/ui/toast/toast.tsx
3887
- import { useEffect as useEffect6 } from "react";
4505
+ import { useEffect as useEffect7 } from "react";
3888
4506
  import { sileo as sileo2, Toaster as SileoToaster } from "sileo";
3889
4507
 
3890
4508
  // src/ui/toast/toast-store.ts
@@ -3934,15 +4552,15 @@ function useToast() {
3934
4552
  }
3935
4553
 
3936
4554
  // src/ui/toast/toast.tsx
3937
- import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
4555
+ import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs29 } from "react/jsx-runtime";
3938
4556
  function ToastProvider({ children }) {
3939
- return /* @__PURE__ */ jsxs25(Fragment12, { children: [
4557
+ return /* @__PURE__ */ jsxs29(Fragment12, { children: [
3940
4558
  children,
3941
- /* @__PURE__ */ jsx49(Toaster, {})
4559
+ /* @__PURE__ */ jsx58(Toaster, {})
3942
4560
  ] });
3943
4561
  }
3944
4562
  function Toaster({ position }) {
3945
- return /* @__PURE__ */ jsx49(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
4563
+ return /* @__PURE__ */ jsx58(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
3946
4564
  }
3947
4565
  function ToastViewport({
3948
4566
  position,
@@ -3951,7 +4569,7 @@ function ToastViewport({
3951
4569
  }) {
3952
4570
  void className;
3953
4571
  if (visiblePosition && visiblePosition !== position) return null;
3954
- return /* @__PURE__ */ jsx49(Toaster, { position });
4572
+ return /* @__PURE__ */ jsx58(Toaster, { position });
3955
4573
  }
3956
4574
  function Toast({
3957
4575
  id,
@@ -3964,7 +4582,7 @@ function Toast({
3964
4582
  position,
3965
4583
  onDismiss
3966
4584
  }) {
3967
- useEffect6(() => {
4585
+ useEffect7(() => {
3968
4586
  if (state !== "open") return;
3969
4587
  const toastId = toast({ title, description, variant, action, duration, position });
3970
4588
  return () => {
@@ -3976,9 +4594,9 @@ function Toast({
3976
4594
  }
3977
4595
 
3978
4596
  // src/ui/toolbar/toolbar.tsx
3979
- import { jsx as jsx50 } from "react/jsx-runtime";
4597
+ import { jsx as jsx59 } from "react/jsx-runtime";
3980
4598
  function Toolbar({ className, ...props }) {
3981
- return /* @__PURE__ */ jsx50(
4599
+ return /* @__PURE__ */ jsx59(
3982
4600
  "div",
3983
4601
  {
3984
4602
  role: "toolbar",
@@ -3989,7 +4607,7 @@ function Toolbar({ className, ...props }) {
3989
4607
  );
3990
4608
  }
3991
4609
  function ToolbarGroup({ className, ...props }) {
3992
- return /* @__PURE__ */ jsx50(
4610
+ return /* @__PURE__ */ jsx59(
3993
4611
  "div",
3994
4612
  {
3995
4613
  "data-slot": "toolbar-group",
@@ -3999,13 +4617,14 @@ function ToolbarGroup({ className, ...props }) {
3999
4617
  );
4000
4618
  }
4001
4619
  function ToolbarSpacer({ className, ...props }) {
4002
- return /* @__PURE__ */ jsx50("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4620
+ return /* @__PURE__ */ jsx59("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4003
4621
  }
4004
4622
  export {
4005
4623
  Accordion,
4006
4624
  AccordionContent,
4007
4625
  AccordionItem,
4008
4626
  AccordionTrigger,
4627
+ ActiveFilters,
4009
4628
  Alert,
4010
4629
  AlertAction,
4011
4630
  AlertDescription,
@@ -4027,6 +4646,7 @@ export {
4027
4646
  AppShellMain,
4028
4647
  AppShellMobileHeader,
4029
4648
  AppShellSidebar,
4649
+ AsyncBoundary,
4030
4650
  AutocompleteCombobox,
4031
4651
  Avatar,
4032
4652
  AvatarBadge,
@@ -4068,7 +4688,20 @@ export {
4068
4688
  CommandItem,
4069
4689
  CommandList,
4070
4690
  ConfirmDialog,
4691
+ CopyButton,
4071
4692
  DangerZone,
4693
+ DataViewState,
4694
+ DataViewStateActions,
4695
+ DataViewStateDescription,
4696
+ DataViewStateTitle,
4697
+ DescriptionDetails,
4698
+ DescriptionItem,
4699
+ DescriptionList,
4700
+ DescriptionTerm,
4701
+ DetailDrawer,
4702
+ DetailDrawerBody,
4703
+ DrawerFooter as DetailDrawerFooter,
4704
+ DrawerHeader as DetailDrawerHeader,
4072
4705
  Dialog,
4073
4706
  DialogClose,
4074
4707
  DialogContent,
@@ -4106,6 +4739,12 @@ export {
4106
4739
  EmptyStateHeader,
4107
4740
  EmptyStateMedia,
4108
4741
  EmptyStateTitle,
4742
+ ErrorBoundary,
4743
+ ErrorState,
4744
+ ErrorStateActions,
4745
+ ErrorStateDescription,
4746
+ ErrorStateIcon,
4747
+ ErrorStateTitle,
4109
4748
  Field,
4110
4749
  FieldContent,
4111
4750
  FieldDescription,
@@ -4116,6 +4755,9 @@ export {
4116
4755
  FieldSeparator,
4117
4756
  FieldSet,
4118
4757
  FieldTitle,
4758
+ FilterBar,
4759
+ FilterChip,
4760
+ FilterGroup,
4119
4761
  FormFeedback,
4120
4762
  FormRow,
4121
4763
  HighlightMatch,
@@ -4143,6 +4785,7 @@ export {
4143
4785
  MenuItem,
4144
4786
  MenuTrigger,
4145
4787
  MetricCard,
4788
+ MetricGrid,
4146
4789
  OtpInput2 as OtpInput,
4147
4790
  PageHeader,
4148
4791
  PageHeaderActions,
@@ -4154,12 +4797,18 @@ export {
4154
4797
  PopoverContent,
4155
4798
  PopoverTrigger,
4156
4799
  QuantityInput,
4800
+ SectionHeader,
4801
+ SectionHeaderActions,
4802
+ SectionHeaderDescription,
4803
+ SectionHeaderHeading,
4804
+ SectionHeaderTitle,
4157
4805
  Select,
4158
4806
  SelectContent,
4159
4807
  SelectItem,
4160
4808
  SelectList,
4161
4809
  SelectTrigger,
4162
4810
  SelectValue,
4811
+ SelectionToolbar,
4163
4812
  Separator,
4164
4813
  Sheet,
4165
4814
  SheetClose,
@@ -4189,10 +4838,13 @@ export {
4189
4838
  TableBody,
4190
4839
  TableCaption,
4191
4840
  TableCell,
4841
+ TableEmpty,
4192
4842
  TableFooter,
4193
4843
  TableHead,
4194
4844
  TableHeader,
4845
+ TableLoading,
4195
4846
  TableRow,
4847
+ TableToolbar,
4196
4848
  Tabs,
4197
4849
  TabsContent,
4198
4850
  TabsList,
@@ -4220,8 +4872,16 @@ export {
4220
4872
  formSnapshot,
4221
4873
  getTextMatchParts,
4222
4874
  inputGroupAddonVariants,
4875
+ readSearchParam,
4876
+ readSearchParamArray,
4877
+ readSearchParamEnum,
4878
+ readSearchParamInt,
4879
+ toSearchParams,
4223
4880
  toast,
4881
+ updateSearchParams,
4882
+ useAsyncAction,
4224
4883
  useAutosave,
4884
+ useClipboard,
4225
4885
  useDebouncedValue,
4226
4886
  useFormDirty,
4227
4887
  useFormFeedback,