wave-ui 3.4.7 → 3.5.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": "wave-ui",
3
- "version": "3.4.7",
3
+ "version": "3.5.0",
4
4
  "description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -2,7 +2,7 @@
2
2
  component(
3
3
  ref="formEl"
4
4
  :is="formRegister && !wCheckboxes ? 'w-form-element' : 'div'"
5
- v-bind="formRegister && { validators, inputValue: isChecked, disabled: isDisabled }"
5
+ v-bind="formRegister && { validators, inputValue: isChecked, disabled: isDisabled, readonly: isReadonly }"
6
6
  v-model:valid="valid"
7
7
  @reset="$emit('update:modelValue', isChecked = null);$emit('input', null)"
8
8
  :class="classes")
@@ -12,12 +12,12 @@ component(
12
12
  type="checkbox"
13
13
  :name="inputName"
14
14
  :checked="isChecked || null"
15
- :disabled="isDisabled || null"
15
+ :disabled="isDisabled || isReadonly || null"
16
16
  :required="required || null"
17
17
  :tabindex="tabindex || null"
18
18
  @focus="$emit('focus', $event)"
19
19
  @blur="$emit('blur', $event)"
20
- @change="onInput() /* Edge doesn't fire input on checkbox/radio/select change */"
20
+ @change="onInput() /* Edge doesn't emit an `input` event on checkbox/radio/select change */"
21
21
  @keypress.enter="onInput"
22
22
  :aria-checked="isChecked || 'false'"
23
23
  role="checkbox")
@@ -98,6 +98,7 @@ export default {
98
98
  return {
99
99
  [`w-checkbox w-checkbox--${this.isChecked ? 'checked' : 'unchecked'}`]: true,
100
100
  'w-checkbox--disabled': this.isDisabled,
101
+ 'w-checkbox--readonly': this.isReadonly,
101
102
  'w-checkbox--indeterminate': this.indeterminate,
102
103
  'w-checkbox--ripple': this.ripple.start,
103
104
  'w-checkbox--rippled': this.ripple.end,
@@ -202,6 +203,7 @@ $inactive-color: #666;
202
203
  .w-checkbox--indeterminate & {opacity: 0;}
203
204
  .w-checkbox--disabled & {stroke: rgba(var(--w-contrast-color-rgb), 0.4);}
204
205
  }
206
+
205
207
  &__input:after {
206
208
  content: '';
207
209
  position: absolute;
@@ -252,7 +254,7 @@ $inactive-color: #666;
252
254
  }
253
255
 
254
256
  :focus ~ &__input:before,
255
- :active ~ &__input:before {
257
+ &:not(.w-checkbox--disabled) :active ~ &__input:before {
256
258
  transform: scale(1.8);
257
259
  opacity: 0.2;
258
260
  }
@@ -2,7 +2,7 @@
2
2
  component(
3
3
  ref="formEl"
4
4
  :is="formRegister && !wRadios ? 'w-form-element' : 'div'"
5
- v-bind="formRegister && { validators, inputValue, disabled: isDisabled }"
5
+ v-bind="formRegister && { validators, inputValue, disabled: isDisabled, readonly: isReadonly }"
6
6
  v-model:valid="valid"
7
7
  @reset="$emit('update:modelValue', inputValue = null);$emit('input', null)"
8
8
  :class="classes")
@@ -12,11 +12,11 @@ component(
12
12
  type="radio"
13
13
  :name="inputName"
14
14
  :checked="inputValue || null"
15
- :disabled="isDisabled || null"
15
+ :disabled="isDisabled || isReadonly || null"
16
16
  :required="required || null"
17
17
  :tabindex="tabindex || null"
18
18
  @focus="$emit('focus', $event)"
19
- @change="onInput($event) /* Edge doesn't fire input on checkbox/radio/select change */"
19
+ @change="onInput($event) /* Edge doesn't emit an `input` event on checkbox/radio/select change */"
20
20
  :aria-checked="inputValue || 'false'"
21
21
  role="radio")
22
22
  template(v-if="hasLabel && labelOnLeft")
@@ -89,6 +89,7 @@ export default {
89
89
  return {
90
90
  [`w-radio w-radio--${this.inputValue ? 'checked' : 'unchecked'}`]: true,
91
91
  'w-radio--disabled': this.isDisabled,
92
+ 'w-radio--readonly': this.isReadonly,
92
93
  'w-radio--ripple': this.ripple.start,
93
94
  'w-radio--rippled': this.ripple.end,
94
95
  'w-radio--dark': this.ripple.dark,