@vaadin/checkbox 25.3.0-alpha4 → 25.3.0-alpha5

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/checkbox",
3
- "version": "25.3.0-alpha4",
3
+ "version": "25.3.0-alpha5",
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-alpha4",
39
- "@vaadin/component-base": "25.3.0-alpha4",
40
- "@vaadin/field-base": "25.3.0-alpha4",
41
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha4",
38
+ "@vaadin/a11y-base": "25.3.0-alpha5",
39
+ "@vaadin/component-base": "25.3.0-alpha5",
40
+ "@vaadin/field-base": "25.3.0-alpha5",
41
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha5",
42
42
  "lit": "^3.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@vaadin/aura": "25.3.0-alpha4",
46
- "@vaadin/chai-plugins": "25.3.0-alpha4",
47
- "@vaadin/test-runner-commands": "25.3.0-alpha4",
45
+ "@vaadin/aura": "25.3.0-alpha5",
46
+ "@vaadin/chai-plugins": "25.3.0-alpha5",
47
+ "@vaadin/test-runner-commands": "25.3.0-alpha5",
48
48
  "@vaadin/testing-helpers": "^2.0.0",
49
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha4",
49
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha5",
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": "ff0efcd52d3b8a081e8101d36cf7bef65ed71cb1"
57
+ "gitHead": "0be2142cd8b95a562d58735033f947f7109103ab"
58
58
  }
@@ -106,9 +106,8 @@ export const CheckboxMixin = (superclass) =>
106
106
  }
107
107
 
108
108
  /**
109
- * Override method inherited from `ActiveMixin` to prevent setting `active`
110
- * attribute when readonly, or when clicking a link placed inside the label,
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
- if (
120
- this.readonly ||
121
- event.target.localName === 'a' ||
122
- event.target === this._helperNode ||
123
- event.target === this._errorNode
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "25.3.0-alpha4",
4
+ "version": "25.3.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "25.3.0-alpha4",
4
+ "version": "25.3.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {