@mozaic-ds/vue 0.37.1-beta.0 → 0.37.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.37.1-beta.0",
3
+ "version": "0.37.1",
4
4
  "description": "Vue.js implementation of Mozaic Design System",
5
5
  "author": "Adeo - Mozaic Design System",
6
6
  "scripts": {
@@ -140,6 +140,12 @@ export default {
140
140
  };
141
141
  },
142
142
 
143
+ mounted() {
144
+ if (this.value?.length) {
145
+ this.checkboxesValues = [...this.value];
146
+ }
147
+ },
148
+
143
149
  methods: {
144
150
  onChange(isChecked, value) {
145
151
  let values = this.checkboxesValues;
@@ -1,10 +1,17 @@
1
1
  <template>
2
2
  <div class="mc-kpi" :class="classObject">
3
- <span v-if="label" class="mc-kpi__label">{{ label }}</span>
3
+ <span v-if="labelOutsideContent" class="mc-kpi__label">
4
+ {{ label }}
5
+ </span>
4
6
  <div class="mc-kpi__content">
5
- <div class="mc-kpi__value">{{ value }}</div>
6
- <div v-if="icon || detail" class="mc-kpi__details">
7
- <span v-if="detail" class="mc-kpi__text">
7
+ <div class="mc-kpi__main">
8
+ <span v-if="!labelOutsideContent" class="mc-kpi__label">
9
+ {{ label }}
10
+ </span>
11
+ <span class="mc-kpi__value">{{ value }}</span>
12
+ </div>
13
+ <div v-if="icon || detail" class="mc-kpi__aside">
14
+ <span v-if="detail" class="mc-kpi__detail">
8
15
  {{ detail }}
9
16
  </span>
10
17
  <MIcon v-if="icon" :name="icon" class="mc-kpi__icon" color="black" />
@@ -64,6 +71,9 @@ export default {
64
71
  [`mc-kpi--${this.type}`]: this.type,
65
72
  };
66
73
  },
74
+ labelOutsideContent() {
75
+ return this.label && this.getSize !== 'large';
76
+ },
67
77
  },
68
78
  };
69
79
  </script>
@@ -137,15 +147,19 @@ $color-kpi-text: var(
137
147
  display: flex;
138
148
  }
139
149
 
140
- // value
150
+ // main
151
+ &__main {
152
+ align-items: center;
153
+ display: flex;
154
+ justify-content: center;
155
+ }
156
+
141
157
  &__value {
142
158
  @include set-font-scale('04', 'm');
143
159
  @include set-font-weight('semi-bold');
144
-
145
- text-align: center;
146
160
  }
147
161
 
148
- &__details {
162
+ &__aside {
149
163
  align-items: center;
150
164
  background-color: $color-grey-000;
151
165
  color: $color-font-dark;
@@ -153,7 +167,7 @@ $color-kpi-text: var(
153
167
  justify-content: center;
154
168
  }
155
169
 
156
- &__text {
170
+ &__detail {
157
171
  @include set-font-scale('04', 'm');
158
172
  }
159
173
 
@@ -170,13 +184,13 @@ $color-kpi-text: var(
170
184
  gap: $mu050;
171
185
  }
172
186
 
173
- &__value {
187
+ &__main {
174
188
  @include set-kpi-container();
175
189
 
176
190
  padding: px-to-rem(3) px-to-rem(7);
177
191
  }
178
192
 
179
- &__details {
193
+ &__aside {
180
194
  background-color: transparent;
181
195
  }
182
196
  }
@@ -194,14 +208,16 @@ $color-kpi-text: var(
194
208
  @include set-kpi-container();
195
209
  }
196
210
 
211
+ &__main {
212
+ flex-grow: 1;
213
+ padding: $mu050 $mu050 $mu050 px-to-rem(7);
214
+ }
215
+
197
216
  &__value {
198
217
  @include set-font-scale('05', 'm');
199
-
200
- padding: $mu050 $mu050 $mu050 px-to-rem(7);
201
- flex-grow: 1;
202
218
  }
203
219
 
204
- &__details {
220
+ &__aside {
205
221
  padding-left: $mu075;
206
222
  padding-right: px-to-rem(11);
207
223
  }
@@ -213,31 +229,25 @@ $color-kpi-text: var(
213
229
  @include set-kpi-container();
214
230
 
215
231
  #{$parent} {
216
- &__label,
217
- &__value {
218
- padding-right: px-to-rem(15);
219
- padding-left: px-to-rem(15);
232
+ &__content {
233
+ flex-direction: column;
234
+ width: 100%;
220
235
  }
221
236
 
222
- &__label {
223
- @include set-font-scale('05', 'm');
224
-
225
- padding-top: $mu100;
226
- text-align: center;
237
+ &__main {
238
+ flex-direction: column;
239
+ padding: $mu100 px-to-rem(15);
227
240
  }
228
241
 
229
- &__content {
230
- flex-direction: column;
231
- width: 100%;
242
+ &__label {
243
+ @include set-font-scale('05', 'm');
232
244
  }
233
245
 
234
246
  &__value {
235
247
  @include set-font-scale('09', 'm');
236
-
237
- padding-bottom: $mu100;
238
248
  }
239
249
 
240
- &__details {
250
+ &__aside {
241
251
  min-height: px-to-rem(47);
242
252
  padding-right: px-to-rem(11);
243
253
  padding-left: px-to-rem(11);