@doscientos/ui 0.1.32 → 0.1.34
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/README.md +25 -1
- package/dist/index.cjs +599 -551
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -64
- package/dist/index.d.ts +73 -64
- package/dist/index.js +617 -569
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function useAsyncAction(action) {
|
|
|
13
13
|
pendingRef.current = true;
|
|
14
14
|
setStatus("pending");
|
|
15
15
|
setError(null);
|
|
16
|
+
setData(null);
|
|
16
17
|
try {
|
|
17
18
|
const result = await action(...args);
|
|
18
19
|
setData(result);
|
|
@@ -29,6 +30,7 @@ function useAsyncAction(action) {
|
|
|
29
30
|
[action]
|
|
30
31
|
);
|
|
31
32
|
const reset = useCallback(() => {
|
|
33
|
+
if (pendingRef.current) return;
|
|
32
34
|
setData(null);
|
|
33
35
|
setError(null);
|
|
34
36
|
setStatus("idle");
|
|
@@ -51,24 +53,45 @@ function useAutosave({
|
|
|
51
53
|
const saveRef = useRef2(onSave);
|
|
52
54
|
const serializeRef = useRef2(serialize);
|
|
53
55
|
const latestSaveId = useRef2(0);
|
|
56
|
+
const queue = useRef2(Promise.resolve());
|
|
57
|
+
const queuedCount = useRef2(0);
|
|
58
|
+
const timeoutRef = useRef2(void 0);
|
|
59
|
+
const mounted = useRef2(true);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
mounted.current = true;
|
|
62
|
+
return () => {
|
|
63
|
+
mounted.current = false;
|
|
64
|
+
clearTimeout(timeoutRef.current);
|
|
65
|
+
};
|
|
66
|
+
}, []);
|
|
54
67
|
useEffect(() => {
|
|
55
68
|
saveRef.current = onSave;
|
|
56
69
|
serializeRef.current = serialize;
|
|
57
70
|
}, [onSave, serialize]);
|
|
58
|
-
const save = useCallback2(
|
|
71
|
+
const save = useCallback2((value, force = false) => {
|
|
72
|
+
clearTimeout(timeoutRef.current);
|
|
59
73
|
const saveId = ++latestSaveId.current;
|
|
74
|
+
const snapshot = serializeRef.current(value);
|
|
75
|
+
const write = saveRef.current;
|
|
76
|
+
queuedCount.current += 1;
|
|
60
77
|
setStatus("saving");
|
|
61
78
|
setError(null);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
const pending = queue.current.then(async () => {
|
|
80
|
+
try {
|
|
81
|
+
if (!mounted.current) return;
|
|
82
|
+
if (force || lastSaved.current !== snapshot) await write(value);
|
|
83
|
+
lastSaved.current = snapshot;
|
|
84
|
+
if (mounted.current && saveId === latestSaveId.current) setStatus("saved");
|
|
85
|
+
} catch (cause) {
|
|
86
|
+
if (!mounted.current || saveId !== latestSaveId.current) return;
|
|
87
|
+
setError(cause instanceof Error ? cause : new Error("No se pudo guardar."));
|
|
88
|
+
setStatus("error");
|
|
89
|
+
} finally {
|
|
90
|
+
queuedCount.current -= 1;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
queue.current = pending;
|
|
94
|
+
return pending;
|
|
72
95
|
}, []);
|
|
73
96
|
useEffect(() => {
|
|
74
97
|
if (!enabled) return;
|
|
@@ -77,11 +100,11 @@ function useAutosave({
|
|
|
77
100
|
lastSaved.current = snapshot;
|
|
78
101
|
return;
|
|
79
102
|
}
|
|
80
|
-
if (snapshot === lastSaved.current) return;
|
|
81
|
-
|
|
82
|
-
return () =>
|
|
103
|
+
if (snapshot === lastSaved.current && queuedCount.current === 0) return;
|
|
104
|
+
timeoutRef.current = setTimeout(() => void save(data), debounceMs);
|
|
105
|
+
return () => clearTimeout(timeoutRef.current);
|
|
83
106
|
}, [data, debounceMs, enabled, save]);
|
|
84
|
-
return { status, error, saveNow: () => save(data) };
|
|
107
|
+
return { status, error, saveNow: () => save(data, true) };
|
|
85
108
|
}
|
|
86
109
|
|
|
87
110
|
// src/hooks/use-clipboard.ts
|
|
@@ -1513,10 +1536,10 @@ function ComboboxContent({ className, ...props }) {
|
|
|
1513
1536
|
Popover,
|
|
1514
1537
|
{
|
|
1515
1538
|
"data-slot": "combobox-content",
|
|
1516
|
-
className: cn(
|
|
1539
|
+
className: (state) => cn(
|
|
1517
1540
|
floatingSurfaceClassName,
|
|
1518
1541
|
"max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
|
|
1519
|
-
className
|
|
1542
|
+
typeof className === "function" ? className(state) : className
|
|
1520
1543
|
),
|
|
1521
1544
|
...props
|
|
1522
1545
|
}
|
|
@@ -1531,7 +1554,10 @@ function ComboboxList({
|
|
|
1531
1554
|
ListBox,
|
|
1532
1555
|
{
|
|
1533
1556
|
"data-slot": "combobox-list",
|
|
1534
|
-
className:
|
|
1557
|
+
className: (state) => cn(
|
|
1558
|
+
"max-h-64 overflow-y-auto",
|
|
1559
|
+
typeof className === "function" ? className(state) : className
|
|
1560
|
+
),
|
|
1535
1561
|
renderEmptyState: emptyState ? () => emptyState : void 0,
|
|
1536
1562
|
...props
|
|
1537
1563
|
}
|
|
@@ -1546,9 +1572,9 @@ function ComboboxItem({
|
|
|
1546
1572
|
ListBoxItem,
|
|
1547
1573
|
{
|
|
1548
1574
|
"data-slot": "combobox-item",
|
|
1549
|
-
className: cn(
|
|
1575
|
+
className: (state) => cn(
|
|
1550
1576
|
"flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1551
|
-
className
|
|
1577
|
+
typeof className === "function" ? className(state) : className
|
|
1552
1578
|
),
|
|
1553
1579
|
...props,
|
|
1554
1580
|
children
|
|
@@ -1623,7 +1649,10 @@ function AutocompleteCombobox({
|
|
|
1623
1649
|
AriaComboBox,
|
|
1624
1650
|
{
|
|
1625
1651
|
...props,
|
|
1626
|
-
className:
|
|
1652
|
+
className: (state) => cn(
|
|
1653
|
+
"group/combobox flex w-full flex-col gap-1.5",
|
|
1654
|
+
typeof className === "function" ? className(state) : className
|
|
1655
|
+
),
|
|
1627
1656
|
items: filteredItems,
|
|
1628
1657
|
selectedKey,
|
|
1629
1658
|
inputValue,
|
|
@@ -1733,22 +1762,209 @@ function CommandItem({ className, ...props }) {
|
|
|
1733
1762
|
);
|
|
1734
1763
|
}
|
|
1735
1764
|
|
|
1736
|
-
// src/ui/
|
|
1765
|
+
// src/ui/confirm-dialog/confirm-dialog.tsx
|
|
1766
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1767
|
+
function ConfirmDialog({
|
|
1768
|
+
open,
|
|
1769
|
+
onOpenChange,
|
|
1770
|
+
title,
|
|
1771
|
+
description,
|
|
1772
|
+
confirmLabel = "Confirmar",
|
|
1773
|
+
cancelLabel = "Cancelar",
|
|
1774
|
+
destructive = false,
|
|
1775
|
+
pending = false,
|
|
1776
|
+
onConfirm
|
|
1777
|
+
}) {
|
|
1778
|
+
return /* @__PURE__ */ jsx17(
|
|
1779
|
+
AlertDialog,
|
|
1780
|
+
{
|
|
1781
|
+
open,
|
|
1782
|
+
onOpenChange: (nextOpen) => {
|
|
1783
|
+
if (!pending || nextOpen) onOpenChange(nextOpen);
|
|
1784
|
+
},
|
|
1785
|
+
children: /* @__PURE__ */ jsxs6(AlertDialogContent, { children: [
|
|
1786
|
+
/* @__PURE__ */ jsxs6(AlertDialogHeader, { children: [
|
|
1787
|
+
/* @__PURE__ */ jsx17(AlertDialogTitle, { children: title }),
|
|
1788
|
+
description ? /* @__PURE__ */ jsx17(AlertDialogDescription, { children: description }) : null
|
|
1789
|
+
] }),
|
|
1790
|
+
/* @__PURE__ */ jsxs6(AlertDialogFooter, { children: [
|
|
1791
|
+
/* @__PURE__ */ jsx17(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
|
|
1792
|
+
/* @__PURE__ */ jsx17(
|
|
1793
|
+
Button,
|
|
1794
|
+
{
|
|
1795
|
+
variant: destructive ? "destructive" : "default",
|
|
1796
|
+
isDisabled: pending,
|
|
1797
|
+
onPress: onConfirm,
|
|
1798
|
+
children: confirmLabel
|
|
1799
|
+
}
|
|
1800
|
+
)
|
|
1801
|
+
] })
|
|
1802
|
+
] })
|
|
1803
|
+
}
|
|
1804
|
+
);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
// src/ui/copy-button/copy-button.tsx
|
|
1808
|
+
import { Check as Check2, Copy } from "lucide-react";
|
|
1809
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1810
|
+
function CopyButton({
|
|
1811
|
+
value,
|
|
1812
|
+
children,
|
|
1813
|
+
copiedLabel = "Copiado",
|
|
1814
|
+
resetMs,
|
|
1815
|
+
onCopied,
|
|
1816
|
+
onCopyError,
|
|
1817
|
+
...props
|
|
1818
|
+
}) {
|
|
1819
|
+
const { copy, status } = useClipboard({ resetMs, onError: onCopyError });
|
|
1820
|
+
const copied = status === "copied";
|
|
1821
|
+
const label = copied ? copiedLabel : children ?? "Copiar";
|
|
1822
|
+
return /* @__PURE__ */ jsxs7(
|
|
1823
|
+
Button,
|
|
1824
|
+
{
|
|
1825
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
1826
|
+
onPress: () => {
|
|
1827
|
+
void copy(value).then((wasCopied) => {
|
|
1828
|
+
if (wasCopied) onCopied?.(value);
|
|
1829
|
+
});
|
|
1830
|
+
},
|
|
1831
|
+
...props,
|
|
1832
|
+
children: [
|
|
1833
|
+
copied ? /* @__PURE__ */ jsx18(Check2, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ jsx18(Copy, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1834
|
+
label
|
|
1835
|
+
]
|
|
1836
|
+
}
|
|
1837
|
+
);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
// src/ui/danger-zone/danger-zone.tsx
|
|
1841
|
+
import { ChevronDown, ShieldAlert } from "lucide-react";
|
|
1842
|
+
import {
|
|
1843
|
+
Button as DisclosureButton,
|
|
1844
|
+
Disclosure,
|
|
1845
|
+
DisclosurePanel,
|
|
1846
|
+
Heading as Heading2
|
|
1847
|
+
} from "react-aria-components";
|
|
1848
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1849
|
+
function DangerZone({
|
|
1850
|
+
title = "Zona de peligro",
|
|
1851
|
+
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
1852
|
+
defaultOpen = false,
|
|
1853
|
+
className,
|
|
1854
|
+
children
|
|
1855
|
+
}) {
|
|
1856
|
+
return /* @__PURE__ */ jsx19(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs8(Card, { className: cn("border-destructive/30", className), children: [
|
|
1857
|
+
/* @__PURE__ */ jsx19(Heading2, { className: "flex", children: /* @__PURE__ */ jsxs8(
|
|
1858
|
+
DisclosureButton,
|
|
1859
|
+
{
|
|
1860
|
+
slot: "trigger",
|
|
1861
|
+
"data-slot": "danger-zone-trigger",
|
|
1862
|
+
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",
|
|
1863
|
+
children: [
|
|
1864
|
+
/* @__PURE__ */ jsx19(ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
|
|
1865
|
+
/* @__PURE__ */ jsxs8("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
1866
|
+
/* @__PURE__ */ jsx19("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
|
|
1867
|
+
/* @__PURE__ */ jsx19("span", { className: "text-muted-foreground text-xs", children: description })
|
|
1868
|
+
] }),
|
|
1869
|
+
/* @__PURE__ */ jsx19(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
) }),
|
|
1873
|
+
/* @__PURE__ */ jsx19(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx19(CardContent, { children }) })
|
|
1874
|
+
] }) });
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
// src/ui/data-view-state/data-view-state.tsx
|
|
1878
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1879
|
+
function DataViewState({ className, ...props }) {
|
|
1880
|
+
return /* @__PURE__ */ jsx20(
|
|
1881
|
+
"section",
|
|
1882
|
+
{
|
|
1883
|
+
"data-slot": "data-view-state",
|
|
1884
|
+
className: cn(
|
|
1885
|
+
"flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
|
|
1886
|
+
className
|
|
1887
|
+
),
|
|
1888
|
+
...props
|
|
1889
|
+
}
|
|
1890
|
+
);
|
|
1891
|
+
}
|
|
1892
|
+
function DataViewStateTitle({ children, className, ...props }) {
|
|
1893
|
+
return /* @__PURE__ */ jsx20("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
|
|
1894
|
+
}
|
|
1895
|
+
function DataViewStateDescription({ className, ...props }) {
|
|
1896
|
+
return /* @__PURE__ */ jsx20(
|
|
1897
|
+
"p",
|
|
1898
|
+
{
|
|
1899
|
+
"data-slot": "data-view-state-description",
|
|
1900
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1901
|
+
...props
|
|
1902
|
+
}
|
|
1903
|
+
);
|
|
1904
|
+
}
|
|
1905
|
+
function DataViewStateActions({ className, ...props }) {
|
|
1906
|
+
return /* @__PURE__ */ jsx20(
|
|
1907
|
+
"div",
|
|
1908
|
+
{
|
|
1909
|
+
"data-slot": "data-view-state-actions",
|
|
1910
|
+
className: cn("flex items-center gap-2", className),
|
|
1911
|
+
...props
|
|
1912
|
+
}
|
|
1913
|
+
);
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
// src/ui/description-list/description-list.tsx
|
|
1917
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1918
|
+
function DescriptionList({ className, ...props }) {
|
|
1919
|
+
return /* @__PURE__ */ jsx21(
|
|
1920
|
+
"dl",
|
|
1921
|
+
{
|
|
1922
|
+
"data-slot": "description-list",
|
|
1923
|
+
className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
|
|
1924
|
+
...props
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
function DescriptionItem({ className, ...props }) {
|
|
1929
|
+
return /* @__PURE__ */ jsx21("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
|
|
1930
|
+
}
|
|
1931
|
+
function DescriptionTerm({ className, ...props }) {
|
|
1932
|
+
return /* @__PURE__ */ jsx21(
|
|
1933
|
+
"dt",
|
|
1934
|
+
{
|
|
1935
|
+
"data-slot": "description-term",
|
|
1936
|
+
className: cn("text-xs font-medium text-muted-foreground", className),
|
|
1937
|
+
...props
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
1940
|
+
}
|
|
1941
|
+
function DescriptionDetails({ className, ...props }) {
|
|
1942
|
+
return /* @__PURE__ */ jsx21(
|
|
1943
|
+
"dd",
|
|
1944
|
+
{
|
|
1945
|
+
"data-slot": "description-details",
|
|
1946
|
+
className: cn("mt-1 wrap-break-word text-sm", className),
|
|
1947
|
+
...props
|
|
1948
|
+
}
|
|
1949
|
+
);
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
// src/ui/drawer/drawer.tsx
|
|
1737
1953
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
1738
1954
|
import {
|
|
1739
1955
|
Dialog as DrawerPrimitive,
|
|
1740
1956
|
DialogTrigger as DrawerTriggerPrimitive,
|
|
1741
|
-
Heading as
|
|
1957
|
+
Heading as Heading3,
|
|
1742
1958
|
ModalOverlay as ModalOverlayPrimitive,
|
|
1743
1959
|
Modal as ModalPrimitive,
|
|
1744
1960
|
Text as Text3
|
|
1745
1961
|
} from "react-aria-components";
|
|
1746
|
-
import { jsx as
|
|
1962
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1747
1963
|
function DrawerTrigger({ ...props }) {
|
|
1748
|
-
return /* @__PURE__ */
|
|
1964
|
+
return /* @__PURE__ */ jsx22(DrawerTriggerPrimitive, { "data-slot": "drawer-trigger", ...props });
|
|
1749
1965
|
}
|
|
1750
1966
|
function DrawerClose({ className, variant = "outline", size = "default", ...props }) {
|
|
1751
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ jsx22(
|
|
1752
1968
|
Button,
|
|
1753
1969
|
{
|
|
1754
1970
|
slot: "close",
|
|
@@ -1765,7 +1981,7 @@ function DrawerOverlay({
|
|
|
1765
1981
|
children,
|
|
1766
1982
|
...props
|
|
1767
1983
|
}) {
|
|
1768
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ jsx22(
|
|
1769
1985
|
ModalOverlayPrimitive,
|
|
1770
1986
|
{
|
|
1771
1987
|
"data-slot": "drawer-overlay",
|
|
@@ -1787,7 +2003,7 @@ function DrawerContent({
|
|
|
1787
2003
|
showCloseButton = true,
|
|
1788
2004
|
...props
|
|
1789
2005
|
}) {
|
|
1790
|
-
return /* @__PURE__ */
|
|
2006
|
+
return /* @__PURE__ */ jsx22(DrawerOverlay, { ...props, children: /* @__PURE__ */ jsx22(
|
|
1791
2007
|
ModalPrimitive,
|
|
1792
2008
|
{
|
|
1793
2009
|
"data-slot": "drawer-content",
|
|
@@ -1796,7 +2012,7 @@ function DrawerContent({
|
|
|
1796
2012
|
"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",
|
|
1797
2013
|
className
|
|
1798
2014
|
),
|
|
1799
|
-
children: /* @__PURE__ */
|
|
2015
|
+
children: /* @__PURE__ */ jsxs9(
|
|
1800
2016
|
DrawerPrimitive,
|
|
1801
2017
|
{
|
|
1802
2018
|
"data-slot": "drawer",
|
|
@@ -1804,9 +2020,9 @@ function DrawerContent({
|
|
|
1804
2020
|
...dialogProps,
|
|
1805
2021
|
children: [
|
|
1806
2022
|
children,
|
|
1807
|
-
showCloseButton && /* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */
|
|
2023
|
+
showCloseButton && /* @__PURE__ */ jsxs9(DrawerClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2024
|
+
/* @__PURE__ */ jsx22(XIcon2, {}),
|
|
2025
|
+
/* @__PURE__ */ jsx22("span", { className: "sr-only", children: "Cerrar" })
|
|
1810
2026
|
] })
|
|
1811
2027
|
]
|
|
1812
2028
|
}
|
|
@@ -1815,16 +2031,16 @@ function DrawerContent({
|
|
|
1815
2031
|
) });
|
|
1816
2032
|
}
|
|
1817
2033
|
function Drawer(props) {
|
|
1818
|
-
if (!("trigger" in props)) return /* @__PURE__ */
|
|
2034
|
+
if (!("trigger" in props)) return /* @__PURE__ */ jsx22(DrawerContent, { ...props });
|
|
1819
2035
|
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
1820
|
-
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */
|
|
1821
|
-
return /* @__PURE__ */
|
|
2036
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx22(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
2037
|
+
return /* @__PURE__ */ jsxs9(DrawerTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
1822
2038
|
triggerElement,
|
|
1823
|
-
/* @__PURE__ */
|
|
2039
|
+
/* @__PURE__ */ jsx22(DrawerContent, { ...contentProps, children })
|
|
1824
2040
|
] });
|
|
1825
2041
|
}
|
|
1826
2042
|
function DrawerHeader({ className, ...props }) {
|
|
1827
|
-
return /* @__PURE__ */
|
|
2043
|
+
return /* @__PURE__ */ jsx22(
|
|
1828
2044
|
"div",
|
|
1829
2045
|
{
|
|
1830
2046
|
"data-slot": "drawer-header",
|
|
@@ -1834,7 +2050,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
1834
2050
|
);
|
|
1835
2051
|
}
|
|
1836
2052
|
function DrawerFooter({ className, ...props }) {
|
|
1837
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ jsx22(
|
|
1838
2054
|
"div",
|
|
1839
2055
|
{
|
|
1840
2056
|
"data-slot": "drawer-footer",
|
|
@@ -1844,319 +2060,62 @@ function DrawerFooter({ className, ...props }) {
|
|
|
1844
2060
|
);
|
|
1845
2061
|
}
|
|
1846
2062
|
function DrawerTitle({ className, ...props }) {
|
|
1847
|
-
return /* @__PURE__ */
|
|
1848
|
-
|
|
1849
|
-
{
|
|
1850
|
-
slot: "title",
|
|
1851
|
-
"data-slot": "drawer-title",
|
|
1852
|
-
className: cn("text-base font-medium text-foreground", className),
|
|
1853
|
-
...props
|
|
1854
|
-
}
|
|
1855
|
-
);
|
|
1856
|
-
}
|
|
1857
|
-
function DrawerDescription({
|
|
1858
|
-
className,
|
|
1859
|
-
...props
|
|
1860
|
-
}) {
|
|
1861
|
-
return /* @__PURE__ */ jsx17(
|
|
1862
|
-
Text3,
|
|
1863
|
-
{
|
|
1864
|
-
slot: "description",
|
|
1865
|
-
"data-slot": "drawer-description",
|
|
1866
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
1867
|
-
...props
|
|
1868
|
-
}
|
|
1869
|
-
);
|
|
1870
|
-
}
|
|
1871
|
-
var Sheet = DrawerContent;
|
|
1872
|
-
var SheetClose = DrawerClose;
|
|
1873
|
-
var SheetContent = DrawerContent;
|
|
1874
|
-
var SheetDescription = DrawerDescription;
|
|
1875
|
-
var SheetFooter = DrawerFooter;
|
|
1876
|
-
var SheetHeader = DrawerHeader;
|
|
1877
|
-
var SheetTitle = DrawerTitle;
|
|
1878
|
-
var SheetTrigger = DrawerTrigger;
|
|
1879
|
-
|
|
1880
|
-
// src/ui/composition/composition.tsx
|
|
1881
|
-
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1882
|
-
function FilterBar({ className, ...props }) {
|
|
1883
|
-
return /* @__PURE__ */ jsx18(
|
|
1884
|
-
"div",
|
|
1885
|
-
{
|
|
1886
|
-
"data-slot": "filter-bar",
|
|
1887
|
-
className: cn("flex flex-wrap items-center gap-2", className),
|
|
1888
|
-
...props
|
|
1889
|
-
}
|
|
1890
|
-
);
|
|
1891
|
-
}
|
|
1892
|
-
function FilterGroup({ className, ...props }) {
|
|
1893
|
-
return /* @__PURE__ */ jsx18(
|
|
1894
|
-
"div",
|
|
1895
|
-
{
|
|
1896
|
-
"data-slot": "filter-group",
|
|
1897
|
-
className: cn("flex flex-wrap items-center gap-2", className),
|
|
1898
|
-
...props
|
|
1899
|
-
}
|
|
1900
|
-
);
|
|
1901
|
-
}
|
|
1902
|
-
function ActiveFilters({ className, ...props }) {
|
|
1903
|
-
return /* @__PURE__ */ jsx18(
|
|
1904
|
-
"div",
|
|
1905
|
-
{
|
|
1906
|
-
"data-slot": "active-filters",
|
|
1907
|
-
"aria-label": "Filtros activos",
|
|
1908
|
-
className: cn("flex flex-wrap items-center gap-1.5", className),
|
|
1909
|
-
...props
|
|
1910
|
-
}
|
|
1911
|
-
);
|
|
1912
|
-
}
|
|
1913
|
-
function FilterChip({
|
|
1914
|
-
children,
|
|
1915
|
-
onRemove,
|
|
1916
|
-
...props
|
|
1917
|
-
}) {
|
|
1918
|
-
return /* @__PURE__ */ jsxs7(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
|
|
1919
|
-
children,
|
|
1920
|
-
" \xD7"
|
|
1921
|
-
] });
|
|
1922
|
-
}
|
|
1923
|
-
function SelectionToolbar({
|
|
1924
|
-
count,
|
|
1925
|
-
className,
|
|
1926
|
-
children,
|
|
1927
|
-
...props
|
|
1928
|
-
}) {
|
|
1929
|
-
return /* @__PURE__ */ jsxs7(
|
|
1930
|
-
"div",
|
|
1931
|
-
{
|
|
1932
|
-
"data-slot": "selection-toolbar",
|
|
1933
|
-
className: cn(
|
|
1934
|
-
"flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
|
|
1935
|
-
className
|
|
1936
|
-
),
|
|
1937
|
-
...props,
|
|
1938
|
-
children: [
|
|
1939
|
-
/* @__PURE__ */ jsxs7("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
|
|
1940
|
-
count,
|
|
1941
|
-
" seleccionados"
|
|
1942
|
-
] }),
|
|
1943
|
-
/* @__PURE__ */ jsx18("div", { className: "flex items-center gap-2", children })
|
|
1944
|
-
]
|
|
1945
|
-
}
|
|
1946
|
-
);
|
|
1947
|
-
}
|
|
1948
|
-
function DescriptionList({ className, ...props }) {
|
|
1949
|
-
return /* @__PURE__ */ jsx18(
|
|
1950
|
-
"dl",
|
|
1951
|
-
{
|
|
1952
|
-
"data-slot": "description-list",
|
|
1953
|
-
className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
|
|
1954
|
-
...props
|
|
1955
|
-
}
|
|
1956
|
-
);
|
|
1957
|
-
}
|
|
1958
|
-
function DescriptionItem({ className, ...props }) {
|
|
1959
|
-
return /* @__PURE__ */ jsx18("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
|
|
1960
|
-
}
|
|
1961
|
-
function DescriptionTerm({ className, ...props }) {
|
|
1962
|
-
return /* @__PURE__ */ jsx18(
|
|
1963
|
-
"dt",
|
|
1964
|
-
{
|
|
1965
|
-
"data-slot": "description-term",
|
|
1966
|
-
className: cn("text-xs font-medium text-muted-foreground", className),
|
|
1967
|
-
...props
|
|
1968
|
-
}
|
|
1969
|
-
);
|
|
1970
|
-
}
|
|
1971
|
-
function DescriptionDetails({ className, ...props }) {
|
|
1972
|
-
return /* @__PURE__ */ jsx18(
|
|
1973
|
-
"dd",
|
|
1974
|
-
{
|
|
1975
|
-
"data-slot": "description-details",
|
|
1976
|
-
className: cn("mt-1 wrap-break-word text-sm", className),
|
|
1977
|
-
...props
|
|
1978
|
-
}
|
|
1979
|
-
);
|
|
1980
|
-
}
|
|
1981
|
-
function DataViewState({ className, ...props }) {
|
|
1982
|
-
return /* @__PURE__ */ jsx18(
|
|
1983
|
-
"section",
|
|
1984
|
-
{
|
|
1985
|
-
"data-slot": "data-view-state",
|
|
1986
|
-
className: cn(
|
|
1987
|
-
"flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
|
|
1988
|
-
className
|
|
1989
|
-
),
|
|
1990
|
-
...props
|
|
1991
|
-
}
|
|
1992
|
-
);
|
|
1993
|
-
}
|
|
1994
|
-
function DataViewStateTitle({ children, className, ...props }) {
|
|
1995
|
-
return /* @__PURE__ */ jsx18("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
|
|
1996
|
-
}
|
|
1997
|
-
function DataViewStateDescription({ className, ...props }) {
|
|
1998
|
-
return /* @__PURE__ */ jsx18(
|
|
1999
|
-
"p",
|
|
2000
|
-
{
|
|
2001
|
-
"data-slot": "data-view-state-description",
|
|
2002
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
2003
|
-
...props
|
|
2004
|
-
}
|
|
2005
|
-
);
|
|
2006
|
-
}
|
|
2007
|
-
function DataViewStateActions({ className, ...props }) {
|
|
2008
|
-
return /* @__PURE__ */ jsx18(
|
|
2009
|
-
"div",
|
|
2010
|
-
{
|
|
2011
|
-
"data-slot": "data-view-state-actions",
|
|
2012
|
-
className: cn("flex items-center gap-2", className),
|
|
2013
|
-
...props
|
|
2014
|
-
}
|
|
2015
|
-
);
|
|
2016
|
-
}
|
|
2017
|
-
function MetricGrid({ className, ...props }) {
|
|
2018
|
-
return /* @__PURE__ */ jsx18(
|
|
2019
|
-
"div",
|
|
2020
|
-
{
|
|
2021
|
-
"data-slot": "metric-grid",
|
|
2022
|
-
className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
|
|
2023
|
-
...props
|
|
2024
|
-
}
|
|
2025
|
-
);
|
|
2026
|
-
}
|
|
2027
|
-
function DetailDrawer({ children, ...props }) {
|
|
2028
|
-
return /* @__PURE__ */ jsx18(DrawerContent, { ...props, children });
|
|
2029
|
-
}
|
|
2030
|
-
function DetailDrawerBody({ className, ...props }) {
|
|
2031
|
-
return /* @__PURE__ */ jsx18(
|
|
2032
|
-
"div",
|
|
2033
|
-
{
|
|
2034
|
-
"data-slot": "detail-drawer-body",
|
|
2035
|
-
className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
|
|
2036
|
-
...props
|
|
2037
|
-
}
|
|
2038
|
-
);
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
// src/ui/confirm-dialog/confirm-dialog.tsx
|
|
2042
|
-
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2043
|
-
function ConfirmDialog({
|
|
2044
|
-
open,
|
|
2045
|
-
onOpenChange,
|
|
2046
|
-
title,
|
|
2047
|
-
description,
|
|
2048
|
-
confirmLabel = "Confirmar",
|
|
2049
|
-
cancelLabel = "Cancelar",
|
|
2050
|
-
destructive = false,
|
|
2051
|
-
pending = false,
|
|
2052
|
-
onConfirm
|
|
2053
|
-
}) {
|
|
2054
|
-
return /* @__PURE__ */ jsx19(
|
|
2055
|
-
AlertDialog,
|
|
2056
|
-
{
|
|
2057
|
-
open,
|
|
2058
|
-
onOpenChange: (nextOpen) => {
|
|
2059
|
-
if (!pending || nextOpen) onOpenChange(nextOpen);
|
|
2060
|
-
},
|
|
2061
|
-
children: /* @__PURE__ */ jsxs8(AlertDialogContent, { children: [
|
|
2062
|
-
/* @__PURE__ */ jsxs8(AlertDialogHeader, { children: [
|
|
2063
|
-
/* @__PURE__ */ jsx19(AlertDialogTitle, { children: title }),
|
|
2064
|
-
description ? /* @__PURE__ */ jsx19(AlertDialogDescription, { children: description }) : null
|
|
2065
|
-
] }),
|
|
2066
|
-
/* @__PURE__ */ jsxs8(AlertDialogFooter, { children: [
|
|
2067
|
-
/* @__PURE__ */ jsx19(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
|
|
2068
|
-
/* @__PURE__ */ jsx19(
|
|
2069
|
-
Button,
|
|
2070
|
-
{
|
|
2071
|
-
variant: destructive ? "destructive" : "default",
|
|
2072
|
-
isDisabled: pending,
|
|
2073
|
-
onPress: onConfirm,
|
|
2074
|
-
children: confirmLabel
|
|
2075
|
-
}
|
|
2076
|
-
)
|
|
2077
|
-
] })
|
|
2078
|
-
] })
|
|
2079
|
-
}
|
|
2080
|
-
);
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
// src/ui/copy-button/copy-button.tsx
|
|
2084
|
-
import { Check as Check2, Copy } from "lucide-react";
|
|
2085
|
-
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2086
|
-
function CopyButton({
|
|
2087
|
-
value,
|
|
2088
|
-
children,
|
|
2089
|
-
copiedLabel = "Copiado",
|
|
2090
|
-
resetMs,
|
|
2091
|
-
onCopied,
|
|
2092
|
-
onCopyError,
|
|
2063
|
+
return /* @__PURE__ */ jsx22(
|
|
2064
|
+
Heading3,
|
|
2065
|
+
{
|
|
2066
|
+
slot: "title",
|
|
2067
|
+
"data-slot": "drawer-title",
|
|
2068
|
+
className: cn("text-base font-medium text-foreground", className),
|
|
2069
|
+
...props
|
|
2070
|
+
}
|
|
2071
|
+
);
|
|
2072
|
+
}
|
|
2073
|
+
function DrawerDescription({
|
|
2074
|
+
className,
|
|
2093
2075
|
...props
|
|
2094
2076
|
}) {
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
const label = copied ? copiedLabel : children ?? "Copiar";
|
|
2098
|
-
return /* @__PURE__ */ jsxs9(
|
|
2099
|
-
Button,
|
|
2077
|
+
return /* @__PURE__ */ jsx22(
|
|
2078
|
+
Text3,
|
|
2100
2079
|
{
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
});
|
|
2106
|
-
},
|
|
2107
|
-
...props,
|
|
2108
|
-
children: [
|
|
2109
|
-
copied ? /* @__PURE__ */ jsx20(Check2, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ jsx20(Copy, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2110
|
-
label
|
|
2111
|
-
]
|
|
2080
|
+
slot: "description",
|
|
2081
|
+
"data-slot": "drawer-description",
|
|
2082
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2083
|
+
...props
|
|
2112
2084
|
}
|
|
2113
2085
|
);
|
|
2114
2086
|
}
|
|
2087
|
+
var Sheet = DrawerContent;
|
|
2088
|
+
var SheetClose = DrawerClose;
|
|
2089
|
+
var SheetContent = DrawerContent;
|
|
2090
|
+
var SheetDescription = DrawerDescription;
|
|
2091
|
+
var SheetFooter = DrawerFooter;
|
|
2092
|
+
var SheetHeader = DrawerHeader;
|
|
2093
|
+
var SheetTitle = DrawerTitle;
|
|
2094
|
+
var SheetTrigger = DrawerTrigger;
|
|
2115
2095
|
|
|
2116
|
-
// src/ui/
|
|
2117
|
-
import {
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
children
|
|
2131
|
-
}) {
|
|
2132
|
-
return /* @__PURE__ */ jsx21(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs10(Card, { className: cn("border-destructive/30", className), children: [
|
|
2133
|
-
/* @__PURE__ */ jsx21(Heading3, { className: "flex", children: /* @__PURE__ */ jsxs10(
|
|
2134
|
-
DisclosureButton,
|
|
2135
|
-
{
|
|
2136
|
-
slot: "trigger",
|
|
2137
|
-
"data-slot": "danger-zone-trigger",
|
|
2138
|
-
className: "group/danger focus-visible:ring-ring/50 flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3",
|
|
2139
|
-
children: [
|
|
2140
|
-
/* @__PURE__ */ jsx21(ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
|
|
2141
|
-
/* @__PURE__ */ jsxs10("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
2142
|
-
/* @__PURE__ */ jsx21("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
|
|
2143
|
-
/* @__PURE__ */ jsx21("span", { className: "text-muted-foreground text-xs", children: description })
|
|
2144
|
-
] }),
|
|
2145
|
-
/* @__PURE__ */ jsx21(ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
|
|
2146
|
-
]
|
|
2147
|
-
}
|
|
2148
|
-
) }),
|
|
2149
|
-
/* @__PURE__ */ jsx21(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx21(CardContent, { children }) })
|
|
2150
|
-
] }) });
|
|
2096
|
+
// src/ui/detail-drawer/detail-drawer.tsx
|
|
2097
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2098
|
+
function DetailDrawer({ children, ...props }) {
|
|
2099
|
+
return /* @__PURE__ */ jsx23(DrawerContent, { ...props, children });
|
|
2100
|
+
}
|
|
2101
|
+
function DetailDrawerBody({ className, ...props }) {
|
|
2102
|
+
return /* @__PURE__ */ jsx23(
|
|
2103
|
+
"div",
|
|
2104
|
+
{
|
|
2105
|
+
"data-slot": "detail-drawer-body",
|
|
2106
|
+
className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
|
|
2107
|
+
...props
|
|
2108
|
+
}
|
|
2109
|
+
);
|
|
2151
2110
|
}
|
|
2152
2111
|
|
|
2153
2112
|
// src/ui/doc-preview/doc-preview.tsx
|
|
2154
2113
|
import { FileText, Image } from "lucide-react";
|
|
2155
|
-
import { jsx as
|
|
2114
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2156
2115
|
function DocPreview({ url, mimeType, name }) {
|
|
2157
|
-
if (!url) return /* @__PURE__ */
|
|
2116
|
+
if (!url) return /* @__PURE__ */ jsx24(Fallback, { mimeType, reason: "no-url" });
|
|
2158
2117
|
if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
|
|
2159
|
-
return /* @__PURE__ */
|
|
2118
|
+
return /* @__PURE__ */ jsx24(
|
|
2160
2119
|
"iframe",
|
|
2161
2120
|
{
|
|
2162
2121
|
src: url,
|
|
@@ -2167,9 +2126,9 @@ function DocPreview({ url, mimeType, name }) {
|
|
|
2167
2126
|
);
|
|
2168
2127
|
}
|
|
2169
2128
|
if (mimeType?.startsWith("image/")) {
|
|
2170
|
-
return /* @__PURE__ */
|
|
2129
|
+
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" }) });
|
|
2171
2130
|
}
|
|
2172
|
-
return /* @__PURE__ */
|
|
2131
|
+
return /* @__PURE__ */ jsx24(Fallback, { mimeType, reason: "unsupported" });
|
|
2173
2132
|
}
|
|
2174
2133
|
function Fallback({
|
|
2175
2134
|
mimeType,
|
|
@@ -2177,11 +2136,11 @@ function Fallback({
|
|
|
2177
2136
|
}) {
|
|
2178
2137
|
const Icon = mimeType?.startsWith("image/") ? Image : FileText;
|
|
2179
2138
|
const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
|
|
2180
|
-
return /* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
mimeType ? /* @__PURE__ */
|
|
2184
|
-
/* @__PURE__ */
|
|
2139
|
+
return /* @__PURE__ */ jsxs10("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
|
|
2140
|
+
/* @__PURE__ */ jsx24(Icon, { className: "size-9 opacity-30" }),
|
|
2141
|
+
/* @__PURE__ */ jsx24("p", { className: "text-sm", children: message }),
|
|
2142
|
+
mimeType ? /* @__PURE__ */ jsx24("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
|
|
2143
|
+
/* @__PURE__ */ jsx24("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
|
|
2185
2144
|
] });
|
|
2186
2145
|
}
|
|
2187
2146
|
|
|
@@ -2200,9 +2159,9 @@ import {
|
|
|
2200
2159
|
Separator as SeparatorPrimitive2,
|
|
2201
2160
|
SubmenuTrigger as SubmenuTriggerPrimitive
|
|
2202
2161
|
} from "react-aria-components";
|
|
2203
|
-
import { Fragment as Fragment5, jsx as
|
|
2162
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2204
2163
|
function DropdownMenuTrigger({ ...props }) {
|
|
2205
|
-
return /* @__PURE__ */
|
|
2164
|
+
return /* @__PURE__ */ jsx25(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
2206
2165
|
}
|
|
2207
2166
|
function DropdownMenuContent({
|
|
2208
2167
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -2213,7 +2172,7 @@ function DropdownMenuContent({
|
|
|
2213
2172
|
children,
|
|
2214
2173
|
...props
|
|
2215
2174
|
}) {
|
|
2216
|
-
return /* @__PURE__ */
|
|
2175
|
+
return /* @__PURE__ */ jsx25(
|
|
2217
2176
|
PopoverPrimitive,
|
|
2218
2177
|
{
|
|
2219
2178
|
"data-slot": dataSlot,
|
|
@@ -2225,7 +2184,7 @@ function DropdownMenuContent({
|
|
|
2225
2184
|
"w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground",
|
|
2226
2185
|
className
|
|
2227
2186
|
),
|
|
2228
|
-
children: /* @__PURE__ */
|
|
2187
|
+
children: /* @__PURE__ */ jsx25(
|
|
2229
2188
|
MenuPrimitive,
|
|
2230
2189
|
{
|
|
2231
2190
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
@@ -2237,25 +2196,25 @@ function DropdownMenuContent({
|
|
|
2237
2196
|
);
|
|
2238
2197
|
}
|
|
2239
2198
|
function DropdownMenu(props) {
|
|
2240
|
-
if (!("trigger" in props)) return /* @__PURE__ */
|
|
2199
|
+
if (!("trigger" in props)) return /* @__PURE__ */ jsx25(DropdownMenuContent, { ...props });
|
|
2241
2200
|
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
2242
|
-
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */
|
|
2243
|
-
return /* @__PURE__ */
|
|
2201
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx25(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
2202
|
+
return /* @__PURE__ */ jsxs11(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
2244
2203
|
triggerElement,
|
|
2245
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ jsx25(DropdownMenuContent, { ...contentProps, children })
|
|
2246
2205
|
] });
|
|
2247
2206
|
}
|
|
2248
2207
|
function DropdownMenuGroup({
|
|
2249
2208
|
...props
|
|
2250
2209
|
}) {
|
|
2251
|
-
return /* @__PURE__ */
|
|
2210
|
+
return /* @__PURE__ */ jsx25(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
|
|
2252
2211
|
}
|
|
2253
2212
|
function DropdownMenuLabel({
|
|
2254
2213
|
className,
|
|
2255
2214
|
inset,
|
|
2256
2215
|
...props
|
|
2257
2216
|
}) {
|
|
2258
|
-
return /* @__PURE__ */
|
|
2217
|
+
return /* @__PURE__ */ jsx25(
|
|
2259
2218
|
HeaderPrimitive,
|
|
2260
2219
|
{
|
|
2261
2220
|
"data-slot": "dropdown-menu-label",
|
|
@@ -2287,7 +2246,7 @@ function DropdownMenuItem({
|
|
|
2287
2246
|
children,
|
|
2288
2247
|
...props
|
|
2289
2248
|
}) {
|
|
2290
|
-
return /* @__PURE__ */
|
|
2249
|
+
return /* @__PURE__ */ jsx25(
|
|
2291
2250
|
MenuItemPrimitive,
|
|
2292
2251
|
{
|
|
2293
2252
|
"data-slot": "dropdown-menu-item",
|
|
@@ -2299,13 +2258,13 @@ function DropdownMenuItem({
|
|
|
2299
2258
|
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
2300
2259
|
),
|
|
2301
2260
|
...props,
|
|
2302
|
-
children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */
|
|
2303
|
-
selectionMode !== "none" ? /* @__PURE__ */
|
|
2261
|
+
children: composeRenderProps(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
2262
|
+
selectionMode !== "none" ? /* @__PURE__ */ jsx25(
|
|
2304
2263
|
"span",
|
|
2305
2264
|
{
|
|
2306
2265
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
2307
2266
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
2308
|
-
children: isSelected ? /* @__PURE__ */
|
|
2267
|
+
children: isSelected ? /* @__PURE__ */ jsx25(CheckIcon, {}) : null
|
|
2309
2268
|
}
|
|
2310
2269
|
) : null,
|
|
2311
2270
|
children2
|
|
@@ -2314,7 +2273,7 @@ function DropdownMenuItem({
|
|
|
2314
2273
|
);
|
|
2315
2274
|
}
|
|
2316
2275
|
function DropdownMenuSub({ ...props }) {
|
|
2317
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsx25(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
|
|
2318
2277
|
}
|
|
2319
2278
|
function DropdownMenuSubTrigger({
|
|
2320
2279
|
className,
|
|
@@ -2322,7 +2281,7 @@ function DropdownMenuSubTrigger({
|
|
|
2322
2281
|
children,
|
|
2323
2282
|
...props
|
|
2324
2283
|
}) {
|
|
2325
|
-
return /* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ jsx25(
|
|
2326
2285
|
MenuItemPrimitive,
|
|
2327
2286
|
{
|
|
2328
2287
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -2333,9 +2292,9 @@ function DropdownMenuSubTrigger({
|
|
|
2333
2292
|
className
|
|
2334
2293
|
),
|
|
2335
2294
|
...props,
|
|
2336
|
-
children: composeRenderProps(children, (children2) => /* @__PURE__ */
|
|
2295
|
+
children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
2337
2296
|
children2,
|
|
2338
|
-
/* @__PURE__ */
|
|
2297
|
+
/* @__PURE__ */ jsx25(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
2339
2298
|
] }))
|
|
2340
2299
|
}
|
|
2341
2300
|
);
|
|
@@ -2347,7 +2306,7 @@ function DropdownMenuSubContent({
|
|
|
2347
2306
|
className,
|
|
2348
2307
|
...props
|
|
2349
2308
|
}) {
|
|
2350
|
-
return /* @__PURE__ */
|
|
2309
|
+
return /* @__PURE__ */ jsx25(
|
|
2351
2310
|
DropdownMenuContent,
|
|
2352
2311
|
{
|
|
2353
2312
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -2366,7 +2325,7 @@ function DropdownMenuSeparator({
|
|
|
2366
2325
|
className,
|
|
2367
2326
|
...props
|
|
2368
2327
|
}) {
|
|
2369
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ jsx25(
|
|
2370
2329
|
SeparatorPrimitive2,
|
|
2371
2330
|
{
|
|
2372
2331
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -2376,7 +2335,7 @@ function DropdownMenuSeparator({
|
|
|
2376
2335
|
);
|
|
2377
2336
|
}
|
|
2378
2337
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
2379
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ jsx25(
|
|
2380
2339
|
"span",
|
|
2381
2340
|
{
|
|
2382
2341
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -2405,9 +2364,9 @@ var emptyStateMediaVariants = cva7(
|
|
|
2405
2364
|
);
|
|
2406
2365
|
|
|
2407
2366
|
// src/ui/empty-state/empty-state.tsx
|
|
2408
|
-
import { jsx as
|
|
2367
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2409
2368
|
function EmptyState({ className, ...props }) {
|
|
2410
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ jsx26(
|
|
2411
2370
|
"div",
|
|
2412
2371
|
{
|
|
2413
2372
|
"data-slot": "empty-state",
|
|
@@ -2420,7 +2379,7 @@ function EmptyState({ className, ...props }) {
|
|
|
2420
2379
|
);
|
|
2421
2380
|
}
|
|
2422
2381
|
function EmptyStateHeader({ className, ...props }) {
|
|
2423
|
-
return /* @__PURE__ */
|
|
2382
|
+
return /* @__PURE__ */ jsx26(
|
|
2424
2383
|
"div",
|
|
2425
2384
|
{
|
|
2426
2385
|
"data-slot": "empty-state-header",
|
|
@@ -2434,7 +2393,7 @@ function EmptyStateMedia({
|
|
|
2434
2393
|
variant = "default",
|
|
2435
2394
|
...props
|
|
2436
2395
|
}) {
|
|
2437
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ jsx26(
|
|
2438
2397
|
"div",
|
|
2439
2398
|
{
|
|
2440
2399
|
"data-slot": "empty-state-media",
|
|
@@ -2445,7 +2404,7 @@ function EmptyStateMedia({
|
|
|
2445
2404
|
);
|
|
2446
2405
|
}
|
|
2447
2406
|
function EmptyStateTitle({ className, children, ...props }) {
|
|
2448
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ jsx26(
|
|
2449
2408
|
"h3",
|
|
2450
2409
|
{
|
|
2451
2410
|
"data-slot": "empty-state-title",
|
|
@@ -2456,7 +2415,7 @@ function EmptyStateTitle({ className, children, ...props }) {
|
|
|
2456
2415
|
);
|
|
2457
2416
|
}
|
|
2458
2417
|
function EmptyStateDescription({ className, ...props }) {
|
|
2459
|
-
return /* @__PURE__ */
|
|
2418
|
+
return /* @__PURE__ */ jsx26(
|
|
2460
2419
|
"p",
|
|
2461
2420
|
{
|
|
2462
2421
|
"data-slot": "empty-state-description",
|
|
@@ -2469,7 +2428,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
2469
2428
|
);
|
|
2470
2429
|
}
|
|
2471
2430
|
function EmptyStateContent({ className, ...props }) {
|
|
2472
|
-
return /* @__PURE__ */
|
|
2431
|
+
return /* @__PURE__ */ jsx26(
|
|
2473
2432
|
"div",
|
|
2474
2433
|
{
|
|
2475
2434
|
"data-slot": "empty-state-content",
|
|
@@ -2487,9 +2446,9 @@ import { Component, Suspense } from "react";
|
|
|
2487
2446
|
|
|
2488
2447
|
// src/ui/error-state/error-state.tsx
|
|
2489
2448
|
import { AlertCircle } from "lucide-react";
|
|
2490
|
-
import { jsx as
|
|
2449
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2491
2450
|
function ErrorState({ className, ...props }) {
|
|
2492
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx27(
|
|
2493
2452
|
"section",
|
|
2494
2453
|
{
|
|
2495
2454
|
"data-slot": "error-state",
|
|
@@ -2506,7 +2465,7 @@ function ErrorStateIcon({
|
|
|
2506
2465
|
className,
|
|
2507
2466
|
...props
|
|
2508
2467
|
}) {
|
|
2509
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ jsx27(
|
|
2510
2469
|
AlertCircle,
|
|
2511
2470
|
{
|
|
2512
2471
|
"data-slot": "error-state-icon",
|
|
@@ -2517,7 +2476,7 @@ function ErrorStateIcon({
|
|
|
2517
2476
|
);
|
|
2518
2477
|
}
|
|
2519
2478
|
function ErrorStateTitle({ className, ...props }) {
|
|
2520
|
-
return /* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ jsx27(
|
|
2521
2480
|
"h2",
|
|
2522
2481
|
{
|
|
2523
2482
|
"data-slot": "error-state-title",
|
|
@@ -2527,7 +2486,7 @@ function ErrorStateTitle({ className, ...props }) {
|
|
|
2527
2486
|
);
|
|
2528
2487
|
}
|
|
2529
2488
|
function ErrorStateDescription({ className, ...props }) {
|
|
2530
|
-
return /* @__PURE__ */
|
|
2489
|
+
return /* @__PURE__ */ jsx27(
|
|
2531
2490
|
"p",
|
|
2532
2491
|
{
|
|
2533
2492
|
"data-slot": "error-state-description",
|
|
@@ -2537,7 +2496,7 @@ function ErrorStateDescription({ className, ...props }) {
|
|
|
2537
2496
|
);
|
|
2538
2497
|
}
|
|
2539
2498
|
function ErrorStateActions({ className, ...props }) {
|
|
2540
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsx27(
|
|
2541
2500
|
"div",
|
|
2542
2501
|
{
|
|
2543
2502
|
"data-slot": "error-state-actions",
|
|
@@ -2548,17 +2507,20 @@ function ErrorStateActions({ className, ...props }) {
|
|
|
2548
2507
|
}
|
|
2549
2508
|
|
|
2550
2509
|
// src/ui/error-boundary/error-boundary.tsx
|
|
2551
|
-
import { jsx as
|
|
2510
|
+
import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2511
|
+
function normalizeError(cause) {
|
|
2512
|
+
return cause instanceof Error ? cause : new Error("No se pudo renderizar este contenido.", { cause });
|
|
2513
|
+
}
|
|
2552
2514
|
function changedResetKeys(previous = [], next = []) {
|
|
2553
2515
|
return previous.length !== next.length || previous.some((value, index) => !Object.is(value, next[index]));
|
|
2554
2516
|
}
|
|
2555
2517
|
var Boundary = class extends Component {
|
|
2556
2518
|
state = { error: null };
|
|
2557
2519
|
static getDerivedStateFromError(error) {
|
|
2558
|
-
return { error };
|
|
2520
|
+
return { error: normalizeError(error) };
|
|
2559
2521
|
}
|
|
2560
2522
|
componentDidCatch(error, info) {
|
|
2561
|
-
this.props.onError?.(error, info);
|
|
2523
|
+
this.props.onError?.(this.state.error ?? normalizeError(error), info);
|
|
2562
2524
|
}
|
|
2563
2525
|
componentDidUpdate(previousProps) {
|
|
2564
2526
|
if (this.state.error && changedResetKeys(previousProps.resetKeys, this.props.resetKeys))
|
|
@@ -2570,32 +2532,32 @@ var Boundary = class extends Component {
|
|
|
2570
2532
|
if (!this.state.error) return children;
|
|
2571
2533
|
if (typeof fallback === "function")
|
|
2572
2534
|
return fallback({ error: this.state.error, reset: this.reset });
|
|
2573
|
-
if (fallback) return fallback;
|
|
2574
|
-
return /* @__PURE__ */
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
/* @__PURE__ */
|
|
2577
|
-
/* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
2535
|
+
if (fallback !== void 0) return fallback;
|
|
2536
|
+
return /* @__PURE__ */ jsxs12(ErrorState, { children: [
|
|
2537
|
+
/* @__PURE__ */ jsx28(ErrorStateIcon, {}),
|
|
2538
|
+
/* @__PURE__ */ jsx28(ErrorStateTitle, { children: "No se pudo cargar este contenido" }),
|
|
2539
|
+
/* @__PURE__ */ jsx28(ErrorStateDescription, { children: "Prueba a cargarlo de nuevo." }),
|
|
2540
|
+
/* @__PURE__ */ jsx28(ErrorStateActions, { children: /* @__PURE__ */ jsx28(Button, { onPress: this.reset, children: "Reintentar" }) })
|
|
2579
2541
|
] });
|
|
2580
2542
|
}
|
|
2581
2543
|
};
|
|
2582
2544
|
function ErrorBoundary(props) {
|
|
2583
|
-
return /* @__PURE__ */
|
|
2545
|
+
return /* @__PURE__ */ jsx28(Boundary, { ...props });
|
|
2584
2546
|
}
|
|
2585
2547
|
function AsyncBoundary({
|
|
2586
2548
|
pending = null,
|
|
2587
2549
|
...props
|
|
2588
2550
|
}) {
|
|
2589
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsx28(ErrorBoundary, { ...props, children: /* @__PURE__ */ jsx28(Suspense, { fallback: pending, children: props.children }) });
|
|
2590
2552
|
}
|
|
2591
2553
|
|
|
2592
2554
|
// src/ui/label/label.tsx
|
|
2593
2555
|
import { forwardRef } from "react";
|
|
2594
2556
|
import { Label as LabelPrimitive } from "react-aria-components";
|
|
2595
|
-
import { jsx as
|
|
2557
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2596
2558
|
var Label2 = forwardRef(
|
|
2597
2559
|
function Label3({ className, ...props }, ref) {
|
|
2598
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ jsx29(
|
|
2599
2561
|
LabelPrimitive,
|
|
2600
2562
|
{
|
|
2601
2563
|
ref,
|
|
@@ -2627,16 +2589,16 @@ var fieldVariants = cva8(
|
|
|
2627
2589
|
);
|
|
2628
2590
|
|
|
2629
2591
|
// src/ui/field/field.tsx
|
|
2630
|
-
import { jsx as
|
|
2592
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2631
2593
|
function FieldSet({ className, ...props }) {
|
|
2632
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ jsx30("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
2633
2595
|
}
|
|
2634
2596
|
function FieldLegend({
|
|
2635
2597
|
className,
|
|
2636
2598
|
variant = "legend",
|
|
2637
2599
|
...props
|
|
2638
2600
|
}) {
|
|
2639
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ jsx30(
|
|
2640
2602
|
"legend",
|
|
2641
2603
|
{
|
|
2642
2604
|
"data-slot": "field-legend",
|
|
@@ -2650,7 +2612,7 @@ function FieldLegend({
|
|
|
2650
2612
|
);
|
|
2651
2613
|
}
|
|
2652
2614
|
function FieldGroup({ className, ...props }) {
|
|
2653
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ jsx30(
|
|
2654
2616
|
"div",
|
|
2655
2617
|
{
|
|
2656
2618
|
"data-slot": "field-group",
|
|
@@ -2665,7 +2627,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
2665
2627
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
2666
2628
|
return (
|
|
2667
2629
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
2668
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ jsx30(
|
|
2669
2631
|
"div",
|
|
2670
2632
|
{
|
|
2671
2633
|
role: "group",
|
|
@@ -2678,7 +2640,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
2678
2640
|
);
|
|
2679
2641
|
}
|
|
2680
2642
|
function FieldContent({ className, ...props }) {
|
|
2681
|
-
return /* @__PURE__ */
|
|
2643
|
+
return /* @__PURE__ */ jsx30(
|
|
2682
2644
|
"div",
|
|
2683
2645
|
{
|
|
2684
2646
|
"data-slot": "field-content",
|
|
@@ -2688,7 +2650,7 @@ function FieldContent({ className, ...props }) {
|
|
|
2688
2650
|
);
|
|
2689
2651
|
}
|
|
2690
2652
|
function FieldLabel({ className, ...props }) {
|
|
2691
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ jsx30(
|
|
2692
2654
|
Label2,
|
|
2693
2655
|
{
|
|
2694
2656
|
"data-slot": "field-label",
|
|
@@ -2701,7 +2663,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
2701
2663
|
);
|
|
2702
2664
|
}
|
|
2703
2665
|
function FieldTitle({ className, ...props }) {
|
|
2704
|
-
return /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ jsx30(
|
|
2705
2667
|
"div",
|
|
2706
2668
|
{
|
|
2707
2669
|
"data-slot": "field-title",
|
|
@@ -2711,7 +2673,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
2711
2673
|
);
|
|
2712
2674
|
}
|
|
2713
2675
|
function FieldDescription({ className, ...props }) {
|
|
2714
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ jsx30(
|
|
2715
2677
|
"p",
|
|
2716
2678
|
{
|
|
2717
2679
|
"data-slot": "field-description",
|
|
@@ -2724,7 +2686,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
2724
2686
|
);
|
|
2725
2687
|
}
|
|
2726
2688
|
function FieldSeparator({ className, children, ...props }) {
|
|
2727
|
-
return /* @__PURE__ */
|
|
2689
|
+
return /* @__PURE__ */ jsxs13(
|
|
2728
2690
|
"div",
|
|
2729
2691
|
{
|
|
2730
2692
|
"data-slot": "field-separator",
|
|
@@ -2732,8 +2694,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
2732
2694
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
2733
2695
|
...props,
|
|
2734
2696
|
children: [
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
children ? /* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ jsx30(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2698
|
+
children ? /* @__PURE__ */ jsx30(
|
|
2737
2699
|
"span",
|
|
2738
2700
|
{
|
|
2739
2701
|
"data-slot": "field-separator-content",
|
|
@@ -2747,9 +2709,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
2747
2709
|
}
|
|
2748
2710
|
function FieldError2({ className, children, errors, ...props }) {
|
|
2749
2711
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
2750
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */
|
|
2712
|
+
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);
|
|
2751
2713
|
if (!content) return null;
|
|
2752
|
-
return /* @__PURE__ */
|
|
2714
|
+
return /* @__PURE__ */ jsx30(
|
|
2753
2715
|
"div",
|
|
2754
2716
|
{
|
|
2755
2717
|
role: "alert",
|
|
@@ -2761,9 +2723,53 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
2761
2723
|
);
|
|
2762
2724
|
}
|
|
2763
2725
|
|
|
2726
|
+
// src/ui/filter-bar/filter-bar.tsx
|
|
2727
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2728
|
+
function FilterBar({ className, ...props }) {
|
|
2729
|
+
return /* @__PURE__ */ jsx31(
|
|
2730
|
+
"div",
|
|
2731
|
+
{
|
|
2732
|
+
"data-slot": "filter-bar",
|
|
2733
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
2734
|
+
...props
|
|
2735
|
+
}
|
|
2736
|
+
);
|
|
2737
|
+
}
|
|
2738
|
+
function FilterGroup({ className, ...props }) {
|
|
2739
|
+
return /* @__PURE__ */ jsx31(
|
|
2740
|
+
"div",
|
|
2741
|
+
{
|
|
2742
|
+
"data-slot": "filter-group",
|
|
2743
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
2744
|
+
...props
|
|
2745
|
+
}
|
|
2746
|
+
);
|
|
2747
|
+
}
|
|
2748
|
+
function ActiveFilters({ className, ...props }) {
|
|
2749
|
+
return /* @__PURE__ */ jsx31(
|
|
2750
|
+
"div",
|
|
2751
|
+
{
|
|
2752
|
+
"data-slot": "active-filters",
|
|
2753
|
+
"aria-label": "Filtros activos",
|
|
2754
|
+
className: cn("flex flex-wrap items-center gap-1.5", className),
|
|
2755
|
+
...props
|
|
2756
|
+
}
|
|
2757
|
+
);
|
|
2758
|
+
}
|
|
2759
|
+
function FilterChip({
|
|
2760
|
+
children,
|
|
2761
|
+
onRemove,
|
|
2762
|
+
...props
|
|
2763
|
+
}) {
|
|
2764
|
+
return /* @__PURE__ */ jsxs14(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
|
|
2765
|
+
children,
|
|
2766
|
+
" \xD7"
|
|
2767
|
+
] });
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2764
2770
|
// src/ui/form-feedback/form-feedback.tsx
|
|
2765
2771
|
import { CheckCircle, CircleAlert, LoaderCircle } from "lucide-react";
|
|
2766
|
-
import { jsx as
|
|
2772
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2767
2773
|
function FormFeedback({
|
|
2768
2774
|
state,
|
|
2769
2775
|
className,
|
|
@@ -2771,7 +2777,7 @@ function FormFeedback({
|
|
|
2771
2777
|
successLabel = "Guardado"
|
|
2772
2778
|
}) {
|
|
2773
2779
|
if (state.status === "idle")
|
|
2774
|
-
return /* @__PURE__ */
|
|
2780
|
+
return /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
2775
2781
|
const error = state.status === "error";
|
|
2776
2782
|
const success = state.status === "success";
|
|
2777
2783
|
return /* @__PURE__ */ jsxs15(
|
|
@@ -2787,10 +2793,10 @@ function FormFeedback({
|
|
|
2787
2793
|
className
|
|
2788
2794
|
),
|
|
2789
2795
|
children: [
|
|
2790
|
-
state.status === "pending" && /* @__PURE__ */
|
|
2791
|
-
success && /* @__PURE__ */
|
|
2792
|
-
error && /* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2796
|
+
state.status === "pending" && /* @__PURE__ */ jsx32(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2797
|
+
success && /* @__PURE__ */ jsx32(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2798
|
+
error && /* @__PURE__ */ jsx32(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2799
|
+
/* @__PURE__ */ jsx32("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
2794
2800
|
]
|
|
2795
2801
|
}
|
|
2796
2802
|
);
|
|
@@ -2834,7 +2840,7 @@ function useFormFeedback(options) {
|
|
|
2834
2840
|
}
|
|
2835
2841
|
|
|
2836
2842
|
// src/ui/form-row/form-row.tsx
|
|
2837
|
-
import { Fragment as Fragment6, jsx as
|
|
2843
|
+
import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2838
2844
|
function FormRow({
|
|
2839
2845
|
label,
|
|
2840
2846
|
htmlFor,
|
|
@@ -2850,13 +2856,13 @@ function FormRow({
|
|
|
2850
2856
|
/* @__PURE__ */ jsxs16("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
|
|
2851
2857
|
label,
|
|
2852
2858
|
required && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
2853
|
-
/* @__PURE__ */
|
|
2854
|
-
/* @__PURE__ */
|
|
2859
|
+
/* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
|
|
2860
|
+
/* @__PURE__ */ jsx33("span", { className: "sr-only", children: " (obligatorio)" })
|
|
2855
2861
|
] })
|
|
2856
2862
|
] }),
|
|
2857
2863
|
children,
|
|
2858
|
-
hint && /* @__PURE__ */
|
|
2859
|
-
error && /* @__PURE__ */
|
|
2864
|
+
hint && /* @__PURE__ */ jsx33("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
|
|
2865
|
+
error && /* @__PURE__ */ jsx33("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
|
|
2860
2866
|
] });
|
|
2861
2867
|
}
|
|
2862
2868
|
|
|
@@ -2869,17 +2875,17 @@ import {
|
|
|
2869
2875
|
Tooltip as TooltipPrimitive,
|
|
2870
2876
|
TooltipTrigger as TooltipTriggerPrimitive
|
|
2871
2877
|
} from "react-aria-components";
|
|
2872
|
-
import { jsx as
|
|
2878
|
+
import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2873
2879
|
function TooltipTrigger({
|
|
2874
2880
|
delay = 0,
|
|
2875
2881
|
...props
|
|
2876
2882
|
}) {
|
|
2877
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ jsx34(TooltipTriggerPrimitive, { "data-slot": "tooltip-trigger", delay, ...props });
|
|
2878
2884
|
}
|
|
2879
2885
|
function Tooltip({ label, children, delay, ...props }) {
|
|
2880
2886
|
return /* @__PURE__ */ jsxs17(TooltipTrigger, { delay, children: [
|
|
2881
2887
|
children,
|
|
2882
|
-
/* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ jsx34(TooltipContent, { ...props, children: label })
|
|
2883
2889
|
] });
|
|
2884
2890
|
}
|
|
2885
2891
|
function TooltipContent({
|
|
@@ -2904,7 +2910,7 @@ function TooltipContent({
|
|
|
2904
2910
|
...props,
|
|
2905
2911
|
children: [
|
|
2906
2912
|
children,
|
|
2907
|
-
/* @__PURE__ */
|
|
2913
|
+
/* @__PURE__ */ jsx34(
|
|
2908
2914
|
OverlayArrow,
|
|
2909
2915
|
{
|
|
2910
2916
|
className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
|
|
@@ -2922,7 +2928,7 @@ function TooltipContent({
|
|
|
2922
2928
|
}
|
|
2923
2929
|
|
|
2924
2930
|
// src/ui/icon-button/icon-button.tsx
|
|
2925
|
-
import { jsx as
|
|
2931
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2926
2932
|
function IconButton({
|
|
2927
2933
|
label,
|
|
2928
2934
|
children,
|
|
@@ -2932,7 +2938,7 @@ function IconButton({
|
|
|
2932
2938
|
...props
|
|
2933
2939
|
}) {
|
|
2934
2940
|
const linkClassName = cn(buttonVariants({ variant, size: "icon" }), className);
|
|
2935
|
-
return /* @__PURE__ */
|
|
2941
|
+
return /* @__PURE__ */ jsx35(Tooltip, { label, children: href ? /* @__PURE__ */ jsx35(Link2, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ jsx35(
|
|
2936
2942
|
Button,
|
|
2937
2943
|
{
|
|
2938
2944
|
"data-slot": "icon-button",
|
|
@@ -2952,9 +2958,9 @@ import { cva as cva10 } from "class-variance-authority";
|
|
|
2952
2958
|
// src/ui/input/input.tsx
|
|
2953
2959
|
import { forwardRef as forwardRef2 } from "react";
|
|
2954
2960
|
import { Input as AriaInput2 } from "react-aria-components";
|
|
2955
|
-
import { jsx as
|
|
2961
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2956
2962
|
var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
|
|
2957
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ jsx36(
|
|
2958
2964
|
AriaInput2,
|
|
2959
2965
|
{
|
|
2960
2966
|
ref,
|
|
@@ -2975,9 +2981,9 @@ import { forwardRef as forwardRef3 } from "react";
|
|
|
2975
2981
|
import {
|
|
2976
2982
|
TextArea as AriaTextArea
|
|
2977
2983
|
} from "react-aria-components";
|
|
2978
|
-
import { jsx as
|
|
2984
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2979
2985
|
var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
|
|
2980
|
-
return /* @__PURE__ */
|
|
2986
|
+
return /* @__PURE__ */ jsx37(
|
|
2981
2987
|
AriaTextArea,
|
|
2982
2988
|
{
|
|
2983
2989
|
ref,
|
|
@@ -3010,11 +3016,11 @@ var inputGroupAddonVariants = cva9(
|
|
|
3010
3016
|
);
|
|
3011
3017
|
|
|
3012
3018
|
// src/ui/input-group/input-group.tsx
|
|
3013
|
-
import { jsx as
|
|
3019
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3014
3020
|
function InputGroup({ className, ...props }) {
|
|
3015
3021
|
return (
|
|
3016
3022
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
3017
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ jsx38(
|
|
3018
3024
|
"div",
|
|
3019
3025
|
{
|
|
3020
3026
|
role: "group",
|
|
@@ -3036,7 +3042,7 @@ function InputGroupAddon({
|
|
|
3036
3042
|
}) {
|
|
3037
3043
|
return (
|
|
3038
3044
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
3039
|
-
/* @__PURE__ */
|
|
3045
|
+
/* @__PURE__ */ jsx38(
|
|
3040
3046
|
"div",
|
|
3041
3047
|
{
|
|
3042
3048
|
role: "group",
|
|
@@ -3067,7 +3073,7 @@ function InputGroupButton({
|
|
|
3067
3073
|
...props
|
|
3068
3074
|
}) {
|
|
3069
3075
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
3070
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ jsx38(
|
|
3071
3077
|
Button,
|
|
3072
3078
|
{
|
|
3073
3079
|
"data-slot": "input-group-button",
|
|
@@ -3080,7 +3086,7 @@ function InputGroupButton({
|
|
|
3080
3086
|
);
|
|
3081
3087
|
}
|
|
3082
3088
|
function InputGroupText({ className, ...props }) {
|
|
3083
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx38(
|
|
3084
3090
|
"span",
|
|
3085
3091
|
{
|
|
3086
3092
|
"data-slot": "input-group-text",
|
|
@@ -3093,7 +3099,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
3093
3099
|
);
|
|
3094
3100
|
}
|
|
3095
3101
|
function InputGroupInput({ className, ...props }) {
|
|
3096
|
-
return /* @__PURE__ */
|
|
3102
|
+
return /* @__PURE__ */ jsx38(
|
|
3097
3103
|
Input3,
|
|
3098
3104
|
{
|
|
3099
3105
|
"data-slot": "input-group-control",
|
|
@@ -3106,7 +3112,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
3106
3112
|
);
|
|
3107
3113
|
}
|
|
3108
3114
|
function InputGroupTextarea({ className, ...props }) {
|
|
3109
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsx38(
|
|
3110
3116
|
Textarea2,
|
|
3111
3117
|
{
|
|
3112
3118
|
"data-slot": "input-group-control",
|
|
@@ -3120,7 +3126,7 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
3120
3126
|
}
|
|
3121
3127
|
|
|
3122
3128
|
// src/ui/kanban/kanban.tsx
|
|
3123
|
-
import { jsx as
|
|
3129
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3124
3130
|
var columnSize = {
|
|
3125
3131
|
compact: "w-56",
|
|
3126
3132
|
default: "w-72",
|
|
@@ -3132,13 +3138,13 @@ function KanbanViewport({
|
|
|
3132
3138
|
contentClassName,
|
|
3133
3139
|
...props
|
|
3134
3140
|
}) {
|
|
3135
|
-
return /* @__PURE__ */
|
|
3141
|
+
return /* @__PURE__ */ jsx39(
|
|
3136
3142
|
"div",
|
|
3137
3143
|
{
|
|
3138
3144
|
"data-slot": "kanban-viewport",
|
|
3139
3145
|
className: cn("-mx-1 overflow-x-auto pb-3", className),
|
|
3140
3146
|
...props,
|
|
3141
|
-
children: /* @__PURE__ */
|
|
3147
|
+
children: /* @__PURE__ */ jsx39(
|
|
3142
3148
|
"div",
|
|
3143
3149
|
{
|
|
3144
3150
|
"data-slot": "kanban-viewport-content",
|
|
@@ -3154,7 +3160,7 @@ function KanbanColumn({
|
|
|
3154
3160
|
size = "default",
|
|
3155
3161
|
...props
|
|
3156
3162
|
}) {
|
|
3157
|
-
return /* @__PURE__ */
|
|
3163
|
+
return /* @__PURE__ */ jsx39(
|
|
3158
3164
|
"section",
|
|
3159
3165
|
{
|
|
3160
3166
|
"data-slot": "kanban-column",
|
|
@@ -3165,7 +3171,7 @@ function KanbanColumn({
|
|
|
3165
3171
|
);
|
|
3166
3172
|
}
|
|
3167
3173
|
function KanbanColumnHeader({ className, ...props }) {
|
|
3168
|
-
return /* @__PURE__ */
|
|
3174
|
+
return /* @__PURE__ */ jsx39(
|
|
3169
3175
|
"header",
|
|
3170
3176
|
{
|
|
3171
3177
|
"data-slot": "kanban-column-header",
|
|
@@ -3175,7 +3181,7 @@ function KanbanColumnHeader({ className, ...props }) {
|
|
|
3175
3181
|
);
|
|
3176
3182
|
}
|
|
3177
3183
|
function KanbanColumnTitle({ className, ...props }) {
|
|
3178
|
-
return /* @__PURE__ */
|
|
3184
|
+
return /* @__PURE__ */ jsx39(
|
|
3179
3185
|
"span",
|
|
3180
3186
|
{
|
|
3181
3187
|
"data-slot": "kanban-column-title",
|
|
@@ -3188,14 +3194,14 @@ function KanbanColumnTitle({ className, ...props }) {
|
|
|
3188
3194
|
);
|
|
3189
3195
|
}
|
|
3190
3196
|
function KanbanColumnBody({ className, ...props }) {
|
|
3191
|
-
return /* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ jsx39("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
|
|
3192
3198
|
}
|
|
3193
3199
|
function KanbanEmpty({
|
|
3194
3200
|
className,
|
|
3195
3201
|
compact = false,
|
|
3196
3202
|
...props
|
|
3197
3203
|
}) {
|
|
3198
|
-
return /* @__PURE__ */
|
|
3204
|
+
return /* @__PURE__ */ jsx39(
|
|
3199
3205
|
"p",
|
|
3200
3206
|
{
|
|
3201
3207
|
"data-slot": "kanban-empty",
|
|
@@ -3211,9 +3217,9 @@ function KanbanEmpty({
|
|
|
3211
3217
|
}
|
|
3212
3218
|
|
|
3213
3219
|
// src/ui/kbd/kbd.tsx
|
|
3214
|
-
import { jsx as
|
|
3220
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3215
3221
|
function Kbd({ className, ...props }) {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ jsx40(
|
|
3217
3223
|
"kbd",
|
|
3218
3224
|
{
|
|
3219
3225
|
"data-slot": "kbd",
|
|
@@ -3226,7 +3232,7 @@ function Kbd({ className, ...props }) {
|
|
|
3226
3232
|
);
|
|
3227
3233
|
}
|
|
3228
3234
|
function KbdGroup({ className, ...props }) {
|
|
3229
|
-
return /* @__PURE__ */
|
|
3235
|
+
return /* @__PURE__ */ jsx40(
|
|
3230
3236
|
"span",
|
|
3231
3237
|
{
|
|
3232
3238
|
"data-slot": "kbd-group",
|
|
@@ -3238,13 +3244,13 @@ function KbdGroup({ className, ...props }) {
|
|
|
3238
3244
|
|
|
3239
3245
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
3240
3246
|
import { LoaderCircle as LoaderCircle2 } from "lucide-react";
|
|
3241
|
-
import { jsx as
|
|
3247
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3242
3248
|
function LoadingOverlay({
|
|
3243
3249
|
label = "Cargando",
|
|
3244
3250
|
className,
|
|
3245
3251
|
...props
|
|
3246
3252
|
}) {
|
|
3247
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsx41(
|
|
3248
3254
|
"output",
|
|
3249
3255
|
{
|
|
3250
3256
|
"aria-live": "polite",
|
|
@@ -3254,8 +3260,8 @@ function LoadingOverlay({
|
|
|
3254
3260
|
),
|
|
3255
3261
|
...props,
|
|
3256
3262
|
children: /* @__PURE__ */ jsxs18("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
|
|
3257
|
-
/* @__PURE__ */
|
|
3258
|
-
/* @__PURE__ */
|
|
3263
|
+
/* @__PURE__ */ jsx41(LoaderCircle2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
|
|
3264
|
+
/* @__PURE__ */ jsx41("span", { children: label })
|
|
3259
3265
|
] })
|
|
3260
3266
|
}
|
|
3261
3267
|
);
|
|
@@ -3268,10 +3274,10 @@ import {
|
|
|
3268
3274
|
MenuTrigger as AriaMenuTrigger,
|
|
3269
3275
|
Popover as Popover3
|
|
3270
3276
|
} from "react-aria-components";
|
|
3271
|
-
import { jsx as
|
|
3277
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3272
3278
|
var MenuTrigger = AriaMenuTrigger;
|
|
3273
3279
|
function MenuContent({ className, ...props }) {
|
|
3274
|
-
return /* @__PURE__ */
|
|
3280
|
+
return /* @__PURE__ */ jsx42(
|
|
3275
3281
|
Popover3,
|
|
3276
3282
|
{
|
|
3277
3283
|
"data-slot": "menu-content",
|
|
@@ -3285,10 +3291,10 @@ function MenuContent({ className, ...props }) {
|
|
|
3285
3291
|
);
|
|
3286
3292
|
}
|
|
3287
3293
|
function Menu({ className, ...props }) {
|
|
3288
|
-
return /* @__PURE__ */
|
|
3294
|
+
return /* @__PURE__ */ jsx42(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
3289
3295
|
}
|
|
3290
3296
|
function MenuItem({ className, children, ...props }) {
|
|
3291
|
-
return /* @__PURE__ */
|
|
3297
|
+
return /* @__PURE__ */ jsx42(
|
|
3292
3298
|
AriaMenuItem,
|
|
3293
3299
|
{
|
|
3294
3300
|
"data-slot": "menu-item",
|
|
@@ -3303,7 +3309,7 @@ function MenuItem({ className, children, ...props }) {
|
|
|
3303
3309
|
}
|
|
3304
3310
|
|
|
3305
3311
|
// src/ui/metric-card/metric-card.tsx
|
|
3306
|
-
import { jsx as
|
|
3312
|
+
import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3307
3313
|
function MetricCard({
|
|
3308
3314
|
className,
|
|
3309
3315
|
label,
|
|
@@ -3317,7 +3323,7 @@ function MetricCard({
|
|
|
3317
3323
|
loadingLabel = "Cargando m\xE9trica",
|
|
3318
3324
|
...props
|
|
3319
3325
|
}) {
|
|
3320
|
-
return /* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ jsx43(
|
|
3321
3327
|
Card,
|
|
3322
3328
|
{
|
|
3323
3329
|
"data-slot": "metric-card",
|
|
@@ -3327,15 +3333,15 @@ function MetricCard({
|
|
|
3327
3333
|
className: cn("min-w-0", className),
|
|
3328
3334
|
...props,
|
|
3329
3335
|
children: /* @__PURE__ */ jsxs19(CardContent, { className: "flex items-start gap-3", children: [
|
|
3330
|
-
icon ? /* @__PURE__ */
|
|
3336
|
+
icon ? /* @__PURE__ */ jsx43("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
|
|
3331
3337
|
/* @__PURE__ */ jsxs19("div", { className: "min-w-0", children: [
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3338
|
+
/* @__PURE__ */ jsx43("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
|
|
3339
|
+
/* @__PURE__ */ jsx43(
|
|
3334
3340
|
"strong",
|
|
3335
3341
|
{
|
|
3336
3342
|
"data-slot": "metric-card-value",
|
|
3337
3343
|
className: "mt-1 block text-2xl font-semibold tracking-tight",
|
|
3338
|
-
children: loading ? /* @__PURE__ */
|
|
3344
|
+
children: loading ? /* @__PURE__ */ jsx43(
|
|
3339
3345
|
"span",
|
|
3340
3346
|
{
|
|
3341
3347
|
"data-slot": "metric-card-loading",
|
|
@@ -3345,7 +3351,7 @@ function MetricCard({
|
|
|
3345
3351
|
) : value
|
|
3346
3352
|
}
|
|
3347
3353
|
),
|
|
3348
|
-
delta ? /* @__PURE__ */
|
|
3354
|
+
delta ? /* @__PURE__ */ jsx43(
|
|
3349
3355
|
"span",
|
|
3350
3356
|
{
|
|
3351
3357
|
"data-slot": "metric-card-delta",
|
|
@@ -3358,13 +3364,26 @@ function MetricCard({
|
|
|
3358
3364
|
children: delta
|
|
3359
3365
|
}
|
|
3360
3366
|
) : null,
|
|
3361
|
-
description ? /* @__PURE__ */
|
|
3367
|
+
description ? /* @__PURE__ */ jsx43("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
|
|
3362
3368
|
] })
|
|
3363
3369
|
] })
|
|
3364
3370
|
}
|
|
3365
3371
|
);
|
|
3366
3372
|
}
|
|
3367
3373
|
|
|
3374
|
+
// src/ui/metric-grid/metric-grid.tsx
|
|
3375
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3376
|
+
function MetricGrid({ className, ...props }) {
|
|
3377
|
+
return /* @__PURE__ */ jsx44(
|
|
3378
|
+
"div",
|
|
3379
|
+
{
|
|
3380
|
+
"data-slot": "metric-grid",
|
|
3381
|
+
className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
|
|
3382
|
+
...props
|
|
3383
|
+
}
|
|
3384
|
+
);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3368
3387
|
// src/ui/otp-input/otp-input.tsx
|
|
3369
3388
|
import {
|
|
3370
3389
|
forwardRef as forwardRef4,
|
|
@@ -3373,7 +3392,7 @@ import {
|
|
|
3373
3392
|
useState as useState12
|
|
3374
3393
|
} from "react";
|
|
3375
3394
|
import { Input as AriaInput3 } from "react-aria-components";
|
|
3376
|
-
import { jsx as
|
|
3395
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3377
3396
|
function normalizeOtp(value, length) {
|
|
3378
3397
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
3379
3398
|
}
|
|
@@ -3435,7 +3454,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
3435
3454
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
3436
3455
|
onPointerDown: handlePointerDown,
|
|
3437
3456
|
children: [
|
|
3438
|
-
/* @__PURE__ */
|
|
3457
|
+
/* @__PURE__ */ jsx45(
|
|
3439
3458
|
AriaInput3,
|
|
3440
3459
|
{
|
|
3441
3460
|
...props,
|
|
@@ -3475,7 +3494,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
3475
3494
|
}
|
|
3476
3495
|
}
|
|
3477
3496
|
),
|
|
3478
|
-
slots.map((slot, index) => /* @__PURE__ */
|
|
3497
|
+
slots.map((slot, index) => /* @__PURE__ */ jsx45(
|
|
3479
3498
|
"span",
|
|
3480
3499
|
{
|
|
3481
3500
|
"aria-hidden": "true",
|
|
@@ -3498,9 +3517,9 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
3498
3517
|
var OtpInput2 = OtpInputImpl;
|
|
3499
3518
|
|
|
3500
3519
|
// src/ui/page-header/page-header.tsx
|
|
3501
|
-
import { jsx as
|
|
3520
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3502
3521
|
function PageHeader({ className, ...props }) {
|
|
3503
|
-
return /* @__PURE__ */
|
|
3522
|
+
return /* @__PURE__ */ jsx46(
|
|
3504
3523
|
"header",
|
|
3505
3524
|
{
|
|
3506
3525
|
"data-slot": "page-header",
|
|
@@ -3513,10 +3532,10 @@ function PageHeader({ className, ...props }) {
|
|
|
3513
3532
|
);
|
|
3514
3533
|
}
|
|
3515
3534
|
function PageHeaderHeading({ className, ...props }) {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3535
|
+
return /* @__PURE__ */ jsx46("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
3517
3536
|
}
|
|
3518
3537
|
function PageHeaderTitle({ className, children, ...props }) {
|
|
3519
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsx46(
|
|
3520
3539
|
"h1",
|
|
3521
3540
|
{
|
|
3522
3541
|
"data-slot": "page-header-title",
|
|
@@ -3527,7 +3546,7 @@ function PageHeaderTitle({ className, children, ...props }) {
|
|
|
3527
3546
|
);
|
|
3528
3547
|
}
|
|
3529
3548
|
function PageHeaderDescription({ className, ...props }) {
|
|
3530
|
-
return /* @__PURE__ */
|
|
3549
|
+
return /* @__PURE__ */ jsx46(
|
|
3531
3550
|
"p",
|
|
3532
3551
|
{
|
|
3533
3552
|
"data-slot": "page-header-description",
|
|
@@ -3537,7 +3556,7 @@ function PageHeaderDescription({ className, ...props }) {
|
|
|
3537
3556
|
);
|
|
3538
3557
|
}
|
|
3539
3558
|
function PageHeaderActions({ className, ...props }) {
|
|
3540
|
-
return /* @__PURE__ */
|
|
3559
|
+
return /* @__PURE__ */ jsx46(
|
|
3541
3560
|
"div",
|
|
3542
3561
|
{
|
|
3543
3562
|
"data-slot": "page-header-actions",
|
|
@@ -3547,7 +3566,7 @@ function PageHeaderActions({ className, ...props }) {
|
|
|
3547
3566
|
);
|
|
3548
3567
|
}
|
|
3549
3568
|
function SectionHeader({ className, ...props }) {
|
|
3550
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ jsx46(
|
|
3551
3570
|
"div",
|
|
3552
3571
|
{
|
|
3553
3572
|
"data-slot": "section-header",
|
|
@@ -3557,10 +3576,10 @@ function SectionHeader({ className, ...props }) {
|
|
|
3557
3576
|
);
|
|
3558
3577
|
}
|
|
3559
3578
|
function SectionHeaderHeading({ className, ...props }) {
|
|
3560
|
-
return /* @__PURE__ */
|
|
3579
|
+
return /* @__PURE__ */ jsx46("div", { "data-slot": "section-header-heading", className: cn("min-w-0", className), ...props });
|
|
3561
3580
|
}
|
|
3562
3581
|
function SectionHeaderTitle({ className, ...props }) {
|
|
3563
|
-
return /* @__PURE__ */
|
|
3582
|
+
return /* @__PURE__ */ jsx46(
|
|
3564
3583
|
"h2",
|
|
3565
3584
|
{
|
|
3566
3585
|
"data-slot": "section-header-title",
|
|
@@ -3570,7 +3589,7 @@ function SectionHeaderTitle({ className, ...props }) {
|
|
|
3570
3589
|
);
|
|
3571
3590
|
}
|
|
3572
3591
|
function SectionHeaderDescription({ className, ...props }) {
|
|
3573
|
-
return /* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ jsx46(
|
|
3574
3593
|
"p",
|
|
3575
3594
|
{
|
|
3576
3595
|
"data-slot": "section-header-description",
|
|
@@ -3580,7 +3599,7 @@ function SectionHeaderDescription({ className, ...props }) {
|
|
|
3580
3599
|
);
|
|
3581
3600
|
}
|
|
3582
3601
|
function SectionHeaderActions({ className, ...props }) {
|
|
3583
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ jsx46(
|
|
3584
3603
|
"div",
|
|
3585
3604
|
{
|
|
3586
3605
|
"data-slot": "section-header-actions",
|
|
@@ -3593,18 +3612,19 @@ function SectionHeaderActions({ className, ...props }) {
|
|
|
3593
3612
|
// src/ui/pagination/pagination.tsx
|
|
3594
3613
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3595
3614
|
import * as React6 from "react";
|
|
3596
|
-
import { jsx as
|
|
3615
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3597
3616
|
function visiblePages(page, pageCount, siblingCount) {
|
|
3617
|
+
const siblings = Number.isFinite(siblingCount) ? Math.min(10, Math.max(0, Math.floor(siblingCount))) : 1;
|
|
3598
3618
|
return [
|
|
3599
3619
|
.../* @__PURE__ */ new Set([
|
|
3600
3620
|
1,
|
|
3601
|
-
...Array.from({ length:
|
|
3621
|
+
...Array.from({ length: siblings * 2 + 1 }, (_, index) => page - siblings + index),
|
|
3602
3622
|
pageCount
|
|
3603
3623
|
])
|
|
3604
3624
|
].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
|
|
3605
3625
|
}
|
|
3606
3626
|
function normalizedPageCount(pageCount) {
|
|
3607
|
-
return Number.isFinite(pageCount) ? Math.max(0, Math.floor(pageCount)) : 0;
|
|
3627
|
+
return Number.isFinite(pageCount) ? Math.min(Number.MAX_SAFE_INTEGER, Math.max(0, Math.floor(pageCount))) : 0;
|
|
3608
3628
|
}
|
|
3609
3629
|
function normalizedPage(page, pageCount) {
|
|
3610
3630
|
if (!Number.isFinite(page)) return 1;
|
|
@@ -3629,9 +3649,9 @@ function Pagination({
|
|
|
3629
3649
|
"aria-label": ariaLabel,
|
|
3630
3650
|
className: cn("flex flex-wrap items-center justify-between gap-4", className),
|
|
3631
3651
|
children: [
|
|
3632
|
-
/* @__PURE__ */
|
|
3652
|
+
/* @__PURE__ */ jsx47("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${currentPage} de ${totalPages}` }),
|
|
3633
3653
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
|
|
3634
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ jsx47(
|
|
3635
3655
|
Button,
|
|
3636
3656
|
{
|
|
3637
3657
|
"aria-label": "P\xE1gina anterior",
|
|
@@ -3639,27 +3659,27 @@ function Pagination({
|
|
|
3639
3659
|
onPress: () => onPageChange(currentPage - 1),
|
|
3640
3660
|
size: "icon",
|
|
3641
3661
|
variant: "ghost",
|
|
3642
|
-
children: /* @__PURE__ */
|
|
3662
|
+
children: /* @__PURE__ */ jsx47(ChevronLeft, {})
|
|
3643
3663
|
}
|
|
3644
3664
|
),
|
|
3645
3665
|
pages.map((item, index) => {
|
|
3646
3666
|
const previousPage = pages[index - 1];
|
|
3647
3667
|
return /* @__PURE__ */ jsxs21(React6.Fragment, { children: [
|
|
3648
|
-
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */
|
|
3649
|
-
/* @__PURE__ */
|
|
3668
|
+
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ jsx47("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
|
|
3669
|
+
/* @__PURE__ */ jsx47(
|
|
3650
3670
|
Button,
|
|
3651
3671
|
{
|
|
3652
3672
|
"aria-current": item === currentPage ? "page" : void 0,
|
|
3653
3673
|
"aria-label": `P\xE1gina ${item}`,
|
|
3654
3674
|
onPress: () => onPageChange(item),
|
|
3655
3675
|
size: "icon",
|
|
3656
|
-
variant: item ===
|
|
3676
|
+
variant: item === currentPage ? "secondary" : "ghost",
|
|
3657
3677
|
children: item
|
|
3658
3678
|
}
|
|
3659
3679
|
)
|
|
3660
3680
|
] }, item);
|
|
3661
3681
|
}),
|
|
3662
|
-
/* @__PURE__ */
|
|
3682
|
+
/* @__PURE__ */ jsx47(
|
|
3663
3683
|
Button,
|
|
3664
3684
|
{
|
|
3665
3685
|
"aria-label": "P\xE1gina siguiente",
|
|
@@ -3667,7 +3687,7 @@ function Pagination({
|
|
|
3667
3687
|
onPress: () => onPageChange(currentPage + 1),
|
|
3668
3688
|
size: "icon",
|
|
3669
3689
|
variant: "ghost",
|
|
3670
|
-
children: /* @__PURE__ */
|
|
3690
|
+
children: /* @__PURE__ */ jsx47(ChevronRight, {})
|
|
3671
3691
|
}
|
|
3672
3692
|
)
|
|
3673
3693
|
] })
|
|
@@ -3681,10 +3701,10 @@ import {
|
|
|
3681
3701
|
DialogTrigger as AriaDialogTrigger,
|
|
3682
3702
|
Popover as AriaPopover
|
|
3683
3703
|
} from "react-aria-components";
|
|
3684
|
-
import { jsx as
|
|
3704
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3685
3705
|
var PopoverTrigger = AriaDialogTrigger;
|
|
3686
3706
|
function PopoverContent({ className, ...props }) {
|
|
3687
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ jsx48(
|
|
3688
3708
|
AriaPopover,
|
|
3689
3709
|
{
|
|
3690
3710
|
"data-slot": "popover",
|
|
@@ -3699,12 +3719,12 @@ function PopoverContent({ className, ...props }) {
|
|
|
3699
3719
|
);
|
|
3700
3720
|
}
|
|
3701
3721
|
function Popover4(props) {
|
|
3702
|
-
if (!("trigger" in props)) return /* @__PURE__ */
|
|
3722
|
+
if (!("trigger" in props)) return /* @__PURE__ */ jsx48(PopoverContent, { ...props });
|
|
3703
3723
|
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
3704
|
-
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */
|
|
3724
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ jsx48(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
3705
3725
|
return /* @__PURE__ */ jsxs22(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
3706
3726
|
triggerElement,
|
|
3707
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx48(PopoverContent, { ...contentProps, children })
|
|
3708
3728
|
] });
|
|
3709
3729
|
}
|
|
3710
3730
|
|
|
@@ -3716,7 +3736,7 @@ import {
|
|
|
3716
3736
|
Input as AriaInput4,
|
|
3717
3737
|
NumberField as AriaNumberField
|
|
3718
3738
|
} from "react-aria-components";
|
|
3719
|
-
import { jsx as
|
|
3739
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3720
3740
|
function QuantityInput({
|
|
3721
3741
|
className,
|
|
3722
3742
|
inputClassName,
|
|
@@ -3726,7 +3746,7 @@ function QuantityInput({
|
|
|
3726
3746
|
step = 1,
|
|
3727
3747
|
...props
|
|
3728
3748
|
}) {
|
|
3729
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsx49(
|
|
3730
3750
|
AriaNumberField,
|
|
3731
3751
|
{
|
|
3732
3752
|
...props,
|
|
@@ -3743,17 +3763,17 @@ function QuantityInput({
|
|
|
3743
3763
|
"data-slot": "quantity-input-group",
|
|
3744
3764
|
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",
|
|
3745
3765
|
children: [
|
|
3746
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx49(
|
|
3747
3767
|
AriaButton,
|
|
3748
3768
|
{
|
|
3749
3769
|
slot: "decrement",
|
|
3750
3770
|
"aria-label": decrementAriaLabel,
|
|
3751
3771
|
"data-slot": "quantity-input-decrement",
|
|
3752
3772
|
className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-r transition-colors outline-none data-disabled:pointer-events-none",
|
|
3753
|
-
children: /* @__PURE__ */
|
|
3773
|
+
children: /* @__PURE__ */ jsx49(Minus2, { "aria-hidden": "true", className: "size-4" })
|
|
3754
3774
|
}
|
|
3755
3775
|
),
|
|
3756
|
-
/* @__PURE__ */
|
|
3776
|
+
/* @__PURE__ */ jsx49(
|
|
3757
3777
|
AriaInput4,
|
|
3758
3778
|
{
|
|
3759
3779
|
"data-slot": "quantity-input-value",
|
|
@@ -3763,14 +3783,14 @@ function QuantityInput({
|
|
|
3763
3783
|
)
|
|
3764
3784
|
}
|
|
3765
3785
|
),
|
|
3766
|
-
/* @__PURE__ */
|
|
3786
|
+
/* @__PURE__ */ jsx49(
|
|
3767
3787
|
AriaButton,
|
|
3768
3788
|
{
|
|
3769
3789
|
slot: "increment",
|
|
3770
3790
|
"aria-label": incrementAriaLabel,
|
|
3771
3791
|
"data-slot": "quantity-input-increment",
|
|
3772
3792
|
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",
|
|
3773
|
-
children: /* @__PURE__ */
|
|
3793
|
+
children: /* @__PURE__ */ jsx49(Plus, { "aria-hidden": "true", className: "size-4" })
|
|
3774
3794
|
}
|
|
3775
3795
|
)
|
|
3776
3796
|
]
|
|
@@ -3790,10 +3810,10 @@ import {
|
|
|
3790
3810
|
ListBoxItem as ListBoxItem3,
|
|
3791
3811
|
Popover as Popover5
|
|
3792
3812
|
} from "react-aria-components";
|
|
3793
|
-
import { Fragment as Fragment8, jsx as
|
|
3813
|
+
import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3794
3814
|
var Select = AriaSelect;
|
|
3795
3815
|
function SelectTrigger({ className, children, ...props }) {
|
|
3796
|
-
return /* @__PURE__ */
|
|
3816
|
+
return /* @__PURE__ */ jsx50(
|
|
3797
3817
|
AriaButton2,
|
|
3798
3818
|
{
|
|
3799
3819
|
"data-slot": "select-trigger",
|
|
@@ -3804,7 +3824,7 @@ function SelectTrigger({ className, children, ...props }) {
|
|
|
3804
3824
|
...props,
|
|
3805
3825
|
children: (state) => /* @__PURE__ */ jsxs24(Fragment8, { children: [
|
|
3806
3826
|
typeof children === "function" ? children(state) : children,
|
|
3807
|
-
/* @__PURE__ */
|
|
3827
|
+
/* @__PURE__ */ jsx50(
|
|
3808
3828
|
ChevronDown2,
|
|
3809
3829
|
{
|
|
3810
3830
|
"aria-hidden": "true",
|
|
@@ -3816,7 +3836,7 @@ function SelectTrigger({ className, children, ...props }) {
|
|
|
3816
3836
|
);
|
|
3817
3837
|
}
|
|
3818
3838
|
function SelectValue({ className, ...props }) {
|
|
3819
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ jsx50(
|
|
3820
3840
|
AriaSelectValue,
|
|
3821
3841
|
{
|
|
3822
3842
|
"data-slot": "select-value",
|
|
@@ -3826,7 +3846,7 @@ function SelectValue({ className, ...props }) {
|
|
|
3826
3846
|
);
|
|
3827
3847
|
}
|
|
3828
3848
|
function SelectContent({ className, ...props }) {
|
|
3829
|
-
return /* @__PURE__ */
|
|
3849
|
+
return /* @__PURE__ */ jsx50(
|
|
3830
3850
|
Popover5,
|
|
3831
3851
|
{
|
|
3832
3852
|
"data-slot": "select-content",
|
|
@@ -3840,7 +3860,7 @@ function SelectContent({ className, ...props }) {
|
|
|
3840
3860
|
);
|
|
3841
3861
|
}
|
|
3842
3862
|
function SelectList({ className, ...props }) {
|
|
3843
|
-
return /* @__PURE__ */
|
|
3863
|
+
return /* @__PURE__ */ jsx50(
|
|
3844
3864
|
ListBox3,
|
|
3845
3865
|
{
|
|
3846
3866
|
"data-slot": "select-list",
|
|
@@ -3854,7 +3874,7 @@ function SelectItem({
|
|
|
3854
3874
|
children,
|
|
3855
3875
|
...props
|
|
3856
3876
|
}) {
|
|
3857
|
-
return /* @__PURE__ */
|
|
3877
|
+
return /* @__PURE__ */ jsx50(
|
|
3858
3878
|
ListBoxItem3,
|
|
3859
3879
|
{
|
|
3860
3880
|
"data-slot": "select-item",
|
|
@@ -3868,6 +3888,34 @@ function SelectItem({
|
|
|
3868
3888
|
);
|
|
3869
3889
|
}
|
|
3870
3890
|
|
|
3891
|
+
// src/ui/selection-toolbar/selection-toolbar.tsx
|
|
3892
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3893
|
+
function SelectionToolbar({
|
|
3894
|
+
count,
|
|
3895
|
+
className,
|
|
3896
|
+
children,
|
|
3897
|
+
...props
|
|
3898
|
+
}) {
|
|
3899
|
+
return /* @__PURE__ */ jsxs25(
|
|
3900
|
+
"div",
|
|
3901
|
+
{
|
|
3902
|
+
"data-slot": "selection-toolbar",
|
|
3903
|
+
className: cn(
|
|
3904
|
+
"flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
|
|
3905
|
+
className
|
|
3906
|
+
),
|
|
3907
|
+
...props,
|
|
3908
|
+
children: [
|
|
3909
|
+
/* @__PURE__ */ jsxs25("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
|
|
3910
|
+
count,
|
|
3911
|
+
" seleccionados"
|
|
3912
|
+
] }),
|
|
3913
|
+
/* @__PURE__ */ jsx51("div", { className: "flex items-center gap-2", children })
|
|
3914
|
+
]
|
|
3915
|
+
}
|
|
3916
|
+
);
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3871
3919
|
// src/ui/sidebar/sidebar.tsx
|
|
3872
3920
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2, Ellipsis, Search } from "lucide-react";
|
|
3873
3921
|
import { useCallback as useCallback8, useMemo as useMemo2, useState as useState13 } from "react";
|
|
@@ -3883,7 +3931,7 @@ function useSidebar() {
|
|
|
3883
3931
|
}
|
|
3884
3932
|
|
|
3885
3933
|
// src/ui/sidebar/sidebar.tsx
|
|
3886
|
-
import { Fragment as Fragment9, jsx as
|
|
3934
|
+
import { Fragment as Fragment9, jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3887
3935
|
function SidebarProvider({
|
|
3888
3936
|
defaultCollapsed = false,
|
|
3889
3937
|
collapsed: controlledCollapsed,
|
|
@@ -3908,11 +3956,11 @@ function SidebarProvider({
|
|
|
3908
3956
|
}),
|
|
3909
3957
|
[collapsed, setCollapsed, toggle]
|
|
3910
3958
|
);
|
|
3911
|
-
return /* @__PURE__ */
|
|
3959
|
+
return /* @__PURE__ */ jsx52(SidebarContext.Provider, { value, children });
|
|
3912
3960
|
}
|
|
3913
3961
|
function Sidebar({ className, ...props }) {
|
|
3914
3962
|
const { collapsed } = useSidebar();
|
|
3915
|
-
return /* @__PURE__ */
|
|
3963
|
+
return /* @__PURE__ */ jsx52(
|
|
3916
3964
|
"aside",
|
|
3917
3965
|
{
|
|
3918
3966
|
"data-slot": "sidebar",
|
|
@@ -3926,7 +3974,7 @@ function Sidebar({ className, ...props }) {
|
|
|
3926
3974
|
);
|
|
3927
3975
|
}
|
|
3928
3976
|
function SidebarHeader({ className, ...props }) {
|
|
3929
|
-
return /* @__PURE__ */
|
|
3977
|
+
return /* @__PURE__ */ jsx52(
|
|
3930
3978
|
"div",
|
|
3931
3979
|
{
|
|
3932
3980
|
"data-slot": "sidebar-header",
|
|
@@ -3941,7 +3989,7 @@ function SidebarSearch({
|
|
|
3941
3989
|
className,
|
|
3942
3990
|
...props
|
|
3943
3991
|
}) {
|
|
3944
|
-
return /* @__PURE__ */
|
|
3992
|
+
return /* @__PURE__ */ jsxs26(
|
|
3945
3993
|
"button",
|
|
3946
3994
|
{
|
|
3947
3995
|
type: "button",
|
|
@@ -3952,15 +4000,15 @@ function SidebarSearch({
|
|
|
3952
4000
|
),
|
|
3953
4001
|
...props,
|
|
3954
4002
|
children: [
|
|
3955
|
-
/* @__PURE__ */
|
|
3956
|
-
/* @__PURE__ */
|
|
3957
|
-
/* @__PURE__ */
|
|
4003
|
+
/* @__PURE__ */ jsx52(Search, { className: "size-4 shrink-0" }),
|
|
4004
|
+
/* @__PURE__ */ jsx52("span", { className: "flex-1 text-left", children: label }),
|
|
4005
|
+
/* @__PURE__ */ jsx52("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
|
|
3958
4006
|
]
|
|
3959
4007
|
}
|
|
3960
4008
|
);
|
|
3961
4009
|
}
|
|
3962
4010
|
function SidebarContent({ className, ...props }) {
|
|
3963
|
-
return /* @__PURE__ */
|
|
4011
|
+
return /* @__PURE__ */ jsx52(
|
|
3964
4012
|
"nav",
|
|
3965
4013
|
{
|
|
3966
4014
|
"data-slot": "sidebar-content",
|
|
@@ -3971,7 +4019,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
3971
4019
|
);
|
|
3972
4020
|
}
|
|
3973
4021
|
function SidebarFooter({ className, ...props }) {
|
|
3974
|
-
return /* @__PURE__ */
|
|
4022
|
+
return /* @__PURE__ */ jsx52(
|
|
3975
4023
|
"div",
|
|
3976
4024
|
{
|
|
3977
4025
|
"data-slot": "sidebar-footer",
|
|
@@ -3987,8 +4035,8 @@ function SidebarGroup({
|
|
|
3987
4035
|
...props
|
|
3988
4036
|
}) {
|
|
3989
4037
|
const { collapsed } = useSidebar();
|
|
3990
|
-
return /* @__PURE__ */
|
|
3991
|
-
label && /* @__PURE__ */
|
|
4038
|
+
return /* @__PURE__ */ jsxs26("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
|
|
4039
|
+
label && /* @__PURE__ */ jsx52(
|
|
3992
4040
|
"h2",
|
|
3993
4041
|
{
|
|
3994
4042
|
className: cn(
|
|
@@ -4012,7 +4060,7 @@ function SidebarItem({
|
|
|
4012
4060
|
}) {
|
|
4013
4061
|
const { collapsed } = useSidebar();
|
|
4014
4062
|
const content = typeof children === "function" ? label : children ?? label;
|
|
4015
|
-
return /* @__PURE__ */
|
|
4063
|
+
return /* @__PURE__ */ jsx52(
|
|
4016
4064
|
Link3,
|
|
4017
4065
|
{
|
|
4018
4066
|
"data-slot": "sidebar-item",
|
|
@@ -4024,16 +4072,16 @@ function SidebarItem({
|
|
|
4024
4072
|
typeof className === "function" ? className : className
|
|
4025
4073
|
),
|
|
4026
4074
|
...props,
|
|
4027
|
-
children: (values) => /* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4029
|
-
/* @__PURE__ */
|
|
4030
|
-
badge && !collapsed && /* @__PURE__ */
|
|
4075
|
+
children: (values) => /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
|
4076
|
+
/* @__PURE__ */ jsx52("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
4077
|
+
/* @__PURE__ */ jsx52("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
|
|
4078
|
+
badge && !collapsed && /* @__PURE__ */ jsx52("span", { className: "text-muted-foreground text-xs", children: badge })
|
|
4031
4079
|
] })
|
|
4032
4080
|
}
|
|
4033
4081
|
);
|
|
4034
4082
|
}
|
|
4035
4083
|
function SidebarSeparator({ className, ...props }) {
|
|
4036
|
-
return /* @__PURE__ */
|
|
4084
|
+
return /* @__PURE__ */ jsx52(
|
|
4037
4085
|
"hr",
|
|
4038
4086
|
{
|
|
4039
4087
|
"data-slot": "sidebar-separator",
|
|
@@ -4045,7 +4093,7 @@ function SidebarSeparator({ className, ...props }) {
|
|
|
4045
4093
|
function SidebarTrigger({ className, ...props }) {
|
|
4046
4094
|
const { collapsed, toggle } = useSidebar();
|
|
4047
4095
|
const { onPress, ...buttonProps } = props;
|
|
4048
|
-
return /* @__PURE__ */
|
|
4096
|
+
return /* @__PURE__ */ jsx52(
|
|
4049
4097
|
Button,
|
|
4050
4098
|
{
|
|
4051
4099
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -4057,14 +4105,14 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
4057
4105
|
variant: "ghost",
|
|
4058
4106
|
className: cn("ml-auto", className),
|
|
4059
4107
|
...buttonProps,
|
|
4060
|
-
children: collapsed ? /* @__PURE__ */
|
|
4108
|
+
children: collapsed ? /* @__PURE__ */ jsx52(ChevronRight2, {}) : /* @__PURE__ */ jsx52(ChevronLeft2, {})
|
|
4061
4109
|
}
|
|
4062
4110
|
);
|
|
4063
4111
|
}
|
|
4064
4112
|
function SidebarRail({ className, ...props }) {
|
|
4065
4113
|
const { toggle } = useSidebar();
|
|
4066
4114
|
const { onClick, ...buttonProps } = props;
|
|
4067
|
-
return /* @__PURE__ */
|
|
4115
|
+
return /* @__PURE__ */ jsx52(
|
|
4068
4116
|
"button",
|
|
4069
4117
|
{
|
|
4070
4118
|
type: "button",
|
|
@@ -4082,7 +4130,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
4082
4130
|
);
|
|
4083
4131
|
}
|
|
4084
4132
|
function SidebarMore({ className, ...props }) {
|
|
4085
|
-
return /* @__PURE__ */
|
|
4133
|
+
return /* @__PURE__ */ jsx52(
|
|
4086
4134
|
Button,
|
|
4087
4135
|
{
|
|
4088
4136
|
"aria-label": "M\xE1s opciones",
|
|
@@ -4090,15 +4138,15 @@ function SidebarMore({ className, ...props }) {
|
|
|
4090
4138
|
variant: "ghost",
|
|
4091
4139
|
className: cn("size-7", className),
|
|
4092
4140
|
...props,
|
|
4093
|
-
children: /* @__PURE__ */
|
|
4141
|
+
children: /* @__PURE__ */ jsx52(Ellipsis, {})
|
|
4094
4142
|
}
|
|
4095
4143
|
);
|
|
4096
4144
|
}
|
|
4097
4145
|
|
|
4098
4146
|
// src/ui/skeleton/skeleton.tsx
|
|
4099
|
-
import { jsx as
|
|
4147
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
4100
4148
|
function Skeleton({ className, ...props }) {
|
|
4101
|
-
return /* @__PURE__ */
|
|
4149
|
+
return /* @__PURE__ */ jsx53(
|
|
4102
4150
|
"div",
|
|
4103
4151
|
{
|
|
4104
4152
|
"aria-hidden": "true",
|
|
@@ -4113,7 +4161,7 @@ function Skeleton({ className, ...props }) {
|
|
|
4113
4161
|
import { LoaderCircle as LoaderCircle3 } from "lucide-react";
|
|
4114
4162
|
import { useCallback as useCallback9, useLayoutEffect, useRef as useRef7 } from "react";
|
|
4115
4163
|
import { useFormStatus } from "react-dom";
|
|
4116
|
-
import { Fragment as Fragment10, jsx as
|
|
4164
|
+
import { Fragment as Fragment10, jsx as jsx54, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4117
4165
|
function assignRef(ref, node) {
|
|
4118
4166
|
if (typeof ref === "function") {
|
|
4119
4167
|
ref(node);
|
|
@@ -4148,7 +4196,7 @@ function SubmitButton({
|
|
|
4148
4196
|
if (busy) button.setAttribute("aria-busy", "true");
|
|
4149
4197
|
else button.removeAttribute("aria-busy");
|
|
4150
4198
|
}, [busy]);
|
|
4151
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ jsx54(
|
|
4152
4200
|
Button,
|
|
4153
4201
|
{
|
|
4154
4202
|
ref: setButtonRef,
|
|
@@ -4157,8 +4205,8 @@ function SubmitButton({
|
|
|
4157
4205
|
isDisabled: busy || isDisabled,
|
|
4158
4206
|
"aria-busy": busy || void 0,
|
|
4159
4207
|
...props,
|
|
4160
|
-
children: busy ? /* @__PURE__ */
|
|
4161
|
-
/* @__PURE__ */
|
|
4208
|
+
children: busy ? /* @__PURE__ */ jsxs27(Fragment10, { children: [
|
|
4209
|
+
/* @__PURE__ */ jsx54(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 motion-safe:animate-spin" }),
|
|
4162
4210
|
label
|
|
4163
4211
|
] }) : children
|
|
4164
4212
|
}
|
|
@@ -4168,7 +4216,7 @@ function SubmitButton({
|
|
|
4168
4216
|
// src/ui/switch/switch.tsx
|
|
4169
4217
|
import { useEffect as useEffect6, useRef as useRef8 } from "react";
|
|
4170
4218
|
import { Switch as AriaSwitch } from "react-aria-components";
|
|
4171
|
-
import { Fragment as Fragment11, jsx as
|
|
4219
|
+
import { Fragment as Fragment11, jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4172
4220
|
var switchSizes = {
|
|
4173
4221
|
sm: {
|
|
4174
4222
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -4225,7 +4273,7 @@ function Switch({
|
|
|
4225
4273
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
4226
4274
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
4227
4275
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
4228
|
-
return /* @__PURE__ */
|
|
4276
|
+
return /* @__PURE__ */ jsx55(
|
|
4229
4277
|
AriaSwitch,
|
|
4230
4278
|
{
|
|
4231
4279
|
"data-slot": "switch",
|
|
@@ -4242,8 +4290,8 @@ function Switch({
|
|
|
4242
4290
|
children: (state) => {
|
|
4243
4291
|
const isThumbPressed = state.isPressed;
|
|
4244
4292
|
const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
4245
|
-
return /* @__PURE__ */
|
|
4246
|
-
/* @__PURE__ */
|
|
4293
|
+
return /* @__PURE__ */ jsxs28(Fragment11, { children: [
|
|
4294
|
+
/* @__PURE__ */ jsx55(
|
|
4247
4295
|
"span",
|
|
4248
4296
|
{
|
|
4249
4297
|
"aria-hidden": "true",
|
|
@@ -4257,7 +4305,7 @@ function Switch({
|
|
|
4257
4305
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
4258
4306
|
styles.control
|
|
4259
4307
|
),
|
|
4260
|
-
children: /* @__PURE__ */
|
|
4308
|
+
children: /* @__PURE__ */ jsx55(
|
|
4261
4309
|
"span",
|
|
4262
4310
|
{
|
|
4263
4311
|
"data-slot": "switch-thumb",
|
|
@@ -4277,9 +4325,9 @@ function Switch({
|
|
|
4277
4325
|
)
|
|
4278
4326
|
}
|
|
4279
4327
|
),
|
|
4280
|
-
children || description ? /* @__PURE__ */
|
|
4281
|
-
children ? /* @__PURE__ */
|
|
4282
|
-
description ? /* @__PURE__ */
|
|
4328
|
+
children || description ? /* @__PURE__ */ jsxs28("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
4329
|
+
children ? /* @__PURE__ */ jsx55("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
4330
|
+
description ? /* @__PURE__ */ jsx55(
|
|
4283
4331
|
"span",
|
|
4284
4332
|
{
|
|
4285
4333
|
"data-slot": "switch-description",
|
|
@@ -4295,9 +4343,9 @@ function Switch({
|
|
|
4295
4343
|
}
|
|
4296
4344
|
|
|
4297
4345
|
// src/ui/table/table.tsx
|
|
4298
|
-
import { jsx as
|
|
4346
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
4299
4347
|
function Table({ className, ...props }) {
|
|
4300
|
-
return /* @__PURE__ */
|
|
4348
|
+
return /* @__PURE__ */ jsx56("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx56(
|
|
4301
4349
|
"table",
|
|
4302
4350
|
{
|
|
4303
4351
|
"data-slot": "table",
|
|
@@ -4307,10 +4355,10 @@ function Table({ className, ...props }) {
|
|
|
4307
4355
|
) });
|
|
4308
4356
|
}
|
|
4309
4357
|
function TableHeader({ className, ...props }) {
|
|
4310
|
-
return /* @__PURE__ */
|
|
4358
|
+
return /* @__PURE__ */ jsx56("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
4311
4359
|
}
|
|
4312
4360
|
function TableBody({ className, ...props }) {
|
|
4313
|
-
return /* @__PURE__ */
|
|
4361
|
+
return /* @__PURE__ */ jsx56(
|
|
4314
4362
|
"tbody",
|
|
4315
4363
|
{
|
|
4316
4364
|
"data-slot": "table-body",
|
|
@@ -4320,7 +4368,7 @@ function TableBody({ className, ...props }) {
|
|
|
4320
4368
|
);
|
|
4321
4369
|
}
|
|
4322
4370
|
function TableRow({ className, ...props }) {
|
|
4323
|
-
return /* @__PURE__ */
|
|
4371
|
+
return /* @__PURE__ */ jsx56(
|
|
4324
4372
|
"tr",
|
|
4325
4373
|
{
|
|
4326
4374
|
"data-slot": "table-row",
|
|
@@ -4333,7 +4381,7 @@ function TableRow({ className, ...props }) {
|
|
|
4333
4381
|
);
|
|
4334
4382
|
}
|
|
4335
4383
|
function TableHead({ className, ...props }) {
|
|
4336
|
-
return /* @__PURE__ */
|
|
4384
|
+
return /* @__PURE__ */ jsx56(
|
|
4337
4385
|
"th",
|
|
4338
4386
|
{
|
|
4339
4387
|
"data-slot": "table-head",
|
|
@@ -4346,7 +4394,7 @@ function TableHead({ className, ...props }) {
|
|
|
4346
4394
|
);
|
|
4347
4395
|
}
|
|
4348
4396
|
function TableCell({ className, ...props }) {
|
|
4349
|
-
return /* @__PURE__ */
|
|
4397
|
+
return /* @__PURE__ */ jsx56(
|
|
4350
4398
|
"td",
|
|
4351
4399
|
{
|
|
4352
4400
|
"data-slot": "table-cell",
|
|
@@ -4356,7 +4404,7 @@ function TableCell({ className, ...props }) {
|
|
|
4356
4404
|
);
|
|
4357
4405
|
}
|
|
4358
4406
|
function TableCaption({ className, ...props }) {
|
|
4359
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx56(
|
|
4360
4408
|
"caption",
|
|
4361
4409
|
{
|
|
4362
4410
|
"data-slot": "table-caption",
|
|
@@ -4366,7 +4414,7 @@ function TableCaption({ className, ...props }) {
|
|
|
4366
4414
|
);
|
|
4367
4415
|
}
|
|
4368
4416
|
function TableFooter({ className, ...props }) {
|
|
4369
|
-
return /* @__PURE__ */
|
|
4417
|
+
return /* @__PURE__ */ jsx56(
|
|
4370
4418
|
"tfoot",
|
|
4371
4419
|
{
|
|
4372
4420
|
"data-slot": "table-footer",
|
|
@@ -4379,7 +4427,7 @@ function TableFooter({ className, ...props }) {
|
|
|
4379
4427
|
);
|
|
4380
4428
|
}
|
|
4381
4429
|
function TableToolbar({ className, ...props }) {
|
|
4382
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx56(
|
|
4383
4431
|
"div",
|
|
4384
4432
|
{
|
|
4385
4433
|
"data-slot": "table-toolbar",
|
|
@@ -4393,7 +4441,7 @@ function TableEmpty({
|
|
|
4393
4441
|
className,
|
|
4394
4442
|
children = "No hay resultados."
|
|
4395
4443
|
}) {
|
|
4396
|
-
return /* @__PURE__ */
|
|
4444
|
+
return /* @__PURE__ */ jsx56(TableRow, { "data-slot": "table-empty", children: /* @__PURE__ */ jsx56(
|
|
4397
4445
|
TableCell,
|
|
4398
4446
|
{
|
|
4399
4447
|
colSpan,
|
|
@@ -4407,7 +4455,7 @@ function TableLoading({
|
|
|
4407
4455
|
className,
|
|
4408
4456
|
children = "Cargando\u2026"
|
|
4409
4457
|
}) {
|
|
4410
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ jsx56(TableRow, { "data-slot": "table-loading", "aria-busy": "true", children: /* @__PURE__ */ jsx56(
|
|
4411
4459
|
TableCell,
|
|
4412
4460
|
{
|
|
4413
4461
|
colSpan,
|
|
@@ -4426,9 +4474,9 @@ import {
|
|
|
4426
4474
|
Tabs as AriaTabs,
|
|
4427
4475
|
composeRenderProps as composeRenderProps2
|
|
4428
4476
|
} from "react-aria-components";
|
|
4429
|
-
import { jsx as
|
|
4477
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
4430
4478
|
function Tabs({ className, ...props }) {
|
|
4431
|
-
return /* @__PURE__ */
|
|
4479
|
+
return /* @__PURE__ */ jsx57(
|
|
4432
4480
|
AriaTabs,
|
|
4433
4481
|
{
|
|
4434
4482
|
"data-slot": "tabs",
|
|
@@ -4438,7 +4486,7 @@ function Tabs({ className, ...props }) {
|
|
|
4438
4486
|
);
|
|
4439
4487
|
}
|
|
4440
4488
|
function TabsList({ className, ...props }) {
|
|
4441
|
-
return /* @__PURE__ */
|
|
4489
|
+
return /* @__PURE__ */ jsx57(
|
|
4442
4490
|
AriaTabList,
|
|
4443
4491
|
{
|
|
4444
4492
|
"data-slot": "tabs-list",
|
|
@@ -4454,7 +4502,7 @@ function TabsList({ className, ...props }) {
|
|
|
4454
4502
|
);
|
|
4455
4503
|
}
|
|
4456
4504
|
function TabsTrigger({ className, ...props }) {
|
|
4457
|
-
return /* @__PURE__ */
|
|
4505
|
+
return /* @__PURE__ */ jsx57(
|
|
4458
4506
|
AriaTab,
|
|
4459
4507
|
{
|
|
4460
4508
|
"data-slot": "tabs-trigger",
|
|
@@ -4470,10 +4518,10 @@ function TabsTrigger({ className, ...props }) {
|
|
|
4470
4518
|
);
|
|
4471
4519
|
}
|
|
4472
4520
|
function TabsPanels({ className, ...props }) {
|
|
4473
|
-
return /* @__PURE__ */
|
|
4521
|
+
return /* @__PURE__ */ jsx57(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
4474
4522
|
}
|
|
4475
4523
|
function TabsContent({ className, ...props }) {
|
|
4476
|
-
return /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ jsx57(
|
|
4477
4525
|
AriaTabPanel,
|
|
4478
4526
|
{
|
|
4479
4527
|
"data-slot": "tabs-content",
|
|
@@ -4537,15 +4585,15 @@ function useToast() {
|
|
|
4537
4585
|
}
|
|
4538
4586
|
|
|
4539
4587
|
// src/ui/toast/toast.tsx
|
|
4540
|
-
import { Fragment as Fragment12, jsx as
|
|
4588
|
+
import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4541
4589
|
function ToastProvider({ children }) {
|
|
4542
|
-
return /* @__PURE__ */
|
|
4590
|
+
return /* @__PURE__ */ jsxs29(Fragment12, { children: [
|
|
4543
4591
|
children,
|
|
4544
|
-
/* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsx58(Toaster, {})
|
|
4545
4593
|
] });
|
|
4546
4594
|
}
|
|
4547
4595
|
function Toaster({ position }) {
|
|
4548
|
-
return /* @__PURE__ */
|
|
4596
|
+
return /* @__PURE__ */ jsx58(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
4549
4597
|
}
|
|
4550
4598
|
function ToastViewport({
|
|
4551
4599
|
position,
|
|
@@ -4554,7 +4602,7 @@ function ToastViewport({
|
|
|
4554
4602
|
}) {
|
|
4555
4603
|
void className;
|
|
4556
4604
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
4557
|
-
return /* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ jsx58(Toaster, { position });
|
|
4558
4606
|
}
|
|
4559
4607
|
function Toast({
|
|
4560
4608
|
id,
|
|
@@ -4579,9 +4627,9 @@ function Toast({
|
|
|
4579
4627
|
}
|
|
4580
4628
|
|
|
4581
4629
|
// src/ui/toolbar/toolbar.tsx
|
|
4582
|
-
import { jsx as
|
|
4630
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4583
4631
|
function Toolbar({ className, ...props }) {
|
|
4584
|
-
return /* @__PURE__ */
|
|
4632
|
+
return /* @__PURE__ */ jsx59(
|
|
4585
4633
|
"div",
|
|
4586
4634
|
{
|
|
4587
4635
|
role: "toolbar",
|
|
@@ -4592,7 +4640,7 @@ function Toolbar({ className, ...props }) {
|
|
|
4592
4640
|
);
|
|
4593
4641
|
}
|
|
4594
4642
|
function ToolbarGroup({ className, ...props }) {
|
|
4595
|
-
return /* @__PURE__ */
|
|
4643
|
+
return /* @__PURE__ */ jsx59(
|
|
4596
4644
|
"div",
|
|
4597
4645
|
{
|
|
4598
4646
|
"data-slot": "toolbar-group",
|
|
@@ -4602,7 +4650,7 @@ function ToolbarGroup({ className, ...props }) {
|
|
|
4602
4650
|
);
|
|
4603
4651
|
}
|
|
4604
4652
|
function ToolbarSpacer({ className, ...props }) {
|
|
4605
|
-
return /* @__PURE__ */
|
|
4653
|
+
return /* @__PURE__ */ jsx59("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
4606
4654
|
}
|
|
4607
4655
|
export {
|
|
4608
4656
|
Accordion,
|