@govbr-ds/webcomponents 2.0.0-next.4 → 2.0.0-next.5

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.
Files changed (129) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +104 -82
  3. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  4. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  5. package/dist/cjs/br-button.cjs.entry.js +116 -0
  6. package/dist/cjs/br-button.cjs.entry.js.map +1 -0
  7. package/dist/cjs/br-checkbox.cjs.entry.js +98 -0
  8. package/dist/cjs/br-checkbox.cjs.entry.js.map +1 -0
  9. package/dist/cjs/br-input.cjs.entry.js +116 -0
  10. package/dist/cjs/br-input.cjs.entry.js.map +1 -0
  11. package/dist/cjs/br-item.cjs.entry.js +87 -0
  12. package/dist/cjs/br-item.cjs.entry.js.map +1 -0
  13. package/dist/cjs/index-c5475da7.js +1476 -0
  14. package/dist/cjs/index-c5475da7.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +4 -0
  16. package/dist/cjs/index.cjs.js.map +1 -0
  17. package/dist/cjs/inherited-attributes-61a2aff9.js +103 -0
  18. package/dist/cjs/inherited-attributes-61a2aff9.js.map +1 -0
  19. package/dist/cjs/loader.cjs.js +17 -0
  20. package/dist/cjs/loader.cjs.js.map +1 -0
  21. package/dist/cjs/webcomponents.cjs.js +27 -0
  22. package/dist/cjs/webcomponents.cjs.js.map +1 -0
  23. package/dist/collection/collection-manifest.json +15 -0
  24. package/dist/collection/components/button/button.css +24213 -0
  25. package/dist/collection/components/button/button.js +454 -0
  26. package/dist/collection/components/button/button.js.map +1 -0
  27. package/dist/collection/components/checkbox/checkbox.css +23375 -0
  28. package/dist/collection/components/checkbox/checkbox.js +392 -0
  29. package/dist/collection/components/checkbox/checkbox.js.map +1 -0
  30. package/dist/collection/components/input/input.css +23428 -0
  31. package/dist/collection/components/input/input.js +631 -0
  32. package/dist/collection/components/input/input.js.map +1 -0
  33. package/dist/collection/components/item/item.css +23596 -0
  34. package/dist/collection/components/item/item.js +297 -0
  35. package/dist/collection/components/item/item.js.map +1 -0
  36. package/dist/collection/index.js +2 -0
  37. package/dist/collection/index.js.map +1 -0
  38. package/dist/collection/pages/button/button.js +32 -0
  39. package/dist/collection/pages/checkbox/checkbox.js +34 -0
  40. package/dist/collection/pages/input/input.js +35 -0
  41. package/dist/collection/pages/item/item.js +0 -0
  42. package/dist/collection/utils/inherited-attributes.js +98 -0
  43. package/dist/collection/utils/inherited-attributes.js.map +1 -0
  44. package/dist/collection/utils/interfaces.js +2 -0
  45. package/dist/collection/utils/interfaces.js.map +1 -0
  46. package/dist/components/br-button.d.ts +11 -0
  47. package/dist/components/br-button.js +8 -0
  48. package/dist/components/br-button.js.map +1 -0
  49. package/dist/components/br-checkbox.d.ts +11 -0
  50. package/dist/components/br-checkbox.js +114 -0
  51. package/dist/components/br-checkbox.js.map +1 -0
  52. package/dist/components/br-input.d.ts +11 -0
  53. package/dist/components/br-input.js +150 -0
  54. package/dist/components/br-input.js.map +1 -0
  55. package/dist/components/br-item.d.ts +11 -0
  56. package/dist/components/br-item.js +99 -0
  57. package/dist/components/br-item.js.map +1 -0
  58. package/dist/components/button.js +132 -0
  59. package/dist/components/button.js.map +1 -0
  60. package/dist/components/index.d.ts +44 -0
  61. package/dist/components/index.js +7 -0
  62. package/dist/components/index.js.map +1 -0
  63. package/dist/components/inherited-attributes.js +101 -0
  64. package/dist/components/inherited-attributes.js.map +1 -0
  65. package/dist/esm/app-globals-0f993ce5.js +5 -0
  66. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  67. package/dist/esm/br-button.entry.js +112 -0
  68. package/dist/esm/br-button.entry.js.map +1 -0
  69. package/dist/esm/br-checkbox.entry.js +94 -0
  70. package/dist/esm/br-checkbox.entry.js.map +1 -0
  71. package/dist/esm/br-input.entry.js +112 -0
  72. package/dist/esm/br-input.entry.js.map +1 -0
  73. package/dist/esm/br-item.entry.js +83 -0
  74. package/dist/esm/br-item.entry.js.map +1 -0
  75. package/dist/esm/index-57007b22.js +1447 -0
  76. package/dist/esm/index-57007b22.js.map +1 -0
  77. package/dist/esm/index.js +3 -0
  78. package/dist/esm/index.js.map +1 -0
  79. package/dist/esm/inherited-attributes-c856c729.js +101 -0
  80. package/dist/esm/inherited-attributes-c856c729.js.map +1 -0
  81. package/dist/esm/loader.js +13 -0
  82. package/dist/esm/loader.js.map +1 -0
  83. package/dist/esm/polyfills/core-js.js +11 -0
  84. package/dist/esm/polyfills/dom.js +79 -0
  85. package/dist/esm/polyfills/es5-html-element.js +1 -0
  86. package/dist/esm/polyfills/index.js +34 -0
  87. package/dist/esm/polyfills/system.js +6 -0
  88. package/dist/esm/webcomponents.js +22 -0
  89. package/dist/esm/webcomponents.js.map +1 -0
  90. package/dist/index.cjs.js +1 -0
  91. package/dist/index.js +1 -0
  92. package/dist/types/components/button/button.d.ts +68 -0
  93. package/dist/types/components/checkbox/checkbox.d.ts +54 -0
  94. package/dist/types/components/input/input.d.ts +85 -0
  95. package/dist/types/components/item/item.d.ts +50 -0
  96. package/dist/types/components.d.ts +649 -0
  97. package/dist/types/index.d.ts +1 -0
  98. package/dist/types/stencil-public-runtime.d.ts +1681 -0
  99. package/dist/types/utils/inherited-attributes.d.ts +20 -0
  100. package/dist/types/utils/interfaces.d.ts +3 -0
  101. package/dist/webcomponents/index.esm.js +2 -0
  102. package/dist/webcomponents/index.esm.js.map +1 -0
  103. package/dist/webcomponents/p-1b276845.entry.js +2 -0
  104. package/dist/webcomponents/p-1b276845.entry.js.map +1 -0
  105. package/dist/webcomponents/p-5f162437.entry.js +2 -0
  106. package/dist/webcomponents/p-5f162437.entry.js.map +1 -0
  107. package/dist/webcomponents/p-6d857090.entry.js +2 -0
  108. package/dist/webcomponents/p-6d857090.entry.js.map +1 -0
  109. package/dist/webcomponents/p-a0b98f14.entry.js +2 -0
  110. package/dist/webcomponents/p-a0b98f14.entry.js.map +1 -0
  111. package/dist/webcomponents/p-a3d8d916.js +3 -0
  112. package/dist/webcomponents/p-a3d8d916.js.map +1 -0
  113. package/dist/webcomponents/p-e1255160.js +2 -0
  114. package/dist/webcomponents/p-e1255160.js.map +1 -0
  115. package/dist/webcomponents/p-ee6f4f3f.js +2 -0
  116. package/dist/webcomponents/p-ee6f4f3f.js.map +1 -0
  117. package/dist/webcomponents/webcomponents.esm.js +2 -0
  118. package/dist/webcomponents/webcomponents.esm.js.map +1 -0
  119. package/hydrate/index.d.ts +218 -0
  120. package/hydrate/index.js +14213 -0
  121. package/hydrate/package.json +6 -0
  122. package/loader/cdn.js +3 -0
  123. package/loader/index.cjs.js +3 -0
  124. package/loader/index.d.ts +21 -0
  125. package/loader/index.es2017.js +3 -0
  126. package/loader/index.js +4 -0
  127. package/loader/package.json +11 -0
  128. package/package.json +41 -85
  129. package/vscode-data.json +272 -0
@@ -0,0 +1,392 @@
1
+ import { h } from "@stencil/core";
2
+ import { inheritAriaAttributes } from "../../utils/inherited-attributes";
3
+ /**
4
+ * Consulte a [documentação GovBR-DS](https://www.gov.br/ds/components/checkbox?tab=designer) para mais detalhes.
5
+ */
6
+ export class Checkbox {
7
+ constructor() {
8
+ this.inheritedAttributes = {};
9
+ this.checked = false;
10
+ this.disabled = false;
11
+ this.invalid = false;
12
+ this.valid = false;
13
+ this.name = undefined;
14
+ this.label = undefined;
15
+ this.value = undefined;
16
+ }
17
+ connectedCallback() {
18
+ this.brConnectedCallback.emit(this);
19
+ }
20
+ componentWillLoad() {
21
+ this.brComponentWillLoad.emit(this);
22
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
23
+ }
24
+ componentDidLoad() {
25
+ this.brComponentDidLoad.emit(this);
26
+ }
27
+ componentWillRender() {
28
+ this.brComponentWillRender.emit(this);
29
+ }
30
+ componentDidRender() {
31
+ this.brComponentDidRender.emit(this);
32
+ }
33
+ componentShouldUpdate() {
34
+ this.brComponentShouldUpdate.emit(this);
35
+ }
36
+ componentWillUpdate() {
37
+ this.brComponentWillUpdate.emit(this);
38
+ }
39
+ componentDidUpdate() {
40
+ this.brComponentDidUpdate.emit(this);
41
+ }
42
+ disconnectedCallback() {
43
+ this.brDisconnectedCallback.emit(this);
44
+ }
45
+ onFormAssociatedCallback(form) {
46
+ this.formAssociatedCallback.emit(form);
47
+ }
48
+ onFormDisassociatedCallback(form) {
49
+ this.formDisassociatedCallback.emit(form);
50
+ }
51
+ getCssClassMap() {
52
+ return {
53
+ 'br-checkbox': true,
54
+ valid: this.valid,
55
+ invalid: this.invalid,
56
+ disabled: this.disabled,
57
+ };
58
+ }
59
+ handleCheckedChange(event) {
60
+ this.checked = event.target.checked;
61
+ this.checkedChange.emit(this.checked);
62
+ }
63
+ render() {
64
+ return (h("host", { key: 'ac06db5d486de8f606d65761c231dc4f1fc1809f' }, h("div", { key: '42dd873c75fad048f4041b4e93ed35309b1b261c', class: this.getCssClassMap() }, h("input", Object.assign({ key: '619900517706ddc467391541796c77439aa7261b', "aria-label": this.label, type: "checkbox", id: this.name, name: this.name, checked: this.checked, value: this.value, onChange: (event) => this.handleCheckedChange(event) }, this.inheritedAttributes)), this.label && h("label", { key: 'b8defcb9234be61621eb31db0fbc1513b6b64d01', htmlFor: this.name }, this.label))));
65
+ }
66
+ static get is() { return "br-checkbox"; }
67
+ static get encapsulation() { return "shadow"; }
68
+ static get formAssociated() { return true; }
69
+ static get originalStyleUrls() {
70
+ return {
71
+ "$": ["checkbox.scss"]
72
+ };
73
+ }
74
+ static get styleUrls() {
75
+ return {
76
+ "$": ["checkbox.css"]
77
+ };
78
+ }
79
+ static get properties() {
80
+ return {
81
+ "checked": {
82
+ "type": "boolean",
83
+ "mutable": true,
84
+ "complexType": {
85
+ "original": "boolean",
86
+ "resolved": "boolean",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": ""
94
+ },
95
+ "attribute": "checked",
96
+ "reflect": true,
97
+ "defaultValue": "false"
98
+ },
99
+ "disabled": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "attribute": "disabled",
114
+ "reflect": true,
115
+ "defaultValue": "false"
116
+ },
117
+ "invalid": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": ""
130
+ },
131
+ "attribute": "invalid",
132
+ "reflect": true,
133
+ "defaultValue": "false"
134
+ },
135
+ "valid": {
136
+ "type": "boolean",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "boolean",
140
+ "resolved": "boolean",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": false,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": ""
148
+ },
149
+ "attribute": "valid",
150
+ "reflect": true,
151
+ "defaultValue": "false"
152
+ },
153
+ "name": {
154
+ "type": "string",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string",
158
+ "resolved": "string",
159
+ "references": {}
160
+ },
161
+ "required": true,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": ""
166
+ },
167
+ "attribute": "name",
168
+ "reflect": true
169
+ },
170
+ "label": {
171
+ "type": "string",
172
+ "mutable": false,
173
+ "complexType": {
174
+ "original": "string",
175
+ "resolved": "string",
176
+ "references": {}
177
+ },
178
+ "required": false,
179
+ "optional": false,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": ""
183
+ },
184
+ "attribute": "label",
185
+ "reflect": true
186
+ },
187
+ "value": {
188
+ "type": "string",
189
+ "mutable": false,
190
+ "complexType": {
191
+ "original": "string",
192
+ "resolved": "string",
193
+ "references": {}
194
+ },
195
+ "required": false,
196
+ "optional": false,
197
+ "docs": {
198
+ "tags": [],
199
+ "text": ""
200
+ },
201
+ "attribute": "value",
202
+ "reflect": true
203
+ }
204
+ };
205
+ }
206
+ static get events() {
207
+ return [{
208
+ "method": "brConnectedCallback",
209
+ "name": "brConnectedCallback",
210
+ "bubbles": true,
211
+ "cancelable": true,
212
+ "composed": true,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
216
+ },
217
+ "complexType": {
218
+ "original": "this",
219
+ "resolved": "this",
220
+ "references": {}
221
+ }
222
+ }, {
223
+ "method": "brComponentWillLoad",
224
+ "name": "brComponentWillLoad",
225
+ "bubbles": true,
226
+ "cancelable": true,
227
+ "composed": true,
228
+ "docs": {
229
+ "tags": [],
230
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
231
+ },
232
+ "complexType": {
233
+ "original": "this",
234
+ "resolved": "this",
235
+ "references": {}
236
+ }
237
+ }, {
238
+ "method": "brComponentDidLoad",
239
+ "name": "brComponentDidLoad",
240
+ "bubbles": true,
241
+ "cancelable": true,
242
+ "composed": true,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
246
+ },
247
+ "complexType": {
248
+ "original": "this",
249
+ "resolved": "this",
250
+ "references": {}
251
+ }
252
+ }, {
253
+ "method": "brComponentWillRender",
254
+ "name": "brComponentWillRender",
255
+ "bubbles": true,
256
+ "cancelable": true,
257
+ "composed": true,
258
+ "docs": {
259
+ "tags": [],
260
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
261
+ },
262
+ "complexType": {
263
+ "original": "this",
264
+ "resolved": "this",
265
+ "references": {}
266
+ }
267
+ }, {
268
+ "method": "brComponentDidRender",
269
+ "name": "brComponentDidRender",
270
+ "bubbles": true,
271
+ "cancelable": true,
272
+ "composed": true,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
276
+ },
277
+ "complexType": {
278
+ "original": "this",
279
+ "resolved": "this",
280
+ "references": {}
281
+ }
282
+ }, {
283
+ "method": "brComponentShouldUpdate",
284
+ "name": "brComponentShouldUpdate",
285
+ "bubbles": true,
286
+ "cancelable": true,
287
+ "composed": true,
288
+ "docs": {
289
+ "tags": [],
290
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
291
+ },
292
+ "complexType": {
293
+ "original": "this",
294
+ "resolved": "this",
295
+ "references": {}
296
+ }
297
+ }, {
298
+ "method": "brComponentWillUpdate",
299
+ "name": "brComponentWillUpdate",
300
+ "bubbles": true,
301
+ "cancelable": true,
302
+ "composed": true,
303
+ "docs": {
304
+ "tags": [],
305
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
306
+ },
307
+ "complexType": {
308
+ "original": "this",
309
+ "resolved": "this",
310
+ "references": {}
311
+ }
312
+ }, {
313
+ "method": "brComponentDidUpdate",
314
+ "name": "brComponentDidUpdate",
315
+ "bubbles": true,
316
+ "cancelable": true,
317
+ "composed": true,
318
+ "docs": {
319
+ "tags": [],
320
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
321
+ },
322
+ "complexType": {
323
+ "original": "this",
324
+ "resolved": "this",
325
+ "references": {}
326
+ }
327
+ }, {
328
+ "method": "brDisconnectedCallback",
329
+ "name": "brDisconnectedCallback",
330
+ "bubbles": true,
331
+ "cancelable": true,
332
+ "composed": true,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
336
+ },
337
+ "complexType": {
338
+ "original": "this",
339
+ "resolved": "this",
340
+ "references": {}
341
+ }
342
+ }, {
343
+ "method": "formAssociatedCallback",
344
+ "name": "formAssociatedCallback",
345
+ "bubbles": true,
346
+ "cancelable": true,
347
+ "composed": true,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": "Componente foi inserido em um `<form>`"
351
+ },
352
+ "complexType": {
353
+ "original": "this",
354
+ "resolved": "this",
355
+ "references": {}
356
+ }
357
+ }, {
358
+ "method": "formDisassociatedCallback",
359
+ "name": "formDisassociatedCallback",
360
+ "bubbles": true,
361
+ "cancelable": true,
362
+ "composed": true,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": "Componente foi removido de um `<form>`"
366
+ },
367
+ "complexType": {
368
+ "original": "this",
369
+ "resolved": "this",
370
+ "references": {}
371
+ }
372
+ }, {
373
+ "method": "checkedChange",
374
+ "name": "checkedChange",
375
+ "bubbles": true,
376
+ "cancelable": true,
377
+ "composed": true,
378
+ "docs": {
379
+ "tags": [],
380
+ "text": ""
381
+ },
382
+ "complexType": {
383
+ "original": "boolean",
384
+ "resolved": "boolean",
385
+ "references": {}
386
+ }
387
+ }];
388
+ }
389
+ static get elementRef() { return "el"; }
390
+ static get attachInternalsMemberName() { return "elementInternals"; }
391
+ }
392
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"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","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, Prop, h } from '@stencil/core'\nimport { Attributes, inheritAriaAttributes } from '../../utils/inherited-attributes'\nimport { CssClassMap } from '../../utils/interfaces'\n\n/**\n * Consulte a [documentação GovBR-DS](https://www.gov.br/ds/components/checkbox?tab=designer) para mais detalhes.\n */\n@Component({\n tag: 'br-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Checkbox {\n /** Elemento host */\n @Element() el: HTMLInputElement\n\n @AttachInternals() elementInternals: ElementInternals\n\n @Prop({ reflect: true, mutable: true }) checked: boolean = false\n\n @Prop({ reflect: true }) disabled: boolean = false\n\n @Prop({ reflect: true }) invalid: boolean = false\n\n @Prop({ reflect: true }) valid: boolean = false\n\n @Prop({ reflect: true }) name!: string\n\n @Prop({ reflect: true }) label: string\n\n @Prop({ reflect: true }) value: string\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brConnectedCallback: EventEmitter<this>\n connectedCallback() {\n this.brConnectedCallback.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillLoad: EventEmitter<this>\n componentWillLoad() {\n this.brComponentWillLoad.emit(this)\n this.inheritedAttributes = inheritAriaAttributes(this.el)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidLoad: EventEmitter<this>\n componentDidLoad() {\n this.brComponentDidLoad.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillRender: EventEmitter<this>\n componentWillRender() {\n this.brComponentWillRender.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidRender: EventEmitter<this>\n componentDidRender() {\n this.brComponentDidRender.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentShouldUpdate: EventEmitter<this>\n componentShouldUpdate() {\n this.brComponentShouldUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillUpdate: EventEmitter<this>\n componentWillUpdate() {\n this.brComponentWillUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidUpdate: EventEmitter<this>\n componentDidUpdate() {\n this.brComponentDidUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brDisconnectedCallback: EventEmitter<this>\n disconnectedCallback() {\n this.brDisconnectedCallback.emit(this)\n }\n\n /** Componente foi inserido em um `<form>` */\n @Event() formAssociatedCallback: EventEmitter<this>\n onFormAssociatedCallback(form) {\n this.formAssociatedCallback.emit(form)\n }\n\n /** Componente foi removido de um `<form>` */\n @Event() formDisassociatedCallback: EventEmitter<this>\n onFormDisassociatedCallback(form) {\n this.formDisassociatedCallback.emit(form)\n }\n\n private getCssClassMap(): CssClassMap {\n return {\n 'br-checkbox': true,\n valid: this.valid,\n invalid: this.invalid,\n disabled: this.disabled,\n }\n }\n\n private inheritedAttributes: Attributes = {}\n\n @Event() checkedChange: EventEmitter<boolean>\n\n private handleCheckedChange(event: Event) {\n this.checked = (event.target as HTMLInputElement).checked\n this.checkedChange.emit(this.checked)\n }\n\n render() {\n return (\n <host>\n <div class={this.getCssClassMap()}>\n <input\n aria-label={this.label}\n type=\"checkbox\"\n id={this.name}\n name={this.name}\n checked={this.checked}\n value={this.value}\n onChange={(event) => this.handleCheckedChange(event)}\n {...this.inheritedAttributes}\n />\n {this.label && <label htmlFor={this.name}>{this.label}</label>}\n </div>\n </host>\n )\n }\n}\n"]}