@vaadin/item 24.4.0-dev.b3e1d14600 → 24.5.0-alpha1

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 CHANGED
@@ -5,7 +5,6 @@ A web component for displaying items in list-box, context-menu or select compone
5
5
  [Documentation + Live Demo ↗](https://vaadin.com/components/vaadin-item/html-examples)
6
6
 
7
7
  [![npm version](https://badgen.net/npm/v/@vaadin/item)](https://www.npmjs.com/package/@vaadin/item)
8
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
9
8
 
10
9
  ```html
11
10
  <vaadin-item>Simple Item</vaadin-item> <vaadin-item disabled>Disabled Item</vaadin-item>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/item",
3
- "version": "24.4.0-dev.b3e1d14600",
3
+ "version": "24.5.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,11 +37,11 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.4.0-dev.b3e1d14600",
41
- "@vaadin/component-base": "24.4.0-dev.b3e1d14600",
42
- "@vaadin/vaadin-lumo-styles": "24.4.0-dev.b3e1d14600",
43
- "@vaadin/vaadin-material-styles": "24.4.0-dev.b3e1d14600",
44
- "@vaadin/vaadin-themable-mixin": "24.4.0-dev.b3e1d14600"
40
+ "@vaadin/a11y-base": "24.5.0-alpha1",
41
+ "@vaadin/component-base": "24.5.0-alpha1",
42
+ "@vaadin/vaadin-lumo-styles": "24.5.0-alpha1",
43
+ "@vaadin/vaadin-material-styles": "24.5.0-alpha1",
44
+ "@vaadin/vaadin-themable-mixin": "24.5.0-alpha1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "502d4f5b03f770a83d270d98078cde230254dd0e"
55
+ "gitHead": "57806caac5468532a3b4e3dbdda730cd0fca193a"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
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';
@@ -0,0 +1,7 @@
1
+ import '@vaadin/vaadin-lumo-styles/font-icons.js';
2
+ import '@vaadin/vaadin-lumo-styles/sizing.js';
3
+ import '@vaadin/vaadin-lumo-styles/spacing.js';
4
+ import '@vaadin/vaadin-lumo-styles/style.js';
5
+ import '@vaadin/vaadin-lumo-styles/typography.js';
6
+ declare const item: import("lit").CSSResult;
7
+ export { item };
@@ -70,10 +70,10 @@ const item = css`
70
70
  :host(:hover:not([disabled])) {
71
71
  background-color: var(--lumo-primary-color-10pct);
72
72
  }
73
+ }
73
74
 
74
- :host([focus-ring]:not([disabled])) {
75
- box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
76
- }
75
+ :host([focus-ring]:not([disabled])) {
76
+ box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
77
77
  }
78
78
 
79
79
  /* RTL specific styles */
@@ -0,0 +1,2 @@
1
+ import './vaadin-item-styles.js';
2
+ import '../../src/vaadin-item.js';
@@ -0,0 +1,5 @@
1
+ import '@vaadin/vaadin-material-styles/font-icons.js';
2
+ import '@vaadin/vaadin-material-styles/color.js';
3
+ import '@vaadin/vaadin-material-styles/typography.js';
4
+ declare const item: import("lit").CSSResult;
5
+ export { item };
@@ -44,10 +44,10 @@ const item = css`
44
44
  :host(:hover:not([disabled])) {
45
45
  background-color: var(--material-secondary-background-color);
46
46
  }
47
+ }
47
48
 
48
- :host([focused]:not([disabled])) {
49
- background-color: var(--material-divider-color);
50
- }
49
+ :host([focused]:not([disabled])) {
50
+ background-color: var(--material-divider-color);
51
51
  }
52
52
 
53
53
  /* Disabled */
@@ -0,0 +1,2 @@
1
+ import './vaadin-item-styles.js';
2
+ import '../../src/vaadin-item.js';
package/web-types.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/item",
4
+ "version": "24.5.0-alpha1",
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": "disabled",
15
+ "description": "If true, the user cannot interact with this element.",
16
+ "value": {
17
+ "type": [
18
+ "boolean",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "selected",
26
+ "description": "If true, the item is in selected state.",
27
+ "value": {
28
+ "type": [
29
+ "boolean"
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "name": "theme",
35
+ "description": "The theme variants to apply to the component.",
36
+ "value": {
37
+ "type": [
38
+ "string",
39
+ "null",
40
+ "undefined"
41
+ ]
42
+ }
43
+ }
44
+ ],
45
+ "js": {
46
+ "properties": [
47
+ {
48
+ "name": "disabled",
49
+ "description": "If true, the user cannot interact with this element.",
50
+ "value": {
51
+ "type": [
52
+ "boolean",
53
+ "null",
54
+ "undefined"
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "name": "value",
60
+ "description": "Submittable string value. The default value is the trimmed text content of the element.",
61
+ "value": {
62
+ "type": [
63
+ "string"
64
+ ]
65
+ }
66
+ },
67
+ {
68
+ "name": "selected",
69
+ "description": "If true, the item is in selected state.",
70
+ "value": {
71
+ "type": [
72
+ "boolean"
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "name": "label",
78
+ "description": "String that can be set to visually represent the selected item in `vaadin-select`.",
79
+ "value": {
80
+ "type": [
81
+ "string"
82
+ ]
83
+ }
84
+ }
85
+ ],
86
+ "events": []
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/item",
4
+ "version": "24.5.0-alpha1",
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": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?selected",
31
+ "description": "If true, the item is in selected state.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": ".value",
38
+ "description": "Submittable string value. The default value is the trimmed text content of the element.",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": ".label",
45
+ "description": "String that can be set to visually represent the selected item in `vaadin-select`.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+ }
55
+ }