Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 2.1.0 to 2.2.0

src/types.d.ts

33

dist/swipe-modal.esm.js
import { defineComponent, ref, computed, watch, isVue2, isVue3 } from 'vue-demi';
var script = defineComponent({
name: 'SwipeModal',
name: 'swipe-modal',
model: {

@@ -380,3 +380,3 @@ prop: 'modelValue',

if (!inject) return;
inject("data-v-47a401c8_0", {
inject("data-v-4fe5c949_0", {
source: "#swipe-modal-takumaru-vue-swipe-modal{position:fixed;scrollbar-width:none;z-index:15}#swipe-modal-takumaru-vue-swipe-modal .modal-background{position:fixed;z-index:11;width:100vw;height:100vh;top:50%;left:50%;transform:translate(-50%,-50%)}#swipe-modal-takumaru-vue-swipe-modal .modal-contents{--contents-height:30vh;--contents-bottom-position:0%;position:fixed;z-index:12;min-height:var(--contents-height);max-height:100vh;bottom:var(--contents-bottom-position);left:50%;transform:translateX(-50%) translateY(0);overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;backface-visibility:hidden;-webkit-backface-visibility:hidden;filter:drop-shadow(0 16px 40px rgba(0, 37, 80, .2))}#swipe-modal-takumaru-vue-swipe-modal .modal-contents::-webkit-scrollbar{width:0}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip{--tip-color:#c8c8c8;z-index:12;position:relative;top:0;height:4px;width:100%;padding-top:8px;padding-bottom:8px;cursor:s-resize}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip::after{position:absolute;content:\"\";top:8px;height:4px;width:40px;background-color:var(--tip-color);transform:translateX(-50%);border-radius:10px}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-from{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-to{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-from{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-to{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-from{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-active{transition:all .3s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-to{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-from{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-active{transition:all .25s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-to{bottom:calc(-1 * var(--contents-height))!important}",

@@ -406,4 +406,29 @@ map: undefined,

var __vue_component__$1 = __vue_component__;
var swipeModal = __vue_component__;
export { __vue_component__$1 as swipeModal };
// 重複して読み込まないようにする
const install = function (Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('swipeModal', swipeModal); // Vuetifyのように、どこからでもこのコンポーネントを呼び出せるようにする
}; // Vue.use() のためのモジュール定義を作成
// Create module definition for Vue.use()
const plugin = {
install
}; // vue が見つかった場合に自動インストールする (ブラウザで <script> タグを用いた場合等)
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
export { plugin as default, swipeModal };

2

dist/swipe-modal.min.js

@@ -1,1 +0,1 @@

var SwipeModal=function(e){"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var a,n,i=[],l=!0,r=!1;try{for(o=o.call(e);!(l=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);l=!0);}catch(e){r=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(r)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,a=new Array(t);o<t;o++)a[o]=e[o];return a}var a=e.defineComponent({name:"SwipeModal",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#80808080"},fullscreen:{type:Boolean,default:!1},noTip:{type:Boolean,default:!1},contentsWidth:{type:String,default:"100%"},contentsHeight:{type:String,default:"30vh"},borderTopRadius:{type:String,default:null},borderTopLeftRadius:{type:String,default:"0px"},borderTopRightRadius:{type:String,default:"0px"},contentsColor:{type:String,default:"white"},tipColor:{type:String,default:"#c8c8c8"},darkContentsColor:{type:String,default:"#1E1E1E"}},emits:["update:modelValue"],setup:function(t,o){var a=e.ref(!1),n=e.ref(!1),i=e.ref(null),l=e.ref(0),r=e.ref("0px"),u=e.ref(0),s=e.ref(0),d=e.computed({get:function(){return t.modelValue},set:function(e){return o.emit("update:modelValue",e)}});e.watch(d,(function(e){e&&c()}));var c=function(){a.value=!1,n.value=!1,i.value=null,l.value=0,r.value="0px",u.value=0,s.value=0,document.documentElement.style.overflowY="hidden"},p=function(){a.value=!1,n.value=!1,document.documentElement.style.overflowY="auto",o.emit("update:modelValue",!1)};return{modalHeight:l,contentsBottomPosition:r,close:p,mouseDown:function(e){i.value=document.querySelector(".modal-contents"),l.value=i.value.getBoundingClientRect().height,u.value=e.pageY,a.value=!0},mouseMove:function(e){a.value&&(s.value=e.pageY,r.value=(u.value-s.value<=0?u.value-s.value:0)+"px")},mouseUp:function(){a.value=!1,-1*(u.value-s.value)>l.value*(1/8)?p():r.value="0px"},touchStart:function(e){i.value=document.querySelector(".modal-contents"),l.value=i.value.getBoundingClientRect().height,i.value.scrollTop<=0&&(u.value=e.touches[0].pageY,n.value=!0)},touchMove:function(e){n.value&&(s.value=e.touches[0].pageY,u.value-s.value<=0?r.value=u.value-s.value+"px":r.value="0px",r.value=(u.value-s.value<=0?u.value-s.value:0)+"px")},touchEnd:function(){n.value=!1,-1*(u.value-s.value)>l.value*(1/8)?p():r.value="0px"},isVue2:e.isVue2,isVue3:e.isVue3}}});function n(e,t,o,a,n,i,l,r,u,s){"boolean"!=typeof l&&(u=r,r=l,l=!1);const d="function"==typeof o?o.options:o;let c;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,n&&(d.functional=!0)),a&&(d._scopeId=a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,u(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=c):t&&(c=l?function(e){t.call(this,s(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),c)if(d.functional){const e=d.render;d.render=function(t,o){return c.call(o),e(t,o)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,c):[c]}return o}const i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function l(e){return(e,t)=>function(e,t){const o=i?t.media||"default":e,a=u[o]||(u[o]={ids:new Set,styles:[]});if(!a.ids.has(e)){a.ids.add(e);let o=t.source;if(t.map&&(o+="\n/*# sourceURL="+t.map.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),a.element||(a.element=document.createElement("style"),a.element.type="text/css",t.media&&a.element.setAttribute("media",t.media),void 0===r&&(r=document.head||document.getElementsByTagName("head")[0]),r.appendChild(a.element)),"styleSheet"in a.element)a.styles.push(o),a.element.styleSheet.cssText=a.styles.filter(Boolean).join("\n");else{const e=a.ids.size-1,t=document.createTextNode(o),n=a.element.childNodes;n[e]&&a.element.removeChild(n[e]),n.length?a.element.insertBefore(t,n[e]):a.element.appendChild(t)}}}(e,t)}let r;const u={};var s=n({render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"swipe-modal-takumaru-vue-swipe-modal"},on:{mousemove:e.mouseMove,mouseup:e.mouseUp}},[o("transition",{attrs:{name:"swipe-modal-background",appear:""}},[e.modelValue?o("div",{staticClass:"modal-background",style:{backgroundColor:e.backgroundColor},on:{mouseup:function(t){!e.persistent&&e.close()}}}):e._e()]),e._v(" "),o("transition",{attrs:{name:"swipe-modal-contents",appear:""}},[e.modelValue?o("div",{ref:"modal-contents",staticClass:"modal-contents",style:"\n width: "+e.contentsWidth+";\n --contents-height: "+(e.fullscreen?"100%":e.modalHeight>0?e.modalHeight+"px":e.contentsHeight)+";\n border-top-left-radius: "+(e.borderTopRadius?e.borderTopRadius:e.borderTopLeftRadius)+";\n border-top-right-radius: "+(e.borderTopRadius?e.borderTopRadius:e.borderTopRightRadius)+";\n background-color: "+(e.dark?e.darkContentsColor:e.contentsColor)+";\n color: "+(e.dark?"white":"back")+";\n --contents-bottom-position: "+e.contentsBottomPosition+";\n ",on:{touchstart:e.touchStart,touchmove:e.touchMove,touchend:e.touchEnd}},[e.noTip?e._e():o("div",{staticClass:"modal-contents-chip",style:"\n --tip-color: "+e.tipColor+";\n ",on:{mousedown:e.mouseDown}}),e._v(" "),e._t("default")],2):e._e()])],1)},staticRenderFns:[]},(function(e){e&&e("data-v-47a401c8_0",{source:'#swipe-modal-takumaru-vue-swipe-modal{position:fixed;scrollbar-width:none;z-index:15}#swipe-modal-takumaru-vue-swipe-modal .modal-background{position:fixed;z-index:11;width:100vw;height:100vh;top:50%;left:50%;transform:translate(-50%,-50%)}#swipe-modal-takumaru-vue-swipe-modal .modal-contents{--contents-height:30vh;--contents-bottom-position:0%;position:fixed;z-index:12;min-height:var(--contents-height);max-height:100vh;bottom:var(--contents-bottom-position);left:50%;transform:translateX(-50%) translateY(0);overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;backface-visibility:hidden;-webkit-backface-visibility:hidden;filter:drop-shadow(0 16px 40px rgba(0, 37, 80, .2))}#swipe-modal-takumaru-vue-swipe-modal .modal-contents::-webkit-scrollbar{width:0}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip{--tip-color:#c8c8c8;z-index:12;position:relative;top:0;height:4px;width:100%;padding-top:8px;padding-bottom:8px;cursor:s-resize}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip::after{position:absolute;content:"";top:8px;height:4px;width:40px;background-color:var(--tip-color);transform:translateX(-50%);border-radius:10px}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-from{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-to{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-from{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-to{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-from{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-active{transition:all .3s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-to{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-from{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-active{transition:all .25s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-to{bottom:calc(-1 * var(--contents-height))!important}',map:void 0,media:void 0})}),a,undefined,false,undefined,!1,l,void 0,void 0),d=Object.freeze({__proto__:null,swipeModal:s}),c={};return Object.entries(d).forEach((function(e){var o=t(e,2),a=o[0],n=o[1];if("default"!==a){var i=n;c[a]=i}})),c}(VueDemi);
var SwipeModal=function(e,t){"use strict";var o=t.defineComponent({name:"swipe-modal",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#80808080"},fullscreen:{type:Boolean,default:!1},noTip:{type:Boolean,default:!1},contentsWidth:{type:String,default:"100%"},contentsHeight:{type:String,default:"30vh"},borderTopRadius:{type:String,default:null},borderTopLeftRadius:{type:String,default:"0px"},borderTopRightRadius:{type:String,default:"0px"},contentsColor:{type:String,default:"white"},tipColor:{type:String,default:"#c8c8c8"},darkContentsColor:{type:String,default:"#1E1E1E"}},emits:["update:modelValue"],setup:function(e,o){var a=t.ref(!1),n=t.ref(!1),i=t.ref(null),l=t.ref(0),s=t.ref("0px"),u=t.ref(0),d=t.ref(0),r=t.computed({get:function(){return e.modelValue},set:function(e){return o.emit("update:modelValue",e)}});t.watch(r,(function(e){e&&p()}));var p=function(){a.value=!1,n.value=!1,i.value=null,l.value=0,s.value="0px",u.value=0,d.value=0,document.documentElement.style.overflowY="hidden"},m=function(){a.value=!1,n.value=!1,document.documentElement.style.overflowY="auto",o.emit("update:modelValue",!1)};return{modalHeight:l,contentsBottomPosition:s,close:m,mouseDown:function(e){i.value=document.querySelector(".modal-contents"),l.value=i.value.getBoundingClientRect().height,u.value=e.pageY,a.value=!0},mouseMove:function(e){a.value&&(d.value=e.pageY,s.value=(u.value-d.value<=0?u.value-d.value:0)+"px")},mouseUp:function(){a.value=!1,-1*(u.value-d.value)>l.value*(1/8)?m():s.value="0px"},touchStart:function(e){i.value=document.querySelector(".modal-contents"),l.value=i.value.getBoundingClientRect().height,i.value.scrollTop<=0&&(u.value=e.touches[0].pageY,n.value=!0)},touchMove:function(e){n.value&&(d.value=e.touches[0].pageY,u.value-d.value<=0?s.value=u.value-d.value+"px":s.value="0px",s.value=(u.value-d.value<=0?u.value-d.value:0)+"px")},touchEnd:function(){n.value=!1,-1*(u.value-d.value)>l.value*(1/8)?m():s.value="0px"},isVue2:t.isVue2,isVue3:t.isVue3}}});function a(e,t,o,a,n,i,l,s,u,d){"boolean"!=typeof l&&(u=s,s=l,l=!1);const r="function"==typeof o?o.options:o;let p;if(e&&e.render&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns,r._compiled=!0,n&&(r.functional=!0)),a&&(r._scopeId=a),i?(p=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,u(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},r._ssrRegister=p):t&&(p=l?function(e){t.call(this,d(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),p)if(r.functional){const e=r.render;r.render=function(t,o){return p.call(o),e(t,o)}}else{const e=r.beforeCreate;r.beforeCreate=e?[].concat(e,p):[p]}return o}const n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function i(e){return(e,t)=>function(e,t){const o=n?t.media||"default":e,a=s[o]||(s[o]={ids:new Set,styles:[]});if(!a.ids.has(e)){a.ids.add(e);let o=t.source;if(t.map&&(o+="\n/*# sourceURL="+t.map.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),a.element||(a.element=document.createElement("style"),a.element.type="text/css",t.media&&a.element.setAttribute("media",t.media),void 0===l&&(l=document.head||document.getElementsByTagName("head")[0]),l.appendChild(a.element)),"styleSheet"in a.element)a.styles.push(o),a.element.styleSheet.cssText=a.styles.filter(Boolean).join("\n");else{const e=a.ids.size-1,t=document.createTextNode(o),n=a.element.childNodes;n[e]&&a.element.removeChild(n[e]),n.length?a.element.insertBefore(t,n[e]):a.element.appendChild(t)}}}(e,t)}let l;const s={};var u=a({render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"swipe-modal-takumaru-vue-swipe-modal"},on:{mousemove:e.mouseMove,mouseup:e.mouseUp}},[o("transition",{attrs:{name:"swipe-modal-background",appear:""}},[e.modelValue?o("div",{staticClass:"modal-background",style:{backgroundColor:e.backgroundColor},on:{mouseup:function(t){!e.persistent&&e.close()}}}):e._e()]),e._v(" "),o("transition",{attrs:{name:"swipe-modal-contents",appear:""}},[e.modelValue?o("div",{ref:"modal-contents",staticClass:"modal-contents",style:"\n width: "+e.contentsWidth+";\n --contents-height: "+(e.fullscreen?"100%":e.modalHeight>0?e.modalHeight+"px":e.contentsHeight)+";\n border-top-left-radius: "+(e.borderTopRadius?e.borderTopRadius:e.borderTopLeftRadius)+";\n border-top-right-radius: "+(e.borderTopRadius?e.borderTopRadius:e.borderTopRightRadius)+";\n background-color: "+(e.dark?e.darkContentsColor:e.contentsColor)+";\n color: "+(e.dark?"white":"back")+";\n --contents-bottom-position: "+e.contentsBottomPosition+";\n ",on:{touchstart:e.touchStart,touchmove:e.touchMove,touchend:e.touchEnd}},[e.noTip?e._e():o("div",{staticClass:"modal-contents-chip",style:"\n --tip-color: "+e.tipColor+";\n ",on:{mousedown:e.mouseDown}}),e._v(" "),e._t("default")],2):e._e()])],1)},staticRenderFns:[]},(function(e){e&&e("data-v-4fe5c949_0",{source:'#swipe-modal-takumaru-vue-swipe-modal{position:fixed;scrollbar-width:none;z-index:15}#swipe-modal-takumaru-vue-swipe-modal .modal-background{position:fixed;z-index:11;width:100vw;height:100vh;top:50%;left:50%;transform:translate(-50%,-50%)}#swipe-modal-takumaru-vue-swipe-modal .modal-contents{--contents-height:30vh;--contents-bottom-position:0%;position:fixed;z-index:12;min-height:var(--contents-height);max-height:100vh;bottom:var(--contents-bottom-position);left:50%;transform:translateX(-50%) translateY(0);overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;backface-visibility:hidden;-webkit-backface-visibility:hidden;filter:drop-shadow(0 16px 40px rgba(0, 37, 80, .2))}#swipe-modal-takumaru-vue-swipe-modal .modal-contents::-webkit-scrollbar{width:0}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip{--tip-color:#c8c8c8;z-index:12;position:relative;top:0;height:4px;width:100%;padding-top:8px;padding-bottom:8px;cursor:s-resize}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip::after{position:absolute;content:"";top:8px;height:4px;width:40px;background-color:var(--tip-color);transform:translateX(-50%);border-radius:10px}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-from{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-to{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-from{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-to{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-from{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-active{transition:all .3s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-to{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-from{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-active{transition:all .25s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-to{bottom:calc(-1 * var(--contents-height))!important}',map:void 0,media:void 0})}),o,undefined,false,undefined,!1,i,void 0,void 0),d={install:function e(t){e.installed||(e.installed=!0,t.component("swipeModal",u))}},r=null;return"undefined"!=typeof window?r=window.Vue:"undefined"!=typeof global&&(r=global.Vue),r&&r.use(d),e.default=d,e.swipeModal=u,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueDemi);

@@ -1,60 +0,3 @@

'use strict';var vueDemi=require('vue-demi');function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var script = vueDemi.defineComponent({
name: 'SwipeModal',
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var vueDemi=require('vue-demi');var script = vueDemi.defineComponent({
name: 'swipe-modal',
model: {

@@ -420,3 +363,3 @@ prop: 'modelValue',

if (!inject) return;
inject("data-v-47a401c8_0", {
inject("data-v-4fe5c949_0", {
source: "#swipe-modal-takumaru-vue-swipe-modal{position:fixed;scrollbar-width:none;z-index:15}#swipe-modal-takumaru-vue-swipe-modal .modal-background{position:fixed;z-index:11;width:100vw;height:100vh;top:50%;left:50%;transform:translate(-50%,-50%)}#swipe-modal-takumaru-vue-swipe-modal .modal-contents{--contents-height:30vh;--contents-bottom-position:0%;position:fixed;z-index:12;min-height:var(--contents-height);max-height:100vh;bottom:var(--contents-bottom-position);left:50%;transform:translateX(-50%) translateY(0);overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;backface-visibility:hidden;-webkit-backface-visibility:hidden;filter:drop-shadow(0 16px 40px rgba(0, 37, 80, .2))}#swipe-modal-takumaru-vue-swipe-modal .modal-contents::-webkit-scrollbar{width:0}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip{--tip-color:#c8c8c8;z-index:12;position:relative;top:0;height:4px;width:100%;padding-top:8px;padding-bottom:8px;cursor:s-resize}#swipe-modal-takumaru-vue-swipe-modal .modal-contents-chip::after{position:absolute;content:\"\";top:8px;height:4px;width:40px;background-color:var(--tip-color);transform:translateX(-50%);border-radius:10px}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-from{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-enter-to{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-from{opacity:1}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-active{transition:all .2s ease-out}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-background-leave-to{opacity:0}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-from{bottom:calc(-1 * var(--contents-height))!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-active{transition:all .3s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-enter-to{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-from{bottom:var(--contents-bottom-position)!important}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-active{transition:all .25s cubic-bezier(.25,.8,.25,1)}#swipe-modal-takumaru-vue-swipe-modal .swipe-modal-contents-leave-to{bottom:calc(-1 * var(--contents-height))!important}",

@@ -433,3 +376,3 @@ map: undefined,

var __vue_module_identifier__ = "data-v-47a401c8";
var __vue_module_identifier__ = "data-v-4fe5c949";
/* functional template */

@@ -445,13 +388,25 @@

var __vue_component__$1 = __vue_component__;var components=/*#__PURE__*/Object.freeze({__proto__:null,swipeModal:__vue_component__$1});var plugin = {};
Object.entries(components).forEach(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
componentName = _ref2[0],
component = _ref2[1];
var swipeModal = __vue_component__;// 重複して読み込まないようにする
var install = function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('swipeModal', swipeModal); // Vuetifyのように、どこからでもこのコンポーネントを呼び出せるようにする
}; // Vue.use() のためのモジュール定義を作成
// Create module definition for Vue.use()
if (componentName !== 'default') {
var key = componentName;
var val = component;
plugin[key] = val;
}
});module.exports=plugin;
var plugin = {
install: install
}; // vue が見つかった場合に自動インストールする (ブラウザで <script> タグを用いた場合等)
var GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}exports["default"]=plugin;exports.swipeModal=swipeModal;
{
"name": "@takuma-ru/vue-swipe-modal",
"version": "2.1.0",
"version": "2.2.0",
"private": false,

@@ -34,9 +34,10 @@ "description": "",

"main": "dist/swipe-modal.ssr.js",
"browser": "src/lib-components/swipeModal.vue",
"browser": "dist/swipe-modal.esm.js",
"module": "dist/swipe-modal.esm.js",
"unpkg": "dist/swipe-modal.min.js",
"types": "dist/lib-components/swipeModal.vue.d.ts",
"types": "src/types.d.ts",
"files": [
"dist/*",
"src/**/*.vue"
"src/**/*.vue",
"src/types.d.ts"
],

@@ -56,2 +57,4 @@ "sideEffects": false,

"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-typescript": "^8.3.2",
"@babel/core": "^7.12.10",

@@ -58,0 +61,0 @@ "@babel/preset-env": "^7.12.11",

@@ -40,3 +40,3 @@ # @takuma-ru/vue-swpie-modal

import { ref } from 'vue'
import swipeModal from '@takuma-ru/vue-swipe-modal/src/lib-components/swipeModal.vue'
import { swipeModal } from '@takuma-ru/vue-swipe-modal'

@@ -65,3 +65,3 @@ const modal = ref(false)

import { defineComponent, ref, reactive } from '@vue/composition-api';
import swipeModal from '@takuma-ru/vue-swipe-modal'
import { swipeModal } from '@takuma-ru/vue-swipe-modal'

@@ -68,0 +68,0 @@ export default defineComponent({

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