@vaadin/checkbox 25.3.0-alpha4 → 25.3.0-alpha6
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 +10 -10
- package/src/vaadin-checkbox-mixin.js +10 -9
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/checkbox",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
39
|
-
"@vaadin/component-base": "25.3.0-
|
|
40
|
-
"@vaadin/field-base": "25.3.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.3.0-alpha6",
|
|
39
|
+
"@vaadin/component-base": "25.3.0-alpha6",
|
|
40
|
+
"@vaadin/field-base": "25.3.0-alpha6",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha6",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "25.3.0-
|
|
46
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
47
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
45
|
+
"@vaadin/aura": "25.3.0-alpha6",
|
|
46
|
+
"@vaadin/chai-plugins": "25.3.0-alpha6",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha6",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha6",
|
|
50
50
|
"sinon": "^22.0.0"
|
|
51
51
|
},
|
|
52
52
|
"customElements": "custom-elements.json",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "92c124fb9cff367bc07e734d8e65707facd0bd43"
|
|
58
58
|
}
|
|
@@ -106,9 +106,8 @@ export const CheckboxMixin = (superclass) =>
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Override method inherited from `ActiveMixin` to
|
|
110
|
-
* attribute
|
|
111
|
-
* or when clicking slotted helper or error message element.
|
|
109
|
+
* Override method inherited from `ActiveMixin` to only set the `active`
|
|
110
|
+
* attribute for clicks that actually toggle the checked state.
|
|
112
111
|
*
|
|
113
112
|
* @param {Event} event
|
|
114
113
|
* @return {boolean}
|
|
@@ -116,12 +115,14 @@ export const CheckboxMixin = (superclass) =>
|
|
|
116
115
|
* @override
|
|
117
116
|
*/
|
|
118
117
|
_shouldSetActive(event) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
const [target] = event.composedPath();
|
|
119
|
+
|
|
120
|
+
const togglesChecked =
|
|
121
|
+
target === this.inputElement ||
|
|
122
|
+
target.part.contains('required-indicator') ||
|
|
123
|
+
(this._labelNode.contains(target) && !target.closest('a'));
|
|
124
|
+
|
|
125
|
+
if (this.readonly || !togglesChecked) {
|
|
125
126
|
return false;
|
|
126
127
|
}
|
|
127
128
|
|
package/web-types.json
CHANGED