New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-nav-tabs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-nav-tabs - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

27

dist/vue-tabs.common.js
/*!
* vue-nav-tabs v0.5.5
* vue-nav-tabs v0.5.6
* (c) 2017-present cristij <joracristi@gmail.com>

@@ -179,3 +179,5 @@ * Released under the MIT License.

id = tab.id,
title = tab.title;
title = tab.title,
icon = tab.icon,
tabId = tab.tabId;

@@ -187,3 +189,6 @@ var active = _this.activeTabIndex === index;

attrs: { name: 'tab',
role: 'presentation' },
id: 't-' + tabId,
'aria-selected': active,
'aria-controls': 'p-' + tabId,
role: 'tab' },
on: {

@@ -202,5 +207,10 @@ 'click': function click() {

'aria-selected': active,
'aria-controls': '#' + id,
role: 'tab' },
on: {
'click': function click(e) {
e.preventDefault();
return false;
}
},
style: active ? _this.activeTabStyle : _this.tabStyles(tab),

@@ -293,2 +303,5 @@ 'class': [{ 'active_tab': active }, 'tabs__link'] },

return '#' + this.id;
},
tabId: function tabId() {
return this.id ? this.id : this.title;
}

@@ -317,3 +330,5 @@ },

{ 'class': 'tab-container',
attrs: { role: 'tabpanel' },
attrs: { id: 'p-' + this.tabId,
'aria-labelledby': 't-' + this.tabId,
role: 'tabpanel' },
directives: [{

@@ -320,0 +335,0 @@ name: 'show',

/*!
* vue-nav-tabs v0.5.5
* vue-nav-tabs v0.5.6
* (c) 2017-present cristij <joracristi@gmail.com>
* Released under the MIT License.
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var VueTabs={name:"vue-tabs",props:{activeTabColor:String,activeTextColor:String,disabledColor:String,disabledTextColor:String,textPosition:{type:String,default:"center"},type:{type:String,default:"tabs"},direction:{type:String,default:"horizontal"},centered:Boolean,value:[String,Number,Object]},data:function(){return{activeTabIndex:0,tabs:[]}},computed:{isTabShape:function(){return"tabs"===this.type},isStacked:function(){return"vertical"===this.direction},classList:function(){return"nav "+(this.isTabShape?"nav-tabs":"nav-pills")+" "+(this.centered?"nav-justified":"")+" "+(this.isStacked?"nav-stacked":"")},stackedClass:function(){return this.isStacked?"stacked":""},activeTabStyle:function(){return{backgroundColor:this.activeTabColor,color:this.activeTextColor}}},methods:{navigateToTab:function(t,e){this.changeTab(this.activeTabIndex,t,e)},activateTab:function(t){this.activeTabIndex=t;var e=this.tabs[t];e.active=!0,this.$emit("input",e.title)},changeTab:function(t,e,i){var a=this.tabs[t],n=this.tabs[e];n.disabled||(this.activeTabIndex=e,a.active=!1,n.active=!0,this.$emit("input",this.tabs[e].title),this.$emit("tab-change",e,n,a),this.tryChangeRoute(i))},tryChangeRoute:function(t){this.$router&&t&&this.$router.push(t)},addTab:function(t){var e=this.$slots.default.indexOf(t.$vnode);this.tabs.splice(e,0,t)},removeTab:function(t){var e=this.tabs,i=e.indexOf(t);i>-1&&e.splice(i,1)},getTabs:function(){return this.$slots.default?this.$slots.default.filter(function(t){return t.componentOptions}):[]},findTabAndActivate:function(t){var e=this.tabs.findIndex(function(e,i){return e.title===t||i===t});e!==this.activeTabIndex&&(-1!==e?this.changeTab(this.activeTabIndex,e):this.changeTab(this.activeTabIndex,0))},renderTabTitle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i=this.$createElement;if(0!==this.tabs.length){var a=this.tabs[t],n=a.active,s=a.title,r={color:this.activeTabColor};"center"===e&&(r.color=this.activeTextColor);var o=i("span",{class:"title title_"+e,style:n?r:{}},["center"===e&&this.renderIcon(t),s]);return a.$slots.title?a.$slots.title:o}},renderIcon:function(t){var e=this.$createElement;if(0!==this.tabs.length){var i=this.tabs[t],a=i.icon,n=e("i",{class:a},[" "]);return!i.$slots.title&&a?n:void 0}},tabStyles:function(t){return t.disabled?{backgroundColor:this.disabledColor,color:this.disabledTextColor}:{}},renderTabs:function(){var t=this,e=this.$createElement;return this.tabs.map(function(i,a){if(i){var n=i.route,s=i.id,r=i.title,o=t.activeTabIndex===a;return e("li",{attrs:{name:"tab",role:"presentation"},on:{click:function(){return!i.disabled&&t.navigateToTab(a,n)}},class:["tab",{active:o},{disabled:i.disabled}],key:r},["top"===t.textPosition&&t.renderTabTitle(a,t.textPosition),e("a",{attrs:{href:"#","aria-selected":o,"aria-controls":"#"+s,role:"tab"},style:o?t.activeTabStyle:t.tabStyles(i),class:[{active_tab:o},"tabs__link"]},["center"!==t.textPosition&&!i.$slots.title&&t.renderIcon(a),"center"===t.textPosition&&t.renderTabTitle(a,t.textPosition)]),"bottom"===t.textPosition&&t.renderTabTitle(a,t.textPosition)])}})}},render:function(){var t=arguments[0],e=this.renderTabs();return t("div",{class:["vue-tabs",this.stackedClass]},[t("div",{class:[{"nav-tabs-navigation":!this.isStacked},{"left-vertical-tabs":this.isStacked}]},[t("div",{class:["nav-tabs-wrapper",this.stackedClass]},[t("ul",{class:this.classList,attrs:{role:"tablist"}},[e])])]),t("div",{class:["tab-content",{"right-text-tabs":this.isStacked}]},[this.$slots.default])])},watch:{tabs:function(t){t.length>0&&!this.value&&(t.length<=this.activeTabIndex?this.activateTab(this.activeTabIndex-1):this.activateTab(this.activeTabIndex)),t.length>0&&this.value&&this.findTabAndActivate(this.value)},value:function(t){this.findTabAndActivate(t)}}},VTab={name:"v-tab",props:{title:{type:String,default:""},icon:{type:String,default:""},beforeChange:{type:Function},id:String,route:{type:[String,Object]},disabled:Boolean,transitionName:String,transitionMode:String},computed:{isValidParent:function(){return"vue-tabs"===this.$parent.$options.name},hash:function(){return"#"+this.id}},data:function(){return{active:!1,validationError:null}},mounted:function(){this.$parent.addTab(this)},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$parent.removeTab(this)},render:function(){return(0,arguments[0])("section",{class:"tab-container",attrs:{role:"tabpanel"},directives:[{name:"show",value:this.active}]},[this.$slots.default])}},VueTabsPlugin={install:function(t){t.component("vue-tabs",VueTabs),t.component("v-tab",VTab)}};"undefined"!=typeof window&&window.Vue&&(window.Vue.use(VueTabsPlugin),window.VueTabs=VueTabsPlugin),exports.default=VueTabsPlugin,exports.VueTabs=VueTabs,exports.VTab=VTab;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var VueTabs={name:"vue-tabs",props:{activeTabColor:String,activeTextColor:String,disabledColor:String,disabledTextColor:String,textPosition:{type:String,default:"center"},type:{type:String,default:"tabs"},direction:{type:String,default:"horizontal"},centered:Boolean,value:[String,Number,Object]},data:function(){return{activeTabIndex:0,tabs:[]}},computed:{isTabShape:function(){return"tabs"===this.type},isStacked:function(){return"vertical"===this.direction},classList:function(){return"nav "+(this.isTabShape?"nav-tabs":"nav-pills")+" "+(this.centered?"nav-justified":"")+" "+(this.isStacked?"nav-stacked":"")},stackedClass:function(){return this.isStacked?"stacked":""},activeTabStyle:function(){return{backgroundColor:this.activeTabColor,color:this.activeTextColor}}},methods:{navigateToTab:function(t,e){this.changeTab(this.activeTabIndex,t,e)},activateTab:function(t){this.activeTabIndex=t;var e=this.tabs[t];e.active=!0,this.$emit("input",e.title)},changeTab:function(t,e,i){var a=this.tabs[t],n=this.tabs[e];n.disabled||(this.activeTabIndex=e,a.active=!1,n.active=!0,this.$emit("input",this.tabs[e].title),this.$emit("tab-change",e,n,a),this.tryChangeRoute(i))},tryChangeRoute:function(t){this.$router&&t&&this.$router.push(t)},addTab:function(t){var e=this.$slots.default.indexOf(t.$vnode);this.tabs.splice(e,0,t)},removeTab:function(t){var e=this.tabs,i=e.indexOf(t);i>-1&&e.splice(i,1)},getTabs:function(){return this.$slots.default?this.$slots.default.filter(function(t){return t.componentOptions}):[]},findTabAndActivate:function(t){var e=this.tabs.findIndex(function(e,i){return e.title===t||i===t});e!==this.activeTabIndex&&(-1!==e?this.changeTab(this.activeTabIndex,e):this.changeTab(this.activeTabIndex,0))},renderTabTitle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i=this.$createElement;if(0!==this.tabs.length){var a=this.tabs[t],n=a.active,s=a.title,r={color:this.activeTabColor};"center"===e&&(r.color=this.activeTextColor);var o=i("span",{class:"title title_"+e,style:n?r:{}},["center"===e&&this.renderIcon(t),s]);return a.$slots.title?a.$slots.title:o}},renderIcon:function(t){var e=this.$createElement;if(0!==this.tabs.length){var i=this.tabs[t],a=i.icon,n=e("i",{class:a},[" "]);return!i.$slots.title&&a?n:void 0}},tabStyles:function(t){return t.disabled?{backgroundColor:this.disabledColor,color:this.disabledTextColor}:{}},renderTabs:function(){var t=this,e=this.$createElement;return this.tabs.map(function(i,a){if(i){var n=i.route,s=(i.id,i.title),r=(i.icon,i.tabId),o=t.activeTabIndex===a;return e("li",{attrs:{name:"tab",id:"t-"+r,"aria-selected":o,"aria-controls":"p-"+r,role:"tab"},on:{click:function(){return!i.disabled&&t.navigateToTab(a,n)}},class:["tab",{active:o},{disabled:i.disabled}],key:s},["top"===t.textPosition&&t.renderTabTitle(a,t.textPosition),e("a",{attrs:{href:"#",role:"tab"},on:{click:function(t){return t.preventDefault(),!1}},style:o?t.activeTabStyle:t.tabStyles(i),class:[{active_tab:o},"tabs__link"]},["center"!==t.textPosition&&!i.$slots.title&&t.renderIcon(a),"center"===t.textPosition&&t.renderTabTitle(a,t.textPosition)]),"bottom"===t.textPosition&&t.renderTabTitle(a,t.textPosition)])}})}},render:function(){var t=arguments[0],e=this.renderTabs();return t("div",{class:["vue-tabs",this.stackedClass]},[t("div",{class:[{"nav-tabs-navigation":!this.isStacked},{"left-vertical-tabs":this.isStacked}]},[t("div",{class:["nav-tabs-wrapper",this.stackedClass]},[t("ul",{class:this.classList,attrs:{role:"tablist"}},[e])])]),t("div",{class:["tab-content",{"right-text-tabs":this.isStacked}]},[this.$slots.default])])},watch:{tabs:function(t){t.length>0&&!this.value&&(t.length<=this.activeTabIndex?this.activateTab(this.activeTabIndex-1):this.activateTab(this.activeTabIndex)),t.length>0&&this.value&&this.findTabAndActivate(this.value)},value:function(t){this.findTabAndActivate(t)}}},VTab={name:"v-tab",props:{title:{type:String,default:""},icon:{type:String,default:""},beforeChange:{type:Function},id:String,route:{type:[String,Object]},disabled:Boolean,transitionName:String,transitionMode:String},computed:{isValidParent:function(){return"vue-tabs"===this.$parent.$options.name},hash:function(){return"#"+this.id},tabId:function(){return this.id?this.id:this.title}},data:function(){return{active:!1,validationError:null}},mounted:function(){this.$parent.addTab(this)},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$parent.removeTab(this)},render:function(){return(0,arguments[0])("section",{class:"tab-container",attrs:{id:"p-"+this.tabId,"aria-labelledby":"t-"+this.tabId,role:"tabpanel"},directives:[{name:"show",value:this.active}]},[this.$slots.default])}},VueTabsPlugin={install:function(t){t.component("vue-tabs",VueTabs),t.component("v-tab",VTab)}};"undefined"!=typeof window&&window.Vue&&(window.Vue.use(VueTabsPlugin),window.VueTabs=VueTabsPlugin),exports.default=VueTabsPlugin,exports.VueTabs=VueTabs,exports.VTab=VTab;
//# sourceMappingURL=vue-tabs.common.min.js.map
/*!
* vue-nav-tabs v0.5.5
* vue-nav-tabs v0.5.6
* (c) 2017-present cristij <joracristi@gmail.com>

@@ -181,3 +181,5 @@ * Released under the MIT License.

id = tab.id,
title = tab.title;
title = tab.title,
icon = tab.icon,
tabId = tab.tabId;

@@ -189,3 +191,6 @@ var active = _this.activeTabIndex === index;

attrs: { name: 'tab',
role: 'presentation' },
id: 't-' + tabId,
'aria-selected': active,
'aria-controls': 'p-' + tabId,
role: 'tab' },
on: {

@@ -204,5 +209,10 @@ 'click': function click() {

'aria-selected': active,
'aria-controls': '#' + id,
role: 'tab' },
on: {
'click': function click(e) {
e.preventDefault();
return false;
}
},
style: active ? _this.activeTabStyle : _this.tabStyles(tab),

@@ -295,2 +305,5 @@ 'class': [{ 'active_tab': active }, 'tabs__link'] },

return '#' + this.id;
},
tabId: function tabId() {
return this.id ? this.id : this.title;
}

@@ -319,3 +332,5 @@ },

{ 'class': 'tab-container',
attrs: { role: 'tabpanel' },
attrs: { id: 'p-' + this.tabId,
'aria-labelledby': 't-' + this.tabId,
role: 'tabpanel' },
directives: [{

@@ -322,0 +337,0 @@ name: 'show',

/*!
* vue-nav-tabs v0.5.5
* vue-nav-tabs v0.5.6
* (c) 2017-present cristij <joracristi@gmail.com>
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.vueTabs={})}(this,function(t){"use strict";var e={name:"vue-tabs",props:{activeTabColor:String,activeTextColor:String,disabledColor:String,disabledTextColor:String,textPosition:{type:String,default:"center"},type:{type:String,default:"tabs"},direction:{type:String,default:"horizontal"},centered:Boolean,value:[String,Number,Object]},data:function(){return{activeTabIndex:0,tabs:[]}},computed:{isTabShape:function(){return"tabs"===this.type},isStacked:function(){return"vertical"===this.direction},classList:function(){return"nav "+(this.isTabShape?"nav-tabs":"nav-pills")+" "+(this.centered?"nav-justified":"")+" "+(this.isStacked?"nav-stacked":"")},stackedClass:function(){return this.isStacked?"stacked":""},activeTabStyle:function(){return{backgroundColor:this.activeTabColor,color:this.activeTextColor}}},methods:{navigateToTab:function(t,e){this.changeTab(this.activeTabIndex,t,e)},activateTab:function(t){this.activeTabIndex=t;var e=this.tabs[t];e.active=!0,this.$emit("input",e.title)},changeTab:function(t,e,i){var a=this.tabs[t],n=this.tabs[e];n.disabled||(this.activeTabIndex=e,a.active=!1,n.active=!0,this.$emit("input",this.tabs[e].title),this.$emit("tab-change",e,n,a),this.tryChangeRoute(i))},tryChangeRoute:function(t){this.$router&&t&&this.$router.push(t)},addTab:function(t){var e=this.$slots.default.indexOf(t.$vnode);this.tabs.splice(e,0,t)},removeTab:function(t){var e=this.tabs,i=e.indexOf(t);i>-1&&e.splice(i,1)},getTabs:function(){return this.$slots.default?this.$slots.default.filter(function(t){return t.componentOptions}):[]},findTabAndActivate:function(t){var e=this.tabs.findIndex(function(e,i){return e.title===t||i===t});e!==this.activeTabIndex&&(-1!==e?this.changeTab(this.activeTabIndex,e):this.changeTab(this.activeTabIndex,0))},renderTabTitle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i=this.$createElement;if(0!==this.tabs.length){var a=this.tabs[t],n=a.active,s=a.title,o={color:this.activeTabColor};"center"===e&&(o.color=this.activeTextColor);var r=i("span",{class:"title title_"+e,style:n?o:{}},["center"===e&&this.renderIcon(t),s]);return a.$slots.title?a.$slots.title:r}},renderIcon:function(t){var e=this.$createElement;if(0!==this.tabs.length){var i=this.tabs[t],a=i.icon,n=e("i",{class:a},[" "]);return!i.$slots.title&&a?n:void 0}},tabStyles:function(t){return t.disabled?{backgroundColor:this.disabledColor,color:this.disabledTextColor}:{}},renderTabs:function(){var t=this,e=this.$createElement;return this.tabs.map(function(i,a){if(i){var n=i.route,s=i.id,o=i.title,r=t.activeTabIndex===a;return e("li",{attrs:{name:"tab",role:"presentation"},on:{click:function(){return!i.disabled&&t.navigateToTab(a,n)}},class:["tab",{active:r},{disabled:i.disabled}],key:o},["top"===t.textPosition&&t.renderTabTitle(a,t.textPosition),e("a",{attrs:{href:"#","aria-selected":r,"aria-controls":"#"+s,role:"tab"},style:r?t.activeTabStyle:t.tabStyles(i),class:[{active_tab:r},"tabs__link"]},["center"!==t.textPosition&&!i.$slots.title&&t.renderIcon(a),"center"===t.textPosition&&t.renderTabTitle(a,t.textPosition)]),"bottom"===t.textPosition&&t.renderTabTitle(a,t.textPosition)])}})}},render:function(){var t=arguments[0],e=this.renderTabs();return t("div",{class:["vue-tabs",this.stackedClass]},[t("div",{class:[{"nav-tabs-navigation":!this.isStacked},{"left-vertical-tabs":this.isStacked}]},[t("div",{class:["nav-tabs-wrapper",this.stackedClass]},[t("ul",{class:this.classList,attrs:{role:"tablist"}},[e])])]),t("div",{class:["tab-content",{"right-text-tabs":this.isStacked}]},[this.$slots.default])])},watch:{tabs:function(t){t.length>0&&!this.value&&(t.length<=this.activeTabIndex?this.activateTab(this.activeTabIndex-1):this.activateTab(this.activeTabIndex)),t.length>0&&this.value&&this.findTabAndActivate(this.value)},value:function(t){this.findTabAndActivate(t)}}},i={name:"v-tab",props:{title:{type:String,default:""},icon:{type:String,default:""},beforeChange:{type:Function},id:String,route:{type:[String,Object]},disabled:Boolean,transitionName:String,transitionMode:String},computed:{isValidParent:function(){return"vue-tabs"===this.$parent.$options.name},hash:function(){return"#"+this.id}},data:function(){return{active:!1,validationError:null}},mounted:function(){this.$parent.addTab(this)},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$parent.removeTab(this)},render:function(){return(0,arguments[0])("section",{class:"tab-container",attrs:{role:"tabpanel"},directives:[{name:"show",value:this.active}]},[this.$slots.default])}},a={install:function(t){t.component("vue-tabs",e),t.component("v-tab",i)}};"undefined"!=typeof window&&window.Vue&&(window.Vue.use(a),window.VueTabs=a),t.default=a,t.VueTabs=e,t.VTab=i,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.vueTabs={})}(this,function(t){"use strict";var e={name:"vue-tabs",props:{activeTabColor:String,activeTextColor:String,disabledColor:String,disabledTextColor:String,textPosition:{type:String,default:"center"},type:{type:String,default:"tabs"},direction:{type:String,default:"horizontal"},centered:Boolean,value:[String,Number,Object]},data:function(){return{activeTabIndex:0,tabs:[]}},computed:{isTabShape:function(){return"tabs"===this.type},isStacked:function(){return"vertical"===this.direction},classList:function(){return"nav "+(this.isTabShape?"nav-tabs":"nav-pills")+" "+(this.centered?"nav-justified":"")+" "+(this.isStacked?"nav-stacked":"")},stackedClass:function(){return this.isStacked?"stacked":""},activeTabStyle:function(){return{backgroundColor:this.activeTabColor,color:this.activeTextColor}}},methods:{navigateToTab:function(t,e){this.changeTab(this.activeTabIndex,t,e)},activateTab:function(t){this.activeTabIndex=t;var e=this.tabs[t];e.active=!0,this.$emit("input",e.title)},changeTab:function(t,e,i){var a=this.tabs[t],n=this.tabs[e];n.disabled||(this.activeTabIndex=e,a.active=!1,n.active=!0,this.$emit("input",this.tabs[e].title),this.$emit("tab-change",e,n,a),this.tryChangeRoute(i))},tryChangeRoute:function(t){this.$router&&t&&this.$router.push(t)},addTab:function(t){var e=this.$slots.default.indexOf(t.$vnode);this.tabs.splice(e,0,t)},removeTab:function(t){var e=this.tabs,i=e.indexOf(t);i>-1&&e.splice(i,1)},getTabs:function(){return this.$slots.default?this.$slots.default.filter(function(t){return t.componentOptions}):[]},findTabAndActivate:function(t){var e=this.tabs.findIndex(function(e,i){return e.title===t||i===t});e!==this.activeTabIndex&&(-1!==e?this.changeTab(this.activeTabIndex,e):this.changeTab(this.activeTabIndex,0))},renderTabTitle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i=this.$createElement;if(0!==this.tabs.length){var a=this.tabs[t],n=a.active,s=a.title,o={color:this.activeTabColor};"center"===e&&(o.color=this.activeTextColor);var r=i("span",{class:"title title_"+e,style:n?o:{}},["center"===e&&this.renderIcon(t),s]);return a.$slots.title?a.$slots.title:r}},renderIcon:function(t){var e=this.$createElement;if(0!==this.tabs.length){var i=this.tabs[t],a=i.icon,n=e("i",{class:a},[" "]);return!i.$slots.title&&a?n:void 0}},tabStyles:function(t){return t.disabled?{backgroundColor:this.disabledColor,color:this.disabledTextColor}:{}},renderTabs:function(){var t=this,e=this.$createElement;return this.tabs.map(function(i,a){if(i){var n=i.route,s=(i.id,i.title),o=(i.icon,i.tabId),r=t.activeTabIndex===a;return e("li",{attrs:{name:"tab",id:"t-"+o,"aria-selected":r,"aria-controls":"p-"+o,role:"tab"},on:{click:function(){return!i.disabled&&t.navigateToTab(a,n)}},class:["tab",{active:r},{disabled:i.disabled}],key:s},["top"===t.textPosition&&t.renderTabTitle(a,t.textPosition),e("a",{attrs:{href:"#",role:"tab"},on:{click:function(t){return t.preventDefault(),!1}},style:r?t.activeTabStyle:t.tabStyles(i),class:[{active_tab:r},"tabs__link"]},["center"!==t.textPosition&&!i.$slots.title&&t.renderIcon(a),"center"===t.textPosition&&t.renderTabTitle(a,t.textPosition)]),"bottom"===t.textPosition&&t.renderTabTitle(a,t.textPosition)])}})}},render:function(){var t=arguments[0],e=this.renderTabs();return t("div",{class:["vue-tabs",this.stackedClass]},[t("div",{class:[{"nav-tabs-navigation":!this.isStacked},{"left-vertical-tabs":this.isStacked}]},[t("div",{class:["nav-tabs-wrapper",this.stackedClass]},[t("ul",{class:this.classList,attrs:{role:"tablist"}},[e])])]),t("div",{class:["tab-content",{"right-text-tabs":this.isStacked}]},[this.$slots.default])])},watch:{tabs:function(t){t.length>0&&!this.value&&(t.length<=this.activeTabIndex?this.activateTab(this.activeTabIndex-1):this.activateTab(this.activeTabIndex)),t.length>0&&this.value&&this.findTabAndActivate(this.value)},value:function(t){this.findTabAndActivate(t)}}},i={name:"v-tab",props:{title:{type:String,default:""},icon:{type:String,default:""},beforeChange:{type:Function},id:String,route:{type:[String,Object]},disabled:Boolean,transitionName:String,transitionMode:String},computed:{isValidParent:function(){return"vue-tabs"===this.$parent.$options.name},hash:function(){return"#"+this.id},tabId:function(){return this.id?this.id:this.title}},data:function(){return{active:!1,validationError:null}},mounted:function(){this.$parent.addTab(this)},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$parent.removeTab(this)},render:function(){return(0,arguments[0])("section",{class:"tab-container",attrs:{id:"p-"+this.tabId,"aria-labelledby":"t-"+this.tabId,role:"tabpanel"},directives:[{name:"show",value:this.active}]},[this.$slots.default])}},a={install:function(t){t.component("vue-tabs",e),t.component("v-tab",i)}};"undefined"!=typeof window&&window.Vue&&(window.Vue.use(a),window.VueTabs=a),t.default=a,t.VueTabs=e,t.VTab=i,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=vue-tabs.min.js.map
{
"name": "vue-nav-tabs",
"version": "0.5.5",
"version": "0.5.6",
"description": "A vue based tab component",

@@ -35,2 +35,3 @@ "repository": {

"babel-preset-stage-2": "^6.24.1",
"babel-preset-vue-app": "^1.3.2",
"bili": "^0.18.2",

@@ -37,0 +38,0 @@ "bootstrap": "^3.3.7",

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