wave-ui 1.67.4 → 1.68.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": "1.67.4",
3
+ "version": "1.68.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
  :valid.sync="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")
@@ -93,6 +93,7 @@ export default {
93
93
  return {
94
94
  [`w-checkbox w-checkbox--${this.isChecked ? 'checked' : 'unchecked'}`]: true,
95
95
  'w-checkbox--disabled': this.isDisabled,
96
+ 'w-checkbox--readonly': this.isReadonly,
96
97
  'w-checkbox--indeterminate': this.indeterminate,
97
98
  'w-checkbox--ripple': this.ripple.start,
98
99
  'w-checkbox--rippled': this.ripple.end,
@@ -192,6 +193,7 @@ $inactive-color: #666;
192
193
 
193
194
  .w-checkbox--indeterminate & {opacity: 0;}
194
195
  }
196
+
195
197
  &__input:after {
196
198
  content: '';
197
199
  position: absolute;
@@ -242,7 +244,7 @@ $inactive-color: #666;
242
244
  }
243
245
 
244
246
  :focus ~ &__input:before,
245
- :active ~ &__input:before {
247
+ &:not(.w-checkbox--disabled) :active ~ &__input:before {
246
248
  transform: scale(1.8);
247
249
  opacity: 0.2;
248
250
  }
@@ -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
  :valid.sync="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")
@@ -87,6 +87,7 @@ export default {
87
87
  return {
88
88
  [`w-radio w-radio--${this.inputValue ? 'checked' : 'unchecked'}`]: true,
89
89
  'w-radio--disabled': this.isDisabled,
90
+ 'w-radio--readonly': this.isReadonly,
90
91
  'w-radio--ripple': this.ripple.start,
91
92
  'w-radio--rippled': this.ripple.end
92
93
  }