@vaadin/select 25.1.0-alpha7 → 25.1.0-alpha9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/select",
3
- "version": "25.1.0-alpha7",
3
+ "version": "25.1.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,24 +37,24 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.1.0-alpha7",
41
- "@vaadin/button": "25.1.0-alpha7",
42
- "@vaadin/component-base": "25.1.0-alpha7",
43
- "@vaadin/field-base": "25.1.0-alpha7",
44
- "@vaadin/input-container": "25.1.0-alpha7",
45
- "@vaadin/item": "25.1.0-alpha7",
46
- "@vaadin/list-box": "25.1.0-alpha7",
47
- "@vaadin/lit-renderer": "25.1.0-alpha7",
48
- "@vaadin/overlay": "25.1.0-alpha7",
49
- "@vaadin/vaadin-themable-mixin": "25.1.0-alpha7",
40
+ "@vaadin/a11y-base": "25.1.0-alpha9",
41
+ "@vaadin/button": "25.1.0-alpha9",
42
+ "@vaadin/component-base": "25.1.0-alpha9",
43
+ "@vaadin/field-base": "25.1.0-alpha9",
44
+ "@vaadin/input-container": "25.1.0-alpha9",
45
+ "@vaadin/item": "25.1.0-alpha9",
46
+ "@vaadin/list-box": "25.1.0-alpha9",
47
+ "@vaadin/lit-renderer": "25.1.0-alpha9",
48
+ "@vaadin/overlay": "25.1.0-alpha9",
49
+ "@vaadin/vaadin-themable-mixin": "25.1.0-alpha9",
50
50
  "lit": "^3.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@vaadin/aura": "25.1.0-alpha7",
54
- "@vaadin/chai-plugins": "25.1.0-alpha7",
55
- "@vaadin/test-runner-commands": "25.1.0-alpha7",
53
+ "@vaadin/aura": "25.1.0-alpha9",
54
+ "@vaadin/chai-plugins": "25.1.0-alpha9",
55
+ "@vaadin/test-runner-commands": "25.1.0-alpha9",
56
56
  "@vaadin/testing-helpers": "^2.0.0",
57
- "@vaadin/vaadin-lumo-styles": "25.1.0-alpha7",
57
+ "@vaadin/vaadin-lumo-styles": "25.1.0-alpha9",
58
58
  "sinon": "^21.0.0"
59
59
  },
60
60
  "customElements": "custom-elements.json",
@@ -62,5 +62,5 @@
62
62
  "web-types.json",
63
63
  "web-types.lit.json"
64
64
  ],
65
- "gitHead": "98c586125f769c8fefd307536965293668fda81d"
65
+ "gitHead": "ef432311376ba3dac4233cb23d393a49a425e0a4"
66
66
  }
package/web-types.json CHANGED
@@ -1,40 +1,29 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/select",
4
- "version": "25.1.0-alpha7",
4
+ "version": "25.1.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-select",
11
- "description": "`<vaadin-select>` is a Web Component for selecting values from a list of items.\n\n### Items\n\nUse the `items` property to define possible options for the select:\n\n```html\n<vaadin-select id=\"select\"></vaadin-select>\n```\n```js\nconst select = document.querySelector('#select');\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\n### Rendering\n\nAlternatively, the content of the select can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `select` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `select`.\n\n```js\nconst select = document.querySelector('#select');\nselect.renderer = function(root, select) {\n const listBox = document.createElement('vaadin-list-box');\n // append 3 <vaadin-item> elements\n ['Jose', 'Manolo', 'Pedro'].forEach(function(name) {\n const item = document.createElement('vaadin-item');\n item.textContent = name;\n item.setAttribute('label', name)\n listBox.appendChild(item);\n });\n\n // update the content\n root.appendChild(listBox);\n};\n```\n\nRenderer is called on initialization of new select and on its opening.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n* Hint: By setting the `label` property of inner vaadin-items you will\nbe able to change the visual representation of the selected value in the input part.\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`--vaadin-select-overlay-width` | Width of the overlay |\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and toggle button\n`field-button` | Set on the toggle button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`phone` | Set when the overlay is shown in phone mode\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-button).\n- `<vaadin-select-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-list-box).\n- `<vaadin-select-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-select>` is a Web Component for selecting values from a list of items.\n\n### Items\n\nUse the `items` property to define possible options for the select:\n\n```html\n<vaadin-select id=\"select\"></vaadin-select>\n```\n```js\nconst select = document.querySelector('#select');\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\n### Rendering\n\nAlternatively, the content of the select can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `select` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `select`.\n\n```js\nconst select = document.querySelector('#select');\nselect.renderer = function(root, select) {\n const listBox = document.createElement('vaadin-list-box');\n // append 3 <vaadin-item> elements\n ['Jose', 'Manolo', 'Pedro'].forEach(function(name) {\n const item = document.createElement('vaadin-item');\n item.textContent = name;\n item.setAttribute('label', name)\n listBox.appendChild(item);\n });\n\n // update the content\n root.appendChild(listBox);\n};\n```\n\nRenderer is called on initialization of new select and on its opening.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n* Hint: By setting the `label` property of inner vaadin-items you will\nbe able to change the visual representation of the selected value in the input part.\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`--vaadin-select-overlay-width` | Width of the overlay |\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and toggle button\n`field-button` | Set on the toggle button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`phone` | Set when the overlay is shown in phone mode\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-button).\n- `<vaadin-select-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-select-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
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.",
14
+ "name": "accessible-name",
15
+ "description": "String used to label the component to screen reader users.",
27
16
  "value": {
28
17
  "type": [
29
- "boolean",
18
+ "string",
30
19
  "null",
31
20
  "undefined"
32
21
  ]
33
22
  }
34
23
  },
35
24
  {
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.",
25
+ "name": "accessible-name-ref",
26
+ "description": "Id of the element used as label of the component to screen reader users.",
38
27
  "value": {
39
28
  "type": [
40
29
  "string",
@@ -44,8 +33,8 @@
44
33
  }
45
34
  },
46
35
  {
47
- "name": "invalid",
48
- "description": "Set to true when the field is invalid.",
36
+ "name": "autofocus",
37
+ "description": "Specify that this control should have input focus when the page loads.",
49
38
  "value": {
50
39
  "type": [
51
40
  "boolean",
@@ -55,8 +44,8 @@
55
44
  }
56
45
  },
57
46
  {
58
- "name": "manual-validation",
59
- "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
47
+ "name": "disabled",
48
+ "description": "If true, the user cannot interact with this element.",
60
49
  "value": {
61
50
  "type": [
62
51
  "boolean",
@@ -66,19 +55,19 @@
66
55
  }
67
56
  },
68
57
  {
69
- "name": "required",
70
- "description": "Specifies that the user must fill in a value.",
58
+ "name": "error-message",
59
+ "description": "Error to show when the field is invalid.",
71
60
  "value": {
72
61
  "type": [
73
- "boolean",
62
+ "string",
74
63
  "null",
75
64
  "undefined"
76
65
  ]
77
66
  }
78
67
  },
79
68
  {
80
- "name": "error-message",
81
- "description": "Error to show when the field is invalid.",
69
+ "name": "helper-text",
70
+ "description": "String used for the helper text.",
82
71
  "value": {
83
72
  "type": [
84
73
  "string",
@@ -88,19 +77,19 @@
88
77
  }
89
78
  },
90
79
  {
91
- "name": "helper-text",
92
- "description": "String used for the helper text.",
80
+ "name": "invalid",
81
+ "description": "Set to true when the field is invalid.",
93
82
  "value": {
94
83
  "type": [
95
- "string",
84
+ "boolean",
96
85
  "null",
97
86
  "undefined"
98
87
  ]
99
88
  }
100
89
  },
101
90
  {
102
- "name": "accessible-name",
103
- "description": "String used to label the component to screen reader users.",
91
+ "name": "label",
92
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
104
93
  "value": {
105
94
  "type": [
106
95
  "string",
@@ -110,42 +99,44 @@
110
99
  }
111
100
  },
112
101
  {
113
- "name": "accessible-name-ref",
114
- "description": "Id of the element used as label of the component to screen reader users.",
102
+ "name": "manual-validation",
103
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
115
104
  "value": {
116
105
  "type": [
117
- "string",
106
+ "boolean",
118
107
  "null",
119
108
  "undefined"
120
109
  ]
121
110
  }
122
111
  },
123
112
  {
124
- "name": "opened",
125
- "description": "Set when the select is open",
113
+ "name": "name",
114
+ "description": "The name of this element.",
126
115
  "value": {
127
116
  "type": [
128
- "boolean"
117
+ "string",
118
+ "null",
119
+ "undefined"
129
120
  ]
130
121
  }
131
122
  },
132
123
  {
133
- "name": "value",
134
- "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
124
+ "name": "no-vertical-overlap",
125
+ "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
135
126
  "value": {
136
127
  "type": [
137
- "string"
128
+ "boolean",
129
+ "null",
130
+ "undefined"
138
131
  ]
139
132
  }
140
133
  },
141
134
  {
142
- "name": "name",
143
- "description": "The name of this element.",
135
+ "name": "opened",
136
+ "description": "Set when the select is open",
144
137
  "value": {
145
138
  "type": [
146
- "string",
147
- "null",
148
- "undefined"
139
+ "boolean"
149
140
  ]
150
141
  }
151
142
  },
@@ -170,8 +161,8 @@
170
161
  }
171
162
  },
172
163
  {
173
- "name": "no-vertical-overlap",
174
- "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
164
+ "name": "required",
165
+ "description": "Specifies that the user must fill in a value.",
175
166
  "value": {
176
167
  "type": [
177
168
  "boolean",
@@ -190,16 +181,36 @@
190
181
  "undefined"
191
182
  ]
192
183
  }
184
+ },
185
+ {
186
+ "name": "value",
187
+ "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
188
+ "value": {
189
+ "type": [
190
+ "string"
191
+ ]
192
+ }
193
193
  }
194
194
  ],
195
195
  "js": {
196
196
  "properties": [
197
197
  {
198
- "name": "disabled",
199
- "description": "If true, the user cannot interact with this element.",
198
+ "name": "accessibleName",
199
+ "description": "String used to label the component to screen reader users.",
200
200
  "value": {
201
201
  "type": [
202
- "boolean",
202
+ "string",
203
+ "null",
204
+ "undefined"
205
+ ]
206
+ }
207
+ },
208
+ {
209
+ "name": "accessibleNameRef",
210
+ "description": "Id of the element used as label of the component to screen reader users.",
211
+ "value": {
212
+ "type": [
213
+ "string",
203
214
  "null",
204
215
  "undefined"
205
216
  ]
@@ -217,41 +228,41 @@
217
228
  }
218
229
  },
219
230
  {
220
- "name": "label",
221
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
231
+ "name": "disabled",
232
+ "description": "If true, the user cannot interact with this element.",
222
233
  "value": {
223
234
  "type": [
224
- "string",
235
+ "boolean",
225
236
  "null",
226
237
  "undefined"
227
238
  ]
228
239
  }
229
240
  },
230
241
  {
231
- "name": "invalid",
232
- "description": "Set to true when the field is invalid.",
242
+ "name": "errorMessage",
243
+ "description": "Error to show when the field is invalid.",
233
244
  "value": {
234
245
  "type": [
235
- "boolean",
246
+ "string",
236
247
  "null",
237
248
  "undefined"
238
249
  ]
239
250
  }
240
251
  },
241
252
  {
242
- "name": "manualValidation",
243
- "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
253
+ "name": "helperText",
254
+ "description": "String used for the helper text.",
244
255
  "value": {
245
256
  "type": [
246
- "boolean",
257
+ "string",
247
258
  "null",
248
259
  "undefined"
249
260
  ]
250
261
  }
251
262
  },
252
263
  {
253
- "name": "required",
254
- "description": "Specifies that the user must fill in a value.",
264
+ "name": "invalid",
265
+ "description": "Set to true when the field is invalid.",
255
266
  "value": {
256
267
  "type": [
257
268
  "boolean",
@@ -261,19 +272,17 @@
261
272
  }
262
273
  },
263
274
  {
264
- "name": "errorMessage",
265
- "description": "Error to show when the field is invalid.",
275
+ "name": "items",
276
+ "description": "An array containing items that will be rendered as the options of the select.\n\n#### Example\n```js\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\nNote: each item is rendered by default as the internal `<vaadin-select-item>` that is an extension of `<vaadin-item>`.\nTo render the item with a custom component, provide a tag name by the `component` property.",
266
277
  "value": {
267
278
  "type": [
268
- "string",
269
- "null",
270
- "undefined"
279
+ "Array.<SelectItem>"
271
280
  ]
272
281
  }
273
282
  },
274
283
  {
275
- "name": "helperText",
276
- "description": "String used for the helper text.",
284
+ "name": "label",
285
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
277
286
  "value": {
278
287
  "type": [
279
288
  "string",
@@ -283,19 +292,19 @@
283
292
  }
284
293
  },
285
294
  {
286
- "name": "accessibleName",
287
- "description": "String used to label the component to screen reader users.",
295
+ "name": "manualValidation",
296
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
288
297
  "value": {
289
298
  "type": [
290
- "string",
299
+ "boolean",
291
300
  "null",
292
301
  "undefined"
293
302
  ]
294
303
  }
295
304
  },
296
305
  {
297
- "name": "accessibleNameRef",
298
- "description": "Id of the element used as label of the component to screen reader users.",
306
+ "name": "name",
307
+ "description": "The name of this element.",
299
308
  "value": {
300
309
  "type": [
301
310
  "string",
@@ -305,11 +314,13 @@
305
314
  }
306
315
  },
307
316
  {
308
- "name": "items",
309
- "description": "An array containing items that will be rendered as the options of the select.\n\n#### Example\n```js\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\nNote: each item is rendered by default as the internal `<vaadin-select-item>` that is an extension of `<vaadin-item>`.\nTo render the item with a custom component, provide a tag name by the `component` property.",
317
+ "name": "noVerticalOverlap",
318
+ "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
310
319
  "value": {
311
320
  "type": [
312
- "Array.<SelectItem>"
321
+ "boolean",
322
+ "null",
323
+ "undefined"
313
324
  ]
314
325
  }
315
326
  },
@@ -323,72 +334,57 @@
323
334
  }
324
335
  },
325
336
  {
326
- "name": "renderer",
327
- "description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The internal container DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
337
+ "name": "placeholder",
338
+ "description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
328
339
  "value": {
329
340
  "type": [
330
- "SelectRenderer",
341
+ "string",
342
+ "null",
331
343
  "undefined"
332
344
  ]
333
345
  }
334
346
  },
335
347
  {
336
- "name": "value",
337
- "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
348
+ "name": "readonly",
349
+ "description": "When present, it specifies that the element is read-only.",
338
350
  "value": {
339
351
  "type": [
340
- "string"
352
+ "boolean"
341
353
  ]
342
354
  }
343
355
  },
344
356
  {
345
- "name": "name",
346
- "description": "The name of this element.",
357
+ "name": "renderer",
358
+ "description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The internal container DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
347
359
  "value": {
348
360
  "type": [
349
- "string",
350
- "null",
361
+ "SelectRenderer",
351
362
  "undefined"
352
363
  ]
353
364
  }
354
365
  },
355
366
  {
356
- "name": "placeholder",
357
- "description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
367
+ "name": "required",
368
+ "description": "Specifies that the user must fill in a value.",
358
369
  "value": {
359
370
  "type": [
360
- "string",
371
+ "boolean",
361
372
  "null",
362
373
  "undefined"
363
374
  ]
364
375
  }
365
376
  },
366
377
  {
367
- "name": "readonly",
368
- "description": "When present, it specifies that the element is read-only.",
369
- "value": {
370
- "type": [
371
- "boolean"
372
- ]
373
- }
374
- },
375
- {
376
- "name": "noVerticalOverlap",
377
- "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
378
+ "name": "value",
379
+ "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
378
380
  "value": {
379
381
  "type": [
380
- "boolean",
381
- "null",
382
- "undefined"
382
+ "string"
383
383
  ]
384
384
  }
385
385
  }
386
386
  ],
387
387
  "events": [
388
- {
389
- "name": "validated",
390
- "description": "Fired whenever the field is validated."
391
- },
392
388
  {
393
389
  "name": "change",
394
390
  "description": "Fired when the user commits a value change."
@@ -401,6 +397,10 @@
401
397
  "name": "opened-changed",
402
398
  "description": "Fired when the `opened` property changes."
403
399
  },
400
+ {
401
+ "name": "validated",
402
+ "description": "Fired whenever the field is validated."
403
+ },
404
404
  {
405
405
  "name": "value-changed",
406
406
  "description": "Fired when the `value` property changes."
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/select",
4
- "version": "25.1.0-alpha7",
4
+ "version": "25.1.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,19 +16,19 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-select",
19
- "description": "`<vaadin-select>` is a Web Component for selecting values from a list of items.\n\n### Items\n\nUse the `items` property to define possible options for the select:\n\n```html\n<vaadin-select id=\"select\"></vaadin-select>\n```\n```js\nconst select = document.querySelector('#select');\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\n### Rendering\n\nAlternatively, the content of the select can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `select` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `select`.\n\n```js\nconst select = document.querySelector('#select');\nselect.renderer = function(root, select) {\n const listBox = document.createElement('vaadin-list-box');\n // append 3 <vaadin-item> elements\n ['Jose', 'Manolo', 'Pedro'].forEach(function(name) {\n const item = document.createElement('vaadin-item');\n item.textContent = name;\n item.setAttribute('label', name)\n listBox.appendChild(item);\n });\n\n // update the content\n root.appendChild(listBox);\n};\n```\n\nRenderer is called on initialization of new select and on its opening.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n* Hint: By setting the `label` property of inner vaadin-items you will\nbe able to change the visual representation of the selected value in the input part.\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`--vaadin-select-overlay-width` | Width of the overlay |\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and toggle button\n`field-button` | Set on the toggle button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`phone` | Set when the overlay is shown in phone mode\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-button).\n- `<vaadin-select-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-list-box).\n- `<vaadin-select-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha7/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-select>` is a Web Component for selecting values from a list of items.\n\n### Items\n\nUse the `items` property to define possible options for the select:\n\n```html\n<vaadin-select id=\"select\"></vaadin-select>\n```\n```js\nconst select = document.querySelector('#select');\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\n### Rendering\n\nAlternatively, the content of the select can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `select` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `select`.\n\n```js\nconst select = document.querySelector('#select');\nselect.renderer = function(root, select) {\n const listBox = document.createElement('vaadin-list-box');\n // append 3 <vaadin-item> elements\n ['Jose', 'Manolo', 'Pedro'].forEach(function(name) {\n const item = document.createElement('vaadin-item');\n item.textContent = name;\n item.setAttribute('label', name)\n listBox.appendChild(item);\n });\n\n // update the content\n root.appendChild(listBox);\n};\n```\n\nRenderer is called on initialization of new select and on its opening.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n* Hint: By setting the `label` property of inner vaadin-items you will\nbe able to change the visual representation of the selected value in the input part.\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`--vaadin-select-overlay-width` | Width of the overlay |\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and toggle button\n`field-button` | Set on the toggle button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`phone` | Set when the overlay is shown in phone mode\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-button).\n- `<vaadin-select-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-select-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
23
- "name": "?disabled",
24
- "description": "If true, the user cannot interact with this element.",
23
+ "name": "?autofocus",
24
+ "description": "Specify that this control should have input focus when the page loads.",
25
25
  "value": {
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
29
  {
30
- "name": "?autofocus",
31
- "description": "Specify that this control should have input focus when the page loads.",
30
+ "name": "?disabled",
31
+ "description": "If true, the user cannot interact with this element.",
32
32
  "value": {
33
33
  "kind": "expression"
34
34
  }
@@ -48,8 +48,8 @@
48
48
  }
49
49
  },
50
50
  {
51
- "name": "?required",
52
- "description": "Specifies that the user must fill in a value.",
51
+ "name": "?noVerticalOverlap",
52
+ "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
53
53
  "value": {
54
54
  "kind": "expression"
55
55
  }
@@ -69,43 +69,36 @@
69
69
  }
70
70
  },
71
71
  {
72
- "name": "?noVerticalOverlap",
73
- "description": "Defines whether the overlay should overlap the target element\nin the y-axis, or be positioned right above/below it.",
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.",
72
+ "name": "?required",
73
+ "description": "Specifies that the user must fill in a value.",
81
74
  "value": {
82
75
  "kind": "expression"
83
76
  }
84
77
  },
85
78
  {
86
- "name": ".errorMessage",
87
- "description": "Error to show when the field is invalid.",
79
+ "name": ".accessibleName",
80
+ "description": "String used to label the component to screen reader users.",
88
81
  "value": {
89
82
  "kind": "expression"
90
83
  }
91
84
  },
92
85
  {
93
- "name": ".helperText",
94
- "description": "String used for the helper text.",
86
+ "name": ".accessibleNameRef",
87
+ "description": "Id of the element used as label of the component to screen reader users.",
95
88
  "value": {
96
89
  "kind": "expression"
97
90
  }
98
91
  },
99
92
  {
100
- "name": ".accessibleName",
101
- "description": "String used to label the component to screen reader users.",
93
+ "name": ".errorMessage",
94
+ "description": "Error to show when the field is invalid.",
102
95
  "value": {
103
96
  "kind": "expression"
104
97
  }
105
98
  },
106
99
  {
107
- "name": ".accessibleNameRef",
108
- "description": "Id of the element used as label of the component to screen reader users.",
100
+ "name": ".helperText",
101
+ "description": "String used for the helper text.",
109
102
  "value": {
110
103
  "kind": "expression"
111
104
  }
@@ -118,36 +111,36 @@
118
111
  }
119
112
  },
120
113
  {
121
- "name": ".renderer",
122
- "description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The internal container DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
114
+ "name": ".label",
115
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
123
116
  "value": {
124
117
  "kind": "expression"
125
118
  }
126
119
  },
127
120
  {
128
- "name": ".value",
129
- "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
121
+ "name": ".name",
122
+ "description": "The name of this element.",
130
123
  "value": {
131
124
  "kind": "expression"
132
125
  }
133
126
  },
134
127
  {
135
- "name": ".name",
136
- "description": "The name of this element.",
128
+ "name": ".placeholder",
129
+ "description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
137
130
  "value": {
138
131
  "kind": "expression"
139
132
  }
140
133
  },
141
134
  {
142
- "name": ".placeholder",
143
- "description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
135
+ "name": ".renderer",
136
+ "description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The internal container DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
144
137
  "value": {
145
138
  "kind": "expression"
146
139
  }
147
140
  },
148
141
  {
149
- "name": "@validated",
150
- "description": "Fired whenever the field is validated.",
142
+ "name": ".value",
143
+ "description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
151
144
  "value": {
152
145
  "kind": "expression"
153
146
  }
@@ -173,6 +166,13 @@
173
166
  "kind": "expression"
174
167
  }
175
168
  },
169
+ {
170
+ "name": "@validated",
171
+ "description": "Fired whenever the field is validated.",
172
+ "value": {
173
+ "kind": "expression"
174
+ }
175
+ },
176
176
  {
177
177
  "name": "@value-changed",
178
178
  "description": "Fired when the `value` property changes.",