@vaadin/select 25.3.0-alpha6 → 25.3.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.
@@ -270,7 +270,8 @@
270
270
  {
271
271
  "kind": "method",
272
272
  "name": "requestContentUpdate",
273
- "description": "Requests an update for the content of the select.\nWhile performing the update, it invokes the renderer passed in the `renderer` property.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
273
+ "description": "Requests an update for the content of the select.\nWhile performing the update, it invokes the renderer passed in the `renderer` property.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
274
+ "deprecated": "This method is deprecated and will be removed in Vaadin 26"
274
275
  },
275
276
  {
276
277
  "kind": "field",
@@ -626,6 +627,13 @@
626
627
  "name": "ItemMixin",
627
628
  "package": "@vaadin/item/src/vaadin-item-mixin.js"
628
629
  }
630
+ },
631
+ {
632
+ "type": {
633
+ "text": "string"
634
+ },
635
+ "description": "The theme variants to apply to the component.",
636
+ "name": "theme"
629
637
  }
630
638
  ],
631
639
  "mixins": [
@@ -774,6 +782,13 @@
774
782
  "name": "ListMixin",
775
783
  "package": "@vaadin/a11y-base/src/list-mixin.js"
776
784
  }
785
+ },
786
+ {
787
+ "type": {
788
+ "text": "string"
789
+ },
790
+ "description": "The theme variants to apply to the component.",
791
+ "name": "theme"
777
792
  }
778
793
  ],
779
794
  "mixins": [
@@ -1586,6 +1601,7 @@
1586
1601
  "kind": "method",
1587
1602
  "name": "requestContentUpdate",
1588
1603
  "description": "Requests an update for the content of the select.\nWhile performing the update, it invokes the renderer passed in the `renderer` property.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
1604
+ "deprecated": "This method is deprecated and will be removed in Vaadin 26",
1589
1605
  "inheritedFrom": {
1590
1606
  "name": "SelectBaseMixin",
1591
1607
  "module": "src/vaadin-select-base-mixin.js"
@@ -1679,34 +1695,6 @@
1679
1695
  "name": "value-changed"
1680
1696
  }
1681
1697
  ],
1682
- "mixins": [
1683
- {
1684
- "name": "SelectBaseMixin",
1685
- "module": "src/vaadin-select-base-mixin.js"
1686
- },
1687
- {
1688
- "name": "ElementMixin",
1689
- "package": "@vaadin/component-base/src/element-mixin.js"
1690
- },
1691
- {
1692
- "name": "ThemableMixin",
1693
- "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
1694
- },
1695
- {
1696
- "name": "PolylitMixin",
1697
- "package": "@vaadin/component-base/src/polylit-mixin.js"
1698
- },
1699
- {
1700
- "name": "LumoInjectionMixin",
1701
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
1702
- }
1703
- ],
1704
- "superclass": {
1705
- "name": "LitElement",
1706
- "package": "lit"
1707
- },
1708
- "tagName": "vaadin-select",
1709
- "customElement": true,
1710
1698
  "attributes": [
1711
1699
  {
1712
1700
  "name": "accessible-name",
@@ -1901,6 +1889,13 @@
1901
1889
  "package": "@vaadin/field-base/src/validate-mixin.js"
1902
1890
  }
1903
1891
  },
1892
+ {
1893
+ "type": {
1894
+ "text": "string"
1895
+ },
1896
+ "description": "The theme variants to apply to the component.",
1897
+ "name": "theme"
1898
+ },
1904
1899
  {
1905
1900
  "name": "value",
1906
1901
  "type": {
@@ -1913,7 +1908,35 @@
1913
1908
  "module": "src/vaadin-select-base-mixin.js"
1914
1909
  }
1915
1910
  }
1916
- ]
1911
+ ],
1912
+ "mixins": [
1913
+ {
1914
+ "name": "SelectBaseMixin",
1915
+ "module": "src/vaadin-select-base-mixin.js"
1916
+ },
1917
+ {
1918
+ "name": "ElementMixin",
1919
+ "package": "@vaadin/component-base/src/element-mixin.js"
1920
+ },
1921
+ {
1922
+ "name": "ThemableMixin",
1923
+ "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
1924
+ },
1925
+ {
1926
+ "name": "PolylitMixin",
1927
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
1928
+ },
1929
+ {
1930
+ "name": "LumoInjectionMixin",
1931
+ "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
1932
+ }
1933
+ ],
1934
+ "superclass": {
1935
+ "name": "LitElement",
1936
+ "package": "lit"
1937
+ },
1938
+ "tagName": "vaadin-select",
1939
+ "customElement": true
1917
1940
  }
1918
1941
  ],
1919
1942
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/select",
3
- "version": "25.3.0-alpha6",
3
+ "version": "25.3.0-alpha8",
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.3.0-alpha6",
41
- "@vaadin/button": "25.3.0-alpha6",
42
- "@vaadin/component-base": "25.3.0-alpha6",
43
- "@vaadin/field-base": "25.3.0-alpha6",
44
- "@vaadin/input-container": "25.3.0-alpha6",
45
- "@vaadin/item": "25.3.0-alpha6",
46
- "@vaadin/list-box": "25.3.0-alpha6",
47
- "@vaadin/lit-renderer": "25.3.0-alpha6",
48
- "@vaadin/overlay": "25.3.0-alpha6",
49
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha6",
40
+ "@vaadin/a11y-base": "25.3.0-alpha8",
41
+ "@vaadin/button": "25.3.0-alpha8",
42
+ "@vaadin/component-base": "25.3.0-alpha8",
43
+ "@vaadin/field-base": "25.3.0-alpha8",
44
+ "@vaadin/input-container": "25.3.0-alpha8",
45
+ "@vaadin/item": "25.3.0-alpha8",
46
+ "@vaadin/list-box": "25.3.0-alpha8",
47
+ "@vaadin/lit-renderer": "25.3.0-alpha8",
48
+ "@vaadin/overlay": "25.3.0-alpha8",
49
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha8",
50
50
  "lit": "^3.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@vaadin/aura": "25.3.0-alpha6",
54
- "@vaadin/chai-plugins": "25.3.0-alpha6",
55
- "@vaadin/test-runner-commands": "25.3.0-alpha6",
53
+ "@vaadin/aura": "25.3.0-alpha8",
54
+ "@vaadin/chai-plugins": "25.3.0-alpha8",
55
+ "@vaadin/test-runner-commands": "25.3.0-alpha8",
56
56
  "@vaadin/testing-helpers": "^2.0.0",
57
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha6",
57
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha8",
58
58
  "sinon": "^22.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": "92c124fb9cff367bc07e734d8e65707facd0bd43"
65
+ "gitHead": "ccbb4aaffb63c745c6da0426b532d4d05e47af29"
66
66
  }
@@ -112,6 +112,8 @@ export declare class SelectBaseMixinClass {
112
112
  * While performing the update, it invokes the renderer passed in the `renderer` property.
113
113
  *
114
114
  * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
115
+ *
116
+ * @deprecated This method is deprecated and will be removed in Vaadin 26
115
117
  */
116
118
  requestContentUpdate(): void;
117
119
  }
@@ -10,7 +10,6 @@ import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mi
10
10
  import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
11
11
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
12
12
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
13
- import { issueWarning } from '@vaadin/component-base/src/warnings.js';
14
13
  import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
15
14
  import { LabelController } from '@vaadin/field-base/src/label-controller.js';
16
15
  import { ButtonController } from './button-controller.js';
@@ -42,7 +41,6 @@ export const SelectBaseMixin = (superClass) =>
42
41
  */
43
42
  items: {
44
43
  type: Array,
45
- observer: '__itemsChanged',
46
44
  },
47
45
 
48
46
  /**
@@ -212,17 +210,21 @@ export const SelectBaseMixin = (superClass) =>
212
210
  this.toggleAttribute('phone', this._phone);
213
211
  }
214
212
 
213
+ if (props.has('items') || props.has('renderer') || props.has('__slottedListBox')) {
214
+ if (this.__slottedListBox && (this.items?.length || this.renderer)) {
215
+ throw new Error(
216
+ 'A slotted <vaadin-select-list-box> cannot be used together with the "items" or "renderer" property.',
217
+ );
218
+ }
219
+ }
220
+
221
+ if (props.has('items')) {
222
+ this._overlayElement.requestContentUpdate();
223
+ }
224
+
215
225
  if (props.has('__slottedListBox')) {
216
226
  const slottedListBox = this.__slottedListBox;
217
227
  if (slottedListBox) {
218
- // Slotted list-box takes precedence over the `renderer` and `items`.
219
- if (this.items?.length || this.renderer) {
220
- issueWarning(
221
- 'WARNING: Both a slotted <vaadin-select-list-box> and the "items" / "renderer"' +
222
- ' property are set on <vaadin-select>. The slotted list-box takes precedence.',
223
- );
224
- }
225
-
226
228
  this._assignMenuElement(slottedListBox);
227
229
  } else if (props.get('__slottedListBox')) {
228
230
  this._menuElement = null;
@@ -237,6 +239,8 @@ export const SelectBaseMixin = (superClass) =>
237
239
  * While performing the update, it invokes the renderer passed in the `renderer` property.
238
240
  *
239
241
  * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
242
+ *
243
+ * @deprecated This method is deprecated and will be removed in Vaadin 26
240
244
  */
241
245
  requestContentUpdate() {
242
246
  if (!this._overlayElement) {
@@ -261,17 +265,6 @@ export const SelectBaseMixin = (superClass) =>
261
265
  }
262
266
  }
263
267
 
264
- /**
265
- * @param {SelectItemData[] | undefined | null} newItems
266
- * @param {SelectItemData[] | undefined | null} oldItems
267
- * @private
268
- */
269
- __itemsChanged(newItems, oldItems) {
270
- if (newItems || oldItems) {
271
- this.requestContentUpdate();
272
- }
273
- }
274
-
275
268
  /**
276
269
  * Detects a `<vaadin-select-list-box>` slotted directly into the overlay
277
270
  * slot (instead of the default one rendered into slotted `div` element).
@@ -693,11 +686,6 @@ export const SelectBaseMixin = (superClass) =>
693
686
  * @private
694
687
  */
695
688
  __defaultRenderer(root, _select) {
696
- if (this.__slottedListBox) {
697
- root.textContent = '';
698
- return;
699
- }
700
-
701
689
  if (!this.items || this.items.length === 0) {
702
690
  root.textContent = '';
703
691
  return;
@@ -48,6 +48,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
48
48
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
49
49
  *
50
50
  * @prop {string} label - String that can be set to visually represent the selected item in `vaadin-select`.
51
+ * @attr {string} theme - The theme variants to apply to the component.
51
52
  * @customElement vaadin-select-item
52
53
  * @extends HTMLElement
53
54
  */
@@ -34,6 +34,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
34
34
  *
35
35
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
36
36
  *
37
+ * @attr {string} theme - The theme variants to apply to the component.
37
38
  * @customElement vaadin-select-list-box
38
39
  * @extends HTMLElement
39
40
  */
@@ -15,6 +15,7 @@ import { SelectOverlayMixin } from './vaadin-select-overlay-mixin.js';
15
15
  /**
16
16
  * An element used internally by `<vaadin-select>`. Not intended to be used separately.
17
17
  *
18
+ * @attr {string} theme - The theme variants to apply to the component.
18
19
  * @customElement vaadin-select-overlay
19
20
  * @extends HTMLElement
20
21
  * @private
@@ -14,6 +14,7 @@ import { valueButton } from './styles/vaadin-select-value-button-base-styles.js'
14
14
  /**
15
15
  * An element used internally by `<vaadin-select>`. Not intended to be used separately.
16
16
  *
17
+ * @attr {string} theme - The theme variants to apply to the component.
17
18
  * @customElement vaadin-select-value-button
18
19
  * @extends HTMLElement
19
20
  * @protected
@@ -150,6 +150,7 @@ import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
150
150
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
151
151
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
152
152
  *
153
+ * @attr {string} theme - The theme variants to apply to the component.
153
154
  * @customElement vaadin-select
154
155
  * @extends HTMLElement
155
156
  */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/select",
4
- "version": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -33,9 +33,7 @@
33
33
  "description": "The theme variants to apply to the component.",
34
34
  "value": {
35
35
  "type": [
36
- "string",
37
- "null",
38
- "undefined"
36
+ "string"
39
37
  ]
40
38
  }
41
39
  }
@@ -109,9 +107,7 @@
109
107
  "description": "The theme variants to apply to the component.",
110
108
  "value": {
111
109
  "type": [
112
- "string",
113
- "null",
114
- "undefined"
110
+ "string"
115
111
  ]
116
112
  }
117
113
  }
@@ -142,7 +138,7 @@
142
138
  },
143
139
  {
144
140
  "name": "vaadin-select",
145
- "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 a slotted `<vaadin-select-list-box>`\nwith `<vaadin-select-item>` children:\n\n```html\n<vaadin-select>\n <vaadin-select-list-box slot=\"overlay\">\n <vaadin-select-item value=\"recent\">Most recent first</vaadin-select-item>\n <vaadin-select-item value=\"rating-asc\">Rating: low to high</vaadin-select-item>\n <vaadin-select-item value=\"rating-desc\">Rating: high to low</vaadin-select-item>\n </vaadin-select-list-box>\n</vaadin-select>\n```\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#### Renderer (deprecated)\n\nThe content of the select can also be populated by using the renderer callback function, although\nthis approach is deprecated in favor of the `items` property or a slotted `<vaadin-select-list-box>`.\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### 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 components are used\nand themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-button).\n- [`<vaadin-select-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-select-list-box) - a list-box element.\n- [`<vaadin-select-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-select-item) - an item element.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
141
+ "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 a slotted `<vaadin-select-list-box>`\nwith `<vaadin-select-item>` children:\n\n```html\n<vaadin-select>\n <vaadin-select-list-box slot=\"overlay\">\n <vaadin-select-item value=\"recent\">Most recent first</vaadin-select-item>\n <vaadin-select-item value=\"rating-asc\">Rating: low to high</vaadin-select-item>\n <vaadin-select-item value=\"rating-desc\">Rating: high to low</vaadin-select-item>\n </vaadin-select-list-box>\n</vaadin-select>\n```\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#### Renderer (deprecated)\n\nThe content of the select can also be populated by using the renderer callback function, although\nthis approach is deprecated in favor of the `items` property or a slotted `<vaadin-select-list-box>`.\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### 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 components are used\nand themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-button).\n- [`<vaadin-select-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-select-list-box) - a list-box element.\n- [`<vaadin-select-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-select-item) - an item element.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
146
142
  "attributes": [
147
143
  {
148
144
  "name": "accessible-name",
@@ -284,9 +280,7 @@
284
280
  "description": "The theme variants to apply to the component.",
285
281
  "value": {
286
282
  "type": [
287
- "string",
288
- "null",
289
- "undefined"
283
+ "string"
290
284
  ]
291
285
  }
292
286
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/select",
4
- "version": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -72,7 +72,7 @@
72
72
  },
73
73
  {
74
74
  "name": "vaadin-select",
75
- "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 a slotted `<vaadin-select-list-box>`\nwith `<vaadin-select-item>` children:\n\n```html\n<vaadin-select>\n <vaadin-select-list-box slot=\"overlay\">\n <vaadin-select-item value=\"recent\">Most recent first</vaadin-select-item>\n <vaadin-select-item value=\"rating-asc\">Rating: low to high</vaadin-select-item>\n <vaadin-select-item value=\"rating-desc\">Rating: high to low</vaadin-select-item>\n </vaadin-select-list-box>\n</vaadin-select>\n```\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#### Renderer (deprecated)\n\nThe content of the select can also be populated by using the renderer callback function, although\nthis approach is deprecated in favor of the `items` property or a slotted `<vaadin-select-list-box>`.\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### 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 components are used\nand themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-button).\n- [`<vaadin-select-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-select-list-box) - a list-box element.\n- [`<vaadin-select-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha6/#/elements/vaadin-select-item) - an item element.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
75
+ "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 a slotted `<vaadin-select-list-box>`\nwith `<vaadin-select-item>` children:\n\n```html\n<vaadin-select>\n <vaadin-select-list-box slot=\"overlay\">\n <vaadin-select-item value=\"recent\">Most recent first</vaadin-select-item>\n <vaadin-select-item value=\"rating-asc\">Rating: low to high</vaadin-select-item>\n <vaadin-select-item value=\"rating-desc\">Rating: high to low</vaadin-select-item>\n </vaadin-select-list-box>\n</vaadin-select>\n```\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#### Renderer (deprecated)\n\nThe content of the select can also be populated by using the renderer callback function, although\nthis approach is deprecated in favor of the `items` property or a slotted `<vaadin-select-list-box>`.\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### 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 components are used\nand themable:\n\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-button).\n- [`<vaadin-select-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-select-list-box) - a list-box element.\n- [`<vaadin-select-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-select-item) - an item element.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
76
76
  "extension": true,
77
77
  "attributes": [
78
78
  {