@vaadin/checkbox 25.1.6 → 25.1.8
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.1.
|
|
3
|
+
"version": "25.1.8",
|
|
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.1.
|
|
39
|
-
"@vaadin/component-base": "~25.1.
|
|
40
|
-
"@vaadin/field-base": "~25.1.
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "~25.1.
|
|
38
|
+
"@vaadin/a11y-base": "~25.1.8",
|
|
39
|
+
"@vaadin/component-base": "~25.1.8",
|
|
40
|
+
"@vaadin/field-base": "~25.1.8",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "~25.1.8",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "~25.1.
|
|
46
|
-
"@vaadin/chai-plugins": "~25.1.
|
|
47
|
-
"@vaadin/test-runner-commands": "~25.1.
|
|
45
|
+
"@vaadin/aura": "~25.1.8",
|
|
46
|
+
"@vaadin/chai-plugins": "~25.1.8",
|
|
47
|
+
"@vaadin/test-runner-commands": "~25.1.8",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "~25.1.
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "~25.1.8",
|
|
50
50
|
"sinon": "^21.0.2"
|
|
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": "284962838c38ec84495ea097b97d6d03cad2069b"
|
|
58
58
|
}
|
|
@@ -128,9 +128,8 @@ export const CheckboxMixin = (superclass) =>
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* Override method inherited from `ActiveMixin` to
|
|
132
|
-
* attribute
|
|
133
|
-
* or when clicking slotted helper or error message element.
|
|
131
|
+
* Override method inherited from `ActiveMixin` to only set the `active`
|
|
132
|
+
* attribute for clicks that actually toggle the checked state.
|
|
134
133
|
*
|
|
135
134
|
* @param {Event} event
|
|
136
135
|
* @return {boolean}
|
|
@@ -138,12 +137,14 @@ export const CheckboxMixin = (superclass) =>
|
|
|
138
137
|
* @override
|
|
139
138
|
*/
|
|
140
139
|
_shouldSetActive(event) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
const [target] = event.composedPath();
|
|
141
|
+
|
|
142
|
+
const togglesChecked =
|
|
143
|
+
target === this.inputElement ||
|
|
144
|
+
target.part.contains('required-indicator') ||
|
|
145
|
+
(this._labelNode.contains(target) && !target.closest('a'));
|
|
146
|
+
|
|
147
|
+
if (this.readonly || !togglesChecked) {
|
|
147
148
|
return false;
|
|
148
149
|
}
|
|
149
150
|
|
package/web-types.json
CHANGED