@vaadin/vaadin-text-field 22.0.0-alpha6 → 22.0.0-beta1
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 +28 -33
- package/src/vaadin-email-field.d.ts +12 -0
- package/src/vaadin-email-field.js +7 -0
- package/src/vaadin-integer-field.d.ts +12 -0
- package/src/vaadin-integer-field.js +7 -0
- package/src/vaadin-number-field.d.ts +12 -0
- package/src/vaadin-number-field.js +7 -0
- package/src/vaadin-password-field.d.ts +12 -0
- package/src/vaadin-password-field.js +7 -0
- package/src/vaadin-text-area.d.ts +12 -0
- package/src/vaadin-text-area.js +7 -0
- package/src/vaadin-text-field.d.ts +13 -98
- package/src/vaadin-text-field.js +4 -131
- package/theme/lumo/vaadin-text-field.js +6 -2
- package/theme/material/vaadin-text-field.js +6 -2
- package/vaadin-text-field.d.ts +0 -1
- package/src/interfaces.d.ts +0 -21
- package/src/vaadin-text-field-mixin.d.ts +0 -174
- package/src/vaadin-text-field-mixin.js +0 -874
- package/theme/lumo/vaadin-text-field-styles.js +0 -353
- package/theme/material/vaadin-text-field-styles.js +0 -219
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { TextFieldAutoCorrect, TextFieldAutoCapitalize } from './interfaces';
|
|
2
|
-
|
|
3
|
-
declare function TextFieldMixin<T extends new (...args: any[]) => {}>(base: T): T & TextFieldMixinConstructor;
|
|
4
|
-
|
|
5
|
-
interface TextFieldMixinConstructor {
|
|
6
|
-
new (...args: any[]): TextFieldMixin;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface TextFieldMixin {
|
|
10
|
-
readonly focusElement: HTMLElement | null | undefined;
|
|
11
|
-
|
|
12
|
-
readonly inputElement: HTMLElement | null | undefined;
|
|
13
|
-
|
|
14
|
-
readonly _slottedTagName: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Whether the value of the control can be automatically completed by the browser.
|
|
18
|
-
* List of available options at:
|
|
19
|
-
* https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete
|
|
20
|
-
*/
|
|
21
|
-
autocomplete: string | null | undefined;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* This is a property supported by Safari that is used to control whether
|
|
25
|
-
* autocorrection should be enabled when the user is entering/editing the text.
|
|
26
|
-
* Possible values are:
|
|
27
|
-
* on: Enable autocorrection.
|
|
28
|
-
* off: Disable autocorrection.
|
|
29
|
-
*/
|
|
30
|
-
autocorrect: TextFieldAutoCorrect | undefined;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* This is a property supported by Safari and Chrome that is used to control whether
|
|
34
|
-
* autocapitalization should be enabled when the user is entering/editing the text.
|
|
35
|
-
* Possible values are:
|
|
36
|
-
* characters: Characters capitalization.
|
|
37
|
-
* words: Words capitalization.
|
|
38
|
-
* sentences: Sentences capitalization.
|
|
39
|
-
* none: No capitalization.
|
|
40
|
-
*/
|
|
41
|
-
autocapitalize: TextFieldAutoCapitalize | undefined;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Specify that the value should be automatically selected when the field gains focus.
|
|
45
|
-
*/
|
|
46
|
-
autoselect: boolean;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Set to true to display the clear icon which clears the input.
|
|
50
|
-
* @attr {boolean} clear-button-visible
|
|
51
|
-
*/
|
|
52
|
-
clearButtonVisible: boolean;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Error to show when the input value is invalid.
|
|
56
|
-
* @attr {string} error-message
|
|
57
|
-
*/
|
|
58
|
-
errorMessage: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Object with translated strings used for localization. Has
|
|
62
|
-
* the following structure and default values:
|
|
63
|
-
*
|
|
64
|
-
* ```
|
|
65
|
-
* {
|
|
66
|
-
* // Translation of the clear icon button accessible label
|
|
67
|
-
* clear: 'Clear'
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
i18n: { clear: string };
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* String used for the label element.
|
|
75
|
-
*/
|
|
76
|
-
label: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* String used for the helper text.
|
|
80
|
-
* @attr {string} helper-text
|
|
81
|
-
*/
|
|
82
|
-
helperText: string | null;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Maximum number of characters (in Unicode code points) that the user can enter.
|
|
86
|
-
*/
|
|
87
|
-
maxlength: number | null | undefined;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Minimum number of characters (in Unicode code points) that the user can enter.
|
|
91
|
-
*/
|
|
92
|
-
minlength: number | null | undefined;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* The name of the control, which is submitted with the form data.
|
|
96
|
-
*/
|
|
97
|
-
name: string | null | undefined;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* A hint to the user of what can be entered in the control.
|
|
101
|
-
*/
|
|
102
|
-
placeholder: string | null | undefined;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* This attribute indicates that the user cannot modify the value of the control.
|
|
106
|
-
*/
|
|
107
|
-
readonly: boolean | null | undefined;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Specifies that the user must fill in a value.
|
|
111
|
-
*/
|
|
112
|
-
required: boolean | null | undefined;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The initial value of the control.
|
|
116
|
-
* It can be used for two-way data binding.
|
|
117
|
-
*/
|
|
118
|
-
value: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* This property is set to true when the control value is invalid.
|
|
122
|
-
*/
|
|
123
|
-
invalid: boolean;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* When set to true, user is prevented from typing a value that
|
|
127
|
-
* conflicts with the given `pattern`.
|
|
128
|
-
* @attr {boolean} prevent-invalid-input
|
|
129
|
-
*/
|
|
130
|
-
preventInvalidInput: boolean | null | undefined;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* A pattern matched against individual characters the user inputs.
|
|
134
|
-
* When set, the field will prevent:
|
|
135
|
-
* - `keyDown` events if the entered key doesn't match `/^_enabledCharPattern$/`
|
|
136
|
-
* - `paste` events if the pasted text doesn't match `/^_enabledCharPattern*$/`
|
|
137
|
-
* - `drop` events if the dropped text doesn't match `/^_enabledCharPattern*$/`
|
|
138
|
-
*
|
|
139
|
-
* For example, to enable entering only numbers and minus signs,
|
|
140
|
-
* `_enabledCharPattern = "[\\d-]"`
|
|
141
|
-
*/
|
|
142
|
-
_enabledCharPattern: string | null | undefined;
|
|
143
|
-
|
|
144
|
-
_createConstraintsObserver(): void;
|
|
145
|
-
|
|
146
|
-
_onChange(e: Event): void;
|
|
147
|
-
|
|
148
|
-
_valueChanged(newVal: unknown | null, oldVal: unknown | null): void;
|
|
149
|
-
|
|
150
|
-
_constraintsChanged(
|
|
151
|
-
required: boolean | undefined,
|
|
152
|
-
minlength: number | undefined,
|
|
153
|
-
maxlength: string | undefined,
|
|
154
|
-
pattern: any
|
|
155
|
-
): void;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Returns true if the current input value satisfies all constraints (if any)
|
|
159
|
-
*/
|
|
160
|
-
checkValidity(): boolean;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Returns true if `value` is valid.
|
|
164
|
-
*
|
|
165
|
-
* @returns True if the value is valid.
|
|
166
|
-
*/
|
|
167
|
-
validate(): boolean;
|
|
168
|
-
|
|
169
|
-
clear(): void;
|
|
170
|
-
|
|
171
|
-
_onKeyDown(e: KeyboardEvent): void;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export { TextFieldMixin, TextFieldMixinConstructor };
|