@vaadin/item 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 +2 -2
- package/package.json +13 -7
- package/src/vaadin-item-mixin.d.ts +8 -8
- package/src/vaadin-item.d.ts +1 -1
- package/src/vaadin-item.js +1 -1
- package/web-types.json +61 -0
- package/web-types.lit.json +41 -0
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import '@vaadin/item';
|
|
|
29
29
|
|
|
30
30
|
## Themes
|
|
31
31
|
|
|
32
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/
|
|
32
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
33
33
|
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/item/vaadin-item.js) of the package uses Lumo theme.
|
|
34
34
|
|
|
35
35
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
@@ -52,7 +52,7 @@ import '@vaadin/item/src/vaadin-item.js';
|
|
|
52
52
|
|
|
53
53
|
## Contributing
|
|
54
54
|
|
|
55
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/
|
|
55
|
+
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.
|
|
56
56
|
|
|
57
57
|
## License
|
|
58
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/item",
|
|
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",
|
|
@@ -35,15 +37,19 @@
|
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
39
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "23.2.0
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.2.0
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0
|
|
40
|
+
"@vaadin/component-base": "^23.2.0",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "^23.2.0",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "^23.2.0",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "^23.2.0"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
48
|
"sinon": "^13.0.2"
|
|
47
49
|
},
|
|
48
|
-
"
|
|
50
|
+
"web-types": [
|
|
51
|
+
"web-types.json",
|
|
52
|
+
"web-types.lit.json"
|
|
53
|
+
],
|
|
54
|
+
"gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
|
|
49
55
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
-
import { ActiveMixinClass } from '@vaadin/component-base/src/active-mixin.js';
|
|
8
|
-
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
9
|
-
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
|
|
6
|
+
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
+
import type { ActiveMixinClass } from '@vaadin/component-base/src/active-mixin.js';
|
|
8
|
+
import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
9
|
+
import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A mixin providing `focused`, `focus-ring`, `active`, `disabled` and `selected`.
|
|
@@ -15,11 +15,11 @@ import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function ItemMixin<T extends Constructor<HTMLElement>>(
|
|
17
17
|
base: T,
|
|
18
|
-
):
|
|
19
|
-
Constructor<ItemMixinClass> &
|
|
20
|
-
Constructor<ActiveMixinClass> &
|
|
18
|
+
): Constructor<ActiveMixinClass> &
|
|
21
19
|
Constructor<DisabledMixinClass> &
|
|
22
|
-
Constructor<FocusMixinClass
|
|
20
|
+
Constructor<FocusMixinClass> &
|
|
21
|
+
Constructor<ItemMixinClass> &
|
|
22
|
+
T;
|
|
23
23
|
|
|
24
24
|
export declare class ItemMixinClass {
|
|
25
25
|
value: string;
|
package/src/vaadin-item.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ import { ItemMixin } from './vaadin-item-mixin.js';
|
|
|
43
43
|
* `focused` | Set when the item is focused.
|
|
44
44
|
* `selected` | Set when the item is selected
|
|
45
45
|
*
|
|
46
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
46
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
47
47
|
*/
|
|
48
48
|
declare class Item extends ItemMixin(ThemableMixin(DirMixin(HTMLElement))) {
|
|
49
49
|
/**
|
package/src/vaadin-item.js
CHANGED
|
@@ -44,7 +44,7 @@ import { ItemMixin } from './vaadin-item-mixin.js';
|
|
|
44
44
|
* `focused` | Set when the item is focused.
|
|
45
45
|
* `selected` | Set when the item is selected
|
|
46
46
|
*
|
|
47
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
47
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
48
48
|
*
|
|
49
49
|
* @extends HTMLElement
|
|
50
50
|
* @mixes ItemMixin
|
package/web-types.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/item",
|
|
4
|
+
"version": "23.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/custom-theme/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": "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-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/custom-theme/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
|
+
}
|