@vaadin/item 25.2.0-alpha7 → 25.2.0-alpha9
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/item",
|
|
3
|
-
"version": "25.2.0-
|
|
3
|
+
"version": "25.2.0-alpha9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
39
|
-
"@vaadin/component-base": "25.2.0-
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.2.0-alpha9",
|
|
39
|
+
"@vaadin/component-base": "25.2.0-alpha9",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha9",
|
|
41
41
|
"lit": "^3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@vaadin/aura": "25.2.0-
|
|
45
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
44
|
+
"@vaadin/aura": "25.2.0-alpha9",
|
|
45
|
+
"@vaadin/chai-plugins": "25.2.0-alpha9",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha9",
|
|
47
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha9",
|
|
49
49
|
"sinon": "^21.0.2"
|
|
50
50
|
},
|
|
51
51
|
"customElements": "custom-elements.json",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"web-types.json",
|
|
54
54
|
"web-types.lit.json"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a38a03e8a8be45821f39c14054c63634dafe08d0"
|
|
57
57
|
}
|
package/src/vaadin-item-mixin.js
CHANGED
|
@@ -76,6 +76,10 @@ export const ItemMixin = (superClass) =>
|
|
|
76
76
|
if (attrValue !== null) {
|
|
77
77
|
this.value = attrValue;
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
if (this.__shouldAllowFocusWhenDisabled()) {
|
|
81
|
+
this.style.setProperty('--_vaadin-item-disabled-pointer-events', 'auto');
|
|
82
|
+
}
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
/**
|
|
@@ -84,7 +88,7 @@ export const ItemMixin = (superClass) =>
|
|
|
84
88
|
* @override
|
|
85
89
|
*/
|
|
86
90
|
focus(options) {
|
|
87
|
-
if (this.disabled) {
|
|
91
|
+
if (this.disabled && !this.__shouldAllowFocusWhenDisabled()) {
|
|
88
92
|
return;
|
|
89
93
|
}
|
|
90
94
|
|
|
@@ -115,7 +119,9 @@ export const ItemMixin = (superClass) =>
|
|
|
115
119
|
|
|
116
120
|
if (disabled) {
|
|
117
121
|
this.selected = false;
|
|
118
|
-
this.
|
|
122
|
+
if (!this.__shouldAllowFocusWhenDisabled()) {
|
|
123
|
+
this.blur();
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
}
|
|
121
127
|
|
|
@@ -142,4 +148,15 @@ export const ItemMixin = (superClass) =>
|
|
|
142
148
|
this.click();
|
|
143
149
|
}
|
|
144
150
|
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Returns whether the component should be focusable when disabled.
|
|
154
|
+
* Returns false by default.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
* @return {boolean}
|
|
158
|
+
*/
|
|
159
|
+
__shouldAllowFocusWhenDisabled() {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
145
162
|
};
|
package/web-types.json
CHANGED