@vaadin/list-box 24.2.0-dev.f254716fe → 24.3.0-alpha2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/list-box",
3
- "version": "24.2.0-dev.f254716fe",
3
+ "version": "24.3.0-alpha2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,21 +37,21 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.2.0-dev.f254716fe",
41
- "@vaadin/component-base": "24.2.0-dev.f254716fe",
42
- "@vaadin/item": "24.2.0-dev.f254716fe",
43
- "@vaadin/vaadin-lumo-styles": "24.2.0-dev.f254716fe",
44
- "@vaadin/vaadin-material-styles": "24.2.0-dev.f254716fe",
45
- "@vaadin/vaadin-themable-mixin": "24.2.0-dev.f254716fe"
40
+ "@vaadin/a11y-base": "24.3.0-alpha2",
41
+ "@vaadin/component-base": "24.3.0-alpha2",
42
+ "@vaadin/item": "24.3.0-alpha2",
43
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha2",
44
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha2",
45
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
49
- "@vaadin/testing-helpers": "^0.4.3",
49
+ "@vaadin/testing-helpers": "^0.5.0",
50
50
  "sinon": "^13.0.2"
51
51
  },
52
52
  "web-types": [
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "da54950b9f8c14c6451ede0d426e16a489c7fb9b"
56
+ "gitHead": "0fd437292fa2a2f65e29b424d2456909ad2d684b"
57
57
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
7
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
8
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
10
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -36,6 +37,7 @@ import { MultiSelectListMixin } from './vaadin-multi-select-list-mixin.js';
36
37
  * @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
37
38
  * @fires {CustomEvent} selected-values-changed - Fired when the `selectedValues` property changes.
38
39
  *
40
+ * @customElement
39
41
  * @extends HTMLElement
40
42
  * @mixes MultiSelectListMixin
41
43
  * @mixes ThemableMixin
@@ -125,6 +127,6 @@ class ListBox extends ElementMixin(MultiSelectListMixin(ThemableMixin(Controller
125
127
  }
126
128
  }
127
129
 
128
- customElements.define(ListBox.is, ListBox);
130
+ defineCustomElement(ListBox);
129
131
 
130
132
  export { ListBox };
package/web-types.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/list-box",
4
+ "version": "24.3.0-alpha2",
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/styling-components) documentation.",
12
+ "attributes": [
13
+ {
14
+ "name": "disabled",
15
+ "description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
16
+ "value": {
17
+ "type": [
18
+ "boolean",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "selected",
26
+ "description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
27
+ "value": {
28
+ "type": [
29
+ "number",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "name": "multiple",
37
+ "description": "Specifies that multiple options can be selected at once.",
38
+ "value": {
39
+ "type": [
40
+ "boolean",
41
+ "null",
42
+ "undefined"
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "name": "theme",
48
+ "description": "The theme variants to apply to the component.",
49
+ "value": {
50
+ "type": [
51
+ "string",
52
+ "null",
53
+ "undefined"
54
+ ]
55
+ }
56
+ }
57
+ ],
58
+ "js": {
59
+ "properties": [
60
+ {
61
+ "name": "disabled",
62
+ "description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
63
+ "value": {
64
+ "type": [
65
+ "boolean",
66
+ "null",
67
+ "undefined"
68
+ ]
69
+ }
70
+ },
71
+ {
72
+ "name": "selected",
73
+ "description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
74
+ "value": {
75
+ "type": [
76
+ "number",
77
+ "null",
78
+ "undefined"
79
+ ]
80
+ }
81
+ },
82
+ {
83
+ "name": "multiple",
84
+ "description": "Specifies that multiple options can be selected at once.",
85
+ "value": {
86
+ "type": [
87
+ "boolean",
88
+ "null",
89
+ "undefined"
90
+ ]
91
+ }
92
+ },
93
+ {
94
+ "name": "selectedValues",
95
+ "description": "Array of indexes of the items selected in the items array\nNote: Not updated when used in single selection mode.",
96
+ "value": {
97
+ "type": [
98
+ "Array.<number>",
99
+ "null",
100
+ "undefined"
101
+ ]
102
+ }
103
+ }
104
+ ],
105
+ "events": [
106
+ {
107
+ "name": "selected-changed",
108
+ "description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode."
109
+ },
110
+ {
111
+ "name": "selected-values-changed",
112
+ "description": "Fired when the selection is changed.\nNot fired in single selection mode."
113
+ },
114
+ {
115
+ "name": "items-changed",
116
+ "description": "Fired when the `items` property changes."
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ]
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/list-box",
4
+ "version": "24.3.0-alpha2",
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/styling-components) documentation.",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?multiple",
31
+ "description": "Specifies that multiple options can be selected at once.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": ".selected",
38
+ "description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": ".selectedValues",
45
+ "description": "Array of indexes of the items selected in the items array\nNote: Not updated when used in single selection mode.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
50
+ {
51
+ "name": "@selected-changed",
52
+ "description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode.",
53
+ "value": {
54
+ "kind": "expression"
55
+ }
56
+ },
57
+ {
58
+ "name": "@selected-values-changed",
59
+ "description": "Fired when the selection is changed.\nNot fired in single selection mode.",
60
+ "value": {
61
+ "kind": "expression"
62
+ }
63
+ },
64
+ {
65
+ "name": "@items-changed",
66
+ "description": "Fired when the `items` property changes.",
67
+ "value": {
68
+ "kind": "expression"
69
+ }
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ }