@vaadin/select 24.1.5 → 24.2.0-alpha10
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 +24 -15
- package/src/vaadin-select-base-mixin.d.ts +121 -0
- package/src/vaadin-select-base-mixin.js +640 -0
- package/src/vaadin-select-overlay.js +39 -20
- package/src/vaadin-select-value-button-styles.js +50 -0
- package/src/vaadin-select-value-button.js +4 -44
- package/src/vaadin-select.d.ts +10 -86
- package/src/vaadin-select.js +9 -580
- package/theme/lumo/vaadin-select-styles.js +2 -0
- package/theme/lumo/vaadin-select.js +0 -1
- package/theme/material/vaadin-select.js +0 -1
- package/web-types.json +74 -48
- package/web-types.lit.json +26 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/select",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.2.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
"lit.d.ts",
|
|
24
24
|
"lit.js",
|
|
25
25
|
"src",
|
|
26
|
+
"!src/vaadin-lit-select-item.d.ts",
|
|
27
|
+
"!src/vaadin-lit-select-item.js",
|
|
28
|
+
"!src/vaadin-lit-select-list-box.d.ts",
|
|
29
|
+
"!src/vaadin-lit-select-list-box.js",
|
|
30
|
+
"!src/vaadin-lit-select-overlay.js",
|
|
31
|
+
"!src/vaadin-lit-select-value-button.js",
|
|
32
|
+
"!src/vaadin-lit-select.d.ts",
|
|
33
|
+
"!src/vaadin-lit-select.js",
|
|
26
34
|
"theme",
|
|
27
35
|
"vaadin-*.d.ts",
|
|
28
36
|
"vaadin-*.js",
|
|
@@ -37,23 +45,24 @@
|
|
|
37
45
|
"polymer"
|
|
38
46
|
],
|
|
39
47
|
"dependencies": {
|
|
48
|
+
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
49
|
"@polymer/polymer": "^3.2.0",
|
|
41
|
-
"@vaadin/a11y-base": "
|
|
42
|
-
"@vaadin/button": "
|
|
43
|
-
"@vaadin/component-base": "
|
|
44
|
-
"@vaadin/field-base": "
|
|
45
|
-
"@vaadin/input-container": "
|
|
46
|
-
"@vaadin/item": "
|
|
47
|
-
"@vaadin/list-box": "
|
|
48
|
-
"@vaadin/lit-renderer": "
|
|
49
|
-
"@vaadin/overlay": "
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
51
|
-
"@vaadin/vaadin-material-styles": "
|
|
52
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
50
|
+
"@vaadin/a11y-base": "24.2.0-alpha10",
|
|
51
|
+
"@vaadin/button": "24.2.0-alpha10",
|
|
52
|
+
"@vaadin/component-base": "24.2.0-alpha10",
|
|
53
|
+
"@vaadin/field-base": "24.2.0-alpha10",
|
|
54
|
+
"@vaadin/input-container": "24.2.0-alpha10",
|
|
55
|
+
"@vaadin/item": "24.2.0-alpha10",
|
|
56
|
+
"@vaadin/list-box": "24.2.0-alpha10",
|
|
57
|
+
"@vaadin/lit-renderer": "24.2.0-alpha10",
|
|
58
|
+
"@vaadin/overlay": "24.2.0-alpha10",
|
|
59
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha10",
|
|
60
|
+
"@vaadin/vaadin-material-styles": "24.2.0-alpha10",
|
|
61
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha10"
|
|
53
62
|
},
|
|
54
63
|
"devDependencies": {
|
|
55
64
|
"@esm-bundle/chai": "^4.3.4",
|
|
56
|
-
"@vaadin/testing-helpers": "^0.
|
|
65
|
+
"@vaadin/testing-helpers": "^0.5.0",
|
|
57
66
|
"lit": "^2.0.0",
|
|
58
67
|
"sinon": "^13.0.2"
|
|
59
68
|
},
|
|
@@ -61,5 +70,5 @@
|
|
|
61
70
|
"web-types.json",
|
|
62
71
|
"web-types.lit.json"
|
|
63
72
|
],
|
|
64
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "ca16b5f88b00ae05fb6d7c7e9874525048e389f0"
|
|
65
74
|
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
+
import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
|
|
8
|
+
import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
9
|
+
import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
10
|
+
import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
|
|
11
|
+
import type { TabindexMixinClass } from '@vaadin/a11y-base/src/tabindex-mixin.js';
|
|
12
|
+
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
13
|
+
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
14
|
+
import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
|
|
15
|
+
import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
|
|
16
|
+
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
|
|
17
|
+
import type { SelectItem, SelectRenderer } from './vaadin-select.js';
|
|
18
|
+
|
|
19
|
+
export declare function SelectBaseMixin<T extends Constructor<HTMLElement>>(
|
|
20
|
+
base: T,
|
|
21
|
+
): Constructor<DelegateFocusMixinClass> &
|
|
22
|
+
Constructor<DelegateStateMixinClass> &
|
|
23
|
+
Constructor<DisabledMixinClass> &
|
|
24
|
+
Constructor<FieldMixinClass> &
|
|
25
|
+
Constructor<FocusMixinClass> &
|
|
26
|
+
Constructor<KeyboardMixinClass> &
|
|
27
|
+
Constructor<LabelMixinClass> &
|
|
28
|
+
Constructor<OverlayClassMixinClass> &
|
|
29
|
+
Constructor<SelectBaseMixinClass> &
|
|
30
|
+
Constructor<TabindexMixinClass> &
|
|
31
|
+
Constructor<ValidateMixinClass> &
|
|
32
|
+
T;
|
|
33
|
+
|
|
34
|
+
export declare class SelectBaseMixinClass {
|
|
35
|
+
/**
|
|
36
|
+
* An array containing items that will be rendered as the options of the select.
|
|
37
|
+
*
|
|
38
|
+
* #### Example
|
|
39
|
+
* ```js
|
|
40
|
+
* select.items = [
|
|
41
|
+
* { label: 'Most recent first', value: 'recent' },
|
|
42
|
+
* { component: 'hr' },
|
|
43
|
+
* { label: 'Rating: low to high', value: 'rating-asc' },
|
|
44
|
+
* { label: 'Rating: high to low', value: 'rating-desc' },
|
|
45
|
+
* { component: 'hr' },
|
|
46
|
+
* { label: 'Price: low to high', value: 'price-asc', disabled: true },
|
|
47
|
+
* { label: 'Price: high to low', value: 'price-desc', disabled: true }
|
|
48
|
+
* ];
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* Note: each item is rendered by default as the internal `<vaadin-select-item>` that is an extension of `<vaadin-item>`.
|
|
52
|
+
* To render the item with a custom component, provide a tag name by the `component` property.
|
|
53
|
+
*
|
|
54
|
+
* @type {!Array<!SelectItem>}
|
|
55
|
+
*/
|
|
56
|
+
items: SelectItem[] | null | undefined;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Set when the select is open
|
|
60
|
+
*/
|
|
61
|
+
opened: boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Custom function for rendering the content of the `<vaadin-select>`.
|
|
65
|
+
* Receives two arguments:
|
|
66
|
+
*
|
|
67
|
+
* - `root` The `<vaadin-select-overlay>` internal container
|
|
68
|
+
* DOM element. Append your content to it.
|
|
69
|
+
* - `select` The reference to the `<vaadin-select>` element.
|
|
70
|
+
*/
|
|
71
|
+
renderer: SelectRenderer | undefined;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The `value` property of the selected item, or an empty string
|
|
75
|
+
* if no item is selected.
|
|
76
|
+
* On change or initialization, the component finds the item which matches the
|
|
77
|
+
* value and displays it.
|
|
78
|
+
* If no value is provided to the component, it selects the first item without
|
|
79
|
+
* value or empty value.
|
|
80
|
+
* Hint: If you do not want to select any item by default, you can either set all
|
|
81
|
+
* the values of inner vaadin-items, or set the vaadin-select value to
|
|
82
|
+
* an inexistent value in the items list.
|
|
83
|
+
*/
|
|
84
|
+
value: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The name of this element.
|
|
88
|
+
*/
|
|
89
|
+
name: string | null | undefined;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* A hint to the user of what can be entered in the control.
|
|
93
|
+
* The placeholder will be displayed in the case that there
|
|
94
|
+
* is no item selected, or the selected item has an empty
|
|
95
|
+
* string label, or the selected item has no label and it's
|
|
96
|
+
* DOM content is empty.
|
|
97
|
+
*/
|
|
98
|
+
placeholder: string | null | undefined;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* When present, it specifies that the element is read-only.
|
|
102
|
+
*/
|
|
103
|
+
readonly: boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Whether the field is dirty.
|
|
107
|
+
*
|
|
108
|
+
* The field is automatically marked as dirty once the user triggers
|
|
109
|
+
* a `change` event. Additionally, the field can be manually marked
|
|
110
|
+
* as dirty by setting the property to `true`.
|
|
111
|
+
*/
|
|
112
|
+
dirty: boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Requests an update for the content of the select.
|
|
116
|
+
* While performing the update, it invokes the renderer passed in the `renderer` property.
|
|
117
|
+
*
|
|
118
|
+
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
119
|
+
*/
|
|
120
|
+
requestContentUpdate(): void;
|
|
121
|
+
}
|