@vaadin/select 25.0.0-alpha3 → 25.0.0-alpha5
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 +17 -17
- package/src/vaadin-select-base-mixin.js +1 -7
- package/src/vaadin-select-item.js +3 -2
- package/src/vaadin-select-list-box.js +3 -2
- package/src/vaadin-select-overlay.js +4 -3
- package/src/vaadin-select-value-button.js +3 -2
- package/src/vaadin-select.js +3 -2
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- /package/src/{vaadin-select-base-styles.d.ts → styles/vaadin-select-base-styles.d.ts} +0 -0
- /package/src/{vaadin-select-base-styles.js → styles/vaadin-select-base-styles.js} +0 -0
- /package/src/{vaadin-select-core-styles.d.ts → styles/vaadin-select-core-styles.d.ts} +0 -0
- /package/src/{vaadin-select-core-styles.js → styles/vaadin-select-core-styles.js} +0 -0
- /package/src/{vaadin-select-overlay-base-styles.js → styles/vaadin-select-overlay-base-styles.js} +0 -0
- /package/src/{vaadin-select-overlay-core-styles.js → styles/vaadin-select-overlay-core-styles.js} +0 -0
- /package/src/{vaadin-select-value-button-base-styles.js → styles/vaadin-select-value-button-base-styles.js} +0 -0
- /package/src/{vaadin-select-value-button-core-styles.js → styles/vaadin-select-value-button-core-styles.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/select",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"lit.d.ts",
|
|
24
24
|
"lit.js",
|
|
25
25
|
"src",
|
|
26
|
-
"!src/*-base-styles.d.ts",
|
|
27
|
-
"!src/*-base-styles.js",
|
|
26
|
+
"!src/styles/*-base-styles.d.ts",
|
|
27
|
+
"!src/styles/*-base-styles.js",
|
|
28
28
|
"theme",
|
|
29
29
|
"vaadin-*.d.ts",
|
|
30
30
|
"vaadin-*.js",
|
|
@@ -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-
|
|
43
|
-
"@vaadin/button": "25.0.0-
|
|
44
|
-
"@vaadin/component-base": "25.0.0-
|
|
45
|
-
"@vaadin/field-base": "25.0.0-
|
|
46
|
-
"@vaadin/input-container": "25.0.0-
|
|
47
|
-
"@vaadin/item": "25.0.0-
|
|
48
|
-
"@vaadin/list-box": "25.0.0-
|
|
49
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
50
|
-
"@vaadin/overlay": "25.0.0-
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
52
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
42
|
+
"@vaadin/a11y-base": "25.0.0-alpha5",
|
|
43
|
+
"@vaadin/button": "25.0.0-alpha5",
|
|
44
|
+
"@vaadin/component-base": "25.0.0-alpha5",
|
|
45
|
+
"@vaadin/field-base": "25.0.0-alpha5",
|
|
46
|
+
"@vaadin/input-container": "25.0.0-alpha5",
|
|
47
|
+
"@vaadin/item": "25.0.0-alpha5",
|
|
48
|
+
"@vaadin/list-box": "25.0.0-alpha5",
|
|
49
|
+
"@vaadin/lit-renderer": "25.0.0-alpha5",
|
|
50
|
+
"@vaadin/overlay": "25.0.0-alpha5",
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha5",
|
|
52
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha5",
|
|
53
53
|
"lit": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
57
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
56
|
+
"@vaadin/chai-plugins": "25.0.0-alpha5",
|
|
57
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha5",
|
|
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": "
|
|
65
|
+
"gitHead": "7dc87bb2a3cae81ed53259fa10b58f990d50c6fd"
|
|
66
66
|
}
|
|
@@ -644,13 +644,7 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
/** @private */
|
|
647
|
-
|
|
648
|
-
// Wait for the update complete to guarantee that value-changed is fired
|
|
649
|
-
// before validated and change events when using the Lit version of the component.
|
|
650
|
-
if (this.updateComplete) {
|
|
651
|
-
await this.updateComplete;
|
|
652
|
-
}
|
|
653
|
-
|
|
647
|
+
__dispatchChange() {
|
|
654
648
|
this._requestValidation();
|
|
655
649
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
656
650
|
this.__dispatchChangePending = false;
|
|
@@ -7,8 +7,9 @@ import { html, LitElement } from 'lit';
|
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
-
import { itemStyles } from '@vaadin/item/src/vaadin-item-core-styles.js';
|
|
10
|
+
import { itemStyles } from '@vaadin/item/src/styles/vaadin-item-core-styles.js';
|
|
11
11
|
import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
|
|
12
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
12
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -21,7 +22,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
21
22
|
* @mixes ThemableMixin
|
|
22
23
|
* @protected
|
|
23
24
|
*/
|
|
24
|
-
class SelectItem extends ItemMixin(ThemableMixin(DirMixin(PolylitMixin(LitElement)))) {
|
|
25
|
+
class SelectItem extends ItemMixin(ThemableMixin(DirMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
|
|
25
26
|
static get is() {
|
|
26
27
|
return 'vaadin-select-item';
|
|
27
28
|
}
|
|
@@ -8,7 +8,8 @@ import { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';
|
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import { listBoxStyles } from '@vaadin/list-box/src/vaadin-list-box-core-styles.js';
|
|
11
|
+
import { listBoxStyles } from '@vaadin/list-box/src/styles/vaadin-list-box-core-styles.js';
|
|
12
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
12
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -21,7 +22,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
21
22
|
* @mixes ThemableMixin
|
|
22
23
|
* @protected
|
|
23
24
|
*/
|
|
24
|
-
class SelectListBox extends ListMixin(ThemableMixin(DirMixin(PolylitMixin(LitElement)))) {
|
|
25
|
+
class SelectListBox extends ListMixin(ThemableMixin(DirMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
|
|
25
26
|
static get is() {
|
|
26
27
|
return 'vaadin-select-list-box';
|
|
27
28
|
}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
import { html, LitElement } from 'lit';
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
|
-
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
9
|
+
import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-core-styles.js';
|
|
10
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
10
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { selectOverlayStyles } from './vaadin-select-overlay-core-styles.js';
|
|
12
|
+
import { selectOverlayStyles } from './styles/vaadin-select-overlay-core-styles.js';
|
|
12
13
|
import { SelectOverlayMixin } from './vaadin-select-overlay-mixin.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -20,7 +21,7 @@ import { SelectOverlayMixin } from './vaadin-select-overlay-mixin.js';
|
|
|
20
21
|
* @mixes ThemableMixin
|
|
21
22
|
* @private
|
|
22
23
|
*/
|
|
23
|
-
export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
24
|
+
export class SelectOverlay extends SelectOverlayMixin(ThemableMixin(CSSInjectionMixin(PolylitMixin(LitElement)))) {
|
|
24
25
|
static get is() {
|
|
25
26
|
return 'vaadin-select-overlay';
|
|
26
27
|
}
|
|
@@ -7,8 +7,9 @@ import { html, LitElement } from 'lit';
|
|
|
7
7
|
import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
10
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { valueButton } from './vaadin-select-value-button-core-styles.js';
|
|
12
|
+
import { valueButton } from './styles/vaadin-select-value-button-core-styles.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* An element used internally by `<vaadin-select>`. Not intended to be used separately.
|
|
@@ -19,7 +20,7 @@ import { valueButton } from './vaadin-select-value-button-core-styles.js';
|
|
|
19
20
|
* @mixes ThemableMixin
|
|
20
21
|
* @protected
|
|
21
22
|
*/
|
|
22
|
-
class SelectValueButton extends ButtonMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
23
|
+
class SelectValueButton extends ButtonMixin(ThemableMixin(CSSInjectionMixin(PolylitMixin(LitElement)))) {
|
|
23
24
|
static get is() {
|
|
24
25
|
return 'vaadin-select-value-button';
|
|
25
26
|
}
|
package/src/vaadin-select.js
CHANGED
|
@@ -15,9 +15,10 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
|
15
15
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
16
16
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
17
17
|
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
18
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
18
19
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
20
|
+
import { selectStyles } from './styles/vaadin-select-core-styles.js';
|
|
19
21
|
import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
|
|
20
|
-
import { selectStyles } from './vaadin-select-core-styles.js';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* `<vaadin-select>` is a Web Component for selecting values from a list of items.
|
|
@@ -131,7 +132,7 @@ import { selectStyles } from './vaadin-select-core-styles.js';
|
|
|
131
132
|
* @mixes SelectBaseMixin
|
|
132
133
|
* @mixes ThemableMixin
|
|
133
134
|
*/
|
|
134
|
-
class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
135
|
+
class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
|
|
135
136
|
static get is() {
|
|
136
137
|
return 'vaadin-select';
|
|
137
138
|
}
|
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-
|
|
4
|
+
"version": "25.0.0-alpha5",
|
|
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/25.0.0-
|
|
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/25.0.0-alpha5/#/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-alpha5/#/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-alpha5/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha5/#/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": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha5",
|
|
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/25.0.0-
|
|
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/25.0.0-alpha5/#/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-alpha5/#/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-alpha5/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha5/#/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
|
{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{vaadin-select-overlay-base-styles.js → styles/vaadin-select-overlay-base-styles.js}
RENAMED
|
File without changes
|
/package/src/{vaadin-select-overlay-core-styles.js → styles/vaadin-select-overlay-core-styles.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|