@vaadin/checkbox 25.1.7 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/checkbox",
3
- "version": "25.1.7",
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.7",
39
- "@vaadin/component-base": "~25.1.7",
40
- "@vaadin/field-base": "~25.1.7",
41
- "@vaadin/vaadin-themable-mixin": "~25.1.7",
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.7",
46
- "@vaadin/chai-plugins": "~25.1.7",
47
- "@vaadin/test-runner-commands": "~25.1.7",
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.7",
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": "9872e9dc95ced20136b2f5373760d8e47bf9d44b"
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 prevent setting `active`
132
- * attribute when readonly, or when clicking a link placed inside the label,
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
- if (
142
- this.readonly ||
143
- event.target.localName === 'a' ||
144
- event.target === this._helperNode ||
145
- event.target === this._errorNode
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "25.1.7",
4
+ "version": "25.1.8",
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.1.7",
4
+ "version": "25.1.8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {