@takuma-ru/vue-swipe-modal
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -1,82 +0,86 @@ | ||
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.swipe-modal[data-v-31c69cef]{position:fixed;top:auto;box-sizing:border-box;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:0;margin:0;overflow:hidden;border:none}.swipe-modal[data-v-31c69cef]::backdrop{background-color:#00000080;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.swipe-modal-content[data-v-31c69cef]{width:100%;height:100%}.swipe-modal-content>.panel[data-v-31c69cef]{max-height:calc(100dvh - 36px);overflow-y:scroll}.modal-style[data-v-31c69cef]{box-sizing:border-box;width:100%;color:#fff;background-color:#1d1b20;border-radius:1rem 1rem 0 0}@media (prefers-color-scheme: light){.modal-style[data-v-31c69cef]{color:#000;background-color:#f7f2fa;box-shadow:0 1px 4px #0000005e}}.swipe-modal-drag-handle-wrapper[data-v-31c69cef]{position:relative;top:0;flex-shrink:0;height:36px;cursor:grab}.swipe-modal-drag-handle-wrapper[data-v-31c69cef]:active{cursor:grabbing}.swipe-modal-drag-handle[data-v-31c69cef]{position:absolute;left:50%;width:32px;height:4px;margin:16px 0;content:"";background-color:#ccc;border-radius:2px;transform:translate(-50%)}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); | ||
import { getCurrentInstance as F, ref as S, watch as M, nextTick as N, computed as D, defineComponent as I, onMounted as L, onUnmounted as O, openBlock as _, createElementBlock as U, createElementVNode as Y, unref as h, renderSlot as B, createCommentVNode as H, pushScopeId as G, popScopeId as J } from "vue"; | ||
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.swipe-modal[data-v-8cbd34e1]{position:fixed;top:auto;box-sizing:border-box;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:0;margin:0;overflow:hidden;border:none}.swipe-modal[data-v-8cbd34e1]::backdrop{background-color:#00000080;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.swipe-modal-content[data-v-8cbd34e1]{width:100%;height:100%}.swipe-modal-content>.panel[data-v-8cbd34e1]{max-height:calc(100dvh - 36px);overflow-y:scroll}.modal-style[data-v-8cbd34e1]{box-sizing:border-box;width:100%;color:#fff;background-color:#1d1b20;border-radius:1rem 1rem 0 0}@media (prefers-color-scheme: light){.modal-style[data-v-8cbd34e1]{color:#000;background-color:#f7f2fa;box-shadow:0 1px 4px #0000005e}}.swipe-modal-drag-handle-wrapper[data-v-8cbd34e1]{position:relative;top:0;flex-shrink:0;height:36px;cursor:grab}.swipe-modal-drag-handle-wrapper[data-v-8cbd34e1]:active{cursor:grabbing}.swipe-modal-drag-handle[data-v-8cbd34e1]{position:absolute;left:50%;width:32px;height:4px;margin:16px 0;content:"";background-color:#ccc;border-radius:2px;transform:translate(-50%)}')),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})(); | ||
import { getCurrentInstance as D, ref as E, watch as Y, nextTick as I, computed as L, defineComponent as O, onMounted as _, onUnmounted as U, openBlock as H, createElementBlock as W, createElementVNode as x, unref as h, renderSlot as F, createCommentVNode as G, pushScopeId as J, popScopeId as z } from "vue"; | ||
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope; | ||
const W = (t) => typeof t < "u"; | ||
function z(t) { | ||
const X = (t) => typeof t < "u"; | ||
function j(t) { | ||
return JSON.parse(JSON.stringify(t)); | ||
} | ||
function X(t, n, o, r = {}) { | ||
var e, a, m; | ||
function q(t, l, s, n = {}) { | ||
var o, u, m; | ||
const { | ||
clone: d = !1, | ||
passive: s = !1, | ||
passive: e = !1, | ||
eventName: P, | ||
deep: f = !1, | ||
defaultValue: y, | ||
shouldEmit: E | ||
} = r, p = F(), V = o || (p == null ? void 0 : p.emit) || ((e = p == null ? void 0 : p.$emit) == null ? void 0 : e.bind(p)) || ((m = (a = p == null ? void 0 : p.proxy) == null ? void 0 : a.$emit) == null ? void 0 : m.bind(p == null ? void 0 : p.proxy)); | ||
let v = P; | ||
v = v || `update:${n.toString()}`; | ||
const g = (c) => d ? typeof d == "function" ? d(c) : z(c) : c, b = () => W(t[n]) ? g(t[n]) : y, A = (c) => { | ||
E ? E(c) && V(v, c) : V(v, c); | ||
shouldEmit: M | ||
} = n, p = D(), S = s || (p == null ? void 0 : p.emit) || ((o = p == null ? void 0 : p.$emit) == null ? void 0 : o.bind(p)) || ((m = (u = p == null ? void 0 : p.proxy) == null ? void 0 : u.$emit) == null ? void 0 : m.bind(p == null ? void 0 : p.proxy)); | ||
let c = P; | ||
c = c || `update:${l.toString()}`; | ||
const g = (v) => d ? typeof d == "function" ? d(v) : j(v) : v, b = () => X(t[l]) ? g(t[l]) : y, C = (v) => { | ||
M ? M(v) && S(c, v) : S(c, v); | ||
}; | ||
if (s) { | ||
const c = b(), w = S(c); | ||
if (e) { | ||
const v = b(), T = E(v); | ||
let i = !1; | ||
return M( | ||
() => t[n], | ||
(l) => { | ||
i || (i = !0, w.value = g(l), N(() => i = !1)); | ||
return Y( | ||
() => t[l], | ||
(a) => { | ||
i || (i = !0, T.value = g(a), I(() => i = !1)); | ||
} | ||
), M( | ||
w, | ||
(l) => { | ||
!i && (l !== t[n] || f) && A(l); | ||
), Y( | ||
T, | ||
(a) => { | ||
!i && (a !== t[l] || f) && C(a); | ||
}, | ||
{ deep: f } | ||
), w; | ||
), T; | ||
} else | ||
return D({ | ||
return L({ | ||
get() { | ||
return b(); | ||
}, | ||
set(c) { | ||
A(c); | ||
set(v) { | ||
C(v); | ||
} | ||
}); | ||
} | ||
const C = "cubic-bezier(0.2, 0.0, 0, 1.0)", $ = ({ scopeName: t }) => { | ||
const n = (e) => getComputedStyle(document.documentElement).getPropertyValue(`--${t}-${e}`); | ||
const A = (t, l) => { | ||
t.style.setProperty("will-change", l); | ||
}, V = (t) => { | ||
t.style.removeProperty("will-change"); | ||
}, w = "cubic-bezier(0.2, 0.0, 0, 1.0)", k = ({ scopeName: t }) => { | ||
const l = (o) => getComputedStyle(document.documentElement).getPropertyValue(`--${t}-${o}`); | ||
return { | ||
setCssVar: ({ name: e, value: a, fallback: m }) => { | ||
document.documentElement.style.setProperty(`--${t}-${e}`, a), m == null || m( | ||
e, | ||
n(e) | ||
setCssVar: ({ name: o, value: u, fallback: m }) => { | ||
document.documentElement.style.setProperty(`--${t}-${o}`, u), m == null || m( | ||
o, | ||
l(o) | ||
); | ||
}, | ||
getCssVar: n, | ||
removeCssVar: (e) => { | ||
document.documentElement.style.removeProperty(`--${t}-${e}`); | ||
getCssVar: l, | ||
removeCssVar: (o) => { | ||
document.documentElement.style.removeProperty(`--${t}-${o}`); | ||
} | ||
}; | ||
}, k = ({ | ||
}, N = ({ | ||
scopeName: t, | ||
positionStatus: n, | ||
props: o, | ||
positionStatus: l, | ||
props: s, | ||
refs: { | ||
modalRef: r | ||
modalRef: n | ||
} | ||
}) => { | ||
const { | ||
getCssVar: e, | ||
setCssVar: a | ||
} = $({ scopeName: t }); | ||
getCssVar: o, | ||
setCssVar: u | ||
} = k({ scopeName: t }); | ||
return { | ||
cancelAnim: () => { | ||
if (!r.value) | ||
if (!n.value) | ||
return; | ||
const P = () => n.value === "snap" ? o.snapPoint ? e("snapPointPosition") : "0%" : n.value === "full" ? "0%" : "-100%"; | ||
r.value.animate( | ||
const P = () => l.value === "snap" ? s.snapPoint ? o("snapPointPosition") : "0%" : l.value === "full" ? "0%" : "-100%"; | ||
A(n.value, "bottom"), n.value.animate( | ||
[ | ||
{ bottom: e("bottom") }, | ||
{ bottom: o("bottom") }, | ||
{ | ||
@@ -88,20 +92,20 @@ bottom: P() | ||
duration: 300, | ||
easing: C | ||
easing: w | ||
} | ||
).onfinish = () => { | ||
a({ | ||
u({ | ||
name: "movementAmountY", | ||
value: "0" | ||
}), a({ | ||
}), u({ | ||
name: "bottom", | ||
value: P() | ||
}); | ||
}), n.value && V(n.value); | ||
}; | ||
}, | ||
moveToSnapPointAnim: () => { | ||
r.value && o.snapPoint && (r.value.animate( | ||
n.value && s.snapPoint && (A(n.value, "bottom"), n.value.animate( | ||
[ | ||
{ bottom: e("bottom") }, | ||
{ bottom: o("bottom") }, | ||
{ | ||
bottom: e("snapPointPosition") | ||
bottom: o("snapPointPosition") | ||
} | ||
@@ -111,18 +115,18 @@ ], | ||
duration: 300, | ||
easing: C | ||
easing: w | ||
} | ||
).onfinish = () => { | ||
a({ | ||
u({ | ||
name: "movementAmountY", | ||
value: "0" | ||
}), a({ | ||
}), u({ | ||
name: "bottom", | ||
value: e("snapPointPosition") | ||
}), n.value = "snap"; | ||
value: o("snapPointPosition") | ||
}), l.value = "snap", n.value && V(n.value); | ||
}); | ||
}, | ||
moveToFullScreenAnim: () => { | ||
r.value && (r.value.animate( | ||
n.value && (A(n.value, "bottom"), n.value.animate( | ||
[ | ||
{ bottom: e("bottom") }, | ||
{ bottom: o("bottom") }, | ||
{ | ||
@@ -134,63 +138,63 @@ bottom: "0%" | ||
duration: 300, | ||
easing: C | ||
easing: w | ||
} | ||
).onfinish = () => { | ||
a({ | ||
u({ | ||
name: "movementAmountY", | ||
value: "0" | ||
}), a({ | ||
}), u({ | ||
name: "bottom", | ||
value: "0%" | ||
}), n.value = "full"; | ||
}), l.value = "full", n.value && V(n.value); | ||
}); | ||
} | ||
}; | ||
}, j = ({ | ||
}, K = ({ | ||
scopeName: t, | ||
positionStatus: n, | ||
props: o, | ||
refs: { modalRef: r }, | ||
vModel: e | ||
positionStatus: l, | ||
props: s, | ||
refs: { modalRef: n }, | ||
vModel: o | ||
}) => { | ||
const { | ||
getCssVar: a, | ||
getCssVar: u, | ||
setCssVar: m | ||
} = $({ scopeName: t }), { | ||
} = k({ scopeName: t }), { | ||
cancelAnim: d, | ||
moveToSnapPointAnim: s, | ||
moveToSnapPointAnim: e, | ||
moveToFullScreenAnim: P | ||
} = k({ | ||
} = N({ | ||
scopeName: t, | ||
positionStatus: n, | ||
props: o, | ||
positionStatus: l, | ||
props: s, | ||
refs: { | ||
modalRef: r | ||
modalRef: n | ||
} | ||
}), f = S(!1), y = S(0); | ||
}), f = E(!1), y = E(0); | ||
return { | ||
isMouseDown: f, | ||
handlePointerDown: ({ | ||
mouseEvent: v, | ||
mouseEvent: c, | ||
touchEvent: g, | ||
eventType: b | ||
}) => { | ||
b === "mouse" ? y.value = v.y : y.value = g.touches[0].clientY, f.value = !0; | ||
b === "mouse" ? y.value = c.y : y.value = g.touches[0].clientY, f.value = !0, n.value && A(n.value, "bottom"); | ||
}, | ||
handlePointerMove: ({ | ||
mouseEvent: v, | ||
mouseEvent: c, | ||
touchEvent: g, | ||
eventType: b | ||
}) => { | ||
var A, c; | ||
var C, v; | ||
if (f.value && (m(b === "mouse" ? { | ||
name: "movementAmountY", | ||
value: (y.value - v.y).toString() | ||
value: (y.value - c.y).toString() | ||
} : { | ||
name: "movementAmountY", | ||
value: (y.value - g.touches[0].clientY).toString() | ||
}), !(Number(a("movementAmountY")) > 0 && n.value === "full" || (((A = r.value) == null ? void 0 : A.getBoundingClientRect().top) || 0) < 0) && !(!o.isFullScreen && Number(a("movementAmountY")) > 0))) { | ||
if ((c = r.value) == null || c.style.setProperty("user-select", "none"), n.value === "snap") { | ||
}), !(Number(u("movementAmountY")) > 0 && l.value === "full" || (((C = n.value) == null ? void 0 : C.getBoundingClientRect().top) || 0) < 0) && !(!s.isFullScreen && Number(u("movementAmountY")) > 0))) { | ||
if ((v = n.value) == null || v.style.setProperty("user-select", "none"), l.value === "snap") { | ||
m({ | ||
name: "bottom", | ||
value: `calc(${a("snapPointPosition")} + ${a("movementAmountY")}px)` | ||
value: `calc(${u("snapPointPosition")} + ${u("movementAmountY")}px)` | ||
}); | ||
@@ -201,3 +205,3 @@ return; | ||
name: "bottom", | ||
value: `calc(0% + ${a("movementAmountY")}px)` | ||
value: `calc(0% + ${u("movementAmountY")}px)` | ||
}); | ||
@@ -207,16 +211,16 @@ } | ||
handlePointerUp: () => { | ||
var v; | ||
if (f.value = !1, (v = r.value) == null || v.style.removeProperty("user-select"), Math.abs(Number(a("movementAmountY"))) > 36) { | ||
if (Number(a("movementAmountY")) < 0) | ||
switch (n.value) { | ||
var c; | ||
if (f.value = !1, (c = n.value) == null || c.style.removeProperty("user-select"), Math.abs(Number(u("movementAmountY"))) > 36) { | ||
if (Number(u("movementAmountY")) < 0) | ||
switch (l.value) { | ||
case "full": | ||
return o.snapPoint ? s() : o.isPersistent ? d() : e.value = !1; | ||
return s.snapPoint ? e() : s.isPersistent ? d() : o.value = !1; | ||
case "snap": | ||
return o.isPersistent ? d() : e.value = !1; | ||
return s.isPersistent ? d() : o.value = !1; | ||
default: | ||
return; | ||
} | ||
switch (n.value) { | ||
switch (l.value) { | ||
case "snap": | ||
return o.isFullScreen ? P() : d(); | ||
return s.isFullScreen ? P() : d(); | ||
default: | ||
@@ -229,3 +233,3 @@ return; | ||
}; | ||
}, T = (t) => { | ||
}, $ = (t) => { | ||
if (t === "reset") { | ||
@@ -235,5 +239,5 @@ document.documentElement.style.removeProperty("overflow"), document.documentElement.style.removeProperty("overscroll-behavior-y"); | ||
} | ||
let n = window, o, r, e; | ||
document.defaultView ? (n = document.defaultView, o = n.scrollX, r = n.scrollY) : (e = document.documentElement, o = e.scrollLeft, r = e.scrollTop), document.documentElement.style.overflow = t, document.documentElement.style.overscrollBehaviorY = t === "auto" ? "auto" : "none", n.scrollTo(o, r); | ||
}, q = (t) => (G("data-v-31c69cef"), t = t(), J(), t), K = /* @__PURE__ */ q(() => /* @__PURE__ */ Y("div", { class: "swipe-modal-drag-handle" }, null, -1)), Q = /* @__PURE__ */ I({ | ||
let l = window, s, n, o; | ||
document.defaultView ? (l = document.defaultView, s = l.scrollX, n = l.scrollY) : (o = document.documentElement, s = o.scrollLeft, n = o.scrollTop), document.documentElement.style.overflow = t, document.documentElement.style.overscrollBehaviorY = t === "auto" ? "auto" : "none", l.scrollTo(s, n); | ||
}, Q = (t) => (J("data-v-8cbd34e1"), t = t(), z(), t), Z = /* @__PURE__ */ Q(() => /* @__PURE__ */ x("div", { class: "swipe-modal-drag-handle" }, null, -1)), R = /* @__PURE__ */ O({ | ||
__name: "SwipeModal", | ||
@@ -250,45 +254,43 @@ props: { | ||
emits: ["update:modelValue"], | ||
setup(t, { emit: n }) { | ||
const o = t, r = n, e = Math.random().toString(36).substring(2) + Math.random().toString(36).substring(2), { | ||
getCssVar: a, | ||
setup(t, { emit: l }) { | ||
const s = t, n = l, o = Math.random().toString(36).substring(2) + Math.random().toString(36).substring(2), { | ||
getCssVar: u, | ||
setCssVar: m, | ||
removeCssVar: d | ||
} = $({ | ||
scopeName: e | ||
}), s = S(null), P = S(null), f = X(o, "modelValue", r), y = S("close"), { | ||
cancelAnim: E | ||
} = k({ | ||
scopeName: e, | ||
scopeName: o | ||
}), e = E(null), P = E(null), f = q(s, "modelValue", n), y = E("close"), { | ||
cancelAnim: M | ||
} = N({ | ||
scopeName: o, | ||
positionStatus: y, | ||
props: o, | ||
props: s, | ||
refs: { | ||
modalRef: s | ||
modalRef: e | ||
} | ||
}), { | ||
isMouseDown: p, | ||
handlePointerDown: V, | ||
handlePointerMove: v, | ||
handlePointerDown: S, | ||
handlePointerMove: c, | ||
handlePointerUp: g | ||
} = j({ | ||
} = K({ | ||
vModel: f, | ||
scopeName: e, | ||
scopeName: o, | ||
positionStatus: y, | ||
props: o, | ||
props: s, | ||
refs: { | ||
modalRef: s, | ||
modalRef: e, | ||
panelRef: P | ||
} | ||
}), b = (i) => { | ||
if (o.isBackdrop && i.target === i.currentTarget) { | ||
if (o.isPersistent) | ||
return E(); | ||
if (s.isBackdrop && i.target === i.currentTarget) { | ||
if (s.isPersistent) | ||
return M(); | ||
f.value = !1; | ||
} | ||
}, A = (i) => { | ||
}, C = (i) => { | ||
i.stopPropagation(); | ||
}, c = () => { | ||
var l; | ||
if (!s.value) | ||
return; | ||
o.isBackdrop ? s.value.showModal() : s.value.show(), (l = s.value) == null || l.style.setProperty("visibility", "visible"), navigator.userAgent.toLowerCase().includes("firefox") || s.value.animate([ | ||
}, v = () => { | ||
var a; | ||
!e.value || (s.isBackdrop ? e.value.showModal() : e.value.show(), (a = e.value) == null || a.style.setProperty("visibility", "visible"), navigator.userAgent.toLowerCase().includes("firefox") || (A(e.value, "opacity"), e.value.animate([ | ||
{ opacity: 0 }, | ||
@@ -299,4 +301,6 @@ { opacity: 1 } | ||
pseudoElement: "::backdrop", | ||
easing: C | ||
}), s.value.animate( | ||
easing: w | ||
}).onfinish = () => { | ||
e.value && V(e.value); | ||
}), A(e.value, "bottom"), e.value.animate( | ||
[ | ||
@@ -307,3 +311,3 @@ { | ||
{ | ||
bottom: a("snapPointPosition") | ||
bottom: u("snapPointPosition") | ||
} | ||
@@ -313,14 +317,15 @@ ], | ||
duration: 300, | ||
easing: C | ||
easing: w | ||
} | ||
).onfinish = () => { | ||
y.value = o.snapPoint ? "snap" : "full", m({ | ||
y.value = s.snapPoint ? "snap" : "full", m({ | ||
name: "bottom", | ||
value: a("snapPointPosition") | ||
}), o.isScrollLock && T("hidden"); | ||
}; | ||
}, w = () => { | ||
if (!s.value) | ||
value: u("snapPointPosition") | ||
}), s.isScrollLock && $("hidden"); | ||
}, !e.value) || V(e.value); | ||
}, T = () => { | ||
if (!e.value) | ||
return; | ||
navigator.userAgent.toLowerCase().includes("firefox") || s.value.animate([ | ||
const i = navigator.userAgent.toLowerCase().includes("firefox"); | ||
A(e.value, "opacity"), i || (e.value.animate([ | ||
{ opacity: 1 }, | ||
@@ -331,7 +336,9 @@ { opacity: 0 } | ||
pseudoElement: "::backdrop", | ||
easing: C | ||
}), s.value.animate( | ||
easing: w | ||
}).onfinish = () => { | ||
e.value && V(e.value); | ||
}), A(e.value, "bottom"), e.value.animate( | ||
[ | ||
{ | ||
bottom: a("bottom") | ||
bottom: u("bottom") | ||
}, | ||
@@ -344,27 +351,27 @@ { | ||
duration: 300, | ||
easing: C | ||
easing: w | ||
} | ||
).onfinish = () => { | ||
var l, u, x; | ||
var a, r, B; | ||
m({ | ||
name: "bottom", | ||
value: "-100%" | ||
}), y.value = "close", p.value = !1, (l = s.value) == null || l.close(), (u = s.value) == null || u.style.setProperty("display", "initial"), (x = s.value) == null || x.style.setProperty("visibility", "hidden"), T("reset"); | ||
}), y.value = "close", p.value = !1, (a = e.value) == null || a.close(), (r = e.value) == null || r.style.setProperty("display", "initial"), (B = e.value) == null || B.style.setProperty("visibility", "hidden"), $("reset"), e.value && V(e.value); | ||
}; | ||
}; | ||
return M( | ||
return Y( | ||
() => f.value, | ||
(i) => { | ||
i ? c() : w(); | ||
i ? v() : T(); | ||
} | ||
), M( | ||
() => o.isScrollLock, | ||
), Y( | ||
() => s.isScrollLock, | ||
(i) => { | ||
T(i ? "hidden" : "auto"); | ||
$(i ? "hidden" : "auto"); | ||
} | ||
), M([() => o.snapPoint, () => P.value], ([i, l]) => { | ||
let u; | ||
i ? i === "auto" ? u = `calc(${(l == null ? void 0 : l.getBoundingClientRect().height) || 0}px + 36px - 100%)` : u = `calc(${i} - 100%)` : u = "0px", m({ | ||
), Y([() => s.snapPoint, () => P.value], ([i, a]) => { | ||
let r; | ||
i ? i === "auto" ? r = `calc(${(a == null ? void 0 : a.getBoundingClientRect().height) || 0}px + 36px - 100%)` : r = `calc(${i} - 100%)` : r = "0px", m({ | ||
name: "snapPointPosition", | ||
value: u | ||
value: r | ||
}); | ||
@@ -379,48 +386,48 @@ }, { | ||
value: "0" | ||
}), L(() => { | ||
s.value && (s.value.style.setProperty("bottom", `var(--${e}-bottom)`), s.value.addEventListener("cancel", () => { | ||
}), _(() => { | ||
e.value && (e.value.style.setProperty("bottom", `var(--${o}-bottom)`), e.value.addEventListener("cancel", () => { | ||
f.value = !1; | ||
}), f.value || (s.value.style.setProperty("display", "initial"), s.value.style.setProperty("visibility", "hidden"))); | ||
}), O(() => { | ||
d("bottom"), d("movementAmountY"), d("snapPointPosition"), s.value && s.value.removeEventListener("cancel", () => { | ||
}), f.value || (e.value.style.setProperty("display", "initial"), e.value.style.setProperty("visibility", "hidden"))); | ||
}), U(() => { | ||
d("bottom"), d("movementAmountY"), d("snapPointPosition"), e.value && e.value.removeEventListener("cancel", () => { | ||
}); | ||
}), (i, l) => (_(), U("dialog", { | ||
}), (i, a) => (H(), W("dialog", { | ||
ref_key: "modalRef", | ||
ref: s, | ||
ref: e, | ||
class: "swipe-modal modal-style", | ||
onClick: b | ||
}, [ | ||
Y("div", { | ||
x("div", { | ||
tabindex: "-1", | ||
class: "swipe-modal-content", | ||
onClick: A | ||
onClick: C | ||
}, [ | ||
Y("div", { | ||
x("div", { | ||
class: "swipe-modal-drag-handle-wrapper", | ||
onMousedown: l[0] || (l[0] = (u) => h(V)({ | ||
mouseEvent: u, | ||
onMousedown: a[0] || (a[0] = (r) => h(S)({ | ||
mouseEvent: r, | ||
eventType: "mouse" | ||
})), | ||
onMousemove: l[1] || (l[1] = (u) => h(v)({ | ||
mouseEvent: u, | ||
onMousemove: a[1] || (a[1] = (r) => h(c)({ | ||
mouseEvent: r, | ||
eventType: "mouse" | ||
})), | ||
onMouseup: l[2] || (l[2] = //@ts-ignore | ||
(...u) => h(g) && h(g)(...u)), | ||
onTouchstart: l[3] || (l[3] = (u) => h(V)({ | ||
touchEvent: u, | ||
onMouseup: a[2] || (a[2] = //@ts-ignore | ||
(...r) => h(g) && h(g)(...r)), | ||
onTouchstart: a[3] || (a[3] = (r) => h(S)({ | ||
touchEvent: r, | ||
eventType: "touch" | ||
})), | ||
onTouchmove: l[4] || (l[4] = (u) => h(v)({ | ||
touchEvent: u, | ||
onTouchmove: a[4] || (a[4] = (r) => h(c)({ | ||
touchEvent: r, | ||
eventType: "touch" | ||
})), | ||
onTouchend: l[5] || (l[5] = //@ts-ignore | ||
(...u) => h(g) && h(g)(...u)) | ||
onTouchend: a[5] || (a[5] = //@ts-ignore | ||
(...r) => h(g) && h(g)(...r)) | ||
}, [ | ||
i.isDragHandle ? B(i.$slots, "drag-handle", { key: 0 }, () => [ | ||
K | ||
], !0) : H("", !0) | ||
i.isDragHandle ? F(i.$slots, "drag-handle", { key: 0 }, () => [ | ||
Z | ||
], !0) : G("", !0) | ||
], 32), | ||
Y("div", { | ||
x("div", { | ||
ref_key: "panelRef", | ||
@@ -430,3 +437,3 @@ ref: P, | ||
}, [ | ||
B(i.$slots, "default", {}, void 0, !0) | ||
F(i.$slots, "default", {}, void 0, !0) | ||
], 512) | ||
@@ -436,11 +443,11 @@ ]) | ||
} | ||
}), Z = (t, n) => { | ||
const o = t.__vccOpts || t; | ||
for (const [r, e] of n) | ||
o[r] = e; | ||
return o; | ||
}, ee = /* @__PURE__ */ Z(Q, [["__scopeId", "data-v-31c69cef"]]); | ||
}), ee = (t, l) => { | ||
const s = t.__vccOpts || t; | ||
for (const [n, o] of l) | ||
s[n] = o; | ||
return s; | ||
}, ne = /* @__PURE__ */ ee(R, [["__scopeId", "data-v-8cbd34e1"]]); | ||
export { | ||
ee as SwipeModal, | ||
ee as default | ||
ne as SwipeModal, | ||
ne as default | ||
}; |
{ | ||
"name": "@takuma-ru/vue-swipe-modal", | ||
"type": "module", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "description": "Swipeable Bottom Sheet library for vue2 and vue3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
43327
637