@mozaic-ds/vue 0.11.1 → 0.12.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.11.1",
3
+ "version": "0.12.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build ./src/index.js",
@@ -9,7 +9,7 @@
9
9
  "lint": "vue-cli-service lint",
10
10
  "prepublishOnly": "npm run-script build:bundle && npm run-script build:bundleAdeo",
11
11
  "publish:beta": "npm publish --access public --tag alpha",
12
- "tokens:build": "MOZAIC_PRESET='adeo' mozaic-tokens-build",
12
+ "tokens:build": "mozaic-tokens-build",
13
13
  "postinstall": "node postinstall.js"
14
14
  },
15
15
  "dependencies": {
@@ -27,7 +27,6 @@
27
27
  "@babel/core": "^7.15.8",
28
28
  "@babel/eslint-parser": "^7.15.8",
29
29
  "@vue/cli-plugin-babel": "^4.5.13",
30
- "@vue/cli-plugin-eslint": "^4.5.13",
31
30
  "@vue/cli-service": "^4.5.13",
32
31
  "@vue/compiler-sfc": "^3.2.20",
33
32
  "@vue/eslint-config-prettier": "^6.0.0",
@@ -7,6 +7,7 @@
7
7
  role="dialog"
8
8
  aria-labelledby="modal_title"
9
9
  :aria-hidden="!open"
10
+ @keyup.esc="closeModal()"
10
11
  >
11
12
  <div
12
13
  class="mc-modal__dialog"
@@ -26,7 +27,6 @@
26
27
  ref="close"
27
28
  class="mc-modal__close"
28
29
  type="button"
29
- @keyup.esc="closeModal()"
30
30
  @click="closeModal()"
31
31
  >
32
32
  <span class="mc-modal__close-text">
@@ -101,6 +101,7 @@ export default {
101
101
  this.$nextTick(() => {
102
102
  if (isOpen) {
103
103
  this.trapFocus();
104
+ this.setFocusOnModal();
104
105
  this.setOverflow();
105
106
  this.$emit('modal-opened');
106
107
  } else {
@@ -158,6 +159,12 @@ export default {
158
159
  modal.classList.add('mc-modal--overflow');
159
160
  }
160
161
  },
162
+
163
+ setFocusOnModal() {
164
+ const modal = this.$refs.modal;
165
+
166
+ modal.focus();
167
+ },
161
168
  },
162
169
  };
163
170
  </script>
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div :class="['mc-stars-input', setClasses]">
3
3
  <input
4
- id="no-rate"
4
+ :id="name + '0'"
5
5
  type="radio"
6
- :name="name"
6
+ :name="required ? name + '-unselected' : name"
7
7
  value="0"
8
8
  class="mc-stars-input__radio"
9
9
  checked
@@ -18,6 +18,7 @@
18
18
  :name="name"
19
19
  :value="rateId"
20
20
  class="mc-stars-input__radio"
21
+ :required="required"
21
22
  />
22
23
 
23
24
  <label
@@ -74,6 +75,10 @@ export default {
74
75
  );
75
76
  },
76
77
  },
78
+ required: {
79
+ type: Boolean,
80
+ default: false,
81
+ },
77
82
  },
78
83
 
79
84
  data() {
@@ -28,6 +28,11 @@
28
28
  export default {
29
29
  name: 'MSelect',
30
30
 
31
+ model: {
32
+ prop: 'value',
33
+ event: 'change',
34
+ },
35
+
31
36
  props: {
32
37
  id: {
33
38
  type: String,
@@ -4,7 +4,7 @@
4
4
  :class="{ 'is-valid': isValid, 'is-invalid': isInvalid }"
5
5
  :aria-invalid="isInvalid"
6
6
  :value="value"
7
- @change="$emit('input', $event.target.value)"
7
+ @input="$emit('input', $event.target.value)"
8
8
  />
9
9
  </template>
10
10
 
@@ -24,6 +24,7 @@ const supportedTypes = [
24
24
  'password',
25
25
  'tel',
26
26
  'text',
27
+ 'time',
27
28
  'search',
28
29
  ];
29
30