@vaadin/select 24.6.0-beta1 → 24.7.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/package.json +15 -15
- package/src/vaadin-lit-select-overlay.js +0 -10
- package/src/vaadin-lit-select.js +4 -11
- package/src/vaadin-select-base-mixin.js +8 -1
- package/src/vaadin-select-overlay-mixin.js +10 -0
- package/src/vaadin-select-overlay.js +0 -21
- package/src/vaadin-select-value-button-styles.js +0 -1
- package/src/vaadin-select.js +13 -0
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/select",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.7.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.2.0",
|
|
42
|
-
"@vaadin/a11y-base": "24.
|
|
43
|
-
"@vaadin/button": "24.
|
|
44
|
-
"@vaadin/component-base": "24.
|
|
45
|
-
"@vaadin/field-base": "24.
|
|
46
|
-
"@vaadin/input-container": "24.
|
|
47
|
-
"@vaadin/item": "24.
|
|
48
|
-
"@vaadin/list-box": "24.
|
|
49
|
-
"@vaadin/lit-renderer": "24.
|
|
50
|
-
"@vaadin/overlay": "24.
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "24.
|
|
52
|
-
"@vaadin/vaadin-material-styles": "24.
|
|
53
|
-
"@vaadin/vaadin-themable-mixin": "24.
|
|
42
|
+
"@vaadin/a11y-base": "24.7.0-alpha1",
|
|
43
|
+
"@vaadin/button": "24.7.0-alpha1",
|
|
44
|
+
"@vaadin/component-base": "24.7.0-alpha1",
|
|
45
|
+
"@vaadin/field-base": "24.7.0-alpha1",
|
|
46
|
+
"@vaadin/input-container": "24.7.0-alpha1",
|
|
47
|
+
"@vaadin/item": "24.7.0-alpha1",
|
|
48
|
+
"@vaadin/list-box": "24.7.0-alpha1",
|
|
49
|
+
"@vaadin/lit-renderer": "24.7.0-alpha1",
|
|
50
|
+
"@vaadin/overlay": "24.7.0-alpha1",
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
|
|
52
|
+
"@vaadin/vaadin-material-styles": "24.7.0-alpha1",
|
|
53
|
+
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
|
|
54
54
|
"lit": "^3.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@vaadin/chai-plugins": "24.
|
|
57
|
+
"@vaadin/chai-plugins": "24.7.0-alpha1",
|
|
58
58
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
59
59
|
"sinon": "^18.0.0"
|
|
60
60
|
},
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
|
|
66
66
|
}
|
|
@@ -65,16 +65,6 @@ class SelectOverlay extends SelectOverlayMixin(ThemableMixin(PolylitMixin(LitEle
|
|
|
65
65
|
this.requestContentUpdate();
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
requestContentUpdate() {
|
|
70
|
-
super.requestContentUpdate();
|
|
71
|
-
|
|
72
|
-
if (this.owner) {
|
|
73
|
-
// Ensure menuElement reference is correct.
|
|
74
|
-
const menuElement = this._getMenuElement();
|
|
75
|
-
this.owner._assignMenuElement(menuElement);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
68
|
}
|
|
79
69
|
|
|
80
70
|
defineCustomElement(SelectOverlay);
|
package/src/vaadin-lit-select.js
CHANGED
|
@@ -9,6 +9,7 @@ import './vaadin-lit-select-list-box.js';
|
|
|
9
9
|
import './vaadin-lit-select-overlay.js';
|
|
10
10
|
import './vaadin-lit-select-value-button.js';
|
|
11
11
|
import { css, html, LitElement } from 'lit';
|
|
12
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
13
|
import { screenReaderOnly } from '@vaadin/a11y-base/src/styles/sr-only-styles.js';
|
|
13
14
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
14
15
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
@@ -65,7 +66,7 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(Lit
|
|
|
65
66
|
.readonly="${this.readonly}"
|
|
66
67
|
.disabled="${this.disabled}"
|
|
67
68
|
.invalid="${this.invalid}"
|
|
68
|
-
theme="${this._theme}"
|
|
69
|
+
theme="${ifDefined(this._theme)}"
|
|
69
70
|
@click="${this._onClick}"
|
|
70
71
|
>
|
|
71
72
|
<slot name="prefix" slot="prefix"></slot>
|
|
@@ -83,13 +84,14 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(Lit
|
|
|
83
84
|
</div>
|
|
84
85
|
|
|
85
86
|
<vaadin-select-overlay
|
|
87
|
+
id="overlay"
|
|
86
88
|
.owner="${this}"
|
|
87
89
|
.positionTarget="${this._inputContainer}"
|
|
88
90
|
.opened="${this.opened}"
|
|
89
91
|
.withBackdrop="${this._phone}"
|
|
90
92
|
.renderer="${this.renderer || this.__defaultRenderer}"
|
|
91
93
|
?phone="${this._phone}"
|
|
92
|
-
theme="${this._theme}"
|
|
94
|
+
theme="${ifDefined(this._theme)}"
|
|
93
95
|
?no-vertical-overlap="${this.noVerticalOverlap}"
|
|
94
96
|
@opened-changed="${this._onOpenedChanged}"
|
|
95
97
|
@vaadin-overlay-open="${this._onOverlayOpen}"
|
|
@@ -102,15 +104,6 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(Lit
|
|
|
102
104
|
`;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
/** @protected */
|
|
106
|
-
ready() {
|
|
107
|
-
super.ready();
|
|
108
|
-
|
|
109
|
-
const overlay = this.shadowRoot.querySelector('vaadin-select-overlay');
|
|
110
|
-
overlay.owner = this;
|
|
111
|
-
this._overlayElement = overlay;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
107
|
/** @private */
|
|
115
108
|
_onOpenedChanged(event) {
|
|
116
109
|
this.opened = event.detail.value;
|
|
@@ -143,7 +143,7 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
143
143
|
|
|
144
144
|
/** @private */
|
|
145
145
|
_phoneMediaQuery: {
|
|
146
|
-
value: '(max-width:
|
|
146
|
+
value: '(max-width: 450px), (max-height: 450px)',
|
|
147
147
|
},
|
|
148
148
|
|
|
149
149
|
/** @private */
|
|
@@ -182,6 +182,8 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
182
182
|
ready() {
|
|
183
183
|
super.ready();
|
|
184
184
|
|
|
185
|
+
this._overlayElement = this.$.overlay;
|
|
186
|
+
|
|
185
187
|
this._inputContainer = this.shadowRoot.querySelector('[part~="input-field"]');
|
|
186
188
|
|
|
187
189
|
this._valueButtonController = new ButtonController(this);
|
|
@@ -461,6 +463,11 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
461
463
|
*/
|
|
462
464
|
__appendValueItemElement(itemElement, parent) {
|
|
463
465
|
parent.appendChild(itemElement);
|
|
466
|
+
// Trigger observer that sets aria-selected attribute
|
|
467
|
+
// so that we can then synchronously remove it below.
|
|
468
|
+
if (itemElement.performUpdate) {
|
|
469
|
+
itemElement.performUpdate();
|
|
470
|
+
}
|
|
464
471
|
itemElement.removeAttribute('tabindex');
|
|
465
472
|
itemElement.removeAttribute('aria-selected');
|
|
466
473
|
itemElement.removeAttribute('role');
|
|
@@ -44,4 +44,14 @@ export const SelectOverlayMixin = (superClass) =>
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
requestContentUpdate() {
|
|
49
|
+
super.requestContentUpdate();
|
|
50
|
+
|
|
51
|
+
if (this.owner) {
|
|
52
|
+
// Ensure menuElement reference is correct.
|
|
53
|
+
const menuElement = this._getMenuElement();
|
|
54
|
+
this.owner._assignMenuElement(menuElement);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
47
57
|
};
|
|
@@ -54,27 +54,6 @@ export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(PolymerEleme
|
|
|
54
54
|
</div>
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
/** @protected */
|
|
59
|
-
ready() {
|
|
60
|
-
super.ready();
|
|
61
|
-
|
|
62
|
-
// When setting `opened` as an attribute, the overlay is already teleported to body
|
|
63
|
-
// by the time when `ready()` callback of the `vaadin-select` is executed by Polymer,
|
|
64
|
-
// so querySelector() would return null. So we use this workaround to set properties.
|
|
65
|
-
this.owner = this.__dataHost;
|
|
66
|
-
this.owner._overlayElement = this;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
requestContentUpdate() {
|
|
70
|
-
super.requestContentUpdate();
|
|
71
|
-
|
|
72
|
-
if (this.owner) {
|
|
73
|
-
// Ensure menuElement reference is correct.
|
|
74
|
-
const menuElement = this._getMenuElement();
|
|
75
|
-
this.owner._assignMenuElement(menuElement);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
57
|
}
|
|
79
58
|
|
|
80
59
|
defineCustomElement(SelectOverlay);
|
package/src/vaadin-select.js
CHANGED
|
@@ -180,6 +180,8 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolymerElement))
|
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
182
|
<vaadin-select-overlay
|
|
183
|
+
id="overlay"
|
|
184
|
+
owner="[[__overlayOwner]]"
|
|
183
185
|
position-target="[[_inputContainer]]"
|
|
184
186
|
opened="{{opened}}"
|
|
185
187
|
with-backdrop="[[_phone]]"
|
|
@@ -196,6 +198,17 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolymerElement))
|
|
|
196
198
|
`;
|
|
197
199
|
}
|
|
198
200
|
|
|
201
|
+
static get properties() {
|
|
202
|
+
return {
|
|
203
|
+
/** @private */
|
|
204
|
+
__overlayOwner: {
|
|
205
|
+
value() {
|
|
206
|
+
return this;
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
199
212
|
static get observers() {
|
|
200
213
|
return ['_rendererChanged(renderer, _overlayElement)'];
|
|
201
214
|
}
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/select",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.7.0-alpha1",
|
|
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 | Target element | Default\n-----------------------------------|------------------------------|----------------------------------\n`--vaadin-field-default-width` | Default width of the field | :host | `12em`\n`--vaadin-select-text-field-width` | Effective width of the field | `vaadin-select-overlay` |\n`--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |\n\n`<vaadin-select>` provides mostly 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/24.
|
|
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 | Target element | Default\n-----------------------------------|------------------------------|----------------------------------\n`--vaadin-field-default-width` | Default width of the field | :host | `12em`\n`--vaadin-select-text-field-width` | Effective width of the field | `vaadin-select-overlay` |\n`--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |\n\n`<vaadin-select>` provides mostly 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/24.7.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-----------------------------|-----------\n`opened` | Set when the select is open | :host\n\nThere are two exceptions in terms of styling compared to `<vaadin-text-field>`:\n- the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.\n- the `input-prevented` state attribute is not supported by `<vaadin-select>`.\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-input-container) - an internal element wrapping the button.\n\nNote: the `theme` attribute value set on `<vaadin-select>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/select",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.7.0-alpha1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
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 | Target element | Default\n-----------------------------------|------------------------------|----------------------------------\n`--vaadin-field-default-width` | Default width of the field | :host | `12em`\n`--vaadin-select-text-field-width` | Effective width of the field | `vaadin-select-overlay` |\n`--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |\n\n`<vaadin-select>` provides mostly 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/24.
|
|
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 | Target element | Default\n-----------------------------------|------------------------------|----------------------------------\n`--vaadin-field-default-width` | Default width of the field | :host | `12em`\n`--vaadin-select-text-field-width` | Effective width of the field | `vaadin-select-overlay` |\n`--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |\n\n`<vaadin-select>` provides mostly 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/24.7.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-----------------------------|-----------\n`opened` | Set when the select is open | :host\n\nThere are two exceptions in terms of styling compared to `<vaadin-text-field>`:\n- the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.\n- the `input-prevented` state attribute is not supported by `<vaadin-select>`.\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-input-container) - an internal element wrapping the button.\n\nNote: the `theme` attribute value set on `<vaadin-select>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|