@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/dist/index.js +7 -3
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Form/Input/Input.vue +5 -1
package/package.json
CHANGED
|
@@ -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.
|
|
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) {
|