@mozaic-ds/vue 0.37.2-beta.0 → 0.38.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozaic-ds/vue",
3
- "version": "0.37.2-beta.0",
3
+ "version": "0.38.0",
4
4
  "description": "Vue.js implementation of Mozaic Design System",
5
5
  "author": "Adeo - Mozaic Design System",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "@mozaic-ds/icons": "1.52.0",
29
29
  "@mozaic-ds/styles": "1.53.0",
30
30
  "@mozaic-ds/web-fonts": "1.22.0",
31
- "core-js": "^3.27.2",
31
+ "core-js": "^3.28.0",
32
32
  "libphonenumber-js": "^1.10.19",
33
33
  "vue": "^2.6.14",
34
34
  "vue-country-flag": "2.3.2"
@@ -42,14 +42,14 @@
42
42
  "@vue/compiler-sfc": "^3.2.45",
43
43
  "@vue/eslint-config-prettier": "^7.0.0",
44
44
  "babel-eslint": "^10.1.0",
45
- "eslint": "^8.33.0",
45
+ "eslint": "^8.34.0",
46
46
  "eslint-config-prettier": "^8.6.0",
47
47
  "eslint-plugin-vue": "^9.9.0",
48
48
  "postcss": "^8.4.21",
49
49
  "postcss-loader": "^7.0.2",
50
50
  "postcss-scss": "^4.0.6",
51
- "prettier": "^2.8.3",
52
- "sass": "^1.58.0",
51
+ "prettier": "^2.8.4",
52
+ "sass": "^1.58.1",
53
53
  "sass-loader": "^13.2.0",
54
54
  "vue-template-compiler": "^2.7.14"
55
55
  },
@@ -50,7 +50,6 @@
50
50
  :items="localItems"
51
51
  :multiple="multiple"
52
52
  :empty-search-label="emptySearchLabel"
53
- :data-key-expr="dataKeyExpr"
54
53
  :data-text-expr="dataTextExpr"
55
54
  :data-value-expr="dataValueExpr"
56
55
  :max-width="maxWidth"
@@ -183,10 +182,6 @@ export default {
183
182
  type: String,
184
183
  default: 'No results found',
185
184
  },
186
- dataKeyExpr: {
187
- type: String,
188
- default: 'id',
189
- },
190
185
  dataTextExpr: {
191
186
  type: String,
192
187
  default: 'label',
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <fieldset class="mc-field mc-field--group">
3
- <legend class="mc-field__legend">
3
+ <legend v-if="legend" class="mc-field__legend">
4
4
  {{ legend }}
5
5
  <span
6
6
  v-if="requirementText"
@@ -63,7 +63,7 @@ export default {
63
63
  */
64
64
  legend: {
65
65
  type: String,
66
- required: true,
66
+ default: undefined,
67
67
  },
68
68
  /**
69
69
  * Property used to manage the values checked by v-model
@@ -164,6 +164,19 @@ export default {
164
164
  </script>
165
165
 
166
166
  <style lang="scss">
167
- @import 'settings-tools/_all-settings';
168
- @import 'components/_c.fields';
167
+ @import 'settings-tools/all-settings';
168
+ @import 'components/c.fields';
169
+
170
+ // TODO: temporary fix - should be put inside @mozaic-ds/styles
171
+ .mc-field--group {
172
+ .mc-field {
173
+ &__container {
174
+ margin-top: 0;
175
+ }
176
+
177
+ &__legend {
178
+ margin-bottom: 1rem;
179
+ }
180
+ }
181
+ }
169
182
  </style>
@@ -43,7 +43,6 @@
43
43
  :items="localItems"
44
44
  :multiple="multiple"
45
45
  :empty-search-label="emptySearchLabel"
46
- :data-key-expr="dataKeyExpr"
47
46
  :data-text-expr="dataTextExpr"
48
47
  :data-value-expr="dataValueExpr"
49
48
  :max-width="maxWidth"
@@ -141,10 +140,6 @@ export default {
141
140
  type: String,
142
141
  default: 'No results found',
143
142
  },
144
- dataKeyExpr: {
145
- type: String,
146
- default: 'id',
147
- },
148
143
  dataTextExpr: {
149
144
  type: String,
150
145
  default: 'label',
@@ -151,7 +151,7 @@ export default {
151
151
  /** The size of title (l, s, m, or xl).*/
152
152
  size: {
153
153
  type: String,
154
- default: 'l',
154
+ default: 'm',
155
155
  validator: (value) => ['s', 'm', 'l', 'xl'].includes(value),
156
156
  },
157
157
  /** Label of the back button. Useful for accessibilty reason */
@@ -237,44 +237,63 @@ export default {
237
237
  <style lang="scss">
238
238
  @import 'settings-tools/all-settings';
239
239
  @import 'components/c.divider';
240
+
241
+ @mixin set-container-padding() {
242
+ padding-left: $mu200;
243
+ padding-right: $mu200;
244
+
245
+ @media (min-width: $screen-l) and (max-width: ($screen-xl - 1)) {
246
+ padding-left: $mu300;
247
+ padding-right: $mu300;
248
+ }
249
+ }
250
+
240
251
  .mc-header {
241
252
  @include set-font-face();
253
+
242
254
  background-color: $color-grey-000;
243
- z-index: 10;
255
+ z-index: 5;
256
+
244
257
  &__container {
258
+ @include set-container-padding();
259
+
245
260
  display: grid;
246
- padding: $mu050 $mu150 $mu100;
247
- @include set-from-screen('l') {
248
- padding-left: $mu200;
249
- padding-right: $mu200;
250
- }
261
+ padding-top: $mu050;
262
+ padding-bottom: $mu100;
251
263
  }
264
+
252
265
  &__breadcrumb {
253
266
  grid-column: 1;
254
267
  grid-row: auto;
255
268
  }
269
+
256
270
  &__content {
257
271
  color: $color-font-darkest;
258
272
  grid-column: 1;
259
273
  grid-row: auto;
260
274
  padding-top: $mu050;
275
+
261
276
  &-main {
262
277
  display: flex;
263
278
  align-items: center;
264
279
  gap: $mu100;
280
+
265
281
  &:not(:only-child) {
266
282
  margin-bottom: $mu025;
267
283
  }
268
284
  }
285
+
269
286
  &-aside {
270
287
  display: flex;
271
288
  align-items: flex-start;
272
289
  flex-direction: column;
273
290
  gap: $mu050;
274
291
  padding-bottom: $mu050;
292
+
275
293
  &.can-navigate {
276
294
  padding-left: $mu300;
277
295
  }
296
+
278
297
  @include set-from-screen('l') {
279
298
  align-items: center;
280
299
  flex-direction: row;
@@ -283,8 +302,10 @@ export default {
283
302
  }
284
303
  }
285
304
  }
305
+
286
306
  &__back {
287
307
  @include unstyle-button();
308
+
288
309
  align-items: center;
289
310
  background-color: transparent;
290
311
  justify-content: center;
@@ -292,39 +313,48 @@ export default {
292
313
  display: flex;
293
314
  height: $mu200;
294
315
  width: $mu200;
316
+
295
317
  &-icon {
296
318
  color: $color-grey-800;
297
319
  height: $mu150;
298
320
  width: $mu150;
299
321
  }
322
+
300
323
  &-label {
301
324
  @include visually-hidden();
302
325
  }
303
326
  }
327
+
304
328
  &__title {
329
+ @include set-font-scale('08', 'm'); // 28px / 36px
330
+ @include set-font-weight('semi-bold');
331
+
305
332
  margin-top: 0;
306
333
  margin-bottom: 0;
334
+
307
335
  &--s {
308
336
  @include set-font-scale('07', 'm'); // 23px / 32px
309
337
  }
310
- &--m {
311
- @include set-font-scale('08', 'm'); // 28px / 36px
312
- }
338
+
313
339
  &--l {
314
340
  @include set-font-scale('09', 'm'); // 34px / 44px
315
341
  }
342
+
316
343
  &--xl {
317
344
  @include set-font-scale('10', 'm'); // 41px / 56px
318
345
  }
319
346
  }
347
+
320
348
  &__subtitle {
321
349
  @include set-font-scale('05', 'm'); // 16px / 22px
322
350
  }
351
+
323
352
  &__actions,
324
353
  &__icons {
325
354
  display: flex;
326
355
  gap: $mu150;
327
356
  }
357
+
328
358
  &__actions {
329
359
  align-items: flex-end;
330
360
  align-self: flex-start;
@@ -333,40 +363,48 @@ export default {
333
363
  justify-self: end;
334
364
  margin-bottom: $mu050;
335
365
  min-height: $mu250;
366
+
336
367
  @include set-from-screen('l') {
337
368
  grid-column: 2;
338
369
  grid-row: 1;
339
370
  margin-bottom: 0;
340
371
  }
341
372
  }
373
+
342
374
  &__selector {
343
375
  &:not(:only-child) {
344
376
  @include set-divider('left', 'light', '100%', 's');
377
+
345
378
  padding-left: px-to-rem(25);
346
379
  position: relative;
347
380
  }
348
381
  }
382
+
349
383
  &__tabs {
350
- padding-left: $mu200;
351
- padding-right: $mu200;
384
+ @include set-container-padding();
352
385
  }
386
+
353
387
  // Modifiers
354
388
  &--shadow {
355
389
  @include set-box-shadow('s');
356
390
  }
391
+
357
392
  &--animate {
358
393
  left: 0;
359
394
  position: absolute;
360
395
  right: 0;
361
396
  transition: transform ease-out 0.4s;
362
397
  }
398
+
363
399
  &--sticky {
364
400
  position: sticky;
365
401
  top: 0;
366
402
  }
403
+
367
404
  &--up {
368
405
  transform: translateY(0);
369
406
  }
407
+
370
408
  &--down {
371
409
  transform: translateY(calc(-100% - 5px));
372
410
  }
@@ -63,10 +63,6 @@ export default {
63
63
  type: Boolean,
64
64
  default: false,
65
65
  },
66
- dataKeyExpr: {
67
- type: String,
68
- default: 'id',
69
- },
70
66
  dataTextExpr: {
71
67
  type: String,
72
68
  default: 'label',
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <fieldset class="mc-field mc-field--group">
3
- <legend class="mc-field__legend">
3
+ <legend v-if="legend" class="mc-field__legend">
4
4
  {{ legend }}
5
5
  <span
6
6
  v-if="requirementText"
@@ -48,7 +48,7 @@ export default {
48
48
  props: {
49
49
  legend: {
50
50
  type: String,
51
- required: true,
51
+ default: null,
52
52
  },
53
53
  requirementText: {
54
54
  type: String,
@@ -106,6 +106,19 @@ export default {
106
106
  </script>
107
107
 
108
108
  <style lang="scss">
109
- @import 'settings-tools/_all-settings';
110
- @import 'components/_c.fields';
109
+ @import 'settings-tools/all-settings';
110
+ @import 'components/c.fields';
111
+
112
+ // TODO: temporary fix - should be put inside @mozaic-ds/styles
113
+ .mc-field--group {
114
+ .mc-field {
115
+ &__container {
116
+ margin-top: 0;
117
+ }
118
+
119
+ &__legend {
120
+ margin-bottom: 1rem;
121
+ }
122
+ }
123
+ }
111
124
  </style>