@medixdeck/ui 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +299 -297
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var sa = (e, t, n, i, o, s, r, a) => {
|
|
|
7
7
|
let l = document.documentElement, d = ["light", "dark"];
|
|
8
8
|
function c(p) {
|
|
9
9
|
(Array.isArray(e) ? e : [e]).forEach((g) => {
|
|
10
|
-
let y = g === "class", b = y && s ? o.map((
|
|
10
|
+
let y = g === "class", b = y && s ? o.map((v) => s[v] || v) : o;
|
|
11
11
|
y ? (l.classList.remove(...b), l.classList.add(s && s[p] ? s[p] : p)) : l.setAttribute(g, p);
|
|
12
12
|
}), u(p);
|
|
13
13
|
}
|
|
@@ -24,41 +24,41 @@ var sa = (e, t, n, i, o, s, r, a) => {
|
|
|
24
24
|
} catch {
|
|
25
25
|
}
|
|
26
26
|
}, oi = ["light", "dark"], Lo = "(prefers-color-scheme: dark)", aa = typeof window > "u", Io = O.createContext(void 0), la = (e) => O.useContext(Io) ? O.createElement(O.Fragment, null, e.children) : O.createElement(da, { ...e }), ca = ["light", "dark"], da = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: n = !0, enableColorScheme: i = !0, storageKey: o = "theme", themes: s = ca, defaultTheme: r = n ? "system" : "light", attribute: a = "data-theme", value: l, children: d, nonce: c, scriptProps: u }) => {
|
|
27
|
-
let [h, p] = O.useState(() => fa(o, r)), [g, y] = O.useState(() => h === "system" ? Vt() : h), b = l ? Object.values(l) : s,
|
|
28
|
-
let
|
|
29
|
-
if (!
|
|
30
|
-
C === "system" && n && (
|
|
31
|
-
let V = l ? l[
|
|
32
|
-
M === "class" ? (
|
|
27
|
+
let [h, p] = O.useState(() => fa(o, r)), [g, y] = O.useState(() => h === "system" ? Vt() : h), b = l ? Object.values(l) : s, v = O.useCallback((C) => {
|
|
28
|
+
let T = C;
|
|
29
|
+
if (!T) return;
|
|
30
|
+
C === "system" && n && (T = Vt());
|
|
31
|
+
let V = l ? l[T] : T, E = t ? ha(c) : null, k = document.documentElement, A = (M) => {
|
|
32
|
+
M === "class" ? (k.classList.remove(...b), V && k.classList.add(V)) : M.startsWith("data-") && (V ? k.setAttribute(M, V) : k.removeAttribute(M));
|
|
33
33
|
};
|
|
34
|
-
if (Array.isArray(a) ? a.forEach(
|
|
35
|
-
let M = oi.includes(r) ? r : null, R = oi.includes(
|
|
36
|
-
|
|
34
|
+
if (Array.isArray(a) ? a.forEach(A) : A(a), i) {
|
|
35
|
+
let M = oi.includes(r) ? r : null, R = oi.includes(T) ? T : M;
|
|
36
|
+
k.style.colorScheme = R;
|
|
37
37
|
}
|
|
38
38
|
E == null || E();
|
|
39
|
-
}, [c]),
|
|
40
|
-
let
|
|
41
|
-
p(
|
|
39
|
+
}, [c]), x = O.useCallback((C) => {
|
|
40
|
+
let T = typeof C == "function" ? C(h) : C;
|
|
41
|
+
p(T);
|
|
42
42
|
try {
|
|
43
|
-
localStorage.setItem(o,
|
|
43
|
+
localStorage.setItem(o, T);
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
46
46
|
}, [h]), w = O.useCallback((C) => {
|
|
47
|
-
let
|
|
48
|
-
y(
|
|
47
|
+
let T = Vt(C);
|
|
48
|
+
y(T), h === "system" && n && !e && v("system");
|
|
49
49
|
}, [h, e]);
|
|
50
50
|
O.useEffect(() => {
|
|
51
51
|
let C = window.matchMedia(Lo);
|
|
52
52
|
return C.addListener(w), w(C), () => C.removeListener(w);
|
|
53
53
|
}, [w]), O.useEffect(() => {
|
|
54
|
-
let C = (
|
|
55
|
-
|
|
54
|
+
let C = (T) => {
|
|
55
|
+
T.key === o && (T.newValue ? p(T.newValue) : x(r));
|
|
56
56
|
};
|
|
57
57
|
return window.addEventListener("storage", C), () => window.removeEventListener("storage", C);
|
|
58
|
-
}, [
|
|
59
|
-
|
|
58
|
+
}, [x]), O.useEffect(() => {
|
|
59
|
+
v(e ?? h);
|
|
60
60
|
}, [e, h]);
|
|
61
|
-
let F = O.useMemo(() => ({ theme: h, setTheme:
|
|
61
|
+
let F = O.useMemo(() => ({ theme: h, setTheme: x, forcedTheme: e, resolvedTheme: h === "system" ? g : h, themes: n ? [...s, "system"] : s, systemTheme: n ? g : void 0 }), [h, x, e, g, n, s]);
|
|
62
62
|
return O.createElement(Io.Provider, { value: F }, O.createElement(ua, { forcedTheme: e, storageKey: o, attribute: a, enableSystem: n, enableColorScheme: i, defaultTheme: r, value: l, themes: s, nonce: c, scriptProps: u }), d);
|
|
63
63
|
}, ua = O.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: i, enableColorScheme: o, defaultTheme: s, value: r, themes: a, nonce: l, scriptProps: d }) => {
|
|
64
64
|
let c = JSON.stringify([n, t, s, e, a, r, i, o]).slice(1, -1);
|
|
@@ -737,14 +737,14 @@ const ai = {
|
|
|
737
737
|
};
|
|
738
738
|
break;
|
|
739
739
|
}
|
|
740
|
-
const [y, b] = P.useState(!1), [
|
|
740
|
+
const [y, b] = P.useState(!1), [v, x] = P.useState(!1);
|
|
741
741
|
let w = {};
|
|
742
|
-
if ((y ||
|
|
742
|
+
if ((y || v) && !r && !i)
|
|
743
743
|
switch (e) {
|
|
744
744
|
case "solid":
|
|
745
745
|
w = {
|
|
746
|
-
background:
|
|
747
|
-
boxShadow:
|
|
746
|
+
background: v ? u.solidActive : u.solidHover,
|
|
747
|
+
boxShadow: v ? "none" : "0 4px 14px rgba(0,0,0,0.18)"
|
|
748
748
|
};
|
|
749
749
|
break;
|
|
750
750
|
case "outline":
|
|
@@ -784,10 +784,10 @@ const ai = {
|
|
|
784
784
|
style: F,
|
|
785
785
|
onMouseEnter: () => b(!0),
|
|
786
786
|
onMouseLeave: () => {
|
|
787
|
-
b(!1),
|
|
787
|
+
b(!1), x(!1);
|
|
788
788
|
},
|
|
789
|
-
onMouseDown: () =>
|
|
790
|
-
onMouseUp: () =>
|
|
789
|
+
onMouseDown: () => x(!0),
|
|
790
|
+
onMouseUp: () => x(!1),
|
|
791
791
|
onFocus: (C) => {
|
|
792
792
|
C.currentTarget.style.boxShadow = `0 0 0 2px #FFFFFF, 0 0 0 4px ${u.solid}`;
|
|
793
793
|
},
|
|
@@ -1541,14 +1541,14 @@ const Oo = {
|
|
|
1541
1541
|
value: d,
|
|
1542
1542
|
id: c
|
|
1543
1543
|
}, u) => {
|
|
1544
|
-
const h = Oo[e], p = c ?? P.useId(), [g, y] = P.useState(n), [b,
|
|
1544
|
+
const h = Oo[e], p = c ?? P.useId(), [g, y] = P.useState(n), [b, v] = P.useState(!1), x = t !== void 0 ? t : g, w = (C) => {
|
|
1545
1545
|
t === void 0 && y(C.target.checked), i == null || i(C.target.checked);
|
|
1546
1546
|
}, F = {
|
|
1547
1547
|
width: 18,
|
|
1548
1548
|
height: 18,
|
|
1549
1549
|
borderRadius: 4,
|
|
1550
|
-
border: `2px solid ${
|
|
1551
|
-
background:
|
|
1550
|
+
border: `2px solid ${x || s ? h.solid : "var(--medix-form-border, #CBD5E1)"}`,
|
|
1551
|
+
background: x || s ? h.solid : "transparent",
|
|
1552
1552
|
display: "inline-flex",
|
|
1553
1553
|
alignItems: "center",
|
|
1554
1554
|
justifyContent: "center",
|
|
@@ -1579,11 +1579,11 @@ const Oo = {
|
|
|
1579
1579
|
type: "checkbox",
|
|
1580
1580
|
name: l,
|
|
1581
1581
|
value: d,
|
|
1582
|
-
checked:
|
|
1582
|
+
checked: x,
|
|
1583
1583
|
disabled: o,
|
|
1584
1584
|
onChange: w,
|
|
1585
|
-
onFocus: () =>
|
|
1586
|
-
onBlur: () =>
|
|
1585
|
+
onFocus: () => v(!0),
|
|
1586
|
+
onBlur: () => v(!1),
|
|
1587
1587
|
style: {
|
|
1588
1588
|
position: "absolute",
|
|
1589
1589
|
width: 1,
|
|
@@ -1598,7 +1598,7 @@ const Oo = {
|
|
|
1598
1598
|
/* @__PURE__ */ f("span", { style: F, "aria-hidden": "true", children: s ? (
|
|
1599
1599
|
// Dash (−)
|
|
1600
1600
|
/* @__PURE__ */ f("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "none", children: /* @__PURE__ */ f("rect", { width: "10", height: "2", rx: "1", fill: "#fff" }) })
|
|
1601
|
-
) :
|
|
1601
|
+
) : x ? (
|
|
1602
1602
|
// Tick (✓)
|
|
1603
1603
|
/* @__PURE__ */ f("svg", { width: "11", height: "9", viewBox: "0 0 11 9", fill: "none", children: /* @__PURE__ */ f(
|
|
1604
1604
|
"path",
|
|
@@ -1764,8 +1764,8 @@ const Ka = {
|
|
|
1764
1764
|
name: l,
|
|
1765
1765
|
id: d
|
|
1766
1766
|
}, c) => {
|
|
1767
|
-
const u = Ka[e], h = Ga[t], p = d ?? P.useId(), [g, y] = P.useState(i), [b,
|
|
1768
|
-
n === void 0 && y(
|
|
1767
|
+
const u = Ka[e], h = Ga[t], p = d ?? P.useId(), [g, y] = P.useState(i), [b, v] = P.useState(!1), x = n !== void 0 ? n : g, w = (T) => {
|
|
1768
|
+
n === void 0 && y(T.target.checked), o == null || o(T.target.checked);
|
|
1769
1769
|
}, F = {
|
|
1770
1770
|
position: "relative",
|
|
1771
1771
|
display: "inline-flex",
|
|
@@ -1773,7 +1773,7 @@ const Ka = {
|
|
|
1773
1773
|
width: h.width,
|
|
1774
1774
|
height: h.height,
|
|
1775
1775
|
borderRadius: h.height,
|
|
1776
|
-
background:
|
|
1776
|
+
background: x ? u.track : "var(--medix-form-border, #CBD5E1)",
|
|
1777
1777
|
transition: "background 0.2s ease, box-shadow 0.2s ease",
|
|
1778
1778
|
boxShadow: b ? `0 0 0 3px ${u.ring}` : "none",
|
|
1779
1779
|
cursor: s ? "not-allowed" : "pointer",
|
|
@@ -1786,7 +1786,7 @@ const Ka = {
|
|
|
1786
1786
|
background: "#fff",
|
|
1787
1787
|
boxShadow: "0 1px 4px rgba(0,0,0,0.22)",
|
|
1788
1788
|
top: h.thumbOffset,
|
|
1789
|
-
left:
|
|
1789
|
+
left: x ? h.width - h.thumbSize - h.thumbOffset : h.thumbOffset,
|
|
1790
1790
|
transition: "left 0.18s ease"
|
|
1791
1791
|
};
|
|
1792
1792
|
return /* @__PURE__ */ S(m, { display: "flex", alignItems: "flex-start", gap: "3", opacity: s ? 0.55 : 1, children: [
|
|
@@ -1804,11 +1804,11 @@ const Ka = {
|
|
|
1804
1804
|
type: "checkbox",
|
|
1805
1805
|
role: "switch",
|
|
1806
1806
|
name: l,
|
|
1807
|
-
checked:
|
|
1807
|
+
checked: x,
|
|
1808
1808
|
disabled: s,
|
|
1809
1809
|
onChange: w,
|
|
1810
|
-
onFocus: () =>
|
|
1811
|
-
onBlur: () =>
|
|
1810
|
+
onFocus: () => v(!0),
|
|
1811
|
+
onBlur: () => v(!1),
|
|
1812
1812
|
style: {
|
|
1813
1813
|
position: "absolute",
|
|
1814
1814
|
width: 1,
|
|
@@ -1914,52 +1914,52 @@ function Xa({
|
|
|
1914
1914
|
helperText: l,
|
|
1915
1915
|
errorMessage: d
|
|
1916
1916
|
}) {
|
|
1917
|
-
const c = t.split("").slice(0, e), u = P.useRef([]), h = o ? "#DC2626" : "var(--medix-form-border)", p = o ? "#DC2626" : "#0685FF", g = (
|
|
1917
|
+
const c = t.split("").slice(0, e), u = P.useRef([]), h = o ? "#DC2626" : "var(--medix-form-border)", p = o ? "#DC2626" : "#0685FF", g = (v, x) => {
|
|
1918
1918
|
var w, F, C;
|
|
1919
|
-
if (
|
|
1920
|
-
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1923
|
-
} else
|
|
1924
|
-
}, y = (
|
|
1925
|
-
var
|
|
1926
|
-
const w =
|
|
1919
|
+
if (v.key === "Backspace") {
|
|
1920
|
+
v.preventDefault();
|
|
1921
|
+
const T = [...c];
|
|
1922
|
+
T[x] ? (T[x] = "", n == null || n(T.join(""))) : x > 0 && ((w = u.current[x - 1]) == null || w.focus(), T[x - 1] = "", n == null || n(T.join("")));
|
|
1923
|
+
} else v.key === "ArrowLeft" && x > 0 ? (F = u.current[x - 1]) == null || F.focus() : v.key === "ArrowRight" && x < e - 1 && ((C = u.current[x + 1]) == null || C.focus());
|
|
1924
|
+
}, y = (v, x) => {
|
|
1925
|
+
var T, V;
|
|
1926
|
+
const w = v.target.value.replace(/\D/g, "");
|
|
1927
1927
|
if (!w) return;
|
|
1928
1928
|
if (w.length > 1) {
|
|
1929
|
-
const E = w.split("").slice(0, e),
|
|
1929
|
+
const E = w.split("").slice(0, e), k = [...Array(e).fill("")];
|
|
1930
1930
|
E.forEach((R, Y) => {
|
|
1931
|
-
|
|
1931
|
+
k[Y] = R;
|
|
1932
1932
|
});
|
|
1933
|
-
const
|
|
1934
|
-
n == null || n(
|
|
1933
|
+
const A = k.join("");
|
|
1934
|
+
n == null || n(A);
|
|
1935
1935
|
const M = Math.min(E.length, e - 1);
|
|
1936
|
-
(
|
|
1936
|
+
(T = u.current[M]) == null || T.focus(), A.length === e && (i == null || i(A));
|
|
1937
1937
|
return;
|
|
1938
1938
|
}
|
|
1939
1939
|
const F = [...c];
|
|
1940
1940
|
for (; F.length < e; ) F.push("");
|
|
1941
|
-
F[
|
|
1941
|
+
F[x] = w;
|
|
1942
1942
|
const C = F.join("");
|
|
1943
|
-
n == null || n(C),
|
|
1944
|
-
}, b = (
|
|
1943
|
+
n == null || n(C), x < e - 1 && ((V = u.current[x + 1]) == null || V.focus()), C.replace(/\s/g, "").length === e && (i == null || i(C));
|
|
1944
|
+
}, b = (v) => v.target.select();
|
|
1945
1945
|
return /* @__PURE__ */ S(m, { w: "fit-content", children: [
|
|
1946
1946
|
a && /* @__PURE__ */ f(z, { mb: "2", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: a }),
|
|
1947
|
-
/* @__PURE__ */ f(m, { display: "flex", gap: "2", alignItems: "center", children: Array.from({ length: e }).map((
|
|
1947
|
+
/* @__PURE__ */ f(m, { display: "flex", gap: "2", alignItems: "center", children: Array.from({ length: e }).map((v, x) => /* @__PURE__ */ f(
|
|
1948
1948
|
"input",
|
|
1949
1949
|
{
|
|
1950
1950
|
ref: (w) => {
|
|
1951
|
-
u.current[
|
|
1951
|
+
u.current[x] = w;
|
|
1952
1952
|
},
|
|
1953
1953
|
type: r ? "password" : "text",
|
|
1954
1954
|
inputMode: "numeric",
|
|
1955
1955
|
pattern: "\\d*",
|
|
1956
1956
|
maxLength: 1,
|
|
1957
|
-
value: c[
|
|
1958
|
-
onChange: (w) => y(w,
|
|
1959
|
-
onKeyDown: (w) => g(w,
|
|
1957
|
+
value: c[x] ?? "",
|
|
1958
|
+
onChange: (w) => y(w, x),
|
|
1959
|
+
onKeyDown: (w) => g(w, x),
|
|
1960
1960
|
onFocus: b,
|
|
1961
1961
|
disabled: s,
|
|
1962
|
-
"aria-label": `Digit ${
|
|
1962
|
+
"aria-label": `Digit ${x + 1} of ${e}`,
|
|
1963
1963
|
style: {
|
|
1964
1964
|
width: "48px",
|
|
1965
1965
|
height: "48px",
|
|
@@ -1984,7 +1984,7 @@ function Xa({
|
|
|
1984
1984
|
w.target.style.borderColor = h, w.target.style.boxShadow = "none";
|
|
1985
1985
|
}
|
|
1986
1986
|
},
|
|
1987
|
-
|
|
1987
|
+
x
|
|
1988
1988
|
)) }),
|
|
1989
1989
|
(l || d) && /* @__PURE__ */ f(z, { mt: "2", fontSize: "xs", color: o ? "red.500" : "text.muted", fontFamily: "var(--font-body)", children: o ? d : l })
|
|
1990
1990
|
] });
|
|
@@ -2012,11 +2012,11 @@ function Lh({
|
|
|
2012
2012
|
isDisabled: d = !1,
|
|
2013
2013
|
id: c
|
|
2014
2014
|
}) {
|
|
2015
|
-
const [u, h] = P.useState(i), [p, g] = P.useState(e), [y, b] = P.useState(!1),
|
|
2016
|
-
const V =
|
|
2015
|
+
const [u, h] = P.useState(i), [p, g] = P.useState(e), [y, b] = P.useState(!1), v = Lt.find((T) => T.code === u) ?? Lt[0], x = (T) => {
|
|
2016
|
+
const V = T.target.value.replace(/[^\d\s\-]/g, "");
|
|
2017
2017
|
g(V), t == null || t(`${u}${V.replace(/\s/g, "")}`);
|
|
2018
|
-
}, w = (
|
|
2019
|
-
h(
|
|
2018
|
+
}, w = (T) => {
|
|
2019
|
+
h(T.target.value), t == null || t(`${T.target.value}${p.replace(/\s/g, "")}`);
|
|
2020
2020
|
}, F = s ? "#DC2626" : y ? "#0685FF" : "var(--medix-form-border)", C = y ? `0 0 0 3px ${s ? "rgba(220,38,38,0.15)" : "rgba(6,133,255,0.15)"}` : "none";
|
|
2021
2021
|
return /* @__PURE__ */ S(m, { w: "100%", children: [
|
|
2022
2022
|
a && /* @__PURE__ */ f(z, { mb: "1.5", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: a }),
|
|
@@ -2053,7 +2053,7 @@ function Lh({
|
|
|
2053
2053
|
minWidth: "80px"
|
|
2054
2054
|
},
|
|
2055
2055
|
children: [
|
|
2056
|
-
/* @__PURE__ */ f(z, { fontSize: "lg", lineHeight: "1", children:
|
|
2056
|
+
/* @__PURE__ */ f(z, { fontSize: "lg", lineHeight: "1", children: v.flag }),
|
|
2057
2057
|
/* @__PURE__ */ f(
|
|
2058
2058
|
"select",
|
|
2059
2059
|
{
|
|
@@ -2071,17 +2071,17 @@ function Lh({
|
|
|
2071
2071
|
cursor: "pointer",
|
|
2072
2072
|
width: "42px"
|
|
2073
2073
|
},
|
|
2074
|
-
children: Lt.map((
|
|
2074
|
+
children: Lt.map((T) => /* @__PURE__ */ f(
|
|
2075
2075
|
"option",
|
|
2076
2076
|
{
|
|
2077
|
-
value:
|
|
2077
|
+
value: T.code,
|
|
2078
2078
|
style: {
|
|
2079
2079
|
background: "var(--medix-form-bg)",
|
|
2080
2080
|
color: "var(--medix-form-text)"
|
|
2081
2081
|
},
|
|
2082
|
-
children:
|
|
2082
|
+
children: T.code
|
|
2083
2083
|
},
|
|
2084
|
-
|
|
2084
|
+
T.code
|
|
2085
2085
|
))
|
|
2086
2086
|
}
|
|
2087
2087
|
)
|
|
@@ -2094,7 +2094,7 @@ function Lh({
|
|
|
2094
2094
|
id: c,
|
|
2095
2095
|
type: "tel",
|
|
2096
2096
|
value: p,
|
|
2097
|
-
onChange:
|
|
2097
|
+
onChange: x,
|
|
2098
2098
|
onFocus: () => b(!0),
|
|
2099
2099
|
onBlur: () => b(!1),
|
|
2100
2100
|
placeholder: o,
|
|
@@ -2625,7 +2625,7 @@ function tr(e, t) {
|
|
|
2625
2625
|
};
|
|
2626
2626
|
return { schedule: it.reduce((w, F) => {
|
|
2627
2627
|
const C = r[F];
|
|
2628
|
-
return w[F] = (
|
|
2628
|
+
return w[F] = (T, V = !1, E = !1) => (n || b(), C.schedule(T, V, E)), w;
|
|
2629
2629
|
}, {}), cancel: (w) => {
|
|
2630
2630
|
for (let F = 0; F < it.length; F++)
|
|
2631
2631
|
r[it[F]].cancel(w);
|
|
@@ -2986,55 +2986,55 @@ function xt(e = B.visualDuration, t = B.bounce) {
|
|
|
2986
2986
|
const s = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: s }, { stiffness: l, damping: d, mass: c, duration: u, velocity: h, isResolvedFromDuration: p } = Ul({
|
|
2987
2987
|
...n,
|
|
2988
2988
|
velocity: -/* @__PURE__ */ Q(n.velocity || 0)
|
|
2989
|
-
}), g = h || 0, y = d / (2 * Math.sqrt(l * c)), b = r - s,
|
|
2990
|
-
i || (i =
|
|
2991
|
-
let w, F, C,
|
|
2989
|
+
}), g = h || 0, y = d / (2 * Math.sqrt(l * c)), b = r - s, v = /* @__PURE__ */ Q(Math.sqrt(l / c)), x = Math.abs(b) < 5;
|
|
2990
|
+
i || (i = x ? B.restSpeed.granular : B.restSpeed.default), o || (o = x ? B.restDelta.granular : B.restDelta.default);
|
|
2991
|
+
let w, F, C, T, V, E;
|
|
2992
2992
|
if (y < 1)
|
|
2993
|
-
C = tn(
|
|
2994
|
-
const M = Math.exp(-y *
|
|
2995
|
-
return r - M * (
|
|
2996
|
-
}, V = y *
|
|
2993
|
+
C = tn(v, y), T = (g + y * v * b) / C, w = (A) => {
|
|
2994
|
+
const M = Math.exp(-y * v * A);
|
|
2995
|
+
return r - M * (T * Math.sin(C * A) + b * Math.cos(C * A));
|
|
2996
|
+
}, V = y * v * T + b * C, E = y * v * b - T * C, F = (A) => Math.exp(-y * v * A) * (V * Math.sin(C * A) + E * Math.cos(C * A));
|
|
2997
2997
|
else if (y === 1) {
|
|
2998
|
-
w = (M) => r - Math.exp(-
|
|
2999
|
-
const
|
|
3000
|
-
F = (M) => Math.exp(-
|
|
2998
|
+
w = (M) => r - Math.exp(-v * M) * (b + (g + v * b) * M);
|
|
2999
|
+
const A = g + v * b;
|
|
3000
|
+
F = (M) => Math.exp(-v * M) * (v * A * M - g);
|
|
3001
3001
|
} else {
|
|
3002
|
-
const
|
|
3002
|
+
const A = v * Math.sqrt(y * y - 1);
|
|
3003
3003
|
w = (X) => {
|
|
3004
|
-
const Z = Math.exp(-y *
|
|
3005
|
-
return r - Z * ((g + y *
|
|
3004
|
+
const Z = Math.exp(-y * v * X), oe = Math.min(A * X, 300);
|
|
3005
|
+
return r - Z * ((g + y * v * b) * Math.sinh(oe) + A * b * Math.cosh(oe)) / A;
|
|
3006
3006
|
};
|
|
3007
|
-
const M = (g + y *
|
|
3007
|
+
const M = (g + y * v * b) / A, R = y * v * M - b * A, Y = y * v * b - M * A;
|
|
3008
3008
|
F = (X) => {
|
|
3009
|
-
const Z = Math.exp(-y *
|
|
3009
|
+
const Z = Math.exp(-y * v * X), oe = Math.min(A * X, 300);
|
|
3010
3010
|
return Z * (R * Math.sinh(oe) + Y * Math.cosh(oe));
|
|
3011
3011
|
};
|
|
3012
3012
|
}
|
|
3013
|
-
const
|
|
3013
|
+
const k = {
|
|
3014
3014
|
calculatedDuration: p && u || null,
|
|
3015
|
-
velocity: (
|
|
3016
|
-
next: (
|
|
3015
|
+
velocity: (A) => /* @__PURE__ */ G(F(A)),
|
|
3016
|
+
next: (A) => {
|
|
3017
3017
|
if (!p && y < 1) {
|
|
3018
|
-
const R = Math.exp(-y *
|
|
3018
|
+
const R = Math.exp(-y * v * A), Y = Math.sin(C * A), X = Math.cos(C * A), Z = r - R * (T * Y + b * X), oe = /* @__PURE__ */ G(R * (V * Y + E * X));
|
|
3019
3019
|
return a.done = Math.abs(oe) <= i && Math.abs(r - Z) <= o, a.value = a.done ? r : Z, a;
|
|
3020
3020
|
}
|
|
3021
|
-
const M = w(
|
|
3021
|
+
const M = w(A);
|
|
3022
3022
|
if (p)
|
|
3023
|
-
a.done =
|
|
3023
|
+
a.done = A >= u;
|
|
3024
3024
|
else {
|
|
3025
|
-
const R = /* @__PURE__ */ G(F(
|
|
3025
|
+
const R = /* @__PURE__ */ G(F(A));
|
|
3026
3026
|
a.done = Math.abs(R) <= i && Math.abs(r - M) <= o;
|
|
3027
3027
|
}
|
|
3028
3028
|
return a.value = a.done ? r : M, a;
|
|
3029
3029
|
},
|
|
3030
3030
|
toString: () => {
|
|
3031
|
-
const
|
|
3032
|
-
return
|
|
3031
|
+
const A = Math.min(jn(k), bt), M = dr((R) => k.next(A * R).value, A, 30);
|
|
3032
|
+
return A + "ms " + M;
|
|
3033
3033
|
},
|
|
3034
3034
|
toTransition: () => {
|
|
3035
3035
|
}
|
|
3036
3036
|
};
|
|
3037
|
-
return
|
|
3037
|
+
return k;
|
|
3038
3038
|
}
|
|
3039
3039
|
xt.applyToOptions = (e) => {
|
|
3040
3040
|
const t = jl(e, 100, xt);
|
|
@@ -3051,15 +3051,15 @@ function nn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3051
3051
|
value: u
|
|
3052
3052
|
}, p = (E) => a !== void 0 && E < a || l !== void 0 && E > l, g = (E) => a === void 0 ? l : l === void 0 || Math.abs(a - E) < Math.abs(l - E) ? a : l;
|
|
3053
3053
|
let y = n * t;
|
|
3054
|
-
const b = u + y,
|
|
3055
|
-
|
|
3056
|
-
const
|
|
3057
|
-
const
|
|
3058
|
-
h.done = Math.abs(
|
|
3054
|
+
const b = u + y, v = r === void 0 ? b : r(b);
|
|
3055
|
+
v !== b && (y = v - u);
|
|
3056
|
+
const x = (E) => -y * Math.exp(-E / i), w = (E) => v + x(E), F = (E) => {
|
|
3057
|
+
const k = x(E), A = w(E);
|
|
3058
|
+
h.done = Math.abs(k) <= d, h.value = h.done ? v : A;
|
|
3059
3059
|
};
|
|
3060
|
-
let C,
|
|
3060
|
+
let C, T;
|
|
3061
3061
|
const V = (E) => {
|
|
3062
|
-
p(h.value) && (C = E,
|
|
3062
|
+
p(h.value) && (C = E, T = xt({
|
|
3063
3063
|
keyframes: [h.value, g(h.value)],
|
|
3064
3064
|
velocity: ur(w, E, h.value),
|
|
3065
3065
|
// TODO: This should be passing * 1000
|
|
@@ -3072,8 +3072,8 @@ function nn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3072
3072
|
return V(0), {
|
|
3073
3073
|
calculatedDuration: null,
|
|
3074
3074
|
next: (E) => {
|
|
3075
|
-
let
|
|
3076
|
-
return !
|
|
3075
|
+
let k = !1;
|
|
3076
|
+
return !T && C === void 0 && (k = !0, F(E), V(E)), C !== void 0 && E >= C ? T.next(E - C) : (!k && F(E), h);
|
|
3077
3077
|
}
|
|
3078
3078
|
};
|
|
3079
3079
|
}
|
|
@@ -3220,19 +3220,19 @@ class vt extends Wn {
|
|
|
3220
3220
|
return i.next(0);
|
|
3221
3221
|
const { delay: d = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: p, type: g, onUpdate: y, finalKeyframe: b } = this.options;
|
|
3222
3222
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - o / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
3223
|
-
const
|
|
3224
|
-
this.currentTime = Math.max(
|
|
3223
|
+
const v = this.currentTime - d * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? v < 0 : v > o;
|
|
3224
|
+
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = o);
|
|
3225
3225
|
let w = this.currentTime, F = i;
|
|
3226
3226
|
if (u) {
|
|
3227
3227
|
const E = Math.min(this.currentTime, o) / a;
|
|
3228
|
-
let
|
|
3229
|
-
!
|
|
3228
|
+
let k = Math.floor(E), A = E % 1;
|
|
3229
|
+
!A && E >= 1 && (A = 1), A === 1 && k--, k = Math.min(k, u + 1), !!(k % 2) && (h === "reverse" ? (A = 1 - A, p && (A -= p / a)) : h === "mirror" && (F = r)), w = le(0, 1, A) * a;
|
|
3230
3230
|
}
|
|
3231
3231
|
let C;
|
|
3232
|
-
|
|
3233
|
-
let { done:
|
|
3234
|
-
!
|
|
3235
|
-
const V = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
3232
|
+
x ? (this.delayState.value = c[0], C = this.delayState) : C = F.next(w), s && !x && (C.value = s(C.value));
|
|
3233
|
+
let { done: T } = C;
|
|
3234
|
+
!x && l !== null && (T = this.playbackSpeed >= 0 ? this.currentTime >= o : this.currentTime <= 0);
|
|
3235
|
+
const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && T);
|
|
3236
3236
|
return V && g !== nn && (C.value = kt(c, this.options, b, this.speed)), y && y(C.value), V && this.finish(), C;
|
|
3237
3237
|
}
|
|
3238
3238
|
/**
|
|
@@ -3769,10 +3769,10 @@ class Ac extends Wn {
|
|
|
3769
3769
|
element: c,
|
|
3770
3770
|
...u
|
|
3771
3771
|
}, p = (c == null ? void 0 : c.KeyframeResolver) || Hn;
|
|
3772
|
-
this.keyframeResolver = new p(a, (y, b,
|
|
3772
|
+
this.keyframeResolver = new p(a, (y, b, v) => this.onKeyframesResolved(y, b, h, !v), l, d, c), (g = this.keyframeResolver) == null || g.scheduleResolve();
|
|
3773
3773
|
}
|
|
3774
3774
|
onKeyframesResolved(t, n, i, o) {
|
|
3775
|
-
var
|
|
3775
|
+
var v, x;
|
|
3776
3776
|
this.keyframeResolver = void 0;
|
|
3777
3777
|
const { name: s, type: r, velocity: a, delay: l, isHandoff: d, onUpdate: c } = i;
|
|
3778
3778
|
this.resolvedAt = U.now();
|
|
@@ -3783,7 +3783,7 @@ class Ac extends Wn {
|
|
|
3783
3783
|
finalKeyframe: n,
|
|
3784
3784
|
...i,
|
|
3785
3785
|
keyframes: t
|
|
3786
|
-
}, g = u && !d && Tc(p), y = (
|
|
3786
|
+
}, g = u && !d && Tc(p), y = (x = (v = p.motionValue) == null ? void 0 : v.owner) == null ? void 0 : x.current;
|
|
3787
3787
|
let b;
|
|
3788
3788
|
if (g)
|
|
3789
3789
|
try {
|
|
@@ -4254,17 +4254,17 @@ function Er(e, t, { delay: n = 0, transitionOverride: i, type: o } = {}) {
|
|
|
4254
4254
|
L.update(() => p.set(g));
|
|
4255
4255
|
continue;
|
|
4256
4256
|
}
|
|
4257
|
-
let
|
|
4257
|
+
let v = !1;
|
|
4258
4258
|
if (window.MotionHandoffAnimation) {
|
|
4259
4259
|
const F = Dr(e);
|
|
4260
4260
|
if (F) {
|
|
4261
4261
|
const C = window.MotionHandoffAnimation(F, h, L);
|
|
4262
|
-
C !== null && (y.startTime = C,
|
|
4262
|
+
C !== null && (y.startTime = C, v = !0);
|
|
4263
4263
|
}
|
|
4264
4264
|
}
|
|
4265
4265
|
hn(e, h);
|
|
4266
|
-
const
|
|
4267
|
-
p.start(_n(h, p, g,
|
|
4266
|
+
const x = d ?? e.shouldReduceMotion;
|
|
4267
|
+
p.start(_n(h, p, g, x && kr.has(h) ? { type: !1 } : y, e, v));
|
|
4268
4268
|
const w = p.animation;
|
|
4269
4269
|
w && c.push(w);
|
|
4270
4270
|
}
|
|
@@ -4594,8 +4594,8 @@ function ad(e, t, n = {}) {
|
|
|
4594
4594
|
if (!sd(b))
|
|
4595
4595
|
return;
|
|
4596
4596
|
l = !1;
|
|
4597
|
-
const
|
|
4598
|
-
typeof
|
|
4597
|
+
const v = t(r, b);
|
|
4598
|
+
typeof v == "function" && (d = v, r.addEventListener("pointerleave", g, o));
|
|
4599
4599
|
};
|
|
4600
4600
|
r.addEventListener("pointerenter", y, o), r.addEventListener("pointerdown", p, o);
|
|
4601
4601
|
}), s;
|
|
@@ -5429,16 +5429,16 @@ function qd(e) {
|
|
|
5429
5429
|
function a(d) {
|
|
5430
5430
|
const { props: c } = e, u = es(e.parent) || {}, h = [], p = /* @__PURE__ */ new Set();
|
|
5431
5431
|
let g = {}, y = 1 / 0;
|
|
5432
|
-
for (let
|
|
5433
|
-
const
|
|
5434
|
-
|
|
5435
|
-
let V = F === u[
|
|
5432
|
+
for (let v = 0; v < Xd; v++) {
|
|
5433
|
+
const x = Yd[v], w = n[x], F = c[x] !== void 0 ? c[x] : u[x], C = Xe(F), T = x === d ? w.isActive : null;
|
|
5434
|
+
T === !1 && (y = v);
|
|
5435
|
+
let V = F === u[x] && F !== c[x] && C;
|
|
5436
5436
|
if (V && (i || o) && e.manuallyAnimateOnMount && (V = !1), w.protectedKeys = { ...g }, // If it isn't active and hasn't *just* been set as inactive
|
|
5437
|
-
!w.isActive &&
|
|
5437
|
+
!w.isActive && T === null || // If we didn't and don't have any defined prop for this animation type
|
|
5438
5438
|
!F && !w.prevProp || // Or if the prop doesn't define an animation
|
|
5439
5439
|
At(F) || typeof F == "boolean")
|
|
5440
5440
|
continue;
|
|
5441
|
-
if (
|
|
5441
|
+
if (x === "exit" && w.isActive && T !== !0) {
|
|
5442
5442
|
w.prevResolvedValues && (g = {
|
|
5443
5443
|
...g,
|
|
5444
5444
|
...w.prevResolvedValues
|
|
@@ -5446,17 +5446,17 @@ function qd(e) {
|
|
|
5446
5446
|
continue;
|
|
5447
5447
|
}
|
|
5448
5448
|
const E = Jd(w.prevProp, F);
|
|
5449
|
-
let
|
|
5450
|
-
|
|
5451
|
-
|
|
5449
|
+
let k = E || // If we're making this variant active, we want to always make it active
|
|
5450
|
+
x === d && w.isActive && !V && C || // If we removed a higher-priority variant (i is in reverse order)
|
|
5451
|
+
v > y && C, A = !1;
|
|
5452
5452
|
const M = Array.isArray(F) ? F : [F];
|
|
5453
|
-
let R = M.reduce(s(
|
|
5454
|
-
|
|
5453
|
+
let R = M.reduce(s(x), {});
|
|
5454
|
+
T === !1 && (R = {});
|
|
5455
5455
|
const { prevResolvedValues: Y = {} } = w, X = {
|
|
5456
5456
|
...Y,
|
|
5457
5457
|
...R
|
|
5458
5458
|
}, Z = (H) => {
|
|
5459
|
-
|
|
5459
|
+
k = !0, p.has(H) && (A = !0, p.delete(H)), w.needsAnimating[H] = !0;
|
|
5460
5460
|
const q = e.getValue(H);
|
|
5461
5461
|
q && (q.liveStyle = !1);
|
|
5462
5462
|
};
|
|
@@ -5467,10 +5467,10 @@ function qd(e) {
|
|
|
5467
5467
|
let Te = !1;
|
|
5468
5468
|
fn(q) && fn(ge) ? Te = !ts(q, ge) : Te = q !== ge, Te ? q != null ? Z(H) : p.add(H) : q !== void 0 && p.has(H) ? Z(H) : w.protectedKeys[H] = !0;
|
|
5469
5469
|
}
|
|
5470
|
-
w.prevProp = F, w.prevResolvedValues = R, w.isActive && (g = { ...g, ...R }), (i || o) && e.blockInitialAnimation && (
|
|
5470
|
+
w.prevProp = F, w.prevResolvedValues = R, w.isActive && (g = { ...g, ...R }), (i || o) && e.blockInitialAnimation && (k = !1);
|
|
5471
5471
|
const oe = V && E;
|
|
5472
|
-
|
|
5473
|
-
const q = { type:
|
|
5472
|
+
k && (!oe || A) && h.push(...M.map((H) => {
|
|
5473
|
+
const q = { type: x };
|
|
5474
5474
|
if (typeof H == "string" && (i || o) && !oe && e.manuallyAnimateOnMount && e.parent) {
|
|
5475
5475
|
const { parent: ge } = e, Te = Ce(ge, H);
|
|
5476
5476
|
if (ge.enteringChildren && Te) {
|
|
@@ -5485,15 +5485,15 @@ function qd(e) {
|
|
|
5485
5485
|
}));
|
|
5486
5486
|
}
|
|
5487
5487
|
if (p.size) {
|
|
5488
|
-
const
|
|
5488
|
+
const v = {};
|
|
5489
5489
|
if (typeof c.initial != "boolean") {
|
|
5490
|
-
const
|
|
5491
|
-
|
|
5490
|
+
const x = Ce(e, Array.isArray(c.initial) ? c.initial[0] : c.initial);
|
|
5491
|
+
x && x.transition && (v.transition = x.transition);
|
|
5492
5492
|
}
|
|
5493
|
-
p.forEach((
|
|
5494
|
-
const w = e.getBaseTarget(
|
|
5495
|
-
F && (F.liveStyle = !0), x
|
|
5496
|
-
}), h.push({ animation:
|
|
5493
|
+
p.forEach((x) => {
|
|
5494
|
+
const w = e.getBaseTarget(x), F = e.getValue(x);
|
|
5495
|
+
F && (F.liveStyle = !0), v[x] = w ?? null;
|
|
5496
|
+
}), h.push({ animation: v });
|
|
5497
5497
|
}
|
|
5498
5498
|
let b = !!h.length;
|
|
5499
5499
|
return i && (c.initial === !1 || c.initial === c.animate) && !e.manuallyAnimateOnMount && (b = !1), i = !1, o = !1, b ? t(h) : Promise.resolve();
|
|
@@ -5817,15 +5817,15 @@ function cs({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5817
5817
|
this.target = void 0, this.relativeTarget = void 0;
|
|
5818
5818
|
return;
|
|
5819
5819
|
}
|
|
5820
|
-
const g = this.options.transition || d.getDefaultTransition() || Iu, { onLayoutAnimationStart: y, onLayoutAnimationComplete: b } = d.getProps(),
|
|
5821
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
5820
|
+
const g = this.options.transition || d.getDefaultTransition() || Iu, { onLayoutAnimationStart: y, onLayoutAnimationComplete: b } = d.getProps(), v = !this.targetLayout || !rs(this.targetLayout, p), x = !u && h;
|
|
5821
|
+
if (this.options.layoutRoot || this.resumeFrom || x || u && (v || !this.currentAnimation)) {
|
|
5822
5822
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
5823
5823
|
const w = {
|
|
5824
5824
|
...Nn(g, "layout"),
|
|
5825
5825
|
onPlay: y,
|
|
5826
5826
|
onComplete: b
|
|
5827
5827
|
};
|
|
5828
|
-
(d.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w), this.setAnimationOrigin(c,
|
|
5828
|
+
(d.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w), this.setAnimationOrigin(c, x);
|
|
5829
5829
|
} else
|
|
5830
5830
|
u || ao(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
5831
5831
|
this.targetLayout = p;
|
|
@@ -6078,12 +6078,12 @@ function cs({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6078
6078
|
setAnimationOrigin(r, a = !1) {
|
|
6079
6079
|
const l = this.snapshot, d = l ? l.latestValues : {}, c = { ...this.latestValues }, u = Me();
|
|
6080
6080
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
6081
|
-
const h = W(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, y = p !== g, b = this.getStack(),
|
|
6081
|
+
const h = W(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, y = p !== g, b = this.getStack(), v = !b || b.members.length <= 1, x = !!(y && !v && this.options.crossfade === !0 && !this.path.some(Lu));
|
|
6082
6082
|
this.animationProgress = 0;
|
|
6083
6083
|
let w;
|
|
6084
6084
|
this.mixTargetDelta = (F) => {
|
|
6085
6085
|
const C = F / 1e3;
|
|
6086
|
-
lo(u.x, r.x, C), lo(u.y, r.y, C), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ct(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Ru(this.relativeTarget, this.relativeTargetOrigin, h, C), w && lu(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = W()), te(w, this.relativeTarget)), y && (this.animationValues = c, uu(c, d, this.latestValues, C,
|
|
6086
|
+
lo(u.x, r.x, C), lo(u.y, r.y, C), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ct(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Ru(this.relativeTarget, this.relativeTargetOrigin, h, C), w && lu(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = W()), te(w, this.relativeTarget)), y && (this.animationValues = c, uu(c, d, this.latestValues, C, x, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = C;
|
|
6087
6087
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
6088
6088
|
}
|
|
6089
6089
|
startAnimation(r) {
|
|
@@ -6205,13 +6205,13 @@ function cs({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6205
6205
|
for (const g in vn) {
|
|
6206
6206
|
if (c[g] === void 0)
|
|
6207
6207
|
continue;
|
|
6208
|
-
const { correct: y, applyTo: b, isCSSVariable:
|
|
6208
|
+
const { correct: y, applyTo: b, isCSSVariable: v } = vn[g], x = u === "none" ? c[g] : y(c[g], d);
|
|
6209
6209
|
if (b) {
|
|
6210
6210
|
const w = b.length;
|
|
6211
6211
|
for (let F = 0; F < w; F++)
|
|
6212
|
-
r[b[F]] =
|
|
6212
|
+
r[b[F]] = x;
|
|
6213
6213
|
} else
|
|
6214
|
-
|
|
6214
|
+
v ? this.options.visualElement.renderState.vars[g] = x : r[g] = x;
|
|
6215
6215
|
}
|
|
6216
6216
|
this.options.layoutId && (r.pointerEvents = d === this ? pt(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
6217
6217
|
}
|
|
@@ -6434,15 +6434,15 @@ function Nu({ children: e, isPresent: t, anchorX: n, anchorY: i, root: o, pop: s
|
|
|
6434
6434
|
bottom: 0
|
|
6435
6435
|
}), { nonce: d } = $(ei), c = ((h = e.props) == null ? void 0 : h.ref) ?? (e == null ? void 0 : e.ref), u = Wu(a, c);
|
|
6436
6436
|
return kn(() => {
|
|
6437
|
-
const { width: p, height: g, top: y, left: b, right:
|
|
6437
|
+
const { width: p, height: g, top: y, left: b, right: v, bottom: x } = l.current;
|
|
6438
6438
|
if (t || s === !1 || !a.current || !p || !g)
|
|
6439
6439
|
return;
|
|
6440
|
-
const w = n === "left" ? `left: ${b}` : `right: ${
|
|
6440
|
+
const w = n === "left" ? `left: ${b}` : `right: ${v}`, F = i === "bottom" ? `bottom: ${x}` : `top: ${y}`;
|
|
6441
6441
|
a.current.dataset.motionPopId = r;
|
|
6442
6442
|
const C = document.createElement("style");
|
|
6443
6443
|
d && (C.nonce = d);
|
|
6444
|
-
const
|
|
6445
|
-
return
|
|
6444
|
+
const T = o ?? document.head;
|
|
6445
|
+
return T.appendChild(C), C.sheet && C.sheet.insertRule(`
|
|
6446
6446
|
[data-motion-pop-id="${r}"] {
|
|
6447
6447
|
position: absolute !important;
|
|
6448
6448
|
width: ${p}px !important;
|
|
@@ -6452,7 +6452,7 @@ function Nu({ children: e, isPresent: t, anchorX: n, anchorY: i, root: o, pop: s
|
|
|
6452
6452
|
}
|
|
6453
6453
|
`), () => {
|
|
6454
6454
|
var V;
|
|
6455
|
-
(V = a.current) == null || V.removeAttribute("data-motion-pop-id"),
|
|
6455
|
+
(V = a.current) == null || V.removeAttribute("data-motion-pop-id"), T.contains(C) && T.removeChild(C);
|
|
6456
6456
|
};
|
|
6457
6457
|
}, [t]), f(Hu, { isPresent: t, childRef: a, sizeRef: l, pop: s, children: s === !1 ? e : O.cloneElement(e, { ref: u }) });
|
|
6458
6458
|
}
|
|
@@ -6501,31 +6501,31 @@ function mo(e) {
|
|
|
6501
6501
|
}), t;
|
|
6502
6502
|
}
|
|
6503
6503
|
const go = ({ children: e, custom: t, initial: n = !0, onExitComplete: i, presenceAffectsLayout: o = !0, mode: s = "sync", propagate: r = !1, anchorX: a = "left", anchorY: l = "top", root: d }) => {
|
|
6504
|
-
const [c, u] = fs(r), h = Fe(() => mo(e), [e]), p = r && !c ? [] : h.map(rt), g = J(!0), y = J(h), b = En(() => /* @__PURE__ */ new Map()),
|
|
6504
|
+
const [c, u] = fs(r), h = Fe(() => mo(e), [e]), p = r && !c ? [] : h.map(rt), g = J(!0), y = J(h), b = En(() => /* @__PURE__ */ new Map()), v = J(/* @__PURE__ */ new Set()), [x, w] = ii(h), [F, C] = ii(h);
|
|
6505
6505
|
jo(() => {
|
|
6506
6506
|
g.current = !1, y.current = h;
|
|
6507
6507
|
for (let E = 0; E < F.length; E++) {
|
|
6508
|
-
const
|
|
6509
|
-
p.includes(
|
|
6508
|
+
const k = rt(F[E]);
|
|
6509
|
+
p.includes(k) ? (b.delete(k), v.current.delete(k)) : b.get(k) !== !0 && b.set(k, !1);
|
|
6510
6510
|
}
|
|
6511
6511
|
}, [F, p.length, p.join("-")]);
|
|
6512
|
-
const
|
|
6513
|
-
if (h !==
|
|
6512
|
+
const T = [];
|
|
6513
|
+
if (h !== x) {
|
|
6514
6514
|
let E = [...h];
|
|
6515
|
-
for (let
|
|
6516
|
-
const
|
|
6517
|
-
p.includes(M) || (E.splice(
|
|
6515
|
+
for (let k = 0; k < F.length; k++) {
|
|
6516
|
+
const A = F[k], M = rt(A);
|
|
6517
|
+
p.includes(M) || (E.splice(k, 0, A), T.push(A));
|
|
6518
6518
|
}
|
|
6519
|
-
return s === "wait" &&
|
|
6519
|
+
return s === "wait" && T.length && (E = T), C(mo(E)), w(h), null;
|
|
6520
6520
|
}
|
|
6521
6521
|
process.env.NODE_ENV !== "production" && s === "wait" && F.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
6522
6522
|
const { forceRender: V } = $(Dn);
|
|
6523
6523
|
return f(qe, { children: F.map((E) => {
|
|
6524
|
-
const
|
|
6525
|
-
if (
|
|
6524
|
+
const k = rt(E), A = r && !c ? !1 : h === F || p.includes(k), M = () => {
|
|
6525
|
+
if (v.current.has(k))
|
|
6526
6526
|
return;
|
|
6527
|
-
if (b.has(
|
|
6528
|
-
|
|
6527
|
+
if (b.has(k))
|
|
6528
|
+
v.current.add(k), b.set(k, !0);
|
|
6529
6529
|
else
|
|
6530
6530
|
return;
|
|
6531
6531
|
let R = !0;
|
|
@@ -6533,7 +6533,7 @@ const go = ({ children: e, custom: t, initial: n = !0, onExitComplete: i, presen
|
|
|
6533
6533
|
Y || (R = !1);
|
|
6534
6534
|
}), R && (V == null || V(), C(y.current), r && (u == null || u()), i && i());
|
|
6535
6535
|
};
|
|
6536
|
-
return f(_u, { isPresent:
|
|
6536
|
+
return f(_u, { isPresent: A, initial: !g.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: o, mode: s, root: d, onExitComplete: A ? void 0 : M, anchorX: a, anchorY: l, children: E }, k);
|
|
6537
6537
|
}) });
|
|
6538
6538
|
}, hs = Be({ strict: !1 }), yo = {
|
|
6539
6539
|
animation: [
|
|
@@ -6764,17 +6764,17 @@ function sf(e, t, n, i) {
|
|
|
6764
6764
|
for (let p = 0; p < h.length; p++) {
|
|
6765
6765
|
const g = $n(e, h[p]);
|
|
6766
6766
|
if (g) {
|
|
6767
|
-
const { transitionEnd: y, transition: b, ...
|
|
6768
|
-
for (const
|
|
6769
|
-
let w = x
|
|
6767
|
+
const { transitionEnd: y, transition: b, ...v } = g;
|
|
6768
|
+
for (const x in v) {
|
|
6769
|
+
let w = v[x];
|
|
6770
6770
|
if (Array.isArray(w)) {
|
|
6771
6771
|
const F = c ? w.length - 1 : 0;
|
|
6772
6772
|
w = w[F];
|
|
6773
6773
|
}
|
|
6774
|
-
w !== null && (o[
|
|
6774
|
+
w !== null && (o[x] = w);
|
|
6775
6775
|
}
|
|
6776
|
-
for (const
|
|
6777
|
-
o[
|
|
6776
|
+
for (const x in y)
|
|
6777
|
+
o[x] = y[x];
|
|
6778
6778
|
}
|
|
6779
6779
|
}
|
|
6780
6780
|
}
|
|
@@ -6832,14 +6832,14 @@ function uf(e, t, n, i, o, s) {
|
|
|
6832
6832
|
kn(() => {
|
|
6833
6833
|
g && b.current && g.update(n, l);
|
|
6834
6834
|
});
|
|
6835
|
-
const
|
|
6835
|
+
const v = n[Ar], x = J(!!v && typeof window < "u" && !((w = window.MotionHandoffIsComplete) != null && w.call(window, v)) && ((F = window.MotionHasOptimisedAnimation) == null ? void 0 : F.call(window, v)));
|
|
6836
6836
|
return jo(() => {
|
|
6837
|
-
p.current = !0, g && (b.current = !0, window.MotionIsMounted = !0, g.updateFeatures(), g.scheduleRenderMicrotask(),
|
|
6837
|
+
p.current = !0, g && (b.current = !0, window.MotionIsMounted = !0, g.updateFeatures(), g.scheduleRenderMicrotask(), x.current && g.animationState && g.animationState.animateChanges());
|
|
6838
6838
|
}), Fn(() => {
|
|
6839
|
-
g && (!
|
|
6839
|
+
g && (!x.current && g.animationState && g.animationState.animateChanges(), x.current && (queueMicrotask(() => {
|
|
6840
6840
|
var C;
|
|
6841
|
-
(C = window.MotionHandoffMarkAsComplete) == null || C.call(window,
|
|
6842
|
-
}),
|
|
6841
|
+
(C = window.MotionHandoffMarkAsComplete) == null || C.call(window, v);
|
|
6842
|
+
}), x.current = !1), g.enteringChildren = void 0);
|
|
6843
6843
|
}), g;
|
|
6844
6844
|
}
|
|
6845
6845
|
function ff(e, t, n, i) {
|
|
@@ -7034,19 +7034,19 @@ class Ss {
|
|
|
7034
7034
|
const p = Gt(this.lastMoveEventInfo, this.history), g = this.startEvent !== null, y = Cf(p.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
7035
7035
|
if (!g && !y)
|
|
7036
7036
|
return;
|
|
7037
|
-
const { point: b } = p, { timestamp:
|
|
7038
|
-
this.history.push({ ...b, timestamp:
|
|
7039
|
-
const { onStart:
|
|
7040
|
-
g || (
|
|
7037
|
+
const { point: b } = p, { timestamp: v } = N;
|
|
7038
|
+
this.history.push({ ...b, timestamp: v });
|
|
7039
|
+
const { onStart: x, onMove: w } = this.handlers;
|
|
7040
|
+
g || (x && x(this.lastMoveEvent, p), this.startEvent = this.lastMoveEvent), w && w(this.lastMoveEvent, p);
|
|
7041
7041
|
}, this.handlePointerMove = (p, g) => {
|
|
7042
7042
|
this.lastMoveEvent = p, this.lastRawMoveEventInfo = g, this.lastMoveEventInfo = st(g, this.transformPagePoint), L.update(this.updatePoint, !0);
|
|
7043
7043
|
}, this.handlePointerUp = (p, g) => {
|
|
7044
7044
|
this.end();
|
|
7045
|
-
const { onEnd: y, onSessionEnd: b, resumeAnimation:
|
|
7046
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
7045
|
+
const { onEnd: y, onSessionEnd: b, resumeAnimation: v } = this.handlers;
|
|
7046
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
7047
7047
|
return;
|
|
7048
|
-
const
|
|
7049
|
-
this.startEvent && y && y(p,
|
|
7048
|
+
const x = Gt(p.type === "pointercancel" ? this.lastMoveEventInfo : st(g, this.transformPagePoint), this.history);
|
|
7049
|
+
this.startEvent && y && y(p, x), b && b(p, x);
|
|
7050
7050
|
}, !Yn(t))
|
|
7051
7051
|
return;
|
|
7052
7052
|
this.dragSnapToOrigin = s, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = r, this.contextWindow = o || window;
|
|
@@ -7205,16 +7205,16 @@ class Rf {
|
|
|
7205
7205
|
const { drag: p, dragPropagation: g, onDragStart: y } = this.getProps();
|
|
7206
7206
|
if (p && !g && (this.openDragLock && this.openDragLock(), this.openDragLock = rd(p), !this.openDragLock))
|
|
7207
7207
|
return;
|
|
7208
|
-
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), re((
|
|
7209
|
-
let
|
|
7210
|
-
if (ae.test(
|
|
7208
|
+
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), re((v) => {
|
|
7209
|
+
let x = this.getAxisMotionValue(v).get() || 0;
|
|
7210
|
+
if (ae.test(x)) {
|
|
7211
7211
|
const { projection: w } = this.visualElement;
|
|
7212
7212
|
if (w && w.layout) {
|
|
7213
|
-
const F = w.layout.layoutBox[
|
|
7214
|
-
F && (
|
|
7213
|
+
const F = w.layout.layoutBox[v];
|
|
7214
|
+
F && (x = K(F) * (parseFloat(x) / 100));
|
|
7215
7215
|
}
|
|
7216
7216
|
}
|
|
7217
|
-
this.originPoint[
|
|
7217
|
+
this.originPoint[v] = x;
|
|
7218
7218
|
}), y && L.update(() => y(u, h), !1, !0), hn(this.visualElement, "transform");
|
|
7219
7219
|
const { animationState: b } = this.visualElement;
|
|
7220
7220
|
b && b.setActive("whileDrag", !0);
|
|
@@ -7223,12 +7223,12 @@ class Rf {
|
|
|
7223
7223
|
const { dragPropagation: p, dragDirectionLock: g, onDirectionLock: y, onDrag: b } = this.getProps();
|
|
7224
7224
|
if (!p && !this.openDragLock)
|
|
7225
7225
|
return;
|
|
7226
|
-
const { offset:
|
|
7226
|
+
const { offset: v } = h;
|
|
7227
7227
|
if (g && this.currentDirection === null) {
|
|
7228
|
-
this.currentDirection = If(
|
|
7228
|
+
this.currentDirection = If(v), this.currentDirection !== null && y && y(this.currentDirection);
|
|
7229
7229
|
return;
|
|
7230
7230
|
}
|
|
7231
|
-
this.updateAxis("x", h.point,
|
|
7231
|
+
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(), b && L.update(() => b(u, h), !1, !0);
|
|
7232
7232
|
}, l = (u, h) => {
|
|
7233
7233
|
this.latestPointerEvent = u, this.latestPanInfo = h, this.stop(u, h), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
7234
7234
|
}, d = () => {
|
|
@@ -7755,67 +7755,68 @@ function qt({
|
|
|
7755
7755
|
function Hh({
|
|
7756
7756
|
logo: e,
|
|
7757
7757
|
navItems: t = [],
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7758
|
+
navItemsAlign: n = "center",
|
|
7759
|
+
ctaLabel: i = "Get Started",
|
|
7760
|
+
ctaHref: o,
|
|
7761
|
+
onCtaClick: s,
|
|
7762
|
+
ctaIconHref: r,
|
|
7763
|
+
onCtaIconClick: a,
|
|
7764
|
+
secondaryCtaLabel: l,
|
|
7765
|
+
secondaryCtaHref: d,
|
|
7766
|
+
onSecondaryCtaClick: c,
|
|
7767
|
+
ctaSlot: u,
|
|
7768
|
+
renderLink: h = lh,
|
|
7769
|
+
isSticky: p = !1,
|
|
7770
|
+
variant: g = "solid",
|
|
7771
|
+
...y
|
|
7771
7772
|
}) {
|
|
7772
|
-
const [
|
|
7773
|
+
const [b, v] = P.useState(!1), x = r ?? o, w = a ?? s, F = g === "blur" ? { background: "rgba(10,18,32,0.85)", backdropFilter: "blur(12px)" } : {}, C = ({ mobile: T = !1 }) => /* @__PURE__ */ S(
|
|
7773
7774
|
m,
|
|
7774
7775
|
{
|
|
7775
7776
|
display: "flex",
|
|
7776
7777
|
gap: "2",
|
|
7777
7778
|
alignItems: "center",
|
|
7778
|
-
flexDirection:
|
|
7779
|
+
flexDirection: T ? "column" : "row",
|
|
7779
7780
|
children: [
|
|
7780
|
-
|
|
7781
|
+
l && /* @__PURE__ */ f(qt, { href: d, children: /* @__PURE__ */ f(
|
|
7781
7782
|
Re,
|
|
7782
7783
|
{
|
|
7783
|
-
variant:
|
|
7784
|
+
variant: T ? "outline" : "ghost",
|
|
7784
7785
|
colorScheme: "blue",
|
|
7785
|
-
size:
|
|
7786
|
+
size: T ? "md" : "sm",
|
|
7786
7787
|
onClick: () => {
|
|
7787
|
-
|
|
7788
|
+
c == null || c(), T && v(!1);
|
|
7788
7789
|
},
|
|
7789
|
-
style:
|
|
7790
|
-
children:
|
|
7790
|
+
style: T ? { width: "100%" } : void 0,
|
|
7791
|
+
children: l
|
|
7791
7792
|
}
|
|
7792
7793
|
) }),
|
|
7793
|
-
/* @__PURE__ */ f(qt, { href:
|
|
7794
|
+
/* @__PURE__ */ f(qt, { href: o, children: /* @__PURE__ */ f(
|
|
7794
7795
|
Re,
|
|
7795
7796
|
{
|
|
7796
7797
|
variant: "solid",
|
|
7797
7798
|
colorScheme: "blue",
|
|
7798
|
-
size:
|
|
7799
|
+
size: T ? "md" : "sm",
|
|
7799
7800
|
onClick: () => {
|
|
7800
|
-
|
|
7801
|
+
s == null || s(), T && v(!1);
|
|
7801
7802
|
},
|
|
7802
|
-
style:
|
|
7803
|
-
children:
|
|
7803
|
+
style: T ? { width: "100%" } : void 0,
|
|
7804
|
+
children: i
|
|
7804
7805
|
}
|
|
7805
7806
|
) }),
|
|
7806
|
-
!
|
|
7807
|
+
!T && /* @__PURE__ */ f(
|
|
7807
7808
|
qt,
|
|
7808
7809
|
{
|
|
7809
7810
|
href: x,
|
|
7810
|
-
target: x && x !==
|
|
7811
|
-
rel: x && x !==
|
|
7811
|
+
target: x && x !== o ? "_blank" : void 0,
|
|
7812
|
+
rel: x && x !== o ? "noopener noreferrer" : void 0,
|
|
7812
7813
|
children: /* @__PURE__ */ f(
|
|
7813
7814
|
Re,
|
|
7814
7815
|
{
|
|
7815
7816
|
variant: "solid",
|
|
7816
7817
|
colorScheme: "blue",
|
|
7817
7818
|
size: "sm",
|
|
7818
|
-
onClick:
|
|
7819
|
+
onClick: w,
|
|
7819
7820
|
"aria-label": "Open",
|
|
7820
7821
|
style: { width: 34, height: 34, padding: 0, borderRadius: 8, flexShrink: 0 },
|
|
7821
7822
|
children: /* @__PURE__ */ f(rh, {})
|
|
@@ -7832,15 +7833,15 @@ function Hh({
|
|
|
7832
7833
|
as: "nav",
|
|
7833
7834
|
role: "navigation",
|
|
7834
7835
|
"aria-label": "Main navigation",
|
|
7835
|
-
position:
|
|
7836
|
-
top:
|
|
7837
|
-
zIndex:
|
|
7838
|
-
bg:
|
|
7839
|
-
style:
|
|
7836
|
+
position: p ? "sticky" : "relative",
|
|
7837
|
+
top: p ? "0" : void 0,
|
|
7838
|
+
zIndex: p ? "sticky" : void 0,
|
|
7839
|
+
bg: g === "transparent" ? "transparent" : g === "blur" ? void 0 : "bg",
|
|
7840
|
+
style: F,
|
|
7840
7841
|
borderBottom: "1px solid",
|
|
7841
|
-
borderColor:
|
|
7842
|
+
borderColor: g === "transparent" ? "transparent" : "border",
|
|
7842
7843
|
transition: "background 0.2s ease, border-color 0.2s ease",
|
|
7843
|
-
...
|
|
7844
|
+
...y,
|
|
7844
7845
|
children: [
|
|
7845
7846
|
/* @__PURE__ */ S(
|
|
7846
7847
|
m,
|
|
@@ -7861,13 +7862,14 @@ function Hh({
|
|
|
7861
7862
|
as: "ul",
|
|
7862
7863
|
display: { base: "none", md: "flex" },
|
|
7863
7864
|
alignItems: "center",
|
|
7865
|
+
justifyContent: n === "left" ? "flex-start" : n === "right" ? "flex-end" : "center",
|
|
7864
7866
|
gap: "1",
|
|
7865
7867
|
listStyleType: "none",
|
|
7866
7868
|
m: "0",
|
|
7867
7869
|
p: "0",
|
|
7868
7870
|
flex: "1",
|
|
7869
|
-
children: t.map((
|
|
7870
|
-
|
|
7871
|
+
children: t.map((T) => /* @__PURE__ */ f(m, { as: "li", children: h(
|
|
7872
|
+
T,
|
|
7871
7873
|
/* @__PURE__ */ f(
|
|
7872
7874
|
m,
|
|
7873
7875
|
{
|
|
@@ -7878,19 +7880,19 @@ function Hh({
|
|
|
7878
7880
|
fontSize: "sm",
|
|
7879
7881
|
fontWeight: "medium",
|
|
7880
7882
|
fontFamily: "var(--font-body)",
|
|
7881
|
-
color:
|
|
7883
|
+
color: T.isActive ? "blue.500" : "text.body",
|
|
7882
7884
|
borderRadius: "md",
|
|
7883
7885
|
transition: "all 0.15s",
|
|
7884
7886
|
_hover: { color: "blue.500", bg: "blue.50" },
|
|
7885
7887
|
_dark: { _hover: { bg: "rgba(6,133,255,0.10)" } },
|
|
7886
7888
|
cursor: "pointer",
|
|
7887
|
-
children:
|
|
7889
|
+
children: T.label
|
|
7888
7890
|
}
|
|
7889
7891
|
)
|
|
7890
|
-
) },
|
|
7892
|
+
) }, T.href))
|
|
7891
7893
|
}
|
|
7892
7894
|
),
|
|
7893
|
-
/* @__PURE__ */ f(m, { display: { base: "none", md: "flex" }, alignItems: "center", flexShrink: 0, children:
|
|
7895
|
+
/* @__PURE__ */ f(m, { display: { base: "none", md: "flex" }, alignItems: "center", flexShrink: 0, children: u ?? /* @__PURE__ */ f(C, {}) }),
|
|
7894
7896
|
/* @__PURE__ */ f(
|
|
7895
7897
|
m,
|
|
7896
7898
|
{
|
|
@@ -7902,11 +7904,11 @@ function Hh({
|
|
|
7902
7904
|
bg: "transparent",
|
|
7903
7905
|
p: "0",
|
|
7904
7906
|
cursor: "pointer",
|
|
7905
|
-
onClick: () =>
|
|
7906
|
-
"aria-label":
|
|
7907
|
-
"aria-expanded":
|
|
7907
|
+
onClick: () => v(!b),
|
|
7908
|
+
"aria-label": b ? "Close menu" : "Open menu",
|
|
7909
|
+
"aria-expanded": b,
|
|
7908
7910
|
style: { flexShrink: 0, position: "relative", width: 32, height: 32 },
|
|
7909
|
-
children: /* @__PURE__ */ f(go, { mode: "wait", initial: !1, children:
|
|
7911
|
+
children: /* @__PURE__ */ f(go, { mode: "wait", initial: !1, children: b ? /* @__PURE__ */ f(
|
|
7910
7912
|
ke.span,
|
|
7911
7913
|
{
|
|
7912
7914
|
initial: { opacity: 0, rotate: -45, scale: 0.7 },
|
|
@@ -7934,7 +7936,7 @@ function Hh({
|
|
|
7934
7936
|
]
|
|
7935
7937
|
}
|
|
7936
7938
|
),
|
|
7937
|
-
/* @__PURE__ */ f(go, { children:
|
|
7939
|
+
/* @__PURE__ */ f(go, { children: b && /* @__PURE__ */ f(
|
|
7938
7940
|
ke.div,
|
|
7939
7941
|
{
|
|
7940
7942
|
variants: th,
|
|
@@ -7959,8 +7961,8 @@ function Hh({
|
|
|
7959
7961
|
initial: "hidden",
|
|
7960
7962
|
animate: "visible",
|
|
7961
7963
|
style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: 4 },
|
|
7962
|
-
children: t.map((
|
|
7963
|
-
|
|
7964
|
+
children: t.map((T) => /* @__PURE__ */ f(ke.li, { variants: ih, children: h(
|
|
7965
|
+
T,
|
|
7964
7966
|
/* @__PURE__ */ f(
|
|
7965
7967
|
m,
|
|
7966
7968
|
{
|
|
@@ -7971,18 +7973,18 @@ function Hh({
|
|
|
7971
7973
|
fontSize: "md",
|
|
7972
7974
|
fontWeight: "medium",
|
|
7973
7975
|
fontFamily: "var(--font-body)",
|
|
7974
|
-
color:
|
|
7976
|
+
color: T.isActive ? "blue.500" : "text.body",
|
|
7975
7977
|
borderRadius: "md",
|
|
7976
7978
|
_hover: { color: "blue.500", bg: "bg.subtle" },
|
|
7977
7979
|
cursor: "pointer",
|
|
7978
|
-
onClick: () =>
|
|
7979
|
-
children:
|
|
7980
|
+
onClick: () => v(!1),
|
|
7981
|
+
children: T.label
|
|
7980
7982
|
}
|
|
7981
7983
|
)
|
|
7982
|
-
) },
|
|
7984
|
+
) }, T.href))
|
|
7983
7985
|
}
|
|
7984
7986
|
),
|
|
7985
|
-
/* @__PURE__ */ f(ke.div, { variants: oh, initial: "hidden", animate: "visible", children: /* @__PURE__ */ f(m, { mt: "4", children:
|
|
7987
|
+
/* @__PURE__ */ f(ke.div, { variants: oh, initial: "hidden", animate: "visible", children: /* @__PURE__ */ f(m, { mt: "4", children: u ?? /* @__PURE__ */ f(C, { mobile: !0 }) }) })
|
|
7986
7988
|
]
|
|
7987
7989
|
}
|
|
7988
7990
|
)
|
|
@@ -8079,8 +8081,8 @@ function _h({
|
|
|
8079
8081
|
"aria-disabled": y.disabled,
|
|
8080
8082
|
tabIndex: y.disabled ? -1 : 0,
|
|
8081
8083
|
onClick: () => !y.disabled && u(y.id),
|
|
8082
|
-
onKeyDown: (
|
|
8083
|
-
(
|
|
8084
|
+
onKeyDown: (v) => {
|
|
8085
|
+
(v.key === "Enter" || v.key === " ") && !y.disabled && u(y.id);
|
|
8084
8086
|
},
|
|
8085
8087
|
display: "flex",
|
|
8086
8088
|
alignItems: "center",
|
|
@@ -8401,7 +8403,7 @@ function Uh({
|
|
|
8401
8403
|
children: c + 1
|
|
8402
8404
|
}
|
|
8403
8405
|
)
|
|
8404
|
-
),
|
|
8406
|
+
), v = !p && n !== "compact", x = p ? "text.muted" : r;
|
|
8405
8407
|
return /* @__PURE__ */ S(P.Fragment, { children: [
|
|
8406
8408
|
/* @__PURE__ */ f(
|
|
8407
8409
|
m,
|
|
@@ -8417,9 +8419,9 @@ function Uh({
|
|
|
8417
8419
|
display: "inline-flex",
|
|
8418
8420
|
alignItems: "center",
|
|
8419
8421
|
gap: "2",
|
|
8420
|
-
px:
|
|
8421
|
-
py:
|
|
8422
|
-
bg:
|
|
8422
|
+
px: v ? "2" : "0",
|
|
8423
|
+
py: v ? "1.5" : "0",
|
|
8424
|
+
bg: v ? a : "transparent",
|
|
8423
8425
|
borderRadius: "full",
|
|
8424
8426
|
transition: "all 0.25s ease",
|
|
8425
8427
|
children: [
|
|
@@ -8448,7 +8450,7 @@ function Uh({
|
|
|
8448
8450
|
fontSize: "sm",
|
|
8449
8451
|
fontWeight: h || u ? "semibold" : "medium",
|
|
8450
8452
|
fontFamily: "var(--font-body)",
|
|
8451
|
-
color:
|
|
8453
|
+
color: x,
|
|
8452
8454
|
whiteSpace: "nowrap",
|
|
8453
8455
|
transition: "color 0.25s",
|
|
8454
8456
|
children: d.title
|
|
@@ -9066,7 +9068,7 @@ function qh({
|
|
|
9066
9068
|
return /* @__PURE__ */ S(
|
|
9067
9069
|
m,
|
|
9068
9070
|
{
|
|
9069
|
-
bg: "bg.
|
|
9071
|
+
bg: "bg.primary",
|
|
9070
9072
|
border: "1px solid",
|
|
9071
9073
|
borderColor: "border",
|
|
9072
9074
|
borderRadius: "card",
|
|
@@ -9117,14 +9119,14 @@ function qh({
|
|
|
9117
9119
|
transition: "background 0.2s, border-color 0.2s, color 0.2s",
|
|
9118
9120
|
"aria-hidden": "true",
|
|
9119
9121
|
style: {
|
|
9120
|
-
border: l ? "none" : "1.5px solid var(--medix-form-
|
|
9122
|
+
border: l ? "none" : "1.5px solid var(--medix-form-text)",
|
|
9121
9123
|
background: l ? "#0685FF" : "transparent",
|
|
9122
9124
|
color: l ? "#ffffff" : "inherit",
|
|
9123
9125
|
flexShrink: 0
|
|
9124
9126
|
},
|
|
9125
|
-
children: l ? /* @__PURE__ */ f("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ f("rect", { x: "3", y: "8.25", width: "12", height: "1.5", rx: "0.75", fill: "
|
|
9126
|
-
/* @__PURE__ */ f("rect", { x: "3", y: "8.25", width: "12", height: "1.5", rx: "0.75", fill: "
|
|
9127
|
-
/* @__PURE__ */ f("rect", { x: "8.25", y: "3", width: "1.5", height: "12", rx: "0.75", fill: "
|
|
9127
|
+
children: l ? /* @__PURE__ */ f("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ f("rect", { x: "3", y: "8.25", width: "12", height: "1.5", rx: "0.75", fill: " var(--medix-form-text)" }) }) : /* @__PURE__ */ S("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
9128
|
+
/* @__PURE__ */ f("rect", { x: "3", y: "8.25", width: "12", height: "1.5", rx: "0.75", fill: " var(--medix-form-text)" }),
|
|
9129
|
+
/* @__PURE__ */ f("rect", { x: "8.25", y: "3", width: "1.5", height: "12", rx: "0.75", fill: " var(--medix-form-text)" })
|
|
9128
9130
|
] })
|
|
9129
9131
|
}
|
|
9130
9132
|
)
|
|
@@ -9271,13 +9273,12 @@ function Qh({
|
|
|
9271
9273
|
}, u = /* @__PURE__ */ S(
|
|
9272
9274
|
m,
|
|
9273
9275
|
{
|
|
9274
|
-
bg: "bg.
|
|
9276
|
+
bg: "bg.primary",
|
|
9275
9277
|
borderRadius: "card",
|
|
9276
9278
|
overflow: "hidden",
|
|
9277
9279
|
transition: "transform 0.22s ease, box-shadow 0.22s ease",
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
_hover: l ? { transform: "translateY(-4px)", boxShadow: "0 12px 32px rgba(0,0,0,0.13)" } : void 0,
|
|
9280
|
+
_dark: { bg: "bg.primary" },
|
|
9281
|
+
_hover: l ? { transform: "translateY(-4px)" } : void 0,
|
|
9281
9282
|
...a,
|
|
9282
9283
|
children: [
|
|
9283
9284
|
/* @__PURE__ */ S(m, { position: "relative", overflow: "hidden", children: [
|
|
@@ -9293,6 +9294,7 @@ function Qh({
|
|
|
9293
9294
|
/* @__PURE__ */ f(
|
|
9294
9295
|
m,
|
|
9295
9296
|
{
|
|
9297
|
+
borderRadius: "card",
|
|
9296
9298
|
h: "220px",
|
|
9297
9299
|
style: { background: "linear-gradient(135deg, #0685FF 0%, #7700CC 100%)" }
|
|
9298
9300
|
}
|
|
@@ -9414,13 +9416,13 @@ function ep({
|
|
|
9414
9416
|
style: h,
|
|
9415
9417
|
className: p
|
|
9416
9418
|
}) {
|
|
9417
|
-
const [g, y] = P.useState(r), [b,
|
|
9418
|
-
const
|
|
9419
|
-
y(
|
|
9420
|
-
}, C = P.useMemo(() => !
|
|
9421
|
-
const M =
|
|
9419
|
+
const [g, y] = P.useState(r), [b, v] = P.useState(a), x = r ?? g, w = r ? a : b, F = (k) => {
|
|
9420
|
+
const A = x === k && w === "asc" ? "desc" : "asc";
|
|
9421
|
+
y(k), v(A), l == null || l(k, A);
|
|
9422
|
+
}, C = P.useMemo(() => !x || l ? t : [...t].sort((k, A) => {
|
|
9423
|
+
const M = k[x], R = A[x], Y = String(M ?? ""), X = String(R ?? ""), Z = Y.localeCompare(X, void 0, { numeric: !0, sensitivity: "base" });
|
|
9422
9424
|
return w === "asc" ? Z : -Z;
|
|
9423
|
-
}), [t,
|
|
9425
|
+
}), [t, x, w, l]), T = ({ colKey: k }) => x !== k ? /* @__PURE__ */ f("span", { style: { opacity: 0.3, marginLeft: 4 }, children: "↕" }) : /* @__PURE__ */ f("span", { style: { marginLeft: 4 }, children: w === "asc" ? "↑" : "↓" }), V = {
|
|
9424
9426
|
padding: "12px 16px",
|
|
9425
9427
|
textAlign: "left",
|
|
9426
9428
|
fontSize: "12px",
|
|
@@ -9458,25 +9460,25 @@ function ep({
|
|
|
9458
9460
|
"aria-label": u,
|
|
9459
9461
|
children: [
|
|
9460
9462
|
u && /* @__PURE__ */ f("caption", { style: { display: "none" }, children: u }),
|
|
9461
|
-
/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ f("tr", { style: { background: "var(--chakra-colors-bg-subtle, #F6F6F6)" }, children: e.map((
|
|
9463
|
+
/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ f("tr", { style: { background: "var(--chakra-colors-bg-subtle, #F6F6F6)" }, children: e.map((k) => /* @__PURE__ */ f(
|
|
9462
9464
|
"th",
|
|
9463
9465
|
{
|
|
9464
9466
|
style: {
|
|
9465
9467
|
...V,
|
|
9466
|
-
textAlign:
|
|
9467
|
-
minWidth:
|
|
9468
|
-
cursor:
|
|
9468
|
+
textAlign: k.align ?? "left",
|
|
9469
|
+
minWidth: k.minWidth,
|
|
9470
|
+
cursor: k.sortable || s ? "pointer" : "default"
|
|
9469
9471
|
},
|
|
9470
|
-
onClick: () =>
|
|
9471
|
-
"aria-sort":
|
|
9472
|
+
onClick: () => k.sortable || s ? F(k.key) : void 0,
|
|
9473
|
+
"aria-sort": x === k.key ? w === "asc" ? "ascending" : "descending" : void 0,
|
|
9472
9474
|
children: /* @__PURE__ */ S("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
|
|
9473
|
-
|
|
9474
|
-
(
|
|
9475
|
+
k.label,
|
|
9476
|
+
(k.sortable || s) && /* @__PURE__ */ f(T, { colKey: k.key })
|
|
9475
9477
|
] })
|
|
9476
9478
|
},
|
|
9477
|
-
|
|
9479
|
+
k.key
|
|
9478
9480
|
)) }) }),
|
|
9479
|
-
/* @__PURE__ */ f("tbody", { children: i ? Array.from({ length: 5 }).map((
|
|
9481
|
+
/* @__PURE__ */ f("tbody", { children: i ? Array.from({ length: 5 }).map((k, A) => /* @__PURE__ */ f("tr", { children: e.map((M) => /* @__PURE__ */ f("td", { style: E, children: /* @__PURE__ */ f(
|
|
9480
9482
|
m,
|
|
9481
9483
|
{
|
|
9482
9484
|
h: "4",
|
|
@@ -9485,14 +9487,14 @@ function ep({
|
|
|
9485
9487
|
w: `${60 + Math.random() * 30}%`,
|
|
9486
9488
|
style: { animation: "medix-shimmer 1.5s infinite" }
|
|
9487
9489
|
}
|
|
9488
|
-
) }, M.key)) },
|
|
9489
|
-
const M = String(
|
|
9490
|
+
) }, M.key)) }, A)) : C.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: e.length, style: { ...E, textAlign: "center", padding: "48px 16px" }, children: /* @__PURE__ */ f(z, { color: "text.muted", fontFamily: "var(--font-body)", children: o }) }) }) : C.map((k, A) => {
|
|
9491
|
+
const M = String(k[n] ?? A);
|
|
9490
9492
|
return /* @__PURE__ */ f(
|
|
9491
9493
|
"tr",
|
|
9492
9494
|
{
|
|
9493
|
-
onClick: () => c == null ? void 0 : c(
|
|
9495
|
+
onClick: () => c == null ? void 0 : c(k, A),
|
|
9494
9496
|
style: {
|
|
9495
|
-
background: d &&
|
|
9497
|
+
background: d && A % 2 === 1 ? "var(--chakra-colors-bg-subtle, #F6F6F6)" : void 0,
|
|
9496
9498
|
cursor: c ? "pointer" : "default",
|
|
9497
9499
|
borderBottom: "1px solid var(--chakra-colors-border, #E2E8F0)",
|
|
9498
9500
|
transition: "background 0.1s"
|
|
@@ -9507,7 +9509,7 @@ function ep({
|
|
|
9507
9509
|
"td",
|
|
9508
9510
|
{
|
|
9509
9511
|
style: { ...E, textAlign: R.align ?? "left" },
|
|
9510
|
-
children: R.render ? R.render(
|
|
9512
|
+
children: R.render ? R.render(k[R.key], k, A) : String(k[R.key] ?? "—")
|
|
9511
9513
|
},
|
|
9512
9514
|
R.key
|
|
9513
9515
|
))
|