@vaadin/select 25.0.0-alpha6 → 25.0.0-alpha8

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.0.0-alpha6",
3
+ "version": "25.0.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,22 +39,22 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@open-wc/dedupe-mixin": "^1.3.0",
42
- "@vaadin/a11y-base": "25.0.0-alpha6",
43
- "@vaadin/button": "25.0.0-alpha6",
44
- "@vaadin/component-base": "25.0.0-alpha6",
45
- "@vaadin/field-base": "25.0.0-alpha6",
46
- "@vaadin/input-container": "25.0.0-alpha6",
47
- "@vaadin/item": "25.0.0-alpha6",
48
- "@vaadin/list-box": "25.0.0-alpha6",
49
- "@vaadin/lit-renderer": "25.0.0-alpha6",
50
- "@vaadin/overlay": "25.0.0-alpha6",
51
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha6",
52
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha6",
42
+ "@vaadin/a11y-base": "25.0.0-alpha8",
43
+ "@vaadin/button": "25.0.0-alpha8",
44
+ "@vaadin/component-base": "25.0.0-alpha8",
45
+ "@vaadin/field-base": "25.0.0-alpha8",
46
+ "@vaadin/input-container": "25.0.0-alpha8",
47
+ "@vaadin/item": "25.0.0-alpha8",
48
+ "@vaadin/list-box": "25.0.0-alpha8",
49
+ "@vaadin/lit-renderer": "25.0.0-alpha8",
50
+ "@vaadin/overlay": "25.0.0-alpha8",
51
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
52
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
53
53
  "lit": "^3.0.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@vaadin/chai-plugins": "25.0.0-alpha6",
57
- "@vaadin/test-runner-commands": "25.0.0-alpha6",
56
+ "@vaadin/chai-plugins": "25.0.0-alpha8",
57
+ "@vaadin/test-runner-commands": "25.0.0-alpha8",
58
58
  "@vaadin/testing-helpers": "^2.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": "cd1d084198d2b326c58d44bb39fa4845b71ce551"
65
+ "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
66
66
  }
@@ -7,30 +7,32 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const selectStyles = css`
10
- @layer base {
11
- :host {
12
- position: relative;
13
- }
10
+ :host {
11
+ position: relative;
12
+ }
14
13
 
15
- ::slotted([slot='value']) {
16
- flex: 1;
17
- }
14
+ ::slotted([slot='value']) {
15
+ flex: 1;
16
+ }
18
17
 
19
- :host(:not([focus-ring])) [part='input-field'] {
20
- outline: none;
21
- }
18
+ ::slotted(div[slot='overlay']) {
19
+ display: contents;
20
+ }
22
21
 
23
- :host([readonly]:not([focus-ring])) [part='input-field'] {
24
- --vaadin-input-field-border-color: inherit;
25
- }
22
+ :host(:not([focus-ring])) [part='input-field'] {
23
+ outline: none;
24
+ }
26
25
 
27
- [part='input-field'],
28
- :host(:not([readonly])) ::slotted([slot='value']) {
29
- cursor: var(--vaadin-clickable-cursor);
30
- }
26
+ :host([readonly]:not([focus-ring])) [part='input-field'] {
27
+ --vaadin-input-field-border-color: inherit;
28
+ }
29
+
30
+ [part='input-field'],
31
+ :host(:not([readonly])) ::slotted([slot='value']) {
32
+ cursor: var(--vaadin-clickable-cursor);
33
+ }
31
34
 
32
- [part='toggle-button']::before {
33
- mask-image: var(--_vaadin-icon-chevron-down);
34
- }
35
+ [part='toggle-button']::before {
36
+ mask-image: var(--_vaadin-icon-chevron-down);
35
37
  }
36
38
  `;
@@ -13,4 +13,8 @@ export const selectStyles = css`
13
13
  ::slotted([slot='value']) {
14
14
  flex-grow: 1;
15
15
  }
16
+
17
+ ::slotted(div[slot='overlay']) {
18
+ display: contents;
19
+ }
16
20
  `;
@@ -6,18 +6,16 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const selectOverlayStyles = css`
9
- @layer base {
10
- :host {
11
- align-items: flex-start;
12
- justify-content: flex-start;
13
- }
9
+ :host {
10
+ align-items: flex-start;
11
+ justify-content: flex-start;
12
+ }
14
13
 
15
- :host(:not([phone])) [part='overlay'] {
16
- min-width: var(--vaadin-select-overlay-width, var(--_vaadin-select-overlay-default-width));
17
- }
14
+ :host(:not([phone])) [part='overlay'] {
15
+ min-width: var(--vaadin-select-overlay-width, var(--_vaadin-select-overlay-default-width));
16
+ }
18
17
 
19
- [part='content'] {
20
- padding: var(--vaadin-item-overlay-padding, 4px);
21
- }
18
+ [part='content'] {
19
+ padding: var(--vaadin-item-overlay-padding, 4px);
22
20
  }
23
21
  `;
@@ -6,27 +6,25 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const valueButton = css`
9
- @layer base {
10
- :host {
11
- min-height: 1lh;
12
- outline: none;
13
- overflow: hidden;
14
- white-space: nowrap;
15
- width: 100%;
16
- }
9
+ :host {
10
+ min-height: 1lh;
11
+ outline: none;
12
+ overflow: hidden;
13
+ white-space: nowrap;
14
+ width: 100%;
15
+ }
17
16
 
18
- ::slotted(*) {
19
- padding: 0;
20
- cursor: inherit;
21
- }
17
+ ::slotted(*) {
18
+ padding: 0;
19
+ cursor: inherit;
20
+ }
22
21
 
23
- .vaadin-button-container,
24
- [part='label'] {
25
- display: contents;
26
- }
22
+ .vaadin-button-container,
23
+ [part='label'] {
24
+ display: contents;
25
+ }
27
26
 
28
- :host([disabled]) {
29
- pointer-events: none;
30
- }
27
+ :host([disabled]) {
28
+ pointer-events: none;
31
29
  }
32
30
  `;
@@ -204,6 +204,15 @@ export const SelectBaseMixin = (superClass) =>
204
204
  this.addController(this._tooltipController);
205
205
  }
206
206
 
207
+ /** @protected */
208
+ updated(props) {
209
+ super.updated(props);
210
+
211
+ if (props.has('_phone')) {
212
+ this.toggleAttribute('phone', this._phone);
213
+ }
214
+ }
215
+
207
216
  /**
208
217
  * Requests an update for the content of the select.
209
218
  * While performing the update, it invokes the renderer passed in the `renderer` property.
@@ -216,10 +225,6 @@ export const SelectBaseMixin = (superClass) =>
216
225
  }
217
226
 
218
227
  this._overlayElement.requestContentUpdate();
219
-
220
- if (this._menuElement && this._menuElement.items) {
221
- this._updateSelectedItem(this.value, this._menuElement.items);
222
- }
223
228
  }
224
229
 
225
230
  /**
@@ -280,6 +285,12 @@ export const SelectBaseMixin = (superClass) =>
280
285
  // Store the menu element reference
281
286
  this.__lastMenuElement = menuElement;
282
287
  }
288
+
289
+ // When the renderer was re-assigned so that menu element is preserved
290
+ // but its items have changed, make sure selected property is updated.
291
+ if (this._menuElement && this._menuElement.items) {
292
+ this._updateSelectedItem(this.value, this._menuElement.items);
293
+ }
283
294
  }
284
295
 
285
296
  /** @private */
@@ -361,8 +372,16 @@ export const SelectBaseMixin = (superClass) =>
361
372
  * @protected
362
373
  */
363
374
  _onKeyDownInside(e) {
364
- if (/^(Tab)$/u.test(e.key)) {
375
+ if (e.key === 'Tab') {
376
+ // Temporarily set tabindex to prevent moving focus
377
+ // to the value button element on item Shift + Tab
378
+ this.focusElement.setAttribute('tabindex', '-1');
379
+ this._overlayElement.restoreFocusOnClose = false;
365
380
  this.opened = false;
381
+ setTimeout(() => {
382
+ this.focusElement.setAttribute('tabindex', '0');
383
+ this._overlayElement.restoreFocusOnClose = true;
384
+ });
366
385
  }
367
386
  }
368
387
 
@@ -585,8 +604,8 @@ export const SelectBaseMixin = (superClass) =>
585
604
  * @protected
586
605
  * @override
587
606
  */
588
- _shouldRemoveFocus() {
589
- return !this.opened;
607
+ _shouldRemoveFocus(event) {
608
+ return !this.contains(event.relatedTarget);
590
609
  }
591
610
 
592
611
  /**
@@ -22,7 +22,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
22
22
  * @mixes ThemableMixin
23
23
  * @protected
24
24
  */
25
- class SelectItem extends ItemMixin(ThemableMixin(DirMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
25
+ class SelectItem extends ItemMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
26
26
  static get is() {
27
27
  return 'vaadin-select-item';
28
28
  }
@@ -22,7 +22,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
22
22
  * @mixes ThemableMixin
23
23
  * @protected
24
24
  */
25
- class SelectListBox extends ListMixin(ThemableMixin(DirMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
25
+ class SelectListBox extends ListMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
26
26
  static get is() {
27
27
  return 'vaadin-select-list-box';
28
28
  }
@@ -26,6 +26,37 @@ export const SelectOverlayMixin = (superClass) =>
26
26
  this.restoreFocusOnClose = true;
27
27
  }
28
28
 
29
+ /**
30
+ * @override
31
+ * @protected
32
+ */
33
+ get _contentRoot() {
34
+ if (!this.__savedRoot) {
35
+ const root = document.createElement('div');
36
+ root.setAttribute('slot', 'overlay');
37
+ this.owner.appendChild(root);
38
+ this.__savedRoot = root;
39
+ }
40
+
41
+ return this.__savedRoot;
42
+ }
43
+
44
+ /**
45
+ * @protected
46
+ * @override
47
+ */
48
+ _attachOverlay() {
49
+ this.showPopover();
50
+ }
51
+
52
+ /**
53
+ * @protected
54
+ * @override
55
+ */
56
+ _detachOverlay() {
57
+ this.hidePopover();
58
+ }
59
+
29
60
  /**
30
61
  * Override method inherited from `Overlay` to always close on outside click,
31
62
  * in order to avoid problem when using inside of the modeless dialog.
@@ -51,22 +82,13 @@ export const SelectOverlayMixin = (superClass) =>
51
82
 
52
83
  /** @protected */
53
84
  _getMenuElement() {
54
- return Array.from(this.children).find((el) => el.localName !== 'style');
85
+ return Array.from(this._contentRoot.children).find((el) => el.localName !== 'style');
55
86
  }
56
87
 
57
88
  /** @private */
58
89
  _updateOverlayWidth(opened, positionTarget) {
59
90
  if (opened && positionTarget) {
60
91
  this.style.setProperty('--_vaadin-select-overlay-default-width', `${positionTarget.offsetWidth}px`);
61
-
62
- const widthProperty = '--vaadin-select-overlay-width';
63
- const customWidth = getComputedStyle(this.owner).getPropertyValue(widthProperty);
64
-
65
- if (customWidth === '') {
66
- this.style.removeProperty(widthProperty);
67
- } else {
68
- this.style.setProperty(widthProperty, customWidth);
69
- }
70
92
  }
71
93
  }
72
94
 
@@ -21,7 +21,7 @@ import { SelectOverlayMixin } from './vaadin-select-overlay-mixin.js';
21
21
  * @mixes ThemableMixin
22
22
  * @private
23
23
  */
24
- export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))) {
24
+ export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
25
25
  static get is() {
26
26
  return 'vaadin-select-overlay';
27
27
  }
@@ -34,7 +34,7 @@ export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(LumoInjectio
34
34
  render() {
35
35
  return html`
36
36
  <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
37
- <div part="overlay" id="overlay" tabindex="0">
37
+ <div part="overlay" id="overlay">
38
38
  <div part="content" id="content">
39
39
  <slot></slot>
40
40
  </div>
@@ -20,7 +20,7 @@ import { valueButton } from './styles/vaadin-select-value-button-core-styles.js'
20
20
  * @mixes ThemableMixin
21
21
  * @protected
22
22
  */
23
- class SelectValueButton extends ButtonMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))) {
23
+ class SelectValueButton extends ButtonMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
24
24
  static get is() {
25
25
  return 'vaadin-select-value-button';
26
26
  }
@@ -126,10 +126,10 @@ export interface SelectEventMap extends HTMLElementEventMap, SelectCustomEventMa
126
126
  *
127
127
  * The following custom properties are available for styling:
128
128
  *
129
- * Custom property | Description | Target element | Default
130
- * -----------------------------------|------------------------------|-------------------------|--------
131
- * `--vaadin-field-default-width` | Default width of the field | :host | `12em`
132
- * `--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |
129
+ * Custom property | Description | Default
130
+ * ---------------------------------|-----------------------------|--------
131
+ * `--vaadin-field-default-width` | Default width of the field | `12em`
132
+ * `--vaadin-select-overlay-width` | Width of the overlay |
133
133
  *
134
134
  * `<vaadin-select>` provides mostly the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
135
135
  * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
@@ -137,15 +137,19 @@ export interface SelectEventMap extends HTMLElementEventMap, SelectCustomEventMa
137
137
  *
138
138
  * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
139
139
  *
140
- * Part name | Description
141
- * ----------------|----------------
142
- * `toggle-button` | The toggle button
140
+ * Part name | Description
141
+ * -----------------|----------------
142
+ * `toggle-button` | The toggle button
143
+ * `backdrop` | Backdrop of the overlay
144
+ * `overlay` | The overlay container
145
+ * `content` | The overlay content
143
146
  *
144
147
  * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:
145
148
  *
146
- * Attribute | Description | Part name
147
- * ----------|-----------------------------|-----------
148
- * `opened` | Set when the select is open | :host
149
+ * Attribute | Description
150
+ * ----------|-----------------------------
151
+ * `opened` | Set when the select is open
152
+ * `phone` | Set when the overlay is shown in phone mode
149
153
  *
150
154
  * There are two exceptions in terms of styling compared to `<vaadin-text-field>`:
151
155
  * - the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.
@@ -80,10 +80,10 @@ import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
80
80
  *
81
81
  * The following custom properties are available for styling:
82
82
  *
83
- * Custom property | Description | Target element | Default
84
- * -----------------------------------|------------------------------|-------------------------|--------
85
- * `--vaadin-field-default-width` | Default width of the field | :host | `12em`
86
- * `--vaadin-select-overlay-width` | Width of the overlay | `vaadin-select-overlay` |
83
+ * Custom property | Description | Default
84
+ * ---------------------------------|-----------------------------|--------
85
+ * `--vaadin-field-default-width` | Default width of the field | `12em`
86
+ * `--vaadin-select-overlay-width` | Width of the overlay |
87
87
  *
88
88
  * `<vaadin-select>` provides mostly the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
89
89
  * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
@@ -91,15 +91,19 @@ import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
91
91
  *
92
92
  * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
93
93
  *
94
- * Part name | Description
95
- * ----------------|----------------
96
- * `toggle-button` | The toggle button
94
+ * Part name | Description
95
+ * -----------------|----------------
96
+ * `toggle-button` | The toggle button
97
+ * `backdrop` | Backdrop of the overlay
98
+ * `overlay` | The overlay container
99
+ * `content` | The overlay content
97
100
  *
98
101
  * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:
99
102
  *
100
- * Attribute | Description | Part name
101
- * ----------|-----------------------------|-----------
102
- * `opened` | Set when the select is open | :host
103
+ * Attribute | Description
104
+ * ----------|-----------------------------
105
+ * `opened` | Set when the select is open
106
+ * `phone` | Set when the overlay is shown in phone mode
103
107
  *
104
108
  * There are two exceptions in terms of styling compared to `<vaadin-text-field>`:
105
109
  * - the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.
@@ -131,7 +135,7 @@ import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
131
135
  * @mixes SelectBaseMixin
132
136
  * @mixes ThemableMixin
133
137
  */
134
- class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
138
+ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
135
139
  static get is() {
136
140
  return 'vaadin-select';
137
141
  }
@@ -173,6 +177,7 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(LumoInjectionMix
173
177
 
174
178
  <vaadin-select-overlay
175
179
  id="overlay"
180
+ popover="manual"
176
181
  .owner="${this}"
177
182
  .positionTarget="${this._inputContainer}"
178
183
  .opened="${this.opened}"
@@ -181,9 +186,12 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(LumoInjectionMix
181
186
  ?phone="${this._phone}"
182
187
  theme="${ifDefined(this._theme)}"
183
188
  ?no-vertical-overlap="${this.noVerticalOverlap}"
189
+ exportparts="backdrop, overlay, content"
184
190
  @opened-changed="${this._onOpenedChanged}"
185
191
  @vaadin-overlay-open="${this._onOverlayOpen}"
186
- ></vaadin-select-overlay>
192
+ >
193
+ <slot name="overlay"></slot>
194
+ </vaadin-select-overlay>
187
195
 
188
196
  <slot name="tooltip"></slot>
189
197
  <div class="sr-only">
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": "25.0.0-alpha6",
4
+ "version": "25.0.0-alpha8",
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-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/25.0.0-alpha6/#/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/25.0.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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.",
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\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/25.0.0-alpha8/#/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`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|-----------------------------\n`opened` | Set when the select is open\n`phone` | Set when the overlay is shown in phone mode\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/25.0.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/select",
4
- "version": "25.0.0-alpha6",
4
+ "version": "25.0.0-alpha8",
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-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/25.0.0-alpha6/#/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/25.0.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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.",
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\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/25.0.0-alpha8/#/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`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|-----------------------------\n`opened` | Set when the select is open\n`phone` | Set when the overlay is shown in phone mode\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/25.0.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/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
  {