@mozaic-ds/vue 0.23.0-beta.1 → 0.23.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.css +40 -40
- package/dist/mozaic-vue.adeo.umd.js +1275 -75
- package/dist/mozaic-vue.common.js +1275 -75
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.umd.js +1275 -75
- 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 +4 -4
- package/src/components/autocomplete/MAutocomplete.vue +27 -10
- package/src/components/icon/MIcon.vue +18 -2
- package/src/components/phonenumber/MPhoneNumber.vue +4 -2
- package/src/components/tabs/MTab.vue +2 -9
- package/src/tokens/adeo/android/colors.xml +209 -166
- package/src/tokens/adeo/css/_variables.scss +209 -166
- package/src/tokens/adeo/css/root.scss +89 -46
- package/src/tokens/adeo/ios/StyleDictionaryColor.h +48 -5
- package/src/tokens/adeo/ios/StyleDictionaryColor.m +214 -171
- package/src/tokens/adeo/ios/StyleDictionaryColor.swift +209 -166
- package/src/tokens/adeo/js/tokens.js +209 -166
- package/src/tokens/adeo/js/tokensObject.js +1279 -304
- package/src/tokens/adeo/scss/_tokens.scss +344 -174
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozaic-ds/vue",
|
|
3
|
-
"version": "0.23.0
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Vue.js implementation of Mozaic Design System",
|
|
5
5
|
"author": "Adeo - Mozaic Design System",
|
|
6
6
|
"scripts": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"postinstall.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mozaic-ds/css-dev-tools": "
|
|
27
|
-
"@mozaic-ds/icons": "1.
|
|
28
|
-
"@mozaic-ds/styles": "
|
|
26
|
+
"@mozaic-ds/css-dev-tools": "1.38.0",
|
|
27
|
+
"@mozaic-ds/icons": "1.41.0",
|
|
28
|
+
"@mozaic-ds/styles": "1.41.0",
|
|
29
29
|
"@mozaic-ds/web-fonts": "1.22.0",
|
|
30
30
|
"core-js": "^3.18.3",
|
|
31
31
|
"libphonenumber-js": "1.9.50",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:style="tagStyle"
|
|
8
8
|
>
|
|
9
9
|
<m-tag
|
|
10
|
-
v-if="multiple && tagValue.length >
|
|
10
|
+
v-if="multiple && tagValue.length > 0"
|
|
11
11
|
type="removable"
|
|
12
12
|
:label="tagValue.length.toString() + ' ' + tagLabel"
|
|
13
13
|
class="mc-autocomplete__tag"
|
|
@@ -128,8 +128,6 @@ export default {
|
|
|
128
128
|
data() {
|
|
129
129
|
return {
|
|
130
130
|
itemListForDropdown: this.items,
|
|
131
|
-
selected: this.items,
|
|
132
|
-
itemDisplayed: '',
|
|
133
131
|
isOpen: this.open,
|
|
134
132
|
tagWidth: '0px',
|
|
135
133
|
maxWidth: '17.875rem',
|
|
@@ -151,17 +149,20 @@ export default {
|
|
|
151
149
|
|
|
152
150
|
watch: {
|
|
153
151
|
listboxValue: function (newValue) {
|
|
152
|
+
const textToDisplay = [];
|
|
154
153
|
const valueExpr = this.dataValueExpr;
|
|
155
154
|
const textExpr = this.dataTextExpr;
|
|
156
155
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
this.tagValue = newValue;
|
|
157
|
+
|
|
158
|
+
if (newValue.length) {
|
|
159
|
+
const selectedItems = this.items.filter((item) =>
|
|
160
|
+
newValue.includes(item[valueExpr])
|
|
160
161
|
);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
this.
|
|
162
|
+
|
|
163
|
+
selectedItems.forEach((item) => textToDisplay.push(item[textExpr]));
|
|
164
|
+
|
|
165
|
+
this.inputValue = textToDisplay.join(', ');
|
|
165
166
|
}
|
|
166
167
|
},
|
|
167
168
|
|
|
@@ -196,6 +197,7 @@ export default {
|
|
|
196
197
|
|
|
197
198
|
clearAutocomplete() {
|
|
198
199
|
this.listboxValue = [];
|
|
200
|
+
this.inputValue = '';
|
|
199
201
|
this.onChange();
|
|
200
202
|
this.$emit('clear');
|
|
201
203
|
},
|
|
@@ -219,6 +221,10 @@ export default {
|
|
|
219
221
|
|
|
220
222
|
onChange() {
|
|
221
223
|
this.$emit('change', this.listboxValue);
|
|
224
|
+
|
|
225
|
+
if (!this.multiple) {
|
|
226
|
+
this.onClickOutside();
|
|
227
|
+
}
|
|
222
228
|
},
|
|
223
229
|
},
|
|
224
230
|
};
|
|
@@ -231,9 +237,20 @@ export default {
|
|
|
231
237
|
|
|
232
238
|
.mc-autocomplete {
|
|
233
239
|
max-width: var(--max-width);
|
|
240
|
+
|
|
241
|
+
&__tag {
|
|
242
|
+
position: absolute;
|
|
243
|
+
top: 0;
|
|
244
|
+
-webkit-transform: translateY(50%);
|
|
245
|
+
-ms-transform: translateY(50%);
|
|
246
|
+
transform: translateY(50%);
|
|
247
|
+
}
|
|
234
248
|
}
|
|
235
249
|
|
|
236
250
|
.mc-autocomplete--multi .mc-autocomplete__trigger {
|
|
251
|
+
overflow: hidden;
|
|
237
252
|
padding-left: calc(2.9375rem + var(--tag-width));
|
|
253
|
+
text-overflow: ellipsis;
|
|
254
|
+
white-space: nowrap;
|
|
238
255
|
}
|
|
239
256
|
</style>
|
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
viewbox: null,
|
|
26
26
|
size: null,
|
|
27
27
|
paths: null,
|
|
28
|
+
type: null,
|
|
28
29
|
};
|
|
29
30
|
},
|
|
30
31
|
|
|
@@ -79,8 +80,17 @@ export default {
|
|
|
79
80
|
this.viewbox = selectedIcon.viewBox;
|
|
80
81
|
this.size = selectedIcon.size;
|
|
81
82
|
this.paths = selectedIcon.paths;
|
|
83
|
+
this.type = selectedIcon.type;
|
|
82
84
|
});
|
|
83
85
|
},
|
|
86
|
+
setSizeFromViewbox(viewbox) {
|
|
87
|
+
const viewboxSizes = viewbox.split(' ').filter((size) => size > 0);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
width: `${viewboxSizes[0]}px`,
|
|
91
|
+
height: `${viewboxSizes[1]}px`,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
84
94
|
},
|
|
85
95
|
|
|
86
96
|
render: function (createElement) {
|
|
@@ -88,8 +98,14 @@ export default {
|
|
|
88
98
|
const svgAttrs = {
|
|
89
99
|
id: `MIcon-${this.name}-${this.id}`,
|
|
90
100
|
viewBox: this.viewbox,
|
|
91
|
-
height:
|
|
92
|
-
|
|
101
|
+
height:
|
|
102
|
+
this.type !== 'logotypes'
|
|
103
|
+
? this.size
|
|
104
|
+
: this.setSizeFromViewbox(this.viewbox).height,
|
|
105
|
+
width:
|
|
106
|
+
this.type !== 'logotypes'
|
|
107
|
+
? this.size
|
|
108
|
+
: this.setSizeFromViewbox(this.viewbox).width,
|
|
93
109
|
fill: this.color,
|
|
94
110
|
'aria-hidden': 'true',
|
|
95
111
|
};
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
}),
|
|
147
147
|
computed: {
|
|
148
148
|
hasValue() {
|
|
149
|
-
return this.
|
|
149
|
+
return this.value !== '';
|
|
150
150
|
},
|
|
151
151
|
placeholder() {
|
|
152
152
|
return getExampleNumber(
|
|
@@ -162,6 +162,9 @@ export default {
|
|
|
162
162
|
},
|
|
163
163
|
created() {
|
|
164
164
|
this.init();
|
|
165
|
+
if (!this.hasValue) {
|
|
166
|
+
this.selectedCountry = this.countries[0];
|
|
167
|
+
}
|
|
165
168
|
},
|
|
166
169
|
methods: {
|
|
167
170
|
init() {
|
|
@@ -185,7 +188,6 @@ export default {
|
|
|
185
188
|
: this.selectedCountry;
|
|
186
189
|
}
|
|
187
190
|
} else {
|
|
188
|
-
this.selectedCountry = this.countries[0];
|
|
189
191
|
this.phoneNumber = '';
|
|
190
192
|
}
|
|
191
193
|
},
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
v-if="tab.router"
|
|
19
19
|
v-bind="tab.attrs"
|
|
20
20
|
:to="tab.to"
|
|
21
|
+
class="mc-tabs__link"
|
|
22
|
+
:class="setLinkClass(tab)"
|
|
21
23
|
active-class="mc-tabs__link--selected"
|
|
22
24
|
>
|
|
23
25
|
{{ tab.text }}
|
|
@@ -162,15 +164,6 @@ export default {
|
|
|
162
164
|
tab.classList.add('mc-tabs__link--selected');
|
|
163
165
|
tab.setAttribute('aria-selected', 'true');
|
|
164
166
|
},
|
|
165
|
-
setTabState(tab) {
|
|
166
|
-
this.tablist.querySelectorAll('.mc-tabs__link').forEach((el) => {
|
|
167
|
-
el.classList.remove('mc-tabs__link--selected');
|
|
168
|
-
el.setAttribute('aria-selected', 'false');
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
tab.classList.add('mc-tabs__link--selected');
|
|
172
|
-
tab.setAttribute('aria-selected', 'true');
|
|
173
|
-
},
|
|
174
167
|
getTabFromIndex: function (index) {
|
|
175
168
|
if (
|
|
176
169
|
this.tablist &&
|