@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,631 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { inheritAriaAttributes } from "../../utils/inherited-attributes";
3
+ /**
4
+ *
5
+ * Consulte a [documentação GovBR-DS](https://www.gov.br/ds/components/input?tab=designer) para mais detalhes.
6
+ *
7
+ * @slot action Define a ação interna
8
+ *
9
+ */
10
+ export class Input {
11
+ constructor() {
12
+ this.inheritedAttributes = {};
13
+ this.type = 'text';
14
+ this.autocomplete = undefined;
15
+ this.autofocus = false;
16
+ this.density = '';
17
+ this.disabled = false;
18
+ this.inline = false;
19
+ this.icon = false;
20
+ this.button = false;
21
+ this.highlight = false;
22
+ this.success = false;
23
+ this.danger = false;
24
+ this.info = false;
25
+ this.warning = false;
26
+ this.label = undefined;
27
+ this.name = undefined;
28
+ this.placeholder = undefined;
29
+ this.readonly = false;
30
+ this.required = false;
31
+ this.value = undefined;
32
+ }
33
+ connectedCallback() {
34
+ this.brConnectedCallback.emit(this);
35
+ }
36
+ componentWillLoad() {
37
+ this.brComponentWillLoad.emit(this);
38
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
39
+ }
40
+ componentDidLoad() {
41
+ this.brComponentDidLoad.emit(this);
42
+ }
43
+ componentWillRender() {
44
+ this.brComponentWillRender.emit(this);
45
+ }
46
+ componentDidRender() {
47
+ this.brComponentDidRender.emit(this);
48
+ }
49
+ componentShouldUpdate() {
50
+ this.brComponentShouldUpdate.emit(this);
51
+ }
52
+ componentWillUpdate() {
53
+ this.brComponentWillUpdate.emit(this);
54
+ }
55
+ componentDidUpdate() {
56
+ this.brComponentDidUpdate.emit(this);
57
+ }
58
+ disconnectedCallback() {
59
+ this.brDisconnectedCallback.emit(this);
60
+ }
61
+ onFormAssociatedCallback(form) {
62
+ this.formAssociatedCallback.emit(form);
63
+ }
64
+ onFormDisassociatedCallback(form) {
65
+ this.formDisassociatedCallback.emit(form);
66
+ }
67
+ getInputCssClassMap() {
68
+ return {
69
+ 'br-input': true,
70
+ 'input-button': this.button,
71
+ large: this.density === 'large',
72
+ small: this.density === 'small',
73
+ 'input-inline': this.inline,
74
+ 'input-highlight': this.highlight,
75
+ success: this.success,
76
+ danger: this.danger,
77
+ info: this.info,
78
+ warning: this.warning,
79
+ };
80
+ }
81
+ handleInput(event) {
82
+ this.value = event.target.value;
83
+ this.valueChange.emit(this.value);
84
+ }
85
+ render() {
86
+ return (h(Host, { key: 'ac4754444dbcdbcd9d1947a9e490bbea432feb4c' }, h("div", { key: 'd6b0c337087e8425337e8398f321fc28453c7aa7', class: this.getInputCssClassMap() }, this.label && (h("label", { key: '5774464ab8936bf6a8cbe311ed183b4da084f766', class: "text-nowrap", htmlFor: this.el.id }, this.label)), this.icon && (h("div", { key: '030195a9f2663f367fcd795c172e79b90350900e', class: "input-icon" }, h("slot", { key: '13592d36976c6b615307fe709462a39654f64e2d', name: "icon" }))), h("input", Object.assign({ key: 'cdc48565c110adb3b8ddd0776c8c0abce66c1df3', autocomplete: this.autocomplete, autofocus: this.autofocus, disabled: this.disabled, onInput: this.handleInput.bind(this), placeholder: this.placeholder, readonly: this.readonly, required: this.required, title: this.el.title, type: this.type, value: this.value }, this.inheritedAttributes)), this.button && (h("br-button", { key: '5c52c25ad2a26285c66437082aa03fc0929e3e5d', class: "br-button", circle: true }, h("slot", { key: '9a0162c5cc0d1eec6d3a2c1804aea0704a1dd59d', name: "action" }))))));
87
+ }
88
+ static get is() { return "br-input"; }
89
+ static get encapsulation() { return "shadow"; }
90
+ static get formAssociated() { return true; }
91
+ static get originalStyleUrls() {
92
+ return {
93
+ "$": ["input.scss"]
94
+ };
95
+ }
96
+ static get styleUrls() {
97
+ return {
98
+ "$": ["input.css"]
99
+ };
100
+ }
101
+ static get properties() {
102
+ return {
103
+ "type": {
104
+ "type": "string",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "| 'color'\n | 'email'\n | 'hidden'\n | 'password'\n | 'range'\n | 'search'\n | 'number'\n | 'tel'\n | 'text'\n | 'url'",
108
+ "resolved": "\"color\" | \"email\" | \"hidden\" | \"number\" | \"password\" | \"range\" | \"search\" | \"tel\" | \"text\" | \"url\"",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Tipo de campo de entrada"
116
+ },
117
+ "attribute": "type",
118
+ "reflect": true,
119
+ "defaultValue": "'text'"
120
+ },
121
+ "autocomplete": {
122
+ "type": "string",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "'on' | 'off'",
126
+ "resolved": "\"off\" | \"on\"",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "Define o comportamento padr\u00E3o do browser para autocomplete em formul\u00E1rios"
134
+ },
135
+ "attribute": "autocomplete",
136
+ "reflect": true
137
+ },
138
+ "autofocus": {
139
+ "type": "boolean",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "boolean",
143
+ "resolved": "boolean",
144
+ "references": {}
145
+ },
146
+ "required": false,
147
+ "optional": false,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": "Se definido como true, o campo de entrada receber\u00E1 foco automaticamente quando o formul\u00E1rio for carregado"
151
+ },
152
+ "attribute": "autofocus",
153
+ "reflect": true,
154
+ "defaultValue": "false"
155
+ },
156
+ "density": {
157
+ "type": "string",
158
+ "mutable": false,
159
+ "complexType": {
160
+ "original": "'small' | 'large' | ''",
161
+ "resolved": "\"\" | \"large\" | \"small\"",
162
+ "references": {}
163
+ },
164
+ "required": false,
165
+ "optional": false,
166
+ "docs": {
167
+ "tags": [],
168
+ "text": "Comportamento: densidade"
169
+ },
170
+ "attribute": "density",
171
+ "reflect": true,
172
+ "defaultValue": "''"
173
+ },
174
+ "disabled": {
175
+ "type": "boolean",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "boolean",
179
+ "resolved": "boolean",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": "Se definido como true, o campo de entrada \u00E9 desabilitado e n\u00E3o pode ser interrompido."
187
+ },
188
+ "attribute": "disabled",
189
+ "reflect": true,
190
+ "defaultValue": "false"
191
+ },
192
+ "inline": {
193
+ "type": "boolean",
194
+ "mutable": false,
195
+ "complexType": {
196
+ "original": "boolean",
197
+ "resolved": "boolean",
198
+ "references": {}
199
+ },
200
+ "required": false,
201
+ "optional": false,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": "Define o label e input como comportamento inline"
205
+ },
206
+ "attribute": "inline",
207
+ "reflect": true,
208
+ "defaultValue": "false"
209
+ },
210
+ "icon": {
211
+ "type": "boolean",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "boolean",
215
+ "resolved": "boolean",
216
+ "references": {}
217
+ },
218
+ "required": false,
219
+ "optional": false,
220
+ "docs": {
221
+ "tags": [{
222
+ "name": "slot",
223
+ "text": "icon para definir o \u00EDcone"
224
+ }],
225
+ "text": "Define se o input vai ser icon. Use o"
226
+ },
227
+ "attribute": "icon",
228
+ "reflect": true,
229
+ "defaultValue": "false"
230
+ },
231
+ "button": {
232
+ "type": "boolean",
233
+ "mutable": false,
234
+ "complexType": {
235
+ "original": "boolean",
236
+ "resolved": "boolean",
237
+ "references": {}
238
+ },
239
+ "required": false,
240
+ "optional": false,
241
+ "docs": {
242
+ "tags": [],
243
+ "text": "Define se o input vai ter um bot\u00E3o a direita"
244
+ },
245
+ "attribute": "button",
246
+ "reflect": true,
247
+ "defaultValue": "false"
248
+ },
249
+ "highlight": {
250
+ "type": "boolean",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "boolean",
254
+ "resolved": "boolean",
255
+ "references": {}
256
+ },
257
+ "required": false,
258
+ "optional": false,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": ""
262
+ },
263
+ "attribute": "highlight",
264
+ "reflect": true,
265
+ "defaultValue": "false"
266
+ },
267
+ "success": {
268
+ "type": "boolean",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "boolean",
272
+ "resolved": "boolean",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": ""
280
+ },
281
+ "attribute": "success",
282
+ "reflect": true,
283
+ "defaultValue": "false"
284
+ },
285
+ "danger": {
286
+ "type": "boolean",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "boolean",
290
+ "resolved": "boolean",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": ""
298
+ },
299
+ "attribute": "danger",
300
+ "reflect": true,
301
+ "defaultValue": "false"
302
+ },
303
+ "info": {
304
+ "type": "boolean",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "boolean",
308
+ "resolved": "boolean",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": ""
316
+ },
317
+ "attribute": "info",
318
+ "reflect": true,
319
+ "defaultValue": "false"
320
+ },
321
+ "warning": {
322
+ "type": "boolean",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "boolean",
326
+ "resolved": "boolean",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": false,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": ""
334
+ },
335
+ "attribute": "warning",
336
+ "reflect": true,
337
+ "defaultValue": "false"
338
+ },
339
+ "label": {
340
+ "type": "string",
341
+ "mutable": false,
342
+ "complexType": {
343
+ "original": "string",
344
+ "resolved": "string",
345
+ "references": {}
346
+ },
347
+ "required": false,
348
+ "optional": false,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": "Label para o input"
352
+ },
353
+ "attribute": "label",
354
+ "reflect": true
355
+ },
356
+ "name": {
357
+ "type": "string",
358
+ "mutable": false,
359
+ "complexType": {
360
+ "original": "string",
361
+ "resolved": "string",
362
+ "references": {}
363
+ },
364
+ "required": false,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Nome do campo de entrada"
369
+ },
370
+ "attribute": "name",
371
+ "reflect": true
372
+ },
373
+ "placeholder": {
374
+ "type": "string",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "string",
378
+ "resolved": "string",
379
+ "references": {}
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": "Uma dica ou sugest\u00E3o exibida dentro do campo de entrada quando ele est\u00E1 vazio"
386
+ },
387
+ "attribute": "placeholder",
388
+ "reflect": true
389
+ },
390
+ "readonly": {
391
+ "type": "boolean",
392
+ "mutable": false,
393
+ "complexType": {
394
+ "original": "boolean",
395
+ "resolved": "boolean",
396
+ "references": {}
397
+ },
398
+ "required": false,
399
+ "optional": false,
400
+ "docs": {
401
+ "tags": [],
402
+ "text": "Se definido como true, o valor do campo de entrada pode ser exibido, mas n\u00E3o editado pelo usu\u00E1rio."
403
+ },
404
+ "attribute": "readonly",
405
+ "reflect": true,
406
+ "defaultValue": "false"
407
+ },
408
+ "required": {
409
+ "type": "boolean",
410
+ "mutable": false,
411
+ "complexType": {
412
+ "original": "boolean",
413
+ "resolved": "boolean",
414
+ "references": {}
415
+ },
416
+ "required": false,
417
+ "optional": false,
418
+ "docs": {
419
+ "tags": [],
420
+ "text": "Se definido como true, o campo de entrada deve ser preenchido antes que o formul\u00E1rio possa ser enviado."
421
+ },
422
+ "attribute": "required",
423
+ "reflect": true,
424
+ "defaultValue": "false"
425
+ },
426
+ "value": {
427
+ "type": "string",
428
+ "mutable": true,
429
+ "complexType": {
430
+ "original": "string",
431
+ "resolved": "string",
432
+ "references": {}
433
+ },
434
+ "required": false,
435
+ "optional": false,
436
+ "docs": {
437
+ "tags": [],
438
+ "text": "Valor inicial a ser exibido no campo de entrada."
439
+ },
440
+ "attribute": "value",
441
+ "reflect": true
442
+ }
443
+ };
444
+ }
445
+ static get events() {
446
+ return [{
447
+ "method": "brConnectedCallback",
448
+ "name": "brConnectedCallback",
449
+ "bubbles": true,
450
+ "cancelable": true,
451
+ "composed": true,
452
+ "docs": {
453
+ "tags": [],
454
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
455
+ },
456
+ "complexType": {
457
+ "original": "this",
458
+ "resolved": "this",
459
+ "references": {}
460
+ }
461
+ }, {
462
+ "method": "brComponentWillLoad",
463
+ "name": "brComponentWillLoad",
464
+ "bubbles": true,
465
+ "cancelable": true,
466
+ "composed": true,
467
+ "docs": {
468
+ "tags": [],
469
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
470
+ },
471
+ "complexType": {
472
+ "original": "this",
473
+ "resolved": "this",
474
+ "references": {}
475
+ }
476
+ }, {
477
+ "method": "brComponentDidLoad",
478
+ "name": "brComponentDidLoad",
479
+ "bubbles": true,
480
+ "cancelable": true,
481
+ "composed": true,
482
+ "docs": {
483
+ "tags": [],
484
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
485
+ },
486
+ "complexType": {
487
+ "original": "this",
488
+ "resolved": "this",
489
+ "references": {}
490
+ }
491
+ }, {
492
+ "method": "brComponentWillRender",
493
+ "name": "brComponentWillRender",
494
+ "bubbles": true,
495
+ "cancelable": true,
496
+ "composed": true,
497
+ "docs": {
498
+ "tags": [],
499
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
500
+ },
501
+ "complexType": {
502
+ "original": "this",
503
+ "resolved": "this",
504
+ "references": {}
505
+ }
506
+ }, {
507
+ "method": "brComponentDidRender",
508
+ "name": "brComponentDidRender",
509
+ "bubbles": true,
510
+ "cancelable": true,
511
+ "composed": true,
512
+ "docs": {
513
+ "tags": [],
514
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
515
+ },
516
+ "complexType": {
517
+ "original": "this",
518
+ "resolved": "this",
519
+ "references": {}
520
+ }
521
+ }, {
522
+ "method": "brComponentShouldUpdate",
523
+ "name": "brComponentShouldUpdate",
524
+ "bubbles": true,
525
+ "cancelable": true,
526
+ "composed": true,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
530
+ },
531
+ "complexType": {
532
+ "original": "this",
533
+ "resolved": "this",
534
+ "references": {}
535
+ }
536
+ }, {
537
+ "method": "brComponentWillUpdate",
538
+ "name": "brComponentWillUpdate",
539
+ "bubbles": true,
540
+ "cancelable": true,
541
+ "composed": true,
542
+ "docs": {
543
+ "tags": [],
544
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
545
+ },
546
+ "complexType": {
547
+ "original": "this",
548
+ "resolved": "this",
549
+ "references": {}
550
+ }
551
+ }, {
552
+ "method": "brComponentDidUpdate",
553
+ "name": "brComponentDidUpdate",
554
+ "bubbles": true,
555
+ "cancelable": true,
556
+ "composed": true,
557
+ "docs": {
558
+ "tags": [],
559
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
560
+ },
561
+ "complexType": {
562
+ "original": "this",
563
+ "resolved": "this",
564
+ "references": {}
565
+ }
566
+ }, {
567
+ "method": "brDisconnectedCallback",
568
+ "name": "brDisconnectedCallback",
569
+ "bubbles": true,
570
+ "cancelable": true,
571
+ "composed": true,
572
+ "docs": {
573
+ "tags": [],
574
+ "text": "Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
575
+ },
576
+ "complexType": {
577
+ "original": "this",
578
+ "resolved": "this",
579
+ "references": {}
580
+ }
581
+ }, {
582
+ "method": "formAssociatedCallback",
583
+ "name": "formAssociatedCallback",
584
+ "bubbles": true,
585
+ "cancelable": true,
586
+ "composed": true,
587
+ "docs": {
588
+ "tags": [],
589
+ "text": "Componente foi inserido em um `<form>`"
590
+ },
591
+ "complexType": {
592
+ "original": "this",
593
+ "resolved": "this",
594
+ "references": {}
595
+ }
596
+ }, {
597
+ "method": "formDisassociatedCallback",
598
+ "name": "formDisassociatedCallback",
599
+ "bubbles": true,
600
+ "cancelable": true,
601
+ "composed": true,
602
+ "docs": {
603
+ "tags": [],
604
+ "text": "Componente foi removido de um `<form>`"
605
+ },
606
+ "complexType": {
607
+ "original": "this",
608
+ "resolved": "this",
609
+ "references": {}
610
+ }
611
+ }, {
612
+ "method": "valueChange",
613
+ "name": "valueChange",
614
+ "bubbles": true,
615
+ "cancelable": true,
616
+ "composed": true,
617
+ "docs": {
618
+ "tags": [],
619
+ "text": "Valor atualizado do input"
620
+ },
621
+ "complexType": {
622
+ "original": "string",
623
+ "resolved": "string",
624
+ "references": {}
625
+ }
626
+ }];
627
+ }
628
+ static get elementRef() { return "el"; }
629
+ static get attachInternalsMemberName() { return "elementInternals"; }
630
+ }
631
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, Host, Prop, h } from '@stencil/core'\nimport { Attributes, inheritAriaAttributes } from '../../utils/inherited-attributes'\nimport { CssClassMap } from '../../utils/interfaces'\n\n/**\n *\n * Consulte a [documentação GovBR-DS](https://www.gov.br/ds/components/input?tab=designer) para mais detalhes.\n *\n * @slot action Define a ação interna\n *\n */\n@Component({\n tag: 'br-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input {\n /** Elemento host */\n @Element() el: HTMLInputElement\n\n @AttachInternals() elementInternals: ElementInternals\n\n /** Tipo de campo de entrada */\n @Prop({ reflect: true }) type:\n | 'color'\n | 'email'\n | 'hidden'\n | 'password'\n | 'range'\n | 'search'\n | 'number'\n | 'tel'\n | 'text'\n | 'url' = 'text'\n\n /** Define o comportamento padrão do browser para autocomplete em formulários */\n @Prop({ reflect: true }) autocomplete: 'on' | 'off'\n\n /** Se definido como true, o campo de entrada receberá foco automaticamente quando o formulário for carregado */\n @Prop({ reflect: true }) autofocus: boolean = false\n\n /** Comportamento: densidade */\n @Prop({ reflect: true }) density: 'small' | 'large' | '' = ''\n\n /** Se definido como true, o campo de entrada é desabilitado e não pode ser interrompido. */\n @Prop({ reflect: true }) disabled: boolean = false\n\n /** Define o label e input como comportamento inline */\n @Prop({ reflect: true }) inline: boolean = false\n\n /** Define se o input vai ser icon. Use o @slot icon para definir o ícone */\n @Prop({ reflect: true }) icon: boolean = false\n\n /** Define se o input vai ter um botão a direita */\n @Prop({ reflect: true }) button: boolean = false\n\n @Prop({ reflect: true }) highlight: boolean = false\n\n @Prop({ reflect: true }) success: boolean = false\n\n @Prop({ reflect: true }) danger: boolean = false\n\n @Prop({ reflect: true }) info: boolean = false\n\n @Prop({ reflect: true }) warning: boolean = false\n\n /** Label para o input */\n @Prop({ reflect: true }) label: string\n\n /** Nome do campo de entrada */\n @Prop({ reflect: true }) name: string\n\n /** Uma dica ou sugestão exibida dentro do campo de entrada quando ele está vazio */\n @Prop({ reflect: true }) placeholder: string\n\n /** Se definido como true, o valor do campo de entrada pode ser exibido, mas não editado pelo usuário. */\n @Prop({ reflect: true }) readonly: boolean = false\n\n /** Se definido como true, o campo de entrada deve ser preenchido antes que o formulário possa ser enviado. */\n @Prop({ reflect: true }) required: boolean = false\n\n /** Valor inicial a ser exibido no campo de entrada. */\n @Prop({ reflect: true, mutable: 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 getInputCssClassMap(): CssClassMap {\n return {\n 'br-input': true,\n 'input-button': this.button,\n large: this.density === 'large',\n small: this.density === 'small',\n 'input-inline': this.inline,\n 'input-highlight': this.highlight,\n success: this.success,\n danger: this.danger,\n info: this.info,\n warning: this.warning,\n }\n }\n\n private inheritedAttributes: Attributes = {}\n\n /** Valor atualizado do input */\n @Event() valueChange!: EventEmitter<string>\n\n private handleInput(event: Event) {\n this.value = (event.target as HTMLInputElement).value\n this.valueChange.emit(this.value)\n }\n\n render() {\n return (\n <Host>\n <div class={this.getInputCssClassMap()}>\n {this.label && (\n <label class=\"text-nowrap\" htmlFor={this.el.id}>\n {this.label}\n </label>\n )}\n {this.icon && (\n <div class=\"input-icon\">\n <slot name=\"icon\"></slot>\n </div>\n )}\n <input\n autocomplete={this.autocomplete}\n autofocus={this.autofocus}\n disabled={this.disabled}\n onInput={this.handleInput.bind(this)}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n title={this.el.title}\n type={this.type}\n value={this.value}\n {...this.inheritedAttributes}\n />\n {this.button && (\n <br-button class=\"br-button\" circle>\n <slot name=\"action\"></slot>\n </br-button>\n )}\n </div>\n </Host>\n )\n }\n}\n"]}