@govbr-ds/webcomponents 2.0.0-next.40 → 2.0.0-next.41

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 (53) hide show
  1. package/dist/cjs/br-button.br-icon.entry.cjs.js.map +1 -1
  2. package/dist/cjs/br-button_2.cjs.entry.js +16 -2
  3. package/dist/cjs/br-button_2.cjs.entry.js.map +1 -1
  4. package/dist/cjs/br-input.br-radio.entry.cjs.js.map +1 -1
  5. package/dist/cjs/br-input_2.cjs.entry.js +8 -4
  6. package/dist/cjs/br-input_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/webcomponents.cjs.js +1 -1
  9. package/dist/collection/components/button/button.js +54 -2
  10. package/dist/collection/components/button/button.js.map +1 -1
  11. package/dist/collection/components/input/input.css +1 -1
  12. package/dist/collection/components/input/input.js +26 -3
  13. package/dist/collection/components/input/input.js.map +1 -1
  14. package/dist/components/br-breadcrumb.js +1 -1
  15. package/dist/components/br-button.js +1 -1
  16. package/dist/components/br-footer-social.js +1 -1
  17. package/dist/components/br-input.js +3 -3
  18. package/dist/components/br-message.js +1 -1
  19. package/dist/components/br-select.js +2 -2
  20. package/dist/components/br-step-item.js +1 -1
  21. package/dist/components/br-tag.js +6 -6
  22. package/dist/components/br-upload.js +1 -1
  23. package/dist/components/{p-THYai_l5.js → p-BxU9TOn1.js} +14 -8
  24. package/dist/components/p-BxU9TOn1.js.map +1 -0
  25. package/dist/components/{p-CtvDP3zf.js → p-COPEUBKR.js} +27 -9
  26. package/dist/components/p-COPEUBKR.js.map +1 -0
  27. package/dist/custom-elements.json +45 -0
  28. package/dist/esm/br-button.br-icon.entry.js.map +1 -1
  29. package/dist/esm/br-button_2.entry.js +16 -2
  30. package/dist/esm/br-button_2.entry.js.map +1 -1
  31. package/dist/esm/br-input.br-radio.entry.js.map +1 -1
  32. package/dist/esm/br-input_2.entry.js +8 -4
  33. package/dist/esm/br-input_2.entry.js.map +1 -1
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/webcomponents.js +1 -1
  36. package/dist/hydrate/index.js +30 -9
  37. package/dist/hydrate/index.mjs +30 -9
  38. package/dist/types/components/button/button.d.ts +14 -0
  39. package/dist/types/components/input/input.d.ts +4 -0
  40. package/dist/types/components.d.ts +24 -0
  41. package/dist/webcomponents/br-button.br-icon.entry.esm.js.map +1 -1
  42. package/dist/webcomponents/br-input.br-radio.entry.esm.js.map +1 -1
  43. package/dist/webcomponents/{p-bc417fe6.entry.js → p-383a4240.entry.js} +23 -7
  44. package/dist/webcomponents/p-383a4240.entry.js.map +1 -0
  45. package/dist/webcomponents/{p-8fe3366e.entry.js → p-aaedb60b.entry.js} +11 -6
  46. package/dist/webcomponents/p-aaedb60b.entry.js.map +1 -0
  47. package/dist/webcomponents/webcomponents.esm.js +6 -3
  48. package/dist/webcomponents.html-custom-data.json +5 -2
  49. package/package.json +1 -1
  50. package/dist/components/p-CtvDP3zf.js.map +0 -1
  51. package/dist/components/p-THYai_l5.js.map +0 -1
  52. package/dist/webcomponents/p-8fe3366e.entry.js.map +0 -1
  53. package/dist/webcomponents/p-bc417fe6.entry.js.map +0 -1
@@ -70,6 +70,20 @@ const Button = class {
70
70
  * Define o valor inicial do botão em um formulário.
71
71
  */
72
72
  value;
73
+ /**
74
+ * Define o rótulo acessível do botão.
75
+ * Este rótulo é usado por tecnologias assistivas para descrever a função do botão.
76
+ * É especialmente importante para botões com formato circular, onde o texto pode não ser visível.
77
+ * Se o botão não tiver um rótulo acessível, uma mensagem de aviso será exibida no console.
78
+ */
79
+ ariaLabel;
80
+ /**
81
+ * Define o estado de pressionado do botão.
82
+ * Este atributo é usado para indicar se o botão está atualmente pressionado ou não.
83
+ * É especialmente útil para botões que podem ser alternados entre os estados pressionado e não pressionado.
84
+ * O valor deve ser 'true' ou 'false'.
85
+ */
86
+ ariaPressed;
73
87
  handleClick = () => {
74
88
  if (this.type === 'submit') {
75
89
  const submitEvent = new SubmitEvent('submit', {
@@ -86,7 +100,7 @@ const Button = class {
86
100
  };
87
101
  componentDidLoad() {
88
102
  const ariaLabelValue = this.el.getAttribute('aria-label');
89
- if (!ariaLabelValue || ariaLabelValue.trim() === '') {
103
+ if (ariaLabelValue === null || ariaLabelValue === undefined || ariaLabelValue.trim() === '') {
90
104
  console.warn('[br-button]: Botões circulares devem conter um aria-label.');
91
105
  }
92
106
  }
@@ -105,7 +119,7 @@ const Button = class {
105
119
  };
106
120
  }
107
121
  render() {
108
- return (h(Host, { key: '87611f126b92c63a2333bdee46eed54c4b9a831d', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: '28889c9e74c2bf43667278898a860282582a04fb', "aria-label": this.shape === 'circle' ? this.el.getAttribute('aria-label') : null, class: this.getCssClassMap(), type: this.type, id: this.customId, disabled: this.disabled, value: this.value, onClick: this.handleClick }, h("slot", { key: 'acc285d2c24c261621da097c5f69dcbb4ecb15cf' }))));
122
+ return (h(Host, { key: '130f5a55bdd813a7fd11b66263f2133650cf67e4', "aria-disabled": this.disabled ? 'true' : null, role: "button" }, h("button", { key: '324ec22f391ff95a252308a27be24fb767e5fe13', "aria-label": this.shape === 'circle' ? this.ariaLabel : null, "aria-pressed": this.ariaPressed, class: this.getCssClassMap(), type: this.type, id: this.customId, disabled: this.disabled, value: this.value, onClick: this.handleClick }, h("slot", { key: 'a7da6f00d15d37707f18bc885676213c097a8de1' }))));
109
123
  }
110
124
  static get formAssociated() { return true; }
111
125
  };