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

vue-material-tabs

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-material-tabs - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

10

dist/vue-material-tabs.esm.js

@@ -1090,3 +1090,5 @@ function calc(e) {

beforeDestroy() {
this.tabs.removeTabItem(this);
if (this.tabs) {
this.tabs.removeTabItem(this);
}
},

@@ -1173,4 +1175,4 @@

if (!inject) return;
inject("data-v-2d69fea1_0", {
source: ".tab-item[data-v-2d69fea1]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-2d69fea1],.slide-right-leave-to[data-v-2d69fea1]{transform:translateX(-100%)}.slide-left-leave-to[data-v-2d69fea1],.slide-right-enter[data-v-2d69fea1]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-2d69fea1],.slide-top-enter[data-v-2d69fea1]{transform:translateY(-100%)}.slide-bottom-enter[data-v-2d69fea1],.slide-top-leave-to[data-v-2d69fea1]{transform:translateY(100%)}",
inject("data-v-e5c03ade_0", {
source: ".tab-item[data-v-e5c03ade]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-e5c03ade],.slide-right-leave-to[data-v-e5c03ade]{transform:translateX(-100%)}.slide-left-leave-to[data-v-e5c03ade],.slide-right-enter[data-v-e5c03ade]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-e5c03ade],.slide-top-enter[data-v-e5c03ade]{transform:translateY(-100%)}.slide-bottom-enter[data-v-e5c03ade],.slide-top-leave-to[data-v-e5c03ade]{transform:translateY(100%)}",
map: undefined,

@@ -1183,3 +1185,3 @@ media: undefined

const __vue_scope_id__ = "data-v-2d69fea1";
const __vue_scope_id__ = "data-v-e5c03ade";
/* module identifier */

@@ -1186,0 +1188,0 @@

2

dist/vue-material-tabs.min.js

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

var VueMaterialTabs=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,n,i,a,r,o){try{var s=t[r](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,a)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(i=n.next()).done)&&(r.push(i.value),!e||r.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(t,e)||a(t,e)||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 i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t){var e=t.currentTarget,n=function(t){var e=t.currentTarget.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,a=Math.sqrt(Math.pow(t.currentTarget.clientWidth,2)+Math.pow(t.currentTarget.clientHeight,2))/2;return{x:"".concat(n-a,"px"),y:"".concat(i-a,"px"),size:"".concat(2*a,"px")}}(t),i=n.size,a=n.y,r=n.x,o=document.createElement("span");o.classList.add("ripple"),o.style.width=o.style.height=i,o.style.top=a,o.style.left=r,e.appendChild(o),setTimeout((function(){return o.remove()}),1e3)}function s(t,e){null==t||t[e?"addEventListener":"removeEventListener"]("click",o)}var l={bind:function(t,e){return s(t,e.value)},update:function(t,e){return s(t,e.value)},unbind:function(t){return s(t,!1)}};var d={inserted:function(t,e){var n=null==e?void 0:e.value;n&&window.addEventListener("resize",n),t._onResize=n},unbind:function(t){t._onResize&&(window.removeEventListener("resize",t._onResize),delete t._onResize)}},c={touchstartX:0,isSwiping:!1};function v(t){c.isSwiping=!0,c.touchstartX=t.touches[0].clientX}function u(t){if(c.isSwiping){var e=t.currentTarget,n=t.changedTouches[0].clientX,i=c.touchstartX-n,a=Math.abs(.1*e.offsetWidth);i>a?(c.isSwiping=!1,e._callback("next")):i<-a&&(c.isSwiping=!1,e._callback("prev"))}}var f={bind:function(t,e){var n=e.value;n&&t&&(t._callback=n,function(t){t.addEventListener("touchstart",v),t.addEventListener("touchmove",u)}(t))},unbind:function(t){!function(t){t.removeEventListener("touchstart",v),t.removeEventListener("touchmove",u)}(t),t._callback&&delete t._callback}};function m(t,e,n,i,a,r,o,s,l,d){"boolean"!=typeof o&&(l=s,s=o,o=!1);const c="function"==typeof n?n.options:n;let v;if(t&&t.render&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,a&&(c.functional=!0)),i&&(c._scopeId=i),r?(v=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=v):e&&(v=o?function(t){e.call(this,d(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),v)if(c.functional){const t=c.render;c.render=function(e,n){return v.call(n),t(e,n)}}else{const t=c.beforeCreate;c.beforeCreate=t?[].concat(t,v):[v]}return n}const h="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function p(t){return(t,e)=>function(t,e){const n=h?e.media||"default":t,i=_[n]||(_[n]={ids:new Set,styles:[]});if(!i.ids.has(t)){i.ids.add(t);let n=e.source;if(e.map&&(n+="\n/*# sourceURL="+e.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),i.element||(i.element=document.createElement("style"),i.element.type="text/css",e.media&&i.element.setAttribute("media",e.media),void 0===b&&(b=document.head||document.getElementsByTagName("head")[0]),b.appendChild(i.element)),"styleSheet"in i.element)i.styles.push(n),i.element.styleSheet.cssText=i.styles.filter(Boolean).join("\n");else{const t=i.ids.size-1,e=document.createTextNode(n),a=i.element.childNodes;a[t]&&i.element.removeChild(a[t]),a.length?i.element.insertBefore(e,a[t]):i.element.appendChild(e)}}}(t,e)}let b;const _={};var g=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"resize",rawName:"v-resize",value:t.resizable,expression:"resizable"}],class:t.classes},[n("div",{staticClass:"tab__pagination__prev"},[t.pagination.has?n("Btn",{attrs:{disabled:!t.paginateIndicator.prev},on:{click:function(e){return t.onPagination("prev")}}}):t._e()],1),t._v(" "),n("nav",{directives:[{name:"touch",rawName:"v-touch",value:t.onPagination,expression:"onPagination"}],ref:"nav",staticClass:"tab__nav"},[n("ul",{ref:"navItems",staticClass:"tab__nav__items",style:t.styles},[t._l(t.navItems,(function(e){return n("li",{directives:[{name:"ripple",rawName:"v-ripple",value:t.ripple&&!e.disabled,expression:"ripple && !navItem.disabled"}],key:e.model,ref:e.model,refInFor:!0,staticClass:"tab__nav__item",class:{active:e.model===t.tabItemActive.model,disabled:e.disabled},style:t.getActiveColor(e),on:{click:function(n){return n.preventDefault(),t.select(e)}}},[n("VNode",{attrs:{node:e.nameSlot,name:e.name}})],1)})),t._v(" "),t.navSlider?n("hr",{ref:"slider",staticClass:"tab__slider"}):t._e()],2)]),t._v(" "),n("div",{staticClass:"tab__pagination__next"},[t.pagination.has?n("Btn",{attrs:{disabled:!t.paginateIndicator.next},on:{click:function(e){return t.onPagination("next")}}}):t._e()],1)])},staticRenderFns:[]},(function(t){t&&(t("data-v-e9153106_0",{source:".tab__pagination[data-v-e9153106]{display:flex;justify-content:space-between;align-items:center;vertical-align:middle;max-width:100%;flex:0 1 auto;position:relative;contain:content}.tab__pagination .tab__pagination__prev[data-v-e9153106],.tab__pagination__next[data-v-e9153106]{flex:1 40px;min-width:40px}.tab__pagination__next[data-v-e9153106] .btn svg{transform:rotate(180deg)}.tab__nav[data-v-e9153106]{position:relative;display:flex;overflow:hidden;flex:1 100%}.tab__nav__items[data-v-e9153106]{display:flex;margin:0;padding:0;flex:1 auto;transition:.3s cubic-bezier(.25,.8,.5,1);height:100%}.tab__nav__items .tab__nav__item[data-v-e9153106]{list-style:none;text-align:center;cursor:pointer;padding:.9rem 1rem;letter-spacing:.0892857143em;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;font-size:.875rem;font-weight:500;white-space:normal;transition:background .1s ease;position:relative;overflow:hidden;min-width:90px;max-width:360px;user-select:none}.tab__nav__items .tab__nav__item[data-v-e9153106]:hover:not(.disabled,.active){background:hsla(0,0%,100%,.09)}.tab__nav__items .active[data-v-e9153106]:hover{background:hsla(0,0%,100%,.18)}.tab__nav__items .disabled[data-v-e9153106]{background:#6969694f}.tab__slider[data-v-e9153106]{height:2px;width:2px;border:none;margin:0;padding:0;bottom:0;position:absolute;transition:left .3s cubic-bezier(.25,.8,.5,1),top .3s cubic-bezier(.25,.8,.5,1)}.tab__pagination--vertical[data-v-e9153106]{flex-direction:column}.tab__pagination--vertical .tab__nav__items[data-v-e9153106]{flex-direction:column;flex:1 auto;position:relative}.tab__pagination--vertical .tab__nav__item *[data-v-e9153106]{padding:0;margin:0}.tab__pagination--vertical[data-v-e9153106] .tab__pagination__prev svg{transform:rotate(90deg)}.tab__pagination--vertical[data-v-e9153106] .tab__pagination__next svg{transform:rotate(270deg)}.tab__pagination--vertical .tab__nav__item[data-v-e9153106]{justify-content:left;padding-top:1.6rem;padding-bottom:1.6rem}.tab__pagination--auto .tab__nav__item[data-v-e9153106]{flex:1 auto}",map:void 0,media:void 0}),t("data-v-e9153106_1",{source:".ripple{z-index:2;background-color:hsla(0,0%,100%,.23);border-radius:50%;position:absolute;transform:scale(0);animation:ripple .6s linear}@keyframes ripple{to{transform:scale(2.5);opacity:0}}",map:void 0,media:void 0}))}),{components:{Btn:m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"btn",on:{click:function(e){return t.$emit("click")}}},[n("svg",{style:t.svgStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"}},[n("path",{attrs:{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}})])])},staticRenderFns:[]},(function(t){t&&t("data-v-fa702480_0",{source:".btn[data-v-fa702480]{outline:0;border:none;background:0 0;cursor:pointer}.btn svg[data-v-fa702480]{height:24px;width:24px;fill:rgba(214,213,213,.925)}.btn:disabled svg[data-v-fa702480]{fill:#d6d6d652!important;cursor:default}",map:void 0,media:void 0})}),{name:"Btn",inject:["theme"],computed:{svgStyle:function(){var t;return null!==(t=this.theme)&&void 0!==t&&t.arrow?{fill:this.theme.arrow}:""}}},"data-v-fa702480",false,undefined,!1,p,void 0,void 0),VNode:{functional:!0,render:function(t,e){var n=e.props;return n.node?n.node:t("span",n.name)}}},inject:["theme"],directives:{ripple:l,resize:d,touch:f},props:{vertical:Boolean,navSlider:Boolean,ripple:Boolean,navAuto:Boolean,navItems:{type:Array,required:!0},tabItemActive:{type:Object,default:function(){}}},data:function(){return{pagination:{has:!1,maxOffset:0,minOffset:0,translate:0,offset:0}}},computed:{classes:function(){return{tab__pagination:!0,"tab__pagination--vertical":this.vertical,"tab__pagination--auto":this.navAuto&&!this.vertical}},styles:function(){return{transform:"translate".concat(this.vertical?"Y":"X","(-").concat(this.pagination.translate,"px)")}},paginateIndicator:function(){return{next:this.pagination.translate<this.pagination.maxOffset,prev:this.pagination.translate>0}},orientation:function(){return this.vertical?"portrait":"landscape"}},watch:{navItems:"resizable",vertical:function(){Object.assign(this.$data,this.$options.data()),this.resizable()},tabItemActive:function(){this.sliderHandler(),this.pagination.has&&this.paginationCollapse()}},mounted:function(){this.setTheme()},methods:{select:function(t){null!=t&&t.disabled||this.$emit("select",{tabItem:t,byUser:!0})},sliderHandler:function(){var t,n=this;return(t=regeneratorRuntime.mark((function t(){var e,i,a,r,o,s,l,d,c,v,u,f,m;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.$nextTick();case 2:r=null===(e=n.$refs)||void 0===e?void 0:e.navItems,o=n.getElementRect({el:r,prefix:"navItems"}),s=o.navItemsLeft,l=o.navItemsTop,d=null===(i=n.$refs)||void 0===i||null===(a=i[n.tabItemActive.model])||void 0===a?void 0:a[0],c=n.getElementRect({el:d,prefix:"navActive"}),v=c.navActiveWidth,u=c.navActiveHeight,f=c.navActiveLeft,m=c.navActiveTop,Object.assign(n.$refs.slider.style,{portrait:{height:"".concat(u,"px"),top:"".concat(m-l,"px"),width:"",left:""},landscape:{width:"".concat(v,"px"),left:"".concat(f-s,"px"),height:"",top:""}}[n.orientation]);case 7:case"end":return t.stop()}}),t)})),function(){var n=this,i=arguments;return new Promise((function(a,r){var o=t.apply(n,i);function s(t){e(o,a,r,s,l,"next",t)}function l(t){e(o,a,r,s,l,"throw",t)}s(void 0)}))})()},setPagination:function(){var t,e,a=null===(t=this.$refs)||void 0===t?void 0:t.navItems,r=this.getElementRect({el:a,prefix:"navItems"}).navItemsWidth,o=this.getElementRect({el:null===(e=this.$refs)||void 0===e?void 0:e.nav,prefix:"nav"}),s=o.navWidth,l=o.navHeight,d=i(null==a?void 0:a.children).slice(0,-1).map((function(t){return t.offsetHeight})).reduce((function(t,e){return Math.abs(t+e)}),0),c=function(t,e,i){var a=Object.entries({has:t,maxOffset:e,minOffset:i,offset:i}).map((function(t){var e=n(t,2),i=e[0],a=e[1];return[i,Math.abs(a)]}));return Object.fromEntries(a)};Object.assign(this.pagination,{portrait:c(d>l,d-l,l),landscape:c(r>s,r-s,s)}[this.orientation]),0===this.pagination.maxOffset&&(this.pagination.translate=0)},onPagination:function(t){var e=this.pagination,n=e.maxOffset,i=e.offset,a=e.translate,r=e.minOffset;if("prev"===t&&this.paginateIndicator.prev){if(i<=r&&(this.pagination.offset=r),a-i<i)return void(this.pagination.translate=0);this.pagination.translate=a-i}"next"===t&&this.paginateIndicator.next&&(a+i>n&&(this.pagination.offset=n-a),this.pagination.translate=a+this.pagination.offset)},paginationCollapse:function(){var t,e,n,i=this.getElementRect({el:null===(t=this.$refs)||void 0===t||null===(e=t[this.tabItemActive.model])||void 0===e?void 0:e[0],prefix:"navActive"}),a=i.navActiveRight,r=i.navActiveLeft,o=i.navActiveTop,s=i.navActiveBottom,l=i.navActiveWidth,d=i.navActiveHeight,c=this.getElementRect({el:null===(n=this.$refs)||void 0===n?void 0:n.nav,prefix:"nav"}),v=c.navRight,u=c.navLeft,f=c.navTop,m=c.navBottom,h=this.pagination,p=h.translate,b=h.maxOffset,_=p;this.vertical&&s>m&&(_+=d),this.vertical&&o<f&&(_=d>_?0:_-d),!this.vertical&&a>v&&(_+=l),!this.vertical&&r<u&&(_=l>_?0:_-l),_>b&&(_+=b-_),this.pagination.translate=Math.abs(_)},resizable:function(){var t=this;this.$nextTick((function(){t.setPagination(),t.sliderHandler()}))},getElementRect:function(t){var e=t.el,i=t.prefix;if(e){var a=JSON.parse,r=JSON.stringify,o=Object.entries(a(r(e.getBoundingClientRect()))).map((function(t){var e=n(t,2),a=e[0],r=e[1];return[i+a.charAt(0).toUpperCase()+a.slice(1),r]}));return Object.fromEntries(o)}},setTheme:function(){var t=this.theme,e=t.nav,n=t.navItem,i=t.slider;this.$el.style.background=e,this.$refs.navItems.style.color=n,this.$refs.slider.style.background=i},getActiveColor:function(t){if(t.model===this.tabItemActive.model)return{color:this.theme.navActiveItem}}}},"data-v-e9153106",false,undefined,!1,p,void 0,void 0),I=function(t,e,n,i,a){return{nav:t,navItem:e,navActiveItem:n,slider:i,arrow:a}},x={default:I("#fff","#000000","#1867c0","#1867c0","#616161"),purple:I("#4A148C","#BDBDBD","#fff","#CE93D8","#f3f3f3"),red:I("#F44336","#f3f3f3","#fff","#EF9A9A","#f3f3f3"),pink:I("#E91E63","#F8BBD0","#fff","#F8BBD0","#f3f3f3"),cyan:I("#00BCD4","#B2EBF2","#fff","#80DEEA","#f3f3f3"),green:I("#4CAF50","#C8E6C9","#fff","#A5D6A7","#f3f3f3")},y=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.classes},[t._t("nav",[n("NavTab",t._b({on:{select:t.activeTabItem}},"NavTab",{ripple:t.ripple,navAuto:t.navAuto,navItems:t.navItems,vertical:t.vertical,navSlider:t.navSlider,tabItemActive:t.tabItemActive},!1))],{items:t.navItems,active:t.tabItemActive}),t._v(" "),n("div",{directives:[{name:"touch",rawName:"v-touch",value:t.onTouchSlide,expression:"onTouchSlide"}],staticClass:"tabs__content"},[t._t("default")],2)],2)},staticRenderFns:[]},(function(t){t&&t("data-v-77d7fbea_0",{source:".tabs[data-v-77d7fbea]{background:#fff;display:flex;flex-direction:column;border-radius:.23rem;height:100%;width:100%;overflow:hidden}.tabs__content[data-v-77d7fbea]{display:flex;position:relative;overflow:hidden;justify-content:center;align-items:center;height:100%;width:100%;flex:1 100%}.tabs--vertical[data-v-77d7fbea]{flex-direction:row}",map:void 0,media:void 0})}),{name:"Tabs",components:{NavTab:g},directives:{touch:f},provide:function(){return{theme:this.getTheme}},props:{theme:{type:[Object,String],default:"default"},vertical:Boolean,ripple:{type:Boolean,default:!0},slideDuration:{type:[String,Number],default:200},slideVertical:Boolean,slide:{type:Boolean,default:!0},navAuto:Boolean,navSlider:{type:Boolean,default:!0}},data:function(){return{slideSide:"",navItems:[],tabItemActive:{model:"",name:"",disabled:!1},tabItemIndexes:{current:0,last:0,previous:0},tabItems:[]}},computed:{classes:function(){return{tabs:!0,"tabs--vertical":this.vertical}},transition:function(){return{slide:this.slide,duration:this.slide?this.slideDuration:0,vertical:this.slideVertical,side:this.slideSide}},getTheme:function(){return"string"==typeof this.theme?x[this.theme]||x.default:"object"===t(this.theme)&&null!==this.theme?this.theme:x.default}},watch:{tabItemActive:function(t,e){this.tabItemIndexes.previous=this.findIndexTab(e),this.tabItemIndexes.current=this.findIndexTab(t),this.tabItems[this.tabItemIndexes.current].activeModel=t.model,this.tabItemIndexes.previous>-1&&(this.setTabItemTransitionSide(),this.tabItems[this.tabItemIndexes.previous].activeModel=t.model)}},mounted:function(){this.activeTabItem({tabItem:this.navItems[0],byUser:!1})},methods:{addTabItem:function(t){this.isTabItemComponent(t)&&(this.tabItems.push(t),this.setNavItem(t))},removeTabItem:function(t){this.isTabItemComponent(t)&&(this.disableTabItem(t.ownNavItemIndex),this.tabItems.splice(this.findIndexTab(t),1),this.navItems.splice(t.ownNavItemIndex,1),this.tabItemIndexes.last=this.navItems.length-1)},isTabItemComponent:function(t){var e=t.$options;return"TabItem"===(null==e?void 0:e._componentTag)},setNavItem:function(t){var e,n=t.model,i=t.name,a=t.disabled,r=t.$slots;this.navItems.push({model:n,name:i,disabled:a,nameSlot:null===(e=r.name)||void 0===e?void 0:e[0]}),this.tabItemIndexes.last=this.navItems.length-1},activeTabItem:function(t){var e=t.tabItem,n=t.byUser;e.disabled||(this.tabItemActive=e,this.$emit("input",null==e?void 0:e.name),n&&this.$emit("change",null==e?void 0:e.name))},disableTabItem:function(t){var e=this.tabItemIndexes,n=e.current,i=e.last;if(t===n){var a=n===i?n-1:n+1;this.activeTabItem({tabItem:this.navItems[a],byUser:!0})}},setTabItemTransitionSide:function(){var t=this.tabItemIndexes,e=t.current,n=t.previous;this.slideSide=e>n?"right":"left"},onTouchSlide:function(t){var e,n=this.tabItemIndexes,i=n.current,a=n.last;"next"===t&&i<a?e=this.navItems[i+1]:"prev"===t&&i>0&&(e=this.navItems[i-1]),e&&this.activeTabItem({tabItem:e,byUser:!0})},findIndexTab:function(t){return this.tabItems.findIndex((function(e){return e.model==t.model}))}}},"data-v-77d7fbea",false,undefined,!1,p,void 0,void 0),w=require("crypto"),T=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:t.slideDirection}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActived,expression:"isActived"}],staticClass:"tab-item",style:{"transition-duration":t.transition.duration+"ms"}},[t._t("default")],2)])},staticRenderFns:[]},(function(t){t&&t("data-v-2d69fea1_0",{source:".tab-item[data-v-2d69fea1]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-2d69fea1],.slide-right-leave-to[data-v-2d69fea1]{transform:translateX(-100%)}.slide-left-leave-to[data-v-2d69fea1],.slide-right-enter[data-v-2d69fea1]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-2d69fea1],.slide-top-enter[data-v-2d69fea1]{transform:translateY(-100%)}.slide-bottom-enter[data-v-2d69fea1],.slide-top-leave-to[data-v-2d69fea1]{transform:translateY(100%)}",map:void 0,media:void 0})}),{name:"TabItem",props:{name:{type:String,default:"Tab Item"},disabled:Boolean},data:function(){return{activeModel:"",model:w.randomBytes(10).toString("hex")}},mounted:function(){this.tabs.addTabItem(this)},beforeDestroy:function(){this.tabs.removeTabItem(this)},computed:{tabs:function(){return this.$parent},transition:function(){return this.tabs.transition},isActived:function(){return this.activeModel===this.model&&!this.disabled},slideDirection:function(){return this.transition.slide?this.transition.vertical?{left:"slide-top",right:"slide-bottom"}[this.transition.side]:{left:"slide-left",right:"slide-right"}[this.transition.side]:""},ownNavItemIndex:function(){var t=this;return this.tabs.navItems.findIndex((function(e){return e.model===t.model}))}},watch:{disabled:function(t){var e;t&&(null===(e=this.tabs)||void 0===e||e.disableTabItem(this.ownNavItemIndex)),this.tabs.navItems[this.ownNavItemIndex].disabled=t}}},"data-v-2d69fea1",false,undefined,!1,p,void 0,void 0),A=Object.freeze({__proto__:null,Tabs:y,TabItem:T}),S=function(t){Object.entries(A).forEach((function(e){var i=n(e,2),a=i[0],r=i[1];t.component(a,r)}))},C=Object.freeze({__proto__:null,default:S,Tabs:y,TabItem:T});return Object.entries(C).forEach((function(t){var e=n(t,2),i=e[0],a=e[1];"default"!==i&&(S[i]=a)})),S}();
var VueMaterialTabs=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,n,i,a,r,o){try{var s=t[r](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,a)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(i=n.next()).done)&&(r.push(i.value),!e||r.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(t,e)||a(t,e)||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 i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t){var e=t.currentTarget,n=function(t){var e=t.currentTarget.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,a=Math.sqrt(Math.pow(t.currentTarget.clientWidth,2)+Math.pow(t.currentTarget.clientHeight,2))/2;return{x:"".concat(n-a,"px"),y:"".concat(i-a,"px"),size:"".concat(2*a,"px")}}(t),i=n.size,a=n.y,r=n.x,o=document.createElement("span");o.classList.add("ripple"),o.style.width=o.style.height=i,o.style.top=a,o.style.left=r,e.appendChild(o),setTimeout((function(){return o.remove()}),1e3)}function s(t,e){null==t||t[e?"addEventListener":"removeEventListener"]("click",o)}var l={bind:function(t,e){return s(t,e.value)},update:function(t,e){return s(t,e.value)},unbind:function(t){return s(t,!1)}};var d={inserted:function(t,e){var n=null==e?void 0:e.value;n&&window.addEventListener("resize",n),t._onResize=n},unbind:function(t){t._onResize&&(window.removeEventListener("resize",t._onResize),delete t._onResize)}},c={touchstartX:0,isSwiping:!1};function v(t){c.isSwiping=!0,c.touchstartX=t.touches[0].clientX}function u(t){if(c.isSwiping){var e=t.currentTarget,n=t.changedTouches[0].clientX,i=c.touchstartX-n,a=Math.abs(.1*e.offsetWidth);i>a?(c.isSwiping=!1,e._callback("next")):i<-a&&(c.isSwiping=!1,e._callback("prev"))}}var f={bind:function(t,e){var n=e.value;n&&t&&(t._callback=n,function(t){t.addEventListener("touchstart",v),t.addEventListener("touchmove",u)}(t))},unbind:function(t){!function(t){t.removeEventListener("touchstart",v),t.removeEventListener("touchmove",u)}(t),t._callback&&delete t._callback}};function m(t,e,n,i,a,r,o,s,l,d){"boolean"!=typeof o&&(l=s,s=o,o=!1);const c="function"==typeof n?n.options:n;let v;if(t&&t.render&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,a&&(c.functional=!0)),i&&(c._scopeId=i),r?(v=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=v):e&&(v=o?function(t){e.call(this,d(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),v)if(c.functional){const t=c.render;c.render=function(e,n){return v.call(n),t(e,n)}}else{const t=c.beforeCreate;c.beforeCreate=t?[].concat(t,v):[v]}return n}const h="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function p(t){return(t,e)=>function(t,e){const n=h?e.media||"default":t,i=_[n]||(_[n]={ids:new Set,styles:[]});if(!i.ids.has(t)){i.ids.add(t);let n=e.source;if(e.map&&(n+="\n/*# sourceURL="+e.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),i.element||(i.element=document.createElement("style"),i.element.type="text/css",e.media&&i.element.setAttribute("media",e.media),void 0===b&&(b=document.head||document.getElementsByTagName("head")[0]),b.appendChild(i.element)),"styleSheet"in i.element)i.styles.push(n),i.element.styleSheet.cssText=i.styles.filter(Boolean).join("\n");else{const t=i.ids.size-1,e=document.createTextNode(n),a=i.element.childNodes;a[t]&&i.element.removeChild(a[t]),a.length?i.element.insertBefore(e,a[t]):i.element.appendChild(e)}}}(t,e)}let b;const _={};var g=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"resize",rawName:"v-resize",value:t.resizable,expression:"resizable"}],class:t.classes},[n("div",{staticClass:"tab__pagination__prev"},[t.pagination.has?n("Btn",{attrs:{disabled:!t.paginateIndicator.prev},on:{click:function(e){return t.onPagination("prev")}}}):t._e()],1),t._v(" "),n("nav",{directives:[{name:"touch",rawName:"v-touch",value:t.onPagination,expression:"onPagination"}],ref:"nav",staticClass:"tab__nav"},[n("ul",{ref:"navItems",staticClass:"tab__nav__items",style:t.styles},[t._l(t.navItems,(function(e){return n("li",{directives:[{name:"ripple",rawName:"v-ripple",value:t.ripple&&!e.disabled,expression:"ripple && !navItem.disabled"}],key:e.model,ref:e.model,refInFor:!0,staticClass:"tab__nav__item",class:{active:e.model===t.tabItemActive.model,disabled:e.disabled},style:t.getActiveColor(e),on:{click:function(n){return n.preventDefault(),t.select(e)}}},[n("VNode",{attrs:{node:e.nameSlot,name:e.name}})],1)})),t._v(" "),t.navSlider?n("hr",{ref:"slider",staticClass:"tab__slider"}):t._e()],2)]),t._v(" "),n("div",{staticClass:"tab__pagination__next"},[t.pagination.has?n("Btn",{attrs:{disabled:!t.paginateIndicator.next},on:{click:function(e){return t.onPagination("next")}}}):t._e()],1)])},staticRenderFns:[]},(function(t){t&&(t("data-v-e9153106_0",{source:".tab__pagination[data-v-e9153106]{display:flex;justify-content:space-between;align-items:center;vertical-align:middle;max-width:100%;flex:0 1 auto;position:relative;contain:content}.tab__pagination .tab__pagination__prev[data-v-e9153106],.tab__pagination__next[data-v-e9153106]{flex:1 40px;min-width:40px}.tab__pagination__next[data-v-e9153106] .btn svg{transform:rotate(180deg)}.tab__nav[data-v-e9153106]{position:relative;display:flex;overflow:hidden;flex:1 100%}.tab__nav__items[data-v-e9153106]{display:flex;margin:0;padding:0;flex:1 auto;transition:.3s cubic-bezier(.25,.8,.5,1);height:100%}.tab__nav__items .tab__nav__item[data-v-e9153106]{list-style:none;text-align:center;cursor:pointer;padding:.9rem 1rem;letter-spacing:.0892857143em;display:flex;justify-content:center;align-items:center;text-align:center;text-transform:uppercase;font-size:.875rem;font-weight:500;white-space:normal;transition:background .1s ease;position:relative;overflow:hidden;min-width:90px;max-width:360px;user-select:none}.tab__nav__items .tab__nav__item[data-v-e9153106]:hover:not(.disabled,.active){background:hsla(0,0%,100%,.09)}.tab__nav__items .active[data-v-e9153106]:hover{background:hsla(0,0%,100%,.18)}.tab__nav__items .disabled[data-v-e9153106]{background:#6969694f}.tab__slider[data-v-e9153106]{height:2px;width:2px;border:none;margin:0;padding:0;bottom:0;position:absolute;transition:left .3s cubic-bezier(.25,.8,.5,1),top .3s cubic-bezier(.25,.8,.5,1)}.tab__pagination--vertical[data-v-e9153106]{flex-direction:column}.tab__pagination--vertical .tab__nav__items[data-v-e9153106]{flex-direction:column;flex:1 auto;position:relative}.tab__pagination--vertical .tab__nav__item *[data-v-e9153106]{padding:0;margin:0}.tab__pagination--vertical[data-v-e9153106] .tab__pagination__prev svg{transform:rotate(90deg)}.tab__pagination--vertical[data-v-e9153106] .tab__pagination__next svg{transform:rotate(270deg)}.tab__pagination--vertical .tab__nav__item[data-v-e9153106]{justify-content:left;padding-top:1.6rem;padding-bottom:1.6rem}.tab__pagination--auto .tab__nav__item[data-v-e9153106]{flex:1 auto}",map:void 0,media:void 0}),t("data-v-e9153106_1",{source:".ripple{z-index:2;background-color:hsla(0,0%,100%,.23);border-radius:50%;position:absolute;transform:scale(0);animation:ripple .6s linear}@keyframes ripple{to{transform:scale(2.5);opacity:0}}",map:void 0,media:void 0}))}),{components:{Btn:m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"btn",on:{click:function(e){return t.$emit("click")}}},[n("svg",{style:t.svgStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"}},[n("path",{attrs:{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}})])])},staticRenderFns:[]},(function(t){t&&t("data-v-fa702480_0",{source:".btn[data-v-fa702480]{outline:0;border:none;background:0 0;cursor:pointer}.btn svg[data-v-fa702480]{height:24px;width:24px;fill:rgba(214,213,213,.925)}.btn:disabled svg[data-v-fa702480]{fill:#d6d6d652!important;cursor:default}",map:void 0,media:void 0})}),{name:"Btn",inject:["theme"],computed:{svgStyle:function(){var t;return null!==(t=this.theme)&&void 0!==t&&t.arrow?{fill:this.theme.arrow}:""}}},"data-v-fa702480",false,undefined,!1,p,void 0,void 0),VNode:{functional:!0,render:function(t,e){var n=e.props;return n.node?n.node:t("span",n.name)}}},inject:["theme"],directives:{ripple:l,resize:d,touch:f},props:{vertical:Boolean,navSlider:Boolean,ripple:Boolean,navAuto:Boolean,navItems:{type:Array,required:!0},tabItemActive:{type:Object,default:function(){}}},data:function(){return{pagination:{has:!1,maxOffset:0,minOffset:0,translate:0,offset:0}}},computed:{classes:function(){return{tab__pagination:!0,"tab__pagination--vertical":this.vertical,"tab__pagination--auto":this.navAuto&&!this.vertical}},styles:function(){return{transform:"translate".concat(this.vertical?"Y":"X","(-").concat(this.pagination.translate,"px)")}},paginateIndicator:function(){return{next:this.pagination.translate<this.pagination.maxOffset,prev:this.pagination.translate>0}},orientation:function(){return this.vertical?"portrait":"landscape"}},watch:{navItems:"resizable",vertical:function(){Object.assign(this.$data,this.$options.data()),this.resizable()},tabItemActive:function(){this.sliderHandler(),this.pagination.has&&this.paginationCollapse()}},mounted:function(){this.setTheme()},methods:{select:function(t){null!=t&&t.disabled||this.$emit("select",{tabItem:t,byUser:!0})},sliderHandler:function(){var t,n=this;return(t=regeneratorRuntime.mark((function t(){var e,i,a,r,o,s,l,d,c,v,u,f,m;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.$nextTick();case 2:r=null===(e=n.$refs)||void 0===e?void 0:e.navItems,o=n.getElementRect({el:r,prefix:"navItems"}),s=o.navItemsLeft,l=o.navItemsTop,d=null===(i=n.$refs)||void 0===i||null===(a=i[n.tabItemActive.model])||void 0===a?void 0:a[0],c=n.getElementRect({el:d,prefix:"navActive"}),v=c.navActiveWidth,u=c.navActiveHeight,f=c.navActiveLeft,m=c.navActiveTop,Object.assign(n.$refs.slider.style,{portrait:{height:"".concat(u,"px"),top:"".concat(m-l,"px"),width:"",left:""},landscape:{width:"".concat(v,"px"),left:"".concat(f-s,"px"),height:"",top:""}}[n.orientation]);case 7:case"end":return t.stop()}}),t)})),function(){var n=this,i=arguments;return new Promise((function(a,r){var o=t.apply(n,i);function s(t){e(o,a,r,s,l,"next",t)}function l(t){e(o,a,r,s,l,"throw",t)}s(void 0)}))})()},setPagination:function(){var t,e,a=null===(t=this.$refs)||void 0===t?void 0:t.navItems,r=this.getElementRect({el:a,prefix:"navItems"}).navItemsWidth,o=this.getElementRect({el:null===(e=this.$refs)||void 0===e?void 0:e.nav,prefix:"nav"}),s=o.navWidth,l=o.navHeight,d=i(null==a?void 0:a.children).slice(0,-1).map((function(t){return t.offsetHeight})).reduce((function(t,e){return Math.abs(t+e)}),0),c=function(t,e,i){var a=Object.entries({has:t,maxOffset:e,minOffset:i,offset:i}).map((function(t){var e=n(t,2),i=e[0],a=e[1];return[i,Math.abs(a)]}));return Object.fromEntries(a)};Object.assign(this.pagination,{portrait:c(d>l,d-l,l),landscape:c(r>s,r-s,s)}[this.orientation]),0===this.pagination.maxOffset&&(this.pagination.translate=0)},onPagination:function(t){var e=this.pagination,n=e.maxOffset,i=e.offset,a=e.translate,r=e.minOffset;if("prev"===t&&this.paginateIndicator.prev){if(i<=r&&(this.pagination.offset=r),a-i<i)return void(this.pagination.translate=0);this.pagination.translate=a-i}"next"===t&&this.paginateIndicator.next&&(a+i>n&&(this.pagination.offset=n-a),this.pagination.translate=a+this.pagination.offset)},paginationCollapse:function(){var t,e,n,i=this.getElementRect({el:null===(t=this.$refs)||void 0===t||null===(e=t[this.tabItemActive.model])||void 0===e?void 0:e[0],prefix:"navActive"}),a=i.navActiveRight,r=i.navActiveLeft,o=i.navActiveTop,s=i.navActiveBottom,l=i.navActiveWidth,d=i.navActiveHeight,c=this.getElementRect({el:null===(n=this.$refs)||void 0===n?void 0:n.nav,prefix:"nav"}),v=c.navRight,u=c.navLeft,f=c.navTop,m=c.navBottom,h=this.pagination,p=h.translate,b=h.maxOffset,_=p;this.vertical&&s>m&&(_+=d),this.vertical&&o<f&&(_=d>_?0:_-d),!this.vertical&&a>v&&(_+=l),!this.vertical&&r<u&&(_=l>_?0:_-l),_>b&&(_+=b-_),this.pagination.translate=Math.abs(_)},resizable:function(){var t=this;this.$nextTick((function(){t.setPagination(),t.sliderHandler()}))},getElementRect:function(t){var e=t.el,i=t.prefix;if(e){var a=JSON.parse,r=JSON.stringify,o=Object.entries(a(r(e.getBoundingClientRect()))).map((function(t){var e=n(t,2),a=e[0],r=e[1];return[i+a.charAt(0).toUpperCase()+a.slice(1),r]}));return Object.fromEntries(o)}},setTheme:function(){var t=this.theme,e=t.nav,n=t.navItem,i=t.slider;this.$el.style.background=e,this.$refs.navItems.style.color=n,this.$refs.slider.style.background=i},getActiveColor:function(t){if(t.model===this.tabItemActive.model)return{color:this.theme.navActiveItem}}}},"data-v-e9153106",false,undefined,!1,p,void 0,void 0),I=function(t,e,n,i,a){return{nav:t,navItem:e,navActiveItem:n,slider:i,arrow:a}},x={default:I("#fff","#000000","#1867c0","#1867c0","#616161"),purple:I("#4A148C","#BDBDBD","#fff","#CE93D8","#f3f3f3"),red:I("#F44336","#f3f3f3","#fff","#EF9A9A","#f3f3f3"),pink:I("#E91E63","#F8BBD0","#fff","#F8BBD0","#f3f3f3"),cyan:I("#00BCD4","#B2EBF2","#fff","#80DEEA","#f3f3f3"),green:I("#4CAF50","#C8E6C9","#fff","#A5D6A7","#f3f3f3")},y=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.classes},[t._t("nav",[n("NavTab",t._b({on:{select:t.activeTabItem}},"NavTab",{ripple:t.ripple,navAuto:t.navAuto,navItems:t.navItems,vertical:t.vertical,navSlider:t.navSlider,tabItemActive:t.tabItemActive},!1))],{items:t.navItems,active:t.tabItemActive}),t._v(" "),n("div",{directives:[{name:"touch",rawName:"v-touch",value:t.onTouchSlide,expression:"onTouchSlide"}],staticClass:"tabs__content"},[t._t("default")],2)],2)},staticRenderFns:[]},(function(t){t&&t("data-v-77d7fbea_0",{source:".tabs[data-v-77d7fbea]{background:#fff;display:flex;flex-direction:column;border-radius:.23rem;height:100%;width:100%;overflow:hidden}.tabs__content[data-v-77d7fbea]{display:flex;position:relative;overflow:hidden;justify-content:center;align-items:center;height:100%;width:100%;flex:1 100%}.tabs--vertical[data-v-77d7fbea]{flex-direction:row}",map:void 0,media:void 0})}),{name:"Tabs",components:{NavTab:g},directives:{touch:f},provide:function(){return{theme:this.getTheme}},props:{theme:{type:[Object,String],default:"default"},vertical:Boolean,ripple:{type:Boolean,default:!0},slideDuration:{type:[String,Number],default:200},slideVertical:Boolean,slide:{type:Boolean,default:!0},navAuto:Boolean,navSlider:{type:Boolean,default:!0}},data:function(){return{slideSide:"",navItems:[],tabItemActive:{model:"",name:"",disabled:!1},tabItemIndexes:{current:0,last:0,previous:0},tabItems:[]}},computed:{classes:function(){return{tabs:!0,"tabs--vertical":this.vertical}},transition:function(){return{slide:this.slide,duration:this.slide?this.slideDuration:0,vertical:this.slideVertical,side:this.slideSide}},getTheme:function(){return"string"==typeof this.theme?x[this.theme]||x.default:"object"===t(this.theme)&&null!==this.theme?this.theme:x.default}},watch:{tabItemActive:function(t,e){this.tabItemIndexes.previous=this.findIndexTab(e),this.tabItemIndexes.current=this.findIndexTab(t),this.tabItems[this.tabItemIndexes.current].activeModel=t.model,this.tabItemIndexes.previous>-1&&(this.setTabItemTransitionSide(),this.tabItems[this.tabItemIndexes.previous].activeModel=t.model)}},mounted:function(){this.activeTabItem({tabItem:this.navItems[0],byUser:!1})},methods:{addTabItem:function(t){this.isTabItemComponent(t)&&(this.tabItems.push(t),this.setNavItem(t))},removeTabItem:function(t){this.isTabItemComponent(t)&&(this.disableTabItem(t.ownNavItemIndex),this.tabItems.splice(this.findIndexTab(t),1),this.navItems.splice(t.ownNavItemIndex,1),this.tabItemIndexes.last=this.navItems.length-1)},isTabItemComponent:function(t){var e=t.$options;return"TabItem"===(null==e?void 0:e._componentTag)},setNavItem:function(t){var e,n=t.model,i=t.name,a=t.disabled,r=t.$slots;this.navItems.push({model:n,name:i,disabled:a,nameSlot:null===(e=r.name)||void 0===e?void 0:e[0]}),this.tabItemIndexes.last=this.navItems.length-1},activeTabItem:function(t){var e=t.tabItem,n=t.byUser;e.disabled||(this.tabItemActive=e,this.$emit("input",null==e?void 0:e.name),n&&this.$emit("change",null==e?void 0:e.name))},disableTabItem:function(t){var e=this.tabItemIndexes,n=e.current,i=e.last;if(t===n){var a=n===i?n-1:n+1;this.activeTabItem({tabItem:this.navItems[a],byUser:!0})}},setTabItemTransitionSide:function(){var t=this.tabItemIndexes,e=t.current,n=t.previous;this.slideSide=e>n?"right":"left"},onTouchSlide:function(t){var e,n=this.tabItemIndexes,i=n.current,a=n.last;"next"===t&&i<a?e=this.navItems[i+1]:"prev"===t&&i>0&&(e=this.navItems[i-1]),e&&this.activeTabItem({tabItem:e,byUser:!0})},findIndexTab:function(t){return this.tabItems.findIndex((function(e){return e.model==t.model}))}}},"data-v-77d7fbea",false,undefined,!1,p,void 0,void 0),w=require("crypto"),T=m({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:t.slideDirection}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActived,expression:"isActived"}],staticClass:"tab-item",style:{"transition-duration":t.transition.duration+"ms"}},[t._t("default")],2)])},staticRenderFns:[]},(function(t){t&&t("data-v-e5c03ade_0",{source:".tab-item[data-v-e5c03ade]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-e5c03ade],.slide-right-leave-to[data-v-e5c03ade]{transform:translateX(-100%)}.slide-left-leave-to[data-v-e5c03ade],.slide-right-enter[data-v-e5c03ade]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-e5c03ade],.slide-top-enter[data-v-e5c03ade]{transform:translateY(-100%)}.slide-bottom-enter[data-v-e5c03ade],.slide-top-leave-to[data-v-e5c03ade]{transform:translateY(100%)}",map:void 0,media:void 0})}),{name:"TabItem",props:{name:{type:String,default:"Tab Item"},disabled:Boolean},data:function(){return{activeModel:"",model:w.randomBytes(10).toString("hex")}},mounted:function(){this.tabs.addTabItem(this)},beforeDestroy:function(){this.tabs&&this.tabs.removeTabItem(this)},computed:{tabs:function(){return this.$parent},transition:function(){return this.tabs.transition},isActived:function(){return this.activeModel===this.model&&!this.disabled},slideDirection:function(){return this.transition.slide?this.transition.vertical?{left:"slide-top",right:"slide-bottom"}[this.transition.side]:{left:"slide-left",right:"slide-right"}[this.transition.side]:""},ownNavItemIndex:function(){var t=this;return this.tabs.navItems.findIndex((function(e){return e.model===t.model}))}},watch:{disabled:function(t){var e;t&&(null===(e=this.tabs)||void 0===e||e.disableTabItem(this.ownNavItemIndex)),this.tabs.navItems[this.ownNavItemIndex].disabled=t}}},"data-v-e5c03ade",false,undefined,!1,p,void 0,void 0),A=Object.freeze({__proto__:null,Tabs:y,TabItem:T}),S=function(t){Object.entries(A).forEach((function(e){var i=n(e,2),a=i[0],r=i[1];t.component(a,r)}))},C=Object.freeze({__proto__:null,default:S,Tabs:y,TabItem:T});return Object.entries(C).forEach((function(t){var e=n(t,2),i=e[0],a=e[1];"default"!==i&&(S[i]=a)})),S}();

@@ -1143,3 +1143,5 @@ 'use strict';function _typeof(obj) {

beforeDestroy: function beforeDestroy() {
this.tabs.removeTabItem(this);
if (this.tabs) {
this.tabs.removeTabItem(this);
}
},

@@ -1221,4 +1223,4 @@ computed: {

if (!inject) return;
inject("data-v-2d69fea1_0", {
source: ".tab-item[data-v-2d69fea1]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-2d69fea1],.slide-right-leave-to[data-v-2d69fea1]{transform:translateX(-100%)}.slide-left-leave-to[data-v-2d69fea1],.slide-right-enter[data-v-2d69fea1]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-2d69fea1],.slide-top-enter[data-v-2d69fea1]{transform:translateY(-100%)}.slide-bottom-enter[data-v-2d69fea1],.slide-top-leave-to[data-v-2d69fea1]{transform:translateY(100%)}",
inject("data-v-e5c03ade_0", {
source: ".tab-item[data-v-e5c03ade]{position:absolute;top:0;left:0;z-index:1;height:100%;width:100%;transition:transform cubic-bezier(.25,.8,.5,1)}.slide-left-enter[data-v-e5c03ade],.slide-right-leave-to[data-v-e5c03ade]{transform:translateX(-100%)}.slide-left-leave-to[data-v-e5c03ade],.slide-right-enter[data-v-e5c03ade]{transform:translateX(100%)}.slide-bottom-leave-to[data-v-e5c03ade],.slide-top-enter[data-v-e5c03ade]{transform:translateY(-100%)}.slide-bottom-enter[data-v-e5c03ade],.slide-top-leave-to[data-v-e5c03ade]{transform:translateY(100%)}",
map: undefined,

@@ -1231,6 +1233,6 @@ media: undefined

var __vue_scope_id__ = "data-v-2d69fea1";
var __vue_scope_id__ = "data-v-e5c03ade";
/* module identifier */
var __vue_module_identifier__ = "data-v-2d69fea1";
var __vue_module_identifier__ = "data-v-e5c03ade";
/* functional template */

@@ -1237,0 +1239,0 @@

{
"name": "vue-material-tabs",
"version": "0.1.0",
"version": "0.1.1",
"description": "Vue.js tabs component based in material design",

@@ -5,0 +5,0 @@ "author": "Jairo Blatt <jairoblatt@gmail.com>",

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