@mozaic-ds/vue 0.14.0 → 0.14.3-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.14.0",
3
+ "version": "0.14.3-beta.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build ./src/index.js",
@@ -13,9 +13,9 @@
13
13
  "postinstall": "node postinstall.js"
14
14
  },
15
15
  "dependencies": {
16
- "@mozaic-ds/css-dev-tools": "^1.24.0",
17
- "@mozaic-ds/icons": "^1.25.0",
18
- "@mozaic-ds/styles": "^1.25.0",
16
+ "@mozaic-ds/css-dev-tools": "^1.26.0",
17
+ "@mozaic-ds/icons": "^1.26.0",
18
+ "@mozaic-ds/styles": "^1.26.1",
19
19
  "@mozaic-ds/web-fonts": "^1.22.0",
20
20
  "core-js": "^3.18.3",
21
21
  "libphonenumber-js": "^1.9.37",
@@ -465,6 +465,19 @@ export default {
465
465
  };
466
466
  },
467
467
 
468
+ checkIfPromise(promise) {
469
+ return !!promise && typeof promise.then === 'function';
470
+ },
471
+
472
+ setTotal() {
473
+ if (Array.isArray(this.source)) {
474
+ this.total = this.source.length;
475
+ }
476
+ else if (this.source instanceof Function && !this.checkIfPromise(this.source())) {
477
+ this.total = this.source().length;
478
+ }
479
+ },
480
+
468
481
  /** Load data. */
469
482
  async load() {
470
483
  this.loading = true;
@@ -474,6 +487,8 @@ export default {
474
487
  }
475
488
 
476
489
  try {
490
+ this.setTotal();
491
+
477
492
  const options = buildOptions(
478
493
  this.pagingOptions.enabled,
479
494
  this.getPageValue,
@@ -101,4 +101,28 @@ export default {
101
101
  <style lang="scss">
102
102
  @import 'settings-tools/all-settings';
103
103
  @import 'components/c.option-card';
104
+
105
+ // temporary fix
106
+ .mc-option-card {
107
+ $parent: get-parent-selector(&);
108
+
109
+ border-radius: get-border-radius('m');
110
+ cursor: pointer;
111
+ position: relative;
112
+
113
+ &__input {
114
+ @at-root input#{&} {
115
+ &:checked ~ #{$parent}__content {
116
+ button,
117
+ [href],
118
+ input,
119
+ select,
120
+ textarea,
121
+ [tabindex]:not([tabindex='-1']) {
122
+ position: relative;
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
104
128
  </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <component :is="htmlTag" class="mc-option-group">
3
- {{ label }}
3
+ <slot />
4
4
  </component>
5
5
  </template>
6
6