@vaadin/checkbox 24.2.0-alpha7 → 24.2.0-alpha8

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": "24.2.0-alpha7",
3
+ "version": "24.2.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,12 +39,12 @@
39
39
  "dependencies": {
40
40
  "@open-wc/dedupe-mixin": "^1.3.0",
41
41
  "@polymer/polymer": "^3.0.0",
42
- "@vaadin/a11y-base": "24.2.0-alpha7",
43
- "@vaadin/component-base": "24.2.0-alpha7",
44
- "@vaadin/field-base": "24.2.0-alpha7",
45
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha7",
46
- "@vaadin/vaadin-material-styles": "24.2.0-alpha7",
47
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha7",
42
+ "@vaadin/a11y-base": "24.2.0-alpha8",
43
+ "@vaadin/component-base": "24.2.0-alpha8",
44
+ "@vaadin/field-base": "24.2.0-alpha8",
45
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha8",
46
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha8",
47
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha8",
48
48
  "lit": "^2.0.0"
49
49
  },
50
50
  "devDependencies": {
@@ -56,5 +56,5 @@
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "81ecf12d2d59a3e5b467273c37a391e31932dc9c"
59
+ "gitHead": "2c024e8fd462d178430418f76a61f498fb549998"
60
60
  }
@@ -103,6 +103,18 @@ export const CheckboxMixin = (superclass) =>
103
103
  return super._shouldSetActive(event);
104
104
  }
105
105
 
106
+ /**
107
+ * Override to mark the field as dirty on change.
108
+ *
109
+ * @param {Event} event
110
+ * @protected
111
+ * @override
112
+ */
113
+ _onChange(event) {
114
+ this.dirty = true;
115
+ super._onChange(event);
116
+ }
117
+
106
118
  /**
107
119
  * Override method inherited from `CheckedMixin` to reset
108
120
  * `indeterminate` state checkbox is toggled by the user.
@@ -11,6 +11,11 @@ import { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';
11
11
  import { LabelMixin } from '@vaadin/field-base/src/label-mixin.js';
12
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
13
 
14
+ /**
15
+ * Fired when the `dirty` property changes.
16
+ */
17
+ export type CheckboxDirtyChangedEvent = CustomEvent<{ value: boolean }>;
18
+
14
19
  /**
15
20
  * Fired when the `checked` property changes.
16
21
  */
@@ -22,6 +27,8 @@ export type CheckboxCheckedChangedEvent = CustomEvent<{ value: boolean }>;
22
27
  export type CheckboxIndeterminateChangedEvent = CustomEvent<{ value: boolean }>;
23
28
 
24
29
  export interface CheckboxCustomEventMap {
30
+ 'dirty-changed': CheckboxDirtyChangedEvent;
31
+
25
32
  'checked-changed': CheckboxCheckedChangedEvent;
26
33
 
27
34
  'indeterminate-changed': CheckboxIndeterminateChangedEvent;
@@ -58,6 +65,7 @@ export interface CheckboxEventMap extends HTMLElementEventMap, CheckboxCustomEve
58
65
  *
59
66
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
60
67
  *
68
+ * @fires {CustomEvent} dirty-changed - Fired when the `dirty` property changes.
61
69
  * @fires {CustomEvent} checked-changed - Fired when the `checked` property changes.
62
70
  * @fires {CustomEvent} indeterminate-changed - Fired when the `indeterminate` property changes.
63
71
  */
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": "24.2.0-alpha7",
4
+ "version": "24.2.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -32,6 +32,17 @@
32
32
  ]
33
33
  }
34
34
  },
35
+ {
36
+ "name": "dirty",
37
+ "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
38
+ "value": {
39
+ "type": [
40
+ "boolean",
41
+ "null",
42
+ "undefined"
43
+ ]
44
+ }
45
+ },
35
46
  {
36
47
  "name": "checked",
37
48
  "description": "True if the element is checked.",
@@ -117,6 +128,17 @@
117
128
  ]
118
129
  }
119
130
  },
131
+ {
132
+ "name": "dirty",
133
+ "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
134
+ "value": {
135
+ "type": [
136
+ "boolean",
137
+ "null",
138
+ "undefined"
139
+ ]
140
+ }
141
+ },
120
142
  {
121
143
  "name": "checked",
122
144
  "description": "True if the element is checked.",
@@ -172,6 +194,10 @@
172
194
  "name": "value-changed",
173
195
  "description": "Fired when the `value` property changes."
174
196
  },
197
+ {
198
+ "name": "dirty-changed",
199
+ "description": "Fired when the `dirty` property changes."
200
+ },
175
201
  {
176
202
  "name": "checked-changed",
177
203
  "description": "Fired when the `checked` property changes."
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "24.2.0-alpha7",
4
+ "version": "24.2.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -26,6 +26,13 @@
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
+ {
30
+ "name": "?dirty",
31
+ "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
29
36
  {
30
37
  "name": "?checked",
31
38
  "description": "True if the element is checked.",
@@ -75,6 +82,13 @@
75
82
  "kind": "expression"
76
83
  }
77
84
  },
85
+ {
86
+ "name": "@dirty-changed",
87
+ "description": "Fired when the `dirty` property changes.",
88
+ "value": {
89
+ "kind": "expression"
90
+ }
91
+ },
78
92
  {
79
93
  "name": "@checked-changed",
80
94
  "description": "Fired when the `checked` property changes.",