@vaadin/card 25.4.0-alpha2 → 25.4.0-alpha4
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/custom-elements.json +22 -2
- package/package.json +12 -12
- package/src/vaadin-card.d.ts +7 -0
- package/src/vaadin-card.js +22 -2
- package/web-types.json +24 -4
- package/web-types.lit.json +10 -2
package/custom-elements.json
CHANGED
|
@@ -38,12 +38,23 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"kind": "field",
|
|
41
|
-
"name": "
|
|
41
|
+
"name": "headingLevel",
|
|
42
42
|
"privacy": "public",
|
|
43
43
|
"type": {
|
|
44
44
|
"text": "number"
|
|
45
45
|
},
|
|
46
46
|
"description": "Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.",
|
|
47
|
+
"attribute": "heading-level"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "field",
|
|
51
|
+
"name": "titleHeadingLevel",
|
|
52
|
+
"privacy": "public",
|
|
53
|
+
"type": {
|
|
54
|
+
"text": "number"
|
|
55
|
+
},
|
|
56
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title.",
|
|
57
|
+
"deprecated": "Use `headingLevel` instead. This property will be removed in Vaadin 26.",
|
|
47
58
|
"attribute": "title-heading-level"
|
|
48
59
|
}
|
|
49
60
|
],
|
|
@@ -56,6 +67,14 @@
|
|
|
56
67
|
"description": "The title of the card. When set, any custom slotted title is removed and this string-based title is used instead. If this title is used, an `aria-labelledby` attribute that points to the generated title element is set.",
|
|
57
68
|
"fieldName": "cardTitle"
|
|
58
69
|
},
|
|
70
|
+
{
|
|
71
|
+
"name": "heading-level",
|
|
72
|
+
"type": {
|
|
73
|
+
"text": "number"
|
|
74
|
+
},
|
|
75
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.",
|
|
76
|
+
"fieldName": "headingLevel"
|
|
77
|
+
},
|
|
59
78
|
{
|
|
60
79
|
"type": {
|
|
61
80
|
"text": "string"
|
|
@@ -68,7 +87,8 @@
|
|
|
68
87
|
"type": {
|
|
69
88
|
"text": "number"
|
|
70
89
|
},
|
|
71
|
-
"description": "Sets the heading level (`aria-level`) for the string-based title.
|
|
90
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title.",
|
|
91
|
+
"deprecated": "Use `headingLevel` instead. This property will be removed in Vaadin 26.",
|
|
72
92
|
"fieldName": "titleHeadingLevel"
|
|
73
93
|
}
|
|
74
94
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/card",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"web-component"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@vaadin/component-base": "25.4.0-
|
|
38
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
37
|
+
"@vaadin/component-base": "25.4.0-alpha4",
|
|
38
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha4",
|
|
39
39
|
"lit": "^3.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@vaadin/aura": "25.4.0-
|
|
43
|
-
"@vaadin/avatar": "25.4.0-
|
|
44
|
-
"@vaadin/button": "25.4.0-
|
|
45
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
46
|
-
"@vaadin/icon": "25.4.0-
|
|
47
|
-
"@vaadin/icons": "25.4.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
42
|
+
"@vaadin/aura": "25.4.0-alpha4",
|
|
43
|
+
"@vaadin/avatar": "25.4.0-alpha4",
|
|
44
|
+
"@vaadin/button": "25.4.0-alpha4",
|
|
45
|
+
"@vaadin/chai-plugins": "25.4.0-alpha4",
|
|
46
|
+
"@vaadin/icon": "25.4.0-alpha4",
|
|
47
|
+
"@vaadin/icons": "25.4.0-alpha4",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha4",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha4",
|
|
51
51
|
"sinon": "^22.0.0"
|
|
52
52
|
},
|
|
53
53
|
"customElements": "custom-elements.json",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
|
|
59
59
|
}
|
package/src/vaadin-card.d.ts
CHANGED
|
@@ -64,7 +64,14 @@ declare class Card extends ElementMixin(ThemableMixin(HTMLElement)) {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.
|
|
67
|
+
* @attr {number} heading-level
|
|
68
|
+
*/
|
|
69
|
+
headingLevel: number | null | undefined;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Sets the heading level (`aria-level`) for the string-based title.
|
|
67
73
|
* @attr {number} title-heading-level
|
|
74
|
+
* @deprecated Use `headingLevel` instead. This property will be removed in Vaadin 26.
|
|
68
75
|
*/
|
|
69
76
|
titleHeadingLevel: number | null | undefined;
|
|
70
77
|
}
|
package/src/vaadin-card.js
CHANGED
|
@@ -93,7 +93,18 @@ class Card extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(Li
|
|
|
93
93
|
/**
|
|
94
94
|
* Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.
|
|
95
95
|
*
|
|
96
|
+
* @attr {number} heading-level
|
|
97
|
+
*/
|
|
98
|
+
headingLevel: {
|
|
99
|
+
type: Number,
|
|
100
|
+
reflectToAttribute: true,
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Sets the heading level (`aria-level`) for the string-based title.
|
|
105
|
+
*
|
|
96
106
|
* @attr {number} title-heading-level
|
|
107
|
+
* @deprecated Use `headingLevel` instead. This property will be removed in Vaadin 26.
|
|
97
108
|
*/
|
|
98
109
|
titleHeadingLevel: {
|
|
99
110
|
type: Number,
|
|
@@ -146,6 +157,15 @@ class Card extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(Li
|
|
|
146
157
|
this._onSlotChange();
|
|
147
158
|
}
|
|
148
159
|
|
|
160
|
+
/** @protected */
|
|
161
|
+
willUpdate(props) {
|
|
162
|
+
super.willUpdate(props);
|
|
163
|
+
|
|
164
|
+
if (props.has('titleHeadingLevel')) {
|
|
165
|
+
this.headingLevel = this.titleHeadingLevel;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
149
169
|
/** @protected */
|
|
150
170
|
updated(props) {
|
|
151
171
|
super.updated(props);
|
|
@@ -154,8 +174,8 @@ class Card extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(Li
|
|
|
154
174
|
this.__titleController.setTitle(this.cardTitle);
|
|
155
175
|
}
|
|
156
176
|
|
|
157
|
-
if (props.has('
|
|
158
|
-
this.__titleController.setLevel(this.
|
|
177
|
+
if (props.has('headingLevel')) {
|
|
178
|
+
this.__titleController.setLevel(this.headingLevel);
|
|
159
179
|
}
|
|
160
180
|
}
|
|
161
181
|
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/card",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
"name": "heading-level",
|
|
24
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.",
|
|
25
|
+
"value": {
|
|
26
|
+
"type": [
|
|
27
|
+
"number"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
22
31
|
{
|
|
23
32
|
"name": "theme",
|
|
24
33
|
"description": "The theme variants to apply to the component.",
|
|
@@ -30,12 +39,13 @@
|
|
|
30
39
|
},
|
|
31
40
|
{
|
|
32
41
|
"name": "title-heading-level",
|
|
33
|
-
"description": "Sets the heading level (`aria-level`) for the string-based title.
|
|
42
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title.",
|
|
34
43
|
"value": {
|
|
35
44
|
"type": [
|
|
36
45
|
"number"
|
|
37
46
|
]
|
|
38
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"deprecated": "Use `headingLevel` instead. This property will be removed in Vaadin 26."
|
|
39
49
|
}
|
|
40
50
|
],
|
|
41
51
|
"js": {
|
|
@@ -50,13 +60,23 @@
|
|
|
50
60
|
}
|
|
51
61
|
},
|
|
52
62
|
{
|
|
53
|
-
"name": "
|
|
63
|
+
"name": "headingLevel",
|
|
54
64
|
"description": "Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.",
|
|
55
65
|
"value": {
|
|
56
66
|
"type": [
|
|
57
67
|
"number"
|
|
58
68
|
]
|
|
59
69
|
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "titleHeadingLevel",
|
|
73
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title.",
|
|
74
|
+
"value": {
|
|
75
|
+
"type": [
|
|
76
|
+
"number"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"deprecated": "Use `headingLevel` instead. This property will be removed in Vaadin 26."
|
|
60
80
|
}
|
|
61
81
|
],
|
|
62
82
|
"events": []
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/card",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -27,11 +27,19 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": ".
|
|
30
|
+
"name": ".headingLevel",
|
|
31
31
|
"description": "Sets the heading level (`aria-level`) for the string-based title. If not set, the level defaults to 2. Setting values outside the range [1, 6] can cause accessibility issues.",
|
|
32
32
|
"value": {
|
|
33
33
|
"kind": "expression"
|
|
34
34
|
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": ".titleHeadingLevel",
|
|
38
|
+
"description": "Sets the heading level (`aria-level`) for the string-based title.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
},
|
|
42
|
+
"deprecated": "Use `headingLevel` instead. This property will be removed in Vaadin 26."
|
|
35
43
|
}
|
|
36
44
|
]
|
|
37
45
|
}
|