@mozaic-ds/vue 0.22.0 → 0.22.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mozaic-vue.adeo.umd.js +38 -26
- package/dist/mozaic-vue.common.js +38 -26
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +38 -26
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +1 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/tabs/MTab.vue +29 -19
package/dist/mozaic-vue.umd.js
CHANGED
|
@@ -42865,12 +42865,11 @@ MStepper.install = function (Vue) {
|
|
|
42865
42865
|
};
|
|
42866
42866
|
|
|
42867
42867
|
|
|
42868
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/tabs/MTab.vue?vue&type=template&id=
|
|
42868
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/tabs/MTab.vue?vue&type=template&id=56192aef&
|
|
42869
42869
|
|
|
42870
42870
|
|
|
42871
42871
|
|
|
42872
|
-
|
|
42873
|
-
var MTabvue_type_template_id_48690377_render = function render() {
|
|
42872
|
+
var MTabvue_type_template_id_56192aef_render = function render() {
|
|
42874
42873
|
var _vm = this,
|
|
42875
42874
|
_c = _vm._self._c;
|
|
42876
42875
|
|
|
@@ -42895,7 +42894,7 @@ var MTabvue_type_template_id_48690377_render = function render() {
|
|
|
42895
42894
|
refInFor: true,
|
|
42896
42895
|
tag: "component",
|
|
42897
42896
|
staticClass: "mc-tabs__link",
|
|
42898
|
-
class: _vm.
|
|
42897
|
+
class: _vm.setLinkClass(tab),
|
|
42899
42898
|
attrs: {
|
|
42900
42899
|
"id": tab.id,
|
|
42901
42900
|
"href": tab.href ? !tab.disabled ? tab.href : null : null,
|
|
@@ -42906,9 +42905,7 @@ var MTabvue_type_template_id_48690377_render = function render() {
|
|
|
42906
42905
|
},
|
|
42907
42906
|
on: {
|
|
42908
42907
|
"click": function click($event) {
|
|
42909
|
-
_vm.
|
|
42910
|
-
index: index
|
|
42911
|
-
}, tab));
|
|
42908
|
+
return _vm.onTabClicked($event, tab, index);
|
|
42912
42909
|
}
|
|
42913
42910
|
}
|
|
42914
42911
|
}, [_vm._v(" " + _vm._s(tab.text) + " ")])], 1);
|
|
@@ -42919,9 +42916,9 @@ var MTabvue_type_template_id_48690377_render = function render() {
|
|
|
42919
42916
|
}, 'm-select', _vm.selectAttributes, false))], 1);
|
|
42920
42917
|
};
|
|
42921
42918
|
|
|
42922
|
-
var
|
|
42919
|
+
var MTabvue_type_template_id_56192aef_staticRenderFns = [];
|
|
42923
42920
|
|
|
42924
|
-
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue?vue&type=template&id=
|
|
42921
|
+
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue?vue&type=template&id=56192aef&
|
|
42925
42922
|
|
|
42926
42923
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/tabs/MTab.vue?vue&type=script&lang=js&
|
|
42927
42924
|
|
|
@@ -42995,9 +42992,7 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
42995
42992
|
var tab = this.getTabFromIndex(newValue);
|
|
42996
42993
|
|
|
42997
42994
|
if (tab && this.tabs[newValue]) {
|
|
42998
|
-
this.
|
|
42999
|
-
index: newValue
|
|
43000
|
-
}, this.tabs[newValue]));
|
|
42995
|
+
this.setTabState(tab);
|
|
43001
42996
|
}
|
|
43002
42997
|
}
|
|
43003
42998
|
},
|
|
@@ -43012,7 +43007,7 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
43012
43007
|
var tab = _this.getTabFromIndex(_this.activeIndex);
|
|
43013
43008
|
|
|
43014
43009
|
if (tab) {
|
|
43015
|
-
_this.
|
|
43010
|
+
_this.setTabState(tab);
|
|
43016
43011
|
}
|
|
43017
43012
|
} else {
|
|
43018
43013
|
var isActive = _this.tabs.some(function (tab) {
|
|
@@ -43022,25 +43017,34 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
43022
43017
|
if (!isActive) {
|
|
43023
43018
|
var firstTab = _this.tablist.querySelector('.mc-tabs__link');
|
|
43024
43019
|
|
|
43025
|
-
_this.
|
|
43020
|
+
_this.setTabState(firstTab);
|
|
43026
43021
|
}
|
|
43027
43022
|
}
|
|
43028
43023
|
}
|
|
43029
43024
|
});
|
|
43030
43025
|
},
|
|
43031
43026
|
methods: {
|
|
43032
|
-
|
|
43033
|
-
|
|
43034
|
-
|
|
43035
|
-
|
|
43036
|
-
|
|
43027
|
+
setLinkClass: function setLinkClass(tab) {
|
|
43028
|
+
return {
|
|
43029
|
+
'mc-tabs__link--selected': tab.active,
|
|
43030
|
+
'mc-tabs__link--disabled': tab.disabled
|
|
43031
|
+
};
|
|
43032
|
+
},
|
|
43033
|
+
onTabClicked: function onTabClicked(e, tab, index) {
|
|
43034
|
+
if (tab && tab.disabled) {
|
|
43035
|
+
return;
|
|
43037
43036
|
}
|
|
43038
43037
|
|
|
43039
|
-
|
|
43040
|
-
|
|
43038
|
+
var selectedTab = this.getTabFromIndex(index);
|
|
43039
|
+
|
|
43040
|
+
if (this.activeIndex) {
|
|
43041
|
+
selectedTab = this.getTabFromIndex(this.activeIndex);
|
|
43041
43042
|
}
|
|
43042
43043
|
|
|
43043
|
-
|
|
43044
|
+
this.setTabState(selectedTab);
|
|
43045
|
+
this.$emit('tab-clicked', e.target, Object.assign({
|
|
43046
|
+
index: index
|
|
43047
|
+
}, tab));
|
|
43044
43048
|
},
|
|
43045
43049
|
manageTabs: function manageTabs(el, e, tab) {
|
|
43046
43050
|
if (tab && tab.disabled) {
|
|
@@ -43058,6 +43062,14 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
43058
43062
|
el.classList.add('mc-tabs__link--selected');
|
|
43059
43063
|
el.setAttribute('aria-selected', 'true');
|
|
43060
43064
|
},
|
|
43065
|
+
setTabState: function setTabState(tab) {
|
|
43066
|
+
this.tablist.querySelectorAll('.mc-tabs__link').forEach(function (el) {
|
|
43067
|
+
el.classList.remove('mc-tabs__link--selected');
|
|
43068
|
+
el.setAttribute('aria-selected', 'false');
|
|
43069
|
+
});
|
|
43070
|
+
tab.classList.add('mc-tabs__link--selected');
|
|
43071
|
+
tab.setAttribute('aria-selected', 'true');
|
|
43072
|
+
},
|
|
43061
43073
|
getTabFromIndex: function getTabFromIndex(index) {
|
|
43062
43074
|
if (this.tablist && this.tablist.children[index] && this.tablist.children[index].children[0]) {
|
|
43063
43075
|
return this.tablist.children[index].children[0];
|
|
@@ -43067,10 +43079,10 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
43067
43079
|
});
|
|
43068
43080
|
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue?vue&type=script&lang=js&
|
|
43069
43081
|
/* harmony default export */ var tabs_MTabvue_type_script_lang_js_ = (MTabvue_type_script_lang_js_);
|
|
43070
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-84.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/tabs/MTab.vue?vue&type=style&index=0&id=
|
|
43082
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-84.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/tabs/MTab.vue?vue&type=style&index=0&id=56192aef&prod&lang=scss&
|
|
43071
43083
|
// extracted by mini-css-extract-plugin
|
|
43072
43084
|
|
|
43073
|
-
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue?vue&type=style&index=0&id=
|
|
43085
|
+
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue?vue&type=style&index=0&id=56192aef&prod&lang=scss&
|
|
43074
43086
|
|
|
43075
43087
|
;// CONCATENATED MODULE: ./src/components/tabs/MTab.vue
|
|
43076
43088
|
|
|
@@ -43083,8 +43095,8 @@ var MTabvue_type_template_id_48690377_staticRenderFns = [];
|
|
|
43083
43095
|
|
|
43084
43096
|
var MTab_component = normalizeComponent(
|
|
43085
43097
|
tabs_MTabvue_type_script_lang_js_,
|
|
43086
|
-
|
|
43087
|
-
|
|
43098
|
+
MTabvue_type_template_id_56192aef_render,
|
|
43099
|
+
MTabvue_type_template_id_56192aef_staticRenderFns,
|
|
43088
43100
|
false,
|
|
43089
43101
|
null,
|
|
43090
43102
|
null,
|