@dss-kit/ui-kit 0.1.9 → 0.1.11
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/components/controls/Button/Button.d.ts +2 -0
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts +1 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/ui-kit.cjs.js +4 -4
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +230 -226
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/dist/ui-kit.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as b, jsxs as R, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import { css as H, cx as O } from "@emotion/css";
|
|
3
3
|
import * as E from "react";
|
|
4
|
-
import { forwardRef as ot, useMemo as j, useRef as W, useState as
|
|
4
|
+
import { forwardRef as ot, useMemo as j, useRef as W, useState as gt, useCallback as pt, useImperativeHandle as Ve, useEffect as ht, useLayoutEffect as Ls, createContext as Ut, useId as Cn, useContext as X, useInsertionEffect as Os, Children as Is, isValidElement as Mo, Fragment as Bs, createElement as Eo, Component as Ao } from "react";
|
|
5
5
|
import { createPortal as Vo, flushSync as Do } from "react-dom";
|
|
6
6
|
function ko(t) {
|
|
7
7
|
const {
|
|
@@ -117,7 +117,7 @@ const Ns = (t) => /* @__PURE__ */ E.createElement("svg", { width: 24, height: 24
|
|
|
117
117
|
function Lo(t) {
|
|
118
118
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
119
119
|
}
|
|
120
|
-
var
|
|
120
|
+
var Ie = { exports: {} };
|
|
121
121
|
/*!
|
|
122
122
|
Copyright (c) 2018 Jed Watson.
|
|
123
123
|
Licensed under the MIT License (MIT), see
|
|
@@ -154,13 +154,13 @@ function Oo() {
|
|
|
154
154
|
}
|
|
155
155
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
156
156
|
})();
|
|
157
|
-
})(
|
|
157
|
+
})(Ie)), Ie.exports;
|
|
158
158
|
}
|
|
159
|
-
var
|
|
160
|
-
const Mt = /* @__PURE__ */ Lo(
|
|
161
|
-
rippleOverlay:
|
|
159
|
+
var Io = Oo();
|
|
160
|
+
const Mt = /* @__PURE__ */ Lo(Io), Bo = "_rippleOverlay_s2kim_8", No = "_ripple_s2kim_8", ui = {
|
|
161
|
+
rippleOverlay: Bo,
|
|
162
162
|
ripple: No
|
|
163
|
-
},
|
|
163
|
+
}, Be = "button, a, input, label, [role='button'], [data-ripple']";
|
|
164
164
|
function Fo(t) {
|
|
165
165
|
if (typeof t.composedPath == "function") return t.composedPath();
|
|
166
166
|
const e = [];
|
|
@@ -171,12 +171,12 @@ function Fo(t) {
|
|
|
171
171
|
}
|
|
172
172
|
const De = ot(
|
|
173
173
|
({ color: t = "rgba(0,0,0,0.18)", duration: e = 1e3, radius: n = "auto", className: i }, s) => {
|
|
174
|
-
const o = W(null), [r, a] =
|
|
174
|
+
const o = W(null), [r, a] = gt([]), l = W([]), u = W(1), c = W(null), h = () => {
|
|
175
175
|
l.current.forEach((m) => clearTimeout(m)), l.current = [];
|
|
176
|
-
}, d =
|
|
176
|
+
}, d = pt(
|
|
177
177
|
(m, y, v, x) => {
|
|
178
|
-
const p = v.getBoundingClientRect(), w = n === "auto" ? Math.max(p.width, p.height) * 2 : n, _ = m - x.left, C = y - x.top, S = Math.max(0, p.top - x.top), T = Math.max(0, p.left - x.left), A = Math.max(0, x.right - p.right), V = Math.max(0, x.bottom - p.bottom), dt = window.getComputedStyle(v).borderRadius || "0px",
|
|
179
|
-
id:
|
|
178
|
+
const p = v.getBoundingClientRect(), w = n === "auto" ? Math.max(p.width, p.height) * 2 : n, _ = m - x.left, C = y - x.top, S = Math.max(0, p.top - x.top), T = Math.max(0, p.left - x.left), A = Math.max(0, x.right - p.right), V = Math.max(0, x.bottom - p.bottom), dt = window.getComputedStyle(v).borderRadius || "0px", ft = u.current++, bt = {
|
|
179
|
+
id: ft,
|
|
180
180
|
left: _ - w / 2,
|
|
181
181
|
top: C - w / 2,
|
|
182
182
|
size: Math.ceil(w),
|
|
@@ -188,14 +188,14 @@ const De = ot(
|
|
|
188
188
|
},
|
|
189
189
|
borderRadius: dt
|
|
190
190
|
};
|
|
191
|
-
a((Rt) => [...Rt,
|
|
191
|
+
a((Rt) => [...Rt, bt]);
|
|
192
192
|
const kt = window.setTimeout(() => {
|
|
193
|
-
a((Rt) => Rt.filter((F) => F.id !==
|
|
193
|
+
a((Rt) => Rt.filter((F) => F.id !== ft));
|
|
194
194
|
}, e + 80);
|
|
195
195
|
l.current.push(kt);
|
|
196
196
|
},
|
|
197
197
|
[e, n]
|
|
198
|
-
), f =
|
|
198
|
+
), f = pt(
|
|
199
199
|
(m) => {
|
|
200
200
|
try {
|
|
201
201
|
if (!o.current) return;
|
|
@@ -206,7 +206,7 @@ const De = ot(
|
|
|
206
206
|
for (const T of x)
|
|
207
207
|
if (T instanceof Element) {
|
|
208
208
|
if (T === v) break;
|
|
209
|
-
if (T.matches && T.matches(
|
|
209
|
+
if (T.matches && T.matches(Be)) {
|
|
210
210
|
p = T;
|
|
211
211
|
break;
|
|
212
212
|
}
|
|
@@ -222,14 +222,14 @@ const De = ot(
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
[d]
|
|
225
|
-
), g =
|
|
225
|
+
), g = pt(
|
|
226
226
|
(m) => {
|
|
227
227
|
if (!o.current || !(m.key === "Enter" || m.key === " ")) return;
|
|
228
228
|
const y = o.current, v = y.parentElement;
|
|
229
229
|
if (!v) return;
|
|
230
230
|
const x = document.activeElement;
|
|
231
231
|
let p = null;
|
|
232
|
-
if (x instanceof Element && x.matches(
|
|
232
|
+
if (x instanceof Element && x.matches(Be) && (p = x), p || (p = v), p.closest && (p.closest("[disabled]") || p.getAttribute("aria-disabled") === "true"))
|
|
233
233
|
return;
|
|
234
234
|
const w = y.getBoundingClientRect(), _ = p.getBoundingClientRect().left + p.getBoundingClientRect().width / 2, C = p.getBoundingClientRect().top + p.getBoundingClientRect().height / 2;
|
|
235
235
|
d(_, C, p, w);
|
|
@@ -244,7 +244,7 @@ const De = ot(
|
|
|
244
244
|
if (!x) return;
|
|
245
245
|
const p = x.parentElement;
|
|
246
246
|
if (!p) return;
|
|
247
|
-
const w = x.getBoundingClientRect(), _ = document.activeElement instanceof Element && document.activeElement.matches(
|
|
247
|
+
const w = x.getBoundingClientRect(), _ = document.activeElement instanceof Element && document.activeElement.matches(Be) ? document.activeElement : p, C = m ? _.getBoundingClientRect().left + _.getBoundingClientRect().width / 2 : y ?? w.left + w.width / 2, S = m ? _.getBoundingClientRect().top + _.getBoundingClientRect().height / 2 : v ?? w.top + w.height / 2;
|
|
248
248
|
d(C, S, _, w);
|
|
249
249
|
}
|
|
250
250
|
}),
|
|
@@ -286,7 +286,7 @@ const De = ot(
|
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
288
|
function Sn(t, e) {
|
|
289
|
-
const { current: n } = W(t !== void 0), [i, s] =
|
|
289
|
+
const { current: n } = W(t !== void 0), [i, s] = gt(e), o = n ? t : i, r = pt(
|
|
290
290
|
(a) => {
|
|
291
291
|
n || s(a);
|
|
292
292
|
},
|
|
@@ -295,7 +295,7 @@ function Sn(t, e) {
|
|
|
295
295
|
return [o, r];
|
|
296
296
|
}
|
|
297
297
|
const zo = (t, e) => {
|
|
298
|
-
const [n, i] =
|
|
298
|
+
const [n, i] = gt({ top: 0, left: 0, width: 0 });
|
|
299
299
|
return Ls(() => {
|
|
300
300
|
if (!e || !t.current) return;
|
|
301
301
|
const s = () => {
|
|
@@ -393,7 +393,7 @@ const Zo = "_overlay_1udux_8", Jo = "_open_1udux_21", Qo = "_modal_1udux_25", ta
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
}, [t, a]);
|
|
396
|
-
const h =
|
|
396
|
+
const h = pt(
|
|
397
397
|
(f) => {
|
|
398
398
|
f.key === "Escape" && e && e();
|
|
399
399
|
},
|
|
@@ -403,7 +403,7 @@ const Zo = "_overlay_1udux_8", Jo = "_open_1udux_21", Qo = "_modal_1udux_25", ta
|
|
|
403
403
|
if (typeof window < "u" && typeof document < "u" && r && t)
|
|
404
404
|
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
405
405
|
}, [t, r, h]);
|
|
406
|
-
const d =
|
|
406
|
+
const d = pt(
|
|
407
407
|
(f) => {
|
|
408
408
|
f.target === f.currentTarget && o && e && e();
|
|
409
409
|
},
|
|
@@ -457,20 +457,20 @@ function Dn(t, e) {
|
|
|
457
457
|
const n = t.indexOf(e);
|
|
458
458
|
n > -1 && t.splice(n, 1);
|
|
459
459
|
}
|
|
460
|
-
const
|
|
460
|
+
const yt = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
461
461
|
function en(t, e) {
|
|
462
462
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
463
463
|
}
|
|
464
464
|
let Kt = () => {
|
|
465
|
-
},
|
|
465
|
+
}, vt = () => {
|
|
466
466
|
};
|
|
467
467
|
process.env.NODE_ENV !== "production" && (Kt = (t, e, n) => {
|
|
468
468
|
!t && typeof console < "u" && console.warn(en(e, n));
|
|
469
|
-
},
|
|
469
|
+
}, vt = (t, e, n) => {
|
|
470
470
|
if (!t)
|
|
471
471
|
throw new Error(en(e, n));
|
|
472
472
|
});
|
|
473
|
-
const
|
|
473
|
+
const xt = {}, $s = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
474
474
|
function Ws(t) {
|
|
475
475
|
return typeof t == "object" && t !== null;
|
|
476
476
|
}
|
|
@@ -531,12 +531,12 @@ function ue(t, e, n, i) {
|
|
|
531
531
|
const s = (o) => aa(o, 0, 1, t, n);
|
|
532
532
|
return (o) => o === 0 || o === 1 ? o : Hs(s(o), e, i);
|
|
533
533
|
}
|
|
534
|
-
const Gs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xs = (t) => (e) => 1 - t(1 - e), Ys = /* @__PURE__ */ ue(0.33, 1.53, 0.69, 0.99), On = /* @__PURE__ */ Xs(Ys), qs = /* @__PURE__ */ Gs(On), Zs = (t) => (t *= 2) < 1 ? 0.5 * On(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))),
|
|
534
|
+
const Gs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xs = (t) => (e) => 1 - t(1 - e), Ys = /* @__PURE__ */ ue(0.33, 1.53, 0.69, 0.99), On = /* @__PURE__ */ Xs(Ys), qs = /* @__PURE__ */ Gs(On), Zs = (t) => (t *= 2) < 1 ? 0.5 * On(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), In = (t) => 1 - Math.sin(Math.acos(t)), Js = Xs(In), Qs = Gs(In), la = /* @__PURE__ */ ue(0.42, 0, 1, 1), ca = /* @__PURE__ */ ue(0, 0, 0.58, 1), tr = /* @__PURE__ */ ue(0.42, 0, 0.58, 1), ua = (t) => Array.isArray(t) && typeof t[0] != "number", er = (t) => Array.isArray(t) && typeof t[0] == "number", di = {
|
|
535
535
|
linear: rt,
|
|
536
536
|
easeIn: la,
|
|
537
537
|
easeInOut: tr,
|
|
538
538
|
easeOut: ca,
|
|
539
|
-
circIn:
|
|
539
|
+
circIn: In,
|
|
540
540
|
circInOut: Qs,
|
|
541
541
|
circOut: Js,
|
|
542
542
|
backIn: On,
|
|
@@ -545,11 +545,11 @@ const Gs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xs
|
|
|
545
545
|
anticipate: Zs
|
|
546
546
|
}, ha = (t) => typeof t == "string", fi = (t) => {
|
|
547
547
|
if (er(t)) {
|
|
548
|
-
|
|
548
|
+
vt(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
549
549
|
const [e, n, i, s] = t;
|
|
550
550
|
return ue(e, n, i, s);
|
|
551
551
|
} else if (ha(t))
|
|
552
|
-
return
|
|
552
|
+
return vt(di[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), di[t];
|
|
553
553
|
return t;
|
|
554
554
|
}, me = [
|
|
555
555
|
"setup",
|
|
@@ -615,8 +615,8 @@ function nr(t, e) {
|
|
|
615
615
|
timestamp: 0,
|
|
616
616
|
isProcessing: !1
|
|
617
617
|
}, o = () => n = !0, r = me.reduce((p, w) => (p[w] = da(o), p), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: d, render: f, postRender: g } = r, m = () => {
|
|
618
|
-
const p =
|
|
619
|
-
n = !1,
|
|
618
|
+
const p = xt.useManualTiming ? s.timestamp : performance.now();
|
|
619
|
+
n = !1, xt.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(p - s.timestamp, fa), 1)), s.timestamp = p, s.isProcessing = !0, a.process(s), l.process(s), u.process(s), c.process(s), h.process(s), d.process(s), f.process(s), g.process(s), s.isProcessing = !1, n && e && (i = !1, t(m));
|
|
620
620
|
}, y = () => {
|
|
621
621
|
n = !0, i = !0, s.isProcessing || t(m);
|
|
622
622
|
};
|
|
@@ -628,23 +628,23 @@ function nr(t, e) {
|
|
|
628
628
|
r[me[w]].cancel(p);
|
|
629
629
|
}, state: s, steps: r };
|
|
630
630
|
}
|
|
631
|
-
const { schedule:
|
|
631
|
+
const { schedule: I, cancel: _t, state: K, steps: Fe } = /* @__PURE__ */ nr(typeof requestAnimationFrame < "u" ? requestAnimationFrame : rt, !0);
|
|
632
632
|
let xe;
|
|
633
633
|
function ma() {
|
|
634
634
|
xe = void 0;
|
|
635
635
|
}
|
|
636
636
|
const Q = {
|
|
637
|
-
now: () => (xe === void 0 && Q.set(K.isProcessing ||
|
|
637
|
+
now: () => (xe === void 0 && Q.set(K.isProcessing || xt.useManualTiming ? K.timestamp : performance.now()), xe),
|
|
638
638
|
set: (t) => {
|
|
639
639
|
xe = t, queueMicrotask(ma);
|
|
640
640
|
}
|
|
641
|
-
}, ir = (t) => (e) => typeof e == "string" && e.startsWith(t),
|
|
641
|
+
}, ir = (t) => (e) => typeof e == "string" && e.startsWith(t), Bn = /* @__PURE__ */ ir("--"), pa = /* @__PURE__ */ ir("var(--"), Nn = (t) => pa(t) ? ga.test(t.split("/*")[0].trim()) : !1, ga = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ht = {
|
|
642
642
|
test: (t) => typeof t == "number",
|
|
643
643
|
parse: parseFloat,
|
|
644
644
|
transform: (t) => t
|
|
645
645
|
}, se = {
|
|
646
646
|
...Ht,
|
|
647
|
-
transform: (t) =>
|
|
647
|
+
transform: (t) => yt(0, 1, t)
|
|
648
648
|
}, pe = {
|
|
649
649
|
...Ht,
|
|
650
650
|
default: 1
|
|
@@ -662,7 +662,7 @@ const va = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
662
662
|
[n]: parseFloat(r),
|
|
663
663
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
664
664
|
};
|
|
665
|
-
}, xa = (t) =>
|
|
665
|
+
}, xa = (t) => yt(0, 255, t), ze = {
|
|
666
666
|
...Ht,
|
|
667
667
|
transform: (t) => Math.round(xa(t))
|
|
668
668
|
}, Et = {
|
|
@@ -687,7 +687,7 @@ const nn = {
|
|
|
687
687
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
688
688
|
parse: parseFloat,
|
|
689
689
|
transform: (e) => `${e}${t}`
|
|
690
|
-
}),
|
|
690
|
+
}), wt = /* @__PURE__ */ he("deg"), ut = /* @__PURE__ */ he("%"), P = /* @__PURE__ */ he("px"), wa = /* @__PURE__ */ he("vh"), _a = /* @__PURE__ */ he("vw"), mi = {
|
|
691
691
|
...ut,
|
|
692
692
|
parse: (t) => ut.parse(t) / 100,
|
|
693
693
|
transform: (t) => ut.transform(t * 100)
|
|
@@ -738,7 +738,7 @@ function Aa(t) {
|
|
|
738
738
|
const e = ar(t);
|
|
739
739
|
return lr(t)(e.map(Ea));
|
|
740
740
|
}
|
|
741
|
-
const
|
|
741
|
+
const Tt = {
|
|
742
742
|
test: Ca,
|
|
743
743
|
parse: ar,
|
|
744
744
|
createTransformer: lr,
|
|
@@ -791,7 +791,7 @@ function La(t, e) {
|
|
|
791
791
|
return (n) => N(t, e, n);
|
|
792
792
|
}
|
|
793
793
|
function jn(t) {
|
|
794
|
-
return typeof t == "number" ? La : typeof t == "string" ? Nn(t) ? Ce : $.test(t) ? yi :
|
|
794
|
+
return typeof t == "number" ? La : typeof t == "string" ? Nn(t) ? Ce : $.test(t) ? yi : Ba : Array.isArray(t) ? cr : typeof t == "object" ? $.test(t) ? yi : Oa : Ce;
|
|
795
795
|
}
|
|
796
796
|
function cr(t, e) {
|
|
797
797
|
const n = [...t], i = n.length, s = t.map((o, r) => jn(o)(o, e[r]));
|
|
@@ -811,7 +811,7 @@ function Oa(t, e) {
|
|
|
811
811
|
return n;
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Ia(t, e) {
|
|
815
815
|
const n = [], i = { color: 0, var: 0, number: 0 };
|
|
816
816
|
for (let s = 0; s < e.values.length; s++) {
|
|
817
817
|
const o = e.types[s], r = t.indexes[o][i[o]], a = t.values[r] ?? 0;
|
|
@@ -819,9 +819,9 @@ function Ba(t, e) {
|
|
|
819
819
|
}
|
|
820
820
|
return n;
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
const n =
|
|
824
|
-
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? sn.has(t) && !s.values.length || sn.has(e) && !i.values.length ? Ra(t, e) : ce(cr(
|
|
822
|
+
const Ba = (t, e) => {
|
|
823
|
+
const n = Tt.createTransformer(e), i = re(t), s = re(e);
|
|
824
|
+
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? sn.has(t) && !s.values.length || sn.has(e) && !i.values.length ? Ra(t, e) : ce(cr(Ia(i, s), s.values), n) : (Kt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Ce(t, e));
|
|
825
825
|
};
|
|
826
826
|
function ur(t, e, n) {
|
|
827
827
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? N(t, e, n) : jn(t)(t, e);
|
|
@@ -829,8 +829,8 @@ function ur(t, e, n) {
|
|
|
829
829
|
const Na = (t) => {
|
|
830
830
|
const e = ({ timestamp: n }) => t(n);
|
|
831
831
|
return {
|
|
832
|
-
start: (n = !0) =>
|
|
833
|
-
stop: () =>
|
|
832
|
+
start: (n = !0) => I.update(e, n),
|
|
833
|
+
stop: () => _t(e),
|
|
834
834
|
/**
|
|
835
835
|
* If we're processing this frame we can use the
|
|
836
836
|
* framelocked timestamp to keep things in sync.
|
|
@@ -865,7 +865,7 @@ function dr(t, e, n) {
|
|
|
865
865
|
const i = Math.max(e - za, 0);
|
|
866
866
|
return Ks(n - t(i), e - i);
|
|
867
867
|
}
|
|
868
|
-
const
|
|
868
|
+
const B = {
|
|
869
869
|
// Default spring physics
|
|
870
870
|
stiffness: 100,
|
|
871
871
|
damping: 10,
|
|
@@ -894,11 +894,11 @@ const I = {
|
|
|
894
894
|
minDamping: 0.05,
|
|
895
895
|
maxDamping: 1
|
|
896
896
|
}, We = 1e-3;
|
|
897
|
-
function ja({ duration: t =
|
|
897
|
+
function ja({ duration: t = B.duration, bounce: e = B.bounce, velocity: n = B.velocity, mass: i = B.mass }) {
|
|
898
898
|
let s, o;
|
|
899
|
-
Kt(t <= /* @__PURE__ */ ct(
|
|
899
|
+
Kt(t <= /* @__PURE__ */ ct(B.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
900
900
|
let r = 1 - e;
|
|
901
|
-
r =
|
|
901
|
+
r = yt(B.minDamping, B.maxDamping, r), t = yt(B.minDuration, B.maxDuration, /* @__PURE__ */ st(t)), r < 1 ? (s = (u) => {
|
|
902
902
|
const c = u * r, h = c * t, d = c - n, f = rn(u, r), g = Math.exp(-h);
|
|
903
903
|
return We - d / f * g;
|
|
904
904
|
}, o = (u) => {
|
|
@@ -914,8 +914,8 @@ function ja({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.ve
|
|
|
914
914
|
const a = 5 / t, l = Wa(s, o, a);
|
|
915
915
|
if (t = /* @__PURE__ */ ct(t), isNaN(l))
|
|
916
916
|
return {
|
|
917
|
-
stiffness:
|
|
918
|
-
damping:
|
|
917
|
+
stiffness: B.stiffness,
|
|
918
|
+
damping: B.damping,
|
|
919
919
|
duration: t
|
|
920
920
|
};
|
|
921
921
|
{
|
|
@@ -943,19 +943,19 @@ function vi(t, e) {
|
|
|
943
943
|
}
|
|
944
944
|
function Ha(t) {
|
|
945
945
|
let e = {
|
|
946
|
-
velocity:
|
|
947
|
-
stiffness:
|
|
948
|
-
damping:
|
|
949
|
-
mass:
|
|
946
|
+
velocity: B.velocity,
|
|
947
|
+
stiffness: B.stiffness,
|
|
948
|
+
damping: B.damping,
|
|
949
|
+
mass: B.mass,
|
|
950
950
|
isResolvedFromDuration: !1,
|
|
951
951
|
...t
|
|
952
952
|
};
|
|
953
953
|
if (!vi(t, Ka) && vi(t, Ua))
|
|
954
954
|
if (t.visualDuration) {
|
|
955
|
-
const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, o = 2 *
|
|
955
|
+
const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, o = 2 * yt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
956
956
|
e = {
|
|
957
957
|
...e,
|
|
958
|
-
mass:
|
|
958
|
+
mass: B.mass,
|
|
959
959
|
stiffness: s,
|
|
960
960
|
damping: o
|
|
961
961
|
};
|
|
@@ -964,12 +964,12 @@ function Ha(t) {
|
|
|
964
964
|
e = {
|
|
965
965
|
...e,
|
|
966
966
|
...n,
|
|
967
|
-
mass:
|
|
967
|
+
mass: B.mass
|
|
968
968
|
}, e.isResolvedFromDuration = !0;
|
|
969
969
|
}
|
|
970
970
|
return e;
|
|
971
971
|
}
|
|
972
|
-
function Pe(t =
|
|
972
|
+
function Pe(t = B.visualDuration, e = B.bounce) {
|
|
973
973
|
const n = typeof t != "object" ? {
|
|
974
974
|
visualDuration: t,
|
|
975
975
|
keyframes: [0, 1],
|
|
@@ -980,7 +980,7 @@ function Pe(t = I.visualDuration, e = I.bounce) {
|
|
|
980
980
|
...n,
|
|
981
981
|
velocity: -/* @__PURE__ */ st(n.velocity || 0)
|
|
982
982
|
}), g = d || 0, m = u / (2 * Math.sqrt(l * c)), y = r - o, v = /* @__PURE__ */ st(Math.sqrt(l / c)), x = Math.abs(y) < 5;
|
|
983
|
-
i || (i = x ?
|
|
983
|
+
i || (i = x ? B.restSpeed.granular : B.restSpeed.default), s || (s = x ? B.restDelta.granular : B.restDelta.default);
|
|
984
984
|
let p;
|
|
985
985
|
if (m < 1) {
|
|
986
986
|
const _ = rn(v, m);
|
|
@@ -1057,7 +1057,7 @@ function on({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
1057
1057
|
};
|
|
1058
1058
|
}
|
|
1059
1059
|
function Ga(t, e, n) {
|
|
1060
|
-
const i = [], s = n ||
|
|
1060
|
+
const i = [], s = n || xt.mix || ur, o = t.length - 1;
|
|
1061
1061
|
for (let r = 0; r < o; r++) {
|
|
1062
1062
|
let a = s(t[r], t[r + 1]);
|
|
1063
1063
|
if (e) {
|
|
@@ -1070,7 +1070,7 @@ function Ga(t, e, n) {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
function Xa(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
1072
1072
|
const o = t.length;
|
|
1073
|
-
if (
|
|
1073
|
+
if (vt(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
|
|
1074
1074
|
return () => e[0];
|
|
1075
1075
|
if (o === 2 && e[0] === e[1])
|
|
1076
1076
|
return () => e[1];
|
|
@@ -1086,7 +1086,7 @@ function Xa(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
1086
1086
|
const d = /* @__PURE__ */ ie(t[h], t[h + 1], c);
|
|
1087
1087
|
return a[h](d);
|
|
1088
1088
|
};
|
|
1089
|
-
return n ? (c) => u(
|
|
1089
|
+
return n ? (c) => u(yt(t[0], t[o - 1], c)) : u;
|
|
1090
1090
|
}
|
|
1091
1091
|
function Ya(t, e) {
|
|
1092
1092
|
const n = t[t.length - 1];
|
|
@@ -1105,7 +1105,7 @@ function Za(t, e) {
|
|
|
1105
1105
|
function Ja(t, e) {
|
|
1106
1106
|
return t.map(() => e || tr).splice(0, t.length - 1);
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function It({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
1109
1109
|
const s = ua(i) ? i.map(fi) : fi(i), o = {
|
|
1110
1110
|
done: !1,
|
|
1111
1111
|
value: e[0]
|
|
@@ -1130,8 +1130,8 @@ function Wn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
|
|
|
1130
1130
|
const tl = {
|
|
1131
1131
|
decay: on,
|
|
1132
1132
|
inertia: on,
|
|
1133
|
-
tween:
|
|
1134
|
-
keyframes:
|
|
1133
|
+
tween: It,
|
|
1134
|
+
keyframes: It,
|
|
1135
1135
|
spring: Pe
|
|
1136
1136
|
};
|
|
1137
1137
|
function fr(t) {
|
|
@@ -1172,10 +1172,10 @@ class Kn extends Un {
|
|
|
1172
1172
|
initAnimation() {
|
|
1173
1173
|
const { options: e } = this;
|
|
1174
1174
|
fr(e);
|
|
1175
|
-
const { type: n =
|
|
1175
|
+
const { type: n = It, repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = e;
|
|
1176
1176
|
let { keyframes: a } = e;
|
|
1177
|
-
const l = n ||
|
|
1178
|
-
process.env.NODE_ENV !== "production" && l !==
|
|
1177
|
+
const l = n || It;
|
|
1178
|
+
process.env.NODE_ENV !== "production" && l !== It && vt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== It && typeof a[0] != "number" && (this.mixKeyframes = ce(el, ur(a[0], a[1])), a = [0, 100]);
|
|
1179
1179
|
const u = l({ ...e, keyframes: a });
|
|
1180
1180
|
o === "mirror" && (this.mirroredGenerator = l({
|
|
1181
1181
|
...e,
|
|
@@ -1201,7 +1201,7 @@ class Kn extends Un {
|
|
|
1201
1201
|
if (h) {
|
|
1202
1202
|
const T = Math.min(this.currentTime, s) / a;
|
|
1203
1203
|
let A = Math.floor(T), V = T % 1;
|
|
1204
|
-
!V && T >= 1 && (V = 1), V === 1 && A--, A = Math.min(A, h + 1), !!(A % 2) && (d === "reverse" ? (V = 1 - V, f && (V -= f / a)) : d === "mirror" && (w = r)), p =
|
|
1204
|
+
!V && T >= 1 && (V = 1), V === 1 && A--, A = Math.min(A, h + 1), !!(A % 2) && (d === "reverse" ? (V = 1 - V, f && (V -= f / a)) : d === "mirror" && (w = r)), p = yt(0, 1, V) * a;
|
|
1205
1205
|
}
|
|
1206
1206
|
const _ = x ? { done: !1, value: c[0] } : w.next(p);
|
|
1207
1207
|
o && (_.value = o(_.value));
|
|
@@ -1409,7 +1409,7 @@ class Hn {
|
|
|
1409
1409
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
|
|
1410
1410
|
}
|
|
1411
1411
|
scheduleResolve() {
|
|
1412
|
-
this.state = "scheduled", this.isAsync ? (Dt.add(this), hn || (hn = !0,
|
|
1412
|
+
this.state = "scheduled", this.isAsync ? (Dt.add(this), hn || (hn = !0, I.read(pr), I.resolveKeyframes(mr))) : (this.readKeyframes(), this.complete());
|
|
1413
1413
|
}
|
|
1414
1414
|
readKeyframes() {
|
|
1415
1415
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1502,7 +1502,7 @@ class vl extends Un {
|
|
|
1502
1502
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1503
1503
|
return;
|
|
1504
1504
|
const { element: n, name: i, keyframes: s, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
|
|
1505
|
-
this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e,
|
|
1505
|
+
this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, vt(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1506
1506
|
const u = yl(e);
|
|
1507
1507
|
this.animation = gl(n, i, s, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1508
1508
|
if (this.finishedTime = this.time, !o) {
|
|
@@ -1629,7 +1629,7 @@ class wl extends vl {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
}
|
|
1631
1631
|
const Si = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1632
|
-
(
|
|
1632
|
+
(Tt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1633
1633
|
!t.startsWith("url("));
|
|
1634
1634
|
function _l(t) {
|
|
1635
1635
|
const e = t[0];
|
|
@@ -1693,7 +1693,7 @@ class El extends Un {
|
|
|
1693
1693
|
onKeyframesResolved(e, n, i, s) {
|
|
1694
1694
|
this.keyframeResolver = void 0;
|
|
1695
1695
|
const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = i;
|
|
1696
|
-
this.resolvedAt = Q.now(), Tl(e, o, r, a) || ((
|
|
1696
|
+
this.resolvedAt = Q.now(), Tl(e, o, r, a) || ((xt.instantAnimations || !l) && c?.(Wn(e, i, n)), e[0] = e[e.length - 1], mn(i), i.repeat = 0);
|
|
1697
1697
|
const d = {
|
|
1698
1698
|
startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ml ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1699
1699
|
finalKeyframe: n,
|
|
@@ -1768,7 +1768,7 @@ function Vl(t) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
const Dl = 4;
|
|
1770
1770
|
function br(t, e, n = 1) {
|
|
1771
|
-
|
|
1771
|
+
vt(n <= Dl, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1772
1772
|
const [i, s] = Vl(t);
|
|
1773
1773
|
if (!i)
|
|
1774
1774
|
return;
|
|
@@ -1793,7 +1793,7 @@ const wr = /* @__PURE__ */ new Set([
|
|
|
1793
1793
|
]), kl = {
|
|
1794
1794
|
test: (t) => t === "auto",
|
|
1795
1795
|
parse: (t) => t
|
|
1796
|
-
}, _r = (t) => (e) => e.test(t), Tr = [Ht, P, ut,
|
|
1796
|
+
}, _r = (t) => (e) => e.test(t), Tr = [Ht, P, ut, wt, _a, wa, kl], Pi = (t) => Tr.find(_r(t));
|
|
1797
1797
|
function Rl(t) {
|
|
1798
1798
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Us(t) : !0;
|
|
1799
1799
|
}
|
|
@@ -1809,27 +1809,27 @@ function Ol(t) {
|
|
|
1809
1809
|
let o = Ll.has(e) ? 1 : 0;
|
|
1810
1810
|
return i !== n && (o *= 100), e + "(" + o + s + ")";
|
|
1811
1811
|
}
|
|
1812
|
-
const
|
|
1813
|
-
...
|
|
1812
|
+
const Il = /\b([a-z-]*)\(.*?\)/gu, pn = {
|
|
1813
|
+
...Tt,
|
|
1814
1814
|
getAnimatableNone: (t) => {
|
|
1815
|
-
const e = t.match(
|
|
1815
|
+
const e = t.match(Il);
|
|
1816
1816
|
return e ? e.map(Ol).join(" ") : t;
|
|
1817
1817
|
}
|
|
1818
1818
|
}, Mi = {
|
|
1819
1819
|
...Ht,
|
|
1820
1820
|
transform: Math.round
|
|
1821
|
-
},
|
|
1822
|
-
rotate:
|
|
1823
|
-
rotateX:
|
|
1824
|
-
rotateY:
|
|
1825
|
-
rotateZ:
|
|
1821
|
+
}, Bl = {
|
|
1822
|
+
rotate: wt,
|
|
1823
|
+
rotateX: wt,
|
|
1824
|
+
rotateY: wt,
|
|
1825
|
+
rotateZ: wt,
|
|
1826
1826
|
scale: pe,
|
|
1827
1827
|
scaleX: pe,
|
|
1828
1828
|
scaleY: pe,
|
|
1829
1829
|
scaleZ: pe,
|
|
1830
|
-
skew:
|
|
1831
|
-
skewX:
|
|
1832
|
-
skewY:
|
|
1830
|
+
skew: wt,
|
|
1831
|
+
skewX: wt,
|
|
1832
|
+
skewY: wt,
|
|
1833
1833
|
distance: P,
|
|
1834
1834
|
translateX: P,
|
|
1835
1835
|
translateY: P,
|
|
@@ -1879,7 +1879,7 @@ const Bl = /\b([a-z-]*)\(.*?\)/gu, pn = {
|
|
|
1879
1879
|
// Misc
|
|
1880
1880
|
backgroundPositionX: P,
|
|
1881
1881
|
backgroundPositionY: P,
|
|
1882
|
-
...
|
|
1882
|
+
...Bl,
|
|
1883
1883
|
zIndex: Mi,
|
|
1884
1884
|
// SVG
|
|
1885
1885
|
fillOpacity: se,
|
|
@@ -1904,7 +1904,7 @@ const Bl = /\b([a-z-]*)\(.*?\)/gu, pn = {
|
|
|
1904
1904
|
}, Cr = (t) => Nl[t];
|
|
1905
1905
|
function Sr(t, e) {
|
|
1906
1906
|
let n = Cr(t);
|
|
1907
|
-
return n !== pn && (n =
|
|
1907
|
+
return n !== pn && (n = Tt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1908
1908
|
}
|
|
1909
1909
|
const Fl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1910
1910
|
function zl(t, e, n) {
|
|
@@ -2053,7 +2053,7 @@ class Ul {
|
|
|
2053
2053
|
this.events[e] || (this.events[e] = new Rn());
|
|
2054
2054
|
const i = this.events[e].add(n);
|
|
2055
2055
|
return e === "change" ? () => {
|
|
2056
|
-
i(),
|
|
2056
|
+
i(), I.read(() => {
|
|
2057
2057
|
this.events.change.getSize() || this.stop();
|
|
2058
2058
|
});
|
|
2059
2059
|
} : i;
|
|
@@ -2290,7 +2290,7 @@ function Dr(t) {
|
|
|
2290
2290
|
function Zl(t) {
|
|
2291
2291
|
return Dr(t) && t.tagName === "svg";
|
|
2292
2292
|
}
|
|
2293
|
-
const Y = (t) => !!(t && t.getVelocity), Jl = [...Tr, $,
|
|
2293
|
+
const Y = (t) => !!(t && t.getVelocity), Jl = [...Tr, $, Tt], Ql = (t) => Jl.find(_r(t)), Zn = Ut({
|
|
2294
2294
|
transformPagePoint: (t) => t,
|
|
2295
2295
|
isStatic: !1,
|
|
2296
2296
|
reducedMotion: "never"
|
|
@@ -2401,18 +2401,18 @@ function kr(t = !0) {
|
|
|
2401
2401
|
if (t)
|
|
2402
2402
|
return s(o);
|
|
2403
2403
|
}, [t]);
|
|
2404
|
-
const r =
|
|
2404
|
+
const r = pt(() => t && i && i(o), [o, i, t]);
|
|
2405
2405
|
return !n && i ? [!1, r] : [!0];
|
|
2406
2406
|
}
|
|
2407
2407
|
const ge = (t) => t.key || "";
|
|
2408
2408
|
function Ri(t) {
|
|
2409
2409
|
const e = [];
|
|
2410
|
-
return
|
|
2410
|
+
return Is.forEach(t, (n) => {
|
|
2411
2411
|
Mo(n) && e.push(n);
|
|
2412
2412
|
}), e;
|
|
2413
2413
|
}
|
|
2414
2414
|
const oc = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", root: l }) => {
|
|
2415
|
-
const [u, c] = kr(r), h = j(() => Ri(t), [t]), d = r && !u ? [] : h.map(ge), f = W(!0), g = W(h), m = En(() => /* @__PURE__ */ new Map()), [y, v] =
|
|
2415
|
+
const [u, c] = kr(r), h = j(() => Ri(t), [t]), d = r && !u ? [] : h.map(ge), f = W(!0), g = W(h), m = En(() => /* @__PURE__ */ new Map()), [y, v] = gt(h), [x, p] = gt(h);
|
|
2416
2416
|
js(() => {
|
|
2417
2417
|
f.current = !1, g.current = h;
|
|
2418
2418
|
for (let C = 0; C < x.length; C++) {
|
|
@@ -2567,9 +2567,9 @@ function Oi(t) {
|
|
|
2567
2567
|
const ae = {};
|
|
2568
2568
|
function fc(t) {
|
|
2569
2569
|
for (const e in t)
|
|
2570
|
-
ae[e] = t[e],
|
|
2570
|
+
ae[e] = t[e], Bn(e) && (ae[e].isCSSVariable = !0);
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function Ir(t, { layout: e, layoutId: n }) {
|
|
2573
2573
|
return Xt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ae[t] || t === "opacity");
|
|
2574
2574
|
}
|
|
2575
2575
|
const mc = {
|
|
@@ -2605,7 +2605,7 @@ function ti(t, e, n) {
|
|
|
2605
2605
|
if (Xt.has(l)) {
|
|
2606
2606
|
r = !0;
|
|
2607
2607
|
continue;
|
|
2608
|
-
} else if (
|
|
2608
|
+
} else if (Bn(l)) {
|
|
2609
2609
|
s[l] = u;
|
|
2610
2610
|
continue;
|
|
2611
2611
|
} else {
|
|
@@ -2624,9 +2624,9 @@ const ei = () => ({
|
|
|
2624
2624
|
transformOrigin: {},
|
|
2625
2625
|
vars: {}
|
|
2626
2626
|
});
|
|
2627
|
-
function
|
|
2627
|
+
function Br(t, e, n) {
|
|
2628
2628
|
for (const i in e)
|
|
2629
|
-
!Y(e[i]) && !
|
|
2629
|
+
!Y(e[i]) && !Ir(i, n) && (t[i] = e[i]);
|
|
2630
2630
|
}
|
|
2631
2631
|
function yc({ transformTemplate: t }, e) {
|
|
2632
2632
|
return j(() => {
|
|
@@ -2636,7 +2636,7 @@ function yc({ transformTemplate: t }, e) {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
function vc(t, e) {
|
|
2638
2638
|
const n = t.style || {}, i = {};
|
|
2639
|
-
return
|
|
2639
|
+
return Br(i, n, t), Object.assign(i, yc(t, e)), i;
|
|
2640
2640
|
}
|
|
2641
2641
|
function xc(t, e) {
|
|
2642
2642
|
const n = {}, i = vc(t, e);
|
|
@@ -2688,7 +2688,7 @@ function Tc(t, e, n, i) {
|
|
|
2688
2688
|
}, [e]);
|
|
2689
2689
|
if (t.style) {
|
|
2690
2690
|
const o = {};
|
|
2691
|
-
|
|
2691
|
+
Br(o, t.style, t), s.style = { ...o, ...s.style };
|
|
2692
2692
|
}
|
|
2693
2693
|
return s;
|
|
2694
2694
|
}
|
|
@@ -2740,13 +2740,13 @@ function ni(t) {
|
|
|
2740
2740
|
);
|
|
2741
2741
|
}
|
|
2742
2742
|
function Sc(t, e, n, { latestValues: i }, s, o = !1) {
|
|
2743
|
-
const a = (ni(t) ? Tc : xc)(e, i, s, t), l = uc(e, typeof t == "string", o), u = t !==
|
|
2743
|
+
const a = (ni(t) ? Tc : xc)(e, i, s, t), l = uc(e, typeof t == "string", o), u = t !== Bs ? { ...l, ...a, ref: n } : {}, { children: c } = e, h = j(() => Y(c) ? c.get() : c, [c]);
|
|
2744
2744
|
return Eo(t, {
|
|
2745
2745
|
...u,
|
|
2746
2746
|
children: h
|
|
2747
2747
|
});
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2749
|
+
function Ii(t) {
|
|
2750
2750
|
const e = [{}, {}];
|
|
2751
2751
|
return t?.values.forEach((n, i) => {
|
|
2752
2752
|
e[0][i] = n.get(), e[1][i] = n.getVelocity();
|
|
@@ -2754,11 +2754,11 @@ function Bi(t) {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
function ii(t, e, n, i) {
|
|
2756
2756
|
if (typeof e == "function") {
|
|
2757
|
-
const [s, o] =
|
|
2757
|
+
const [s, o] = Ii(i);
|
|
2758
2758
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
2759
2759
|
}
|
|
2760
2760
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
2761
|
-
const [s, o] =
|
|
2761
|
+
const [s, o] = Ii(i);
|
|
2762
2762
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
2763
2763
|
}
|
|
2764
2764
|
return e;
|
|
@@ -2810,7 +2810,7 @@ const jr = (t) => (e, n) => {
|
|
|
2810
2810
|
function si(t, e, n) {
|
|
2811
2811
|
const { style: i } = t, s = {};
|
|
2812
2812
|
for (const o in i)
|
|
2813
|
-
(Y(i[o]) || e.style && Y(e.style[o]) ||
|
|
2813
|
+
(Y(i[o]) || e.style && Y(e.style[o]) || Ir(o, t) || n?.getValue(o)?.liveStyle !== void 0) && (s[o] = i[o]);
|
|
2814
2814
|
return s;
|
|
2815
2815
|
}
|
|
2816
2816
|
const Ec = /* @__PURE__ */ jr({
|
|
@@ -2830,13 +2830,13 @@ const Ac = /* @__PURE__ */ jr({
|
|
|
2830
2830
|
scrapeMotionValuesFromProps: $r,
|
|
2831
2831
|
createRenderState: Fr
|
|
2832
2832
|
}), Vc = Symbol.for("motionComponentSymbol");
|
|
2833
|
-
function
|
|
2833
|
+
function Bt(t) {
|
|
2834
2834
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
2835
2835
|
}
|
|
2836
2836
|
function Dc(t, e, n) {
|
|
2837
|
-
return
|
|
2837
|
+
return pt(
|
|
2838
2838
|
(i) => {
|
|
2839
|
-
i && t.onMount && t.onMount(i), e && (i ? e.mount(i) : e.unmount()), n && (typeof n == "function" ? n(i) :
|
|
2839
|
+
i && t.onMount && t.onMount(i), e && (i ? e.mount(i) : e.unmount()), n && (typeof n == "function" ? n(i) : Bt(n) && (n.current = i));
|
|
2840
2840
|
},
|
|
2841
2841
|
/**
|
|
2842
2842
|
* Include externalRef in dependencies to ensure the callback updates
|
|
@@ -2876,7 +2876,7 @@ function Lc(t, e, n, i) {
|
|
|
2876
2876
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Kr(t.parent)), t.projection.setOptions({
|
|
2877
2877
|
layoutId: s,
|
|
2878
2878
|
layout: o,
|
|
2879
|
-
alwaysMeasureLayout: !!r || a &&
|
|
2879
|
+
alwaysMeasureLayout: !!r || a && Bt(a),
|
|
2880
2880
|
visualElement: t,
|
|
2881
2881
|
/**
|
|
2882
2882
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -2907,8 +2907,8 @@ function Ke(t, { forwardMotionProps: e = !1 } = {}, n, i) {
|
|
|
2907
2907
|
layoutId: Oc(a)
|
|
2908
2908
|
}, { isStatic: h } = c, d = dc(a), f = s(a, h);
|
|
2909
2909
|
if (!h && An) {
|
|
2910
|
-
|
|
2911
|
-
const g =
|
|
2910
|
+
Ic(c, n);
|
|
2911
|
+
const g = Bc(c);
|
|
2912
2912
|
u = g.MeasureLayout, d.visualElement = Rc(t, f, c, i, g.ProjectionNode);
|
|
2913
2913
|
}
|
|
2914
2914
|
return R(Re.Provider, { value: d, children: [u && d.visualElement ? b(u, { visualElement: d.visualElement, ...c }) : null, Sc(t, a, Dc(f, d.visualElement, l), f, h, e)] });
|
|
@@ -2921,14 +2921,14 @@ function Oc({ layoutId: t }) {
|
|
|
2921
2921
|
const e = X(Mn).id;
|
|
2922
2922
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function Ic(t, e) {
|
|
2925
2925
|
const n = X(Rr).strict;
|
|
2926
2926
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
2927
2927
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2928
|
-
t.ignoreStrict ? Kt(!1, i, "lazy-strict-mode") :
|
|
2928
|
+
t.ignoreStrict ? Kt(!1, i, "lazy-strict-mode") : vt(!1, i, "lazy-strict-mode");
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function Bc(t) {
|
|
2932
2932
|
const { drag: e, layout: n } = Wt;
|
|
2933
2933
|
if (!e && !n)
|
|
2934
2934
|
return {};
|
|
@@ -2981,9 +2981,9 @@ function Pt(t) {
|
|
|
2981
2981
|
return gn(t) || Gr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2982
2982
|
}
|
|
2983
2983
|
function Gr(t) {
|
|
2984
|
-
return
|
|
2984
|
+
return Bi(t.x) || Bi(t.y);
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2986
|
+
function Bi(t) {
|
|
2987
2987
|
return t && t !== "0%";
|
|
2988
2988
|
}
|
|
2989
2989
|
function Ee(t, e, n) {
|
|
@@ -3099,7 +3099,7 @@ class Hc {
|
|
|
3099
3099
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
3100
3100
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
3101
3101
|
const d = Q.now();
|
|
3102
|
-
this.renderScheduledAt < d && (this.renderScheduledAt = d,
|
|
3102
|
+
this.renderScheduledAt < d && (this.renderScheduledAt = d, I.render(this.render, !1, !0));
|
|
3103
3103
|
};
|
|
3104
3104
|
const { latestValues: l, renderState: u } = r;
|
|
3105
3105
|
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Oe(n), this.isVariantNode = Or(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
@@ -3113,7 +3113,7 @@ class Hc {
|
|
|
3113
3113
|
this.current = e, Uc.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), qr.current || Wc(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : vn.current, process.env.NODE_ENV !== "production" && Ln(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
|
|
3114
3114
|
}
|
|
3115
3115
|
unmount() {
|
|
3116
|
-
this.projection && this.projection.unmount(),
|
|
3116
|
+
this.projection && this.projection.unmount(), _t(this.notifyUpdate), _t(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
3117
3117
|
for (const e in this.events)
|
|
3118
3118
|
this.events[e].clear();
|
|
3119
3119
|
for (const e in this.features) {
|
|
@@ -3133,7 +3133,7 @@ class Hc {
|
|
|
3133
3133
|
const i = Xt.has(e);
|
|
3134
3134
|
i && this.onBindTransform && this.onBindTransform();
|
|
3135
3135
|
const s = n.on("change", (r) => {
|
|
3136
|
-
this.latestValues[e] = r, this.props.onUpdate &&
|
|
3136
|
+
this.latestValues[e] = r, this.props.onUpdate && I.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
3137
3137
|
});
|
|
3138
3138
|
let o;
|
|
3139
3139
|
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
@@ -3250,7 +3250,7 @@ class Hc {
|
|
|
3250
3250
|
*/
|
|
3251
3251
|
readValue(e, n) {
|
|
3252
3252
|
let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
3253
|
-
return i != null && (typeof i == "string" && ($s(i) || Us(i)) ? i = parseFloat(i) : !Ql(i) &&
|
|
3253
|
+
return i != null && (typeof i == "string" && ($s(i) || Us(i)) ? i = parseFloat(i) : !Ql(i) && Tt.test(n) && (i = Sr(e, n)), this.setBaseTarget(e, Y(i) ? i.get() : i)), Y(i) ? i.get() : i;
|
|
3254
3254
|
}
|
|
3255
3255
|
/**
|
|
3256
3256
|
* Set the base target to later animate back to. This is currently
|
|
@@ -3326,7 +3326,7 @@ class Xc extends Zr {
|
|
|
3326
3326
|
if (Xt.has(n))
|
|
3327
3327
|
return this.projection?.isProjecting ? cn(n) : rl(e, n);
|
|
3328
3328
|
{
|
|
3329
|
-
const i = Gc(e), s = (
|
|
3329
|
+
const i = Gc(e), s = (Bn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
3330
3330
|
return typeof s == "string" ? s.trim() : s;
|
|
3331
3331
|
}
|
|
3332
3332
|
}
|
|
@@ -3398,7 +3398,7 @@ class qc extends Zr {
|
|
|
3398
3398
|
}
|
|
3399
3399
|
}
|
|
3400
3400
|
const Zc = (t, e) => ni(t) ? new qc(e) : new Xc(e, {
|
|
3401
|
-
allowProjection: t !==
|
|
3401
|
+
allowProjection: t !== Bs
|
|
3402
3402
|
});
|
|
3403
3403
|
function jt(t, e, n) {
|
|
3404
3404
|
const i = t.getProps();
|
|
@@ -3427,8 +3427,8 @@ function bn(t, e) {
|
|
|
3427
3427
|
const n = t.getValue("willChange");
|
|
3428
3428
|
if (eu(n))
|
|
3429
3429
|
return n.add(e);
|
|
3430
|
-
if (!n &&
|
|
3431
|
-
const i = new
|
|
3430
|
+
if (!n && xt.WillChange) {
|
|
3431
|
+
const i = new xt.WillChange("auto");
|
|
3432
3432
|
t.addValue("willChange", i), i.add(e);
|
|
3433
3433
|
}
|
|
3434
3434
|
}
|
|
@@ -3483,10 +3483,10 @@ const oi = (t, e, n, i = {}, s, o) => (r) => {
|
|
|
3483
3483
|
};
|
|
3484
3484
|
cu(a) || Object.assign(c, lu(t, c)), c.duration && (c.duration = /* @__PURE__ */ ct(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ ct(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
3485
3485
|
let h = !1;
|
|
3486
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (mn(c), c.delay === 0 && (h = !0)), (
|
|
3486
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (mn(c), c.delay === 0 && (h = !0)), (xt.instantAnimations || xt.skipAnimations) && (h = !0, mn(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
|
|
3487
3487
|
const d = iu(c.keyframes, a);
|
|
3488
3488
|
if (d !== void 0) {
|
|
3489
|
-
|
|
3489
|
+
I.update(() => {
|
|
3490
3490
|
c.onUpdate(d), c.onComplete();
|
|
3491
3491
|
});
|
|
3492
3492
|
return;
|
|
@@ -3516,7 +3516,7 @@ function eo(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3516
3516
|
if (window.MotionHandoffAnimation) {
|
|
3517
3517
|
const v = to(t);
|
|
3518
3518
|
if (v) {
|
|
3519
|
-
const x = window.MotionHandoffAnimation(v, c,
|
|
3519
|
+
const x = window.MotionHandoffAnimation(v, c, I);
|
|
3520
3520
|
x !== null && (f.startTime = x, m = !0);
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
@@ -3525,7 +3525,7 @@ function eo(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3525
3525
|
y && l.push(y);
|
|
3526
3526
|
}
|
|
3527
3527
|
return r && Promise.all(l).then(() => {
|
|
3528
|
-
|
|
3528
|
+
I.update(() => {
|
|
3529
3529
|
r && tu(t, r);
|
|
3530
3530
|
});
|
|
3531
3531
|
}), l;
|
|
@@ -3635,20 +3635,20 @@ function yu(t) {
|
|
|
3635
3635
|
const V = Array.isArray(p) ? p : [p];
|
|
3636
3636
|
let q = V.reduce(s(v), {});
|
|
3637
3637
|
_ === !1 && (q = {});
|
|
3638
|
-
const { prevResolvedValues: dt = {} } = x,
|
|
3638
|
+
const { prevResolvedValues: dt = {} } = x, ft = {
|
|
3639
3639
|
...dt,
|
|
3640
3640
|
...q
|
|
3641
|
-
},
|
|
3641
|
+
}, bt = (F) => {
|
|
3642
3642
|
T = !0, d.has(F) && (A = !0, d.delete(F)), x.needsAnimating[F] = !0;
|
|
3643
3643
|
const J = t.getValue(F);
|
|
3644
3644
|
J && (J.liveStyle = !1);
|
|
3645
3645
|
};
|
|
3646
|
-
for (const F in
|
|
3646
|
+
for (const F in ft) {
|
|
3647
3647
|
const J = q[F], D = dt[F];
|
|
3648
3648
|
if (f.hasOwnProperty(F))
|
|
3649
3649
|
continue;
|
|
3650
3650
|
let k = !1;
|
|
3651
|
-
xn(J) && xn(D) ? k = !io(J, D) : k = J !== D, k ? J != null ?
|
|
3651
|
+
xn(J) && xn(D) ? k = !io(J, D) : k = J !== D, k ? J != null ? bt(F) : d.add(F) : J !== void 0 && d.has(F) ? bt(F) : x.protectedKeys[F] = !0;
|
|
3652
3652
|
}
|
|
3653
3653
|
x.prevProp = p, x.prevResolvedValues = q, x.isActive && (f = { ...f, ...q }), i && t.blockInitialAnimation && (T = !1);
|
|
3654
3654
|
const kt = C && S;
|
|
@@ -3722,14 +3722,14 @@ function Ki() {
|
|
|
3722
3722
|
exit: St()
|
|
3723
3723
|
};
|
|
3724
3724
|
}
|
|
3725
|
-
class
|
|
3725
|
+
class Ct {
|
|
3726
3726
|
constructor(e) {
|
|
3727
3727
|
this.isMounted = !1, this.node = e;
|
|
3728
3728
|
}
|
|
3729
3729
|
update() {
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
3732
|
-
class xu extends
|
|
3732
|
+
class xu extends Ct {
|
|
3733
3733
|
/**
|
|
3734
3734
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3735
3735
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -3757,7 +3757,7 @@ class xu extends Tt {
|
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
let bu = 0;
|
|
3760
|
-
class wu extends
|
|
3760
|
+
class wu extends Ct {
|
|
3761
3761
|
constructor() {
|
|
3762
3762
|
super(...arguments), this.id = bu++;
|
|
3763
3763
|
}
|
|
@@ -3848,7 +3848,7 @@ class lo {
|
|
|
3848
3848
|
const { onStart: v, onMove: x } = this.handlers;
|
|
3849
3849
|
f || (v && v(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, d);
|
|
3850
3850
|
}, this.handlePointerMove = (d, f) => {
|
|
3851
|
-
this.lastMoveEvent = d, this.lastMoveEventInfo = Ge(f, this.transformPagePoint),
|
|
3851
|
+
this.lastMoveEvent = d, this.lastMoveEventInfo = Ge(f, this.transformPagePoint), I.update(this.updatePoint, !0);
|
|
3852
3852
|
}, this.handlePointerUp = (d, f) => {
|
|
3853
3853
|
this.end();
|
|
3854
3854
|
const { onEnd: g, onSessionEnd: m, resumeAnimation: y } = this.handlers;
|
|
@@ -3868,7 +3868,7 @@ class lo {
|
|
|
3868
3868
|
this.handlers = e;
|
|
3869
3869
|
}
|
|
3870
3870
|
end() {
|
|
3871
|
-
this.removeListeners && this.removeListeners(),
|
|
3871
|
+
this.removeListeners && this.removeListeners(), _t(this.updatePoint);
|
|
3872
3872
|
}
|
|
3873
3873
|
}
|
|
3874
3874
|
function Ge(t, e) {
|
|
@@ -3934,12 +3934,12 @@ function Ou(t, e) {
|
|
|
3934
3934
|
y: Ji(t.y, e.y)
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
3937
|
-
function
|
|
3937
|
+
function Iu(t, e) {
|
|
3938
3938
|
let n = 0.5;
|
|
3939
3939
|
const i = Z(t), s = Z(e);
|
|
3940
|
-
return s > i ? n = /* @__PURE__ */ ie(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ ie(t.min, t.max - s, e.min)),
|
|
3940
|
+
return s > i ? n = /* @__PURE__ */ ie(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ ie(t.min, t.max - s, e.min)), yt(0, 1, n);
|
|
3941
3941
|
}
|
|
3942
|
-
function
|
|
3942
|
+
function Bu(t, e) {
|
|
3943
3943
|
const n = {};
|
|
3944
3944
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3945
3945
|
}
|
|
@@ -3985,7 +3985,7 @@ class zu {
|
|
|
3985
3985
|
}
|
|
3986
3986
|
}
|
|
3987
3987
|
this.originPoint[v] = x;
|
|
3988
|
-
}), m &&
|
|
3988
|
+
}), m && I.postRender(() => m(h, d)), bn(this.visualElement, "transform");
|
|
3989
3989
|
const { animationState: y } = this.visualElement;
|
|
3990
3990
|
y && y.setActive("whileDrag", !0);
|
|
3991
3991
|
}, a = (h, d) => {
|
|
@@ -4025,7 +4025,7 @@ class zu {
|
|
|
4025
4025
|
const { velocity: r } = s;
|
|
4026
4026
|
this.startAnimation(r);
|
|
4027
4027
|
const { onDragEnd: a } = this.getProps();
|
|
4028
|
-
a &&
|
|
4028
|
+
a && I.postRender(() => a(i, s));
|
|
4029
4029
|
}
|
|
4030
4030
|
/**
|
|
4031
4031
|
* @internal
|
|
@@ -4047,16 +4047,16 @@ class zu {
|
|
|
4047
4047
|
}
|
|
4048
4048
|
resolveConstraints() {
|
|
4049
4049
|
const { dragConstraints: e, dragElastic: n } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, s = this.constraints;
|
|
4050
|
-
e &&
|
|
4051
|
-
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
4050
|
+
e && Bt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = Lu(i.layoutBox, e) : this.constraints = !1, this.elastic = Nu(n), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && it((o) => {
|
|
4051
|
+
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Bu(i.layoutBox[o], this.constraints[o]));
|
|
4052
4052
|
});
|
|
4053
4053
|
}
|
|
4054
4054
|
resolveRefConstraints() {
|
|
4055
4055
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
4056
|
-
if (!e || !
|
|
4056
|
+
if (!e || !Bt(e))
|
|
4057
4057
|
return !1;
|
|
4058
4058
|
const i = e.current;
|
|
4059
|
-
|
|
4059
|
+
vt(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
4060
4060
|
const { projection: s } = this.visualElement;
|
|
4061
4061
|
if (!s || !s.layout)
|
|
4062
4062
|
return !1;
|
|
@@ -4133,7 +4133,7 @@ class zu {
|
|
|
4133
4133
|
if (!this.visualElement.current)
|
|
4134
4134
|
return;
|
|
4135
4135
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: i } = this.visualElement;
|
|
4136
|
-
if (!
|
|
4136
|
+
if (!Bt(n) || !i || !this.constraints)
|
|
4137
4137
|
return;
|
|
4138
4138
|
this.stopAnimation();
|
|
4139
4139
|
const s = { x: 0, y: 0 };
|
|
@@ -4141,7 +4141,7 @@ class zu {
|
|
|
4141
4141
|
const a = this.getAxisMotionValue(r);
|
|
4142
4142
|
if (a && this.constraints !== !1) {
|
|
4143
4143
|
const l = a.get();
|
|
4144
|
-
s[r] =
|
|
4144
|
+
s[r] = Iu({ min: l, max: l }, this.constraints[r]);
|
|
4145
4145
|
}
|
|
4146
4146
|
});
|
|
4147
4147
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
@@ -4161,9 +4161,9 @@ class zu {
|
|
|
4161
4161
|
u && c && this.start(l);
|
|
4162
4162
|
}), i = () => {
|
|
4163
4163
|
const { dragConstraints: l } = this.getProps();
|
|
4164
|
-
|
|
4164
|
+
Bt(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
4165
4165
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
|
|
4166
|
-
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()),
|
|
4166
|
+
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), I.read(i);
|
|
4167
4167
|
const r = le(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
|
|
4168
4168
|
this.isDragging && u && (it((c) => {
|
|
4169
4169
|
const h = this.getAxisMotionValue(c);
|
|
@@ -4194,7 +4194,7 @@ function ju(t, e = 10) {
|
|
|
4194
4194
|
let n = null;
|
|
4195
4195
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4196
4196
|
}
|
|
4197
|
-
class $u extends
|
|
4197
|
+
class $u extends Ct {
|
|
4198
4198
|
constructor(e) {
|
|
4199
4199
|
super(e), this.removeGroupControls = rt, this.removeListeners = rt, this.controls = new zu(e);
|
|
4200
4200
|
}
|
|
@@ -4207,9 +4207,9 @@ class $u extends Tt {
|
|
|
4207
4207
|
}
|
|
4208
4208
|
}
|
|
4209
4209
|
const es = (t) => (e, n) => {
|
|
4210
|
-
t &&
|
|
4210
|
+
t && I.postRender(() => t(e, n));
|
|
4211
4211
|
};
|
|
4212
|
-
class Wu extends
|
|
4212
|
+
class Wu extends Ct {
|
|
4213
4213
|
constructor() {
|
|
4214
4214
|
super(...arguments), this.removePointerDownListener = rt;
|
|
4215
4215
|
}
|
|
@@ -4226,7 +4226,7 @@ class Wu extends Tt {
|
|
|
4226
4226
|
onStart: es(n),
|
|
4227
4227
|
onMove: i,
|
|
4228
4228
|
onEnd: (o, r) => {
|
|
4229
|
-
delete this.session, s &&
|
|
4229
|
+
delete this.session, s && I.postRender(() => s(o, r));
|
|
4230
4230
|
}
|
|
4231
4231
|
};
|
|
4232
4232
|
}
|
|
@@ -4269,10 +4269,10 @@ const qt = {
|
|
|
4269
4269
|
}
|
|
4270
4270
|
}, Uu = {
|
|
4271
4271
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
4272
|
-
const i = t, s =
|
|
4272
|
+
const i = t, s = Tt.parse(t);
|
|
4273
4273
|
if (s.length > 5)
|
|
4274
4274
|
return i;
|
|
4275
|
-
const o =
|
|
4275
|
+
const o = Tt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
4276
4276
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
4277
4277
|
const u = N(a, l, 0.5);
|
|
4278
4278
|
return typeof s[2 + r] == "number" && (s[2 + r] /= u), typeof s[3 + r] == "number" && (s[3 + r] /= u), o(s);
|
|
@@ -4296,7 +4296,7 @@ class Ku extends Ao {
|
|
|
4296
4296
|
}
|
|
4297
4297
|
getSnapshotBeforeUpdate(e) {
|
|
4298
4298
|
const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, { projection: r } = i;
|
|
4299
|
-
return r && (r.isPresent = o, Ye = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() ||
|
|
4299
|
+
return r && (r.isPresent = o, Ye = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || I.postRender(() => {
|
|
4300
4300
|
const a = r.getStack();
|
|
4301
4301
|
(!a || !a.members.length) && this.safeToRemove();
|
|
4302
4302
|
}))), null;
|
|
@@ -4361,9 +4361,9 @@ class Yu {
|
|
|
4361
4361
|
function qu(t, e) {
|
|
4362
4362
|
const n = Q.now(), i = ({ timestamp: s }) => {
|
|
4363
4363
|
const o = s - n;
|
|
4364
|
-
o >= e && (
|
|
4364
|
+
o >= e && (_t(i), t(o - e));
|
|
4365
4365
|
};
|
|
4366
|
-
return
|
|
4366
|
+
return I.setup(i, !0), () => _t(i);
|
|
4367
4367
|
}
|
|
4368
4368
|
const ho = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Zu = ho.length, is = (t) => typeof t == "string" ? parseFloat(t) : t, ss = (t) => typeof t == "number" || P.test(t);
|
|
4369
4369
|
function Ju(t, e, n, i, s, o) {
|
|
@@ -4512,7 +4512,7 @@ function go(t) {
|
|
|
4512
4512
|
const n = to(e);
|
|
4513
4513
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
4514
4514
|
const { layout: s, layoutId: o } = t.options;
|
|
4515
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
4515
|
+
window.MotionCancelOptimisedAnimation(n, "transform", I, !(s || o));
|
|
4516
4516
|
}
|
|
4517
4517
|
const { parent: i } = t;
|
|
4518
4518
|
i && !i.hasCheckedOptimisedAppear && go(i);
|
|
@@ -4550,7 +4550,7 @@ function yo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4550
4550
|
if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
4551
4551
|
let c, h = 0;
|
|
4552
4552
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
4553
|
-
|
|
4553
|
+
I.read(() => {
|
|
4554
4554
|
h = window.innerWidth;
|
|
4555
4555
|
}), t(r, () => {
|
|
4556
4556
|
const f = window.innerWidth;
|
|
@@ -4579,7 +4579,7 @@ function yo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4579
4579
|
unmount() {
|
|
4580
4580
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
4581
4581
|
const r = this.getStack();
|
|
4582
|
-
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(),
|
|
4582
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), _t(this.updateProjection);
|
|
4583
4583
|
}
|
|
4584
4584
|
// only on the root
|
|
4585
4585
|
blockUpdate() {
|
|
@@ -4631,7 +4631,7 @@ function yo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4631
4631
|
}
|
|
4632
4632
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(mh), this.nodes.forEach(ch), this.nodes.forEach(uh)) : this.nodes.forEach(ys), this.clearAllSnapshots();
|
|
4633
4633
|
const a = Q.now();
|
|
4634
|
-
K.delta =
|
|
4634
|
+
K.delta = yt(0, 1e3 / 60, a - K.timestamp), K.timestamp = a, K.isProcessing = !0, Fe.update.process(K), Fe.preRender.process(K), Fe.render.process(K), K.isProcessing = !1;
|
|
4635
4635
|
}
|
|
4636
4636
|
didUpdate() {
|
|
4637
4637
|
this.updateScheduled || (this.updateScheduled = !0, Yn.read(this.scheduleUpdate));
|
|
@@ -4640,10 +4640,10 @@ function yo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4640
4640
|
this.nodes.forEach(fh), this.sharedNodes.forEach(vh);
|
|
4641
4641
|
}
|
|
4642
4642
|
scheduleUpdateProjection() {
|
|
4643
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
4643
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, I.preRender(this.updateProjection, !1, !0));
|
|
4644
4644
|
}
|
|
4645
4645
|
scheduleCheckAfterUnmount() {
|
|
4646
|
-
|
|
4646
|
+
I.postRender(() => {
|
|
4647
4647
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
4648
4648
|
});
|
|
4649
4649
|
}
|
|
@@ -4828,7 +4828,7 @@ function yo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4828
4828
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4829
4829
|
}
|
|
4830
4830
|
startAnimation(r) {
|
|
4831
|
-
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (
|
|
4831
|
+
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (_t(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = I.update(() => {
|
|
4832
4832
|
_e.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = $t(0)), this.currentAnimation = Gu(this.motionValue, [0, 1e3], {
|
|
4833
4833
|
...r,
|
|
4834
4834
|
velocity: 0,
|
|
@@ -5109,9 +5109,9 @@ function Cs(t, e, n) {
|
|
|
5109
5109
|
const { props: i } = t;
|
|
5110
5110
|
t.animationState && i.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
5111
5111
|
const s = "onHover" + n, o = i[s];
|
|
5112
|
-
o &&
|
|
5112
|
+
o && I.postRender(() => o(e, de(e)));
|
|
5113
5113
|
}
|
|
5114
|
-
class Ph extends
|
|
5114
|
+
class Ph extends Ct {
|
|
5115
5115
|
mount() {
|
|
5116
5116
|
const { current: e } = this.node;
|
|
5117
5117
|
e && (this.unmount = Hl(e, (n, i) => (Cs(this.node, i, "Start"), (s) => Cs(this.node, s, "End"))));
|
|
@@ -5119,7 +5119,7 @@ class Ph extends Tt {
|
|
|
5119
5119
|
unmount() {
|
|
5120
5120
|
}
|
|
5121
5121
|
}
|
|
5122
|
-
class Mh extends
|
|
5122
|
+
class Mh extends Ct {
|
|
5123
5123
|
constructor() {
|
|
5124
5124
|
super(...arguments), this.isActive = !1;
|
|
5125
5125
|
}
|
|
@@ -5147,9 +5147,9 @@ function Ss(t, e, n) {
|
|
|
5147
5147
|
return;
|
|
5148
5148
|
t.animationState && i.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
5149
5149
|
const s = "onTap" + (n === "End" ? "" : n), o = i[s];
|
|
5150
|
-
o &&
|
|
5150
|
+
o && I.postRender(() => o(e, de(e)));
|
|
5151
5151
|
}
|
|
5152
|
-
class Eh extends
|
|
5152
|
+
class Eh extends Ct {
|
|
5153
5153
|
mount() {
|
|
5154
5154
|
const { current: e } = this.node;
|
|
5155
5155
|
e && (this.unmount = ql(e, (n, i) => (Ss(this.node, i, "Start"), (s, { success: o }) => Ss(this.node, s, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
@@ -5179,7 +5179,7 @@ const Rh = {
|
|
|
5179
5179
|
some: 0,
|
|
5180
5180
|
all: 1
|
|
5181
5181
|
};
|
|
5182
|
-
class Lh extends
|
|
5182
|
+
class Lh extends Ct {
|
|
5183
5183
|
constructor() {
|
|
5184
5184
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
5185
5185
|
}
|
|
@@ -5214,7 +5214,7 @@ class Lh extends Tt {
|
|
|
5214
5214
|
function Oh({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
5215
5215
|
return (n) => t[n] !== e[n];
|
|
5216
5216
|
}
|
|
5217
|
-
const
|
|
5217
|
+
const Ih = {
|
|
5218
5218
|
inView: {
|
|
5219
5219
|
Feature: Lh
|
|
5220
5220
|
},
|
|
@@ -5227,16 +5227,16 @@ const Bh = {
|
|
|
5227
5227
|
hover: {
|
|
5228
5228
|
Feature: Ph
|
|
5229
5229
|
}
|
|
5230
|
-
},
|
|
5230
|
+
}, Bh = {
|
|
5231
5231
|
layout: {
|
|
5232
5232
|
ProjectionNode: xo,
|
|
5233
5233
|
MeasureLayout: uo
|
|
5234
5234
|
}
|
|
5235
5235
|
}, Nh = {
|
|
5236
5236
|
..._u,
|
|
5237
|
-
...
|
|
5237
|
+
...Ih,
|
|
5238
5238
|
...Sh,
|
|
5239
|
-
...
|
|
5239
|
+
...Bh
|
|
5240
5240
|
}, ai = /* @__PURE__ */ Nc(Nh, Zc), Fh = "_primary_13825_8", zh = "_secondary_13825_12", jh = "_tertiary_13825_16", $h = "_positive_13825_20", Wh = "_negative_13825_24", Uh = "_warning_13825_28", Kh = "_accent_13825_32", Hh = "_inverse_13825_36", Gh = "_text_13825_111", Xh = "_regular_13825_117", Yh = "_medium_13825_121", qh = "_semibold_13825_125", Zh = "_bold_13825_129", ve = {
|
|
5241
5241
|
primary: Fh,
|
|
5242
5242
|
secondary: zh,
|
|
@@ -5298,7 +5298,7 @@ const Bh = {
|
|
|
5298
5298
|
onClick: h,
|
|
5299
5299
|
disabled: d,
|
|
5300
5300
|
...f
|
|
5301
|
-
} = t, [g, m] =
|
|
5301
|
+
} = t, [g, m] = gt(!1), y = !!h, v = () => y && m(!0), x = () => y && m(!1), p = r, w = y ? H({
|
|
5302
5302
|
opacity: g ? u : 1,
|
|
5303
5303
|
transition: `opacity ${c}ms ease`
|
|
5304
5304
|
}) : "";
|
|
@@ -5460,9 +5460,10 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5460
5460
|
iconLeft: v,
|
|
5461
5461
|
iconRight: x,
|
|
5462
5462
|
intensity: p = "primary",
|
|
5463
|
-
|
|
5463
|
+
flex: w,
|
|
5464
|
+
..._
|
|
5464
5465
|
}) => {
|
|
5465
|
-
const
|
|
5466
|
+
const C = j(() => {
|
|
5466
5467
|
switch (m) {
|
|
5467
5468
|
case "full":
|
|
5468
5469
|
return "100%";
|
|
@@ -5471,19 +5472,19 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5471
5472
|
default:
|
|
5472
5473
|
return m;
|
|
5473
5474
|
}
|
|
5474
|
-
}, [m]),
|
|
5475
|
+
}, [m]), S = j(() => u || (l === "filled" ? f === "neutral" ? "var(--fill-neutral-secondary)" : `var(--fill-${f}-${p})` : "transparent"), [l, u, f, p]), T = j(() => {
|
|
5475
5476
|
if (p === "primary") {
|
|
5476
5477
|
if (f === "neutral") return "var(--text-secondary)";
|
|
5477
5478
|
if (l === "filled") return "var(--text-inverse)";
|
|
5478
5479
|
} else if (f === "neutral") return "var(--text-secondary)";
|
|
5479
5480
|
return `var(--text-${f})`;
|
|
5480
|
-
}, [p, f, l]),
|
|
5481
|
+
}, [p, f, l]), A = j(() => {
|
|
5481
5482
|
if (p === "primary") {
|
|
5482
5483
|
if (f === "neutral") return "secondary";
|
|
5483
5484
|
if (l === "filled") return "inverse";
|
|
5484
5485
|
} else if (f === "neutral") return "secondary";
|
|
5485
5486
|
return f;
|
|
5486
|
-
}, [l,
|
|
5487
|
+
}, [l, f, p]), V = j(() => d || (l === "outline" ? `var(--border-${f}-${p})` : "transparent"), [l, d, f, p]), q = j(() => {
|
|
5487
5488
|
switch (y) {
|
|
5488
5489
|
case "lg":
|
|
5489
5490
|
return Zt.lg;
|
|
@@ -5495,22 +5496,22 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5495
5496
|
default:
|
|
5496
5497
|
return Zt.md;
|
|
5497
5498
|
}
|
|
5498
|
-
}, [y]),
|
|
5499
|
+
}, [y]), dt = O(
|
|
5499
5500
|
id,
|
|
5500
5501
|
od(l, f, p, t),
|
|
5501
5502
|
rd[l],
|
|
5502
5503
|
s,
|
|
5503
5504
|
t ? o : void 0,
|
|
5504
5505
|
H({
|
|
5505
|
-
borderRadius: g ? Zt[g] :
|
|
5506
|
-
backgroundColor:
|
|
5507
|
-
borderColor:
|
|
5506
|
+
borderRadius: g ? Zt[g] : q,
|
|
5507
|
+
backgroundColor: S,
|
|
5508
|
+
borderColor: V,
|
|
5508
5509
|
color: c,
|
|
5509
5510
|
width: "100%",
|
|
5510
5511
|
height: sd[y],
|
|
5511
5512
|
opacity: t ? 0.7 : 1
|
|
5512
5513
|
})
|
|
5513
|
-
),
|
|
5514
|
+
), ft = j(() => {
|
|
5514
5515
|
switch (y) {
|
|
5515
5516
|
case "lg":
|
|
5516
5517
|
case "md":
|
|
@@ -5526,7 +5527,8 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5526
5527
|
M,
|
|
5527
5528
|
{
|
|
5528
5529
|
className: O(i),
|
|
5529
|
-
w:
|
|
5530
|
+
w: C,
|
|
5531
|
+
flex: w,
|
|
5530
5532
|
relative: !0,
|
|
5531
5533
|
overflow: "hidden",
|
|
5532
5534
|
children: /* @__PURE__ */ R(
|
|
@@ -5537,19 +5539,19 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5537
5539
|
boxShadow: "inset 0 0 0 10000px rgba(0,0,0,0.1)",
|
|
5538
5540
|
transition: { duration: 0 }
|
|
5539
5541
|
} : {},
|
|
5540
|
-
className:
|
|
5542
|
+
className: dt,
|
|
5541
5543
|
disabled: t || e,
|
|
5542
5544
|
onClick: n,
|
|
5543
|
-
...
|
|
5545
|
+
..._,
|
|
5544
5546
|
children: [
|
|
5545
|
-
e ? /* @__PURE__ */ b(nd, { color:
|
|
5547
|
+
e ? /* @__PURE__ */ b(nd, { color: T }) : /* @__PURE__ */ R(Ae, { children: [
|
|
5546
5548
|
v,
|
|
5547
5549
|
/* @__PURE__ */ b(
|
|
5548
5550
|
Qh,
|
|
5549
5551
|
{
|
|
5550
5552
|
style: { color: c },
|
|
5551
|
-
colorName:
|
|
5552
|
-
variant:
|
|
5553
|
+
colorName: A,
|
|
5554
|
+
variant: ft,
|
|
5553
5555
|
className: r,
|
|
5554
5556
|
textOverflow: "ellipsis",
|
|
5555
5557
|
overflow: "hidden",
|
|
@@ -5564,7 +5566,7 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5564
5566
|
)
|
|
5565
5567
|
}
|
|
5566
5568
|
);
|
|
5567
|
-
}, ad = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: "currentColor" })), ld = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M19 13H5v-2h14v2z", fill: "currentColor" })), cd = "_checkbox_asmiz_8", ud = "_disabled_asmiz_15", hd = "_checkbox__ripple_asmiz_15", dd = "_checkbox__input_asmiz_27", fd = "_checkbox__box_asmiz_35", md = "_secondary_asmiz_48", pd = "_checked_asmiz_54", gd = "_error_asmiz_63",
|
|
5569
|
+
}, ad = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: "currentColor" })), ld = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M19 13H5v-2h14v2z", fill: "currentColor" })), cd = "_checkbox_asmiz_8", ud = "_disabled_asmiz_15", hd = "_checkbox__ripple_asmiz_15", dd = "_checkbox__input_asmiz_27", fd = "_checkbox__box_asmiz_35", md = "_secondary_asmiz_48", pd = "_checked_asmiz_54", gd = "_error_asmiz_63", mt = {
|
|
5568
5570
|
checkbox: cd,
|
|
5569
5571
|
disabled: ud,
|
|
5570
5572
|
checkbox__ripple: hd,
|
|
@@ -5590,14 +5592,14 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5590
5592
|
variant: d = "primary",
|
|
5591
5593
|
flex: f
|
|
5592
5594
|
}, g) => {
|
|
5593
|
-
const [m, y] =
|
|
5595
|
+
const [m, y] = gt(!1), v = t !== void 0, x = v ? t : m, p = (C) => {
|
|
5594
5596
|
v || y(C.target.checked), e?.(C);
|
|
5595
5597
|
}, w = yd[o], _ = x || s;
|
|
5596
5598
|
return /* @__PURE__ */ R(
|
|
5597
5599
|
"label",
|
|
5598
5600
|
{
|
|
5599
|
-
className: O(
|
|
5600
|
-
[
|
|
5601
|
+
className: O(mt.checkbox, H({ flex: f }), {
|
|
5602
|
+
[mt.disabled]: n
|
|
5601
5603
|
}),
|
|
5602
5604
|
children: [
|
|
5603
5605
|
/* @__PURE__ */ R(
|
|
@@ -5621,8 +5623,8 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5621
5623
|
disabled: n,
|
|
5622
5624
|
name: c,
|
|
5623
5625
|
required: h,
|
|
5624
|
-
className: O(
|
|
5625
|
-
[
|
|
5626
|
+
className: O(mt.checkbox__input, {
|
|
5627
|
+
[mt.disabled]: n
|
|
5626
5628
|
})
|
|
5627
5629
|
}
|
|
5628
5630
|
),
|
|
@@ -5630,12 +5632,12 @@ const Qh = ai(L), td = "_loader_1qleq_8", ed = {
|
|
|
5630
5632
|
"div",
|
|
5631
5633
|
{
|
|
5632
5634
|
className: O(
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
+
mt.checkbox__box,
|
|
5636
|
+
mt[d],
|
|
5635
5637
|
{
|
|
5636
|
-
[
|
|
5637
|
-
[
|
|
5638
|
-
[
|
|
5638
|
+
[mt.disabled]: n,
|
|
5639
|
+
[mt.error]: i,
|
|
5640
|
+
[mt.checked]: _
|
|
5639
5641
|
}
|
|
5640
5642
|
),
|
|
5641
5643
|
children: _ && (s ? /* @__PURE__ */ b(ld, { width: w * 0.75, height: w * 0.75 }) : /* @__PURE__ */ b(ad, { width: w * 0.75, height: w * 0.75 }))
|
|
@@ -5753,8 +5755,8 @@ const Md = ot((t, e) => {
|
|
|
5753
5755
|
rows: V,
|
|
5754
5756
|
autoResize: q,
|
|
5755
5757
|
onChange: dt,
|
|
5756
|
-
multiline:
|
|
5757
|
-
...
|
|
5758
|
+
multiline: ft,
|
|
5759
|
+
...bt
|
|
5758
5760
|
} = g;
|
|
5759
5761
|
return /* @__PURE__ */ b(
|
|
5760
5762
|
"textarea",
|
|
@@ -5764,7 +5766,7 @@ const Md = ot((t, e) => {
|
|
|
5764
5766
|
className: O(et.input, { [et.disabled]: h }),
|
|
5765
5767
|
disabled: h,
|
|
5766
5768
|
maxLength: t.maxLength,
|
|
5767
|
-
...
|
|
5769
|
+
...bt,
|
|
5768
5770
|
value: x,
|
|
5769
5771
|
onChange: w
|
|
5770
5772
|
}
|
|
@@ -5843,15 +5845,15 @@ const Md = ot((t, e) => {
|
|
|
5843
5845
|
] });
|
|
5844
5846
|
});
|
|
5845
5847
|
Md.displayName = "Input";
|
|
5846
|
-
const Ed = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Ad = (t) => /* @__PURE__ */ E.createElement("svg", { fill: "currentColor", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 462.035 462.035", xmlSpace: "preserve", ...t }, /* @__PURE__ */ E.createElement("g", null, /* @__PURE__ */ E.createElement("path", { d: "M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z" }))), Vd = "_avatar_1oe2p_8", Dd = "_avatar_primary_1oe2p_22", kd = "_avatar_secondary_1oe2p_25", Rd = "_avatar_negative_1oe2p_28", Ld = "_avatar_positive_1oe2p_31", Od = "_avatar_warning_1oe2p_34",
|
|
5848
|
+
const Ed = (t) => /* @__PURE__ */ E.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ E.createElement("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Ad = (t) => /* @__PURE__ */ E.createElement("svg", { fill: "currentColor", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 462.035 462.035", xmlSpace: "preserve", ...t }, /* @__PURE__ */ E.createElement("g", null, /* @__PURE__ */ E.createElement("path", { d: "M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z" }))), Vd = "_avatar_1oe2p_8", Dd = "_avatar_primary_1oe2p_22", kd = "_avatar_secondary_1oe2p_25", Rd = "_avatar_negative_1oe2p_28", Ld = "_avatar_positive_1oe2p_31", Od = "_avatar_warning_1oe2p_34", Id = "_avatar_lgSize_1oe2p_71", Bd = "_avatar_mdSize_1oe2p_85", Nd = "_avatar_smSize_1oe2p_99", tn = {
|
|
5847
5849
|
avatar: Vd,
|
|
5848
5850
|
avatar_primary: Dd,
|
|
5849
5851
|
avatar_secondary: kd,
|
|
5850
5852
|
avatar_negative: Rd,
|
|
5851
5853
|
avatar_positive: Ld,
|
|
5852
5854
|
avatar_warning: Od,
|
|
5853
|
-
avatar_lgSize:
|
|
5854
|
-
avatar_mdSize:
|
|
5855
|
+
avatar_lgSize: Id,
|
|
5856
|
+
avatar_mdSize: Bd,
|
|
5855
5857
|
avatar_smSize: Nd
|
|
5856
5858
|
};
|
|
5857
5859
|
function nm({
|
|
@@ -6051,7 +6053,7 @@ const Fd = (t) => /* @__PURE__ */ E.createElement("svg", { width: 24, height: 24
|
|
|
6051
6053
|
);
|
|
6052
6054
|
wo.displayName = "Tag";
|
|
6053
6055
|
const af = ({ children: t }) => {
|
|
6054
|
-
const [e] =
|
|
6056
|
+
const [e] = gt(() => document.createElement("div"));
|
|
6055
6057
|
return ht(() => {
|
|
6056
6058
|
let n = document.getElementById("portal-root");
|
|
6057
6059
|
return n || (n = document.createElement("div"), n.id = "portal-root", document.body.appendChild(n)), n.appendChild(e), () => {
|
|
@@ -6109,7 +6111,7 @@ function sm({
|
|
|
6109
6111
|
const [w, _] = Sn(
|
|
6110
6112
|
t,
|
|
6111
6113
|
n ? [] : null
|
|
6112
|
-
), C = W(null), S = W(null), [T, A] =
|
|
6114
|
+
), C = W(null), S = W(null), [T, A] = gt(!1), V = j(
|
|
6113
6115
|
() => n ? w || [] : w != null ? [w] : [],
|
|
6114
6116
|
[w, n]
|
|
6115
6117
|
), q = j(() => {
|
|
@@ -6117,7 +6119,7 @@ function sm({
|
|
|
6117
6119
|
return r.forEach((k) => {
|
|
6118
6120
|
D.set(i(k), k);
|
|
6119
6121
|
}), D;
|
|
6120
|
-
}, [r, i]), dt = zo(C, T),
|
|
6122
|
+
}, [r, i]), dt = zo(C, T), ft = !r.length && !x, bt = (D) => {
|
|
6121
6123
|
const k = i(D);
|
|
6122
6124
|
if (n) {
|
|
6123
6125
|
const G = V.includes(k) ? V.filter((fe) => fe !== k) : [...V, k];
|
|
@@ -6136,10 +6138,10 @@ function sm({
|
|
|
6136
6138
|
if (!T) return;
|
|
6137
6139
|
const D = (k) => {
|
|
6138
6140
|
const G = k.target;
|
|
6139
|
-
!C.current?.contains(G) && !S.current?.contains(G) && A(!1);
|
|
6141
|
+
!C.current?.contains(G) && !S.current?.contains(G) && (A(!1), y?.());
|
|
6140
6142
|
};
|
|
6141
6143
|
return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
6142
|
-
}, [T]);
|
|
6144
|
+
}, [T, y]);
|
|
6143
6145
|
const F = () => {
|
|
6144
6146
|
if (!V.length)
|
|
6145
6147
|
return /* @__PURE__ */ b(
|
|
@@ -6148,6 +6150,7 @@ function sm({
|
|
|
6148
6150
|
variant: l === "xs" ? "caption-1" : "body-2",
|
|
6149
6151
|
textOverflow: "ellipsis",
|
|
6150
6152
|
overflow: "hidden",
|
|
6153
|
+
colorName: "tertiary",
|
|
6151
6154
|
children: o ?? "Select..."
|
|
6152
6155
|
}
|
|
6153
6156
|
);
|
|
@@ -6174,6 +6177,7 @@ function sm({
|
|
|
6174
6177
|
variant: l === "xs" ? "caption-1" : "body-2",
|
|
6175
6178
|
textOverflow: "ellipsis",
|
|
6176
6179
|
overflow: "hidden",
|
|
6180
|
+
colorName: "tertiary",
|
|
6177
6181
|
children: o
|
|
6178
6182
|
}
|
|
6179
6183
|
);
|
|
@@ -6209,7 +6213,7 @@ function sm({
|
|
|
6209
6213
|
className: U["select-menu-item"],
|
|
6210
6214
|
role: "option",
|
|
6211
6215
|
onClick: Rt,
|
|
6212
|
-
children: /* @__PURE__ */ b(L, { variant: "body-2", children: o })
|
|
6216
|
+
children: /* @__PURE__ */ b(L, { variant: "body-2", colorName: "tertiary", children: o })
|
|
6213
6217
|
}
|
|
6214
6218
|
),
|
|
6215
6219
|
d && /* @__PURE__ */ b(
|
|
@@ -6222,7 +6226,7 @@ function sm({
|
|
|
6222
6226
|
children: d
|
|
6223
6227
|
}
|
|
6224
6228
|
),
|
|
6225
|
-
|
|
6229
|
+
ft && /* @__PURE__ */ R(M, { className: U["empty-block"], children: [
|
|
6226
6230
|
/* @__PURE__ */ b(M, { w: 20, h: 20, children: /* @__PURE__ */ b(Ad, {}) }),
|
|
6227
6231
|
/* @__PURE__ */ b(L, { variant: "body-2", children: m ?? "There is nothing yet" })
|
|
6228
6232
|
] }),
|
|
@@ -6239,7 +6243,7 @@ function sm({
|
|
|
6239
6243
|
}),
|
|
6240
6244
|
role: "option",
|
|
6241
6245
|
relative: !0,
|
|
6242
|
-
onClick: () =>
|
|
6246
|
+
onClick: () => bt(D),
|
|
6243
6247
|
children: [
|
|
6244
6248
|
n && /* @__PURE__ */ b(bo, { size: "sm", checked: G }),
|
|
6245
6249
|
typeof s(D) == "string" ? /* @__PURE__ */ b(
|
|
@@ -6392,7 +6396,7 @@ const mf = (t) => /* @__PURE__ */ E.createElement("svg", { width: 10, height: 10
|
|
|
6392
6396
|
}),
|
|
6393
6397
|
[g, m, s, i, r]
|
|
6394
6398
|
);
|
|
6395
|
-
const v =
|
|
6399
|
+
const v = pt(
|
|
6396
6400
|
(w) => {
|
|
6397
6401
|
m(w.target.checked), s?.(w.target.checked);
|
|
6398
6402
|
},
|
|
@@ -6553,7 +6557,7 @@ function Es(t, e) {
|
|
|
6553
6557
|
throw new Error("Unexpected undefined");
|
|
6554
6558
|
return t;
|
|
6555
6559
|
}
|
|
6556
|
-
const Of = (t, e) => Math.abs(t - e) < 1.01,
|
|
6560
|
+
const Of = (t, e) => Math.abs(t - e) < 1.01, If = (t, e, n) => {
|
|
6557
6561
|
let i;
|
|
6558
6562
|
return function(...s) {
|
|
6559
6563
|
t.clearTimeout(i), i = t.setTimeout(() => e.apply(this, s), n);
|
|
@@ -6561,7 +6565,7 @@ const Of = (t, e) => Math.abs(t - e) < 1.01, Bf = (t, e, n) => {
|
|
|
6561
6565
|
}, As = (t) => {
|
|
6562
6566
|
const { offsetWidth: e, offsetHeight: n } = t;
|
|
6563
6567
|
return { width: e, height: n };
|
|
6564
|
-
},
|
|
6568
|
+
}, Bf = (t) => t, Nf = (t) => {
|
|
6565
6569
|
const e = Math.max(t.startIndex - t.overscan, 0), n = Math.min(t.endIndex + t.overscan, t.count - 1), i = [];
|
|
6566
6570
|
for (let s = e; s <= n; s++)
|
|
6567
6571
|
i.push(s);
|
|
@@ -6608,7 +6612,7 @@ const Of = (t, e) => Math.abs(t - e) < 1.01, Bf = (t, e, n) => {
|
|
|
6608
6612
|
return;
|
|
6609
6613
|
let s = 0;
|
|
6610
6614
|
const o = t.options.useScrollendEvent && Ds ? () => {
|
|
6611
|
-
} :
|
|
6615
|
+
} : If(
|
|
6612
6616
|
i,
|
|
6613
6617
|
() => {
|
|
6614
6618
|
e(s, !1);
|
|
@@ -6681,7 +6685,7 @@ class Wf {
|
|
|
6681
6685
|
scrollPaddingStart: 0,
|
|
6682
6686
|
scrollPaddingEnd: 0,
|
|
6683
6687
|
horizontal: !1,
|
|
6684
|
-
getItemKey:
|
|
6688
|
+
getItemKey: Bf,
|
|
6685
6689
|
rangeExtractor: Nf,
|
|
6686
6690
|
onChange: () => {
|
|
6687
6691
|
},
|
|
@@ -7072,7 +7076,7 @@ const Gf = "_main_pl2ip_8", Rs = {
|
|
|
7072
7076
|
estimatedItemHeight: i = 100,
|
|
7073
7077
|
virtualize: s = !1
|
|
7074
7078
|
}, o) => {
|
|
7075
|
-
const r = W(null), a = j(() =>
|
|
7079
|
+
const r = W(null), a = j(() => Is.toArray(t), [t]), l = Hf({
|
|
7076
7080
|
count: a.length,
|
|
7077
7081
|
getScrollElement: () => r.current,
|
|
7078
7082
|
estimateSize: () => i,
|