@mozaic-ds/vue 0.40.1-beta.1 → 0.41.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 +481 -33
- package/dist/mozaic-vue.adeo.umd.js.map +1 -1
- package/dist/mozaic-vue.common.js +481 -33
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +481 -33
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +2 -2
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +10 -10
- package/src/components/dropdown/MDropdown.vue +20 -12
- package/src/components/passwordinput/MPasswordInput.vue +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozaic-ds/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Vue.js implementation of Mozaic Design System",
|
|
5
5
|
"author": "Adeo - Mozaic Design System",
|
|
6
6
|
"scripts": {
|
|
@@ -25,29 +25,29 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
27
27
|
"@mozaic-ds/css-dev-tools": "1.54.0",
|
|
28
|
-
"@mozaic-ds/icons": "1.
|
|
28
|
+
"@mozaic-ds/icons": "1.57.0",
|
|
29
29
|
"@mozaic-ds/styles": "1.56.0",
|
|
30
30
|
"@mozaic-ds/web-fonts": "1.22.0",
|
|
31
31
|
"core-js": "^3.29.1",
|
|
32
|
-
"libphonenumber-js": "^1.10.
|
|
32
|
+
"libphonenumber-js": "^1.10.24",
|
|
33
33
|
"vue": "^2.6.14",
|
|
34
34
|
"vue-country-flag": "2.3.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@babel/core": "^7.21.
|
|
38
|
-
"@babel/eslint-parser": "^7.
|
|
37
|
+
"@babel/core": "^7.21.4",
|
|
38
|
+
"@babel/eslint-parser": "^7.21.3",
|
|
39
39
|
"@rushstack/eslint-patch": "^1.2.0",
|
|
40
40
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
41
41
|
"@vue/cli-service": "~5.0.8",
|
|
42
42
|
"@vue/compiler-sfc": "^3.2.47",
|
|
43
43
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
44
44
|
"babel-eslint": "^10.1.0",
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
47
|
-
"eslint-plugin-vue": "^9.
|
|
48
|
-
"prettier": "^2.8.
|
|
45
|
+
"eslint": "^8.37.0",
|
|
46
|
+
"eslint-config-prettier": "^8.8.0",
|
|
47
|
+
"eslint-plugin-vue": "^9.10.0",
|
|
48
|
+
"prettier": "^2.8.7",
|
|
49
49
|
"sass": "^1.60.0",
|
|
50
|
-
"sass-loader": "^13.2.
|
|
50
|
+
"sass-loader": "^13.2.2",
|
|
51
51
|
"vue-template-compiler": "^2.7.14"
|
|
52
52
|
},
|
|
53
53
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:disabled="disabled"
|
|
26
26
|
@click="openState = !openState"
|
|
27
27
|
>
|
|
28
|
-
{{
|
|
28
|
+
{{ getButtonLabel }}
|
|
29
29
|
</button>
|
|
30
30
|
<button
|
|
31
31
|
v-if="isClearable"
|
|
@@ -174,7 +174,6 @@ export default {
|
|
|
174
174
|
openState: this.open,
|
|
175
175
|
tagWidth: '0px',
|
|
176
176
|
tagValue: null,
|
|
177
|
-
buttonValue: this.placeholder,
|
|
178
177
|
localItems: null,
|
|
179
178
|
sortedListItems: null,
|
|
180
179
|
listboxValue: null,
|
|
@@ -210,6 +209,25 @@ export default {
|
|
|
210
209
|
'mc-select--s': this.size === 's',
|
|
211
210
|
};
|
|
212
211
|
},
|
|
212
|
+
getButtonLabel() {
|
|
213
|
+
let label = this.placeholder;
|
|
214
|
+
|
|
215
|
+
if (this.modelValue && !this.items.length) {
|
|
216
|
+
return label;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const value = this.listboxValue;
|
|
220
|
+
const selectedItems = this.getSelectedItems(value);
|
|
221
|
+
const selectedLabels = selectedItems.map(
|
|
222
|
+
(item) => item[this.dataTextExpr]
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
label =
|
|
226
|
+
((!value || value.length === 0) && this.placeholder) ||
|
|
227
|
+
selectedLabels.join(', ');
|
|
228
|
+
|
|
229
|
+
return label;
|
|
230
|
+
},
|
|
213
231
|
},
|
|
214
232
|
|
|
215
233
|
watch: {
|
|
@@ -231,15 +249,6 @@ export default {
|
|
|
231
249
|
},
|
|
232
250
|
listboxValue: {
|
|
233
251
|
handler: function (val) {
|
|
234
|
-
const selectedItems = this.getSelectedItems(val);
|
|
235
|
-
const seletedLabels = selectedItems.map(
|
|
236
|
-
(item) => item[this.dataTextExpr]
|
|
237
|
-
);
|
|
238
|
-
|
|
239
|
-
this.buttonValue =
|
|
240
|
-
((!val || val.length === 0) && this.placeholder) ||
|
|
241
|
-
seletedLabels.join(', ');
|
|
242
|
-
|
|
243
252
|
if (this.multiple) {
|
|
244
253
|
this.tagValue = val;
|
|
245
254
|
}
|
|
@@ -258,7 +267,6 @@ export default {
|
|
|
258
267
|
this.$emit('update:open', val);
|
|
259
268
|
},
|
|
260
269
|
},
|
|
261
|
-
|
|
262
270
|
methods: {
|
|
263
271
|
setTagWidth() {
|
|
264
272
|
this.$nextTick(() => {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
type="button"
|
|
15
15
|
class="mc-password-input__button"
|
|
16
16
|
role="switch"
|
|
17
|
-
:aria-
|
|
17
|
+
:aria-checked="setAriaChecked"
|
|
18
18
|
@click="onClick"
|
|
19
19
|
>
|
|
20
20
|
{{ setButtonLabel }}
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
'is-invalid': this.isInvalid,
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
setAriaChecked() {
|
|
77
77
|
return this.isVisible ? 'true' : 'false';
|
|
78
78
|
},
|
|
79
79
|
setButtonLabel() {
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
|
|
84
84
|
methods: {
|
|
85
85
|
onClick() {
|
|
86
|
-
const aria = this.$refs.button.getAttribute('aria-
|
|
86
|
+
const aria = this.$refs.button.getAttribute('aria-checked') === 'false';
|
|
87
87
|
this.isVisible = aria;
|
|
88
88
|
},
|
|
89
89
|
},
|