@vaadin/select 24.4.0-dev.b3e1d14600 → 24.5.0-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/package.json +14 -14
- package/src/button-controller.d.ts +1 -1
- package/src/button-controller.js +1 -1
- package/src/lit/renderer-directives.d.ts +1 -1
- package/src/lit/renderer-directives.js +1 -1
- package/src/vaadin-lit-select-item.d.ts +1 -1
- package/src/vaadin-lit-select-item.js +1 -1
- package/src/vaadin-lit-select-list-box.d.ts +1 -1
- package/src/vaadin-lit-select-list-box.js +1 -1
- package/src/vaadin-lit-select-overlay.js +1 -1
- package/src/vaadin-lit-select-value-button.js +1 -1
- package/src/vaadin-lit-select.d.ts +1 -1
- package/src/vaadin-lit-select.js +11 -2
- package/src/vaadin-select-base-mixin.d.ts +1 -1
- package/src/vaadin-select-base-mixin.js +25 -22
- package/src/vaadin-select-item.d.ts +1 -1
- package/src/vaadin-select-item.js +1 -1
- package/src/vaadin-select-list-box.d.ts +1 -1
- package/src/vaadin-select-list-box.js +1 -1
- package/src/vaadin-select-overlay.js +12 -1
- package/src/vaadin-select-value-button-styles.js +1 -1
- package/src/vaadin-select-value-button.js +1 -1
- package/src/vaadin-select.d.ts +1 -1
- package/src/vaadin-select.js +1 -1
- package/theme/lumo/vaadin-lit-select.d.ts +7 -0
- package/theme/lumo/vaadin-lit-select.js +1 -1
- package/theme/lumo/vaadin-select-styles.d.ts +9 -0
- package/theme/lumo/vaadin-select-styles.js +3 -2
- package/theme/lumo/vaadin-select.d.ts +7 -0
- package/theme/lumo/vaadin-select.js +1 -1
- package/theme/material/vaadin-lit-select.d.ts +7 -0
- package/theme/material/vaadin-lit-select.js +1 -1
- package/theme/material/vaadin-select-styles.d.ts +7 -0
- package/theme/material/vaadin-select-styles.js +1 -1
- package/theme/material/vaadin-select.d.ts +7 -0
- package/theme/material/vaadin-select.js +1 -1
- package/web-types.json +392 -0
- package/web-types.lit.json +181 -0
package/README.md
CHANGED
|
@@ -4,8 +4,7 @@ A web component for selecting a single value from a list of options presented in
|
|
|
4
4
|
|
|
5
5
|
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/select)
|
|
6
6
|
|
|
7
|
-
[](https://discord.gg/PHmkCKC)
|
|
7
|
+
[](https://www.npmjs.com/package/@vaadin/select)
|
|
9
8
|
|
|
10
9
|
```html
|
|
11
10
|
<vaadin-select label="Sort by"></vaadin-select>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/select",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.5.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.2.0",
|
|
42
|
-
"@vaadin/a11y-base": "24.
|
|
43
|
-
"@vaadin/button": "24.
|
|
44
|
-
"@vaadin/component-base": "24.
|
|
45
|
-
"@vaadin/field-base": "24.
|
|
46
|
-
"@vaadin/input-container": "24.
|
|
47
|
-
"@vaadin/item": "24.
|
|
48
|
-
"@vaadin/list-box": "24.
|
|
49
|
-
"@vaadin/lit-renderer": "24.
|
|
50
|
-
"@vaadin/overlay": "24.
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "24.
|
|
52
|
-
"@vaadin/vaadin-material-styles": "24.
|
|
53
|
-
"@vaadin/vaadin-themable-mixin": "24.
|
|
42
|
+
"@vaadin/a11y-base": "24.5.0-alpha1",
|
|
43
|
+
"@vaadin/button": "24.5.0-alpha1",
|
|
44
|
+
"@vaadin/component-base": "24.5.0-alpha1",
|
|
45
|
+
"@vaadin/field-base": "24.5.0-alpha1",
|
|
46
|
+
"@vaadin/input-container": "24.5.0-alpha1",
|
|
47
|
+
"@vaadin/item": "24.5.0-alpha1",
|
|
48
|
+
"@vaadin/list-box": "24.5.0-alpha1",
|
|
49
|
+
"@vaadin/lit-renderer": "24.5.0-alpha1",
|
|
50
|
+
"@vaadin/overlay": "24.5.0-alpha1",
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha1",
|
|
52
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha1",
|
|
53
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha1",
|
|
54
54
|
"lit": "^3.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "57806caac5468532a3b4e3dbdda730cd0fca193a"
|
|
66
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2023 Vaadin Ltd.
|
|
3
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
package/src/button-controller.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2023 Vaadin Ltd.
|
|
3
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { DirectiveResult } from 'lit/directive.js';
|
package/src/vaadin-lit-select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/src/vaadin-lit-input-container.js';
|
|
@@ -23,7 +23,7 @@ import { SelectBaseMixin } from './vaadin-select-base-mixin.js';
|
|
|
23
23
|
*
|
|
24
24
|
* ## Disclaimer
|
|
25
25
|
*
|
|
26
|
-
* This component is an experiment not
|
|
26
|
+
* This component is an experiment and not yet a part of Vaadin platform.
|
|
27
27
|
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
28
28
|
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
29
29
|
*
|
|
@@ -101,6 +101,15 @@ class Select extends SelectBaseMixin(ElementMixin(ThemableMixin(PolylitMixin(Lit
|
|
|
101
101
|
`;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/** @protected */
|
|
105
|
+
ready() {
|
|
106
|
+
super.ready();
|
|
107
|
+
|
|
108
|
+
const overlay = this.shadowRoot.querySelector('vaadin-select-overlay');
|
|
109
|
+
overlay.owner = this;
|
|
110
|
+
this._overlayElement = overlay;
|
|
111
|
+
}
|
|
112
|
+
|
|
104
113
|
/** @private */
|
|
105
114
|
_onOpenedChanged(event) {
|
|
106
115
|
this.opened = event.detail.value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { setAriaIDReference } from '@vaadin/a11y-base/src/aria-id-reference.js';
|
|
@@ -171,10 +171,6 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
171
171
|
ready() {
|
|
172
172
|
super.ready();
|
|
173
173
|
|
|
174
|
-
const overlay = this.shadowRoot.querySelector('vaadin-select-overlay');
|
|
175
|
-
overlay.owner = this;
|
|
176
|
-
this._overlayElement = overlay;
|
|
177
|
-
|
|
178
174
|
this._inputContainer = this.shadowRoot.querySelector('[part~="input-field"]');
|
|
179
175
|
|
|
180
176
|
this._valueButtonController = new ButtonController(this);
|
|
@@ -259,8 +255,10 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
259
255
|
menuElement.addEventListener('keydown', (e) => this._onKeyDownInside(e), true);
|
|
260
256
|
menuElement.addEventListener(
|
|
261
257
|
'click',
|
|
262
|
-
() => {
|
|
263
|
-
|
|
258
|
+
(e) => {
|
|
259
|
+
const item = e.composedPath().find((el) => el._hasVaadinItemMixin);
|
|
260
|
+
this.__dispatchChangePending = Boolean(item && item.value !== undefined && item.value !== this.value);
|
|
261
|
+
this.opened = false;
|
|
264
262
|
},
|
|
265
263
|
true,
|
|
266
264
|
);
|
|
@@ -510,24 +508,21 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
510
508
|
|
|
511
509
|
valueButton.removeAttribute('placeholder');
|
|
512
510
|
|
|
513
|
-
if (
|
|
514
|
-
if (this.placeholder) {
|
|
515
|
-
const item = this.__createItemElement({ label: this.placeholder });
|
|
516
|
-
this.__appendValueItemElement(item, valueButton);
|
|
517
|
-
valueButton.setAttribute('placeholder', '');
|
|
518
|
-
}
|
|
519
|
-
} else {
|
|
511
|
+
if (this._hasContent(selected)) {
|
|
520
512
|
this.__attachSelectedItem(selected);
|
|
513
|
+
} else if (this.placeholder) {
|
|
514
|
+
const item = this.__createItemElement({ label: this.placeholder });
|
|
515
|
+
this.__appendValueItemElement(item, valueButton);
|
|
516
|
+
valueButton.setAttribute('placeholder', '');
|
|
517
|
+
}
|
|
521
518
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
this.__dispatchChange();
|
|
528
|
-
}
|
|
529
|
-
delete this._selectedChanging;
|
|
519
|
+
if (!this._valueChanging && selected) {
|
|
520
|
+
this._selectedChanging = true;
|
|
521
|
+
this.value = selected.value || '';
|
|
522
|
+
if (this.__dispatchChangePending) {
|
|
523
|
+
this.__dispatchChange();
|
|
530
524
|
}
|
|
525
|
+
delete this._selectedChanging;
|
|
531
526
|
}
|
|
532
527
|
|
|
533
528
|
const labelledIdReferenceConfig =
|
|
@@ -539,6 +534,14 @@ export const SelectBaseMixin = (superClass) =>
|
|
|
539
534
|
}
|
|
540
535
|
}
|
|
541
536
|
|
|
537
|
+
/** @private */
|
|
538
|
+
_hasContent(item) {
|
|
539
|
+
if (!item) {
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
542
|
+
return Boolean(item.hasAttribute('label') ? item.getAttribute('label') : item.textContent.trim());
|
|
543
|
+
}
|
|
544
|
+
|
|
542
545
|
/** @private */
|
|
543
546
|
_updateSelectedItem(value, items) {
|
|
544
547
|
if (items) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -55,6 +55,17 @@ export class SelectOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableM
|
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/** @protected */
|
|
59
|
+
ready() {
|
|
60
|
+
super.ready();
|
|
61
|
+
|
|
62
|
+
// When setting `opened` as an attribute, the overlay is already teleported to body
|
|
63
|
+
// by the time when `ready()` callback of the `vaadin-select` is executed by Polymer,
|
|
64
|
+
// so querySelector() would return null. So we use this workaround to set properties.
|
|
65
|
+
this.owner = this.__dataHost;
|
|
66
|
+
this.owner._overlayElement = this;
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
requestContentUpdate() {
|
|
59
70
|
super.requestContentUpdate();
|
|
60
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
package/src/vaadin-select.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
package/src/vaadin-select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/src/vaadin-input-container.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
7
|
+
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
8
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
9
|
+
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
@@ -27,7 +27,7 @@ const select = css`
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
[part='input-field'] ::slotted([slot='value']) {
|
|
30
|
-
font-weight: 500;
|
|
30
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
@@ -79,6 +79,7 @@ registerStyles(
|
|
|
79
79
|
min-height: var(--_lumo-selected-item-height);
|
|
80
80
|
padding-top: var(--_lumo-selected-item-padding);
|
|
81
81
|
padding-bottom: var(--_lumo-selected-item-padding);
|
|
82
|
+
font-size: inherit;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
::slotted(*:hover) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js';
|
|
7
|
+
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js';
|
package/web-types.json
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/select",
|
|
4
|
+
"version": "24.5.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
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\n`<vaadin-select>` provides mostly the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-----------------------------|-----------\n`opened` | Set when the select is open | :host\n\nThere are two exceptions in terms of styling compared to `<vaadin-text-field>`:\n- the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.\n- the `input-prevented` state attribute is not supported by `<vaadin-select>`.\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-input-container) - an internal element wrapping the button.\n\nNote: the `theme` attribute value set on `<vaadin-select>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "disabled",
|
|
15
|
+
"description": "If true, the user cannot interact with this element.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "autofocus",
|
|
26
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"boolean",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "label",
|
|
37
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
38
|
+
"value": {
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "invalid",
|
|
48
|
+
"description": "Set to true when the field is invalid.",
|
|
49
|
+
"value": {
|
|
50
|
+
"type": [
|
|
51
|
+
"boolean",
|
|
52
|
+
"null",
|
|
53
|
+
"undefined"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "required",
|
|
59
|
+
"description": "Specifies that the user must fill in a value.",
|
|
60
|
+
"value": {
|
|
61
|
+
"type": [
|
|
62
|
+
"boolean",
|
|
63
|
+
"null",
|
|
64
|
+
"undefined"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "error-message",
|
|
70
|
+
"description": "Error to show when the field is invalid.",
|
|
71
|
+
"value": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"null",
|
|
75
|
+
"undefined"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "helper-text",
|
|
81
|
+
"description": "String used for the helper text.",
|
|
82
|
+
"value": {
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"null",
|
|
86
|
+
"undefined"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "accessible-name",
|
|
92
|
+
"description": "String used to label the component to screen reader users.",
|
|
93
|
+
"value": {
|
|
94
|
+
"type": [
|
|
95
|
+
"string",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "accessible-name-ref",
|
|
103
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
104
|
+
"value": {
|
|
105
|
+
"type": [
|
|
106
|
+
"string",
|
|
107
|
+
"null",
|
|
108
|
+
"undefined"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "overlay-class",
|
|
114
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": [
|
|
117
|
+
"string",
|
|
118
|
+
"null",
|
|
119
|
+
"undefined"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "opened",
|
|
125
|
+
"description": "Set when the select is open",
|
|
126
|
+
"value": {
|
|
127
|
+
"type": [
|
|
128
|
+
"boolean"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "value",
|
|
134
|
+
"description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
|
|
135
|
+
"value": {
|
|
136
|
+
"type": [
|
|
137
|
+
"string"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "name",
|
|
143
|
+
"description": "The name of this element.",
|
|
144
|
+
"value": {
|
|
145
|
+
"type": [
|
|
146
|
+
"string",
|
|
147
|
+
"null",
|
|
148
|
+
"undefined"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "placeholder",
|
|
154
|
+
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
|
|
155
|
+
"value": {
|
|
156
|
+
"type": [
|
|
157
|
+
"string",
|
|
158
|
+
"null",
|
|
159
|
+
"undefined"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "readonly",
|
|
165
|
+
"description": "When present, it specifies that the element is read-only.",
|
|
166
|
+
"value": {
|
|
167
|
+
"type": [
|
|
168
|
+
"boolean"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "theme",
|
|
174
|
+
"description": "The theme variants to apply to the component.",
|
|
175
|
+
"value": {
|
|
176
|
+
"type": [
|
|
177
|
+
"string",
|
|
178
|
+
"null",
|
|
179
|
+
"undefined"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"js": {
|
|
185
|
+
"properties": [
|
|
186
|
+
{
|
|
187
|
+
"name": "disabled",
|
|
188
|
+
"description": "If true, the user cannot interact with this element.",
|
|
189
|
+
"value": {
|
|
190
|
+
"type": [
|
|
191
|
+
"boolean",
|
|
192
|
+
"null",
|
|
193
|
+
"undefined"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "autofocus",
|
|
199
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
200
|
+
"value": {
|
|
201
|
+
"type": [
|
|
202
|
+
"boolean",
|
|
203
|
+
"null",
|
|
204
|
+
"undefined"
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "label",
|
|
210
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
211
|
+
"value": {
|
|
212
|
+
"type": [
|
|
213
|
+
"string",
|
|
214
|
+
"null",
|
|
215
|
+
"undefined"
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "invalid",
|
|
221
|
+
"description": "Set to true when the field is invalid.",
|
|
222
|
+
"value": {
|
|
223
|
+
"type": [
|
|
224
|
+
"boolean",
|
|
225
|
+
"null",
|
|
226
|
+
"undefined"
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "required",
|
|
232
|
+
"description": "Specifies that the user must fill in a value.",
|
|
233
|
+
"value": {
|
|
234
|
+
"type": [
|
|
235
|
+
"boolean",
|
|
236
|
+
"null",
|
|
237
|
+
"undefined"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "errorMessage",
|
|
243
|
+
"description": "Error to show when the field is invalid.",
|
|
244
|
+
"value": {
|
|
245
|
+
"type": [
|
|
246
|
+
"string",
|
|
247
|
+
"null",
|
|
248
|
+
"undefined"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "helperText",
|
|
254
|
+
"description": "String used for the helper text.",
|
|
255
|
+
"value": {
|
|
256
|
+
"type": [
|
|
257
|
+
"string",
|
|
258
|
+
"null",
|
|
259
|
+
"undefined"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "accessibleName",
|
|
265
|
+
"description": "String used to label the component to screen reader users.",
|
|
266
|
+
"value": {
|
|
267
|
+
"type": [
|
|
268
|
+
"string",
|
|
269
|
+
"null",
|
|
270
|
+
"undefined"
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "accessibleNameRef",
|
|
276
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
277
|
+
"value": {
|
|
278
|
+
"type": [
|
|
279
|
+
"string",
|
|
280
|
+
"null",
|
|
281
|
+
"undefined"
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "overlayClass",
|
|
287
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
288
|
+
"value": {
|
|
289
|
+
"type": [
|
|
290
|
+
"string",
|
|
291
|
+
"null",
|
|
292
|
+
"undefined"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "items",
|
|
298
|
+
"description": "An array containing items that will be rendered as the options of the select.\n\n#### Example\n```js\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\nNote: each item is rendered by default as the internal `<vaadin-select-item>` that is an extension of `<vaadin-item>`.\nTo render the item with a custom component, provide a tag name by the `component` property.",
|
|
299
|
+
"value": {
|
|
300
|
+
"type": [
|
|
301
|
+
"Array.<SelectItem>"
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "opened",
|
|
307
|
+
"description": "Set when the select is open",
|
|
308
|
+
"value": {
|
|
309
|
+
"type": [
|
|
310
|
+
"boolean"
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "renderer",
|
|
316
|
+
"description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The `<vaadin-select-overlay>` internal container\n DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
|
|
317
|
+
"value": {
|
|
318
|
+
"type": [
|
|
319
|
+
"SelectRenderer",
|
|
320
|
+
"undefined"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "value",
|
|
326
|
+
"description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
|
|
327
|
+
"value": {
|
|
328
|
+
"type": [
|
|
329
|
+
"string"
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "name",
|
|
335
|
+
"description": "The name of this element.",
|
|
336
|
+
"value": {
|
|
337
|
+
"type": [
|
|
338
|
+
"string",
|
|
339
|
+
"null",
|
|
340
|
+
"undefined"
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "placeholder",
|
|
346
|
+
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
|
|
347
|
+
"value": {
|
|
348
|
+
"type": [
|
|
349
|
+
"string",
|
|
350
|
+
"null",
|
|
351
|
+
"undefined"
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "readonly",
|
|
357
|
+
"description": "When present, it specifies that the element is read-only.",
|
|
358
|
+
"value": {
|
|
359
|
+
"type": [
|
|
360
|
+
"boolean"
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"events": [
|
|
366
|
+
{
|
|
367
|
+
"name": "validated",
|
|
368
|
+
"description": "Fired whenever the field is validated."
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "change",
|
|
372
|
+
"description": "Fired when the user commits a value change."
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "invalid-changed",
|
|
376
|
+
"description": "Fired when the `invalid` property changes."
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "opened-changed",
|
|
380
|
+
"description": "Fired when the `opened` property changes."
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "value-changed",
|
|
384
|
+
"description": "Fired when the `value` property changes."
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/select",
|
|
4
|
+
"version": "24.5.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
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\n`<vaadin-select>` provides mostly the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-----------------------------|-----------\n`opened` | Set when the select is open | :host\n\nThere are two exceptions in terms of styling compared to `<vaadin-text-field>`:\n- the `clear-button` shadow DOM part does not exist in `<vaadin-select>`.\n- the `input-prevented` state attribute is not supported by `<vaadin-select>`.\n\n### Internal components\n\nIn addition to `<vaadin-select>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-select-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-overlay).\n- `<vaadin-select-value-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-button).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha1/#/elements/vaadin-input-container) - an internal element wrapping the button.\n\nNote: the `theme` attribute value set on `<vaadin-select>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?disabled",
|
|
24
|
+
"description": "If true, the user cannot interact with this element.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "?autofocus",
|
|
31
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "?invalid",
|
|
38
|
+
"description": "Set to true when the field is invalid.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?required",
|
|
45
|
+
"description": "Specifies that the user must fill in a value.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "?opened",
|
|
52
|
+
"description": "Set when the select is open",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?readonly",
|
|
59
|
+
"description": "When present, it specifies that the element is read-only.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": ".label",
|
|
66
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": ".errorMessage",
|
|
73
|
+
"description": "Error to show when the field is invalid.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".helperText",
|
|
80
|
+
"description": "String used for the helper text.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".accessibleName",
|
|
87
|
+
"description": "String used to label the component to screen reader users.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".accessibleNameRef",
|
|
94
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".overlayClass",
|
|
101
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": ".items",
|
|
108
|
+
"description": "An array containing items that will be rendered as the options of the select.\n\n#### Example\n```js\nselect.items = [\n { label: 'Most recent first', value: 'recent' },\n { component: 'hr' },\n { label: 'Rating: low to high', value: 'rating-asc', className: 'asc' },\n { label: 'Rating: high to low', value: 'rating-desc', className: 'desc' },\n { component: 'hr' },\n { label: 'Price: low to high', value: 'price-asc', disabled: true },\n { label: 'Price: high to low', value: 'price-desc', disabled: true }\n];\n```\n\nNote: each item is rendered by default as the internal `<vaadin-select-item>` that is an extension of `<vaadin-item>`.\nTo render the item with a custom component, provide a tag name by the `component` property.",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": ".renderer",
|
|
115
|
+
"description": "Custom function for rendering the content of the `<vaadin-select>`.\nReceives two arguments:\n\n- `root` The `<vaadin-select-overlay>` internal container\n DOM element. Append your content to it.\n- `select` The reference to the `<vaadin-select>` element.",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": ".value",
|
|
122
|
+
"description": "The `value` property of the selected item, or an empty string\nif no item is selected.\nOn change or initialization, the component finds the item which matches the\nvalue and displays it.\nIf no value is provided to the component, it selects the first item without\nvalue or empty value.\nHint: If you do not want to select any item by default, you can either set all\nthe values of inner vaadin-items, or set the vaadin-select value to\nan inexistent value in the items list.",
|
|
123
|
+
"value": {
|
|
124
|
+
"kind": "expression"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": ".name",
|
|
129
|
+
"description": "The name of this element.",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": ".placeholder",
|
|
136
|
+
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be displayed in the case that there\nis no item selected, or the selected item has an empty\nstring label, or the selected item has no label and it's\nDOM content is empty.",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "@validated",
|
|
143
|
+
"description": "Fired whenever the field is validated.",
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "expression"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "@change",
|
|
150
|
+
"description": "Fired when the user commits a value change.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "@invalid-changed",
|
|
157
|
+
"description": "Fired when the `invalid` property changes.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "@opened-changed",
|
|
164
|
+
"description": "Fired when the `opened` property changes.",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "expression"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "@value-changed",
|
|
171
|
+
"description": "Fired when the `value` property changes.",
|
|
172
|
+
"value": {
|
|
173
|
+
"kind": "expression"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|