@vaadin/checkbox 23.2.0-dev.53560527d → 23.2.0

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  An input field representing a binary choice.
4
4
 
5
- [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/checkbox)
5
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/checkbox)
6
6
 
7
7
  [![npm version](https://badgen.net/npm/v/@vaadin/checkbox)](https://www.npmjs.com/package/@vaadin/checkbox)
8
8
  [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
@@ -13,7 +13,7 @@ An input field representing a binary choice.
13
13
  <vaadin-checkbox label="Indeterminate" indeterminate></vaadin-checkbox>
14
14
  ```
15
15
 
16
- [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/checkbox/screenshot.png" width="400" alt="Screenshot of vaadin-checkbox">](https://vaadin.com/docs/latest/ds/components/checkbox)
16
+ [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/checkbox/screenshot.png" width="400" alt="Screenshot of vaadin-checkbox">](https://vaadin.com/docs/latest/components/checkbox)
17
17
 
18
18
  ## Installation
19
19
 
@@ -31,7 +31,7 @@ import '@vaadin/checkbox';
31
31
 
32
32
  ## Themes
33
33
 
34
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material.
34
+ Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
35
35
  The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/checkbox/vaadin-checkbox.js) of the package uses the Lumo theme.
36
36
 
37
37
  To use the Material theme, import the component from the `theme/material` folder:
@@ -54,7 +54,7 @@ import '@vaadin/checkbox/src/vaadin-checkbox.js';
54
54
 
55
55
  ## Contributing
56
56
 
57
- Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
57
+ Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
58
58
 
59
59
  ## License
60
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/checkbox",
3
- "version": "23.2.0-dev.53560527d",
3
+ "version": "23.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,9 @@
23
23
  "src",
24
24
  "theme",
25
25
  "vaadin-*.d.ts",
26
- "vaadin-*.js"
26
+ "vaadin-*.js",
27
+ "web-types.json",
28
+ "web-types.lit.json"
27
29
  ],
28
30
  "keywords": [
29
31
  "Vaadin",
@@ -34,16 +36,20 @@
34
36
  ],
35
37
  "dependencies": {
36
38
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "23.2.0-dev.53560527d",
38
- "@vaadin/field-base": "23.2.0-dev.53560527d",
39
- "@vaadin/vaadin-lumo-styles": "23.2.0-dev.53560527d",
40
- "@vaadin/vaadin-material-styles": "23.2.0-dev.53560527d",
41
- "@vaadin/vaadin-themable-mixin": "23.2.0-dev.53560527d"
39
+ "@vaadin/component-base": "^23.2.0",
40
+ "@vaadin/field-base": "^23.2.0",
41
+ "@vaadin/vaadin-lumo-styles": "^23.2.0",
42
+ "@vaadin/vaadin-material-styles": "^23.2.0",
43
+ "@vaadin/vaadin-themable-mixin": "^23.2.0"
42
44
  },
43
45
  "devDependencies": {
44
46
  "@esm-bundle/chai": "^4.3.4",
45
47
  "@vaadin/testing-helpers": "^0.3.2",
46
48
  "sinon": "^13.0.2"
47
49
  },
48
- "gitHead": "6c5c18369b09e22e76365d8a8a5e4bbb220f969b"
50
+ "web-types": [
51
+ "web-types.json",
52
+ "web-types.lit.json"
53
+ ],
54
+ "gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
49
55
  }
@@ -56,7 +56,7 @@ export interface CheckboxEventMap extends HTMLElementEventMap, CheckboxCustomEve
56
56
  * `checked` | Set when the checkbox is checked. | `:host`
57
57
  * `has-label` | Set when the checkbox has a label. | `:host`
58
58
  *
59
- * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
59
+ * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
60
60
  *
61
61
  * @fires {CustomEvent} checked-changed - Fired when the `checked` property changes.
62
62
  * @fires {CustomEvent} indeterminate-changed - Fired when the `indeterminate` property changes.
@@ -81,13 +81,13 @@ declare class Checkbox extends LabelMixin(
81
81
  addEventListener<K extends keyof CheckboxEventMap>(
82
82
  type: K,
83
83
  listener: (this: Checkbox, ev: CheckboxEventMap[K]) => void,
84
- options?: boolean | AddEventListenerOptions,
84
+ options?: AddEventListenerOptions | boolean,
85
85
  ): void;
86
86
 
87
87
  removeEventListener<K extends keyof CheckboxEventMap>(
88
88
  type: K,
89
89
  listener: (this: Checkbox, ev: CheckboxEventMap[K]) => void,
90
- options?: boolean | EventListenerOptions,
90
+ options?: EventListenerOptions | boolean,
91
91
  ): void;
92
92
  }
93
93
 
@@ -42,7 +42,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
42
42
  * `checked` | Set when the checkbox is checked. | `:host`
43
43
  * `has-label` | Set when the checkbox has a label. | `:host`
44
44
  *
45
- * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
45
+ * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
46
46
  *
47
47
  * @fires {CustomEvent} checked-changed - Fired when the `checked` property changes.
48
48
  * @fires {CustomEvent} indeterminate-changed - Fired when the `indeterminate` property changes.
package/web-types.json ADDED
@@ -0,0 +1,181 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/checkbox",
4
+ "version": "23.2.0",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "vaadin-checkbox",
11
+ "description": "`<vaadin-checkbox>` is an input field representing a binary choice.\n\n```html\n<vaadin-checkbox label=\"I accept the terms and conditions\"></vaadin-checkbox>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`checkbox` | The wrapper element that contains slotted <input type=\"checkbox\">.\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------|-------------|--------------\n`active` | Set when the checkbox is pressed down, either with mouse, touch or the keyboard. | `:host`\n`disabled` | Set when the checkbox is disabled. | `:host`\n`focus-ring` | Set when the checkbox is focused using the keyboard. | `:host`\n`focused` | Set when the checkbox is focused. | `:host`\n`indeterminate` | Set when the checkbox is in the indeterminate state. | `:host`\n`checked` | Set when the checkbox is checked. | `:host`\n`has-label` | Set when the checkbox has a label. | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
12
+ "attributes": [
13
+ {
14
+ "name": "disabled",
15
+ "description": "If true, the user cannot interact with this element.",
16
+ "value": {
17
+ "type": [
18
+ "boolean",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "autofocus",
26
+ "description": "Specify that this control should have input focus when the page loads.",
27
+ "value": {
28
+ "type": [
29
+ "boolean",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "name": "value",
37
+ "description": "The value of the field.",
38
+ "value": {
39
+ "type": [
40
+ "string",
41
+ "null",
42
+ "undefined"
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "name": "checked",
48
+ "description": "True if the element is checked.",
49
+ "value": {
50
+ "type": [
51
+ "boolean"
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "name": "label",
57
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
58
+ "value": {
59
+ "type": [
60
+ "string",
61
+ "null",
62
+ "undefined"
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "name": "indeterminate",
68
+ "description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes",
69
+ "value": {
70
+ "type": [
71
+ "boolean"
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "name": "name",
77
+ "description": "The name of the checkbox.",
78
+ "value": {
79
+ "type": [
80
+ "string"
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ "name": "theme",
86
+ "description": "The theme variants to apply to the component.",
87
+ "value": {
88
+ "type": [
89
+ "string",
90
+ "null",
91
+ "undefined"
92
+ ]
93
+ }
94
+ }
95
+ ],
96
+ "js": {
97
+ "properties": [
98
+ {
99
+ "name": "disabled",
100
+ "description": "If true, the user cannot interact with this element.",
101
+ "value": {
102
+ "type": [
103
+ "boolean",
104
+ "null",
105
+ "undefined"
106
+ ]
107
+ }
108
+ },
109
+ {
110
+ "name": "autofocus",
111
+ "description": "Specify that this control should have input focus when the page loads.",
112
+ "value": {
113
+ "type": [
114
+ "boolean",
115
+ "null",
116
+ "undefined"
117
+ ]
118
+ }
119
+ },
120
+ {
121
+ "name": "value",
122
+ "description": "The value of the field.",
123
+ "value": {
124
+ "type": [
125
+ "string",
126
+ "null",
127
+ "undefined"
128
+ ]
129
+ }
130
+ },
131
+ {
132
+ "name": "checked",
133
+ "description": "True if the element is checked.",
134
+ "value": {
135
+ "type": [
136
+ "boolean"
137
+ ]
138
+ }
139
+ },
140
+ {
141
+ "name": "label",
142
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
143
+ "value": {
144
+ "type": [
145
+ "string",
146
+ "null",
147
+ "undefined"
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ "name": "indeterminate",
153
+ "description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes",
154
+ "value": {
155
+ "type": [
156
+ "boolean"
157
+ ]
158
+ }
159
+ },
160
+ {
161
+ "name": "name",
162
+ "description": "The name of the checkbox.",
163
+ "value": {
164
+ "type": [
165
+ "string"
166
+ ]
167
+ }
168
+ }
169
+ ],
170
+ "events": [
171
+ {
172
+ "name": "indeterminate-changed",
173
+ "description": "Fired when the `indeterminate` property changes."
174
+ }
175
+ ]
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/checkbox",
4
+ "version": "23.2.0",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
18
+ "name": "vaadin-checkbox",
19
+ "description": "`<vaadin-checkbox>` is an input field representing a binary choice.\n\n```html\n<vaadin-checkbox label=\"I accept the terms and conditions\"></vaadin-checkbox>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`checkbox` | The wrapper element that contains slotted <input type=\"checkbox\">.\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------|-------------|--------------\n`active` | Set when the checkbox is pressed down, either with mouse, touch or the keyboard. | `:host`\n`disabled` | Set when the checkbox is disabled. | `:host`\n`focus-ring` | Set when the checkbox is focused using the keyboard. | `:host`\n`focused` | Set when the checkbox is focused. | `:host`\n`indeterminate` | Set when the checkbox is in the indeterminate state. | `:host`\n`checked` | Set when the checkbox is checked. | `:host`\n`has-label` | Set when the checkbox has a label. | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?autofocus",
31
+ "description": "Specify that this control should have input focus when the page loads.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": "?checked",
38
+ "description": "True if the element is checked.",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": "?indeterminate",
45
+ "description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
50
+ {
51
+ "name": ".value",
52
+ "description": "The value of the field.",
53
+ "value": {
54
+ "kind": "expression"
55
+ }
56
+ },
57
+ {
58
+ "name": ".label",
59
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
60
+ "value": {
61
+ "kind": "expression"
62
+ }
63
+ },
64
+ {
65
+ "name": ".name",
66
+ "description": "The name of the checkbox.",
67
+ "value": {
68
+ "kind": "expression"
69
+ }
70
+ },
71
+ {
72
+ "name": "@indeterminate-changed",
73
+ "description": "Fired when the `indeterminate` property changes.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ }