Socket
Socket
Sign inDemoInstall

@takuma-ru/vue-swipe-modal

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@takuma-ru/vue-swipe-modal - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2-beta.0

LICENSE.md

67

dist/vueSwipeModal.js
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.swipe-modal[data-v-8a63990a]{position:fixed;top:auto;bottom:var(--ef0a5750);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-8a63990a]::backdrop{background-color:#00000080;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.swipe-modal-content[data-v-8a63990a]{width:100%;height:100%}.swipe-modal-content>.panel[data-v-8a63990a]{max-height:calc(100dvh - 36px);overflow-y:scroll}.modal-style[data-v-8a63990a]{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-8a63990a]{color:#000;background-color:#f7f2fa;box-shadow:0 1px 4px #0000005e}}.swipe-modal-drag-handle-wrapper[data-v-8a63990a]{position:relative;top:0;flex-shrink:0;height:36px;cursor:grab}.swipe-modal-drag-handle-wrapper[data-v-8a63990a]:active{cursor:grabbing}.swipe-modal-drag-handle[data-v-8a63990a]{position:absolute;left:50%;width:32px;height:4px;margin:16px 0;content:"";background-color:#ccc;border-radius:2px;transform:translate(-50%)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import { getCurrentInstance as z, ref as m, watch as C, nextTick as O, computed as R, defineComponent as D, useCssVars as F, unref as N, onMounted as Y, openBlock as I, createElementBlock as A, createElementVNode as V, renderSlot as $, createCommentVNode as H, pushScopeId as L, popScopeId as J } from "vue";
import { getCurrentInstance as z, ref as m, watch as _, nextTick as O, computed as R, defineComponent as D, useCssVars as F, unref as N, onMounted as Y, openBlock as I, createElementBlock as A, createElementVNode as C, renderSlot as $, createCommentVNode as H, pushScopeId as L, popScopeId as J } from "vue";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;

@@ -8,4 +8,4 @@ const G = (a) => typeof a < "u";

}
function W(a, d, o, _ = {}) {
var t, k, f;
function W(a, d, o, k = {}) {
var t, B, f;
const {

@@ -18,23 +18,23 @@ clone: u = !1,

shouldEmit: v
} = _, c = z(), B = o || (c == null ? void 0 : c.emit) || ((t = c == null ? void 0 : c.$emit) == null ? void 0 : t.bind(c)) || ((f = (k = c == null ? void 0 : c.proxy) == null ? void 0 : k.$emit) == null ? void 0 : f.bind(c == null ? void 0 : c.proxy));
} = k, c = z(), E = o || (c == null ? void 0 : c.emit) || ((t = c == null ? void 0 : c.$emit) == null ? void 0 : t.bind(c)) || ((f = (B = c == null ? void 0 : c.proxy) == null ? void 0 : B.$emit) == null ? void 0 : f.bind(c == null ? void 0 : c.proxy));
let y = h;
d || (d = "modelValue"), y = y || `update:${d.toString()}`;
const p = (s) => u ? typeof u == "function" ? u(s) : U(s) : s, M = () => G(a[d]) ? p(a[d]) : r, T = (s) => {
v ? v(s) && B(y, s) : B(y, s);
const p = (s) => u ? typeof u == "function" ? u(s) : U(s) : s, M = () => G(a[d]) ? p(a[d]) : r, V = (s) => {
v ? v(s) && E(y, s) : E(y, s);
};
if (b) {
const s = M(), E = m(s);
const s = M(), T = m(s);
let g = !1;
return C(
return _(
() => a[d],
(P) => {
g || (g = !0, E.value = p(P), O(() => g = !1));
g || (g = !0, T.value = p(P), O(() => g = !1));
}
), C(
E,
), _(
T,
(P) => {
!g && (P !== a[d] || i) && T(P);
!g && (P !== a[d] || i) && V(P);
},
{ deep: i }
), E;
), T;
} else

@@ -46,7 +46,7 @@ return R({

set(s) {
T(s);
V(s);
}
});
}
const X = (a) => (L("data-v-8a63990a"), a = a(), J(), a), j = /* @__PURE__ */ X(() => /* @__PURE__ */ V("div", { class: "swipe-modal-drag-handle" }, null, -1)), q = /* @__PURE__ */ D({
const X = (a) => (L("data-v-8a63990a"), a = a(), J(), a), j = /* @__PURE__ */ X(() => /* @__PURE__ */ C("div", { class: "swipe-modal-drag-handle" }, null, -1)), q = /* @__PURE__ */ D({
__name: "SwipeModal",

@@ -67,5 +67,5 @@ props: {

}));
const o = a, _ = d, t = m(null), k = m(null), f = W(o, "modelValue", _), u = m("-100%"), b = m(!1), h = m(0), i = m(0), r = m("close"), v = R(() => {
const o = a, k = d, t = m(null), B = m(null), f = W(o, "modelValue", k), u = m("-100%"), b = m(!1), h = m(0), i = m(0), r = m("close"), v = R(() => {
var e;
return o.snapPoint ? o.snapPoint === "auto" ? `calc(${((e = k.value) == null ? void 0 : e.getBoundingClientRect().height) || 0}px + 36px - 100%)` : `calc(${o.snapPoint} - 100%)` : "0px";
return o.snapPoint ? o.snapPoint === "auto" ? `calc(${((e = B.value) == null ? void 0 : e.getBoundingClientRect().height) || 0}px + 36px - 100%)` : `calc(${o.snapPoint} - 100%)` : "0px";
}), c = ({

@@ -77,3 +77,3 @@ mouseEvent: e,

l === "mouse" ? h.value = e.y : h.value = n.touches[0].clientY, b.value = !0;
}, B = ({
}, E = ({
mouseEvent: e,

@@ -100,3 +100,3 @@ touchEvent: n,

case "snap":
return o.isFullScreen ? T() : p();
return o.isFullScreen ? V() : p();
default:

@@ -140,3 +140,3 @@ return;

});
}, T = () => {
}, V = () => {
t.value && (t.value.animate(

@@ -162,3 +162,3 @@ [

}
}, E = (e) => {
}, T = (e) => {
e.stopPropagation();

@@ -217,3 +217,3 @@ }, g = () => {

};
return C(
return _(
() => f.value,

@@ -223,3 +223,3 @@ (e) => {

}
), C(
), _(
() => o.isScrollLock,

@@ -237,8 +237,8 @@ (e) => {

}, [
V("div", {
C("div", {
tabindex: "-1",
class: "swipe-modal-content",
onClick: E
onClick: T
}, [
V("div", {
C("div", {
class: "swipe-modal-drag-handle-wrapper",

@@ -249,3 +249,3 @@ onMousedown: n[0] || (n[0] = (l) => c({

})),
onMousemove: n[1] || (n[1] = (l) => B({
onMousemove: n[1] || (n[1] = (l) => E({
mouseEvent: l,

@@ -259,3 +259,3 @@ eventType: "mouse"

})),
onTouchmove: n[3] || (n[3] = (l) => B({
onTouchmove: n[3] || (n[3] = (l) => E({
touchEvent: l,

@@ -270,5 +270,5 @@ eventType: "touch"

], 32),
V("div", {
C("div", {
ref_key: "panelRef",
ref: k,
ref: B,
class: "panel"

@@ -281,7 +281,6 @@ }, [

}
});
const K = (a, d) => {
}), K = (a, d) => {
const o = a.__vccOpts || a;
for (const [_, t] of d)
o[_] = t;
for (const [k, t] of d)
o[k] = t;
return o;

@@ -288,0 +287,0 @@ }, Z = /* @__PURE__ */ K(q, [["__scopeId", "data-v-8a63990a"]]);

{
"name": "@takuma-ru/vue-swipe-modal",
"private": false,
"version": "5.0.1",
"version": "5.0.2-beta.0",
"description": "Swipeable Bottom Sheet library for vue2 and vue3",

@@ -95,4 +95,4 @@ "license": "MIT",

"stylelint-rscss": "^0.4.0",
"typescript": "^5.0.2",
"vite": "^4.5.1",
"typescript": "^5.3.3",
"vite": "^5.0.6",
"vite-plugin-css-injected-by-js": "^3.3.0",

@@ -99,0 +99,0 @@ "vue-tsc": "^1.8.5"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc