@mozaic-ds/vue 0.35.0 → 0.35.1-beta.1

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.35.0",
3
+ "version": "0.35.1-beta.1",
4
4
  "description": "Vue.js implementation of Mozaic Design System",
5
5
  "author": "Adeo - Mozaic Design System",
6
6
  "scripts": {
@@ -35,6 +35,7 @@
35
35
  :data-key-expr="dataKeyExpr"
36
36
  :data-text-expr="dataTextExpr"
37
37
  :data-value-expr="dataValueExpr"
38
+ :max-width="maxWidth"
38
39
  @change="onChange"
39
40
  >
40
41
  <template #item="{ item }">
@@ -144,7 +145,7 @@ export default {
144
145
  // Global
145
146
  maxWidth: {
146
147
  type: String,
147
- default: '17.875rem',
148
+ default: '100%', // 17.875rem
148
149
  },
149
150
  },
150
151
 
@@ -167,8 +168,8 @@ export default {
167
168
  },
168
169
  setStyles() {
169
170
  return {
170
- '--tag-width': this.tagWidth,
171
- '--max-width': this.maxWidth,
171
+ '--dropdown-width': this.maxWidth,
172
+ '--dropdown-tag-width': this.tagWidth,
172
173
  };
173
174
  },
174
175
  },
@@ -194,18 +195,13 @@ export default {
194
195
  },
195
196
 
196
197
  listboxValue: function (val) {
197
- const value = Array.isArray(val) ? val : val.toString();
198
- const selectedItems = this.getSelectedItems(value);
199
-
198
+ const selectedItems = this.getSelectedItems(val);
200
199
  const seletedLabels = selectedItems.map(
201
200
  (item) => item[this.dataTextExpr]
202
201
  );
203
202
 
204
- this.buttonValue = seletedLabels.join(', ');
205
-
206
- if (val.length === 0) {
207
- this.buttonValue = this.placeholder;
208
- }
203
+ this.buttonValue =
204
+ val.length === 0 ? this.placeholder : seletedLabels.join(', ');
209
205
 
210
206
  if (this.multiple) {
211
207
  this.tagValue = val;
@@ -293,32 +289,5 @@ export default {
293
289
 
294
290
  <style lang="scss">
295
291
  @import 'settings-tools/all-settings';
296
- @import 'components/c.checkbox';
297
- @import 'components/_c.dropdown';
298
-
299
- .mc-dropdown {
300
- max-width: var(--max-width);
301
-
302
- &__tag {
303
- position: absolute;
304
- top: 0;
305
- transform: translateY(50%);
306
- }
307
-
308
- &__trigger {
309
- display: block;
310
- text-align: left;
311
-
312
- &.is-open {
313
- background-image: url(inline-icons('arrow-top-16', black));
314
- }
315
- }
316
- }
317
-
318
- .mc-dropdown--multi .mc-dropdown__trigger {
319
- overflow: hidden;
320
- padding-left: calc(0.75rem + var(--tag-width));
321
- text-overflow: ellipsis;
322
- white-space: nowrap;
323
- }
292
+ @import 'components/c.dropdown';
324
293
  </style>