@vaadin/list-box 23.2.0-dev.53560527d → 23.2.0
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 +4 -4
- package/package.json +15 -9
- package/src/vaadin-list-box.d.ts +3 -3
- package/src/vaadin-list-box.js +1 -1
- package/web-types.json +98 -0
- package/web-types.lit.json +62 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A web component for selecting one or more values from a scrollable list of items.
|
|
4
4
|
|
|
5
|
-
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/
|
|
5
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/list-box)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/list-box)
|
|
8
8
|
[](https://discord.gg/PHmkCKC)
|
|
@@ -18,7 +18,7 @@ A web component for selecting one or more values from a scrollable list of items
|
|
|
18
18
|
</vaadin-list-box>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/list-box/screenshot.png" width="150" alt="Screenshot of vaadin-list-box">](https://vaadin.com/docs/latest/
|
|
21
|
+
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/list-box/screenshot.png" width="150" alt="Screenshot of vaadin-list-box">](https://vaadin.com/docs/latest/components/list-box)
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
@@ -36,7 +36,7 @@ import '@vaadin/list-box';
|
|
|
36
36
|
|
|
37
37
|
## Themes
|
|
38
38
|
|
|
39
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/
|
|
39
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
40
40
|
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/list-box/vaadin-list-box.js) of the package uses Lumo theme.
|
|
41
41
|
|
|
42
42
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
@@ -59,7 +59,7 @@ import '@vaadin/list-box/src/vaadin-list-box.js';
|
|
|
59
59
|
|
|
60
60
|
## Contributing
|
|
61
61
|
|
|
62
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/
|
|
62
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
63
63
|
|
|
64
64
|
## License
|
|
65
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/list-box",
|
|
3
|
-
"version": "23.2.0
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"src",
|
|
24
24
|
"theme",
|
|
25
25
|
"vaadin-*.d.ts",
|
|
26
|
-
"vaadin-*.js"
|
|
26
|
+
"vaadin-*.js",
|
|
27
|
+
"web-types.json",
|
|
28
|
+
"web-types.lit.json"
|
|
27
29
|
],
|
|
28
30
|
"keywords": [
|
|
29
31
|
"Vaadin",
|
|
@@ -34,17 +36,21 @@
|
|
|
34
36
|
],
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "23.2.0
|
|
38
|
-
"@vaadin/item": "23.2.0
|
|
39
|
-
"@vaadin/vaadin-list-mixin": "23.2.0
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0
|
|
41
|
-
"@vaadin/vaadin-material-styles": "23.2.0
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0
|
|
39
|
+
"@vaadin/component-base": "^23.2.0",
|
|
40
|
+
"@vaadin/item": "^23.2.0",
|
|
41
|
+
"@vaadin/vaadin-list-mixin": "^23.2.0",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "^23.2.0",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "^23.2.0",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "^23.2.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
47
49
|
"sinon": "^13.0.2"
|
|
48
50
|
},
|
|
49
|
-
"
|
|
51
|
+
"web-types": [
|
|
52
|
+
"web-types.json",
|
|
53
|
+
"web-types.lit.json"
|
|
54
|
+
],
|
|
55
|
+
"gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
|
|
50
56
|
}
|
package/src/vaadin-list-box.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export interface ListBoxEventMap extends HTMLElementEventMap, ListBoxCustomEvent
|
|
|
53
53
|
* ------------------|------------------------
|
|
54
54
|
* `items` | The items container
|
|
55
55
|
*
|
|
56
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
56
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
57
57
|
*
|
|
58
58
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
59
59
|
* @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
|
|
@@ -65,13 +65,13 @@ declare class ListBox extends MultiSelectListMixin(ThemableMixin(ElementMixin(Co
|
|
|
65
65
|
addEventListener<K extends keyof ListBoxEventMap>(
|
|
66
66
|
type: K,
|
|
67
67
|
listener: (this: ListBox, ev: ListBoxEventMap[K]) => void,
|
|
68
|
-
options?:
|
|
68
|
+
options?: AddEventListenerOptions | boolean,
|
|
69
69
|
): void;
|
|
70
70
|
|
|
71
71
|
removeEventListener<K extends keyof ListBoxEventMap>(
|
|
72
72
|
type: K,
|
|
73
73
|
listener: (this: ListBox, ev: ListBoxEventMap[K]) => void,
|
|
74
|
-
options?:
|
|
74
|
+
options?: EventListenerOptions | boolean,
|
|
75
75
|
): void;
|
|
76
76
|
}
|
|
77
77
|
|
package/src/vaadin-list-box.js
CHANGED
|
@@ -29,7 +29,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
29
29
|
* ------------------|------------------------
|
|
30
30
|
* `items` | The items container
|
|
31
31
|
*
|
|
32
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
32
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
33
33
|
*
|
|
34
34
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
35
35
|
* @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
|
package/web-types.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/list-box",
|
|
4
|
+
"version": "23.2.0",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "vaadin-list-box",
|
|
11
|
+
"description": "`<vaadin-list-box>` is a Web Component for creating menus.\n\n```\n <vaadin-list-box selected=\"2\">\n <vaadin-item>Item 1</vaadin-item>\n <vaadin-item>Item 2</vaadin-item>\n <vaadin-item>Item 3</vaadin-item>\n <vaadin-item>Item 4</vaadin-item>\n </vaadin-list-box>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|------------------------\n`items` | The items container\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "selected",
|
|
15
|
+
"description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"number",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "multiple",
|
|
26
|
+
"description": "Specifies that multiple options can be selected at once.",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"boolean",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "theme",
|
|
37
|
+
"description": "The theme variants to apply to the component.",
|
|
38
|
+
"value": {
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"js": {
|
|
48
|
+
"properties": [
|
|
49
|
+
{
|
|
50
|
+
"name": "selected",
|
|
51
|
+
"description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
|
|
52
|
+
"value": {
|
|
53
|
+
"type": [
|
|
54
|
+
"number",
|
|
55
|
+
"null",
|
|
56
|
+
"undefined"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "multiple",
|
|
62
|
+
"description": "Specifies that multiple options can be selected at once.",
|
|
63
|
+
"value": {
|
|
64
|
+
"type": [
|
|
65
|
+
"boolean",
|
|
66
|
+
"null",
|
|
67
|
+
"undefined"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "selectedValues",
|
|
73
|
+
"description": "Array of indexes of the items selected in the items array\nNote: Not updated when used in single selection mode.",
|
|
74
|
+
"value": {
|
|
75
|
+
"type": [
|
|
76
|
+
"Array.<number>",
|
|
77
|
+
"null",
|
|
78
|
+
"undefined"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"events": [
|
|
84
|
+
{
|
|
85
|
+
"name": "selected-changed",
|
|
86
|
+
"description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "selected-values-changed",
|
|
90
|
+
"description": "Fired when the selection is changed.\nNot fired in single selection mode."
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/list-box",
|
|
4
|
+
"version": "23.2.0",
|
|
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-list-box",
|
|
19
|
+
"description": "`<vaadin-list-box>` is a Web Component for creating menus.\n\n```\n <vaadin-list-box selected=\"2\">\n <vaadin-item>Item 1</vaadin-item>\n <vaadin-item>Item 2</vaadin-item>\n <vaadin-item>Item 3</vaadin-item>\n <vaadin-item>Item 4</vaadin-item>\n </vaadin-list-box>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|------------------------\n`items` | The items container\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?multiple",
|
|
24
|
+
"description": "Specifies that multiple options can be selected at once.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": ".selected",
|
|
31
|
+
"description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": ".selectedValues",
|
|
38
|
+
"description": "Array of indexes of the items selected in the items array\nNote: Not updated when used in single selection mode.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "@selected-changed",
|
|
45
|
+
"description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "@selected-values-changed",
|
|
52
|
+
"description": "Fired when the selection is changed.\nNot fired in single selection mode.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|