aloha-vue 2.49.0 → 2.49.2

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.
@@ -1,476 +1,483 @@
1
- import {
2
- h,
3
- toRef,
4
- watch,
5
- } from "vue";
6
- import {
7
- AButton,
8
- AErrorsText,
9
- AFormElementBtnClear,
10
- AFormHelpText,
11
- AFormLabelDescription,
12
- AFormReadonly,
13
- AIcon,
14
- ALabel,
15
- UiAPI,
16
- UiClearButtonAPI,
17
- UiDisabledAPI,
18
- UIExcludeRenderAttributesAPI,
19
- UiInputAutofillAPI,
20
- UiStyleHideAPI,
21
- } from "../../index";
22
-
23
- import ClassAPI from "./compositionAPI/ClassAPI";
24
- import ColorAPI from "./compositionAPI/ColorAPI";
25
- import ModelAPI from "./compositionAPI/ModelAPI";
26
- import PasswordAPI from "./compositionAPI/PasswordAPI";
27
- import PlaceholderAPI from "../../ATranslation/compositionAPI/PlaceholderAPI";
28
- import ReadonlyAPI from "./compositionAPI/ReadonlyAPI";
29
- import TypeAPI from "./compositionAPI/TypeAPI";
30
-
31
- import {
32
- isInteger,
33
- uniqueId,
34
- } from "lodash-es";
35
-
36
- export default {
37
- name: "AInput",
38
- inheritAttrs: false,
39
- props: {
40
- alwaysTranslate: {
41
- type: Boolean,
42
- required: false,
43
- },
44
- autocomplete: {
45
- type: String,
46
- required: false,
47
- default: undefined,
48
- },
49
- change: {
50
- type: Function,
51
- required: false,
52
- default: () => {},
53
- },
54
- clearButtonClass: {
55
- type: [String, Object],
56
- required: false,
57
- default: undefined,
58
- },
59
- dependencies: {
60
- type: [Array, Object],
61
- required: false,
62
- default: undefined,
63
- },
64
- disabled: {
65
- type: Boolean,
66
- required: false,
67
- },
68
- errors: {
69
- type: [String, Array],
70
- required: false,
71
- default: undefined,
72
- },
73
- excludeRenderAttributes: {
74
- type: Array,
75
- required: false,
76
- default: () => [],
77
- },
78
- extra: {
79
- type: Object,
80
- required: false,
81
- default: undefined,
82
- },
83
- helpText: {
84
- type: String,
85
- required: false,
86
- default: undefined,
87
- },
88
- htmlId: {
89
- type: String,
90
- required: false,
91
- default: undefined,
92
- },
93
- iconPrepend: {
94
- type: String,
95
- required: false,
96
- default: undefined,
97
- },
98
- id: {
99
- type: [String, Number],
100
- required: false,
101
- default: () => uniqueId("a_input_"),
102
- },
103
- idPrefix: {
104
- type: String,
105
- required: false,
106
- default: undefined,
107
- },
108
- inputAttributes: {
109
- type: Object,
110
- required: false,
111
- default: () => ({}),
112
- },
113
- inputClass: {
114
- type: [String, Object],
115
- required: false,
116
- default: undefined,
117
- },
118
- isClearButton: {
119
- type: Boolean,
120
- required: false,
121
- default: true,
122
- },
123
- isHide: {
124
- type: Boolean,
125
- required: false,
126
- },
127
- isLabelFloat: {
128
- type: Boolean,
129
- required: false,
130
- default: true,
131
- },
132
- isRender: {
133
- type: Boolean,
134
- required: false,
135
- default: true,
136
- },
137
- label: {
138
- type: [String, Number],
139
- required: false,
140
- default: undefined,
141
- },
142
- labelClass: {
143
- type: [String, Object],
144
- required: false,
145
- default: undefined,
146
- },
147
- labelDescription: {
148
- type: String,
149
- required: false,
150
- default: undefined,
151
- },
152
- labelScreenReader: {
153
- type: [String, Number],
154
- required: false,
155
- default: undefined,
156
- },
157
- maxlength: {
158
- type: [String, Number],
159
- required: false,
160
- default: undefined,
161
- },
162
- modelDependencies: {
163
- type: Object,
164
- required: false,
165
- default: () => ({}),
166
- },
167
- modelUndefined: {
168
- type: [String, Number, Object, Array, Boolean],
169
- required: false,
170
- default: "",
171
- },
172
- modelValue: {
173
- type: [String, Number],
174
- required: false,
175
- default: undefined,
176
- },
177
- placeholder: {
178
- type: [String, Number, Object],
179
- required: false,
180
- default: undefined,
181
- },
182
- readonly: {
183
- type: Boolean,
184
- required: false,
185
- },
186
- readonlyDefault: {
187
- type: String,
188
- required: false,
189
- default: "",
190
- },
191
- readonlyPasswordLength: {
192
- type: Number,
193
- required: false,
194
- default: 8,
195
- validator: value => value > 0 && isInteger(value),
196
- },
197
- readonlyPasswordSymbol: {
198
- type: String,
199
- required: false,
200
- default: "*",
201
- },
202
- required: {
203
- type: Boolean,
204
- required: false,
205
- default: false,
206
- },
207
- showPassword: {
208
- type: Boolean,
209
- required: false,
210
- default: true,
211
- },
212
- step: {
213
- type: [String, Number],
214
- required: false,
215
- default: undefined,
216
- },
217
- type: {
218
- type: String,
219
- required: false,
220
- default: "text",
221
- },
222
- },
223
- emits: [
224
- "update:modelValue",
225
- "focus",
226
- "blur",
227
- ],
228
- setup(props, context) {
229
- const type = toRef(props, "type");
230
-
231
- const {
232
- disabledAttribut,
233
- } = UiDisabledAPI(props);
234
-
235
- const {
236
- setTypeLocal,
237
- typeForInput,
238
- } = TypeAPI(props);
239
-
240
-
241
- const {
242
- attributesToExcludeFromRender,
243
- } = UIExcludeRenderAttributesAPI(props);
244
-
245
- const {
246
- componentStyleHide,
247
- } = UiStyleHideAPI(props);
248
-
249
- const {
250
- ariaDescribedbyLocal,
251
- changeModel,
252
- clearModel,
253
- errorsId,
254
- helpTextId,
255
- htmlIdLocal,
256
- isErrors,
257
- isModel,
258
- labelDescriptionId,
259
- onBlur,
260
- onFocus,
261
- } = UiAPI(props, context);
262
-
263
- const {
264
- isClearButtonLocal,
265
- } = UiClearButtonAPI(props, {
266
- isModel,
267
- });
268
-
269
- const {
270
- inputRef,
271
- onInput,
272
- } = ModelAPI(props, {
273
- changeModel,
274
- });
275
-
276
- const {
277
- iconBtnShowPassword,
278
- isBtnShowPasswordVisible,
279
- titleBtnShowPassword,
280
- toggleTypePassword,
281
- } = PasswordAPI(props, {
282
- setTypeLocal,
283
- typeForInput,
284
- });
285
-
286
- const {
287
- isAutofill,
288
- } = UiInputAutofillAPI({ inputRef });
289
-
290
- const {
291
- inputClassBtns,
292
- } = ClassAPI({
293
- isBtnShowPasswordVisible,
294
- isClearButtonLocal,
295
- });
296
-
297
- const {
298
- placeholderAttributes,
299
- } = PlaceholderAPI(props);
300
-
301
- const {
302
- modelValueLocal,
303
- } = ColorAPI(props);
304
-
305
- const {
306
- modelValueReadonly,
307
- } = ReadonlyAPI(props);
308
-
309
- watch(type, () => {
310
- setTypeLocal();
311
- });
312
-
313
- setTypeLocal();
314
-
315
- return {
316
- ariaDescribedbyLocal,
317
- attributesToExcludeFromRender,
318
- clearModel,
319
- componentStyleHide,
320
- disabledAttribut,
321
- errorsId,
322
- helpTextId,
323
- htmlIdLocal,
324
- iconBtnShowPassword,
325
- inputClassBtns,
326
- inputRef,
327
- isAutofill,
328
- isBtnShowPasswordVisible,
329
- isClearButtonLocal,
330
- isErrors,
331
- isModel,
332
- labelDescriptionId,
333
- modelValueLocal,
334
- modelValueReadonly,
335
- onBlur,
336
- onFocus,
337
- onInput,
338
- placeholderAttributes,
339
- titleBtnShowPassword,
340
- toggleTypePassword,
341
- typeForInput,
342
- };
343
- },
344
- render() {
345
- if (!this.isRender) {
346
- return null;
347
- }
348
-
349
- if (this.readonly) {
350
- return h(AFormReadonly, {
351
- ...this.$attrs,
352
- id: this.htmlIdLocal,
353
- alwaysTranslate: this.alwaysTranslate,
354
- excludeRenderAttributes: this.excludeRenderAttributes,
355
- extra: this.extra,
356
- helpText: this.helpText,
357
- label: this.label,
358
- labelClass: this.labelClass,
359
- labelScreenReader: this.labelScreenReader,
360
- modelValue: this.modelValueReadonly,
361
- readonlyDefault: this.readonlyDefault,
362
- required: this.required,
363
- style: this.componentStyleHide,
364
- type: this.type,
365
- });
366
- }
367
-
368
- return h("div", {
369
- ...this.$attrs,
370
- style: this.componentStyleHide,
371
- ...this.attributesToExcludeFromRender,
372
- }, [
373
- h("div", {
374
- class: ["a_form_element__parent", {
375
- a_form_element__parent_float: this.isLabelFloat,
376
- a_form_element__parent_not_empty: this.isModel || this.isAutofill,
377
- a_form_element__parent_float_has_icon_prepend: this.iconPrepend,
378
- }],
379
- }, [
380
- (this.label || this.labelScreenReader) ?
381
- h(ALabel, {
382
- id: this.htmlIdLocal,
383
- alwaysTranslate: this.alwaysTranslate,
384
- extra: this.extra,
385
- isError: this.isErrors,
386
- isLabelFloat: this.isLabelFloat,
387
- label: this.label,
388
- labelClass: this.labelClass,
389
- labelScreenReader: this.labelScreenReader,
390
- required: this.required,
391
- type: this.type,
392
- }) :
393
- "",
394
- h(AFormLabelDescription, {
395
- id: this.labelDescriptionId,
396
- alwaysTranslate: this.alwaysTranslate,
397
- html: this.labelDescription,
398
- extra: this.extra,
399
- isLabelFloat: this.isLabelFloat,
400
- }),
401
- h("div", {
402
- class: "a_form_element",
403
- }, [
404
- this.iconPrepend && h(AIcon, {
405
- icon: this.iconPrepend,
406
- class: "a_input__icon_prepend",
407
- }),
408
- h("input", {
409
- ref: "inputRef",
410
- id: this.htmlIdLocal,
411
- key: `${ this.htmlIdLocal }_${ this.typeForInput }`,
412
- autocomplete: this.autocomplete,
413
- value: this.modelValueLocal,
414
- type: this.typeForInput,
415
- class: [
416
- "a_form_control a_input",
417
- this.inputClass,
418
- this.inputClassBtns,
419
- {
420
- a_form_control_invalid: this.isErrors,
421
- },
422
- ],
423
- disabled: this.disabledAttribut,
424
- ariaRequired: this.required,
425
- ariaInvalid: this.isErrors,
426
- "aria-describedby": this.ariaDescribedbyLocal,
427
- maxlength: this.maxlength,
428
- step: this.step,
429
- ...this.placeholderAttributes,
430
- ...this.inputAttributes,
431
- onInput: this.onInput,
432
- onFocus: this.onFocus,
433
- onBlur: this.onBlur,
434
- }),
435
- (this.isBtnShowPasswordVisible || this.isClearButtonLocal) ?
436
- h("div", {
437
- class: "a_form_control__actions",
438
- }, [
439
- this.isBtnShowPasswordVisible ?
440
- h(AButton, {
441
- alwaysTranslate: this.alwaysTranslate,
442
- class: "a_btn a_btn_transparent_dark a_btn_small a_form_control__actions__btn",
443
- iconLeft: this.iconBtnShowPassword,
444
- type: "button",
445
- title: this.titleBtnShowPassword,
446
- textScreenReader: this.titleBtnShowPassword,
447
- disabled: this.disabled,
448
- onClick: this.toggleTypePassword,
449
- }) :
450
- "",
451
- this.isClearButtonLocal ?
452
- h(AFormElementBtnClear, {
453
- alwaysTranslate: this.alwaysTranslate,
454
- disabled: this.disabled,
455
- class: this.clearButtonClass,
456
- onClear: this.clearModel,
457
- }) :
458
- "",
459
- ]) :
460
- "",
461
- ]),
462
- h(AFormHelpText, {
463
- id: this.helpTextId,
464
- alwaysTranslate: this.alwaysTranslate,
465
- html: this.helpText,
466
- extra: this.extra,
467
- }),
468
- this.isErrors && h(AErrorsText, {
469
- id: this.errorsId,
470
- alwaysTranslate: this.alwaysTranslate,
471
- errors: this.errors,
472
- }),
473
- ]),
474
- ]);
475
- },
476
- };
1
+ import {
2
+ h,
3
+ toRef,
4
+ watch,
5
+ } from "vue";
6
+ import {
7
+ AButton,
8
+ AErrorsText,
9
+ AFormElementBtnClear,
10
+ AFormHelpText,
11
+ AFormLabelDescription,
12
+ AFormReadonly,
13
+ AIcon,
14
+ ALabel,
15
+ UiAPI,
16
+ UiClearButtonAPI,
17
+ UiDisabledAPI,
18
+ UIExcludeRenderAttributesAPI,
19
+ UiInputAutofillAPI,
20
+ UiStyleHideAPI,
21
+ } from "../../index";
22
+
23
+ import ClassAPI from "./compositionAPI/ClassAPI";
24
+ import ColorAPI from "./compositionAPI/ColorAPI";
25
+ import FocusAPI from "./compositionAPI/FocusAPI";
26
+ import ModelAPI from "./compositionAPI/ModelAPI";
27
+ import PasswordAPI from "./compositionAPI/PasswordAPI";
28
+ import PlaceholderAPI from "../../ATranslation/compositionAPI/PlaceholderAPI";
29
+ import ReadonlyAPI from "./compositionAPI/ReadonlyAPI";
30
+ import TypeAPI from "./compositionAPI/TypeAPI";
31
+
32
+ import {
33
+ isInteger,
34
+ uniqueId,
35
+ } from "lodash-es";
36
+
37
+ export default {
38
+ name: "AInput",
39
+ inheritAttrs: false,
40
+ props: {
41
+ alwaysTranslate: {
42
+ type: Boolean,
43
+ required: false,
44
+ },
45
+ autocomplete: {
46
+ type: String,
47
+ required: false,
48
+ default: undefined,
49
+ },
50
+ change: {
51
+ type: Function,
52
+ required: false,
53
+ default: () => {},
54
+ },
55
+ clearButtonClass: {
56
+ type: [String, Object],
57
+ required: false,
58
+ default: undefined,
59
+ },
60
+ dependencies: {
61
+ type: [Array, Object],
62
+ required: false,
63
+ default: undefined,
64
+ },
65
+ disabled: {
66
+ type: Boolean,
67
+ required: false,
68
+ },
69
+ errors: {
70
+ type: [String, Array],
71
+ required: false,
72
+ default: undefined,
73
+ },
74
+ excludeRenderAttributes: {
75
+ type: Array,
76
+ required: false,
77
+ default: () => [],
78
+ },
79
+ extra: {
80
+ type: Object,
81
+ required: false,
82
+ default: undefined,
83
+ },
84
+ helpText: {
85
+ type: String,
86
+ required: false,
87
+ default: undefined,
88
+ },
89
+ htmlId: {
90
+ type: String,
91
+ required: false,
92
+ default: undefined,
93
+ },
94
+ iconPrepend: {
95
+ type: String,
96
+ required: false,
97
+ default: undefined,
98
+ },
99
+ id: {
100
+ type: [String, Number],
101
+ required: false,
102
+ default: () => uniqueId("a_input_"),
103
+ },
104
+ idPrefix: {
105
+ type: String,
106
+ required: false,
107
+ default: undefined,
108
+ },
109
+ inputAttributes: {
110
+ type: Object,
111
+ required: false,
112
+ default: () => ({}),
113
+ },
114
+ inputClass: {
115
+ type: [String, Object],
116
+ required: false,
117
+ default: undefined,
118
+ },
119
+ isClearButton: {
120
+ type: Boolean,
121
+ required: false,
122
+ default: true,
123
+ },
124
+ isHide: {
125
+ type: Boolean,
126
+ required: false,
127
+ },
128
+ isLabelFloat: {
129
+ type: Boolean,
130
+ required: false,
131
+ default: true,
132
+ },
133
+ isRender: {
134
+ type: Boolean,
135
+ required: false,
136
+ default: true,
137
+ },
138
+ label: {
139
+ type: [String, Number],
140
+ required: false,
141
+ default: undefined,
142
+ },
143
+ labelClass: {
144
+ type: [String, Object],
145
+ required: false,
146
+ default: undefined,
147
+ },
148
+ labelDescription: {
149
+ type: String,
150
+ required: false,
151
+ default: undefined,
152
+ },
153
+ labelScreenReader: {
154
+ type: [String, Number],
155
+ required: false,
156
+ default: undefined,
157
+ },
158
+ maxlength: {
159
+ type: [String, Number],
160
+ required: false,
161
+ default: undefined,
162
+ },
163
+ modelDependencies: {
164
+ type: Object,
165
+ required: false,
166
+ default: () => ({}),
167
+ },
168
+ modelUndefined: {
169
+ type: [String, Number, Object, Array, Boolean],
170
+ required: false,
171
+ default: "",
172
+ },
173
+ modelValue: {
174
+ type: [String, Number],
175
+ required: false,
176
+ default: undefined,
177
+ },
178
+ placeholder: {
179
+ type: [String, Number, Object],
180
+ required: false,
181
+ default: undefined,
182
+ },
183
+ readonly: {
184
+ type: Boolean,
185
+ required: false,
186
+ },
187
+ readonlyDefault: {
188
+ type: String,
189
+ required: false,
190
+ default: "",
191
+ },
192
+ readonlyPasswordLength: {
193
+ type: Number,
194
+ required: false,
195
+ default: 8,
196
+ validator: value => value > 0 && isInteger(value),
197
+ },
198
+ readonlyPasswordSymbol: {
199
+ type: String,
200
+ required: false,
201
+ default: "*",
202
+ },
203
+ required: {
204
+ type: Boolean,
205
+ required: false,
206
+ default: false,
207
+ },
208
+ showPassword: {
209
+ type: Boolean,
210
+ required: false,
211
+ default: true,
212
+ },
213
+ step: {
214
+ type: [String, Number],
215
+ required: false,
216
+ default: undefined,
217
+ },
218
+ type: {
219
+ type: String,
220
+ required: false,
221
+ default: "text",
222
+ },
223
+ },
224
+ emits: [
225
+ "update:modelValue",
226
+ "focus",
227
+ "blur",
228
+ ],
229
+ setup(props, context) {
230
+ const type = toRef(props, "type");
231
+
232
+ const {
233
+ disabledAttribut,
234
+ } = UiDisabledAPI(props);
235
+
236
+ const {
237
+ setTypeLocal,
238
+ typeForInput,
239
+ } = TypeAPI(props);
240
+
241
+ const {
242
+ attributesToExcludeFromRender,
243
+ } = UIExcludeRenderAttributesAPI(props);
244
+
245
+ const {
246
+ componentStyleHide,
247
+ } = UiStyleHideAPI(props);
248
+
249
+ const {
250
+ inputRef,
251
+ setFocusToInput,
252
+ } = FocusAPI();
253
+
254
+ const {
255
+ ariaDescribedbyLocal,
256
+ changeModel,
257
+ clearModel,
258
+ errorsId,
259
+ helpTextId,
260
+ htmlIdLocal,
261
+ isErrors,
262
+ isModel,
263
+ labelDescriptionId,
264
+ onBlur,
265
+ onFocus,
266
+ } = UiAPI(props, context, {
267
+ setFocus: setFocusToInput,
268
+ });
269
+
270
+ const {
271
+ isClearButtonLocal,
272
+ } = UiClearButtonAPI(props, {
273
+ isModel,
274
+ });
275
+
276
+ const {
277
+ onInput,
278
+ } = ModelAPI(props, {
279
+ changeModel,
280
+ inputRef,
281
+ });
282
+
283
+ const {
284
+ iconBtnShowPassword,
285
+ isBtnShowPasswordVisible,
286
+ titleBtnShowPassword,
287
+ toggleTypePassword,
288
+ } = PasswordAPI(props, {
289
+ setTypeLocal,
290
+ typeForInput,
291
+ });
292
+
293
+ const {
294
+ isAutofill,
295
+ } = UiInputAutofillAPI({ inputRef });
296
+
297
+ const {
298
+ inputClassBtns,
299
+ } = ClassAPI({
300
+ isBtnShowPasswordVisible,
301
+ isClearButtonLocal,
302
+ });
303
+
304
+ const {
305
+ placeholderAttributes,
306
+ } = PlaceholderAPI(props);
307
+
308
+ const {
309
+ modelValueLocal,
310
+ } = ColorAPI(props);
311
+
312
+ const {
313
+ modelValueReadonly,
314
+ } = ReadonlyAPI(props);
315
+
316
+ watch(type, () => {
317
+ setTypeLocal();
318
+ });
319
+
320
+ setTypeLocal();
321
+
322
+ return {
323
+ ariaDescribedbyLocal,
324
+ attributesToExcludeFromRender,
325
+ clearModel,
326
+ componentStyleHide,
327
+ disabledAttribut,
328
+ errorsId,
329
+ helpTextId,
330
+ htmlIdLocal,
331
+ iconBtnShowPassword,
332
+ inputClassBtns,
333
+ inputRef,
334
+ isAutofill,
335
+ isBtnShowPasswordVisible,
336
+ isClearButtonLocal,
337
+ isErrors,
338
+ isModel,
339
+ labelDescriptionId,
340
+ modelValueLocal,
341
+ modelValueReadonly,
342
+ onBlur,
343
+ onFocus,
344
+ onInput,
345
+ placeholderAttributes,
346
+ titleBtnShowPassword,
347
+ toggleTypePassword,
348
+ typeForInput,
349
+ };
350
+ },
351
+ render() {
352
+ if (!this.isRender) {
353
+ return null;
354
+ }
355
+
356
+ if (this.readonly) {
357
+ return h(AFormReadonly, {
358
+ ...this.$attrs,
359
+ id: this.htmlIdLocal,
360
+ alwaysTranslate: this.alwaysTranslate,
361
+ excludeRenderAttributes: this.excludeRenderAttributes,
362
+ extra: this.extra,
363
+ helpText: this.helpText,
364
+ label: this.label,
365
+ labelClass: this.labelClass,
366
+ labelScreenReader: this.labelScreenReader,
367
+ modelValue: this.modelValueReadonly,
368
+ readonlyDefault: this.readonlyDefault,
369
+ required: this.required,
370
+ style: this.componentStyleHide,
371
+ type: this.type,
372
+ });
373
+ }
374
+
375
+ return h("div", {
376
+ ...this.$attrs,
377
+ style: this.componentStyleHide,
378
+ ...this.attributesToExcludeFromRender,
379
+ }, [
380
+ h("div", {
381
+ class: ["a_form_element__parent", {
382
+ a_form_element__parent_float: this.isLabelFloat,
383
+ a_form_element__parent_not_empty: this.isModel || this.isAutofill,
384
+ a_form_element__parent_float_has_icon_prepend: this.iconPrepend,
385
+ }],
386
+ }, [
387
+ (this.label || this.labelScreenReader) ?
388
+ h(ALabel, {
389
+ id: this.htmlIdLocal,
390
+ alwaysTranslate: this.alwaysTranslate,
391
+ extra: this.extra,
392
+ isError: this.isErrors,
393
+ isLabelFloat: this.isLabelFloat,
394
+ label: this.label,
395
+ labelClass: this.labelClass,
396
+ labelScreenReader: this.labelScreenReader,
397
+ required: this.required,
398
+ type: this.type,
399
+ }) :
400
+ "",
401
+ h(AFormLabelDescription, {
402
+ id: this.labelDescriptionId,
403
+ alwaysTranslate: this.alwaysTranslate,
404
+ html: this.labelDescription,
405
+ extra: this.extra,
406
+ isLabelFloat: this.isLabelFloat,
407
+ }),
408
+ h("div", {
409
+ class: "a_form_element",
410
+ }, [
411
+ this.iconPrepend && h(AIcon, {
412
+ icon: this.iconPrepend,
413
+ class: "a_input__icon_prepend",
414
+ }),
415
+ h("input", {
416
+ ref: "inputRef",
417
+ id: this.htmlIdLocal,
418
+ key: `${ this.htmlIdLocal }_${ this.typeForInput }`,
419
+ autocomplete: this.autocomplete,
420
+ value: this.modelValueLocal,
421
+ type: this.typeForInput,
422
+ class: [
423
+ "a_form_control a_input",
424
+ this.inputClass,
425
+ this.inputClassBtns,
426
+ {
427
+ a_form_control_invalid: this.isErrors,
428
+ },
429
+ ],
430
+ disabled: this.disabledAttribut,
431
+ ariaRequired: this.required,
432
+ ariaInvalid: this.isErrors,
433
+ "aria-describedby": this.ariaDescribedbyLocal,
434
+ maxlength: this.maxlength,
435
+ step: this.step,
436
+ ...this.placeholderAttributes,
437
+ ...this.inputAttributes,
438
+ onInput: this.onInput,
439
+ onFocus: this.onFocus,
440
+ onBlur: this.onBlur,
441
+ }),
442
+ (this.isBtnShowPasswordVisible || this.isClearButtonLocal) ?
443
+ h("div", {
444
+ class: "a_form_control__actions",
445
+ }, [
446
+ this.isBtnShowPasswordVisible ?
447
+ h(AButton, {
448
+ alwaysTranslate: this.alwaysTranslate,
449
+ class: "a_btn a_btn_transparent_dark a_btn_small a_form_control__actions__btn",
450
+ iconLeft: this.iconBtnShowPassword,
451
+ type: "button",
452
+ title: this.titleBtnShowPassword,
453
+ textScreenReader: this.titleBtnShowPassword,
454
+ disabled: this.disabled,
455
+ onClick: this.toggleTypePassword,
456
+ }) :
457
+ "",
458
+ this.isClearButtonLocal ?
459
+ h(AFormElementBtnClear, {
460
+ alwaysTranslate: this.alwaysTranslate,
461
+ disabled: this.disabled,
462
+ class: this.clearButtonClass,
463
+ onClear: this.clearModel,
464
+ }) :
465
+ "",
466
+ ]) :
467
+ "",
468
+ ]),
469
+ h(AFormHelpText, {
470
+ id: this.helpTextId,
471
+ alwaysTranslate: this.alwaysTranslate,
472
+ html: this.helpText,
473
+ extra: this.extra,
474
+ }),
475
+ this.isErrors && h(AErrorsText, {
476
+ id: this.errorsId,
477
+ alwaysTranslate: this.alwaysTranslate,
478
+ errors: this.errors,
479
+ }),
480
+ ]),
481
+ ]);
482
+ },
483
+ };