@avakhula/ui 0.0.178 → 0.0.179

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": "@avakhula/ui",
3
- "version": "0.0.178",
3
+ "version": "0.0.179",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -9,6 +9,7 @@
9
9
  v-bind="attrs"
10
10
  v-model="actualValue"
11
11
  ref="field"
12
+ :aria-invalid="hasErrorState ? true : false"
12
13
  :readonly="readonly"
13
14
  :disabled="disabled"
14
15
  :id="id"
@@ -217,7 +218,7 @@ export default {
217
218
  classes() {
218
219
  const classList = ["ib-input"];
219
220
 
220
- if (this.error || this.errorMessage.length) {
221
+ if (this.hasErrorState) {
221
222
  classList.push("ib-error");
222
223
  }
223
224
 
@@ -238,6 +239,9 @@ export default {
238
239
  : this.type;
239
240
  return attrs;
240
241
  },
242
+ hasErrorState() {
243
+ return this.error || this.errorMessage.length;
244
+ },
241
245
  },
242
246
  watch: {
243
247
  value(newVal) {