@moveindustries/movement-design-system 1.1.5 → 1.2.0
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/CHANGELOG.md +38 -0
- package/dist/assets/fonts/NeueHaasUnicaPro.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Black.otf +0 -0
- package/dist/assets/fonts/TWKEverett-BlackItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Bold.otf +0 -0
- package/dist/assets/fonts/TWKEverett-BoldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Extrabold.otf +0 -0
- package/dist/assets/fonts/TWKEverett-ExtraboldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Hairline.otf +0 -0
- package/dist/assets/fonts/TWKEverett-HairlineItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Light.otf +0 -0
- package/dist/assets/fonts/TWKEverett-LightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Medium.otf +0 -0
- package/dist/assets/fonts/TWKEverett-MediumItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Regular.otf +0 -0
- package/dist/assets/fonts/TWKEverett-RegularItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Super.otf +0 -0
- package/dist/assets/fonts/TWKEverett-SuperItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Thin.otf +0 -0
- package/dist/assets/fonts/TWKEverett-ThinItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Ultralight.otf +0 -0
- package/dist/assets/fonts/TWKEverett-UltralightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Black.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-BlackItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Bold.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-BoldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Extrabold.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-ExtraboldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Hairline.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-HairlineItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Light.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-LightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Medium.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-MediumItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Regular.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-RegularItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Super.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-SuperItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Thin.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-ThinItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Ultralight.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-UltralightItalic.otf +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Bold.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Medium.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-MediumItalic.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Regular.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-RegularItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Bold.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Medium.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-MediumItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Regular.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-RegularItalic.woff2 +0 -0
- package/dist/{button-Dmwbc4J_.cjs → button-DZAlWvkC.cjs} +1 -1
- package/dist/{button-DBoRj4Bh.js → button-Dh2vlJOI.js} +4 -4
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +42 -42
- package/dist/components/WalletModal/WalletModal.d.ts.map +1 -1
- package/dist/components/shadcn/button.d.ts +1 -1
- package/dist/components/shadcn/input.d.ts +1 -1
- package/dist/components/shadcn/typography.d.ts +1 -1
- package/dist/components/theme/index.d.ts +0 -2
- package/dist/components/theme/index.d.ts.map +1 -1
- package/dist/{drawer-C7hRQ7X-.js → drawer-CTsbhpbu.js} +38 -38
- package/dist/{drawer-BkuiusSD.cjs → drawer-DjVIwhWw.cjs} +1 -1
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.js +1 -1
- package/dist/fonts.css +38 -279
- package/dist/index.cjs +1 -12
- package/dist/index.d.ts +5 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1581 -4592
- package/dist/movement-design-system.css +1 -1
- package/dist/recipes.css +6 -6
- package/dist/theme.css +97 -129
- package/dist/{dialog-LjNZCtUV.cjs → use-mobile-C12jSU8y.cjs} +2 -2
- package/dist/{dialog-9n6-1DUQ.js → use-mobile-Da0X_fcF.js} +261 -262
- package/dist/wallet.cjs +1 -1
- package/dist/wallet.js +79 -90
- package/package.json +16 -27
- package/dist/components/Branding/Branding.d.ts +0 -31
- package/dist/components/Branding/Branding.d.ts.map +0 -1
- package/dist/components/Branding/index.d.ts +0 -3
- package/dist/components/Branding/index.d.ts.map +0 -1
- package/dist/components/DottedBackground/DottedBackground.d.ts +0 -11
- package/dist/components/DottedBackground/DottedBackground.d.ts.map +0 -1
- package/dist/components/DottedBackground/index.d.ts +0 -2
- package/dist/components/DottedBackground/index.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/GlobalNavMenu.d.ts +0 -87
- package/dist/components/GlobalNavMenu/GlobalNavMenu.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/BridgeIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/BridgeIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/DelegatedStakingIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/DelegatedStakingIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/ExplorerIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/ExplorerIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/GridIcon.d.ts +0 -4
- package/dist/components/GlobalNavMenu/icons/GridIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/MoveDocsIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/MoveDocsIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/ParthenonIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/ParthenonIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/index.d.ts +0 -7
- package/dist/components/GlobalNavMenu/icons/index.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/index.d.ts +0 -3
- package/dist/components/GlobalNavMenu/index.d.ts.map +0 -1
- package/dist/components/Logo/Logo.d.ts +0 -3
- package/dist/components/Logo/Logo.d.ts.map +0 -1
- package/dist/components/MultiOutlineText/MultiOutlineText.d.ts +0 -23
- package/dist/components/MultiOutlineText/MultiOutlineText.d.ts.map +0 -1
- package/dist/components/MultiOutlineText/index.d.ts +0 -3
- package/dist/components/MultiOutlineText/index.d.ts.map +0 -1
- package/dist/components/shadcn/alert-dialog.d.ts +0 -15
- package/dist/components/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/components/shadcn/aspect-ratio.d.ts +0 -4
- package/dist/components/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/components/shadcn/button-group.d.ts +0 -12
- package/dist/components/shadcn/button-group.d.ts.map +0 -1
- package/dist/components/shadcn/checkbox.d.ts +0 -5
- package/dist/components/shadcn/checkbox.d.ts.map +0 -1
- package/dist/components/shadcn/crypto-amount-input.d.ts +0 -31
- package/dist/components/shadcn/crypto-amount-input.d.ts.map +0 -1
- package/dist/components/shadcn/empty.d.ts +0 -12
- package/dist/components/shadcn/empty.d.ts.map +0 -1
- package/dist/components/shadcn/field.d.ts +0 -25
- package/dist/components/shadcn/field.d.ts.map +0 -1
- package/dist/components/shadcn/form.d.ts +0 -25
- package/dist/components/shadcn/form.d.ts.map +0 -1
- package/dist/components/shadcn/hover-card.d.ts +0 -7
- package/dist/components/shadcn/hover-card.d.ts.map +0 -1
- package/dist/components/shadcn/input-group.d.ts +0 -17
- package/dist/components/shadcn/input-group.d.ts.map +0 -1
- package/dist/components/shadcn/item.d.ts +0 -24
- package/dist/components/shadcn/item.d.ts.map +0 -1
- package/dist/components/shadcn/list.d.ts +0 -45
- package/dist/components/shadcn/list.d.ts.map +0 -1
- package/dist/components/shadcn/menubar.d.ts +0 -27
- package/dist/components/shadcn/menubar.d.ts.map +0 -1
- package/dist/components/shadcn/navigation-menu.d.ts +0 -15
- package/dist/components/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/components/shadcn/radio-group.d.ts +0 -6
- package/dist/components/shadcn/radio-group.d.ts.map +0 -1
- package/dist/components/shadcn/scroll-area.d.ts +0 -6
- package/dist/components/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/components/shadcn/separator.d.ts +0 -5
- package/dist/components/shadcn/separator.d.ts.map +0 -1
- package/dist/components/shadcn/sidebar.d.ts +0 -70
- package/dist/components/shadcn/sidebar.d.ts.map +0 -1
- package/dist/components/shadcn/switch.d.ts +0 -5
- package/dist/components/shadcn/switch.d.ts.map +0 -1
- package/dist/components/shadcn/textarea.d.ts +0 -4
- package/dist/components/shadcn/textarea.d.ts.map +0 -1
- package/dist/components/shadcn/toggle.d.ts +0 -10
- package/dist/components/shadcn/toggle.d.ts.map +0 -1
- package/dist/components/theme/theme-switcher.d.ts +0 -33
- package/dist/components/theme/theme-switcher.d.ts.map +0 -1
- package/dist/components/theme/use-theme.d.ts +0 -20
- package/dist/components/theme/use-theme.d.ts.map +0 -1
- package/dist/forms.cjs +0 -1
- package/dist/forms.d.ts +0 -2
- package/dist/forms.d.ts.map +0 -1
- package/dist/forms.js +0 -386
- package/dist/label-CPL77haD.js +0 -23
- package/dist/label-tKsAbVfX.cjs +0 -1
package/dist/carousel.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as X, jsxs as Jt } from "react/jsx-runtime";
|
|
2
2
|
import * as $ from "react";
|
|
3
3
|
import { useRef as qt, useState as $t, useCallback as dn, useEffect as Tt } from "react";
|
|
4
4
|
import { ArrowRight as pn, ArrowLeft as mn } from "lucide-react";
|
|
5
5
|
import { c as gt } from "./utils-eGXXUFl7.js";
|
|
6
|
-
import { B as
|
|
6
|
+
import { B as Xt } from "./button-Dh2vlJOI.js";
|
|
7
7
|
function gn(t) {
|
|
8
8
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
9
9
|
}
|
|
@@ -74,16 +74,16 @@ function ht(t) {
|
|
|
74
74
|
function Mt(t, n) {
|
|
75
75
|
return n === ht(t);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function _t(t, n = 0) {
|
|
78
78
|
return Array.from(Array(t), (o, i) => n + i);
|
|
79
79
|
}
|
|
80
80
|
function pt(t) {
|
|
81
81
|
return Object.keys(t);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Yt(t, n) {
|
|
84
84
|
return [t, n].reduce((o, i) => (pt(i).forEach((c) => {
|
|
85
85
|
const s = o[c], e = i[c], a = Qt(s) && Qt(e);
|
|
86
|
-
o[c] = a ?
|
|
86
|
+
o[c] = a ? Yt(s, e) : e;
|
|
87
87
|
}), o), {});
|
|
88
88
|
}
|
|
89
89
|
function At(t, n) {
|
|
@@ -268,7 +268,7 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
268
268
|
mouse: 500,
|
|
269
269
|
touch: 600
|
|
270
270
|
}, F = f ? 43 : 25;
|
|
271
|
-
let j = !1, R = 0, G = 0, W = !1,
|
|
271
|
+
let j = !1, R = 0, G = 0, W = !1, Y = !1, K = !1, U = !1;
|
|
272
272
|
function it(b) {
|
|
273
273
|
if (!S) return;
|
|
274
274
|
function w(k) {
|
|
@@ -277,7 +277,7 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
277
277
|
const M = n;
|
|
278
278
|
E.add(M, "dragstart", (k) => k.preventDefault(), I).add(M, "touchmove", () => {
|
|
279
279
|
}, I).add(M, "touchend", () => {
|
|
280
|
-
}).add(M, "touchstart", w).add(M, "mousedown", w).add(M, "touchcancel", N).add(M, "contextmenu", N).add(M, "click",
|
|
280
|
+
}).add(M, "touchstart", w).add(M, "mousedown", w).add(M, "touchcancel", N).add(M, "contextmenu", N).add(M, "click", _, !0);
|
|
281
281
|
}
|
|
282
282
|
function H() {
|
|
283
283
|
E.clear(), v.clear();
|
|
@@ -303,17 +303,17 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
303
303
|
}
|
|
304
304
|
function z(b) {
|
|
305
305
|
if (!At(b, i) && b.touches.length >= 2) return N(b);
|
|
306
|
-
const M = s.readPoint(b), k = s.readPoint(b, x), q = ft(M, R),
|
|
307
|
-
if (!
|
|
306
|
+
const M = s.readPoint(b), k = s.readPoint(b, x), q = ft(M, R), J = ft(k, G);
|
|
307
|
+
if (!Y && !U && (!b.cancelable || (Y = q > J, !Y)))
|
|
308
308
|
return N(b);
|
|
309
309
|
const tt = s.pointerMove(b);
|
|
310
310
|
q > m && (K = !0), u.useFriction(0.3).useDuration(0.75), a.start(), c.add(L(tt)), b.preventDefault();
|
|
311
311
|
}
|
|
312
312
|
function N(b) {
|
|
313
|
-
const M = h.byDistance(0, !1).index !== d.get(), k = s.pointerUp(b) * Q(), q = ct(L(k), M),
|
|
314
|
-
|
|
313
|
+
const M = h.byDistance(0, !1).index !== d.get(), k = s.pointerUp(b) * Q(), q = ct(L(k), M), J = yn(k, q), tt = F - 10 * J, Z = l + J / 50;
|
|
314
|
+
Y = !1, W = !1, v.clear(), u.useDuration(tt).useFriction(Z), r.distance(q, !f), U = !1, p.emit("pointerUp");
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function _(b) {
|
|
317
317
|
K && (b.stopPropagation(), b.preventDefault(), K = !1);
|
|
318
318
|
}
|
|
319
319
|
function B() {
|
|
@@ -582,11 +582,11 @@ function Fn(t, n, o, i, c, s) {
|
|
|
582
582
|
const l = !m, S = Mt(g, m);
|
|
583
583
|
if (l) {
|
|
584
584
|
const x = V(g[0]) + 1;
|
|
585
|
-
return
|
|
585
|
+
return _t(x);
|
|
586
586
|
}
|
|
587
587
|
if (S) {
|
|
588
588
|
const x = ht(s) - V(g)[0] + 1;
|
|
589
|
-
return
|
|
589
|
+
return _t(x, V(g)[0]);
|
|
590
590
|
}
|
|
591
591
|
return f;
|
|
592
592
|
});
|
|
@@ -944,7 +944,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
944
944
|
watchDrag: A,
|
|
945
945
|
watchFocus: I
|
|
946
946
|
} = s, E = 2, v = Cn(), C = v.measure(n), O = o.map(v.measure), T = vn(r, u), F = T.measureSize(C), j = Tn(F), R = xn(a, F), G = !d && !!S, W = d || !!S, {
|
|
947
|
-
slideSizes:
|
|
947
|
+
slideSizes: Y,
|
|
948
948
|
slideSizesWithGaps: K,
|
|
949
949
|
startGap: U,
|
|
950
950
|
endGap: it
|
|
@@ -956,7 +956,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
956
956
|
scrollContainLimit: ut
|
|
957
957
|
} = Pn(F, Q, rt, S, E), z = G ? ct : rt, {
|
|
958
958
|
limit: N
|
|
959
|
-
} = On(Q, z, d),
|
|
959
|
+
} = On(Q, z, d), _ = Zt(ht(z), h, d), B = _.clone(), D = dt(o), b = ({
|
|
960
960
|
dragHandler: st,
|
|
961
961
|
scrollBody: It,
|
|
962
962
|
scrollBounds: Ct,
|
|
@@ -985,7 +985,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
985
985
|
Ht && un.stop();
|
|
986
986
|
const fn = Ct.get() * jt + on.get() * (1 - jt);
|
|
987
987
|
St.set(fn), Vt && (rn.loop(st.direction()), sn.loop()), It.to(St.get()), Ht && Bt.emit("settle"), Gt || Bt.emit("scroll");
|
|
988
|
-
}, M = En(i, c, () => b(Lt), (st) => w(Lt, st)), k = 0.68, q = z[
|
|
988
|
+
}, M = En(i, c, () => b(Lt), (st) => w(Lt, st)), k = 0.68, q = z[_.get()], J = lt(q), tt = lt(q), Z = lt(q), nt = lt(q), at = An(J, Z, tt, nt, p, k), Et = zn(d, z, Q, N, nt), vt = Bn(M, _, B, at, Et, nt, e), kt = Nn(N), Ft = mt(), nn = Gn(n, o, e, m), {
|
|
989
989
|
slideRegistry: zt
|
|
990
990
|
} = Fn(G, S, z, ut, H, D), en = Vn(t, o, zt, vt, at, Ft, e, I), Lt = {
|
|
991
991
|
ownerDocument: i,
|
|
@@ -995,26 +995,26 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
995
995
|
slideRects: O,
|
|
996
996
|
animation: M,
|
|
997
997
|
axis: T,
|
|
998
|
-
dragHandler: Ln(T, t, i, c, nt, In(T, c),
|
|
998
|
+
dragHandler: Ln(T, t, i, c, nt, In(T, c), J, M, vt, at, Et, _, e, j, y, f, l, k, A),
|
|
999
999
|
eventStore: Ft,
|
|
1000
1000
|
percentOfView: j,
|
|
1001
|
-
index:
|
|
1001
|
+
index: _,
|
|
1002
1002
|
indexPrevious: B,
|
|
1003
1003
|
limit: N,
|
|
1004
|
-
location:
|
|
1004
|
+
location: J,
|
|
1005
1005
|
offsetLocation: Z,
|
|
1006
1006
|
previousLocation: tt,
|
|
1007
1007
|
options: s,
|
|
1008
1008
|
resizeHandler: wn(n, e, c, o, T, x, v),
|
|
1009
1009
|
scrollBody: at,
|
|
1010
1010
|
scrollBounds: Dn(N, Z, nt, at, j),
|
|
1011
|
-
scrollLooper: Mn(Q, N, Z, [
|
|
1011
|
+
scrollLooper: Mn(Q, N, Z, [J, Z, tt, nt]),
|
|
1012
1012
|
scrollProgress: kt,
|
|
1013
1013
|
scrollSnapList: z.map(kt.get),
|
|
1014
1014
|
scrollSnaps: z,
|
|
1015
1015
|
scrollTarget: Et,
|
|
1016
1016
|
scrollTo: vt,
|
|
1017
|
-
slideLooper: jn(T, F, Q,
|
|
1017
|
+
slideLooper: jn(T, F, Q, Y, K, ot, z, Z, o),
|
|
1018
1018
|
slideFocus: en,
|
|
1019
1019
|
slidesHandler: Rn(n, e, L),
|
|
1020
1020
|
slidesInView: nn,
|
|
@@ -1079,7 +1079,7 @@ const Un = {
|
|
|
1079
1079
|
};
|
|
1080
1080
|
function Qn(t) {
|
|
1081
1081
|
function n(s, e) {
|
|
1082
|
-
return
|
|
1082
|
+
return Yt(s, e || {});
|
|
1083
1083
|
}
|
|
1084
1084
|
function o(s) {
|
|
1085
1085
|
const e = s.breakpoints || {}, a = pt(e).filter((r) => t.matchMedia(r).matches).map((r) => e[r]).reduce((r, u) => n(r, u), {});
|
|
@@ -1094,7 +1094,7 @@ function Qn(t) {
|
|
|
1094
1094
|
optionsMediaQueries: i
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function _n(t) {
|
|
1098
1098
|
let n = [];
|
|
1099
1099
|
function o(s, e) {
|
|
1100
1100
|
return n = e.filter(({
|
|
@@ -1112,7 +1112,7 @@ function Jn(t) {
|
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
function yt(t, n, o) {
|
|
1115
|
-
const i = t.ownerDocument, c = i.defaultView, s = Qn(c), e =
|
|
1115
|
+
const i = t.ownerDocument, c = i.defaultView, s = Qn(c), e = _n(s), a = mt(), r = Kn(), {
|
|
1116
1116
|
mergeOptions: u,
|
|
1117
1117
|
optionsAtMedia: h,
|
|
1118
1118
|
optionsMediaQueries: d
|
|
@@ -1169,7 +1169,7 @@ function yt(t, n, o) {
|
|
|
1169
1169
|
const b = l.index.add(-1).get();
|
|
1170
1170
|
R(b, D, 1);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Y() {
|
|
1173
1173
|
return l.index.add(1).get() !== H();
|
|
1174
1174
|
}
|
|
1175
1175
|
function K() {
|
|
@@ -1205,11 +1205,11 @@ function yt(t, n, o) {
|
|
|
1205
1205
|
function N() {
|
|
1206
1206
|
return I;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function _() {
|
|
1209
1209
|
return E;
|
|
1210
1210
|
}
|
|
1211
1211
|
const B = {
|
|
1212
|
-
canScrollNext:
|
|
1212
|
+
canScrollNext: Y,
|
|
1213
1213
|
canScrollPrev: K,
|
|
1214
1214
|
containerNode: N,
|
|
1215
1215
|
internalEngine: ut,
|
|
@@ -1227,7 +1227,7 @@ function yt(t, n, o) {
|
|
|
1227
1227
|
scrollSnapList: U,
|
|
1228
1228
|
scrollTo: R,
|
|
1229
1229
|
selectedScrollSnap: H,
|
|
1230
|
-
slideNodes:
|
|
1230
|
+
slideNodes: _,
|
|
1231
1231
|
slidesInView: rt,
|
|
1232
1232
|
slidesNotInView: Q
|
|
1233
1233
|
};
|
|
@@ -1293,7 +1293,7 @@ function te({
|
|
|
1293
1293
|
return y(r), r.on("reInit", y), r.on("select", y), () => {
|
|
1294
1294
|
r?.off("select", y);
|
|
1295
1295
|
};
|
|
1296
|
-
}, [r, y]), /* @__PURE__ */
|
|
1296
|
+
}, [r, y]), /* @__PURE__ */ X(
|
|
1297
1297
|
tn.Provider,
|
|
1298
1298
|
{
|
|
1299
1299
|
value: {
|
|
@@ -1306,7 +1306,7 @@ function te({
|
|
|
1306
1306
|
canScrollPrev: u,
|
|
1307
1307
|
canScrollNext: d
|
|
1308
1308
|
},
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1309
|
+
children: /* @__PURE__ */ X(
|
|
1310
1310
|
"div",
|
|
1311
1311
|
{
|
|
1312
1312
|
onKeyDownCapture: g,
|
|
@@ -1323,13 +1323,13 @@ function te({
|
|
|
1323
1323
|
}
|
|
1324
1324
|
function ne({ className: t, ...n }) {
|
|
1325
1325
|
const { carouselRef: o, orientation: i } = xt();
|
|
1326
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ X(
|
|
1327
1327
|
"div",
|
|
1328
1328
|
{
|
|
1329
1329
|
ref: o,
|
|
1330
1330
|
className: "overflow-hidden",
|
|
1331
1331
|
"data-slot": "carousel-content",
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1332
|
+
children: /* @__PURE__ */ X(
|
|
1333
1333
|
"div",
|
|
1334
1334
|
{
|
|
1335
1335
|
className: gt(
|
|
@@ -1345,7 +1345,7 @@ function ne({ className: t, ...n }) {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
function ee({ className: t, ...n }) {
|
|
1347
1347
|
const { orientation: o } = xt();
|
|
1348
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ X(
|
|
1349
1349
|
"div",
|
|
1350
1350
|
{
|
|
1351
1351
|
role: "group",
|
|
@@ -1367,8 +1367,8 @@ function oe({
|
|
|
1367
1367
|
...i
|
|
1368
1368
|
}) {
|
|
1369
1369
|
const { orientation: c, scrollPrev: s, canScrollPrev: e } = xt();
|
|
1370
|
-
return /* @__PURE__ */
|
|
1371
|
-
|
|
1370
|
+
return /* @__PURE__ */ Jt(
|
|
1371
|
+
Xt,
|
|
1372
1372
|
{
|
|
1373
1373
|
"data-slot": "carousel-previous",
|
|
1374
1374
|
variant: n,
|
|
@@ -1382,8 +1382,8 @@ function oe({
|
|
|
1382
1382
|
onClick: s,
|
|
1383
1383
|
...i,
|
|
1384
1384
|
children: [
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ X(mn, {}),
|
|
1386
|
+
/* @__PURE__ */ X("span", { className: "sr-only", children: "Previous slide" })
|
|
1387
1387
|
]
|
|
1388
1388
|
}
|
|
1389
1389
|
);
|
|
@@ -1395,8 +1395,8 @@ function re({
|
|
|
1395
1395
|
...i
|
|
1396
1396
|
}) {
|
|
1397
1397
|
const { orientation: c, scrollNext: s, canScrollNext: e } = xt();
|
|
1398
|
-
return /* @__PURE__ */
|
|
1399
|
-
|
|
1398
|
+
return /* @__PURE__ */ Jt(
|
|
1399
|
+
Xt,
|
|
1400
1400
|
{
|
|
1401
1401
|
"data-slot": "carousel-next",
|
|
1402
1402
|
variant: n,
|
|
@@ -1410,8 +1410,8 @@ function re({
|
|
|
1410
1410
|
onClick: s,
|
|
1411
1411
|
...i,
|
|
1412
1412
|
children: [
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ X(pn, {}),
|
|
1414
|
+
/* @__PURE__ */ X("span", { className: "sr-only", children: "Next slide" })
|
|
1415
1415
|
]
|
|
1416
1416
|
}
|
|
1417
1417
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletModal.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/WalletModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,oBAAoB,EAK1B,MAAM,sCAAsC,CAAC;AAqE9C,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yHAAyH;IACzH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"WalletModal.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/WalletModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,oBAAoB,EAK1B,MAAM,sCAAsC,CAAC;AAqE9C,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yHAAyH;IACzH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAmKD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,WAAW,EACX,GAAG,oBAAoB,EACxB,EAAE,wBAAwB,kDAmD1B"}
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "secondary" | "accent" | "destructive" | "success" | "warning" | "outline" | "ghost" | "glow" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "2xl" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -10,7 +10,7 @@ import * as React from "react";
|
|
|
10
10
|
* - Icon support (left/right)
|
|
11
11
|
* - Clearable functionality
|
|
12
12
|
* - Error state
|
|
13
|
-
* - Custom cursor color (
|
|
13
|
+
* - Custom cursor color (cyan-300)
|
|
14
14
|
*/
|
|
15
15
|
declare const inputVariants: (props?: ({
|
|
16
16
|
variant?: "default" | "error" | "iridescent" | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const typographyVariants: (props?: ({
|
|
4
|
-
variant?: "small" | "
|
|
4
|
+
variant?: "small" | "blockquote" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "p" | "list" | "large" | "uppercase" | "muted" | "lead" | "inlineCode" | "mono" | null | undefined;
|
|
5
5
|
affects?: "default" | "removePMargin" | "removeMargin" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -199,11 +199,11 @@ function $t(t) {
|
|
|
199
199
|
function Ne(t, n) {
|
|
200
200
|
typeof t == "function" ? t(n) : t != null && (t.current = n);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function _e(...t) {
|
|
203
203
|
return (n) => t.forEach((e) => Ne(e, n));
|
|
204
204
|
}
|
|
205
205
|
function Jt(...t) {
|
|
206
|
-
return qt.useCallback(
|
|
206
|
+
return qt.useCallback(_e(...t), t);
|
|
207
207
|
}
|
|
208
208
|
const Qt = /* @__PURE__ */ new WeakMap();
|
|
209
209
|
function $(t, n, e = !1) {
|
|
@@ -217,7 +217,7 @@ function $(t, n, e = !1) {
|
|
|
217
217
|
a[i] = t.style[i], t.style[i] = o;
|
|
218
218
|
}), !e && Qt.set(t, a);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Ie(t, n) {
|
|
221
221
|
if (!t || !(t instanceof HTMLElement)) return;
|
|
222
222
|
let e = Qt.get(t);
|
|
223
223
|
e && (t.style[n] = e[n]);
|
|
@@ -348,13 +348,13 @@ function Fe({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
|
|
|
348
348
|
};
|
|
349
349
|
var b;
|
|
350
350
|
return (b = e?.map((y) => {
|
|
351
|
-
const
|
|
351
|
+
const _ = typeof y == "string";
|
|
352
352
|
let P = 0;
|
|
353
|
-
if (
|
|
354
|
-
const s =
|
|
353
|
+
if (_ && (P = parseInt(y, 10)), C(p)) {
|
|
354
|
+
const s = _ ? P : m ? y * u.height : 0;
|
|
355
355
|
return m ? p === "bottom" ? u.height - s : -u.height + s : s;
|
|
356
356
|
}
|
|
357
|
-
const W =
|
|
357
|
+
const W = _ ? P : m ? y * u.width : 0;
|
|
358
358
|
return m ? p === "right" ? u.width - W : -u.width + W : W;
|
|
359
359
|
})) != null ? b : [];
|
|
360
360
|
}, [
|
|
@@ -366,7 +366,7 @@ function Fe({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
|
|
|
366
366
|
E
|
|
367
367
|
]), A = r.useCallback((u) => {
|
|
368
368
|
var b;
|
|
369
|
-
const y = (b = w?.findIndex((
|
|
369
|
+
const y = (b = w?.findIndex((_) => _ === u)) != null ? b : null;
|
|
370
370
|
v(y), $(a.current, {
|
|
371
371
|
transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
|
|
372
372
|
transform: C(p) ? `translate3d(0, ${u}px, 0)` : `translate3d(${u}px, 0, 0)`
|
|
@@ -398,31 +398,31 @@ function Fe({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
|
|
|
398
398
|
w,
|
|
399
399
|
A
|
|
400
400
|
]);
|
|
401
|
-
function c({ draggedDistance: u, closeDrawer: b, velocity: y, dismissible:
|
|
401
|
+
function c({ draggedDistance: u, closeDrawer: b, velocity: y, dismissible: _ }) {
|
|
402
402
|
if (o === void 0) return;
|
|
403
403
|
const P = p === "bottom" || p === "right" ? (M ?? 0) - u : (M ?? 0) + u, W = E === o - 1, s = E === 0, F = u > 0;
|
|
404
404
|
if (W && $(i.current, {
|
|
405
405
|
transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`
|
|
406
406
|
}), !R && y > 2 && !F) {
|
|
407
|
-
|
|
407
|
+
_ ? b() : A(w[0]);
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
410
|
if (!R && y > 2 && F && w && e) {
|
|
411
411
|
A(w[e.length - 1]);
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const I = w?.reduce((N, X) => typeof N != "number" || typeof X != "number" ? N : Math.abs(X - P) < Math.abs(N - P) ? X : N), z = C(p) ? window.innerHeight : window.innerWidth;
|
|
415
415
|
if (y > Zt && Math.abs(u) < z * 0.4) {
|
|
416
416
|
const N = F ? 1 : -1;
|
|
417
417
|
if (N > 0 && k && e) {
|
|
418
418
|
A(w[e.length - 1]);
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
-
if (s && N < 0 &&
|
|
421
|
+
if (s && N < 0 && _ && b(), E === null) return;
|
|
422
422
|
A(w[E + N]);
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
|
-
A(
|
|
425
|
+
A(I);
|
|
426
426
|
}
|
|
427
427
|
function Y({ draggedDistance: u }) {
|
|
428
428
|
if (M === null) return;
|
|
@@ -563,19 +563,19 @@ function Ve({ isOpen: t, modal: n, nested: e, hasBeenOpened: a, preventScrollRes
|
|
|
563
563
|
restorePositionSetting: h
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, snapPoints: o, shouldScaleBackground: v = !1, setBackgroundColorOnScale: p = !0, closeThreshold: T = Le, scrollLockTimeout: R = Be, dismissible: h = !0, handleOnly: f = !1, fadeFromIndex: m = o && o.length - 1, activeSnapPoint: B, setActiveSnapPoint: k, fixed: E, modal: U = !0, onClose: w, nested: M, noBodyStyles: A = !1, direction: c = "bottom", defaultOpen: Y = !1, disablePreventScroll: tt = !0, snapToSequentialPoint: u = !1, preventScrollRestoration: b = !1, repositionInputs: y = !0, onAnimationEnd:
|
|
566
|
+
function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, snapPoints: o, shouldScaleBackground: v = !1, setBackgroundColorOnScale: p = !0, closeThreshold: T = Le, scrollLockTimeout: R = Be, dismissible: h = !0, handleOnly: f = !1, fadeFromIndex: m = o && o.length - 1, activeSnapPoint: B, setActiveSnapPoint: k, fixed: E, modal: U = !0, onClose: w, nested: M, noBodyStyles: A = !1, direction: c = "bottom", defaultOpen: Y = !1, disablePreventScroll: tt = !0, snapToSequentialPoint: u = !1, preventScrollRestoration: b = !1, repositionInputs: y = !0, onAnimationEnd: _, container: P, autoFocus: W = !1 }) {
|
|
567
567
|
var s, F;
|
|
568
|
-
const [
|
|
568
|
+
const [I = !1, z] = ne({
|
|
569
569
|
defaultProp: Y,
|
|
570
570
|
prop: t,
|
|
571
571
|
onChange: (l) => {
|
|
572
572
|
n?.(l), !l && !M && de(), setTimeout(() => {
|
|
573
|
-
|
|
573
|
+
_?.(l);
|
|
574
574
|
}, x.DURATION * 1e3), l && !U && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
575
575
|
document.body.style.pointerEvents = "auto";
|
|
576
576
|
}), l || (document.body.style.pointerEvents = "auto");
|
|
577
577
|
}
|
|
578
|
-
}), [N, X] = r.useState(!1), [K, lt] = r.useState(!1), [oe, Pt] = r.useState(!1), rt = r.useRef(null), pt = r.useRef(null), bt = r.useRef(null), St = r.useRef(null), st = r.useRef(null), ut = r.useRef(!1), Tt = r.useRef(null), Dt = r.useRef(0), at = r.useRef(!1), Nt = r.useRef(!Y),
|
|
578
|
+
}), [N, X] = r.useState(!1), [K, lt] = r.useState(!1), [oe, Pt] = r.useState(!1), rt = r.useRef(null), pt = r.useRef(null), bt = r.useRef(null), St = r.useRef(null), st = r.useRef(null), ut = r.useRef(!1), Tt = r.useRef(null), Dt = r.useRef(0), at = r.useRef(!1), Nt = r.useRef(!Y), _t = r.useRef(0), d = r.useRef(null), It = r.useRef(((s = d.current) == null ? void 0 : s.getBoundingClientRect().height) || 0), Ht = r.useRef(((F = d.current) == null ? void 0 : F.getBoundingClientRect().width) || 0), Rt = r.useRef(0), ie = r.useCallback((l) => {
|
|
579
579
|
o && l === ct.length - 1 && (pt.current = /* @__PURE__ */ new Date());
|
|
580
580
|
}, []), { activeSnapPoint: le, activeSnapPointIndex: ot, setActiveSnapPoint: kt, onRelease: se, snapPointsOffset: ct, onDrag: ue, shouldFade: Lt, getPercentageDragged: ce } = Fe({
|
|
581
581
|
snapPoints: o,
|
|
@@ -590,10 +590,10 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
590
590
|
snapToSequentialPoint: u
|
|
591
591
|
});
|
|
592
592
|
Ae({
|
|
593
|
-
isDisabled: !
|
|
593
|
+
isDisabled: !I || K || !U || oe || !N || !y || !tt
|
|
594
594
|
});
|
|
595
595
|
const { restorePositionSetting: de } = Ve({
|
|
596
|
-
isOpen:
|
|
596
|
+
isOpen: I,
|
|
597
597
|
modal: U,
|
|
598
598
|
nested: M ?? !1,
|
|
599
599
|
hasBeenOpened: N,
|
|
@@ -605,7 +605,7 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
605
605
|
}
|
|
606
606
|
function fe(l) {
|
|
607
607
|
var S, D;
|
|
608
|
-
!h && !o || d.current && !d.current.contains(l.target) || (
|
|
608
|
+
!h && !o || d.current && !d.current.contains(l.target) || (It.current = ((S = d.current) == null ? void 0 : S.getBoundingClientRect().height) || 0, Ht.current = ((D = d.current) == null ? void 0 : D.getBoundingClientRect().width) || 0, lt(!0), bt.current = /* @__PURE__ */ new Date(), Kt() && window.addEventListener("touchend", () => ut.current = !1, {
|
|
609
609
|
once: !0
|
|
610
610
|
}), l.target.setPointerCapture(l.pointerId), Dt.current = C(c) ? l.pageY : l.pageX);
|
|
611
611
|
}
|
|
@@ -640,7 +640,7 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
640
640
|
if (d.current && K) {
|
|
641
641
|
const S = c === "bottom" || c === "right" ? 1 : -1, D = (Dt.current - (C(c) ? l.pageY : l.pageX)) * S, g = D > 0, O = o && !h && !g;
|
|
642
642
|
if (O && ot === 0) return;
|
|
643
|
-
const L = Math.abs(D), H = document.querySelector("[data-vaul-drawer-wrapper]"), G = c === "bottom" || c === "top" ?
|
|
643
|
+
const L = Math.abs(D), H = document.querySelector("[data-vaul-drawer-wrapper]"), G = c === "bottom" || c === "top" ? It.current : Ht.current;
|
|
644
644
|
let V = L / G;
|
|
645
645
|
const et = ce(L, g);
|
|
646
646
|
if (et !== null && (V = et), O && V >= 1 || !ut.current && !Bt(l.target, g)) return;
|
|
@@ -693,11 +693,11 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
693
693
|
const G = d.current.getBoundingClientRect().height || 0, V = G > L * 0.8;
|
|
694
694
|
Rt.current || (Rt.current = G);
|
|
695
695
|
const et = d.current.getBoundingClientRect().top;
|
|
696
|
-
if (Math.abs(
|
|
696
|
+
if (Math.abs(_t.current - H) > 60 && (at.current = !at.current), o && o.length > 0 && ct && ot) {
|
|
697
697
|
const J = ct[ot] || 0;
|
|
698
698
|
H += J;
|
|
699
699
|
}
|
|
700
|
-
if (
|
|
700
|
+
if (_t.current = H, G > O || at.current) {
|
|
701
701
|
const J = d.current.getBoundingClientRect().height;
|
|
702
702
|
let q = J;
|
|
703
703
|
J > O && (q = O - (V ? et : At)), E ? d.current.style.height = `${J - Math.max(H, 0)}px` : d.current.style.height = `${Math.max(q, O - et)}px`;
|
|
@@ -728,7 +728,7 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
728
728
|
}), $(rt.current, {
|
|
729
729
|
transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
|
|
730
730
|
opacity: "1"
|
|
731
|
-
}), v && S && S > 0 &&
|
|
731
|
+
}), v && S && S > 0 && I && $(l, {
|
|
732
732
|
borderRadius: `${te}px`,
|
|
733
733
|
overflow: "hidden",
|
|
734
734
|
...C(c) ? {
|
|
@@ -781,12 +781,12 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
781
781
|
}
|
|
782
782
|
i?.(l, !0), Ut();
|
|
783
783
|
}
|
|
784
|
-
r.useEffect(() => (
|
|
784
|
+
r.useEffect(() => (I && ($(document.documentElement, {
|
|
785
785
|
scrollBehavior: "auto"
|
|
786
786
|
}), pt.current = /* @__PURE__ */ new Date()), () => {
|
|
787
|
-
|
|
787
|
+
Ie(document.documentElement, "scrollBehavior");
|
|
788
788
|
}), [
|
|
789
|
-
|
|
789
|
+
I
|
|
790
790
|
]);
|
|
791
791
|
function he(l) {
|
|
792
792
|
const S = l ? (window.innerWidth - nt) / window.innerWidth : 1, D = l ? -nt : 0;
|
|
@@ -827,7 +827,7 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
827
827
|
onOpenChange: (l) => {
|
|
828
828
|
!h && !l || (l ? X(!0) : dt(!0), z(l));
|
|
829
829
|
},
|
|
830
|
-
open:
|
|
830
|
+
open: I
|
|
831
831
|
}, /* @__PURE__ */ r.createElement(Xt.Provider, {
|
|
832
832
|
value: {
|
|
833
833
|
activeSnapPoint: le,
|
|
@@ -842,7 +842,7 @@ function je({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
842
842
|
dismissible: h,
|
|
843
843
|
shouldAnimate: Nt,
|
|
844
844
|
handleOnly: f,
|
|
845
|
-
isOpen:
|
|
845
|
+
isOpen: I,
|
|
846
846
|
isDragging: K,
|
|
847
847
|
shouldFade: Lt,
|
|
848
848
|
closeDrawer: dt,
|
|
@@ -881,23 +881,23 @@ const re = /* @__PURE__ */ r.forwardRef(function({ ...t }, n) {
|
|
|
881
881
|
});
|
|
882
882
|
re.displayName = "Drawer.Overlay";
|
|
883
883
|
const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, style: n, onOpenAutoFocus: e, ...a }, i) {
|
|
884
|
-
const { drawerRef: o, onPress: v, onRelease: p, onDrag: T, keyboardIsOpen: R, snapPointsOffset: h, activeSnapPointIndex: f, modal: m, isOpen: B, direction: k, snapPoints: E, container: U, handleOnly: w, shouldAnimate: M, autoFocus: A } = wt(), [c, Y] = r.useState(!1), tt = Jt(i, o), u = r.useRef(null), b = r.useRef(null), y = r.useRef(!1),
|
|
884
|
+
const { drawerRef: o, onPress: v, onRelease: p, onDrag: T, keyboardIsOpen: R, snapPointsOffset: h, activeSnapPointIndex: f, modal: m, isOpen: B, direction: k, snapPoints: E, container: U, handleOnly: w, shouldAnimate: M, autoFocus: A } = wt(), [c, Y] = r.useState(!1), tt = Jt(i, o), u = r.useRef(null), b = r.useRef(null), y = r.useRef(!1), _ = E && E.length > 0;
|
|
885
885
|
ze();
|
|
886
|
-
const P = (s, F,
|
|
886
|
+
const P = (s, F, I = 0) => {
|
|
887
887
|
if (y.current) return !0;
|
|
888
888
|
const z = Math.abs(s.y), N = Math.abs(s.x), X = N > z, K = [
|
|
889
889
|
"bottom",
|
|
890
890
|
"right"
|
|
891
891
|
].includes(F) ? 1 : -1;
|
|
892
892
|
if (F === "left" || F === "right") {
|
|
893
|
-
if (!(s.x * K < 0) && N >= 0 && N <=
|
|
893
|
+
if (!(s.x * K < 0) && N >= 0 && N <= I)
|
|
894
894
|
return X;
|
|
895
|
-
} else if (!(s.y * K < 0) && z >= 0 && z <=
|
|
895
|
+
} else if (!(s.y * K < 0) && z >= 0 && z <= I)
|
|
896
896
|
return !X;
|
|
897
897
|
return y.current = !0, !0;
|
|
898
898
|
};
|
|
899
899
|
r.useEffect(() => {
|
|
900
|
-
|
|
900
|
+
_ && window.requestAnimationFrame(() => {
|
|
901
901
|
Y(!0);
|
|
902
902
|
});
|
|
903
903
|
}, []);
|
|
@@ -908,7 +908,7 @@ const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
|
|
|
908
908
|
"data-vaul-drawer-direction": k,
|
|
909
909
|
"data-vaul-drawer": "",
|
|
910
910
|
"data-vaul-delayed-snap-points": c ? "true" : "false",
|
|
911
|
-
"data-vaul-snap-points": B &&
|
|
911
|
+
"data-vaul-snap-points": B && _ ? "true" : "false",
|
|
912
912
|
"data-vaul-custom-container": U ? "true" : "false",
|
|
913
913
|
"data-vaul-animate": M?.current ? "true" : "false",
|
|
914
914
|
...a,
|
|
@@ -941,11 +941,11 @@ const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
|
|
|
941
941
|
},
|
|
942
942
|
onPointerMove: (s) => {
|
|
943
943
|
if (b.current = s, w || (a.onPointerMove == null || a.onPointerMove.call(a, s), !u.current)) return;
|
|
944
|
-
const F = s.pageY - u.current.y,
|
|
944
|
+
const F = s.pageY - u.current.y, I = s.pageX - u.current.x, z = s.pointerType === "touch" ? 10 : 2;
|
|
945
945
|
P({
|
|
946
|
-
x:
|
|
946
|
+
x: I,
|
|
947
947
|
y: F
|
|
948
|
-
}, k, z) ? T(s) : (Math.abs(
|
|
948
|
+
}, k, z) ? T(s) : (Math.abs(I) > z || Math.abs(F) > z) && (u.current = null);
|
|
949
949
|
},
|
|
950
950
|
onPointerUp: (s) => {
|
|
951
951
|
a.onPointerUp == null || a.onPointerUp.call(a, s), u.current = null, y.current = !1, p(s);
|