@vaadin/item 24.2.0-dev.f254716fe → 24.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/package.json +8 -8
- package/src/vaadin-item.js +3 -1
- package/web-types.json +61 -0
- package/web-types.lit.json +41 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/item",
|
|
3
|
-
"version": "24.2.0
|
|
3
|
+
"version": "24.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,20 +37,20 @@
|
|
|
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
|
|
41
|
-
"@vaadin/component-base": "24.2.0
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0
|
|
43
|
-
"@vaadin/vaadin-material-styles": "24.2.0
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0
|
|
40
|
+
"@vaadin/a11y-base": "~24.2.0",
|
|
41
|
+
"@vaadin/component-base": "~24.2.0",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "~24.2.0",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "~24.2.0",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "~24.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/testing-helpers": "^0.
|
|
48
|
+
"@vaadin/testing-helpers": "^0.5.0",
|
|
49
49
|
"sinon": "^13.0.2"
|
|
50
50
|
},
|
|
51
51
|
"web-types": [
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8b9e860d53fc0132d05d3e8701eeded2dca74eba"
|
|
56
56
|
}
|
package/src/vaadin-item.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
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';
|
|
7
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
7
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
8
9
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
10
|
import { ItemMixin } from './vaadin-item-mixin.js';
|
|
@@ -46,6 +47,7 @@ import { ItemMixin } from './vaadin-item-mixin.js';
|
|
|
46
47
|
*
|
|
47
48
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
48
49
|
*
|
|
50
|
+
* @customElement
|
|
49
51
|
* @extends HTMLElement
|
|
50
52
|
* @mixes ItemMixin
|
|
51
53
|
* @mixes ThemableMixin
|
|
@@ -93,6 +95,6 @@ class Item extends ItemMixin(ThemableMixin(DirMixin(PolymerElement))) {
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
defineCustomElement(Item);
|
|
97
99
|
|
|
98
100
|
export { Item };
|
package/web-types.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/item",
|
|
4
|
+
"version": "24.2.0",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "vaadin-item",
|
|
11
|
+
"description": "`<vaadin-item>` is a Web Component providing layout for items in tabs and menus.\n\n```\n <vaadin-item>\n Item content\n </vaadin-item>\n```\n\n### Selectable\n\n`<vaadin-item>` has the `selected` property and the corresponding state attribute.\nCurrently, the component sets the `selected` to false, when `disabled` property is set to true.\nBut other than that, the `<vaadin-item>` does not switch selection by itself.\nIn general, it is the wrapper component, like `<vaadin-list-box>`, which should update\nthe `selected` property on the items, e. g. on mousedown or when Enter / Spacebar is pressed.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------|----------------\n`checkmark` | The graphical checkmark shown for a selected item\n`content` | The element that wraps the slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`active` | Set when the item is pressed down, either with mouse, touch or the keyboard.\n`disabled` | Set when the item is disabled.\n`focus-ring` | Set when the item is focused using the keyboard.\n`focused` | Set when the item is focused.\n`selected` | Set when the item is selected\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "selected",
|
|
15
|
+
"description": "If true, the item is in selected state.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "theme",
|
|
24
|
+
"description": "The theme variants to apply to the component.",
|
|
25
|
+
"value": {
|
|
26
|
+
"type": [
|
|
27
|
+
"string",
|
|
28
|
+
"null",
|
|
29
|
+
"undefined"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"js": {
|
|
35
|
+
"properties": [
|
|
36
|
+
{
|
|
37
|
+
"name": "value",
|
|
38
|
+
"description": "",
|
|
39
|
+
"value": {
|
|
40
|
+
"type": [
|
|
41
|
+
"string"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "selected",
|
|
47
|
+
"description": "If true, the item is in selected state.",
|
|
48
|
+
"value": {
|
|
49
|
+
"type": [
|
|
50
|
+
"boolean"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"events": []
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/item",
|
|
4
|
+
"version": "24.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-item",
|
|
19
|
+
"description": "`<vaadin-item>` is a Web Component providing layout for items in tabs and menus.\n\n```\n <vaadin-item>\n Item content\n </vaadin-item>\n```\n\n### Selectable\n\n`<vaadin-item>` has the `selected` property and the corresponding state attribute.\nCurrently, the component sets the `selected` to false, when `disabled` property is set to true.\nBut other than that, the `<vaadin-item>` does not switch selection by itself.\nIn general, it is the wrapper component, like `<vaadin-list-box>`, which should update\nthe `selected` property on the items, e. g. on mousedown or when Enter / Spacebar is pressed.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------|----------------\n`checkmark` | The graphical checkmark shown for a selected item\n`content` | The element that wraps the slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`active` | Set when the item is pressed down, either with mouse, touch or the keyboard.\n`disabled` | Set when the item is disabled.\n`focus-ring` | Set when the item is focused using the keyboard.\n`focused` | Set when the item is focused.\n`selected` | Set when the item is selected\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?selected",
|
|
24
|
+
"description": "If true, the item is in selected state.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": ".value",
|
|
31
|
+
"description": "",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|