@avakhula/ui 0.0.178 → 0.0.181
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
|
@@ -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) {
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
role="combobox"
|
|
21
21
|
tabindex="0"
|
|
22
22
|
class="tree-choice"
|
|
23
|
+
ref="combobox"
|
|
23
24
|
@click.prevent
|
|
24
|
-
@blur="
|
|
25
|
+
@blur="onBlur"
|
|
25
26
|
:aria-label="ariaLabel"
|
|
26
27
|
:aria-expanded="isOpened"
|
|
27
28
|
:class="{
|
|
@@ -468,6 +469,12 @@ export default {
|
|
|
468
469
|
this.setPreparedValues();
|
|
469
470
|
});
|
|
470
471
|
|
|
472
|
+
document
|
|
473
|
+
.querySelectorAll(`[name="${this.actualName}"]`)
|
|
474
|
+
.forEach((input) => {
|
|
475
|
+
input.addEventListener("focus", this.$refs.combobox.focus());
|
|
476
|
+
});
|
|
477
|
+
|
|
471
478
|
document.addEventListener("mousemove", this.onResize);
|
|
472
479
|
document.addEventListener("mouseup", this.endResizing);
|
|
473
480
|
},
|
|
@@ -543,6 +550,11 @@ export default {
|
|
|
543
550
|
};
|
|
544
551
|
},
|
|
545
552
|
methods: {
|
|
553
|
+
onBlur() {
|
|
554
|
+
if (!this.isOpened) {
|
|
555
|
+
this.$emit("blur");
|
|
556
|
+
}
|
|
557
|
+
},
|
|
546
558
|
startResizing(prop) {
|
|
547
559
|
this.resizingProp = prop;
|
|
548
560
|
},
|