@toteat-eng/ds-react 2026.4.28-8 → 2026.5.13
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 +124 -0
- package/dist/index.es.js +216 -213
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -555,7 +555,7 @@ var Hn = {
|
|
|
555
555
|
//#endregion
|
|
556
556
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
557
557
|
function Un({ label: e, className: t, id: n, ref: r, ...i }) {
|
|
558
|
-
let a = n ?? `checkbox-${e
|
|
558
|
+
let a = n ?? `checkbox-${String(e ?? "").toLowerCase().replace(/\s+/g, "-")}`;
|
|
559
559
|
return /* @__PURE__ */ u("label", {
|
|
560
560
|
className: [Hn.wrapper, t].filter(Boolean).join(" "),
|
|
561
561
|
htmlFor: a,
|
|
@@ -1689,59 +1689,62 @@ function Br({ mode: e = "complete", variant: t = "original", width: n, height: r
|
|
|
1689
1689
|
});
|
|
1690
1690
|
}
|
|
1691
1691
|
var G = {
|
|
1692
|
-
multiselect: "
|
|
1693
|
-
trigger: "
|
|
1694
|
-
placeholder: "
|
|
1695
|
-
tag: "
|
|
1696
|
-
tagRemove: "
|
|
1697
|
-
dropdown: "
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
g(!1), b.current?.focus();
|
|
1692
|
+
multiselect: "_multiselect_jb72r_2",
|
|
1693
|
+
trigger: "_trigger_jb72r_10",
|
|
1694
|
+
placeholder: "_placeholder_jb72r_42",
|
|
1695
|
+
tag: "_tag_jb72r_49",
|
|
1696
|
+
tagRemove: "_tagRemove_jb72r_63",
|
|
1697
|
+
dropdown: "_dropdown_jb72r_91",
|
|
1698
|
+
optionsList: "_optionsList_jb72r_108",
|
|
1699
|
+
search: "_search_jb72r_120",
|
|
1700
|
+
option: "_option_jb72r_108",
|
|
1701
|
+
noResults: "_noResults_jb72r_162"
|
|
1702
|
+
}, Vr = 240;
|
|
1703
|
+
function Hr({ options: e, value: t, onChange: i, placeholder: a = "Seleccionar...", searchPlaceholder: c = "Buscar...", noResultsText: d = "Sin resultados", removeLabel: f = "Eliminar", disabled: p, error: m }) {
|
|
1704
|
+
let [h, g] = s(!1), [_, v] = s(!1), [y, b] = s(""), x = o(null), S = o(null), C = e.filter((e) => t.includes(e.value)), w = e.filter((e) => !t.includes(e.value) && e.label.toLowerCase().includes(y.toLowerCase())), T = n(() => {
|
|
1705
|
+
g(!1), S.current?.focus();
|
|
1707
1706
|
}, []);
|
|
1708
1707
|
r(() => {
|
|
1709
1708
|
if (!h) return;
|
|
1710
1709
|
let e = (e) => {
|
|
1711
|
-
|
|
1710
|
+
x.current?.contains(e.target) || T();
|
|
1712
1711
|
};
|
|
1713
1712
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1714
|
-
}, [h,
|
|
1713
|
+
}, [h, T]), r(() => {
|
|
1715
1714
|
if (!h) return;
|
|
1716
1715
|
let e = (e) => {
|
|
1717
|
-
e.key === "Escape" &&
|
|
1716
|
+
e.key === "Escape" && T();
|
|
1718
1717
|
};
|
|
1719
1718
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1720
|
-
}, [h,
|
|
1721
|
-
|
|
1719
|
+
}, [h, T]), r(() => {
|
|
1720
|
+
if (!h || !x.current) return;
|
|
1721
|
+
let e = x.current.getBoundingClientRect();
|
|
1722
|
+
v(window.innerHeight - e.bottom < Vr + 8);
|
|
1723
|
+
}, [h]);
|
|
1724
|
+
let E = (e) => i([...t, e]), D = (e) => i(t.filter((t) => t !== e));
|
|
1722
1725
|
return /* @__PURE__ */ u("div", {
|
|
1723
|
-
ref:
|
|
1726
|
+
ref: x,
|
|
1724
1727
|
className: G.multiselect,
|
|
1725
1728
|
"data-error": m || void 0,
|
|
1726
1729
|
"data-disabled": p || void 0,
|
|
1727
1730
|
children: [/* @__PURE__ */ u("button", {
|
|
1728
|
-
ref:
|
|
1731
|
+
ref: S,
|
|
1729
1732
|
type: "button",
|
|
1730
1733
|
className: G.trigger,
|
|
1731
1734
|
onClick: () => !p && g((e) => !e),
|
|
1732
1735
|
"aria-haspopup": "listbox",
|
|
1733
1736
|
"aria-expanded": h,
|
|
1734
1737
|
disabled: p,
|
|
1735
|
-
children: [
|
|
1738
|
+
children: [C.length === 0 && /* @__PURE__ */ l("span", {
|
|
1736
1739
|
className: G.placeholder,
|
|
1737
1740
|
children: a
|
|
1738
|
-
}),
|
|
1741
|
+
}), C.map((e) => /* @__PURE__ */ u("span", {
|
|
1739
1742
|
className: G.tag,
|
|
1740
1743
|
children: [e.label, /* @__PURE__ */ l("button", {
|
|
1741
1744
|
type: "button",
|
|
1742
1745
|
className: G.tagRemove,
|
|
1743
1746
|
onClick: (t) => {
|
|
1744
|
-
t.stopPropagation(),
|
|
1747
|
+
t.stopPropagation(), D(e.value);
|
|
1745
1748
|
},
|
|
1746
1749
|
"aria-label": `${f} ${e.label}`,
|
|
1747
1750
|
children: "×"
|
|
@@ -1751,31 +1754,31 @@ function Vr({ options: e, value: t, onChange: i, placeholder: a = "Seleccionar..
|
|
|
1751
1754
|
className: G.dropdown,
|
|
1752
1755
|
role: "listbox",
|
|
1753
1756
|
"aria-multiselectable": "true",
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1757
|
+
"data-upward": _ || void 0,
|
|
1758
|
+
children: [/* @__PURE__ */ l("input", {
|
|
1759
|
+
type: "text",
|
|
1760
|
+
className: G.search,
|
|
1761
|
+
placeholder: c,
|
|
1762
|
+
"aria-label": c,
|
|
1763
|
+
value: y,
|
|
1764
|
+
onChange: (e) => b(e.target.value),
|
|
1765
|
+
autoFocus: !0
|
|
1766
|
+
}), /* @__PURE__ */ u("div", {
|
|
1767
|
+
className: G.optionsList,
|
|
1768
|
+
children: [w.map((e) => /* @__PURE__ */ l("button", {
|
|
1765
1769
|
type: "button",
|
|
1766
1770
|
role: "option",
|
|
1767
1771
|
"aria-selected": t.includes(e.value),
|
|
1768
1772
|
className: G.option,
|
|
1769
1773
|
onClick: () => {
|
|
1770
|
-
|
|
1774
|
+
E(e.value), b("");
|
|
1771
1775
|
},
|
|
1772
1776
|
children: e.label
|
|
1773
|
-
}, e.value)),
|
|
1774
|
-
S.length === 0 && /* @__PURE__ */ l("div", {
|
|
1777
|
+
}, e.value)), w.length === 0 && /* @__PURE__ */ l("div", {
|
|
1775
1778
|
className: G.noResults,
|
|
1776
1779
|
children: d
|
|
1777
|
-
})
|
|
1778
|
-
]
|
|
1780
|
+
})]
|
|
1781
|
+
})]
|
|
1779
1782
|
})]
|
|
1780
1783
|
});
|
|
1781
1784
|
}
|
|
@@ -1794,7 +1797,7 @@ var K = {
|
|
|
1794
1797
|
};
|
|
1795
1798
|
//#endregion
|
|
1796
1799
|
//#region src/components/NavBar/NavBar.tsx
|
|
1797
|
-
function
|
|
1800
|
+
function Ur({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle: r, isLoading: i = !1, isPinLocked: a = !1, rightSlot: o }) {
|
|
1798
1801
|
return a ? null : /* @__PURE__ */ u("header", {
|
|
1799
1802
|
className: K.navbar,
|
|
1800
1803
|
children: [
|
|
@@ -1853,7 +1856,7 @@ function Hr({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
1853
1856
|
]
|
|
1854
1857
|
});
|
|
1855
1858
|
}
|
|
1856
|
-
var
|
|
1859
|
+
var Wr = {
|
|
1857
1860
|
overlay: "_overlay_8yoic_2",
|
|
1858
1861
|
"overlay-fade-in": "_overlay-fade-in_8yoic_1",
|
|
1859
1862
|
backdrop: "_backdrop_8yoic_22",
|
|
@@ -1861,7 +1864,7 @@ var Ur = {
|
|
|
1861
1864
|
};
|
|
1862
1865
|
//#endregion
|
|
1863
1866
|
//#region src/components/Overlay/Overlay.tsx
|
|
1864
|
-
function
|
|
1867
|
+
function Gr({ visible: e = !1, onClose: t, children: i, dismissible: a = !0, closeOnBackdrop: o = !0, closeOnEsc: s = !0, lockScroll: c = !0, blur: d = !1, placement: f = "center", zIndex: p = 1200, role: m = "presentation", "aria-label": h, className: g, "data-testid": _ }) {
|
|
1865
1868
|
let v = n(() => {
|
|
1866
1869
|
a && t();
|
|
1867
1870
|
}, [a, t]);
|
|
@@ -1881,7 +1884,7 @@ function Wr({ visible: e = !1, onClose: t, children: i, dismissible: a = !0, clo
|
|
|
1881
1884
|
v
|
|
1882
1885
|
]), !e || typeof document > "u" ? null : k(/* @__PURE__ */ u("div", {
|
|
1883
1886
|
"data-testid": _,
|
|
1884
|
-
className: [
|
|
1887
|
+
className: [Wr.overlay, g].filter(Boolean).join(" "),
|
|
1885
1888
|
"data-blur": d ? "" : void 0,
|
|
1886
1889
|
"data-placement": f,
|
|
1887
1890
|
style: { "--overlay-z-index": String(p) },
|
|
@@ -1889,13 +1892,13 @@ function Wr({ visible: e = !1, onClose: t, children: i, dismissible: a = !0, clo
|
|
|
1889
1892
|
"aria-label": h,
|
|
1890
1893
|
children: [/* @__PURE__ */ l("button", {
|
|
1891
1894
|
type: "button",
|
|
1892
|
-
className:
|
|
1895
|
+
className: Wr.backdrop,
|
|
1893
1896
|
"data-backdrop": "",
|
|
1894
1897
|
onClick: o ? v : void 0,
|
|
1895
1898
|
"aria-hidden": "true",
|
|
1896
1899
|
tabIndex: -1
|
|
1897
1900
|
}), /* @__PURE__ */ l("div", {
|
|
1898
|
-
className:
|
|
1901
|
+
className: Wr.content,
|
|
1899
1902
|
children: i
|
|
1900
1903
|
})]
|
|
1901
1904
|
}), document.body);
|
|
@@ -1911,19 +1914,19 @@ var q = {
|
|
|
1911
1914
|
closeBtn: "_closeBtn_we8nc_66",
|
|
1912
1915
|
body: "_body_we8nc_94",
|
|
1913
1916
|
actions: "_actions_we8nc_101"
|
|
1914
|
-
},
|
|
1917
|
+
}, Kr = {
|
|
1915
1918
|
success: "success-outline",
|
|
1916
1919
|
info: "info-outline",
|
|
1917
1920
|
warning: "exclamation-outline",
|
|
1918
1921
|
error: "error-outline"
|
|
1919
|
-
},
|
|
1922
|
+
}, qr = {
|
|
1920
1923
|
success: "var(--ds-color-success)",
|
|
1921
1924
|
info: "var(--ds-color-info)",
|
|
1922
1925
|
warning: "var(--ds-color-warning)",
|
|
1923
1926
|
error: "var(--ds-color-primary)"
|
|
1924
1927
|
};
|
|
1925
|
-
function
|
|
1926
|
-
let S = i(), C = i(), w = a ??
|
|
1928
|
+
function Jr({ title: e, eyebrow: t, children: n, status: r = "success", iconName: a, iconSize: o = 44, dismissible: s = !0, showCloseButton: c = !0, closeButtonLabel: d = "Close overlay message", primaryButtonLabel: f, secondaryButtonLabel: p, loadingPrimary: m = !1, loadingSecondary: h = !1, maxWidth: g = 400, standalone: _ = !1, onClose: v, onPrimaryClick: y, onSecondaryClick: b, "data-testid": x }) {
|
|
1929
|
+
let S = i(), C = i(), w = a ?? Kr[r], T = qr[r], E = !!n, D = !!f || !!p;
|
|
1927
1930
|
return /* @__PURE__ */ u("div", {
|
|
1928
1931
|
className: q.overlayMessage,
|
|
1929
1932
|
"data-status": r,
|
|
@@ -1997,14 +2000,14 @@ function qr({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
1997
2000
|
]
|
|
1998
2001
|
});
|
|
1999
2002
|
}
|
|
2000
|
-
function
|
|
2001
|
-
return e ? d ? /* @__PURE__ */ l(
|
|
2003
|
+
function Yr({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop: r = !0, closeOnEsc: i = !0, lockScroll: a = !0, zIndex: o = 1200, blur: s = !1, placement: c = "center", "aria-label": u, standalone: d = !1, "data-testid": f, ...p }) {
|
|
2004
|
+
return e ? d ? /* @__PURE__ */ l(Jr, {
|
|
2002
2005
|
...p,
|
|
2003
2006
|
standalone: !0,
|
|
2004
2007
|
dismissible: n,
|
|
2005
2008
|
onClose: t,
|
|
2006
2009
|
"data-testid": f
|
|
2007
|
-
}) : /* @__PURE__ */ l(
|
|
2010
|
+
}) : /* @__PURE__ */ l(Gr, {
|
|
2008
2011
|
visible: e,
|
|
2009
2012
|
onClose: t,
|
|
2010
2013
|
dismissible: n,
|
|
@@ -2015,7 +2018,7 @@ function Jr({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2015
2018
|
blur: s,
|
|
2016
2019
|
placement: c,
|
|
2017
2020
|
"aria-label": u,
|
|
2018
|
-
children: /* @__PURE__ */ l(
|
|
2021
|
+
children: /* @__PURE__ */ l(Jr, {
|
|
2019
2022
|
...p,
|
|
2020
2023
|
dismissible: n,
|
|
2021
2024
|
onClose: t,
|
|
@@ -2023,15 +2026,15 @@ function Jr({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2023
2026
|
})
|
|
2024
2027
|
}) : null;
|
|
2025
2028
|
}
|
|
2026
|
-
var
|
|
2027
|
-
function
|
|
2029
|
+
var Xr = { canvas: "_canvas_ljz2v_7" }, Zr = "#version 300 es\nin vec2 a_pos;\nvoid main() { gl_Position = vec4(a_pos, 0.0, 1.0); }", Qr = "#version 300 es\nprecision highp float;\n\nuniform float u_time;\nuniform vec2 u_res;\nout vec4 fragColor;\n\n#define PI 3.14159265359\n#define CELL 18.0 /* px per grid cell */\n#define RADIUS 2.1 /* dot radius in px */\n#define SPEED 25.0 /* wave propagation */\n#define PERIOD 3.8 /* seconds per cycle */\n#define AMP 0.40 /* wave amplitude */\n#define BASE 1.30 /* resting scale */\n\nfloat swave(float t, float k) {\n return (2.0 * AMP / PI) * atan(sin(2.0 * PI * t / PERIOD) / k);\n}\n\nvoid main() {\n vec2 p = gl_FragCoord.xy;\n vec2 center = u_res * 0.5;\n vec2 gridP = p / CELL;\n\n float alpha = 0.0;\n\n for (int dy = -2; dy <= 2; dy++) {\n for (int dx = -2; dx <= 2; dx++) {\n /* grid cell index of this neighbour */\n vec2 cell = floor(gridP) + vec2(float(dx), float(dy));\n\n /* hex stagger: odd x-columns shift down half a cell */\n float hexY = mod(cell.x, 2.0) * 0.5;\n\n /* dot centre in grid units relative to screen centre */\n vec2 origGU = cell + vec2(0.5, 0.5 + hexY) - center / CELL;\n\n /* distance with 8-fold angular symmetry → petal wave-front */\n float d8 = length(origGU) + 0.5 * cos(8.0 * atan(origGU.y, origGU.x));\n\n /* smooth-square-wave breathing */\n float k = 0.15 + 0.2 * abs(d8) / 72.0;\n float wave = swave(u_time - d8 / SPEED, k);\n float scale = wave + BASE;\n\n /* animated dot centre in pixel space */\n vec2 animPx = origGU * scale * CELL + center;\n\n /* soft circle SDF */\n float dist = length(p - animPx);\n float a = 1.0 - smoothstep(RADIUS - 0.6, RADIUS + 0.6, dist);\n alpha = max(alpha, a);\n }\n }\n\n /* primary colour #ff4235 at low opacity — sits on frosted-glass overlay */\n fragColor = vec4(1.0, 0.259, 0.208, alpha * 0.28);\n}";
|
|
2030
|
+
function $r(e) {
|
|
2028
2031
|
let t = (t, n) => {
|
|
2029
2032
|
let r = e.createShader(t);
|
|
2030
2033
|
return e.shaderSource(r, n), e.compileShader(r), r;
|
|
2031
2034
|
}, n = e.createProgram();
|
|
2032
|
-
return e.attachShader(n, t(e.VERTEX_SHADER,
|
|
2035
|
+
return e.attachShader(n, t(e.VERTEX_SHADER, Zr)), e.attachShader(n, t(e.FRAGMENT_SHADER, Qr)), e.linkProgram(n), n;
|
|
2033
2036
|
}
|
|
2034
|
-
function
|
|
2037
|
+
function ei({ active: e }) {
|
|
2035
2038
|
let t = o(null);
|
|
2036
2039
|
return r(() => {
|
|
2037
2040
|
if (!e || !t.current || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -2042,7 +2045,7 @@ function $r({ active: e }) {
|
|
|
2042
2045
|
if (!r) return;
|
|
2043
2046
|
let i = () => {
|
|
2044
2047
|
n.width = window.innerWidth, n.height = window.innerHeight, r.viewport(0, 0, n.width, n.height), r.uniform2f(l, n.width, n.height);
|
|
2045
|
-
}, a =
|
|
2048
|
+
}, a = $r(r);
|
|
2046
2049
|
r.useProgram(a);
|
|
2047
2050
|
let o = r.createBuffer();
|
|
2048
2051
|
r.bindBuffer(r.ARRAY_BUFFER, o), r.bufferData(r.ARRAY_BUFFER, new Float32Array([
|
|
@@ -2071,11 +2074,11 @@ function $r({ active: e }) {
|
|
|
2071
2074
|
};
|
|
2072
2075
|
}, [e]), /* @__PURE__ */ l("canvas", {
|
|
2073
2076
|
ref: t,
|
|
2074
|
-
className:
|
|
2077
|
+
className: Xr.canvas,
|
|
2075
2078
|
"aria-hidden": "true"
|
|
2076
2079
|
});
|
|
2077
2080
|
}
|
|
2078
|
-
var
|
|
2081
|
+
var ti = {
|
|
2079
2082
|
overlay: "_overlay_15uou_3",
|
|
2080
2083
|
logoLayer: "_logoLayer_15uou_58",
|
|
2081
2084
|
srOnly: "_srOnly_15uou_103"
|
|
@@ -2092,7 +2095,7 @@ var ei = {
|
|
|
2092
2095
|
};
|
|
2093
2096
|
//#endregion
|
|
2094
2097
|
//#region src/components/PageLoadingOverlay/ToteatLogo.tsx
|
|
2095
|
-
function
|
|
2098
|
+
function ni() {
|
|
2096
2099
|
return /* @__PURE__ */ u("div", {
|
|
2097
2100
|
className: J.outer,
|
|
2098
2101
|
"aria-hidden": "true",
|
|
@@ -2122,44 +2125,44 @@ function ti() {
|
|
|
2122
2125
|
}
|
|
2123
2126
|
//#endregion
|
|
2124
2127
|
//#region src/components/PageLoadingOverlay/PageLoadingOverlay.tsx
|
|
2125
|
-
function
|
|
2128
|
+
function ri({ isOpen: e, label: t = "Cargando…" }) {
|
|
2126
2129
|
return k(/* @__PURE__ */ u(c, { children: [
|
|
2127
2130
|
/* @__PURE__ */ l("div", {
|
|
2128
|
-
className:
|
|
2131
|
+
className: ti.overlay,
|
|
2129
2132
|
"data-open": e,
|
|
2130
2133
|
role: "status",
|
|
2131
2134
|
"aria-live": "polite",
|
|
2132
2135
|
"aria-busy": e,
|
|
2133
2136
|
"aria-label": t,
|
|
2134
|
-
children: /* @__PURE__ */ l(
|
|
2137
|
+
children: /* @__PURE__ */ l(ei, { active: e })
|
|
2135
2138
|
}),
|
|
2136
2139
|
/* @__PURE__ */ l("div", {
|
|
2137
|
-
className: `${
|
|
2140
|
+
className: `${ti.logoLayer} tot-ds-root`,
|
|
2138
2141
|
"data-open": e,
|
|
2139
2142
|
"aria-hidden": "true",
|
|
2140
|
-
children: /* @__PURE__ */ l(
|
|
2143
|
+
children: /* @__PURE__ */ l(ni, {})
|
|
2141
2144
|
}),
|
|
2142
2145
|
/* @__PURE__ */ l("span", {
|
|
2143
|
-
className:
|
|
2146
|
+
className: ti.srOnly,
|
|
2144
2147
|
"aria-live": "polite",
|
|
2145
2148
|
"aria-atomic": "true",
|
|
2146
2149
|
children: e ? t : ""
|
|
2147
2150
|
})
|
|
2148
2151
|
] }), document.body);
|
|
2149
2152
|
}
|
|
2150
|
-
var
|
|
2153
|
+
var ii = { overlay: "_overlay_16mjb_2" };
|
|
2151
2154
|
//#endregion
|
|
2152
2155
|
//#region src/components/PinLockOverlay/PinLockOverlay.tsx
|
|
2153
|
-
function
|
|
2156
|
+
function ai({ isLocked: e, children: t }) {
|
|
2154
2157
|
return e ? /* @__PURE__ */ l("div", {
|
|
2155
|
-
className:
|
|
2158
|
+
className: ii.overlay,
|
|
2156
2159
|
role: "dialog",
|
|
2157
2160
|
"aria-label": "Pantalla bloqueada — ingresa tu PIN",
|
|
2158
2161
|
"aria-modal": "true",
|
|
2159
2162
|
children: t
|
|
2160
2163
|
}) : null;
|
|
2161
2164
|
}
|
|
2162
|
-
var
|
|
2165
|
+
var oi = {
|
|
2163
2166
|
wrapper: "_wrapper_lqgoi_2",
|
|
2164
2167
|
input: "_input_lqgoi_9",
|
|
2165
2168
|
circle: "_circle_lqgoi_27",
|
|
@@ -2167,25 +2170,25 @@ var ai = {
|
|
|
2167
2170
|
};
|
|
2168
2171
|
//#endregion
|
|
2169
2172
|
//#region src/components/Radio/Radio.tsx
|
|
2170
|
-
function
|
|
2173
|
+
function si({ label: e, className: t, id: n, ref: r, ...i }) {
|
|
2171
2174
|
let a = n ?? `radio-${i.value}`;
|
|
2172
2175
|
return /* @__PURE__ */ u("label", {
|
|
2173
|
-
className: [
|
|
2176
|
+
className: [oi.wrapper, t].filter(Boolean).join(" "),
|
|
2174
2177
|
htmlFor: a,
|
|
2175
2178
|
children: [
|
|
2176
2179
|
/* @__PURE__ */ l("input", {
|
|
2177
2180
|
ref: r,
|
|
2178
2181
|
type: "radio",
|
|
2179
2182
|
id: a,
|
|
2180
|
-
className:
|
|
2183
|
+
className: oi.input,
|
|
2181
2184
|
...i
|
|
2182
2185
|
}),
|
|
2183
2186
|
/* @__PURE__ */ l("span", {
|
|
2184
|
-
className:
|
|
2187
|
+
className: oi.circle,
|
|
2185
2188
|
"aria-hidden": "true"
|
|
2186
2189
|
}),
|
|
2187
2190
|
e && /* @__PURE__ */ l("span", {
|
|
2188
|
-
className:
|
|
2191
|
+
className: oi.label,
|
|
2189
2192
|
children: e
|
|
2190
2193
|
})
|
|
2191
2194
|
]
|
|
@@ -2204,7 +2207,7 @@ var Y = {
|
|
|
2204
2207
|
};
|
|
2205
2208
|
//#endregion
|
|
2206
2209
|
//#region src/components/Select/Select.tsx
|
|
2207
|
-
function
|
|
2210
|
+
function ci({ options: e, value: t, onChange: i, placeholder: a = "Seleccionar...", searchable: c = !1, searchPlaceholder: d = "Buscar...", noResultsText: f = "Sin resultados", disabled: p, error: m, name: h, "data-testid": g }) {
|
|
2208
2211
|
let [_, v] = s(!1), [y, b] = s(""), x = o(null), S = o(null), C = e.find((e) => e.value === t), w = c ? e.filter((e) => e.label.toLowerCase().includes(y.toLowerCase())) : e, T = n(() => {
|
|
2209
2212
|
v(!1), S.current?.focus();
|
|
2210
2213
|
}, []);
|
|
@@ -2284,35 +2287,35 @@ function si({ options: e, value: t, onChange: i, placeholder: a = "Seleccionar..
|
|
|
2284
2287
|
]
|
|
2285
2288
|
});
|
|
2286
2289
|
}
|
|
2287
|
-
var
|
|
2290
|
+
var li = {
|
|
2288
2291
|
backdrop: "_backdrop_e6k21_2",
|
|
2289
2292
|
sidebar: "_sidebar_e6k21_19"
|
|
2290
2293
|
};
|
|
2291
2294
|
//#endregion
|
|
2292
2295
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
2293
|
-
function
|
|
2296
|
+
function ui({ isOpen: e, onClose: t, isPinLocked: n = !1, isModal: r = !1, children: i }) {
|
|
2294
2297
|
return n || r ? null : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
2295
|
-
className:
|
|
2298
|
+
className: li.backdrop,
|
|
2296
2299
|
"data-open": e,
|
|
2297
2300
|
"data-testid": "sidebar-backdrop",
|
|
2298
2301
|
onClick: t,
|
|
2299
2302
|
role: "presentation",
|
|
2300
2303
|
"aria-hidden": "true"
|
|
2301
2304
|
}), /* @__PURE__ */ l("nav", {
|
|
2302
|
-
className:
|
|
2305
|
+
className: li.sidebar,
|
|
2303
2306
|
"data-open": e,
|
|
2304
2307
|
"aria-label": "Menú principal",
|
|
2305
2308
|
children: i
|
|
2306
2309
|
})] });
|
|
2307
2310
|
}
|
|
2308
|
-
var
|
|
2311
|
+
var di = {
|
|
2309
2312
|
item: "_item_1twlt_2",
|
|
2310
2313
|
active: "_active_1twlt_33"
|
|
2311
|
-
},
|
|
2312
|
-
function
|
|
2314
|
+
}, fi = di.item, pi = di.active;
|
|
2315
|
+
function mi({ label: e, isActive: t = !1, className: n, type: r = "button", ...i }) {
|
|
2313
2316
|
return /* @__PURE__ */ l("button", {
|
|
2314
2317
|
type: r,
|
|
2315
|
-
className: I(
|
|
2318
|
+
className: I(di.item, t && di.active, n),
|
|
2316
2319
|
"data-active": t || void 0,
|
|
2317
2320
|
...i,
|
|
2318
2321
|
children: e
|
|
@@ -2330,7 +2333,7 @@ var X = {
|
|
|
2330
2333
|
};
|
|
2331
2334
|
//#endregion
|
|
2332
2335
|
//#region src/components/SidebarNavSection/SidebarNavSection.tsx
|
|
2333
|
-
function
|
|
2336
|
+
function hi({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive: i = !1, className: a, children: o }) {
|
|
2334
2337
|
let [c, d] = s(r);
|
|
2335
2338
|
return /* @__PURE__ */ u("div", {
|
|
2336
2339
|
className: I(X.section, a),
|
|
@@ -2372,18 +2375,18 @@ function mi({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive:
|
|
|
2372
2375
|
})]
|
|
2373
2376
|
});
|
|
2374
2377
|
}
|
|
2375
|
-
var
|
|
2378
|
+
var gi = { tabbar: "_tabbar_qy5zr_2" };
|
|
2376
2379
|
//#endregion
|
|
2377
2380
|
//#region src/components/TabBar/TabBar.tsx
|
|
2378
|
-
function
|
|
2381
|
+
function _i({ variant: e = "default", children: t }) {
|
|
2379
2382
|
return /* @__PURE__ */ l("div", {
|
|
2380
|
-
className:
|
|
2383
|
+
className: gi.tabbar,
|
|
2381
2384
|
role: "tablist",
|
|
2382
2385
|
"data-variant": e,
|
|
2383
2386
|
children: t
|
|
2384
2387
|
});
|
|
2385
2388
|
}
|
|
2386
|
-
var
|
|
2389
|
+
var vi = {
|
|
2387
2390
|
tabs: "_tabs_zujvo_2",
|
|
2388
2391
|
tabList: "_tabList_zujvo_8",
|
|
2389
2392
|
tab: "_tab_zujvo_2",
|
|
@@ -2391,7 +2394,7 @@ var _i = {
|
|
|
2391
2394
|
};
|
|
2392
2395
|
//#endregion
|
|
2393
2396
|
//#region src/components/Tabs/Tabs.tsx
|
|
2394
|
-
function
|
|
2397
|
+
function yi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange: i }) {
|
|
2395
2398
|
let [a, c] = s(t ?? e[0]?.id ?? ""), d = n !== void 0, f = d ? n : a, p = o(/* @__PURE__ */ new Map()), m = o(d);
|
|
2396
2399
|
process.env.NODE_ENV !== "production" && m.current !== d && console.error("Tabs: `activeTab` prop changed from %s to %s. A component cannot switch between controlled and uncontrolled modes.", m.current ? "controlled" : "uncontrolled", d ? "controlled" : "uncontrolled");
|
|
2397
2400
|
let h = (e) => {
|
|
@@ -2401,9 +2404,9 @@ function vi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2401
2404
|
t.key === "ArrowRight" ? (t.preventDefault(), a = r[(i + 1) % r.length]) : t.key === "ArrowLeft" ? (t.preventDefault(), a = r[(i - 1 + r.length) % r.length]) : t.key === "Home" ? (t.preventDefault(), a = r[0]) : t.key === "End" && (t.preventDefault(), a = r[r.length - 1]), a && (h(a), p.current.get(a)?.focus());
|
|
2402
2405
|
}, _ = e.find((e) => e.id === f)?.content;
|
|
2403
2406
|
return /* @__PURE__ */ u("div", {
|
|
2404
|
-
className:
|
|
2407
|
+
className: vi.tabs,
|
|
2405
2408
|
children: [/* @__PURE__ */ l("div", {
|
|
2406
|
-
className:
|
|
2409
|
+
className: vi.tabList,
|
|
2407
2410
|
role: "tablist",
|
|
2408
2411
|
"aria-label": r,
|
|
2409
2412
|
children: e.map((e, t) => /* @__PURE__ */ l("button", {
|
|
@@ -2415,7 +2418,7 @@ function vi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2415
2418
|
"aria-selected": e.id === f,
|
|
2416
2419
|
"aria-controls": _ == null ? void 0 : `panel-${f}`,
|
|
2417
2420
|
id: `tab-${e.id}`,
|
|
2418
|
-
className:
|
|
2421
|
+
className: vi.tab,
|
|
2419
2422
|
"data-active": e.id === f || void 0,
|
|
2420
2423
|
disabled: e.disabled,
|
|
2421
2424
|
tabIndex: e.id === f ? 0 : -1,
|
|
@@ -2427,32 +2430,32 @@ function vi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2427
2430
|
role: "tabpanel",
|
|
2428
2431
|
id: `panel-${f}`,
|
|
2429
2432
|
"aria-labelledby": `tab-${f}`,
|
|
2430
|
-
className:
|
|
2433
|
+
className: vi.panel,
|
|
2431
2434
|
children: _
|
|
2432
2435
|
})]
|
|
2433
2436
|
});
|
|
2434
2437
|
}
|
|
2435
|
-
var
|
|
2438
|
+
var bi = { textarea: "_textarea_1vuas_2" };
|
|
2436
2439
|
//#endregion
|
|
2437
2440
|
//#region src/components/Textarea/Textarea.tsx
|
|
2438
|
-
function
|
|
2441
|
+
function xi({ error: e, className: t, rows: n = 3, ref: r, ...i }) {
|
|
2439
2442
|
return /* @__PURE__ */ l("textarea", {
|
|
2440
2443
|
ref: r,
|
|
2441
2444
|
rows: n,
|
|
2442
|
-
className: [
|
|
2445
|
+
className: [bi.textarea, t].filter(Boolean).join(" "),
|
|
2443
2446
|
"data-error": e ? "" : void 0,
|
|
2444
2447
|
"aria-invalid": e || void 0,
|
|
2445
2448
|
...i
|
|
2446
2449
|
});
|
|
2447
2450
|
}
|
|
2448
|
-
var
|
|
2451
|
+
var Si = {
|
|
2449
2452
|
wrapper: "_wrapper_1h7g7_2",
|
|
2450
2453
|
input: "_input_1h7g7_7",
|
|
2451
2454
|
toggleButton: "_toggleButton_1h7g7_12"
|
|
2452
|
-
},
|
|
2455
|
+
}, Ci = t(function({ error: e = !1, showPasswordToggle: t = !1, size: n = "medium", className: r, type: i, ...a }, o) {
|
|
2453
2456
|
let [c, d] = s(!1), f = i === "password", p = f && c ? "text" : i, m = /* @__PURE__ */ l("input", {
|
|
2454
2457
|
ref: o,
|
|
2455
|
-
className: [
|
|
2458
|
+
className: [Si.input, !t && r].filter(Boolean).join(" "),
|
|
2456
2459
|
"data-error": e ? "" : void 0,
|
|
2457
2460
|
"data-size": n,
|
|
2458
2461
|
"aria-invalid": e || void 0,
|
|
@@ -2460,12 +2463,12 @@ var xi = {
|
|
|
2460
2463
|
...a
|
|
2461
2464
|
});
|
|
2462
2465
|
return f && t ? /* @__PURE__ */ u("div", {
|
|
2463
|
-
className: [
|
|
2466
|
+
className: [Si.wrapper, r].filter(Boolean).join(" "),
|
|
2464
2467
|
"data-error": e ? "" : void 0,
|
|
2465
2468
|
"data-size": n,
|
|
2466
2469
|
children: [m, /* @__PURE__ */ l("button", {
|
|
2467
2470
|
type: "button",
|
|
2468
|
-
className:
|
|
2471
|
+
className: Si.toggleButton,
|
|
2469
2472
|
"aria-label": c ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
2470
2473
|
"aria-pressed": c,
|
|
2471
2474
|
disabled: a.disabled,
|
|
@@ -2480,55 +2483,55 @@ var xi = {
|
|
|
2480
2483
|
});
|
|
2481
2484
|
//#endregion
|
|
2482
2485
|
//#region src/components/ThemeGate/ThemeGate.tsx
|
|
2483
|
-
function
|
|
2486
|
+
function wi({ theme: e, children: t, className: n }) {
|
|
2484
2487
|
return /* @__PURE__ */ l("div", {
|
|
2485
2488
|
"data-theme": e,
|
|
2486
2489
|
className: n,
|
|
2487
2490
|
children: t
|
|
2488
2491
|
});
|
|
2489
2492
|
}
|
|
2490
|
-
var
|
|
2493
|
+
var Ti = {
|
|
2491
2494
|
container: "_container_18wzq_2",
|
|
2492
2495
|
toast: "_toast_18wzq_22",
|
|
2493
2496
|
"ds-toast-enter": "_ds-toast-enter_18wzq_1",
|
|
2494
2497
|
toastMessage: "_toastMessage_18wzq_61",
|
|
2495
2498
|
dismissButton: "_dismissButton_18wzq_65"
|
|
2496
|
-
}, Z = [],
|
|
2497
|
-
function
|
|
2498
|
-
for (let e of
|
|
2499
|
+
}, Z = [], Ei = /* @__PURE__ */ new Set(), Di = 0;
|
|
2500
|
+
function Oi() {
|
|
2501
|
+
for (let e of Ei) e([...Z]);
|
|
2499
2502
|
}
|
|
2500
|
-
function
|
|
2501
|
-
let t = `toast-${++
|
|
2503
|
+
function ki(e) {
|
|
2504
|
+
let t = `toast-${++Di}-${Date.now()}`;
|
|
2502
2505
|
return Z = [...Z, {
|
|
2503
2506
|
id: t,
|
|
2504
2507
|
message: e.message,
|
|
2505
2508
|
variant: e.variant ?? "info",
|
|
2506
2509
|
duration: e.duration,
|
|
2507
2510
|
dismissible: e.dismissible
|
|
2508
|
-
}],
|
|
2511
|
+
}], Oi(), t;
|
|
2509
2512
|
}
|
|
2510
|
-
function
|
|
2511
|
-
Z = Z.filter((t) => t.id !== e),
|
|
2513
|
+
function Ai(e) {
|
|
2514
|
+
Z = Z.filter((t) => t.id !== e), Oi();
|
|
2512
2515
|
}
|
|
2513
|
-
function
|
|
2516
|
+
function ji() {
|
|
2514
2517
|
let [e, t] = s(Z), i = o(!0);
|
|
2515
2518
|
return r(() => {
|
|
2516
2519
|
i.current = !0;
|
|
2517
2520
|
let e = (e) => {
|
|
2518
2521
|
i.current && t(e);
|
|
2519
2522
|
};
|
|
2520
|
-
return
|
|
2521
|
-
i.current = !1,
|
|
2523
|
+
return Ei.add(e), () => {
|
|
2524
|
+
i.current = !1, Ei.delete(e);
|
|
2522
2525
|
};
|
|
2523
2526
|
}, []), {
|
|
2524
2527
|
toasts: e,
|
|
2525
|
-
addToast: n((e) =>
|
|
2526
|
-
dismissToast: n((e) =>
|
|
2528
|
+
addToast: n((e) => ki(e), []),
|
|
2529
|
+
dismissToast: n((e) => Ai(e), [])
|
|
2527
2530
|
};
|
|
2528
2531
|
}
|
|
2529
2532
|
//#endregion
|
|
2530
2533
|
//#region src/components/Toast/Toast.tsx
|
|
2531
|
-
function
|
|
2534
|
+
function Mi({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }) {
|
|
2532
2535
|
let { id: i, message: a, variant: s, duration: c = 4e3, dismissible: d = !0 } = e, f = o(void 0);
|
|
2533
2536
|
return r(() => (f.current = setTimeout(() => {
|
|
2534
2537
|
t(i);
|
|
@@ -2539,16 +2542,16 @@ function ji({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }
|
|
|
2539
2542
|
c,
|
|
2540
2543
|
t
|
|
2541
2544
|
]), /* @__PURE__ */ u("div", {
|
|
2542
|
-
className:
|
|
2545
|
+
className: Ti.toast,
|
|
2543
2546
|
"data-variant": s,
|
|
2544
2547
|
role: s === "error" || s === "warning" ? "alert" : "status",
|
|
2545
2548
|
"aria-atomic": "true",
|
|
2546
2549
|
children: [/* @__PURE__ */ l("span", {
|
|
2547
|
-
className:
|
|
2550
|
+
className: Ti.toastMessage,
|
|
2548
2551
|
children: a
|
|
2549
2552
|
}), d && /* @__PURE__ */ l("button", {
|
|
2550
2553
|
type: "button",
|
|
2551
|
-
className:
|
|
2554
|
+
className: Ti.dismissButton,
|
|
2552
2555
|
onClick: () => t(i),
|
|
2553
2556
|
"aria-label": n,
|
|
2554
2557
|
children: /* @__PURE__ */ l("svg", {
|
|
@@ -2566,19 +2569,19 @@ function ji({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }
|
|
|
2566
2569
|
})]
|
|
2567
2570
|
});
|
|
2568
2571
|
}
|
|
2569
|
-
function
|
|
2570
|
-
let { toasts: n, dismissToast: r } =
|
|
2572
|
+
function Ni({ notificationsLabel: e = "Notificaciones", dismissLabel: t }) {
|
|
2573
|
+
let { toasts: n, dismissToast: r } = ji();
|
|
2571
2574
|
return typeof document > "u" ? null : k(/* @__PURE__ */ l("section", {
|
|
2572
|
-
className:
|
|
2575
|
+
className: Ti.container,
|
|
2573
2576
|
"aria-label": e,
|
|
2574
|
-
children: n.map((e) => /* @__PURE__ */ l(
|
|
2577
|
+
children: n.map((e) => /* @__PURE__ */ l(Mi, {
|
|
2575
2578
|
toast: e,
|
|
2576
2579
|
onDismiss: r,
|
|
2577
2580
|
dismissLabel: t
|
|
2578
2581
|
}, e.id))
|
|
2579
2582
|
}), document.body);
|
|
2580
2583
|
}
|
|
2581
|
-
var
|
|
2584
|
+
var Pi = {
|
|
2582
2585
|
wrapper: "_wrapper_1hq4w_2",
|
|
2583
2586
|
input: "_input_1hq4w_9",
|
|
2584
2587
|
track: "_track_1hq4w_29",
|
|
@@ -2587,10 +2590,10 @@ var Ni = {
|
|
|
2587
2590
|
};
|
|
2588
2591
|
//#endregion
|
|
2589
2592
|
//#region src/components/Toggle/Toggle.tsx
|
|
2590
|
-
function
|
|
2591
|
-
let o = r ?? `toggle-${e
|
|
2593
|
+
function Fi({ label: e, size: t = "medium", className: n, id: r, ref: i, ...a }) {
|
|
2594
|
+
let o = r ?? `toggle-${String(e ?? "").toLowerCase().replace(/\s+/g, "-")}`;
|
|
2592
2595
|
return /* @__PURE__ */ u("label", {
|
|
2593
|
-
className:
|
|
2596
|
+
className: Pi.wrapper,
|
|
2594
2597
|
"data-size": t,
|
|
2595
2598
|
htmlFor: o,
|
|
2596
2599
|
children: [
|
|
@@ -2600,55 +2603,55 @@ function Pi({ label: e, size: t = "medium", className: n, id: r, ref: i, ...a })
|
|
|
2600
2603
|
role: "switch",
|
|
2601
2604
|
"aria-checked": a.checked ?? !1,
|
|
2602
2605
|
id: o,
|
|
2603
|
-
className:
|
|
2606
|
+
className: Pi.input,
|
|
2604
2607
|
...a
|
|
2605
2608
|
}),
|
|
2606
2609
|
/* @__PURE__ */ l("span", {
|
|
2607
|
-
className:
|
|
2610
|
+
className: Pi.track,
|
|
2608
2611
|
"aria-hidden": "true",
|
|
2609
|
-
children: /* @__PURE__ */ l("span", { className:
|
|
2612
|
+
children: /* @__PURE__ */ l("span", { className: Pi.thumb })
|
|
2610
2613
|
}),
|
|
2611
2614
|
e && /* @__PURE__ */ l("span", {
|
|
2612
|
-
className:
|
|
2615
|
+
className: Pi.label,
|
|
2613
2616
|
children: e
|
|
2614
2617
|
})
|
|
2615
2618
|
]
|
|
2616
2619
|
});
|
|
2617
2620
|
}
|
|
2618
|
-
var
|
|
2621
|
+
var Ii = {
|
|
2619
2622
|
trigger: "_trigger_wx3tb_2",
|
|
2620
2623
|
tooltip: "_tooltip_wx3tb_7"
|
|
2621
|
-
},
|
|
2622
|
-
function
|
|
2624
|
+
}, Li = 8;
|
|
2625
|
+
function Ri(e, t) {
|
|
2623
2626
|
switch (t) {
|
|
2624
2627
|
case "top": return {
|
|
2625
|
-
top: e.top -
|
|
2628
|
+
top: e.top - Li,
|
|
2626
2629
|
left: e.left + e.width / 2
|
|
2627
2630
|
};
|
|
2628
2631
|
case "bottom": return {
|
|
2629
|
-
top: e.bottom +
|
|
2632
|
+
top: e.bottom + Li,
|
|
2630
2633
|
left: e.left + e.width / 2
|
|
2631
2634
|
};
|
|
2632
2635
|
case "left": return {
|
|
2633
2636
|
top: e.top + e.height / 2,
|
|
2634
|
-
left: e.left -
|
|
2637
|
+
left: e.left - Li
|
|
2635
2638
|
};
|
|
2636
2639
|
case "right": return {
|
|
2637
2640
|
top: e.top + e.height / 2,
|
|
2638
|
-
left: e.right +
|
|
2641
|
+
left: e.right + Li
|
|
2639
2642
|
};
|
|
2640
2643
|
}
|
|
2641
2644
|
}
|
|
2642
|
-
function
|
|
2645
|
+
function zi({ content: e, children: t, placement: r = "top" }) {
|
|
2643
2646
|
let [a, d] = s(!1), [f, p] = s({
|
|
2644
2647
|
top: 0,
|
|
2645
2648
|
left: 0
|
|
2646
2649
|
}), m = o(null), h = i(), g = n(() => {
|
|
2647
|
-
m.current && (p(
|
|
2650
|
+
m.current && (p(Ri(m.current.getBoundingClientRect(), r)), d(!0));
|
|
2648
2651
|
}, [r]), _ = n(() => d(!1), []);
|
|
2649
2652
|
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
|
|
2650
2653
|
ref: m,
|
|
2651
|
-
className:
|
|
2654
|
+
className: Ii.trigger,
|
|
2652
2655
|
"aria-describedby": a ? h : void 0,
|
|
2653
2656
|
onMouseEnter: g,
|
|
2654
2657
|
onMouseLeave: _,
|
|
@@ -2658,7 +2661,7 @@ function Ri({ content: e, children: t, placement: r = "top" }) {
|
|
|
2658
2661
|
}), a && typeof document < "u" && k(/* @__PURE__ */ l("div", {
|
|
2659
2662
|
id: h,
|
|
2660
2663
|
role: "tooltip",
|
|
2661
|
-
className:
|
|
2664
|
+
className: Ii.tooltip,
|
|
2662
2665
|
"data-placement": r,
|
|
2663
2666
|
style: {
|
|
2664
2667
|
top: f.top,
|
|
@@ -2685,26 +2688,26 @@ var Q = {
|
|
|
2685
2688
|
function $(e) {
|
|
2686
2689
|
return e ? "" : void 0;
|
|
2687
2690
|
}
|
|
2688
|
-
function
|
|
2691
|
+
function Bi(e) {
|
|
2689
2692
|
return [
|
|
2690
2693
|
"INPUT",
|
|
2691
2694
|
"TEXTAREA",
|
|
2692
2695
|
"SELECT"
|
|
2693
2696
|
].includes(e.tagName) || e.isContentEditable;
|
|
2694
2697
|
}
|
|
2695
|
-
function
|
|
2698
|
+
function Vi(e, t, n) {
|
|
2696
2699
|
return e === "ArrowRight" ? t && !n : e === "ArrowLeft" ? t && n : !1;
|
|
2697
2700
|
}
|
|
2698
|
-
function
|
|
2699
|
-
if (!(t.disabled ||
|
|
2701
|
+
function Hi(e, t, n, r, i, a, o) {
|
|
2702
|
+
if (!(t.disabled || Bi(e.target))) {
|
|
2700
2703
|
if (e.key === "Enter" || e.key === " ") {
|
|
2701
2704
|
e.preventDefault(), n ? a(t.id) : i && o(t.id);
|
|
2702
2705
|
return;
|
|
2703
2706
|
}
|
|
2704
|
-
|
|
2707
|
+
Vi(e.key, n, r) && (e.preventDefault(), a(t.id));
|
|
2705
2708
|
}
|
|
2706
2709
|
}
|
|
2707
|
-
function
|
|
2710
|
+
function Ui(e, t, n, r, i, a, o, s, c) {
|
|
2708
2711
|
return {
|
|
2709
2712
|
handleDragStart(n) {
|
|
2710
2713
|
if (!r.current) {
|
|
@@ -2748,7 +2751,7 @@ function Hi(e, t, n, r, i, a, o, s, c) {
|
|
|
2748
2751
|
}
|
|
2749
2752
|
};
|
|
2750
2753
|
}
|
|
2751
|
-
function
|
|
2754
|
+
function Wi({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labelSlot: a, metaSlot: o, suffixSlot: s, onToggleSelect: d }) {
|
|
2752
2755
|
return /* @__PURE__ */ u(c, { children: [
|
|
2753
2756
|
n && /* @__PURE__ */ l(Un, {
|
|
2754
2757
|
checked: r,
|
|
@@ -2774,8 +2777,8 @@ function Ui({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labe
|
|
|
2774
2777
|
})
|
|
2775
2778
|
] });
|
|
2776
2779
|
}
|
|
2777
|
-
function
|
|
2778
|
-
let O = o(!1), k = (t) =>
|
|
2780
|
+
function Gi({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggable: i = !1, selectable: a = !1, hasChildren: s = !1, indentSize: c = 24, parentId: d = null, bordered: f = !1, flatIndex: p = 0, striped: m = !1, onToggleExpand: h, onToggleSelect: g, onDragStart: _, onDragEnd: v, onDragOver: y, onDragLeave: b, onDrop: x, children: S, "data-testid": C, labelSlot: w, metaSlot: T, prefixSlot: E, suffixSlot: D }) {
|
|
2781
|
+
let O = o(!1), k = (t) => Hi(t, e, s, n, a, h, g), A = Ui(e, d, i, O, _, v, y, b, x);
|
|
2779
2782
|
return /* @__PURE__ */ u("div", {
|
|
2780
2783
|
className: Q.treeItem,
|
|
2781
2784
|
style: { "--tree-item-indent": `${t * c}px` },
|
|
@@ -2826,7 +2829,7 @@ function Wi({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
2826
2829
|
className: Q.indent,
|
|
2827
2830
|
"aria-hidden": "true"
|
|
2828
2831
|
}),
|
|
2829
|
-
/* @__PURE__ */ l(
|
|
2832
|
+
/* @__PURE__ */ l(Wi, {
|
|
2830
2833
|
item: e,
|
|
2831
2834
|
level: t,
|
|
2832
2835
|
selectable: a,
|
|
@@ -2862,31 +2865,31 @@ function Wi({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
2862
2865
|
})]
|
|
2863
2866
|
});
|
|
2864
2867
|
}
|
|
2865
|
-
var
|
|
2868
|
+
var Ki = { treeList: "_treeList_trryv_2" };
|
|
2866
2869
|
//#endregion
|
|
2867
2870
|
//#region src/components/TreeList/TreeList.tsx
|
|
2868
|
-
function
|
|
2871
|
+
function qi(e, t) {
|
|
2869
2872
|
for (let n of e) {
|
|
2870
2873
|
if (n.id === t) return n;
|
|
2871
2874
|
if (n.children) {
|
|
2872
|
-
let e =
|
|
2875
|
+
let e = qi(n.children, t);
|
|
2873
2876
|
if (e) return e;
|
|
2874
2877
|
}
|
|
2875
2878
|
}
|
|
2876
2879
|
return null;
|
|
2877
2880
|
}
|
|
2878
|
-
function
|
|
2881
|
+
function Ji(e, t) {
|
|
2879
2882
|
let n = /* @__PURE__ */ new Map(), r = 0;
|
|
2880
2883
|
function i(e) {
|
|
2881
2884
|
for (let a of e) n.set(a.id, r++), a.children?.length && t.includes(a.id) && i(a.children);
|
|
2882
2885
|
}
|
|
2883
2886
|
return i(e), n;
|
|
2884
2887
|
}
|
|
2885
|
-
function
|
|
2888
|
+
function Yi(e) {
|
|
2886
2889
|
let { items: t, parentId: n, level: r, expandedIds: i, selectedIds: a, flatIndexMap: o } = e;
|
|
2887
2890
|
return t.map((t) => {
|
|
2888
2891
|
let s = !!t.children?.length, c = i.includes(t.id);
|
|
2889
|
-
return /* @__PURE__ */ l(
|
|
2892
|
+
return /* @__PURE__ */ l(Gi, {
|
|
2890
2893
|
item: t,
|
|
2891
2894
|
level: r,
|
|
2892
2895
|
parentId: n,
|
|
@@ -2909,7 +2912,7 @@ function Ji(e) {
|
|
|
2909
2912
|
metaSlot: e.metaSlot,
|
|
2910
2913
|
prefixSlot: e.prefixSlot,
|
|
2911
2914
|
suffixSlot: e.suffixSlot,
|
|
2912
|
-
children: s && c && t.children && /* @__PURE__ */ l(
|
|
2915
|
+
children: s && c && t.children && /* @__PURE__ */ l(Yi, {
|
|
2913
2916
|
...e,
|
|
2914
2917
|
items: t.children,
|
|
2915
2918
|
parentId: t.id,
|
|
@@ -2918,14 +2921,14 @@ function Ji(e) {
|
|
|
2918
2921
|
}, t.id);
|
|
2919
2922
|
});
|
|
2920
2923
|
}
|
|
2921
|
-
function
|
|
2924
|
+
function Xi({ items: e = [], draggable: t = !1, expandedIds: r, selectedIds: i, selectable: c = !1, indentSize: u = 24, bordered: d = !1, striped: f = !1, onExpandChange: p, onSelectChange: m, onReorder: h, labelSlot: g, metaSlot: _, prefixSlot: v, suffixSlot: y, "data-testid": b }) {
|
|
2922
2925
|
let [x, S] = s([]), [C, w] = s([]), T = o(null), E = r ?? x, D = i ?? C, O = {
|
|
2923
2926
|
items: e,
|
|
2924
2927
|
parentId: null,
|
|
2925
2928
|
level: 0,
|
|
2926
2929
|
expandedIds: E,
|
|
2927
2930
|
selectedIds: D,
|
|
2928
|
-
flatIndexMap: a(() =>
|
|
2931
|
+
flatIndexMap: a(() => Ji(e, E), [e, E]),
|
|
2929
2932
|
draggable: t,
|
|
2930
2933
|
selectable: c,
|
|
2931
2934
|
bordered: d,
|
|
@@ -2965,7 +2968,7 @@ function Yi({ items: e = [], draggable: t = !1, expandedIds: r, selectedIds: i,
|
|
|
2965
2968
|
if (!n || n.parentId !== t.parentId) return;
|
|
2966
2969
|
let r = n.itemId, i = t.item.id;
|
|
2967
2970
|
if (r === i) return;
|
|
2968
|
-
let a = t.parentId === null ? e :
|
|
2971
|
+
let a = t.parentId === null ? e : qi(e, t.parentId)?.children;
|
|
2969
2972
|
if (!a) return;
|
|
2970
2973
|
let o = a.findIndex((e) => e.id === r), s = a.findIndex((e) => e.id === i);
|
|
2971
2974
|
o === -1 || s === -1 || h?.({
|
|
@@ -2982,14 +2985,14 @@ function Yi({ items: e = [], draggable: t = !1, expandedIds: r, selectedIds: i,
|
|
|
2982
2985
|
suffixSlot: y
|
|
2983
2986
|
};
|
|
2984
2987
|
return /* @__PURE__ */ l("div", {
|
|
2985
|
-
className:
|
|
2988
|
+
className: Ki.treeList,
|
|
2986
2989
|
role: "tree",
|
|
2987
2990
|
"data-draggable": t ? "" : void 0,
|
|
2988
2991
|
"data-testid": b,
|
|
2989
|
-
children: /* @__PURE__ */ l(
|
|
2992
|
+
children: /* @__PURE__ */ l(Yi, { ...O })
|
|
2990
2993
|
});
|
|
2991
2994
|
}
|
|
2992
|
-
var
|
|
2995
|
+
var Zi = {
|
|
2993
2996
|
header: "_header_u329l_2",
|
|
2994
2997
|
titleSection: "_titleSection_u329l_12",
|
|
2995
2998
|
title: "_title_u329l_12",
|
|
@@ -2997,22 +3000,22 @@ var Xi = {
|
|
|
2997
3000
|
};
|
|
2998
3001
|
//#endregion
|
|
2999
3002
|
//#region src/layouts/AdminPageHeader/AdminPageHeader.tsx
|
|
3000
|
-
function
|
|
3003
|
+
function Qi({ title: e, actions: t }) {
|
|
3001
3004
|
return /* @__PURE__ */ u("header", {
|
|
3002
|
-
className:
|
|
3005
|
+
className: Zi.header,
|
|
3003
3006
|
children: [/* @__PURE__ */ l("div", {
|
|
3004
|
-
className:
|
|
3007
|
+
className: Zi.titleSection,
|
|
3005
3008
|
children: /* @__PURE__ */ l("span", {
|
|
3006
|
-
className:
|
|
3009
|
+
className: Zi.title,
|
|
3007
3010
|
children: e
|
|
3008
3011
|
})
|
|
3009
3012
|
}), t && /* @__PURE__ */ l("div", {
|
|
3010
|
-
className:
|
|
3013
|
+
className: Zi.actions,
|
|
3011
3014
|
children: t
|
|
3012
3015
|
})]
|
|
3013
3016
|
});
|
|
3014
3017
|
}
|
|
3015
|
-
var
|
|
3018
|
+
var $i = {
|
|
3016
3019
|
shell: "_shell_1c2iw_2",
|
|
3017
3020
|
body: "_body_1c2iw_10",
|
|
3018
3021
|
sidebarSlot: "_sidebarSlot_1c2iw_16",
|
|
@@ -3022,13 +3025,13 @@ var Qi = {
|
|
|
3022
3025
|
};
|
|
3023
3026
|
//#endregion
|
|
3024
3027
|
//#region src/layouts/AppShell/AppShell.tsx
|
|
3025
|
-
function
|
|
3026
|
-
return c ? /* @__PURE__ */ l(
|
|
3028
|
+
function ea({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle: r, sidebar: i, children: a, tabBar: o, headerRight: s, isPinLocked: c = !1, pinLockContent: d, isLoading: f = !1 }) {
|
|
3029
|
+
return c ? /* @__PURE__ */ l(ai, {
|
|
3027
3030
|
isLocked: !0,
|
|
3028
3031
|
children: d
|
|
3029
3032
|
}) : /* @__PURE__ */ u("div", {
|
|
3030
|
-
className:
|
|
3031
|
-
children: [/* @__PURE__ */ l(
|
|
3033
|
+
className: $i.shell,
|
|
3034
|
+
children: [/* @__PURE__ */ l(Ur, {
|
|
3032
3035
|
restaurantName: e,
|
|
3033
3036
|
onMenuToggle: t,
|
|
3034
3037
|
onLogoClick: n,
|
|
@@ -3036,70 +3039,70 @@ function $i({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
3036
3039
|
isLoading: f,
|
|
3037
3040
|
rightSlot: s
|
|
3038
3041
|
}), /* @__PURE__ */ u("div", {
|
|
3039
|
-
className:
|
|
3042
|
+
className: $i.body,
|
|
3040
3043
|
children: [/* @__PURE__ */ l("div", {
|
|
3041
|
-
className:
|
|
3044
|
+
className: $i.sidebarSlot,
|
|
3042
3045
|
children: i
|
|
3043
3046
|
}), /* @__PURE__ */ u("div", {
|
|
3044
|
-
className:
|
|
3047
|
+
className: $i.contentArea,
|
|
3045
3048
|
children: [/* @__PURE__ */ l("main", {
|
|
3046
|
-
className:
|
|
3049
|
+
className: $i.main,
|
|
3047
3050
|
children: a
|
|
3048
3051
|
}), o && /* @__PURE__ */ l("div", {
|
|
3049
|
-
className:
|
|
3052
|
+
className: $i.tabBarSlot,
|
|
3050
3053
|
children: o
|
|
3051
3054
|
})]
|
|
3052
3055
|
})]
|
|
3053
3056
|
})]
|
|
3054
3057
|
});
|
|
3055
3058
|
}
|
|
3056
|
-
var
|
|
3059
|
+
var ta = { divider: "_divider_1nit0_1" };
|
|
3057
3060
|
//#endregion
|
|
3058
3061
|
//#region src/layouts/Divider/Divider.tsx
|
|
3059
|
-
function
|
|
3062
|
+
function na({ orientation: e = "horizontal", spacing: t = "md", className: n }) {
|
|
3060
3063
|
return /* @__PURE__ */ l("hr", {
|
|
3061
|
-
className: [
|
|
3064
|
+
className: [ta.divider, n].filter(Boolean).join(" "),
|
|
3062
3065
|
"data-orientation": e,
|
|
3063
3066
|
"data-spacing": t,
|
|
3064
3067
|
"aria-orientation": e
|
|
3065
3068
|
});
|
|
3066
3069
|
}
|
|
3067
|
-
var
|
|
3070
|
+
var ra = { grid: "_grid_w5ah8_2" }, ia = {
|
|
3068
3071
|
xs: "var(--ds-space-1)",
|
|
3069
3072
|
sm: "var(--ds-space-2)",
|
|
3070
3073
|
md: "var(--ds-space-3)",
|
|
3071
3074
|
lg: "var(--ds-space-4)",
|
|
3072
3075
|
xl: "var(--ds-space-6)"
|
|
3073
3076
|
};
|
|
3074
|
-
function
|
|
3077
|
+
function aa({ columns: e = 1, gap: t = "md", children: n, className: r, style: i }) {
|
|
3075
3078
|
let a = {
|
|
3076
3079
|
"--grid-columns": typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e,
|
|
3077
|
-
"--grid-gap":
|
|
3080
|
+
"--grid-gap": ia[t],
|
|
3078
3081
|
...i
|
|
3079
3082
|
};
|
|
3080
3083
|
return /* @__PURE__ */ l("div", {
|
|
3081
|
-
className: [
|
|
3084
|
+
className: [ra.grid, r].filter(Boolean).join(" "),
|
|
3082
3085
|
style: a,
|
|
3083
3086
|
children: n
|
|
3084
3087
|
});
|
|
3085
3088
|
}
|
|
3086
|
-
var
|
|
3089
|
+
var oa = {
|
|
3087
3090
|
page: "_page_s8gdl_2",
|
|
3088
3091
|
card: "_card_s8gdl_45",
|
|
3089
3092
|
cardEntrance: "_cardEntrance_s8gdl_1"
|
|
3090
3093
|
};
|
|
3091
3094
|
//#endregion
|
|
3092
3095
|
//#region src/layouts/LoginPageLayout/LoginPageLayout.tsx
|
|
3093
|
-
function
|
|
3096
|
+
function sa({ children: e }) {
|
|
3094
3097
|
return /* @__PURE__ */ l("main", {
|
|
3095
|
-
className:
|
|
3098
|
+
className: oa.page,
|
|
3096
3099
|
children: /* @__PURE__ */ l("div", {
|
|
3097
|
-
className:
|
|
3100
|
+
className: oa.card,
|
|
3098
3101
|
children: e
|
|
3099
3102
|
})
|
|
3100
3103
|
});
|
|
3101
3104
|
}
|
|
3102
|
-
var
|
|
3105
|
+
var ca = {
|
|
3103
3106
|
root: "_root_11bhp_2",
|
|
3104
3107
|
sidebar: "_sidebar_11bhp_20",
|
|
3105
3108
|
main: "_main_11bhp_37",
|
|
@@ -3108,21 +3111,21 @@ var sa = {
|
|
|
3108
3111
|
};
|
|
3109
3112
|
//#endregion
|
|
3110
3113
|
//#region src/layouts/PageLayout/PageLayout.tsx
|
|
3111
|
-
function
|
|
3114
|
+
function la({ sidebar: e, header: t, children: n, collapsed: r = !1, className: i }) {
|
|
3112
3115
|
return /* @__PURE__ */ u("div", {
|
|
3113
|
-
className: [
|
|
3116
|
+
className: [ca.root, i].filter(Boolean).join(" "),
|
|
3114
3117
|
"data-sidebar-collapsed": r ? "" : void 0,
|
|
3115
3118
|
children: [e && /* @__PURE__ */ l("aside", {
|
|
3116
|
-
className:
|
|
3119
|
+
className: ca.sidebar,
|
|
3117
3120
|
"aria-label": "Navegación lateral",
|
|
3118
3121
|
children: e
|
|
3119
3122
|
}), /* @__PURE__ */ u("div", {
|
|
3120
|
-
className:
|
|
3123
|
+
className: ca.main,
|
|
3121
3124
|
children: [t && /* @__PURE__ */ l("header", {
|
|
3122
|
-
className:
|
|
3125
|
+
className: ca.header,
|
|
3123
3126
|
children: t
|
|
3124
3127
|
}), /* @__PURE__ */ l("main", {
|
|
3125
|
-
className:
|
|
3128
|
+
className: ca.content,
|
|
3126
3129
|
children: n
|
|
3127
3130
|
})]
|
|
3128
3131
|
})]
|
|
@@ -3130,36 +3133,36 @@ function ca({ sidebar: e, header: t, children: n, collapsed: r = !1, className:
|
|
|
3130
3133
|
}
|
|
3131
3134
|
//#endregion
|
|
3132
3135
|
//#region src/layouts/Stack/Stack.tsx
|
|
3133
|
-
var
|
|
3136
|
+
var ua = {
|
|
3134
3137
|
xs: "var(--ds-space-1)",
|
|
3135
3138
|
sm: "var(--ds-space-2)",
|
|
3136
3139
|
md: "var(--ds-space-3)",
|
|
3137
3140
|
lg: "var(--ds-space-4)",
|
|
3138
3141
|
xl: "var(--ds-space-6)",
|
|
3139
3142
|
"2xl": "var(--ds-space-8)"
|
|
3140
|
-
},
|
|
3143
|
+
}, da = {
|
|
3141
3144
|
start: "flex-start",
|
|
3142
3145
|
center: "center",
|
|
3143
3146
|
end: "flex-end",
|
|
3144
3147
|
between: "space-between",
|
|
3145
3148
|
around: "space-around",
|
|
3146
3149
|
evenly: "space-evenly"
|
|
3147
|
-
},
|
|
3150
|
+
}, fa = {
|
|
3148
3151
|
start: "flex-start",
|
|
3149
3152
|
center: "center",
|
|
3150
3153
|
end: "flex-end",
|
|
3151
3154
|
stretch: "stretch",
|
|
3152
3155
|
baseline: "baseline"
|
|
3153
3156
|
};
|
|
3154
|
-
function
|
|
3157
|
+
function pa({ as: e, direction: t = "vertical", gap: n = "md", align: r, justify: i, wrap: a = !1, children: o, className: s, style: c, ...u }) {
|
|
3155
3158
|
return /* @__PURE__ */ l(e ?? "div", {
|
|
3156
3159
|
className: s,
|
|
3157
3160
|
style: {
|
|
3158
3161
|
display: "flex",
|
|
3159
3162
|
flexDirection: t === "vertical" ? "column" : "row",
|
|
3160
|
-
gap:
|
|
3161
|
-
alignItems: r ?
|
|
3162
|
-
justifyContent: i ?
|
|
3163
|
+
gap: ua[n],
|
|
3164
|
+
alignItems: r ? fa[r] : void 0,
|
|
3165
|
+
justifyContent: i ? da[i] : void 0,
|
|
3163
3166
|
flexWrap: a ? "wrap" : void 0,
|
|
3164
3167
|
...c
|
|
3165
3168
|
},
|
|
@@ -3169,10 +3172,10 @@ function fa({ as: e, direction: t = "vertical", gap: n = "md", align: r, justify
|
|
|
3169
3172
|
}
|
|
3170
3173
|
//#endregion
|
|
3171
3174
|
//#region src/utils/portal.ts
|
|
3172
|
-
function
|
|
3175
|
+
function ma(e, t) {
|
|
3173
3176
|
return k(e, t ?? document.body);
|
|
3174
3177
|
}
|
|
3175
3178
|
//#endregion
|
|
3176
|
-
export { te as Accordion,
|
|
3179
|
+
export { te as Accordion, Qi as AdminPageHeader, ea as AppShell, jn as AppleSignInButton, Bn as AreaChart, Nn as BackgroundWrapper, Fn as Badge, zn as BarChart, N as Button, Ln as Card, Un as Checkbox, Gn as DataTable, qn as DatePicker, Jn as DateRangePicker, Zn as Dialog, na as Divider, mr as DropZone, $n as DropdownButton, tr as DropdownMenu, hr as DsProvider, _r as EmptyState, vr as ErrorBoundary, br as FormField, Sr as GoogleSignInButton, aa as Grid, Tr as GroupedButtons, Dr as Header, F as Icon, cr as ImagePreview, Vn as KpiCard, Or as LanguageSelector, Rn as LineChart, sa as LoginPageLayout, Br as LogoToteat, Hr as Multiselect, Ur as NavBar, Gr as Overlay, Yr as OverlayMessage, la as PageLayout, ri as PageLoadingOverlay, ai as PinLockOverlay, si as Radio, ci as Select, ui as Sidebar, mi as SidebarNavItem, hi as SidebarNavSection, ir as Skeleton, ne as Spinner, pa as Stack, _i as TabBar, yi as Tabs, Ci as TextInput, xi as Textarea, wi as ThemeGate, Ni as ToastContainer, Fi as Toggle, zi as Tooltip, Gi as TreeItem, Xi as TreeList, I as cn, ma as portal, pi as sidebarNavItemActiveClass, fi as sidebarNavItemClass, Xn as useFocusTrap, ji as useToast };
|
|
3177
3180
|
|
|
3178
3181
|
//# sourceMappingURL=index.es.js.map
|