@vaadin/text-area 23.2.0-dev.8a7678b70 → 23.3.0-alpha1
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/README.md +3 -3
- package/package.json +15 -9
- package/src/vaadin-text-area.d.ts +11 -3
- package/src/vaadin-text-area.js +9 -1
- package/web-types.json +539 -0
- package/web-types.lit.json +216 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An input field component for multi-line text input.
|
|
4
4
|
|
|
5
|
-
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/
|
|
5
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/text-area)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/text-area)
|
|
8
8
|
[](https://discord.gg/PHmkCKC)
|
|
@@ -27,7 +27,7 @@ import '@vaadin/text-area';
|
|
|
27
27
|
|
|
28
28
|
## Themes
|
|
29
29
|
|
|
30
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/
|
|
30
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
31
31
|
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/text-area/vaadin-text-area.js) of the package uses Lumo theme.
|
|
32
32
|
|
|
33
33
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
@@ -50,7 +50,7 @@ import '@vaadin/text-area/src/vaadin-text-area.js';
|
|
|
50
50
|
|
|
51
51
|
## Contributing
|
|
52
52
|
|
|
53
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/
|
|
53
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
54
54
|
|
|
55
55
|
## License
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-area",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"src",
|
|
24
24
|
"theme",
|
|
25
25
|
"vaadin-*.d.ts",
|
|
26
|
-
"vaadin-*.js"
|
|
26
|
+
"vaadin-*.js",
|
|
27
|
+
"web-types.json",
|
|
28
|
+
"web-types.lit.json"
|
|
27
29
|
],
|
|
28
30
|
"keywords": [
|
|
29
31
|
"Vaadin",
|
|
@@ -33,17 +35,21 @@
|
|
|
33
35
|
],
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"@polymer/polymer": "^3.0.0",
|
|
36
|
-
"@vaadin/component-base": "23.
|
|
37
|
-
"@vaadin/field-base": "23.
|
|
38
|
-
"@vaadin/input-container": "23.
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.
|
|
38
|
+
"@vaadin/component-base": "23.3.0-alpha1",
|
|
39
|
+
"@vaadin/field-base": "23.3.0-alpha1",
|
|
40
|
+
"@vaadin/input-container": "23.3.0-alpha1",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha1",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha1"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
48
|
"sinon": "^13.0.2"
|
|
47
49
|
},
|
|
48
|
-
"
|
|
50
|
+
"web-types": [
|
|
51
|
+
"web-types.json",
|
|
52
|
+
"web-types.lit.json"
|
|
53
|
+
],
|
|
54
|
+
"gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
|
|
49
55
|
}
|
|
@@ -26,10 +26,17 @@ export type TextAreaInvalidChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
26
26
|
*/
|
|
27
27
|
export type TextAreaValueChangedEvent = CustomEvent<{ value: string }>;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Fired whenever the field is validated.
|
|
31
|
+
*/
|
|
32
|
+
export type TextAreaValidatedEvent = CustomEvent<{ valid: boolean }>;
|
|
33
|
+
|
|
29
34
|
export interface TextAreaCustomEventMap {
|
|
30
35
|
'invalid-changed': TextAreaInvalidChangedEvent;
|
|
31
36
|
|
|
32
37
|
'value-changed': TextAreaValueChangedEvent;
|
|
38
|
+
|
|
39
|
+
validated: TextAreaValidatedEvent;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
export interface TextAreaEventMap extends HTMLElementEventMap, TextAreaCustomEventMap {
|
|
@@ -70,12 +77,13 @@ export interface TextAreaEventMap extends HTMLElementEventMap, TextAreaCustomEve
|
|
|
70
77
|
* `<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
71
78
|
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
|
|
72
79
|
*
|
|
73
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
80
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
74
81
|
*
|
|
75
82
|
* @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.
|
|
76
83
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
77
84
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
78
85
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
86
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
79
87
|
*/
|
|
80
88
|
declare class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableMixin(ElementMixin(HTMLElement))))) {
|
|
81
89
|
/**
|
|
@@ -91,13 +99,13 @@ declare class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(Themable
|
|
|
91
99
|
addEventListener<K extends keyof TextAreaEventMap>(
|
|
92
100
|
type: K,
|
|
93
101
|
listener: (this: TextArea, ev: TextAreaEventMap[K]) => void,
|
|
94
|
-
options?:
|
|
102
|
+
options?: AddEventListenerOptions | boolean,
|
|
95
103
|
): void;
|
|
96
104
|
|
|
97
105
|
removeEventListener<K extends keyof TextAreaEventMap>(
|
|
98
106
|
type: K,
|
|
99
107
|
listener: (this: TextArea, ev: TextAreaEventMap[K]) => void,
|
|
100
|
-
options?:
|
|
108
|
+
options?: EventListenerOptions | boolean,
|
|
101
109
|
): void;
|
|
102
110
|
}
|
|
103
111
|
|
package/src/vaadin-text-area.js
CHANGED
|
@@ -7,6 +7,7 @@ import '@vaadin/input-container/src/vaadin-input-container.js';
|
|
|
7
7
|
import { html, PolymerElement } from '@polymer/polymer';
|
|
8
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
9
|
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
10
|
+
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
10
11
|
import { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';
|
|
11
12
|
import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
|
|
12
13
|
import { PatternMixin } from '@vaadin/field-base/src/pattern-mixin.js';
|
|
@@ -48,12 +49,13 @@ registerStyles('vaadin-text-area', inputFieldShared, { moduleId: 'vaadin-text-ar
|
|
|
48
49
|
* `<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
49
50
|
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
|
|
50
51
|
*
|
|
51
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
52
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
52
53
|
*
|
|
53
54
|
* @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.
|
|
54
55
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
55
56
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
56
57
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
58
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
57
59
|
*
|
|
58
60
|
* @extends HTMLElement
|
|
59
61
|
* @mixes InputFieldMixin
|
|
@@ -164,6 +166,8 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
164
166
|
<slot name="error-message"></slot>
|
|
165
167
|
</div>
|
|
166
168
|
</div>
|
|
169
|
+
|
|
170
|
+
<slot name="tooltip"></slot>
|
|
167
171
|
`;
|
|
168
172
|
}
|
|
169
173
|
|
|
@@ -222,6 +226,10 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
222
226
|
}),
|
|
223
227
|
);
|
|
224
228
|
this.addController(new LabelledInputController(this.inputElement, this._labelController));
|
|
229
|
+
|
|
230
|
+
this._tooltipController = new TooltipController(this);
|
|
231
|
+
this.addController(this._tooltipController);
|
|
232
|
+
|
|
225
233
|
this.addEventListener('animationend', this._onAnimationEnd);
|
|
226
234
|
|
|
227
235
|
this._inputField = this.shadowRoot.querySelector('[part=input-field]');
|
package/web-types.json
ADDED
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/text-area",
|
|
4
|
+
"version": "23.3.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "vaadin-text-area",
|
|
11
|
+
"description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "disabled",
|
|
15
|
+
"description": "If true, the user cannot interact with this element.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "autofocus",
|
|
26
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"boolean",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "label",
|
|
37
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
38
|
+
"value": {
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "invalid",
|
|
48
|
+
"description": "Set to true when the field is invalid.",
|
|
49
|
+
"value": {
|
|
50
|
+
"type": [
|
|
51
|
+
"boolean",
|
|
52
|
+
"null",
|
|
53
|
+
"undefined"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "required",
|
|
59
|
+
"description": "Specifies that the user must fill in a value.",
|
|
60
|
+
"value": {
|
|
61
|
+
"type": [
|
|
62
|
+
"boolean",
|
|
63
|
+
"null",
|
|
64
|
+
"undefined"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "error-message",
|
|
70
|
+
"description": "Error to show when the field is invalid.",
|
|
71
|
+
"value": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"null",
|
|
75
|
+
"undefined"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "helper-text",
|
|
81
|
+
"description": "String used for the helper text.",
|
|
82
|
+
"value": {
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"null",
|
|
86
|
+
"undefined"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "value",
|
|
92
|
+
"description": "The value of the field.",
|
|
93
|
+
"value": {
|
|
94
|
+
"type": [
|
|
95
|
+
"string",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "allowed-char-pattern",
|
|
103
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
104
|
+
"value": {
|
|
105
|
+
"type": [
|
|
106
|
+
"string",
|
|
107
|
+
"null",
|
|
108
|
+
"undefined"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "autoselect",
|
|
114
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": [
|
|
117
|
+
"boolean",
|
|
118
|
+
"null",
|
|
119
|
+
"undefined"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "clear-button-visible",
|
|
125
|
+
"description": "Set to true to display the clear icon which clears the input.",
|
|
126
|
+
"value": {
|
|
127
|
+
"type": [
|
|
128
|
+
"boolean",
|
|
129
|
+
"null",
|
|
130
|
+
"undefined"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "name",
|
|
136
|
+
"description": "The name of this field.",
|
|
137
|
+
"value": {
|
|
138
|
+
"type": [
|
|
139
|
+
"string",
|
|
140
|
+
"null",
|
|
141
|
+
"undefined"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "placeholder",
|
|
147
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
148
|
+
"value": {
|
|
149
|
+
"type": [
|
|
150
|
+
"string",
|
|
151
|
+
"null",
|
|
152
|
+
"undefined"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "readonly",
|
|
158
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
159
|
+
"value": {
|
|
160
|
+
"type": [
|
|
161
|
+
"boolean",
|
|
162
|
+
"null",
|
|
163
|
+
"undefined"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "title",
|
|
169
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
170
|
+
"value": {
|
|
171
|
+
"type": [
|
|
172
|
+
"string",
|
|
173
|
+
"null",
|
|
174
|
+
"undefined"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "autocomplete",
|
|
180
|
+
"description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete",
|
|
181
|
+
"value": {
|
|
182
|
+
"type": [
|
|
183
|
+
"string",
|
|
184
|
+
"null",
|
|
185
|
+
"undefined"
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "autocorrect",
|
|
191
|
+
"description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.",
|
|
192
|
+
"value": {
|
|
193
|
+
"type": [
|
|
194
|
+
"string",
|
|
195
|
+
"null",
|
|
196
|
+
"undefined"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "autocapitalize",
|
|
202
|
+
"description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.",
|
|
203
|
+
"value": {
|
|
204
|
+
"type": [
|
|
205
|
+
"string",
|
|
206
|
+
"null",
|
|
207
|
+
"undefined"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "pattern",
|
|
213
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
214
|
+
"value": {
|
|
215
|
+
"type": [
|
|
216
|
+
"string",
|
|
217
|
+
"null",
|
|
218
|
+
"undefined"
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "prevent-invalid-input",
|
|
224
|
+
"description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
|
|
225
|
+
"value": {
|
|
226
|
+
"type": [
|
|
227
|
+
"boolean",
|
|
228
|
+
"null",
|
|
229
|
+
"undefined"
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "maxlength",
|
|
235
|
+
"description": "Maximum number of characters (in Unicode code points) that the user can enter.",
|
|
236
|
+
"value": {
|
|
237
|
+
"type": [
|
|
238
|
+
"number",
|
|
239
|
+
"null",
|
|
240
|
+
"undefined"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "minlength",
|
|
246
|
+
"description": "Minimum number of characters (in Unicode code points) that the user can enter.",
|
|
247
|
+
"value": {
|
|
248
|
+
"type": [
|
|
249
|
+
"number",
|
|
250
|
+
"null",
|
|
251
|
+
"undefined"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "theme",
|
|
257
|
+
"description": "The theme variants to apply to the component.",
|
|
258
|
+
"value": {
|
|
259
|
+
"type": [
|
|
260
|
+
"string",
|
|
261
|
+
"null",
|
|
262
|
+
"undefined"
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"js": {
|
|
268
|
+
"properties": [
|
|
269
|
+
{
|
|
270
|
+
"name": "disabled",
|
|
271
|
+
"description": "If true, the user cannot interact with this element.",
|
|
272
|
+
"value": {
|
|
273
|
+
"type": [
|
|
274
|
+
"boolean",
|
|
275
|
+
"null",
|
|
276
|
+
"undefined"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "autofocus",
|
|
282
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
283
|
+
"value": {
|
|
284
|
+
"type": [
|
|
285
|
+
"boolean",
|
|
286
|
+
"null",
|
|
287
|
+
"undefined"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "label",
|
|
293
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
294
|
+
"value": {
|
|
295
|
+
"type": [
|
|
296
|
+
"string",
|
|
297
|
+
"null",
|
|
298
|
+
"undefined"
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "invalid",
|
|
304
|
+
"description": "Set to true when the field is invalid.",
|
|
305
|
+
"value": {
|
|
306
|
+
"type": [
|
|
307
|
+
"boolean",
|
|
308
|
+
"null",
|
|
309
|
+
"undefined"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "required",
|
|
315
|
+
"description": "Specifies that the user must fill in a value.",
|
|
316
|
+
"value": {
|
|
317
|
+
"type": [
|
|
318
|
+
"boolean",
|
|
319
|
+
"null",
|
|
320
|
+
"undefined"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "errorMessage",
|
|
326
|
+
"description": "Error to show when the field is invalid.",
|
|
327
|
+
"value": {
|
|
328
|
+
"type": [
|
|
329
|
+
"string",
|
|
330
|
+
"null",
|
|
331
|
+
"undefined"
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "helperText",
|
|
337
|
+
"description": "String used for the helper text.",
|
|
338
|
+
"value": {
|
|
339
|
+
"type": [
|
|
340
|
+
"string",
|
|
341
|
+
"null",
|
|
342
|
+
"undefined"
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "value",
|
|
348
|
+
"description": "The value of the field.",
|
|
349
|
+
"value": {
|
|
350
|
+
"type": [
|
|
351
|
+
"string",
|
|
352
|
+
"null",
|
|
353
|
+
"undefined"
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "allowedCharPattern",
|
|
359
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
360
|
+
"value": {
|
|
361
|
+
"type": [
|
|
362
|
+
"string",
|
|
363
|
+
"null",
|
|
364
|
+
"undefined"
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "autoselect",
|
|
370
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
371
|
+
"value": {
|
|
372
|
+
"type": [
|
|
373
|
+
"boolean",
|
|
374
|
+
"null",
|
|
375
|
+
"undefined"
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "clearButtonVisible",
|
|
381
|
+
"description": "Set to true to display the clear icon which clears the input.",
|
|
382
|
+
"value": {
|
|
383
|
+
"type": [
|
|
384
|
+
"boolean",
|
|
385
|
+
"null",
|
|
386
|
+
"undefined"
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"name": "name",
|
|
392
|
+
"description": "The name of this field.",
|
|
393
|
+
"value": {
|
|
394
|
+
"type": [
|
|
395
|
+
"string",
|
|
396
|
+
"null",
|
|
397
|
+
"undefined"
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "placeholder",
|
|
403
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
404
|
+
"value": {
|
|
405
|
+
"type": [
|
|
406
|
+
"string",
|
|
407
|
+
"null",
|
|
408
|
+
"undefined"
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "readonly",
|
|
414
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
415
|
+
"value": {
|
|
416
|
+
"type": [
|
|
417
|
+
"boolean",
|
|
418
|
+
"null",
|
|
419
|
+
"undefined"
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "title",
|
|
425
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
426
|
+
"value": {
|
|
427
|
+
"type": [
|
|
428
|
+
"string",
|
|
429
|
+
"null",
|
|
430
|
+
"undefined"
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "autocomplete",
|
|
436
|
+
"description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete",
|
|
437
|
+
"value": {
|
|
438
|
+
"type": [
|
|
439
|
+
"string",
|
|
440
|
+
"null",
|
|
441
|
+
"undefined"
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "autocorrect",
|
|
447
|
+
"description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.",
|
|
448
|
+
"value": {
|
|
449
|
+
"type": [
|
|
450
|
+
"string",
|
|
451
|
+
"null",
|
|
452
|
+
"undefined"
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "autocapitalize",
|
|
458
|
+
"description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.",
|
|
459
|
+
"value": {
|
|
460
|
+
"type": [
|
|
461
|
+
"string",
|
|
462
|
+
"null",
|
|
463
|
+
"undefined"
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "pattern",
|
|
469
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
470
|
+
"value": {
|
|
471
|
+
"type": [
|
|
472
|
+
"string",
|
|
473
|
+
"null",
|
|
474
|
+
"undefined"
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "preventInvalidInput",
|
|
480
|
+
"description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
|
|
481
|
+
"value": {
|
|
482
|
+
"type": [
|
|
483
|
+
"boolean",
|
|
484
|
+
"null",
|
|
485
|
+
"undefined"
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "maxlength",
|
|
491
|
+
"description": "Maximum number of characters (in Unicode code points) that the user can enter.",
|
|
492
|
+
"value": {
|
|
493
|
+
"type": [
|
|
494
|
+
"number",
|
|
495
|
+
"null",
|
|
496
|
+
"undefined"
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"name": "minlength",
|
|
502
|
+
"description": "Minimum number of characters (in Unicode code points) that the user can enter.",
|
|
503
|
+
"value": {
|
|
504
|
+
"type": [
|
|
505
|
+
"number",
|
|
506
|
+
"null",
|
|
507
|
+
"undefined"
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"events": [
|
|
513
|
+
{
|
|
514
|
+
"name": "validated",
|
|
515
|
+
"description": "Fired whenever the field is validated."
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "change",
|
|
519
|
+
"description": "Fired when the user commits a value change."
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "input",
|
|
523
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button."
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "invalid-changed",
|
|
527
|
+
"description": "Fired when the `invalid` property changes."
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "value-changed",
|
|
531
|
+
"description": "Fired when the `value` property changes."
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/text-area",
|
|
4
|
+
"version": "23.3.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
18
|
+
"name": "vaadin-text-area",
|
|
19
|
+
"description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?disabled",
|
|
24
|
+
"description": "If true, the user cannot interact with this element.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "?autofocus",
|
|
31
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "?invalid",
|
|
38
|
+
"description": "Set to true when the field is invalid.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?required",
|
|
45
|
+
"description": "Specifies that the user must fill in a value.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "?autoselect",
|
|
52
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?clearButtonVisible",
|
|
59
|
+
"description": "Set to true to display the clear icon which clears the input.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "?readonly",
|
|
66
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "?preventInvalidInput",
|
|
73
|
+
"description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".label",
|
|
80
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".errorMessage",
|
|
87
|
+
"description": "Error to show when the field is invalid.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".helperText",
|
|
94
|
+
"description": "String used for the helper text.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".value",
|
|
101
|
+
"description": "The value of the field.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": ".allowedCharPattern",
|
|
108
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": ".name",
|
|
115
|
+
"description": "The name of this field.",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": ".placeholder",
|
|
122
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
123
|
+
"value": {
|
|
124
|
+
"kind": "expression"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": ".title",
|
|
129
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": ".autocomplete",
|
|
136
|
+
"description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": ".autocorrect",
|
|
143
|
+
"description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.",
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "expression"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": ".autocapitalize",
|
|
150
|
+
"description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": ".pattern",
|
|
157
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": ".maxlength",
|
|
164
|
+
"description": "Maximum number of characters (in Unicode code points) that the user can enter.",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "expression"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": ".minlength",
|
|
171
|
+
"description": "Minimum number of characters (in Unicode code points) that the user can enter.",
|
|
172
|
+
"value": {
|
|
173
|
+
"kind": "expression"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "@validated",
|
|
178
|
+
"description": "Fired whenever the field is validated.",
|
|
179
|
+
"value": {
|
|
180
|
+
"kind": "expression"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "@change",
|
|
185
|
+
"description": "Fired when the user commits a value change.",
|
|
186
|
+
"value": {
|
|
187
|
+
"kind": "expression"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "@input",
|
|
192
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button.",
|
|
193
|
+
"value": {
|
|
194
|
+
"kind": "expression"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "@invalid-changed",
|
|
199
|
+
"description": "Fired when the `invalid` property changes.",
|
|
200
|
+
"value": {
|
|
201
|
+
"kind": "expression"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "@value-changed",
|
|
206
|
+
"description": "Fired when the `value` property changes.",
|
|
207
|
+
"value": {
|
|
208
|
+
"kind": "expression"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|